source:
vbox/trunk/src/libs/softfloat-3e/TestFloat-3e-patch.diff
Last change on this file was 96411, checked in by , 2 years ago | |
---|---|
|
|
File size: 10.3 KB |
-
Makefile.kmk
diff -Nru TestFloat-3e-virgin/Makefile.kmk TestFloat-3e/Makefile.kmk
old new 1 # $Id: TestFloat-3e-patch.diff 96411 2022-08-22 19:47:58Z vboxsync $ 2 ## @file 3 # Sub-Makefile for TestFloat-3e. 4 # 5 6 # 7 # Copyright (C) 2022 Oracle and/or its affiliates. 8 # 9 # This file is part of VirtualBox base platform packages, as 10 # available from https://www.virtualbox.org. 11 # 12 # This program is free software; you can redistribute it and/or 13 # modify it under the terms of the GNU General Public License 14 # as published by the Free Software Foundation, in version 3 of the 15 # License. 16 # 17 # This program is distributed in the hope that it will be useful, but 18 # WITHOUT ANY WARRANTY; without even the implied warranty of 19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 # General Public License for more details. 21 # 22 # You should have received a copy of the GNU General Public License 23 # along with this program; if not, see <https://www.gnu.org/licenses>. 24 # 25 # SPDX-License-Identifier: GPL-3.0-only 26 # 27 28 SUB_DEPTH = ../../../.. 29 include $(KBUILD_PATH)/subheader.kmk 30 31 # 32 # Basis template for building test stuff. 33 # 34 TEMPLATE_VBoxTestFloat = Template for building SoftFloat-3e 35 TEMPLATE_VBoxTestFloat_EXTENDS = VBoxR3DllNonPedantic 36 TEMPLATE_VBoxTestFloat_SDKS = $(TEMPLATE_VBoxR3DllNonPedantic_SDKS) VBOX_SOFTFLOAT 37 TEMPLATE_VBoxTestFloat_DEFS = $(TEMPLATE_VBoxR3DllNonPedantic_DEFS) \ 38 FLOAT16 \ 39 FLOAT64 \ 40 EXTFLOAT80 \ 41 FLOAT128 \ 42 FLOAT_ROUND_ODD 43 ifn1of ($(KBUILD_TARGET), win) 44 TEMPLATE_VBoxTestFloat_DEFS.amd64 = $(TEMPLATE_VBoxR3DllNonPedantic_DEFS.amd64) LONG_DOUBLE_IS_EXTFLOAT80 45 endif 46 if1of ($(KBUILD_TARGET), win) 47 TEMPLATE_VBoxTestFloat_INCS.amd64 = ../build/Win-amd64-VCC $(TEMPLATE_VBoxR3DllNonPedantic_INCS.amd64) 48 else 49 TEMPLATE_VBoxTestFloat_INCS.amd64 = build/Linux-x86_64-GCC $(TEMPLATE_VBoxR3DllNonPedantic_INCS.amd64) 50 endif 51 TEMPLATE_VBoxTestFloat_INCS = $(TEMPLATE_VBoxR3DllNonPedantic_INCS) \ 52 source/subj-C \ 53 source 54 55 # -wd4068: test_a_ui32_z_f16.c(48): warning C4068: unknown pragma 'STDC' 56 # -wd4146: primitives.h(74): warning C4146: unary minus operator applied to unsigned type, result still unsigned 57 # -wd4715: genCases_f16.c(336) : warning C4715: 'f16Random': not all control paths return a value 58 TEMPLATE_VBoxTestFloat_CFLAGS.win = $(TEMPLATE_VBoxR3DllNonPedantic_CFLAGS) -wd4068 -wd4146 -wd4715 59 60 # 61 # For linking test executables. 62 # 63 TEMPLATE_VBoxTestFloatExe = Template for building SoftFloat-3e programs. 64 TEMPLATE_VBoxTestFloatExe_EXTENDS = VBoxTestFloat 65 TEMPLATE_VBoxTestFloatExe_INST = $(INST_TESTCASE) 66 TEMPLATE_VBoxTestFloatExe_LIBS = \ 67 $(VBox-TestFloat_1_TARGET) \ 68 $(TEMPLATE_VBoxTestFloat_LIBS) 69 70 # -wd4098: testfloat.c(438): warning C4098: 'subjFunction_az_extF80_rx': 'void' function returning a value 71 # -wd4102: testfloat.c(767): warning C4102: 'test_abz_f16': unreferenced label 72 # -wd4701: testfloat.c(1410) : warning C4701: potentially uninitialized local variable 'roundingMode' used 73 TEMPLATE_VBoxTestFloatExe_CFLAGS.win = $(TEMPLATE_VBoxTestFloat_CFLAGS.win) -wd4098 -wd4102 -wd4701 74 75 76 # 77 # Library. 78 # 79 LIBRARIES += VBox-TestFloat 80 VBox-TestFloat_TEMPLATE := VBoxTestFloat 81 VBox-TestFloat_INSTTYPE := none 82 VBox-TestFloat_SOURCES := \ 83 source/uint128_inline.c \ 84 source/uint128.c \ 85 source/fail.c \ 86 source/functions_common.c \ 87 source/functionInfos.c \ 88 source/standardFunctionInfos.c \ 89 source/random.c \ 90 source/genCases_common.c \ 91 source/genCases_writeTestsTotal.c \ 92 source/verCases_inline.c \ 93 source/verCases_common.c \ 94 source/verCases_writeFunctionName.c \ 95 source/readHex.c \ 96 source/writeHex.c \ 97 source/writeCase_a_ui32.c \ 98 source/writeCase_a_ui64.c \ 99 source/writeCase_a_f16.c \ 100 source/writeCase_ab_f16.c \ 101 source/writeCase_abc_f16.c \ 102 source/writeCase_a_f32.c \ 103 source/writeCase_ab_f32.c \ 104 source/writeCase_abc_f32.c \ 105 source/writeCase_a_f64.c \ 106 source/writeCase_ab_f64.c \ 107 source/writeCase_abc_f64.c \ 108 source/writeCase_a_extF80M.c \ 109 source/writeCase_ab_extF80M.c \ 110 source/writeCase_a_f128M.c \ 111 source/writeCase_ab_f128M.c \ 112 source/writeCase_abc_f128M.c \ 113 source/writeCase_z_bool.c \ 114 source/writeCase_z_ui32.c \ 115 source/writeCase_z_ui64.c \ 116 source/writeCase_z_f16.c \ 117 source/writeCase_z_f32.c \ 118 source/writeCase_z_f64.c \ 119 source/writeCase_z_extF80M.c \ 120 source/writeCase_z_f128M.c \ 121 source/testLoops_common.c \ 122 \ 123 source/test_a_ui32_z_f16.c \ 124 source/test_a_ui32_z_f32.c \ 125 source/test_a_ui32_z_f64.c \ 126 source/test_a_ui32_z_extF80.c \ 127 source/test_a_ui32_z_f128.c \ 128 source/test_a_ui64_z_f16.c \ 129 source/test_a_ui64_z_f32.c \ 130 source/test_a_ui64_z_f64.c \ 131 source/test_a_ui64_z_extF80.c \ 132 source/test_a_ui64_z_f128.c \ 133 source/test_a_i32_z_f16.c \ 134 source/test_a_i32_z_f32.c \ 135 source/test_a_i32_z_f64.c \ 136 source/test_a_i32_z_extF80.c \ 137 source/test_a_i32_z_f128.c \ 138 source/test_a_i64_z_f16.c \ 139 source/test_a_i64_z_f32.c \ 140 source/test_a_i64_z_f64.c \ 141 source/test_a_i64_z_extF80.c \ 142 source/test_a_i64_z_f128.c \ 143 source/test_a_f16_z_ui32_rx.c \ 144 source/test_a_f16_z_ui64_rx.c \ 145 source/test_a_f16_z_i32_rx.c \ 146 source/test_a_f16_z_i64_rx.c \ 147 source/test_a_f16_z_ui32_x.c \ 148 source/test_a_f16_z_ui64_x.c \ 149 source/test_a_f16_z_i32_x.c \ 150 source/test_a_f16_z_i64_x.c \ 151 source/test_a_f16_z_f32.c \ 152 source/test_a_f16_z_f64.c \ 153 source/test_a_f16_z_extF80.c \ 154 source/test_a_f16_z_f128.c \ 155 source/test_az_f16.c \ 156 source/test_az_f16_rx.c \ 157 source/test_abz_f16.c \ 158 source/test_abcz_f16.c \ 159 source/test_ab_f16_z_bool.c \ 160 source/test_a_f32_z_ui32_rx.c \ 161 source/test_a_f32_z_ui64_rx.c \ 162 source/test_a_f32_z_i32_rx.c \ 163 source/test_a_f32_z_i64_rx.c \ 164 source/test_a_f32_z_ui32_x.c \ 165 source/test_a_f32_z_ui64_x.c \ 166 source/test_a_f32_z_i32_x.c \ 167 source/test_a_f32_z_i64_x.c \ 168 source/test_a_f32_z_f16.c \ 169 source/test_a_f32_z_f64.c \ 170 source/test_a_f32_z_extF80.c \ 171 source/test_a_f32_z_f128.c \ 172 source/test_az_f32.c \ 173 source/test_az_f32_rx.c \ 174 source/test_abz_f32.c \ 175 source/test_abcz_f32.c \ 176 source/test_ab_f32_z_bool.c \ 177 source/test_a_f64_z_ui32_rx.c \ 178 source/test_a_f64_z_ui64_rx.c \ 179 source/test_a_f64_z_i32_rx.c \ 180 source/test_a_f64_z_i64_rx.c \ 181 source/test_a_f64_z_ui32_x.c \ 182 source/test_a_f64_z_ui64_x.c \ 183 source/test_a_f64_z_i32_x.c \ 184 source/test_a_f64_z_i64_x.c \ 185 source/test_a_f64_z_f16.c \ 186 source/test_a_f64_z_f32.c \ 187 source/test_a_f64_z_extF80.c \ 188 source/test_a_f64_z_f128.c \ 189 source/test_az_f64.c \ 190 source/test_az_f64_rx.c \ 191 source/test_abz_f64.c \ 192 source/test_abcz_f64.c \ 193 source/test_ab_f64_z_bool.c \ 194 source/test_a_extF80_z_ui32_rx.c \ 195 source/test_a_extF80_z_ui64_rx.c \ 196 source/test_a_extF80_z_i32_rx.c \ 197 source/test_a_extF80_z_i64_rx.c \ 198 source/test_a_extF80_z_ui32_x.c \ 199 source/test_a_extF80_z_ui64_x.c \ 200 source/test_a_extF80_z_i32_x.c \ 201 source/test_a_extF80_z_i64_x.c \ 202 source/test_a_extF80_z_f16.c \ 203 source/test_a_extF80_z_f32.c \ 204 source/test_a_extF80_z_f64.c \ 205 source/test_a_extF80_z_f128.c \ 206 source/test_az_extF80.c \ 207 source/test_az_extF80_rx.c \ 208 source/test_abz_extF80.c \ 209 source/test_ab_extF80_z_bool.c \ 210 source/test_a_f128_z_ui32_rx.c \ 211 source/test_a_f128_z_ui64_rx.c \ 212 source/test_a_f128_z_i32_rx.c \ 213 source/test_a_f128_z_i64_rx.c \ 214 source/test_a_f128_z_ui32_x.c \ 215 source/test_a_f128_z_ui64_x.c \ 216 source/test_a_f128_z_i32_x.c \ 217 source/test_a_f128_z_i64_x.c \ 218 source/test_a_f128_z_f16.c \ 219 source/test_a_f128_z_f32.c \ 220 source/test_a_f128_z_f64.c \ 221 source/test_a_f128_z_extF80.c \ 222 source/test_az_f128.c \ 223 source/test_az_f128_rx.c \ 224 source/test_abz_f128.c \ 225 source/test_abcz_f128.c \ 226 source/test_ab_f128_z_bool.c \ 227 \ 228 source/genCases_ui32.c \ 229 source/genCases_ui64.c \ 230 source/genCases_i32.c \ 231 source/genCases_i64.c \ 232 source/genCases_f16.c \ 233 source/genCases_f32.c \ 234 source/genCases_f64.c \ 235 source/genCases_extF80.c \ 236 source/genCases_f128.c 237 238 239 PROGRAMS += tstTestFloat 240 tstTestFloat_TEMPLATE = VBoxTestFloatExe 241 tstTestFloat_SOURCES = \ 242 source/testfloat.c \ 243 source/subjfloat_functions.c \ 244 source/subj-C/subjfloat.c 245 246 PROGRAMS += tstTestFloatVer 247 tstTestFloatVer_TEMPLATE = VBoxTestFloatExe 248 tstTestFloatVer_SOURCES = \ 249 source/testfloat_ver.c \ 250 source/verLoops.c 251 252 PROGRAMS += tstTestFloatGen 253 tstTestFloatGen_TEMPLATE = VBoxTestFloatExe 254 tstTestFloatGen_SOURCES = \ 255 source/testfloat_gen.c \ 256 source/genLoops.c 257 258 PROGRAMS += tstTestFloatTime 259 tstTestFloatTime_TEMPLATE = VBoxTestFloatExe 260 tstTestFloatTime_SOURCES = \ 261 source/timesoftfloat.c 262 tstTestFloatTime_CFLAGS.win = -wd4459 # timesoftfloat.c(4201): warning C4459: declaration of 'exact' hides global declaration 263 264 PROGRAMS += tstTestFloat2 265 tstTestFloat2_TEMPLATE = VBoxTestFloatExe 266 tstTestFloat2_SOURCES = \ 267 source/testsoftfloat.c \ 268 source/slowfloat.c 269 270 include $(FILE_KBUILD_SUB_FOOTER) 271 -
source/testfloat.c
diff -Nru TestFloat-3e-virgin/source/testfloat.c TestFloat-3e/source/testfloat.c
old new 1353 1353 bool standardFunctionHasFixedRounding; 1354 1354 int roundingCode; 1355 1355 bool exact; 1356 uint_fast8_t roundingPrecision, roundingMode ;1356 uint_fast8_t roundingPrecision, roundingMode = 0; 1357 1357 1358 1358 functionCode = standardFunctionInfoPtr->functionCode; 1359 1359 functionAttribs = functionInfos[functionCode].attribs; -
source/testsoftfloat.c
diff -Nru TestFloat-3e-virgin/source/testsoftfloat.c TestFloat-3e/source/testsoftfloat.c
old new 793 793 int functionAttribs; 794 794 uint_fast8_t roundingPrecision; 795 795 int roundingCode; 796 uint_fast8_t roundingMode ;796 uint_fast8_t roundingMode = 0; 797 797 int exactCode; 798 798 bool exact; 799 799 int tininessCode; -
source/timesoftfloat.c
diff -Nru TestFloat-3e-virgin/source/timesoftfloat.c TestFloat-3e/source/timesoftfloat.c
old new 4794 4794 ) 4795 4795 { 4796 4796 int functionAttribs, exactCode; 4797 uint_fast8_t roundingMode , tininessMode;4797 uint_fast8_t roundingMode = softfloat_round_near_even, tininessMode; 4798 4798 4799 4799 functionNamePtr = functionInfos[functionCode].namePtr; 4800 4800 functionAttribs = functionInfos[functionCode].attribs;
Note:
See TracBrowser
for help on using the repository browser.