Browse Source

Added Berkeley softfloat library

(http://www.jhauser.us/arithmetic/SoftFloat.html) with RISCV
specialization and cmake build
Eyck Jentzsch 1 year ago
parent
commit
dcaf5467e8
100 changed files with 11350 additions and 0 deletions
  1. 0
    0
      riscv/gen_input/templates/vm_riscv.in.cpp
  2. 381
    0
      softfloat/CMakeLists.txt
  3. 37
    0
      softfloat/COPYING.txt
  4. 49
    0
      softfloat/README.html
  5. 21
    0
      softfloat/README.txt
  6. 325
    0
      softfloat/build/Linux-386-GCC/Makefile
  7. 53
    0
      softfloat/build/Linux-386-GCC/platform.h
  8. 325
    0
      softfloat/build/Linux-386-SSE2-GCC/Makefile
  9. 53
    0
      softfloat/build/Linux-386-SSE2-GCC/platform.h
  10. 323
    0
      softfloat/build/Linux-ARM-VFPv2-GCC/Makefile
  11. 53
    0
      softfloat/build/Linux-ARM-VFPv2-GCC/platform.h
  12. 390
    0
      softfloat/build/Linux-x86_64-GCC/Makefile
  13. 55
    0
      softfloat/build/Linux-x86_64-GCC/platform.h
  14. 325
    0
      softfloat/build/Win32-MinGW/Makefile
  15. 53
    0
      softfloat/build/Win32-MinGW/platform.h
  16. 325
    0
      softfloat/build/Win32-SSE2-MinGW/Makefile
  17. 53
    0
      softfloat/build/Win32-SSE2-MinGW/platform.h
  18. 390
    0
      softfloat/build/Win64-MinGW-w64/Makefile
  19. 54
    0
      softfloat/build/Win64-MinGW-w64/platform.h
  20. 391
    0
      softfloat/build/template-FAST_INT64/Makefile
  21. 50
    0
      softfloat/build/template-FAST_INT64/platform.h
  22. 325
    0
      softfloat/build/template-not-FAST_INT64/Makefile
  23. 50
    0
      softfloat/build/template-not-FAST_INT64/platform.h
  24. 258
    0
      softfloat/doc/SoftFloat-history.html
  25. 686
    0
      softfloat/doc/SoftFloat-source.html
  26. 1527
    0
      softfloat/doc/SoftFloat.html
  27. 57
    0
      softfloat/source/8086-SSE/extF80M_isSignalingNaN.c
  28. 60
    0
      softfloat/source/8086-SSE/f128M_isSignalingNaN.c
  29. 56
    0
      softfloat/source/8086-SSE/s_commonNaNToExtF80M.c
  30. 56
    0
      softfloat/source/8086-SSE/s_commonNaNToExtF80UI.c
  31. 56
    0
      softfloat/source/8086-SSE/s_commonNaNToF128M.c
  32. 55
    0
      softfloat/source/8086-SSE/s_commonNaNToF128UI.c
  33. 51
    0
      softfloat/source/8086-SSE/s_commonNaNToF16UI.c
  34. 51
    0
      softfloat/source/8086-SSE/s_commonNaNToF32UI.c
  35. 53
    0
      softfloat/source/8086-SSE/s_commonNaNToF64UI.c
  36. 62
    0
      softfloat/source/8086-SSE/s_extF80MToCommonNaN.c
  37. 62
    0
      softfloat/source/8086-SSE/s_extF80UIToCommonNaN.c
  38. 62
    0
      softfloat/source/8086-SSE/s_f128MToCommonNaN.c
  39. 65
    0
      softfloat/source/8086-SSE/s_f128UIToCommonNaN.c
  40. 59
    0
      softfloat/source/8086-SSE/s_f16UIToCommonNaN.c
  41. 59
    0
      softfloat/source/8086-SSE/s_f32UIToCommonNaN.c
  42. 59
    0
      softfloat/source/8086-SSE/s_f64UIToCommonNaN.c
  43. 107
    0
      softfloat/source/8086-SSE/s_propagateNaNExtF80M.c
  44. 106
    0
      softfloat/source/8086-SSE/s_propagateNaNExtF80UI.c
  45. 76
    0
      softfloat/source/8086-SSE/s_propagateNaNF128M.c
  46. 81
    0
      softfloat/source/8086-SSE/s_propagateNaNF128UI.c
  47. 63
    0
      softfloat/source/8086-SSE/s_propagateNaNF16UI.c
  48. 63
    0
      softfloat/source/8086-SSE/s_propagateNaNF32UI.c
  49. 63
    0
      softfloat/source/8086-SSE/s_propagateNaNF64UI.c
  50. 52
    0
      softfloat/source/8086-SSE/softfloat_raiseFlags.c
  51. 376
    0
      softfloat/source/8086-SSE/specialize.h
  52. 57
    0
      softfloat/source/8086/extF80M_isSignalingNaN.c
  53. 60
    0
      softfloat/source/8086/f128M_isSignalingNaN.c
  54. 56
    0
      softfloat/source/8086/s_commonNaNToExtF80M.c
  55. 56
    0
      softfloat/source/8086/s_commonNaNToExtF80UI.c
  56. 56
    0
      softfloat/source/8086/s_commonNaNToF128M.c
  57. 55
    0
      softfloat/source/8086/s_commonNaNToF128UI.c
  58. 51
    0
      softfloat/source/8086/s_commonNaNToF16UI.c
  59. 51
    0
      softfloat/source/8086/s_commonNaNToF32UI.c
  60. 53
    0
      softfloat/source/8086/s_commonNaNToF64UI.c
  61. 62
    0
      softfloat/source/8086/s_extF80MToCommonNaN.c
  62. 62
    0
      softfloat/source/8086/s_extF80UIToCommonNaN.c
  63. 62
    0
      softfloat/source/8086/s_f128MToCommonNaN.c
  64. 65
    0
      softfloat/source/8086/s_f128UIToCommonNaN.c
  65. 59
    0
      softfloat/source/8086/s_f16UIToCommonNaN.c
  66. 59
    0
      softfloat/source/8086/s_f32UIToCommonNaN.c
  67. 59
    0
      softfloat/source/8086/s_f64UIToCommonNaN.c
  68. 107
    0
      softfloat/source/8086/s_propagateNaNExtF80M.c
  69. 106
    0
      softfloat/source/8086/s_propagateNaNExtF80UI.c
  70. 108
    0
      softfloat/source/8086/s_propagateNaNF128M.c
  71. 105
    0
      softfloat/source/8086/s_propagateNaNF128UI.c
  72. 84
    0
      softfloat/source/8086/s_propagateNaNF16UI.c
  73. 84
    0
      softfloat/source/8086/s_propagateNaNF32UI.c
  74. 84
    0
      softfloat/source/8086/s_propagateNaNF64UI.c
  75. 52
    0
      softfloat/source/8086/softfloat_raiseFlags.c
  76. 376
    0
      softfloat/source/8086/specialize.h
  77. 57
    0
      softfloat/source/ARM-VFPv2-defaultNaN/extF80M_isSignalingNaN.c
  78. 60
    0
      softfloat/source/ARM-VFPv2-defaultNaN/f128M_isSignalingNaN.c
  79. 57
    0
      softfloat/source/ARM-VFPv2-defaultNaN/s_commonNaNToExtF80M.c
  80. 57
    0
      softfloat/source/ARM-VFPv2-defaultNaN/s_commonNaNToExtF80UI.c
  81. 60
    0
      softfloat/source/ARM-VFPv2-defaultNaN/s_commonNaNToF128M.c
  82. 56
    0
      softfloat/source/ARM-VFPv2-defaultNaN/s_commonNaNToF128UI.c
  83. 5
    0
      softfloat/source/ARM-VFPv2-defaultNaN/s_commonNaNToF16UI.c
  84. 5
    0
      softfloat/source/ARM-VFPv2-defaultNaN/s_commonNaNToF32UI.c
  85. 5
    0
      softfloat/source/ARM-VFPv2-defaultNaN/s_commonNaNToF64UI.c
  86. 5
    0
      softfloat/source/ARM-VFPv2-defaultNaN/s_extF80MToCommonNaN.c
  87. 5
    0
      softfloat/source/ARM-VFPv2-defaultNaN/s_extF80UIToCommonNaN.c
  88. 5
    0
      softfloat/source/ARM-VFPv2-defaultNaN/s_f128MToCommonNaN.c
  89. 5
    0
      softfloat/source/ARM-VFPv2-defaultNaN/s_f128UIToCommonNaN.c
  90. 5
    0
      softfloat/source/ARM-VFPv2-defaultNaN/s_f16UIToCommonNaN.c
  91. 5
    0
      softfloat/source/ARM-VFPv2-defaultNaN/s_f32UIToCommonNaN.c
  92. 5
    0
      softfloat/source/ARM-VFPv2-defaultNaN/s_f64UIToCommonNaN.c
  93. 74
    0
      softfloat/source/ARM-VFPv2-defaultNaN/s_propagateNaNExtF80M.c
  94. 73
    0
      softfloat/source/ARM-VFPv2-defaultNaN/s_propagateNaNExtF80UI.c
  95. 68
    0
      softfloat/source/ARM-VFPv2-defaultNaN/s_propagateNaNF128M.c
  96. 73
    0
      softfloat/source/ARM-VFPv2-defaultNaN/s_propagateNaNF128UI.c
  97. 58
    0
      softfloat/source/ARM-VFPv2-defaultNaN/s_propagateNaNF16UI.c
  98. 58
    0
      softfloat/source/ARM-VFPv2-defaultNaN/s_propagateNaNF32UI.c
  99. 58
    0
      softfloat/source/ARM-VFPv2-defaultNaN/s_propagateNaNF64UI.c
  100. 0
    0
      softfloat/source/ARM-VFPv2-defaultNaN/softfloat_raiseFlags.c

riscv/src/internal/vm_riscv.in.cpp → riscv/gen_input/templates/vm_riscv.in.cpp View File


+ 381
- 0
softfloat/CMakeLists.txt View File

@@ -0,0 +1,381 @@
1
+cmake_minimum_required(VERSION 3.3)
2
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) # main (top) cmake dir
3
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) # project specific cmake dir
4
+
5
+# CMake useful variables
6
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
7
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") 
8
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
9
+
10
+# Set the name of your project here
11
+project("sotfloat")
12
+
13
+# Set the version number of your project here (format is MAJOR.MINOR.PATCHLEVEL - e.g. 1.0.0)
14
+#set(VERSION_MAJOR "3")
15
+#set(VERSION_MINOR "0")
16
+#set(VERSION_PATCH "0")
17
+set(VERSION "3e")
18
+
19
+include(Common)
20
+
21
+set(SPECIALIZATION RISCV)
22
+
23
+add_definitions(
24
+	-DSOFTFLOAT_ROUND_ODD 
25
+	-DINLINE_LEVEL=5 
26
+	-DSOFTFLOAT_FAST_DIV32TO16
27
+  	-DSOFTFLOAT_FAST_DIV64TO32
28
+  	-DSOFTFLOAT_FAST_INT64
29
+#  	-DTHREAD_LOCAL=__thread
30
+)
31
+
32
+set(SOFTFLOAT_INCLUDE_DIRS
33
+    ${PROJECT_SOURCE_DIR}/build/Linux-x86_64-GCC
34
+    ${PROJECT_SOURCE_DIR}/source/include
35
+    ${PROJECT_SOURCE_DIR}/source/${SPECIALIZATION}
36
+)
37
+
38
+include_directories(${SOFTFLOAT_INCLUDE_DIRS})
39
+
40
+set(LIB_HEADERS source/include/softfloat.h source/include/softfloat_types.h)
41
+set(PRIMITIVES
42
+	source/s_eq128.c
43
+	source/s_le128.c
44
+	source/s_lt128.c
45
+	source/s_shortShiftLeft128.c
46
+	source/s_shortShiftRight128.c
47
+	source/s_shortShiftRightJam64.c
48
+	source/s_shortShiftRightJam64Extra.c
49
+	source/s_shortShiftRightJam128.c
50
+	source/s_shortShiftRightJam128Extra.c
51
+	source/s_shiftRightJam32.c
52
+	source/s_shiftRightJam64.c
53
+	source/s_shiftRightJam64Extra.c
54
+	source/s_shiftRightJam128.c
55
+	source/s_shiftRightJam128Extra.c
56
+	source/s_shiftRightJam256M.c
57
+	source/s_countLeadingZeros8.c
58
+	source/s_countLeadingZeros16.c
59
+	source/s_countLeadingZeros32.c
60
+	source/s_countLeadingZeros64.c
61
+	source/s_add128.c
62
+	source/s_add256M.c
63
+	source/s_sub128.c
64
+	source/s_sub256M.c
65
+	source/s_mul64ByShifted32To128.c
66
+	source/s_mul64To128.c
67
+	source/s_mul128By32.c
68
+	source/s_mul128To256M.c
69
+	source/s_approxRecip_1Ks.c
70
+	source/s_approxRecip32_1.c
71
+	source/s_approxRecipSqrt_1Ks.c
72
+	source/s_approxRecipSqrt32_1.c
73
+)
74
+
75
+set(SPECIALIZE
76
+	source/${SPECIALIZATION}/softfloat_raiseFlags.c
77
+	source/${SPECIALIZATION}/s_f16UIToCommonNaN.c
78
+	source/${SPECIALIZATION}/s_commonNaNToF16UI.c
79
+	source/${SPECIALIZATION}/s_propagateNaNF16UI.c
80
+	source/${SPECIALIZATION}/s_f32UIToCommonNaN.c
81
+	source/${SPECIALIZATION}/s_commonNaNToF32UI.c
82
+	source/${SPECIALIZATION}/s_propagateNaNF32UI.c
83
+	source/${SPECIALIZATION}/s_f64UIToCommonNaN.c
84
+	source/${SPECIALIZATION}/s_commonNaNToF64UI.c
85
+	source/${SPECIALIZATION}/s_propagateNaNF64UI.c
86
+	source/${SPECIALIZATION}/extF80M_isSignalingNaN.c
87
+	source/${SPECIALIZATION}/s_extF80UIToCommonNaN.c
88
+	source/${SPECIALIZATION}/s_commonNaNToExtF80UI.c
89
+	source/${SPECIALIZATION}/s_propagateNaNExtF80UI.c
90
+	source/${SPECIALIZATION}/f128M_isSignalingNaN.c
91
+	source/${SPECIALIZATION}/s_f128UIToCommonNaN.c
92
+	source/${SPECIALIZATION}/s_commonNaNToF128UI.c
93
+	source/${SPECIALIZATION}/s_propagateNaNF128UI.c
94
+)
95
+
96
+set(OTHERS
97
+	source/s_roundToUI32.c
98
+	source/s_roundToUI64.c
99
+	source/s_roundToI32.c
100
+	source/s_roundToI64.c
101
+	source/s_normSubnormalF16Sig.c
102
+	source/s_roundPackToF16.c
103
+	source/s_normRoundPackToF16.c
104
+	source/s_addMagsF16.c
105
+	source/s_subMagsF16.c
106
+	source/s_mulAddF16.c
107
+	source/s_normSubnormalF32Sig.c
108
+	source/s_roundPackToF32.c
109
+	source/s_normRoundPackToF32.c
110
+	source/s_addMagsF32.c
111
+	source/s_subMagsF32.c
112
+	source/s_mulAddF32.c
113
+	source/s_normSubnormalF64Sig.c
114
+	source/s_roundPackToF64.c
115
+	source/s_normRoundPackToF64.c
116
+	source/s_addMagsF64.c
117
+	source/s_subMagsF64.c
118
+	source/s_mulAddF64.c
119
+	source/s_normSubnormalExtF80Sig.c
120
+	source/s_roundPackToExtF80.c
121
+	source/s_normRoundPackToExtF80.c
122
+	source/s_addMagsExtF80.c
123
+	source/s_subMagsExtF80.c
124
+	source/s_normSubnormalF128Sig.c
125
+	source/s_roundPackToF128.c
126
+	source/s_normRoundPackToF128.c
127
+	source/s_addMagsF128.c
128
+	source/s_subMagsF128.c
129
+	source/s_mulAddF128.c
130
+	source/softfloat_state.c
131
+	source/ui32_to_f16.c
132
+	source/ui32_to_f32.c
133
+	source/ui32_to_f64.c
134
+	source/ui32_to_extF80.c
135
+	source/ui32_to_extF80M.c
136
+	source/ui32_to_f128.c
137
+	source/ui32_to_f128M.c
138
+	source/ui64_to_f16.c
139
+	source/ui64_to_f32.c
140
+	source/ui64_to_f64.c
141
+	source/ui64_to_extF80.c
142
+	source/ui64_to_extF80M.c
143
+	source/ui64_to_f128.c
144
+	source/ui64_to_f128M.c
145
+	source/i32_to_f16.c
146
+	source/i32_to_f32.c
147
+	source/i32_to_f64.c
148
+	source/i32_to_extF80.c
149
+	source/i32_to_extF80M.c
150
+	source/i32_to_f128.c
151
+	source/i32_to_f128M.c
152
+	source/i64_to_f16.c
153
+	source/i64_to_f32.c
154
+	source/i64_to_f64.c
155
+	source/i64_to_extF80.c
156
+	source/i64_to_extF80M.c
157
+	source/i64_to_f128.c
158
+	source/i64_to_f128M.c
159
+	source/f16_to_ui32.c
160
+	source/f16_to_ui64.c
161
+	source/f16_to_i32.c
162
+	source/f16_to_i64.c
163
+	source/f16_to_ui32_r_minMag.c
164
+	source/f16_to_ui64_r_minMag.c
165
+	source/f16_to_i32_r_minMag.c
166
+	source/f16_to_i64_r_minMag.c
167
+	source/f16_to_f32.c
168
+	source/f16_to_f64.c
169
+	source/f16_to_extF80.c
170
+	source/f16_to_extF80M.c
171
+	source/f16_to_f128.c
172
+	source/f16_to_f128M.c
173
+	source/f16_roundToInt.c
174
+	source/f16_add.c
175
+	source/f16_sub.c
176
+	source/f16_mul.c
177
+	source/f16_mulAdd.c
178
+	source/f16_div.c
179
+	source/f16_rem.c
180
+	source/f16_sqrt.c
181
+	source/f16_eq.c
182
+	source/f16_le.c
183
+	source/f16_lt.c
184
+	source/f16_eq_signaling.c
185
+	source/f16_le_quiet.c
186
+	source/f16_lt_quiet.c
187
+	source/f16_isSignalingNaN.c
188
+	source/f32_to_ui32.c
189
+	source/f32_to_ui64.c
190
+	source/f32_to_i32.c
191
+	source/f32_to_i64.c
192
+	source/f32_to_ui32_r_minMag.c
193
+	source/f32_to_ui64_r_minMag.c
194
+	source/f32_to_i32_r_minMag.c
195
+	source/f32_to_i64_r_minMag.c
196
+	source/f32_to_f16.c
197
+	source/f32_to_f64.c
198
+	source/f32_to_extF80.c
199
+	source/f32_to_extF80M.c
200
+	source/f32_to_f128.c
201
+	source/f32_to_f128M.c
202
+	source/f32_roundToInt.c
203
+	source/f32_add.c
204
+	source/f32_sub.c
205
+	source/f32_mul.c
206
+	source/f32_mulAdd.c
207
+	source/f32_div.c
208
+	source/f32_rem.c
209
+	source/f32_sqrt.c
210
+	source/f32_eq.c
211
+	source/f32_le.c
212
+	source/f32_lt.c
213
+	source/f32_eq_signaling.c
214
+	source/f32_le_quiet.c
215
+	source/f32_lt_quiet.c
216
+	source/f32_isSignalingNaN.c
217
+	source/f64_to_ui32.c
218
+	source/f64_to_ui64.c
219
+	source/f64_to_i32.c
220
+	source/f64_to_i64.c
221
+	source/f64_to_ui32_r_minMag.c
222
+	source/f64_to_ui64_r_minMag.c
223
+	source/f64_to_i32_r_minMag.c
224
+	source/f64_to_i64_r_minMag.c
225
+	source/f64_to_f16.c
226
+	source/f64_to_f32.c
227
+	source/f64_to_extF80.c
228
+	source/f64_to_extF80M.c
229
+	source/f64_to_f128.c
230
+	source/f64_to_f128M.c
231
+	source/f64_roundToInt.c
232
+	source/f64_add.c
233
+	source/f64_sub.c
234
+	source/f64_mul.c
235
+	source/f64_mulAdd.c
236
+	source/f64_div.c
237
+	source/f64_rem.c
238
+	source/f64_sqrt.c
239
+	source/f64_eq.c
240
+	source/f64_le.c
241
+	source/f64_lt.c
242
+	source/f64_eq_signaling.c
243
+	source/f64_le_quiet.c
244
+	source/f64_lt_quiet.c
245
+	source/f64_isSignalingNaN.c
246
+	source/extF80_to_ui32.c
247
+	source/extF80_to_ui64.c
248
+	source/extF80_to_i32.c
249
+	source/extF80_to_i64.c
250
+	source/extF80_to_ui32_r_minMag.c
251
+	source/extF80_to_ui64_r_minMag.c
252
+	source/extF80_to_i32_r_minMag.c
253
+	source/extF80_to_i64_r_minMag.c
254
+	source/extF80_to_f16.c
255
+	source/extF80_to_f32.c
256
+	source/extF80_to_f64.c
257
+	source/extF80_to_f128.c
258
+	source/extF80_roundToInt.c
259
+	source/extF80_add.c
260
+	source/extF80_sub.c
261
+	source/extF80_mul.c
262
+	source/extF80_div.c
263
+	source/extF80_rem.c
264
+	source/extF80_sqrt.c
265
+	source/extF80_eq.c
266
+	source/extF80_le.c
267
+	source/extF80_lt.c
268
+	source/extF80_eq_signaling.c
269
+	source/extF80_le_quiet.c
270
+	source/extF80_lt_quiet.c
271
+	source/extF80_isSignalingNaN.c
272
+	source/extF80M_to_ui32.c
273
+	source/extF80M_to_ui64.c
274
+	source/extF80M_to_i32.c
275
+	source/extF80M_to_i64.c
276
+	source/extF80M_to_ui32_r_minMag.c
277
+	source/extF80M_to_ui64_r_minMag.c
278
+	source/extF80M_to_i32_r_minMag.c
279
+	source/extF80M_to_i64_r_minMag.c
280
+	source/extF80M_to_f16.c
281
+	source/extF80M_to_f32.c
282
+	source/extF80M_to_f64.c
283
+	source/extF80M_to_f128M.c
284
+	source/extF80M_roundToInt.c
285
+	source/extF80M_add.c
286
+	source/extF80M_sub.c
287
+	source/extF80M_mul.c
288
+	source/extF80M_div.c
289
+	source/extF80M_rem.c
290
+	source/extF80M_sqrt.c
291
+	source/extF80M_eq.c
292
+	source/extF80M_le.c
293
+	source/extF80M_lt.c
294
+	source/extF80M_eq_signaling.c
295
+	source/extF80M_le_quiet.c
296
+	source/extF80M_lt_quiet.c
297
+	source/f128_to_ui32.c
298
+	source/f128_to_ui64.c
299
+	source/f128_to_i32.c
300
+	source/f128_to_i64.c
301
+	source/f128_to_ui32_r_minMag.c
302
+	source/f128_to_ui64_r_minMag.c
303
+	source/f128_to_i32_r_minMag.c
304
+	source/f128_to_i64_r_minMag.c
305
+	source/f128_to_f16.c
306
+	source/f128_to_f32.c
307
+	source/f128_to_extF80.c
308
+	source/f128_to_f64.c
309
+	source/f128_roundToInt.c
310
+	source/f128_add.c
311
+	source/f128_sub.c
312
+	source/f128_mul.c
313
+	source/f128_mulAdd.c
314
+	source/f128_div.c
315
+	source/f128_rem.c
316
+	source/f128_sqrt.c
317
+	source/f128_eq.c
318
+	source/f128_le.c
319
+	source/f128_lt.c
320
+	source/f128_eq_signaling.c
321
+	source/f128_le_quiet.c
322
+	source/f128_lt_quiet.c
323
+	source/f128_isSignalingNaN.c
324
+	source/f128M_to_ui32.c
325
+	source/f128M_to_ui64.c
326
+	source/f128M_to_i32.c
327
+	source/f128M_to_i64.c
328
+	source/f128M_to_ui32_r_minMag.c
329
+	source/f128M_to_ui64_r_minMag.c
330
+	source/f128M_to_i32_r_minMag.c
331
+	source/f128M_to_i64_r_minMag.c
332
+	source/f128M_to_f16.c
333
+	source/f128M_to_f32.c
334
+	source/f128M_to_extF80M.c
335
+	source/f128M_to_f64.c
336
+	source/f128M_roundToInt.c
337
+	source/f128M_add.c
338
+	source/f128M_sub.c
339
+	source/f128M_mul.c
340
+	source/f128M_mulAdd.c
341
+	source/f128M_div.c
342
+	source/f128M_rem.c
343
+	source/f128M_sqrt.c
344
+	source/f128M_eq.c
345
+	source/f128M_le.c
346
+	source/f128M_lt.c
347
+	source/f128M_eq_signaling.c
348
+	source/f128M_le_quiet.c
349
+	source/f128M_lt_quiet.c
350
+)
351
+
352
+set(LIB_SOURCES ${PRIMITIVES} ${SPECIALIZE} ${OTHERS})
353
+
354
+# Define two variables in order not to repeat ourselves.
355
+set(LIBRARY_NAME softfloat)
356
+
357
+# Define the library
358
+add_library(${LIBRARY_NAME} ${LIB_SOURCES})
359
+set_property(TARGET ${LIBRARY_NAME} PROPERTY C_STANDARD 99)
360
+# Set the build version. It will be used in the name of the lib, with corresponding
361
+# symlinks created. SOVERSION could also be specified for api version. 
362
+set_target_properties(${LIBRARY_NAME} PROPERTIES
363
+  VERSION ${VERSION}
364
+  FRAMEWORK FALSE
365
+  PUBLIC_HEADER "${LIB_HEADERS}"
366
+)
367
+target_include_directories (softfloat PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/source/include)
368
+
369
+# Says how and where to install software
370
+# Targets:
371
+#   * <prefix>/lib/<libraries>
372
+#   * header location after install: <prefix>/include/<project>/*.h
373
+#   * headers can be included by C++ code `#<project>/Bar.hpp>`
374
+install(TARGETS ${LIBRARY_NAME}
375
+  EXPORT ${PROJECT_NAME}Targets            # for downstream dependencies
376
+  ARCHIVE DESTINATION lib COMPONENT libs   # static lib
377
+  LIBRARY DESTINATION lib COMPONENT libs   # shared lib
378
+  FRAMEWORK DESTINATION bin COMPONENT libs # for mac
379
+  PUBLIC_HEADER DESTINATION include COMPONENT devel   # headers for mac (note the different component -> different package)
380
+  INCLUDES DESTINATION include             # headers
381
+)

+ 37
- 0
softfloat/COPYING.txt View File

@@ -0,0 +1,37 @@
1
+
2
+License for Berkeley SoftFloat Release 3e
3
+
4
+John R. Hauser
5
+2018 January 20
6
+
7
+The following applies to the whole of SoftFloat Release 3e as well as to
8
+each source file individually.
9
+
10
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
11
+University of California.  All rights reserved.
12
+
13
+Redistribution and use in source and binary forms, with or without
14
+modification, are permitted provided that the following conditions are met:
15
+
16
+ 1. Redistributions of source code must retain the above copyright notice,
17
+    this list of conditions, and the following disclaimer.
18
+
19
+ 2. Redistributions in binary form must reproduce the above copyright
20
+    notice, this list of conditions, and the following disclaimer in the
21
+    documentation and/or other materials provided with the distribution.
22
+
23
+ 3. Neither the name of the University nor the names of its contributors
24
+    may be used to endorse or promote products derived from this software
25
+    without specific prior written permission.
26
+
27
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
28
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
29
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
30
+DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
31
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
32
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
33
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
34
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
36
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37
+

+ 49
- 0
softfloat/README.html View File

@@ -0,0 +1,49 @@
1
+
2
+<HTML>
3
+
4
+<HEAD>
5
+<TITLE>Berkeley SoftFloat Package Overview</TITLE>
6
+</HEAD>
7
+
8
+<BODY>
9
+
10
+<H1>Package Overview for Berkeley SoftFloat Release 3e</H1>
11
+
12
+<P>
13
+John R. Hauser<BR>
14
+2018 January 20<BR>
15
+</P>
16
+
17
+<P>
18
+Berkeley SoftFloat is a software implementation of binary floating-point that
19
+conforms to the IEEE Standard for Floating-Point Arithmetic.
20
+SoftFloat is distributed in the form of C source code.
21
+Building the SoftFloat sources generates a library file (typically
22
+<CODE>softfloat.a</CODE> or <CODE>libsoftfloat.a</CODE>) containing the
23
+floating-point subroutines.
24
+</P>
25
+
26
+<P>
27
+The SoftFloat package is documented in the following files in the
28
+<CODE>doc</CODE> subdirectory:
29
+<BLOCKQUOTE>
30
+<TABLE>
31
+<TR>
32
+<TD><A HREF="doc/SoftFloat.html"><NOBR><CODE>SoftFloat.html</CODE></NOBR></A></TD>
33
+<TD>Documentation for using the SoftFloat functions.</TD>
34
+</TR>
35
+<TR>
36
+<TD><A HREF="doc/SoftFloat-source.html"><NOBR><CODE>SoftFloat-source.html</CODE></NOBR></A></TD>
37
+<TD>Documentation for building SoftFloat.</TD>
38
+</TR>
39
+<TR>
40
+<TD><A HREF="doc/SoftFloat-history.html"><NOBR><CODE>SoftFloat-history.html</CODE></A><CODE>&nbsp;&nbsp;&nbsp;</CODE></NOBR></TD>
41
+<TD>History of the major changes to SoftFloat.</TD>
42
+</TR>
43
+</TABLE>
44
+</BLOCKQUOTE>
45
+Other files in the package comprise the source code for SoftFloat.
46
+</P>
47
+
48
+</BODY>
49
+

+ 21
- 0
softfloat/README.txt View File

@@ -0,0 +1,21 @@
1
+
2
+Package Overview for Berkeley SoftFloat Release 3e
3
+
4
+John R. Hauser
5
+2018 January 20
6
+
7
+Berkeley SoftFloat is a software implementation of binary floating-point
8
+that conforms to the IEEE Standard for Floating-Point Arithmetic.  SoftFloat
9
+is distributed in the form of C source code.  Building the SoftFloat sources
10
+generates a library file (typically "softfloat.a" or "libsoftfloat.a")
11
+containing the floating-point subroutines.
12
+
13
+The SoftFloat package is documented in the following files in the "doc"
14
+subdirectory:
15
+
16
+    SoftFloat.html          Documentation for using the SoftFloat functions.
17
+    SoftFloat-source.html   Documentation for building SoftFloat.
18
+    SoftFloat-history.html  History of the major changes to SoftFloat.
19
+
20
+Other files in the package comprise the source code for SoftFloat.
21
+

+ 325
- 0
softfloat/build/Linux-386-GCC/Makefile View File

@@ -0,0 +1,325 @@
1
+
2
+#=============================================================================
3
+#
4
+# This Makefile is part of the SoftFloat IEEE Floating-Point Arithmetic
5
+# Package, Release 3e, by John R. Hauser.
6
+#
7
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
8
+# University of California.  All rights reserved.
9
+#
10
+# Redistribution and use in source and binary forms, with or without
11
+# modification, are permitted provided that the following conditions are met:
12
+#
13
+#  1. Redistributions of source code must retain the above copyright notice,
14
+#     this list of conditions, and the following disclaimer.
15
+#
16
+#  2. Redistributions in binary form must reproduce the above copyright
17
+#     notice, this list of conditions, and the following disclaimer in the
18
+#     documentation and/or other materials provided with the distribution.
19
+#
20
+#  3. Neither the name of the University nor the names of its contributors
21
+#     may be used to endorse or promote products derived from this software
22
+#     without specific prior written permission.
23
+#
24
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
25
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
27
+# DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
28
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+#
35
+#=============================================================================
36
+
37
+SOURCE_DIR ?= ../../source
38
+SPECIALIZE_TYPE ?= 8086
39
+
40
+SOFTFLOAT_OPTS ?= \
41
+  -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \
42
+  -DSOFTFLOAT_FAST_DIV64TO32
43
+
44
+DELETE = rm -f
45
+C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include
46
+COMPILE_C = \
47
+  gcc -c -Werror-implicit-function-declaration $(SOFTFLOAT_OPTS) \
48
+    $(C_INCLUDES) -O2 -o $@
49
+MAKELIB = ar crs $@
50
+
51
+OBJ = .o
52
+LIB = .a
53
+
54
+OTHER_HEADERS =
55
+
56
+.PHONY: all
57
+all: softfloat$(LIB)
58
+
59
+OBJS_PRIMITIVES = \
60
+  s_compare96M$(OBJ) \
61
+  s_compare128M$(OBJ) \
62
+  s_shortShiftLeft64To96M$(OBJ) \
63
+  s_shortShiftLeftM$(OBJ) \
64
+  s_shiftLeftM$(OBJ) \
65
+  s_shortShiftRightM$(OBJ) \
66
+  s_shortShiftRightJam64$(OBJ) \
67
+  s_shortShiftRightJamM$(OBJ) \
68
+  s_shiftRightJam32$(OBJ) \
69
+  s_shiftRightJam64$(OBJ) \
70
+  s_shiftRightJamM$(OBJ) \
71
+  s_shiftRightM$(OBJ) \
72
+  s_countLeadingZeros8$(OBJ) \
73
+  s_countLeadingZeros16$(OBJ) \
74
+  s_countLeadingZeros32$(OBJ) \
75
+  s_countLeadingZeros64$(OBJ) \
76
+  s_addM$(OBJ) \
77
+  s_addCarryM$(OBJ) \
78
+  s_addComplCarryM$(OBJ) \
79
+  s_negXM$(OBJ) \
80
+  s_sub1XM$(OBJ) \
81
+  s_subM$(OBJ) \
82
+  s_mul64To128M$(OBJ) \
83
+  s_mul128MTo256M$(OBJ) \
84
+  s_approxRecip_1Ks$(OBJ) \
85
+  s_approxRecip32_1$(OBJ) \
86
+  s_approxRecipSqrt_1Ks$(OBJ) \
87
+  s_approxRecipSqrt32_1$(OBJ) \
88
+  s_remStepMBy32$(OBJ) \
89
+
90
+OBJS_SPECIALIZE = \
91
+  softfloat_raiseFlags$(OBJ) \
92
+  s_f16UIToCommonNaN$(OBJ) \
93
+  s_commonNaNToF16UI$(OBJ) \
94
+  s_propagateNaNF16UI$(OBJ) \
95
+  s_f32UIToCommonNaN$(OBJ) \
96
+  s_commonNaNToF32UI$(OBJ) \
97
+  s_propagateNaNF32UI$(OBJ) \
98
+  s_f64UIToCommonNaN$(OBJ) \
99
+  s_commonNaNToF64UI$(OBJ) \
100
+  s_propagateNaNF64UI$(OBJ) \
101
+  extF80M_isSignalingNaN$(OBJ) \
102
+  s_extF80MToCommonNaN$(OBJ) \
103
+  s_commonNaNToExtF80M$(OBJ) \
104
+  s_propagateNaNExtF80M$(OBJ) \
105
+  f128M_isSignalingNaN$(OBJ) \
106
+  s_f128MToCommonNaN$(OBJ) \
107
+  s_commonNaNToF128M$(OBJ) \
108
+  s_propagateNaNF128M$(OBJ) \
109
+
110
+OBJS_OTHERS = \
111
+  s_roundToUI32$(OBJ) \
112
+  s_roundMToUI64$(OBJ) \
113
+  s_roundToI32$(OBJ) \
114
+  s_roundMToI64$(OBJ) \
115
+  s_normSubnormalF16Sig$(OBJ) \
116
+  s_roundPackToF16$(OBJ) \
117
+  s_normRoundPackToF16$(OBJ) \
118
+  s_addMagsF16$(OBJ) \
119
+  s_subMagsF16$(OBJ) \
120
+  s_mulAddF16$(OBJ) \
121
+  s_normSubnormalF32Sig$(OBJ) \
122
+  s_roundPackToF32$(OBJ) \
123
+  s_normRoundPackToF32$(OBJ) \
124
+  s_addMagsF32$(OBJ) \
125
+  s_subMagsF32$(OBJ) \
126
+  s_mulAddF32$(OBJ) \
127
+  s_normSubnormalF64Sig$(OBJ) \
128
+  s_roundPackToF64$(OBJ) \
129
+  s_normRoundPackToF64$(OBJ) \
130
+  s_addMagsF64$(OBJ) \
131
+  s_subMagsF64$(OBJ) \
132
+  s_mulAddF64$(OBJ) \
133
+  s_tryPropagateNaNExtF80M$(OBJ) \
134
+  s_invalidExtF80M$(OBJ) \
135
+  s_normExtF80SigM$(OBJ) \
136
+  s_roundPackMToExtF80M$(OBJ) \
137
+  s_normRoundPackMToExtF80M$(OBJ) \
138
+  s_addExtF80M$(OBJ) \
139
+  s_compareNonnormExtF80M$(OBJ) \
140
+  s_isNaNF128M$(OBJ) \
141
+  s_tryPropagateNaNF128M$(OBJ) \
142
+  s_invalidF128M$(OBJ) \
143
+  s_shiftNormSigF128M$(OBJ) \
144
+  s_roundPackMToF128M$(OBJ) \
145
+  s_normRoundPackMToF128M$(OBJ) \
146
+  s_addF128M$(OBJ) \
147
+  s_mulAddF128M$(OBJ) \
148
+  softfloat_state$(OBJ) \
149
+  ui32_to_f16$(OBJ) \
150
+  ui32_to_f32$(OBJ) \
151
+  ui32_to_f64$(OBJ) \
152
+  ui32_to_extF80M$(OBJ) \
153
+  ui32_to_f128M$(OBJ) \
154
+  ui64_to_f16$(OBJ) \
155
+  ui64_to_f32$(OBJ) \
156
+  ui64_to_f64$(OBJ) \
157
+  ui64_to_extF80M$(OBJ) \
158
+  ui64_to_f128M$(OBJ) \
159
+  i32_to_f16$(OBJ) \
160
+  i32_to_f32$(OBJ) \
161
+  i32_to_f64$(OBJ) \
162
+  i32_to_extF80M$(OBJ) \
163
+  i32_to_f128M$(OBJ) \
164
+  i64_to_f16$(OBJ) \
165
+  i64_to_f32$(OBJ) \
166
+  i64_to_f64$(OBJ) \
167
+  i64_to_extF80M$(OBJ) \
168
+  i64_to_f128M$(OBJ) \
169
+  f16_to_ui32$(OBJ) \
170
+  f16_to_ui64$(OBJ) \
171
+  f16_to_i32$(OBJ) \
172
+  f16_to_i64$(OBJ) \
173
+  f16_to_ui32_r_minMag$(OBJ) \
174
+  f16_to_ui64_r_minMag$(OBJ) \
175
+  f16_to_i32_r_minMag$(OBJ) \
176
+  f16_to_i64_r_minMag$(OBJ) \
177
+  f16_to_f32$(OBJ) \
178
+  f16_to_f64$(OBJ) \
179
+  f16_to_extF80M$(OBJ) \
180
+  f16_to_f128M$(OBJ) \
181
+  f16_roundToInt$(OBJ) \
182
+  f16_add$(OBJ) \
183
+  f16_sub$(OBJ) \
184
+  f16_mul$(OBJ) \
185
+  f16_mulAdd$(OBJ) \
186
+  f16_div$(OBJ) \
187
+  f16_rem$(OBJ) \
188
+  f16_sqrt$(OBJ) \
189
+  f16_eq$(OBJ) \
190
+  f16_le$(OBJ) \
191
+  f16_lt$(OBJ) \
192
+  f16_eq_signaling$(OBJ) \
193
+  f16_le_quiet$(OBJ) \
194
+  f16_lt_quiet$(OBJ) \
195
+  f16_isSignalingNaN$(OBJ) \
196
+  f32_to_ui32$(OBJ) \
197
+  f32_to_ui64$(OBJ) \
198
+  f32_to_i32$(OBJ) \
199
+  f32_to_i64$(OBJ) \
200
+  f32_to_ui32_r_minMag$(OBJ) \
201
+  f32_to_ui64_r_minMag$(OBJ) \
202
+  f32_to_i32_r_minMag$(OBJ) \
203
+  f32_to_i64_r_minMag$(OBJ) \
204
+  f32_to_f16$(OBJ) \
205
+  f32_to_f64$(OBJ) \
206
+  f32_to_extF80M$(OBJ) \
207
+  f32_to_f128M$(OBJ) \
208
+  f32_roundToInt$(OBJ) \
209
+  f32_add$(OBJ) \
210
+  f32_sub$(OBJ) \
211
+  f32_mul$(OBJ) \
212
+  f32_mulAdd$(OBJ) \
213
+  f32_div$(OBJ) \
214
+  f32_rem$(OBJ) \
215
+  f32_sqrt$(OBJ) \
216
+  f32_eq$(OBJ) \
217
+  f32_le$(OBJ) \
218
+  f32_lt$(OBJ) \
219
+  f32_eq_signaling$(OBJ) \
220
+  f32_le_quiet$(OBJ) \
221
+  f32_lt_quiet$(OBJ) \
222
+  f32_isSignalingNaN$(OBJ) \
223
+  f64_to_ui32$(OBJ) \
224
+  f64_to_ui64$(OBJ) \
225
+  f64_to_i32$(OBJ) \
226
+  f64_to_i64$(OBJ) \
227
+  f64_to_ui32_r_minMag$(OBJ) \
228
+  f64_to_ui64_r_minMag$(OBJ) \
229
+  f64_to_i32_r_minMag$(OBJ) \
230
+  f64_to_i64_r_minMag$(OBJ) \
231
+  f64_to_f16$(OBJ) \
232
+  f64_to_f32$(OBJ) \
233
+  f64_to_extF80M$(OBJ) \
234
+  f64_to_f128M$(OBJ) \
235
+  f64_roundToInt$(OBJ) \
236
+  f64_add$(OBJ) \
237
+  f64_sub$(OBJ) \
238
+  f64_mul$(OBJ) \
239
+  f64_mulAdd$(OBJ) \
240
+  f64_div$(OBJ) \
241
+  f64_rem$(OBJ) \
242
+  f64_sqrt$(OBJ) \
243
+  f64_eq$(OBJ) \
244
+  f64_le$(OBJ) \
245
+  f64_lt$(OBJ) \
246
+  f64_eq_signaling$(OBJ) \
247
+  f64_le_quiet$(OBJ) \
248
+  f64_lt_quiet$(OBJ) \
249
+  f64_isSignalingNaN$(OBJ) \
250
+  extF80M_to_ui32$(OBJ) \
251
+  extF80M_to_ui64$(OBJ) \
252
+  extF80M_to_i32$(OBJ) \
253
+  extF80M_to_i64$(OBJ) \
254
+  extF80M_to_ui32_r_minMag$(OBJ) \
255
+  extF80M_to_ui64_r_minMag$(OBJ) \
256
+  extF80M_to_i32_r_minMag$(OBJ) \
257
+  extF80M_to_i64_r_minMag$(OBJ) \
258
+  extF80M_to_f16$(OBJ) \
259
+  extF80M_to_f32$(OBJ) \
260
+  extF80M_to_f64$(OBJ) \
261
+  extF80M_to_f128M$(OBJ) \
262
+  extF80M_roundToInt$(OBJ) \
263
+  extF80M_add$(OBJ) \
264
+  extF80M_sub$(OBJ) \
265
+  extF80M_mul$(OBJ) \
266
+  extF80M_div$(OBJ) \
267
+  extF80M_rem$(OBJ) \
268
+  extF80M_sqrt$(OBJ) \
269
+  extF80M_eq$(OBJ) \
270
+  extF80M_le$(OBJ) \
271
+  extF80M_lt$(OBJ) \
272
+  extF80M_eq_signaling$(OBJ) \
273
+  extF80M_le_quiet$(OBJ) \
274
+  extF80M_lt_quiet$(OBJ) \
275
+  f128M_to_ui32$(OBJ) \
276
+  f128M_to_ui64$(OBJ) \
277
+  f128M_to_i32$(OBJ) \
278
+  f128M_to_i64$(OBJ) \
279
+  f128M_to_ui32_r_minMag$(OBJ) \
280
+  f128M_to_ui64_r_minMag$(OBJ) \
281
+  f128M_to_i32_r_minMag$(OBJ) \
282
+  f128M_to_i64_r_minMag$(OBJ) \
283
+  f128M_to_f16$(OBJ) \
284
+  f128M_to_f32$(OBJ) \
285
+  f128M_to_f64$(OBJ) \
286
+  f128M_to_extF80M$(OBJ) \
287
+  f128M_roundToInt$(OBJ) \
288
+  f128M_add$(OBJ) \
289
+  f128M_sub$(OBJ) \
290
+  f128M_mul$(OBJ) \
291
+  f128M_mulAdd$(OBJ) \
292
+  f128M_div$(OBJ) \
293
+  f128M_rem$(OBJ) \
294
+  f128M_sqrt$(OBJ) \
295
+  f128M_eq$(OBJ) \
296
+  f128M_le$(OBJ) \
297
+  f128M_lt$(OBJ) \
298
+  f128M_eq_signaling$(OBJ) \
299
+  f128M_le_quiet$(OBJ) \
300
+  f128M_lt_quiet$(OBJ) \
301
+
302
+OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS)
303
+
304
+$(OBJS_ALL): \
305
+  $(OTHER_HEADERS) platform.h $(SOURCE_DIR)/include/primitiveTypes.h \
306
+  $(SOURCE_DIR)/include/primitives.h
307
+$(OBJS_SPECIALIZE) $(OBJS_OTHERS): \
308
+  $(SOURCE_DIR)/include/softfloat_types.h $(SOURCE_DIR)/include/internals.h \
309
+  $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/specialize.h \
310
+  $(SOURCE_DIR)/include/softfloat.h
311
+
312
+$(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c
313
+	$(COMPILE_C) $(SOURCE_DIR)/$*.c
314
+
315
+$(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c
316
+	$(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c
317
+
318
+softfloat$(LIB): $(OBJS_ALL)
319
+	$(DELETE) $@
320
+	$(MAKELIB) $^
321
+
322
+.PHONY: clean
323
+clean:
324
+	$(DELETE) $(OBJS_ALL) softfloat$(LIB)
325
+

+ 53
- 0
softfloat/build/Linux-386-GCC/platform.h View File

@@ -0,0 +1,53 @@
1
+
2
+/*============================================================================
3
+
4
+This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
5
+Package, Release 3e, by John R. Hauser.
6
+
7
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
8
+University of California.  All rights reserved.
9
+
10
+Redistribution and use in source and binary forms, with or without
11
+modification, are permitted provided that the following conditions are met:
12
+
13
+ 1. Redistributions of source code must retain the above copyright notice,
14
+    this list of conditions, and the following disclaimer.
15
+
16
+ 2. Redistributions in binary form must reproduce the above copyright notice,
17
+    this list of conditions, and the following disclaimer in the documentation
18
+    and/or other materials provided with the distribution.
19
+
20
+ 3. Neither the name of the University nor the names of its contributors may
21
+    be used to endorse or promote products derived from this software without
22
+    specific prior written permission.
23
+
24
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
25
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
27
+DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
28
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+
35
+=============================================================================*/
36
+
37
+/*----------------------------------------------------------------------------
38
+*----------------------------------------------------------------------------*/
39
+#define LITTLEENDIAN 1
40
+
41
+/*----------------------------------------------------------------------------
42
+*----------------------------------------------------------------------------*/
43
+#ifdef __GNUC_STDC_INLINE__
44
+#define INLINE inline
45
+#else
46
+#define INLINE extern inline
47
+#endif
48
+
49
+/*----------------------------------------------------------------------------
50
+*----------------------------------------------------------------------------*/
51
+#define SOFTFLOAT_BUILTIN_CLZ 1
52
+#include "opts-GCC.h"
53
+

+ 325
- 0
softfloat/build/Linux-386-SSE2-GCC/Makefile View File

@@ -0,0 +1,325 @@
1
+
2
+#=============================================================================
3
+#
4
+# This Makefile is part of the SoftFloat IEEE Floating-Point Arithmetic
5
+# Package, Release 3e, by John R. Hauser.
6
+#
7
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
8
+# University of California.  All rights reserved.
9
+#
10
+# Redistribution and use in source and binary forms, with or without
11
+# modification, are permitted provided that the following conditions are met:
12
+#
13
+#  1. Redistributions of source code must retain the above copyright notice,
14
+#     this list of conditions, and the following disclaimer.
15
+#
16
+#  2. Redistributions in binary form must reproduce the above copyright
17
+#     notice, this list of conditions, and the following disclaimer in the
18
+#     documentation and/or other materials provided with the distribution.
19
+#
20
+#  3. Neither the name of the University nor the names of its contributors
21
+#     may be used to endorse or promote products derived from this software
22
+#     without specific prior written permission.
23
+#
24
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
25
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
27
+# DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
28
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+#
35
+#=============================================================================
36
+
37
+SOURCE_DIR ?= ../../source
38
+SPECIALIZE_TYPE ?= 8086-SSE
39
+
40
+SOFTFLOAT_OPTS ?= \
41
+  -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \
42
+  -DSOFTFLOAT_FAST_DIV64TO32
43
+
44
+DELETE = rm -f
45
+C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include
46
+COMPILE_C = \
47
+  gcc -c -Werror-implicit-function-declaration $(SOFTFLOAT_OPTS) \
48
+    $(C_INCLUDES) -O2 -o $@
49
+MAKELIB = ar crs $@
50
+
51
+OBJ = .o
52
+LIB = .a
53
+
54
+OTHER_HEADERS =
55
+
56
+.PHONY: all
57
+all: softfloat$(LIB)
58
+
59
+OBJS_PRIMITIVES = \
60
+  s_compare96M$(OBJ) \
61
+  s_compare128M$(OBJ) \
62
+  s_shortShiftLeft64To96M$(OBJ) \
63
+  s_shortShiftLeftM$(OBJ) \
64
+  s_shiftLeftM$(OBJ) \
65
+  s_shortShiftRightM$(OBJ) \
66
+  s_shortShiftRightJam64$(OBJ) \
67
+  s_shortShiftRightJamM$(OBJ) \
68
+  s_shiftRightJam32$(OBJ) \
69
+  s_shiftRightJam64$(OBJ) \
70
+  s_shiftRightJamM$(OBJ) \
71
+  s_shiftRightM$(OBJ) \
72
+  s_countLeadingZeros8$(OBJ) \
73
+  s_countLeadingZeros16$(OBJ) \
74
+  s_countLeadingZeros32$(OBJ) \
75
+  s_countLeadingZeros64$(OBJ) \
76
+  s_addM$(OBJ) \
77
+  s_addCarryM$(OBJ) \
78
+  s_addComplCarryM$(OBJ) \
79
+  s_negXM$(OBJ) \
80
+  s_sub1XM$(OBJ) \
81
+  s_subM$(OBJ) \
82
+  s_mul64To128M$(OBJ) \
83
+  s_mul128MTo256M$(OBJ) \
84
+  s_approxRecip_1Ks$(OBJ) \
85
+  s_approxRecip32_1$(OBJ) \
86
+  s_approxRecipSqrt_1Ks$(OBJ) \
87
+  s_approxRecipSqrt32_1$(OBJ) \
88
+  s_remStepMBy32$(OBJ) \
89
+
90
+OBJS_SPECIALIZE = \
91
+  softfloat_raiseFlags$(OBJ) \
92
+  s_f16UIToCommonNaN$(OBJ) \
93
+  s_commonNaNToF16UI$(OBJ) \
94
+  s_propagateNaNF16UI$(OBJ) \
95
+  s_f32UIToCommonNaN$(OBJ) \
96
+  s_commonNaNToF32UI$(OBJ) \
97
+  s_propagateNaNF32UI$(OBJ) \
98
+  s_f64UIToCommonNaN$(OBJ) \
99
+  s_commonNaNToF64UI$(OBJ) \
100
+  s_propagateNaNF64UI$(OBJ) \
101
+  extF80M_isSignalingNaN$(OBJ) \
102
+  s_extF80MToCommonNaN$(OBJ) \
103
+  s_commonNaNToExtF80M$(OBJ) \
104
+  s_propagateNaNExtF80M$(OBJ) \
105
+  f128M_isSignalingNaN$(OBJ) \
106
+  s_f128MToCommonNaN$(OBJ) \
107
+  s_commonNaNToF128M$(OBJ) \
108
+  s_propagateNaNF128M$(OBJ) \
109
+
110
+OBJS_OTHERS = \
111
+  s_roundToUI32$(OBJ) \
112
+  s_roundMToUI64$(OBJ) \
113
+  s_roundToI32$(OBJ) \
114
+  s_roundMToI64$(OBJ) \
115
+  s_normSubnormalF16Sig$(OBJ) \
116
+  s_roundPackToF16$(OBJ) \
117
+  s_normRoundPackToF16$(OBJ) \
118
+  s_addMagsF16$(OBJ) \
119
+  s_subMagsF16$(OBJ) \
120
+  s_mulAddF16$(OBJ) \
121
+  s_normSubnormalF32Sig$(OBJ) \
122
+  s_roundPackToF32$(OBJ) \
123
+  s_normRoundPackToF32$(OBJ) \
124
+  s_addMagsF32$(OBJ) \
125
+  s_subMagsF32$(OBJ) \
126
+  s_mulAddF32$(OBJ) \
127
+  s_normSubnormalF64Sig$(OBJ) \
128
+  s_roundPackToF64$(OBJ) \
129
+  s_normRoundPackToF64$(OBJ) \
130
+  s_addMagsF64$(OBJ) \
131
+  s_subMagsF64$(OBJ) \
132
+  s_mulAddF64$(OBJ) \
133
+  s_tryPropagateNaNExtF80M$(OBJ) \
134
+  s_invalidExtF80M$(OBJ) \
135
+  s_normExtF80SigM$(OBJ) \
136
+  s_roundPackMToExtF80M$(OBJ) \
137
+  s_normRoundPackMToExtF80M$(OBJ) \
138
+  s_addExtF80M$(OBJ) \
139
+  s_compareNonnormExtF80M$(OBJ) \
140
+  s_isNaNF128M$(OBJ) \
141
+  s_tryPropagateNaNF128M$(OBJ) \
142
+  s_invalidF128M$(OBJ) \
143
+  s_shiftNormSigF128M$(OBJ) \
144
+  s_roundPackMToF128M$(OBJ) \
145
+  s_normRoundPackMToF128M$(OBJ) \
146
+  s_addF128M$(OBJ) \
147
+  s_mulAddF128M$(OBJ) \
148
+  softfloat_state$(OBJ) \
149
+  ui32_to_f16$(OBJ) \
150
+  ui32_to_f32$(OBJ) \
151
+  ui32_to_f64$(OBJ) \
152
+  ui32_to_extF80M$(OBJ) \
153
+  ui32_to_f128M$(OBJ) \
154
+  ui64_to_f16$(OBJ) \
155
+  ui64_to_f32$(OBJ) \
156
+  ui64_to_f64$(OBJ) \
157
+  ui64_to_extF80M$(OBJ) \
158
+  ui64_to_f128M$(OBJ) \
159
+  i32_to_f16$(OBJ) \
160
+  i32_to_f32$(OBJ) \
161
+  i32_to_f64$(OBJ) \
162
+  i32_to_extF80M$(OBJ) \
163
+  i32_to_f128M$(OBJ) \
164
+  i64_to_f16$(OBJ) \
165
+  i64_to_f32$(OBJ) \
166
+  i64_to_f64$(OBJ) \
167
+  i64_to_extF80M$(OBJ) \
168
+  i64_to_f128M$(OBJ) \
169
+  f16_to_ui32$(OBJ) \
170
+  f16_to_ui64$(OBJ) \
171
+  f16_to_i32$(OBJ) \
172
+  f16_to_i64$(OBJ) \
173
+  f16_to_ui32_r_minMag$(OBJ) \
174
+  f16_to_ui64_r_minMag$(OBJ) \
175
+  f16_to_i32_r_minMag$(OBJ) \
176
+  f16_to_i64_r_minMag$(OBJ) \
177
+  f16_to_f32$(OBJ) \
178
+  f16_to_f64$(OBJ) \
179
+  f16_to_extF80M$(OBJ) \
180
+  f16_to_f128M$(OBJ) \
181
+  f16_roundToInt$(OBJ) \
182
+  f16_add$(OBJ) \
183
+  f16_sub$(OBJ) \
184
+  f16_mul$(OBJ) \
185
+  f16_mulAdd$(OBJ) \
186
+  f16_div$(OBJ) \
187
+  f16_rem$(OBJ) \
188
+  f16_sqrt$(OBJ) \
189
+  f16_eq$(OBJ) \
190
+  f16_le$(OBJ) \
191
+  f16_lt$(OBJ) \
192
+  f16_eq_signaling$(OBJ) \
193
+  f16_le_quiet$(OBJ) \
194
+  f16_lt_quiet$(OBJ) \
195
+  f16_isSignalingNaN$(OBJ) \
196
+  f32_to_ui32$(OBJ) \
197
+  f32_to_ui64$(OBJ) \
198
+  f32_to_i32$(OBJ) \
199
+  f32_to_i64$(OBJ) \
200
+  f32_to_ui32_r_minMag$(OBJ) \
201
+  f32_to_ui64_r_minMag$(OBJ) \
202
+  f32_to_i32_r_minMag$(OBJ) \
203
+  f32_to_i64_r_minMag$(OBJ) \
204
+  f32_to_f16$(OBJ) \
205
+  f32_to_f64$(OBJ) \
206
+  f32_to_extF80M$(OBJ) \
207
+  f32_to_f128M$(OBJ) \
208
+  f32_roundToInt$(OBJ) \
209
+  f32_add$(OBJ) \
210
+  f32_sub$(OBJ) \
211
+  f32_mul$(OBJ) \
212
+  f32_mulAdd$(OBJ) \
213
+  f32_div$(OBJ) \
214
+  f32_rem$(OBJ) \
215
+  f32_sqrt$(OBJ) \
216
+  f32_eq$(OBJ) \
217
+  f32_le$(OBJ) \
218
+  f32_lt$(OBJ) \
219
+  f32_eq_signaling$(OBJ) \
220
+  f32_le_quiet$(OBJ) \
221
+  f32_lt_quiet$(OBJ) \
222
+  f32_isSignalingNaN$(OBJ) \
223
+  f64_to_ui32$(OBJ) \
224
+  f64_to_ui64$(OBJ) \
225
+  f64_to_i32$(OBJ) \
226
+  f64_to_i64$(OBJ) \
227
+  f64_to_ui32_r_minMag$(OBJ) \
228
+  f64_to_ui64_r_minMag$(OBJ) \
229
+  f64_to_i32_r_minMag$(OBJ) \
230
+  f64_to_i64_r_minMag$(OBJ) \
231
+  f64_to_f16$(OBJ) \
232
+  f64_to_f32$(OBJ) \
233
+  f64_to_extF80M$(OBJ) \
234
+  f64_to_f128M$(OBJ) \
235
+  f64_roundToInt$(OBJ) \
236
+  f64_add$(OBJ) \
237
+  f64_sub$(OBJ) \
238
+  f64_mul$(OBJ) \
239
+  f64_mulAdd$(OBJ) \
240
+  f64_div$(OBJ) \
241
+  f64_rem$(OBJ) \
242
+  f64_sqrt$(OBJ) \
243
+  f64_eq$(OBJ) \
244
+  f64_le$(OBJ) \
245
+  f64_lt$(OBJ) \
246
+  f64_eq_signaling$(OBJ) \
247
+  f64_le_quiet$(OBJ) \
248
+  f64_lt_quiet$(OBJ) \
249
+  f64_isSignalingNaN$(OBJ) \
250
+  extF80M_to_ui32$(OBJ) \
251
+  extF80M_to_ui64$(OBJ) \
252
+  extF80M_to_i32$(OBJ) \
253
+  extF80M_to_i64$(OBJ) \
254
+  extF80M_to_ui32_r_minMag$(OBJ) \
255
+  extF80M_to_ui64_r_minMag$(OBJ) \
256
+  extF80M_to_i32_r_minMag$(OBJ) \
257
+  extF80M_to_i64_r_minMag$(OBJ) \
258
+  extF80M_to_f16$(OBJ) \
259
+  extF80M_to_f32$(OBJ) \
260
+  extF80M_to_f64$(OBJ) \
261
+  extF80M_to_f128M$(OBJ) \
262
+  extF80M_roundToInt$(OBJ) \
263
+  extF80M_add$(OBJ) \
264
+  extF80M_sub$(OBJ) \
265
+  extF80M_mul$(OBJ) \
266
+  extF80M_div$(OBJ) \
267
+  extF80M_rem$(OBJ) \
268
+  extF80M_sqrt$(OBJ) \
269
+  extF80M_eq$(OBJ) \
270
+  extF80M_le$(OBJ) \
271
+  extF80M_lt$(OBJ) \
272
+  extF80M_eq_signaling$(OBJ) \
273
+  extF80M_le_quiet$(OBJ) \
274
+  extF80M_lt_quiet$(OBJ) \
275
+  f128M_to_ui32$(OBJ) \
276
+  f128M_to_ui64$(OBJ) \
277
+  f128M_to_i32$(OBJ) \
278
+  f128M_to_i64$(OBJ) \
279
+  f128M_to_ui32_r_minMag$(OBJ) \
280
+  f128M_to_ui64_r_minMag$(OBJ) \
281
+  f128M_to_i32_r_minMag$(OBJ) \
282
+  f128M_to_i64_r_minMag$(OBJ) \
283
+  f128M_to_f16$(OBJ) \
284
+  f128M_to_f32$(OBJ) \
285
+  f128M_to_f64$(OBJ) \
286
+  f128M_to_extF80M$(OBJ) \
287
+  f128M_roundToInt$(OBJ) \
288
+  f128M_add$(OBJ) \
289
+  f128M_sub$(OBJ) \
290
+  f128M_mul$(OBJ) \
291
+  f128M_mulAdd$(OBJ) \
292
+  f128M_div$(OBJ) \
293
+  f128M_rem$(OBJ) \
294
+  f128M_sqrt$(OBJ) \
295
+  f128M_eq$(OBJ) \
296
+  f128M_le$(OBJ) \
297
+  f128M_lt$(OBJ) \
298
+  f128M_eq_signaling$(OBJ) \
299
+  f128M_le_quiet$(OBJ) \
300
+  f128M_lt_quiet$(OBJ) \
301
+
302
+OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS)
303
+
304
+$(OBJS_ALL): \
305
+  $(OTHER_HEADERS) platform.h $(SOURCE_DIR)/include/primitiveTypes.h \
306
+  $(SOURCE_DIR)/include/primitives.h
307
+$(OBJS_SPECIALIZE) $(OBJS_OTHERS): \
308
+  $(SOURCE_DIR)/include/softfloat_types.h $(SOURCE_DIR)/include/internals.h \
309
+  $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/specialize.h \
310
+  $(SOURCE_DIR)/include/softfloat.h
311
+
312
+$(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c
313
+	$(COMPILE_C) $(SOURCE_DIR)/$*.c
314
+
315
+$(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c
316
+	$(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c
317
+
318
+softfloat$(LIB): $(OBJS_ALL)
319
+	$(DELETE) $@
320
+	$(MAKELIB) $^
321
+
322
+.PHONY: clean
323
+clean:
324
+	$(DELETE) $(OBJS_ALL) softfloat$(LIB)
325
+

+ 53
- 0
softfloat/build/Linux-386-SSE2-GCC/platform.h View File

@@ -0,0 +1,53 @@
1
+
2
+/*============================================================================
3
+
4
+This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
5
+Package, Release 3e, by John R. Hauser.
6
+
7
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
8
+University of California.  All rights reserved.
9
+
10
+Redistribution and use in source and binary forms, with or without
11
+modification, are permitted provided that the following conditions are met:
12
+
13
+ 1. Redistributions of source code must retain the above copyright notice,
14
+    this list of conditions, and the following disclaimer.
15
+
16
+ 2. Redistributions in binary form must reproduce the above copyright notice,
17
+    this list of conditions, and the following disclaimer in the documentation
18
+    and/or other materials provided with the distribution.
19
+
20
+ 3. Neither the name of the University nor the names of its contributors may
21
+    be used to endorse or promote products derived from this software without
22
+    specific prior written permission.
23
+
24
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
25
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
27
+DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
28
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+
35
+=============================================================================*/
36
+
37
+/*----------------------------------------------------------------------------
38
+*----------------------------------------------------------------------------*/
39
+#define LITTLEENDIAN 1
40
+
41
+/*----------------------------------------------------------------------------
42
+*----------------------------------------------------------------------------*/
43
+#ifdef __GNUC_STDC_INLINE__
44
+#define INLINE inline
45
+#else
46
+#define INLINE extern inline
47
+#endif
48
+
49
+/*----------------------------------------------------------------------------
50
+*----------------------------------------------------------------------------*/
51
+#define SOFTFLOAT_BUILTIN_CLZ 1
52
+#include "opts-GCC.h"
53
+

+ 323
- 0
softfloat/build/Linux-ARM-VFPv2-GCC/Makefile View File

@@ -0,0 +1,323 @@
1
+
2
+#=============================================================================
3
+#
4
+# This Makefile is part of the SoftFloat IEEE Floating-Point Arithmetic
5
+# Package, Release 3e, by John R. Hauser.
6
+#
7
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
8
+# University of California.  All rights reserved.
9
+#
10
+# Redistribution and use in source and binary forms, with or without
11
+# modification, are permitted provided that the following conditions are met:
12
+#
13
+#  1. Redistributions of source code must retain the above copyright notice,
14
+#     this list of conditions, and the following disclaimer.
15
+#
16
+#  2. Redistributions in binary form must reproduce the above copyright
17
+#     notice, this list of conditions, and the following disclaimer in the
18
+#     documentation and/or other materials provided with the distribution.
19
+#
20
+#  3. Neither the name of the University nor the names of its contributors
21
+#     may be used to endorse or promote products derived from this software
22
+#     without specific prior written permission.
23
+#
24
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
25
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
27
+# DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
28
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+#
35
+#=============================================================================
36
+
37
+SOURCE_DIR ?= ../../source
38
+SPECIALIZE_TYPE ?= ARM-VFPv2
39
+
40
+SOFTFLOAT_OPTS ?= -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5
41
+
42
+DELETE = rm -f
43
+C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include
44
+COMPILE_C = \
45
+  gcc -c -Werror-implicit-function-declaration $(SOFTFLOAT_OPTS) \
46
+    $(C_INCLUDES) -O2 -o $@
47
+MAKELIB = ar crs $@
48
+
49
+OBJ = .o
50
+LIB = .a
51
+
52
+OTHER_HEADERS =
53
+
54
+.PHONY: all
55
+all: softfloat$(LIB)
56
+
57
+OBJS_PRIMITIVES = \
58
+  s_compare96M$(OBJ) \
59
+  s_compare128M$(OBJ) \
60
+  s_shortShiftLeft64To96M$(OBJ) \
61
+  s_shortShiftLeftM$(OBJ) \
62
+  s_shiftLeftM$(OBJ) \
63
+  s_shortShiftRightM$(OBJ) \
64
+  s_shortShiftRightJam64$(OBJ) \
65
+  s_shortShiftRightJamM$(OBJ) \
66
+  s_shiftRightJam32$(OBJ) \
67
+  s_shiftRightJam64$(OBJ) \
68
+  s_shiftRightJamM$(OBJ) \
69
+  s_shiftRightM$(OBJ) \
70
+  s_countLeadingZeros8$(OBJ) \
71
+  s_countLeadingZeros16$(OBJ) \
72
+  s_countLeadingZeros32$(OBJ) \
73
+  s_countLeadingZeros64$(OBJ) \
74
+  s_addM$(OBJ) \
75
+  s_addCarryM$(OBJ) \
76
+  s_addComplCarryM$(OBJ) \
77
+  s_negXM$(OBJ) \
78
+  s_sub1XM$(OBJ) \
79
+  s_subM$(OBJ) \
80
+  s_mul64To128M$(OBJ) \
81
+  s_mul128MTo256M$(OBJ) \
82
+  s_approxRecip_1Ks$(OBJ) \
83
+  s_approxRecip32_1$(OBJ) \
84
+  s_approxRecipSqrt_1Ks$(OBJ) \
85
+  s_approxRecipSqrt32_1$(OBJ) \
86
+  s_remStepMBy32$(OBJ) \
87
+
88
+OBJS_SPECIALIZE = \
89
+  softfloat_raiseFlags$(OBJ) \
90
+  s_f16UIToCommonNaN$(OBJ) \
91
+  s_commonNaNToF16UI$(OBJ) \
92
+  s_propagateNaNF16UI$(OBJ) \
93
+  s_f32UIToCommonNaN$(OBJ) \
94
+  s_commonNaNToF32UI$(OBJ) \
95
+  s_propagateNaNF32UI$(OBJ) \
96
+  s_f64UIToCommonNaN$(OBJ) \
97
+  s_commonNaNToF64UI$(OBJ) \
98
+  s_propagateNaNF64UI$(OBJ) \
99
+  extF80M_isSignalingNaN$(OBJ) \
100
+  s_extF80MToCommonNaN$(OBJ) \
101
+  s_commonNaNToExtF80M$(OBJ) \
102
+  s_propagateNaNExtF80M$(OBJ) \
103
+  f128M_isSignalingNaN$(OBJ) \
104
+  s_f128MToCommonNaN$(OBJ) \
105
+  s_commonNaNToF128M$(OBJ) \
106
+  s_propagateNaNF128M$(OBJ) \
107
+
108
+OBJS_OTHERS = \
109
+  s_roundToUI32$(OBJ) \
110
+  s_roundMToUI64$(OBJ) \
111
+  s_roundToI32$(OBJ) \
112
+  s_roundMToI64$(OBJ) \
113
+  s_normSubnormalF16Sig$(OBJ) \
114
+  s_roundPackToF16$(OBJ) \
115
+  s_normRoundPackToF16$(OBJ) \
116
+  s_addMagsF16$(OBJ) \
117
+  s_subMagsF16$(OBJ) \
118
+  s_mulAddF16$(OBJ) \
119
+  s_normSubnormalF32Sig$(OBJ) \
120
+  s_roundPackToF32$(OBJ) \
121
+  s_normRoundPackToF32$(OBJ) \
122
+  s_addMagsF32$(OBJ) \
123
+  s_subMagsF32$(OBJ) \
124
+  s_mulAddF32$(OBJ) \
125
+  s_normSubnormalF64Sig$(OBJ) \
126
+  s_roundPackToF64$(OBJ) \
127
+  s_normRoundPackToF64$(OBJ) \
128
+  s_addMagsF64$(OBJ) \
129
+  s_subMagsF64$(OBJ) \
130
+  s_mulAddF64$(OBJ) \
131
+  s_tryPropagateNaNExtF80M$(OBJ) \
132
+  s_invalidExtF80M$(OBJ) \
133
+  s_normExtF80SigM$(OBJ) \
134
+  s_roundPackMToExtF80M$(OBJ) \
135
+  s_normRoundPackMToExtF80M$(OBJ) \
136
+  s_addExtF80M$(OBJ) \
137
+  s_compareNonnormExtF80M$(OBJ) \
138
+  s_isNaNF128M$(OBJ) \
139
+  s_tryPropagateNaNF128M$(OBJ) \
140
+  s_invalidF128M$(OBJ) \
141
+  s_shiftNormSigF128M$(OBJ) \
142
+  s_roundPackMToF128M$(OBJ) \
143
+  s_normRoundPackMToF128M$(OBJ) \
144
+  s_addF128M$(OBJ) \
145
+  s_mulAddF128M$(OBJ) \
146
+  softfloat_state$(OBJ) \
147
+  ui32_to_f16$(OBJ) \
148
+  ui32_to_f32$(OBJ) \
149
+  ui32_to_f64$(OBJ) \
150
+  ui32_to_extF80M$(OBJ) \
151
+  ui32_to_f128M$(OBJ) \
152
+  ui64_to_f16$(OBJ) \
153
+  ui64_to_f32$(OBJ) \
154
+  ui64_to_f64$(OBJ) \
155
+  ui64_to_extF80M$(OBJ) \
156
+  ui64_to_f128M$(OBJ) \
157
+  i32_to_f16$(OBJ) \
158
+  i32_to_f32$(OBJ) \
159
+  i32_to_f64$(OBJ) \
160
+  i32_to_extF80M$(OBJ) \
161
+  i32_to_f128M$(OBJ) \
162
+  i64_to_f16$(OBJ) \
163
+  i64_to_f32$(OBJ) \
164
+  i64_to_f64$(OBJ) \
165
+  i64_to_extF80M$(OBJ) \
166
+  i64_to_f128M$(OBJ) \
167
+  f16_to_ui32$(OBJ) \
168
+  f16_to_ui64$(OBJ) \
169
+  f16_to_i32$(OBJ) \
170
+  f16_to_i64$(OBJ) \
171
+  f16_to_ui32_r_minMag$(OBJ) \
172
+  f16_to_ui64_r_minMag$(OBJ) \
173
+  f16_to_i32_r_minMag$(OBJ) \
174
+  f16_to_i64_r_minMag$(OBJ) \
175
+  f16_to_f32$(OBJ) \
176
+  f16_to_f64$(OBJ) \
177
+  f16_to_extF80M$(OBJ) \
178
+  f16_to_f128M$(OBJ) \
179
+  f16_roundToInt$(OBJ) \
180
+  f16_add$(OBJ) \
181
+  f16_sub$(OBJ) \
182
+  f16_mul$(OBJ) \
183
+  f16_mulAdd$(OBJ) \
184
+  f16_div$(OBJ) \
185
+  f16_rem$(OBJ) \
186
+  f16_sqrt$(OBJ) \
187
+  f16_eq$(OBJ) \
188
+  f16_le$(OBJ) \
189
+  f16_lt$(OBJ) \
190
+  f16_eq_signaling$(OBJ) \
191
+  f16_le_quiet$(OBJ) \
192
+  f16_lt_quiet$(OBJ) \
193
+  f16_isSignalingNaN$(OBJ) \
194
+  f32_to_ui32$(OBJ) \
195
+  f32_to_ui64$(OBJ) \
196
+  f32_to_i32$(OBJ) \
197
+  f32_to_i64$(OBJ) \
198
+  f32_to_ui32_r_minMag$(OBJ) \
199
+  f32_to_ui64_r_minMag$(OBJ) \
200
+  f32_to_i32_r_minMag$(OBJ) \
201
+  f32_to_i64_r_minMag$(OBJ) \
202
+  f32_to_f16$(OBJ) \
203
+  f32_to_f64$(OBJ) \
204
+  f32_to_extF80M$(OBJ) \
205
+  f32_to_f128M$(OBJ) \
206
+  f32_roundToInt$(OBJ) \
207
+  f32_add$(OBJ) \
208
+  f32_sub$(OBJ) \
209
+  f32_mul$(OBJ) \
210
+  f32_mulAdd$(OBJ) \
211
+  f32_div$(OBJ) \
212
+  f32_rem$(OBJ) \
213
+  f32_sqrt$(OBJ) \
214
+  f32_eq$(OBJ) \
215
+  f32_le$(OBJ) \
216
+  f32_lt$(OBJ) \
217
+  f32_eq_signaling$(OBJ) \
218
+  f32_le_quiet$(OBJ) \
219
+  f32_lt_quiet$(OBJ) \
220
+  f32_isSignalingNaN$(OBJ) \
221
+  f64_to_ui32$(OBJ) \
222
+  f64_to_ui64$(OBJ) \
223
+  f64_to_i32$(OBJ) \
224
+  f64_to_i64$(OBJ) \
225
+  f64_to_ui32_r_minMag$(OBJ) \
226
+  f64_to_ui64_r_minMag$(OBJ) \
227
+  f64_to_i32_r_minMag$(OBJ) \
228
+  f64_to_i64_r_minMag$(OBJ) \
229
+  f64_to_f16$(OBJ) \
230
+  f64_to_f32$(OBJ) \
231
+  f64_to_extF80M$(OBJ) \
232
+  f64_to_f128M$(OBJ) \
233
+  f64_roundToInt$(OBJ) \
234
+  f64_add$(OBJ) \
235
+  f64_sub$(OBJ) \
236
+  f64_mul$(OBJ) \
237
+  f64_mulAdd$(OBJ) \
238
+  f64_div$(OBJ) \
239
+  f64_rem$(OBJ) \
240
+  f64_sqrt$(OBJ) \
241
+  f64_eq$(OBJ) \
242
+  f64_le$(OBJ) \
243
+  f64_lt$(OBJ) \
244
+  f64_eq_signaling$(OBJ) \
245
+  f64_le_quiet$(OBJ) \
246
+  f64_lt_quiet$(OBJ) \
247
+  f64_isSignalingNaN$(OBJ) \
248
+  extF80M_to_ui32$(OBJ) \
249
+  extF80M_to_ui64$(OBJ) \
250
+  extF80M_to_i32$(OBJ) \
251
+  extF80M_to_i64$(OBJ) \
252
+  extF80M_to_ui32_r_minMag$(OBJ) \
253
+  extF80M_to_ui64_r_minMag$(OBJ) \
254
+  extF80M_to_i32_r_minMag$(OBJ) \
255
+  extF80M_to_i64_r_minMag$(OBJ) \
256
+  extF80M_to_f16$(OBJ) \
257
+  extF80M_to_f32$(OBJ) \
258
+  extF80M_to_f64$(OBJ) \
259
+  extF80M_to_f128M$(OBJ) \
260
+  extF80M_roundToInt$(OBJ) \
261
+  extF80M_add$(OBJ) \
262
+  extF80M_sub$(OBJ) \
263
+  extF80M_mul$(OBJ) \
264
+  extF80M_div$(OBJ) \
265
+  extF80M_rem$(OBJ) \
266
+  extF80M_sqrt$(OBJ) \
267
+  extF80M_eq$(OBJ) \
268
+  extF80M_le$(OBJ) \
269
+  extF80M_lt$(OBJ) \
270
+  extF80M_eq_signaling$(OBJ) \
271
+  extF80M_le_quiet$(OBJ) \
272
+  extF80M_lt_quiet$(OBJ) \
273
+  f128M_to_ui32$(OBJ) \
274
+  f128M_to_ui64$(OBJ) \
275
+  f128M_to_i32$(OBJ) \
276
+  f128M_to_i64$(OBJ) \
277
+  f128M_to_ui32_r_minMag$(OBJ) \
278
+  f128M_to_ui64_r_minMag$(OBJ) \
279
+  f128M_to_i32_r_minMag$(OBJ) \
280
+  f128M_to_i64_r_minMag$(OBJ) \
281
+  f128M_to_f16$(OBJ) \
282
+  f128M_to_f32$(OBJ) \
283
+  f128M_to_f64$(OBJ) \
284
+  f128M_to_extF80M$(OBJ) \
285
+  f128M_roundToInt$(OBJ) \
286
+  f128M_add$(OBJ) \
287
+  f128M_sub$(OBJ) \
288
+  f128M_mul$(OBJ) \
289
+  f128M_mulAdd$(OBJ) \
290
+  f128M_div$(OBJ) \
291
+  f128M_rem$(OBJ) \
292
+  f128M_sqrt$(OBJ) \
293
+  f128M_eq$(OBJ) \
294
+  f128M_le$(OBJ) \
295
+  f128M_lt$(OBJ) \
296
+  f128M_eq_signaling$(OBJ) \
297
+  f128M_le_quiet$(OBJ) \
298
+  f128M_lt_quiet$(OBJ) \
299
+
300
+OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS)
301
+
302
+$(OBJS_ALL): \
303
+  $(OTHER_HEADERS) platform.h $(SOURCE_DIR)/include/primitiveTypes.h \
304
+  $(SOURCE_DIR)/include/primitives.h
305
+$(OBJS_SPECIALIZE) $(OBJS_OTHERS): \
306
+  $(SOURCE_DIR)/include/softfloat_types.h $(SOURCE_DIR)/include/internals.h \
307
+  $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/specialize.h \
308
+  $(SOURCE_DIR)/include/softfloat.h
309
+
310
+$(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c
311
+	$(COMPILE_C) $(SOURCE_DIR)/$*.c
312
+
313
+$(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c
314
+	$(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c
315
+
316
+softfloat$(LIB): $(OBJS_ALL)
317
+	$(DELETE) $@
318
+	$(MAKELIB) $^
319
+
320
+.PHONY: clean
321
+clean:
322
+	$(DELETE) $(OBJS_ALL) softfloat$(LIB)
323
+

+ 53
- 0
softfloat/build/Linux-ARM-VFPv2-GCC/platform.h View File

@@ -0,0 +1,53 @@
1
+
2
+/*============================================================================
3
+
4
+This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
5
+Package, Release 3e, by John R. Hauser.
6
+
7
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
8
+University of California.  All rights reserved.
9
+
10
+Redistribution and use in source and binary forms, with or without
11
+modification, are permitted provided that the following conditions are met:
12
+
13
+ 1. Redistributions of source code must retain the above copyright notice,
14
+    this list of conditions, and the following disclaimer.
15
+
16
+ 2. Redistributions in binary form must reproduce the above copyright notice,
17
+    this list of conditions, and the following disclaimer in the documentation
18
+    and/or other materials provided with the distribution.
19
+
20
+ 3. Neither the name of the University nor the names of its contributors may
21
+    be used to endorse or promote products derived from this software without
22
+    specific prior written permission.
23
+
24
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
25
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
27
+DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
28
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+
35
+=============================================================================*/
36
+
37
+/*----------------------------------------------------------------------------
38
+*----------------------------------------------------------------------------*/
39
+#define LITTLEENDIAN 1
40
+
41
+/*----------------------------------------------------------------------------
42
+*----------------------------------------------------------------------------*/
43
+#ifdef __GNUC_STDC_INLINE__
44
+#define INLINE inline
45
+#else
46
+#define INLINE extern inline
47
+#endif
48
+
49
+/*----------------------------------------------------------------------------
50
+*----------------------------------------------------------------------------*/
51
+#define SOFTFLOAT_BUILTIN_CLZ 1
52
+#include "opts-GCC.h"
53
+

+ 390
- 0
softfloat/build/Linux-x86_64-GCC/Makefile View File

@@ -0,0 +1,390 @@
1
+
2
+#=============================================================================
3
+#
4
+# This Makefile is part of the SoftFloat IEEE Floating-Point Arithmetic
5
+# Package, Release 3e, by John R. Hauser.
6
+#
7
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
8
+# University of California.  All rights reserved.
9
+#
10
+# Redistribution and use in source and binary forms, with or without
11
+# modification, are permitted provided that the following conditions are met:
12
+#
13
+#  1. Redistributions of source code must retain the above copyright notice,
14
+#     this list of conditions, and the following disclaimer.
15
+#
16
+#  2. Redistributions in binary form must reproduce the above copyright
17
+#     notice, this list of conditions, and the following disclaimer in the
18
+#     documentation and/or other materials provided with the distribution.
19
+#
20
+#  3. Neither the name of the University nor the names of its contributors
21
+#     may be used to endorse or promote products derived from this software
22
+#     without specific prior written permission.
23
+#
24
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
25
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
27
+# DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
28
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+#
35
+#=============================================================================
36
+
37
+SOURCE_DIR ?= ../../source
38
+SPECIALIZE_TYPE ?= 8086-SSE
39
+
40
+SOFTFLOAT_OPTS ?= \
41
+  -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \
42
+  -DSOFTFLOAT_FAST_DIV64TO32
43
+
44
+DELETE = rm -f
45
+C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include
46
+COMPILE_C = \
47
+  gcc -c -Werror-implicit-function-declaration -DSOFTFLOAT_FAST_INT64 \
48
+    $(SOFTFLOAT_OPTS) $(C_INCLUDES) -O2 -o $@
49
+MAKELIB = ar crs $@
50
+
51
+OBJ = .o
52
+LIB = .a
53
+
54
+OTHER_HEADERS = $(SOURCE_DIR)/include/opts-GCC.h
55
+
56
+.PHONY: all
57
+all: softfloat$(LIB)
58
+
59
+OBJS_PRIMITIVES = \
60
+  s_eq128$(OBJ) \
61
+  s_le128$(OBJ) \
62
+  s_lt128$(OBJ) \
63
+  s_shortShiftLeft128$(OBJ) \
64
+  s_shortShiftRight128$(OBJ) \
65
+  s_shortShiftRightJam64$(OBJ) \
66
+  s_shortShiftRightJam64Extra$(OBJ) \
67
+  s_shortShiftRightJam128$(OBJ) \
68
+  s_shortShiftRightJam128Extra$(OBJ) \
69
+  s_shiftRightJam32$(OBJ) \
70
+  s_shiftRightJam64$(OBJ) \
71
+  s_shiftRightJam64Extra$(OBJ) \
72
+  s_shiftRightJam128$(OBJ) \
73
+  s_shiftRightJam128Extra$(OBJ) \
74
+  s_shiftRightJam256M$(OBJ) \
75
+  s_countLeadingZeros8$(OBJ) \
76
+  s_countLeadingZeros16$(OBJ) \
77
+  s_countLeadingZeros32$(OBJ) \
78
+  s_countLeadingZeros64$(OBJ) \
79
+  s_add128$(OBJ) \
80
+  s_add256M$(OBJ) \
81
+  s_sub128$(OBJ) \
82
+  s_sub256M$(OBJ) \
83
+  s_mul64ByShifted32To128$(OBJ) \
84
+  s_mul64To128$(OBJ) \
85
+  s_mul128By32$(OBJ) \
86
+  s_mul128To256M$(OBJ) \
87
+  s_approxRecip_1Ks$(OBJ) \
88
+  s_approxRecip32_1$(OBJ) \
89
+  s_approxRecipSqrt_1Ks$(OBJ) \
90
+  s_approxRecipSqrt32_1$(OBJ) \
91
+
92
+OBJS_SPECIALIZE = \
93
+  softfloat_raiseFlags$(OBJ) \
94
+  s_f16UIToCommonNaN$(OBJ) \
95
+  s_commonNaNToF16UI$(OBJ) \
96
+  s_propagateNaNF16UI$(OBJ) \
97
+  s_f32UIToCommonNaN$(OBJ) \
98
+  s_commonNaNToF32UI$(OBJ) \
99
+  s_propagateNaNF32UI$(OBJ) \
100
+  s_f64UIToCommonNaN$(OBJ) \
101
+  s_commonNaNToF64UI$(OBJ) \
102
+  s_propagateNaNF64UI$(OBJ) \
103
+  extF80M_isSignalingNaN$(OBJ) \
104
+  s_extF80UIToCommonNaN$(OBJ) \
105
+  s_commonNaNToExtF80UI$(OBJ) \
106
+  s_propagateNaNExtF80UI$(OBJ) \
107
+  f128M_isSignalingNaN$(OBJ) \
108
+  s_f128UIToCommonNaN$(OBJ) \
109
+  s_commonNaNToF128UI$(OBJ) \
110
+  s_propagateNaNF128UI$(OBJ) \
111
+
112
+OBJS_OTHERS = \
113
+  s_roundToUI32$(OBJ) \
114
+  s_roundToUI64$(OBJ) \
115
+  s_roundToI32$(OBJ) \
116
+  s_roundToI64$(OBJ) \
117
+  s_normSubnormalF16Sig$(OBJ) \
118
+  s_roundPackToF16$(OBJ) \
119
+  s_normRoundPackToF16$(OBJ) \
120
+  s_addMagsF16$(OBJ) \
121
+  s_subMagsF16$(OBJ) \
122
+  s_mulAddF16$(OBJ) \
123
+  s_normSubnormalF32Sig$(OBJ) \
124
+  s_roundPackToF32$(OBJ) \
125
+  s_normRoundPackToF32$(OBJ) \
126
+  s_addMagsF32$(OBJ) \
127
+  s_subMagsF32$(OBJ) \
128
+  s_mulAddF32$(OBJ) \
129
+  s_normSubnormalF64Sig$(OBJ) \
130
+  s_roundPackToF64$(OBJ) \
131
+  s_normRoundPackToF64$(OBJ) \
132
+  s_addMagsF64$(OBJ) \
133
+  s_subMagsF64$(OBJ) \
134
+  s_mulAddF64$(OBJ) \
135
+  s_normSubnormalExtF80Sig$(OBJ) \
136
+  s_roundPackToExtF80$(OBJ) \
137
+  s_normRoundPackToExtF80$(OBJ) \
138
+  s_addMagsExtF80$(OBJ) \
139
+  s_subMagsExtF80$(OBJ) \
140
+  s_normSubnormalF128Sig$(OBJ) \
141
+  s_roundPackToF128$(OBJ) \
142
+  s_normRoundPackToF128$(OBJ) \
143
+  s_addMagsF128$(OBJ) \
144
+  s_subMagsF128$(OBJ) \
145
+  s_mulAddF128$(OBJ) \
146
+  softfloat_state$(OBJ) \
147
+  ui32_to_f16$(OBJ) \
148
+  ui32_to_f32$(OBJ) \
149
+  ui32_to_f64$(OBJ) \
150
+  ui32_to_extF80$(OBJ) \
151
+  ui32_to_extF80M$(OBJ) \
152
+  ui32_to_f128$(OBJ) \
153
+  ui32_to_f128M$(OBJ) \
154
+  ui64_to_f16$(OBJ) \
155
+  ui64_to_f32$(OBJ) \
156
+  ui64_to_f64$(OBJ) \
157
+  ui64_to_extF80$(OBJ) \
158
+  ui64_to_extF80M$(OBJ) \
159
+  ui64_to_f128$(OBJ) \
160
+  ui64_to_f128M$(OBJ) \
161
+  i32_to_f16$(OBJ) \
162
+  i32_to_f32$(OBJ) \
163
+  i32_to_f64$(OBJ) \
164
+  i32_to_extF80$(OBJ) \
165
+  i32_to_extF80M$(OBJ) \
166
+  i32_to_f128$(OBJ) \
167
+  i32_to_f128M$(OBJ) \
168
+  i64_to_f16$(OBJ) \
169
+  i64_to_f32$(OBJ) \
170
+  i64_to_f64$(OBJ) \
171
+  i64_to_extF80$(OBJ) \
172
+  i64_to_extF80M$(OBJ) \
173
+  i64_to_f128$(OBJ) \
174
+  i64_to_f128M$(OBJ) \
175
+  f16_to_ui32$(OBJ) \
176
+  f16_to_ui64$(OBJ) \
177
+  f16_to_i32$(OBJ) \
178
+  f16_to_i64$(OBJ) \
179
+  f16_to_ui32_r_minMag$(OBJ) \
180
+  f16_to_ui64_r_minMag$(OBJ) \
181
+  f16_to_i32_r_minMag$(OBJ) \
182
+  f16_to_i64_r_minMag$(OBJ) \
183
+  f16_to_f32$(OBJ) \
184
+  f16_to_f64$(OBJ) \
185
+  f16_to_extF80$(OBJ) \
186
+  f16_to_extF80M$(OBJ) \
187
+  f16_to_f128$(OBJ) \
188
+  f16_to_f128M$(OBJ) \
189
+  f16_roundToInt$(OBJ) \
190
+  f16_add$(OBJ) \
191
+  f16_sub$(OBJ) \
192
+  f16_mul$(OBJ) \
193
+  f16_mulAdd$(OBJ) \
194
+  f16_div$(OBJ) \
195
+  f16_rem$(OBJ) \
196
+  f16_sqrt$(OBJ) \
197
+  f16_eq$(OBJ) \
198
+  f16_le$(OBJ) \
199
+  f16_lt$(OBJ) \
200
+  f16_eq_signaling$(OBJ) \
201
+  f16_le_quiet$(OBJ) \
202
+  f16_lt_quiet$(OBJ) \
203
+  f16_isSignalingNaN$(OBJ) \
204
+  f32_to_ui32$(OBJ) \
205
+  f32_to_ui64$(OBJ) \
206
+  f32_to_i32$(OBJ) \
207
+  f32_to_i64$(OBJ) \
208
+  f32_to_ui32_r_minMag$(OBJ) \
209
+  f32_to_ui64_r_minMag$(OBJ) \
210
+  f32_to_i32_r_minMag$(OBJ) \
211
+  f32_to_i64_r_minMag$(OBJ) \
212
+  f32_to_f16$(OBJ) \
213
+  f32_to_f64$(OBJ) \
214
+  f32_to_extF80$(OBJ) \
215
+  f32_to_extF80M$(OBJ) \
216
+  f32_to_f128$(OBJ) \
217
+  f32_to_f128M$(OBJ) \
218
+  f32_roundToInt$(OBJ) \
219
+  f32_add$(OBJ) \
220
+  f32_sub$(OBJ) \
221
+  f32_mul$(OBJ) \
222
+  f32_mulAdd$(OBJ) \
223
+  f32_div$(OBJ) \
224
+  f32_rem$(OBJ) \
225
+  f32_sqrt$(OBJ) \
226
+  f32_eq$(OBJ) \
227
+  f32_le$(OBJ) \
228
+  f32_lt$(OBJ) \
229
+  f32_eq_signaling$(OBJ) \
230
+  f32_le_quiet$(OBJ) \
231
+  f32_lt_quiet$(OBJ) \
232
+  f32_isSignalingNaN$(OBJ) \
233
+  f64_to_ui32$(OBJ) \
234
+  f64_to_ui64$(OBJ) \
235
+  f64_to_i32$(OBJ) \
236
+  f64_to_i64$(OBJ) \
237
+  f64_to_ui32_r_minMag$(OBJ) \
238
+  f64_to_ui64_r_minMag$(OBJ) \
239
+  f64_to_i32_r_minMag$(OBJ) \
240
+  f64_to_i64_r_minMag$(OBJ) \
241
+  f64_to_f16$(OBJ) \
242
+  f64_to_f32$(OBJ) \
243
+  f64_to_extF80$(OBJ) \
244
+  f64_to_extF80M$(OBJ) \
245
+  f64_to_f128$(OBJ) \
246
+  f64_to_f128M$(OBJ) \
247
+  f64_roundToInt$(OBJ) \
248
+  f64_add$(OBJ) \
249
+  f64_sub$(OBJ) \
250
+  f64_mul$(OBJ) \
251
+  f64_mulAdd$(OBJ) \
252
+  f64_div$(OBJ) \
253
+  f64_rem$(OBJ) \
254
+  f64_sqrt$(OBJ) \
255
+  f64_eq$(OBJ) \
256
+  f64_le$(OBJ) \
257
+  f64_lt$(OBJ) \
258
+  f64_eq_signaling$(OBJ) \
259
+  f64_le_quiet$(OBJ) \
260
+  f64_lt_quiet$(OBJ) \
261
+  f64_isSignalingNaN$(OBJ) \
262
+  extF80_to_ui32$(OBJ) \
263
+  extF80_to_ui64$(OBJ) \
264
+  extF80_to_i32$(OBJ) \
265
+  extF80_to_i64$(OBJ) \
266
+  extF80_to_ui32_r_minMag$(OBJ) \
267
+  extF80_to_ui64_r_minMag$(OBJ) \
268
+  extF80_to_i32_r_minMag$(OBJ) \
269
+  extF80_to_i64_r_minMag$(OBJ) \
270
+  extF80_to_f16$(OBJ) \
271
+  extF80_to_f32$(OBJ) \
272
+  extF80_to_f64$(OBJ) \
273
+  extF80_to_f128$(OBJ) \
274
+  extF80_roundToInt$(OBJ) \
275
+  extF80_add$(OBJ) \
276
+  extF80_sub$(OBJ) \
277
+  extF80_mul$(OBJ) \
278
+  extF80_div$(OBJ) \
279
+  extF80_rem$(OBJ) \
280
+  extF80_sqrt$(OBJ) \
281
+  extF80_eq$(OBJ) \
282
+  extF80_le$(OBJ) \
283
+  extF80_lt$(OBJ) \
284
+  extF80_eq_signaling$(OBJ) \
285
+  extF80_le_quiet$(OBJ) \
286
+  extF80_lt_quiet$(OBJ) \
287
+  extF80_isSignalingNaN$(OBJ) \
288
+  extF80M_to_ui32$(OBJ) \
289
+  extF80M_to_ui64$(OBJ) \
290
+  extF80M_to_i32$(OBJ) \
291
+  extF80M_to_i64$(OBJ) \
292
+  extF80M_to_ui32_r_minMag$(OBJ) \
293
+  extF80M_to_ui64_r_minMag$(OBJ) \
294
+  extF80M_to_i32_r_minMag$(OBJ) \
295
+  extF80M_to_i64_r_minMag$(OBJ) \
296
+  extF80M_to_f16$(OBJ) \
297
+  extF80M_to_f32$(OBJ) \
298
+  extF80M_to_f64$(OBJ) \
299
+  extF80M_to_f128M$(OBJ) \
300
+  extF80M_roundToInt$(OBJ) \
301
+  extF80M_add$(OBJ) \
302
+  extF80M_sub$(OBJ) \
303
+  extF80M_mul$(OBJ) \
304
+  extF80M_div$(OBJ) \
305
+  extF80M_rem$(OBJ) \
306
+  extF80M_sqrt$(OBJ) \
307
+  extF80M_eq$(OBJ) \
308
+  extF80M_le$(OBJ) \
309
+  extF80M_lt$(OBJ) \
310
+  extF80M_eq_signaling$(OBJ) \
311
+  extF80M_le_quiet$(OBJ) \
312
+  extF80M_lt_quiet$(OBJ) \
313
+  f128_to_ui32$(OBJ) \
314
+  f128_to_ui64$(OBJ) \
315
+  f128_to_i32$(OBJ) \
316
+  f128_to_i64$(OBJ) \
317
+  f128_to_ui32_r_minMag$(OBJ) \
318
+  f128_to_ui64_r_minMag$(OBJ) \
319
+  f128_to_i32_r_minMag$(OBJ) \
320
+  f128_to_i64_r_minMag$(OBJ) \
321
+  f128_to_f16$(OBJ) \
322
+  f128_to_f32$(OBJ) \
323
+  f128_to_extF80$(OBJ) \
324
+  f128_to_f64$(OBJ) \
325
+  f128_roundToInt$(OBJ) \
326
+  f128_add$(OBJ) \
327
+  f128_sub$(OBJ) \
328
+  f128_mul$(OBJ) \
329
+  f128_mulAdd$(OBJ) \
330
+  f128_div$(OBJ) \
331
+  f128_rem$(OBJ) \
332
+  f128_sqrt$(OBJ) \
333
+  f128_eq$(OBJ) \
334
+  f128_le$(OBJ) \
335
+  f128_lt$(OBJ) \
336
+  f128_eq_signaling$(OBJ) \
337
+  f128_le_quiet$(OBJ) \
338
+  f128_lt_quiet$(OBJ) \
339
+  f128_isSignalingNaN$(OBJ) \
340
+  f128M_to_ui32$(OBJ) \
341
+  f128M_to_ui64$(OBJ) \
342
+  f128M_to_i32$(OBJ) \
343
+  f128M_to_i64$(OBJ) \
344
+  f128M_to_ui32_r_minMag$(OBJ) \
345
+  f128M_to_ui64_r_minMag$(OBJ) \
346
+  f128M_to_i32_r_minMag$(OBJ) \
347
+  f128M_to_i64_r_minMag$(OBJ) \
348
+  f128M_to_f16$(OBJ) \
349
+  f128M_to_f32$(OBJ) \
350
+  f128M_to_extF80M$(OBJ) \
351
+  f128M_to_f64$(OBJ) \
352
+  f128M_roundToInt$(OBJ) \
353
+  f128M_add$(OBJ) \
354
+  f128M_sub$(OBJ) \
355
+  f128M_mul$(OBJ) \
356
+  f128M_mulAdd$(OBJ) \
357
+  f128M_div$(OBJ) \
358
+  f128M_rem$(OBJ) \
359
+  f128M_sqrt$(OBJ) \
360
+  f128M_eq$(OBJ) \
361
+  f128M_le$(OBJ) \
362
+  f128M_lt$(OBJ) \
363
+  f128M_eq_signaling$(OBJ) \
364
+  f128M_le_quiet$(OBJ) \
365
+  f128M_lt_quiet$(OBJ) \
366
+
367
+OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS)
368
+
369
+$(OBJS_ALL): \
370
+  $(OTHER_HEADERS) platform.h $(SOURCE_DIR)/include/primitiveTypes.h \
371
+  $(SOURCE_DIR)/include/primitives.h
372
+$(OBJS_SPECIALIZE) $(OBJS_OTHERS): \
373
+  $(SOURCE_DIR)/include/softfloat_types.h $(SOURCE_DIR)/include/internals.h \
374
+  $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/specialize.h \
375
+  $(SOURCE_DIR)/include/softfloat.h
376
+
377
+$(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c
378
+	$(COMPILE_C) $(SOURCE_DIR)/$*.c
379
+
380
+$(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c
381
+	$(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c
382
+
383
+softfloat$(LIB): $(OBJS_ALL)
384
+	$(DELETE) $@
385
+	$(MAKELIB) $^
386
+
387
+.PHONY: clean
388
+clean:
389
+	$(DELETE) $(OBJS_ALL) softfloat$(LIB)
390
+

+ 55
- 0
softfloat/build/Linux-x86_64-GCC/platform.h View File

@@ -0,0 +1,55 @@
1
+
2
+/*============================================================================
3
+
4
+This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
5
+Package, Release 3e, by John R. Hauser.
6
+
7
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
8
+University of California.  All rights reserved.
9
+
10
+Redistribution and use in source and binary forms, with or without
11
+modification, are permitted provided that the following conditions are met:
12
+
13
+ 1. Redistributions of source code must retain the above copyright notice,
14
+    this list of conditions, and the following disclaimer.
15
+
16
+ 2. Redistributions in binary form must reproduce the above copyright notice,
17
+    this list of conditions, and the following disclaimer in the documentation
18
+    and/or other materials provided with the distribution.
19
+
20
+ 3. Neither the name of the University nor the names of its contributors may
21
+    be used to endorse or promote products derived from this software without
22
+    specific prior written permission.
23
+
24
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
25
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
27
+DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
28
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+
35
+=============================================================================*/
36
+
37
+/*----------------------------------------------------------------------------
38
+*----------------------------------------------------------------------------*/
39
+#define LITTLEENDIAN 1
40
+
41
+/*----------------------------------------------------------------------------
42
+*----------------------------------------------------------------------------*/
43
+#ifdef __GNUC_STDC_INLINE__
44
+//#define INLINE inline
45
+#define INLINE static
46
+#else
47
+#define INLINE extern inline
48
+#endif
49
+
50
+/*----------------------------------------------------------------------------
51
+*----------------------------------------------------------------------------*/
52
+#define SOFTFLOAT_BUILTIN_CLZ 1
53
+#define SOFTFLOAT_INTRINSIC_INT128 1
54
+#include "opts-GCC.h"
55
+

+ 325
- 0
softfloat/build/Win32-MinGW/Makefile View File

@@ -0,0 +1,325 @@
1
+
2
+#=============================================================================
3
+#
4
+# This Makefile is part of the SoftFloat IEEE Floating-Point Arithmetic
5
+# Package, Release 3e, by John R. Hauser.
6
+#
7
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
8
+# University of California.  All rights reserved.
9
+#
10
+# Redistribution and use in source and binary forms, with or without
11
+# modification, are permitted provided that the following conditions are met:
12
+#
13
+#  1. Redistributions of source code must retain the above copyright notice,
14
+#     this list of conditions, and the following disclaimer.
15
+#
16
+#  2. Redistributions in binary form must reproduce the above copyright
17
+#     notice, this list of conditions, and the following disclaimer in the
18
+#     documentation and/or other materials provided with the distribution.
19
+#
20
+#  3. Neither the name of the University nor the names of its contributors
21
+#     may be used to endorse or promote products derived from this software
22
+#     without specific prior written permission.
23
+#
24
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
25
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
27
+# DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
28
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+#
35
+#=============================================================================
36
+
37
+SOURCE_DIR ?= ../../source
38
+SPECIALIZE_TYPE ?= 8086
39
+
40
+SOFTFLOAT_OPTS ?= \
41
+  -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \
42
+  -DSOFTFLOAT_FAST_DIV64TO32
43
+
44
+DELETE = rm -f
45
+C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include
46
+COMPILE_C = \
47
+  gcc -c -Werror-implicit-function-declaration $(SOFTFLOAT_OPTS) \
48
+    $(C_INCLUDES) -O2 -o $@
49
+MAKELIB = ar crs $@
50
+
51
+OBJ = .o
52
+LIB = .a
53
+
54
+OTHER_HEADERS =
55
+
56
+.PHONY: all
57
+all: softfloat$(LIB)
58
+
59
+OBJS_PRIMITIVES = \
60
+  s_compare96M$(OBJ) \
61
+  s_compare128M$(OBJ) \
62
+  s_shortShiftLeft64To96M$(OBJ) \
63
+  s_shortShiftLeftM$(OBJ) \
64
+  s_shiftLeftM$(OBJ) \
65
+  s_shortShiftRightM$(OBJ) \
66
+  s_shortShiftRightJam64$(OBJ) \
67
+  s_shortShiftRightJamM$(OBJ) \
68
+  s_shiftRightJam32$(OBJ) \
69
+  s_shiftRightJam64$(OBJ) \
70
+  s_shiftRightJamM$(OBJ) \
71
+  s_shiftRightM$(OBJ) \
72
+  s_countLeadingZeros8$(OBJ) \
73
+  s_countLeadingZeros16$(OBJ) \
74
+  s_countLeadingZeros32$(OBJ) \
75
+  s_countLeadingZeros64$(OBJ) \
76
+  s_addM$(OBJ) \
77
+  s_addCarryM$(OBJ) \
78
+  s_addComplCarryM$(OBJ) \
79
+  s_negXM$(OBJ) \
80
+  s_sub1XM$(OBJ) \
81
+  s_subM$(OBJ) \
82
+  s_mul64To128M$(OBJ) \
83
+  s_mul128MTo256M$(OBJ) \
84
+  s_approxRecip_1Ks$(OBJ) \
85
+  s_approxRecip32_1$(OBJ) \
86
+  s_approxRecipSqrt_1Ks$(OBJ) \
87
+  s_approxRecipSqrt32_1$(OBJ) \
88
+  s_remStepMBy32$(OBJ) \
89
+
90
+OBJS_SPECIALIZE = \
91
+  softfloat_raiseFlags$(OBJ) \
92
+  s_f16UIToCommonNaN$(OBJ) \
93
+  s_commonNaNToF16UI$(OBJ) \
94
+  s_propagateNaNF16UI$(OBJ) \
95
+  s_f32UIToCommonNaN$(OBJ) \
96
+  s_commonNaNToF32UI$(OBJ) \
97
+  s_propagateNaNF32UI$(OBJ) \
98
+  s_f64UIToCommonNaN$(OBJ) \
99
+  s_commonNaNToF64UI$(OBJ) \
100
+  s_propagateNaNF64UI$(OBJ) \
101
+  extF80M_isSignalingNaN$(OBJ) \
102
+  s_extF80MToCommonNaN$(OBJ) \
103
+  s_commonNaNToExtF80M$(OBJ) \
104
+  s_propagateNaNExtF80M$(OBJ) \
105
+  f128M_isSignalingNaN$(OBJ) \
106
+  s_f128MToCommonNaN$(OBJ) \
107
+  s_commonNaNToF128M$(OBJ) \
108
+  s_propagateNaNF128M$(OBJ) \
109
+
110
+OBJS_OTHERS = \
111
+  s_roundToUI32$(OBJ) \
112
+  s_roundMToUI64$(OBJ) \
113
+  s_roundToI32$(OBJ) \
114
+  s_roundMToI64$(OBJ) \
115
+  s_normSubnormalF16Sig$(OBJ) \
116
+  s_roundPackToF16$(OBJ) \
117
+  s_normRoundPackToF16$(OBJ) \
118
+  s_addMagsF16$(OBJ) \
119
+  s_subMagsF16$(OBJ) \
120
+  s_mulAddF16$(OBJ) \
121
+  s_normSubnormalF32Sig$(OBJ) \
122
+  s_roundPackToF32$(OBJ) \
123
+  s_normRoundPackToF32$(OBJ) \
124
+  s_addMagsF32$(OBJ) \
125
+  s_subMagsF32$(OBJ) \
126
+  s_mulAddF32$(OBJ) \
127
+  s_normSubnormalF64Sig$(OBJ) \
128
+  s_roundPackToF64$(OBJ) \
129
+  s_normRoundPackToF64$(OBJ) \
130
+  s_addMagsF64$(OBJ) \
131
+  s_subMagsF64$(OBJ) \
132
+  s_mulAddF64$(OBJ) \
133
+  s_tryPropagateNaNExtF80M$(OBJ) \
134
+  s_invalidExtF80M$(OBJ) \
135
+  s_normExtF80SigM$(OBJ) \
136
+  s_roundPackMToExtF80M$(OBJ) \
137
+  s_normRoundPackMToExtF80M$(OBJ) \
138
+  s_addExtF80M$(OBJ) \
139
+  s_compareNonnormExtF80M$(OBJ) \
140
+  s_isNaNF128M$(OBJ) \
141
+  s_tryPropagateNaNF128M$(OBJ) \
142
+  s_invalidF128M$(OBJ) \
143
+  s_shiftNormSigF128M$(OBJ) \
144
+  s_roundPackMToF128M$(OBJ) \
145
+  s_normRoundPackMToF128M$(OBJ) \
146
+  s_addF128M$(OBJ) \
147
+  s_mulAddF128M$(OBJ) \
148
+  softfloat_state$(OBJ) \
149
+  ui32_to_f16$(OBJ) \
150
+  ui32_to_f32$(OBJ) \
151
+  ui32_to_f64$(OBJ) \
152
+  ui32_to_extF80M$(OBJ) \
153
+  ui32_to_f128M$(OBJ) \
154
+  ui64_to_f16$(OBJ) \
155
+  ui64_to_f32$(OBJ) \
156
+  ui64_to_f64$(OBJ) \
157
+  ui64_to_extF80M$(OBJ) \
158
+  ui64_to_f128M$(OBJ) \
159
+  i32_to_f16$(OBJ) \
160
+  i32_to_f32$(OBJ) \
161
+  i32_to_f64$(OBJ) \
162
+  i32_to_extF80M$(OBJ) \
163
+  i32_to_f128M$(OBJ) \
164
+  i64_to_f16$(OBJ) \
165
+  i64_to_f32$(OBJ) \
166
+  i64_to_f64$(OBJ) \
167
+  i64_to_extF80M$(OBJ) \
168
+  i64_to_f128M$(OBJ) \
169
+  f16_to_ui32$(OBJ) \
170
+  f16_to_ui64$(OBJ) \
171
+  f16_to_i32$(OBJ) \
172
+  f16_to_i64$(OBJ) \
173
+  f16_to_ui32_r_minMag$(OBJ) \
174
+  f16_to_ui64_r_minMag$(OBJ) \
175
+  f16_to_i32_r_minMag$(OBJ) \
176
+  f16_to_i64_r_minMag$(OBJ) \
177
+  f16_to_f32$(OBJ) \
178
+  f16_to_f64$(OBJ) \
179
+  f16_to_extF80M$(OBJ) \
180
+  f16_to_f128M$(OBJ) \
181
+  f16_roundToInt$(OBJ) \
182
+  f16_add$(OBJ) \
183
+  f16_sub$(OBJ) \
184
+  f16_mul$(OBJ) \
185
+  f16_mulAdd$(OBJ) \
186
+  f16_div$(OBJ) \
187
+  f16_rem$(OBJ) \
188
+  f16_sqrt$(OBJ) \
189
+  f16_eq$(OBJ) \
190
+  f16_le$(OBJ) \
191
+  f16_lt$(OBJ) \
192
+  f16_eq_signaling$(OBJ) \
193
+  f16_le_quiet$(OBJ) \
194
+  f16_lt_quiet$(OBJ) \
195
+  f16_isSignalingNaN$(OBJ) \
196
+  f32_to_ui32$(OBJ) \
197
+  f32_to_ui64$(OBJ) \
198
+  f32_to_i32$(OBJ) \
199
+  f32_to_i64$(OBJ) \
200
+  f32_to_ui32_r_minMag$(OBJ) \
201
+  f32_to_ui64_r_minMag$(OBJ) \
202
+  f32_to_i32_r_minMag$(OBJ) \
203
+  f32_to_i64_r_minMag$(OBJ) \
204
+  f32_to_f16$(OBJ) \
205
+  f32_to_f64$(OBJ) \
206
+  f32_to_extF80M$(OBJ) \
207
+  f32_to_f128M$(OBJ) \
208
+  f32_roundToInt$(OBJ) \
209
+  f32_add$(OBJ) \
210
+  f32_sub$(OBJ) \
211
+  f32_mul$(OBJ) \
212
+  f32_mulAdd$(OBJ) \
213
+  f32_div$(OBJ) \
214
+  f32_rem$(OBJ) \
215
+  f32_sqrt$(OBJ) \
216
+  f32_eq$(OBJ) \
217
+  f32_le$(OBJ) \
218
+  f32_lt$(OBJ) \
219
+  f32_eq_signaling$(OBJ) \
220
+  f32_le_quiet$(OBJ) \
221
+  f32_lt_quiet$(OBJ) \
222
+  f32_isSignalingNaN$(OBJ) \
223
+  f64_to_ui32$(OBJ) \
224
+  f64_to_ui64$(OBJ) \
225
+  f64_to_i32$(OBJ) \
226
+  f64_to_i64$(OBJ) \
227
+  f64_to_ui32_r_minMag$(OBJ) \
228
+  f64_to_ui64_r_minMag$(OBJ) \
229
+  f64_to_i32_r_minMag$(OBJ) \
230
+  f64_to_i64_r_minMag$(OBJ) \
231
+  f64_to_f16$(OBJ) \
232
+  f64_to_f32$(OBJ) \
233
+  f64_to_extF80M$(OBJ) \
234
+  f64_to_f128M$(OBJ) \
235
+  f64_roundToInt$(OBJ) \
236
+  f64_add$(OBJ) \
237
+  f64_sub$(OBJ) \
238
+  f64_mul$(OBJ) \
239
+  f64_mulAdd$(OBJ) \
240
+  f64_div$(OBJ) \
241
+  f64_rem$(OBJ) \
242
+  f64_sqrt$(OBJ) \
243
+  f64_eq$(OBJ) \
244
+  f64_le$(OBJ) \
245
+  f64_lt$(OBJ) \
246
+  f64_eq_signaling$(OBJ) \
247
+  f64_le_quiet$(OBJ) \
248
+  f64_lt_quiet$(OBJ) \
249
+  f64_isSignalingNaN$(OBJ) \
250
+  extF80M_to_ui32$(OBJ) \
251
+  extF80M_to_ui64$(OBJ) \
252
+  extF80M_to_i32$(OBJ) \
253
+  extF80M_to_i64$(OBJ) \
254
+  extF80M_to_ui32_r_minMag$(OBJ) \
255
+  extF80M_to_ui64_r_minMag$(OBJ) \
256
+  extF80M_to_i32_r_minMag$(OBJ) \
257
+  extF80M_to_i64_r_minMag$(OBJ) \
258
+  extF80M_to_f16$(OBJ) \
259
+  extF80M_to_f32$(OBJ) \
260
+  extF80M_to_f64$(OBJ) \
261
+  extF80M_to_f128M$(OBJ) \
262
+  extF80M_roundToInt$(OBJ) \
263
+  extF80M_add$(OBJ) \
264
+  extF80M_sub$(OBJ) \
265
+  extF80M_mul$(OBJ) \
266
+  extF80M_div$(OBJ) \
267
+  extF80M_rem$(OBJ) \
268
+  extF80M_sqrt$(OBJ) \
269
+  extF80M_eq$(OBJ) \
270
+  extF80M_le$(OBJ) \
271
+  extF80M_lt$(OBJ) \
272
+  extF80M_eq_signaling$(OBJ) \
273
+  extF80M_le_quiet$(OBJ) \
274
+  extF80M_lt_quiet$(OBJ) \
275
+  f128M_to_ui32$(OBJ) \
276
+  f128M_to_ui64$(OBJ) \
277
+  f128M_to_i32$(OBJ) \
278
+  f128M_to_i64$(OBJ) \
279
+  f128M_to_ui32_r_minMag$(OBJ) \
280
+  f128M_to_ui64_r_minMag$(OBJ) \
281
+  f128M_to_i32_r_minMag$(OBJ) \
282
+  f128M_to_i64_r_minMag$(OBJ) \
283
+  f128M_to_f16$(OBJ) \
284
+  f128M_to_f32$(OBJ) \
285
+  f128M_to_f64$(OBJ) \
286
+  f128M_to_extF80M$(OBJ) \
287
+  f128M_roundToInt$(OBJ) \
288
+  f128M_add$(OBJ) \
289
+  f128M_sub$(OBJ) \
290
+  f128M_mul$(OBJ) \
291
+  f128M_mulAdd$(OBJ) \
292
+  f128M_div$(OBJ) \
293
+  f128M_rem$(OBJ) \
294
+  f128M_sqrt$(OBJ) \
295
+  f128M_eq$(OBJ) \
296
+  f128M_le$(OBJ) \
297
+  f128M_lt$(OBJ) \
298
+  f128M_eq_signaling$(OBJ) \
299
+  f128M_le_quiet$(OBJ) \
300
+  f128M_lt_quiet$(OBJ) \
301
+
302
+OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS)
303
+
304
+$(OBJS_ALL): \
305
+  $(OTHER_HEADERS) platform.h $(SOURCE_DIR)/include/primitiveTypes.h \
306
+  $(SOURCE_DIR)/include/primitives.h
307
+$(OBJS_SPECIALIZE) $(OBJS_OTHERS): \
308
+  $(SOURCE_DIR)/include/softfloat_types.h $(SOURCE_DIR)/include/internals.h \
309
+  $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/specialize.h \
310
+  $(SOURCE_DIR)/include/softfloat.h
311
+
312
+$(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c
313
+	$(COMPILE_C) $(SOURCE_DIR)/$*.c
314
+
315
+$(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c
316
+	$(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c
317
+
318
+softfloat$(LIB): $(OBJS_ALL)
319
+	$(DELETE) $@
320
+	$(MAKELIB) $^
321
+
322
+.PHONY: clean
323
+clean:
324
+	$(DELETE) $(OBJS_ALL) softfloat$(LIB)
325
+

+ 53
- 0
softfloat/build/Win32-MinGW/platform.h View File

@@ -0,0 +1,53 @@
1
+
2
+/*============================================================================
3
+
4
+This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
5
+Package, Release 3e, by John R. Hauser.
6
+
7
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
8
+University of California.  All rights reserved.
9
+
10
+Redistribution and use in source and binary forms, with or without
11
+modification, are permitted provided that the following conditions are met:
12
+
13
+ 1. Redistributions of source code must retain the above copyright notice,
14
+    this list of conditions, and the following disclaimer.
15
+
16
+ 2. Redistributions in binary form must reproduce the above copyright notice,
17
+    this list of conditions, and the following disclaimer in the documentation
18
+    and/or other materials provided with the distribution.
19
+
20
+ 3. Neither the name of the University nor the names of its contributors may
21
+    be used to endorse or promote products derived from this software without
22
+    specific prior written permission.
23
+
24
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
25
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
27
+DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
28
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+
35
+=============================================================================*/
36
+
37
+/*----------------------------------------------------------------------------
38
+*----------------------------------------------------------------------------*/
39
+#define LITTLEENDIAN 1
40
+
41
+/*----------------------------------------------------------------------------
42
+*----------------------------------------------------------------------------*/
43
+#ifdef __GNUC_STDC_INLINE__
44
+#define INLINE inline
45
+#else
46
+#define INLINE extern inline
47
+#endif
48
+
49
+/*----------------------------------------------------------------------------
50
+*----------------------------------------------------------------------------*/
51
+#define SOFTFLOAT_BUILTIN_CLZ 1
52
+#include "opts-GCC.h"
53
+

+ 325
- 0
softfloat/build/Win32-SSE2-MinGW/Makefile View File

@@ -0,0 +1,325 @@
1
+
2
+#=============================================================================
3
+#
4
+# This Makefile is part of the SoftFloat IEEE Floating-Point Arithmetic
5
+# Package, Release 3e, by John R. Hauser.
6
+#
7
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
8
+# University of California.  All rights reserved.
9
+#
10
+# Redistribution and use in source and binary forms, with or without
11
+# modification, are permitted provided that the following conditions are met:
12
+#
13
+#  1. Redistributions of source code must retain the above copyright notice,
14
+#     this list of conditions, and the following disclaimer.
15
+#
16
+#  2. Redistributions in binary form must reproduce the above copyright
17
+#     notice, this list of conditions, and the following disclaimer in the
18
+#     documentation and/or other materials provided with the distribution.
19
+#
20
+#  3. Neither the name of the University nor the names of its contributors
21
+#     may be used to endorse or promote products derived from this software
22
+#     without specific prior written permission.
23
+#
24
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
25
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
27
+# DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
28
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+#
35
+#=============================================================================
36
+
37
+SOURCE_DIR ?= ../../source
38
+SPECIALIZE_TYPE ?= 8086-SSE
39
+
40
+SOFTFLOAT_OPTS ?= \
41
+  -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \
42
+  -DSOFTFLOAT_FAST_DIV64TO32
43
+
44
+DELETE = rm -f
45
+C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include
46
+COMPILE_C = \
47
+  gcc -c -Werror-implicit-function-declaration $(SOFTFLOAT_OPTS) \
48
+    $(C_INCLUDES) -O2 -o $@
49
+MAKELIB = ar crs $@
50
+
51
+OBJ = .o
52
+LIB = .a
53
+
54
+OTHER_HEADERS =
55
+
56
+.PHONY: all
57
+all: softfloat$(LIB)
58
+
59
+OBJS_PRIMITIVES = \
60
+  s_compare96M$(OBJ) \
61
+  s_compare128M$(OBJ) \
62
+  s_shortShiftLeft64To96M$(OBJ) \
63
+  s_shortShiftLeftM$(OBJ) \
64
+  s_shiftLeftM$(OBJ) \
65
+  s_shortShiftRightM$(OBJ) \
66
+  s_shortShiftRightJam64$(OBJ) \
67
+  s_shortShiftRightJamM$(OBJ) \
68
+  s_shiftRightJam32$(OBJ) \
69
+  s_shiftRightJam64$(OBJ) \
70
+  s_shiftRightJamM$(OBJ) \
71
+  s_shiftRightM$(OBJ) \
72
+  s_countLeadingZeros8$(OBJ) \
73
+  s_countLeadingZeros16$(OBJ) \
74
+  s_countLeadingZeros32$(OBJ) \
75
+  s_countLeadingZeros64$(OBJ) \
76
+  s_addM$(OBJ) \
77
+  s_addCarryM$(OBJ) \
78
+  s_addComplCarryM$(OBJ) \
79
+  s_negXM$(OBJ) \
80
+  s_sub1XM$(OBJ) \
81
+  s_subM$(OBJ) \
82
+  s_mul64To128M$(OBJ) \
83
+  s_mul128MTo256M$(OBJ) \
84
+  s_approxRecip_1Ks$(OBJ) \
85
+  s_approxRecip32_1$(OBJ) \
86
+  s_approxRecipSqrt_1Ks$(OBJ) \
87
+  s_approxRecipSqrt32_1$(OBJ) \
88
+  s_remStepMBy32$(OBJ) \
89
+
90
+OBJS_SPECIALIZE = \
91
+  softfloat_raiseFlags$(OBJ) \
92
+  s_f16UIToCommonNaN$(OBJ) \
93
+  s_commonNaNToF16UI$(OBJ) \
94
+  s_propagateNaNF16UI$(OBJ) \
95
+  s_f32UIToCommonNaN$(OBJ) \
96
+  s_commonNaNToF32UI$(OBJ) \
97
+  s_propagateNaNF32UI$(OBJ) \
98
+  s_f64UIToCommonNaN$(OBJ) \
99
+  s_commonNaNToF64UI$(OBJ) \
100
+  s_propagateNaNF64UI$(OBJ) \
101
+  extF80M_isSignalingNaN$(OBJ) \
102
+  s_extF80MToCommonNaN$(OBJ) \
103
+  s_commonNaNToExtF80M$(OBJ) \
104
+  s_propagateNaNExtF80M$(OBJ) \
105
+  f128M_isSignalingNaN$(OBJ) \
106
+  s_f128MToCommonNaN$(OBJ) \
107
+  s_commonNaNToF128M$(OBJ) \
108
+  s_propagateNaNF128M$(OBJ) \
109
+
110
+OBJS_OTHERS = \
111
+  s_roundToUI32$(OBJ) \
112
+  s_roundMToUI64$(OBJ) \
113
+  s_roundToI32$(OBJ) \
114
+  s_roundMToI64$(OBJ) \
115
+  s_normSubnormalF16Sig$(OBJ) \
116
+  s_roundPackToF16$(OBJ) \
117 <