summaryrefslogtreecommitdiffstats
path: root/src/libs/softfloat-3e
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/libs/softfloat-3e/COPYING.txt37
-rw-r--r--src/libs/softfloat-3e/Makefile.kmk408
-rw-r--r--src/libs/softfloat-3e/README.html49
-rw-r--r--src/libs/softfloat-3e/README.txt21
-rw-r--r--src/libs/softfloat-3e/TestFloat-3e-patch.diff311
-rw-r--r--src/libs/softfloat-3e/build/Linux-386-GCC/Makefile325
-rw-r--r--src/libs/softfloat-3e/build/Linux-386-GCC/platform.h53
-rw-r--r--src/libs/softfloat-3e/build/Linux-386-SSE2-GCC/Makefile325
-rw-r--r--src/libs/softfloat-3e/build/Linux-386-SSE2-GCC/platform.h53
-rw-r--r--src/libs/softfloat-3e/build/Linux-ARM-VFPv2-GCC/Makefile323
-rw-r--r--src/libs/softfloat-3e/build/Linux-ARM-VFPv2-GCC/platform.h53
-rw-r--r--src/libs/softfloat-3e/build/Linux-x86_64-GCC/Makefile390
-rw-r--r--src/libs/softfloat-3e/build/Linux-x86_64-GCC/platform.h57
-rw-r--r--src/libs/softfloat-3e/build/Win32-MinGW/Makefile325
-rw-r--r--src/libs/softfloat-3e/build/Win32-MinGW/platform.h53
-rw-r--r--src/libs/softfloat-3e/build/Win32-SSE2-MinGW/Makefile325
-rw-r--r--src/libs/softfloat-3e/build/Win32-SSE2-MinGW/platform.h53
-rw-r--r--src/libs/softfloat-3e/build/Win64-MinGW-w64/Makefile390
-rw-r--r--src/libs/softfloat-3e/build/Win64-MinGW-w64/platform.h54
-rw-r--r--src/libs/softfloat-3e/build/template-FAST_INT64/Makefile391
-rw-r--r--src/libs/softfloat-3e/build/template-FAST_INT64/platform.h50
-rw-r--r--src/libs/softfloat-3e/build/template-not-FAST_INT64/Makefile325
-rw-r--r--src/libs/softfloat-3e/build/template-not-FAST_INT64/platform.h50
-rw-r--r--src/libs/softfloat-3e/build/vbox/platform.h107
-rw-r--r--src/libs/softfloat-3e/doc/SoftFloat-history.html258
-rw-r--r--src/libs/softfloat-3e/doc/SoftFloat-source.html686
-rw-r--r--src/libs/softfloat-3e/doc/SoftFloat.html1527
-rw-r--r--src/libs/softfloat-3e/source/8086-SSE/extF80M_isSignalingNaN.c57
-rw-r--r--src/libs/softfloat-3e/source/8086-SSE/f128M_isSignalingNaN.c60
-rw-r--r--src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToExtF80M.c56
-rw-r--r--src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToExtF80UI.c56
-rw-r--r--src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToF128M.c56
-rw-r--r--src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToF128UI.c55
-rw-r--r--src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToF16UI.c51
-rw-r--r--src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToF32UI.c51
-rw-r--r--src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToF64UI.c53
-rw-r--r--src/libs/softfloat-3e/source/8086-SSE/s_extF80MToCommonNaN.c62
-rw-r--r--src/libs/softfloat-3e/source/8086-SSE/s_extF80UIToCommonNaN.c62
-rw-r--r--src/libs/softfloat-3e/source/8086-SSE/s_f128MToCommonNaN.c62
-rw-r--r--src/libs/softfloat-3e/source/8086-SSE/s_f128UIToCommonNaN.c65
-rw-r--r--src/libs/softfloat-3e/source/8086-SSE/s_f16UIToCommonNaN.c59
-rw-r--r--src/libs/softfloat-3e/source/8086-SSE/s_f32UIToCommonNaN.c59
-rw-r--r--src/libs/softfloat-3e/source/8086-SSE/s_f64UIToCommonNaN.c59
-rw-r--r--src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNExtF80M.c108
-rw-r--r--src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNExtF80UI.c107
-rw-r--r--src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNF128M.c76
-rw-r--r--src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNF128UI.c82
-rw-r--r--src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNF16UI.c63
-rw-r--r--src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNF32UI.c63
-rw-r--r--src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNF64UI.c63
-rw-r--r--src/libs/softfloat-3e/source/8086-SSE/softfloat_raiseFlags.c56
-rw-r--r--src/libs/softfloat-3e/source/8086-SSE/specialize.h379
-rw-r--r--src/libs/softfloat-3e/source/8086/Makefile.kup0
-rw-r--r--src/libs/softfloat-3e/source/8086/extF80M_isSignalingNaN.c57
-rw-r--r--src/libs/softfloat-3e/source/8086/f128M_isSignalingNaN.c60
-rw-r--r--src/libs/softfloat-3e/source/8086/s_commonNaNToExtF80M.c56
-rw-r--r--src/libs/softfloat-3e/source/8086/s_commonNaNToExtF80UI.c56
-rw-r--r--src/libs/softfloat-3e/source/8086/s_commonNaNToF128M.c56
-rw-r--r--src/libs/softfloat-3e/source/8086/s_commonNaNToF128UI.c55
-rw-r--r--src/libs/softfloat-3e/source/8086/s_commonNaNToF16UI.c51
-rw-r--r--src/libs/softfloat-3e/source/8086/s_commonNaNToF32UI.c51
-rw-r--r--src/libs/softfloat-3e/source/8086/s_commonNaNToF64UI.c53
-rw-r--r--src/libs/softfloat-3e/source/8086/s_extF80MToCommonNaN.c62
-rw-r--r--src/libs/softfloat-3e/source/8086/s_extF80UIToCommonNaN.c62
-rw-r--r--src/libs/softfloat-3e/source/8086/s_f128MToCommonNaN.c62
-rw-r--r--src/libs/softfloat-3e/source/8086/s_f128UIToCommonNaN.c65
-rw-r--r--src/libs/softfloat-3e/source/8086/s_f16UIToCommonNaN.c59
-rw-r--r--src/libs/softfloat-3e/source/8086/s_f32UIToCommonNaN.c59
-rw-r--r--src/libs/softfloat-3e/source/8086/s_f64UIToCommonNaN.c59
-rw-r--r--src/libs/softfloat-3e/source/8086/s_propagateNaNExtF80M.c108
-rw-r--r--src/libs/softfloat-3e/source/8086/s_propagateNaNExtF80UI.c107
-rw-r--r--src/libs/softfloat-3e/source/8086/s_propagateNaNF128M.c108
-rw-r--r--src/libs/softfloat-3e/source/8086/s_propagateNaNF128UI.c106
-rw-r--r--src/libs/softfloat-3e/source/8086/s_propagateNaNF16UI.c84
-rw-r--r--src/libs/softfloat-3e/source/8086/s_propagateNaNF32UI.c84
-rw-r--r--src/libs/softfloat-3e/source/8086/s_propagateNaNF64UI.c84
-rw-r--r--src/libs/softfloat-3e/source/8086/softfloat_raiseFlags.c56
-rw-r--r--src/libs/softfloat-3e/source/8086/specialize.h379
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/extF80M_isSignalingNaN.c57
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/f128M_isSignalingNaN.c60
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToExtF80M.c57
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToExtF80UI.c57
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToF128M.c60
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToF128UI.c56
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToF16UI.c5
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToF32UI.c5
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToF64UI.c5
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_extF80MToCommonNaN.c5
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_extF80UIToCommonNaN.c5
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_f128MToCommonNaN.c5
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_f128UIToCommonNaN.c5
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_f16UIToCommonNaN.c5
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_f32UIToCommonNaN.c5
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_f64UIToCommonNaN.c5
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNExtF80M.c75
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNExtF80UI.c74
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNF128M.c68
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNF128UI.c74
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNF16UI.c58
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNF32UI.c58
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNF64UI.c58
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/softfloat_raiseFlags.c56
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/specialize.h438
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2/extF80M_isSignalingNaN.c57
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2/f128M_isSignalingNaN.c60
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToExtF80M.c56
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToExtF80UI.c56
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToF128M.c56
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToF128UI.c55
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToF16UI.c51
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToF32UI.c51
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToF64UI.c53
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2/s_extF80MToCommonNaN.c62
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2/s_extF80UIToCommonNaN.c62
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2/s_f128MToCommonNaN.c62
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2/s_f128UIToCommonNaN.c65
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2/s_f16UIToCommonNaN.c59
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2/s_f32UIToCommonNaN.c59
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2/s_f64UIToCommonNaN.c59
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNExtF80M.c87
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNExtF80UI.c84
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNF128M.c77
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNF128UI.c84
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNF16UI.c63
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNF32UI.c63
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNF64UI.c63
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2/softfloat_raiseFlags.c56
-rw-r--r--src/libs/softfloat-3e/source/ARM-VFPv2/specialize.h379
-rw-r--r--src/libs/softfloat-3e/source/Makefile.kup0
-rw-r--r--src/libs/softfloat-3e/source/extF80M_add.c101
-rw-r--r--src/libs/softfloat-3e/source/extF80M_div.c194
-rw-r--r--src/libs/softfloat-3e/source/extF80M_eq.c98
-rw-r--r--src/libs/softfloat-3e/source/extF80M_eq_signaling.c92
-rw-r--r--src/libs/softfloat-3e/source/extF80M_le.c106
-rw-r--r--src/libs/softfloat-3e/source/extF80M_le_quiet.c112
-rw-r--r--src/libs/softfloat-3e/source/extF80M_lt.c106
-rw-r--r--src/libs/softfloat-3e/source/extF80M_lt_quiet.c112
-rw-r--r--src/libs/softfloat-3e/source/extF80M_mul.c139
-rw-r--r--src/libs/softfloat-3e/source/extF80M_rem.c204
-rw-r--r--src/libs/softfloat-3e/source/extF80M_roundToInt.c178
-rw-r--r--src/libs/softfloat-3e/source/extF80M_sqrt.c180
-rw-r--r--src/libs/softfloat-3e/source/extF80M_sub.c101
-rw-r--r--src/libs/softfloat-3e/source/extF80M_to_f128M.c125
-rw-r--r--src/libs/softfloat-3e/source/extF80M_to_f16.c112
-rw-r--r--src/libs/softfloat-3e/source/extF80M_to_f32.c112
-rw-r--r--src/libs/softfloat-3e/source/extF80M_to_f64.c112
-rw-r--r--src/libs/softfloat-3e/source/extF80M_to_i32.c100
-rw-r--r--src/libs/softfloat-3e/source/extF80M_to_i32_r_minMag.c120
-rw-r--r--src/libs/softfloat-3e/source/extF80M_to_i64.c97
-rw-r--r--src/libs/softfloat-3e/source/extF80M_to_i64_r_minMag.c115
-rw-r--r--src/libs/softfloat-3e/source/extF80M_to_ui32.c101
-rw-r--r--src/libs/softfloat-3e/source/extF80M_to_ui32_r_minMag.c111
-rw-r--r--src/libs/softfloat-3e/source/extF80M_to_ui64.c97
-rw-r--r--src/libs/softfloat-3e/source/extF80M_to_ui64_r_minMag.c108
-rw-r--r--src/libs/softfloat-3e/source/extF80_add.c80
-rw-r--r--src/libs/softfloat-3e/source/extF80_div.c203
-rw-r--r--src/libs/softfloat-3e/source/extF80_eq.c73
-rw-r--r--src/libs/softfloat-3e/source/extF80_eq_signaling.c67
-rw-r--r--src/libs/softfloat-3e/source/extF80_isSignalingNaN.c51
-rw-r--r--src/libs/softfloat-3e/source/extF80_le.c73
-rw-r--r--src/libs/softfloat-3e/source/extF80_le_quiet.c78
-rw-r--r--src/libs/softfloat-3e/source/extF80_log2.c80
-rw-r--r--src/libs/softfloat-3e/source/extF80_lt.c73
-rw-r--r--src/libs/softfloat-3e/source/extF80_lt_quiet.c78
-rw-r--r--src/libs/softfloat-3e/source/extF80_mul.c158
-rw-r--r--src/libs/softfloat-3e/source/extF80_partialRem.c292
-rw-r--r--src/libs/softfloat-3e/source/extF80_rem.c225
-rw-r--r--src/libs/softfloat-3e/source/extF80_roundToInt.c158
-rw-r--r--src/libs/softfloat-3e/source/extF80_scale_extF80.c191
-rw-r--r--src/libs/softfloat-3e/source/extF80_sincos.c323
-rw-r--r--src/libs/softfloat-3e/source/extF80_sincos.h736
-rw-r--r--src/libs/softfloat-3e/source/extF80_sqrt.c176
-rw-r--r--src/libs/softfloat-3e/source/extF80_sub.c80
-rw-r--r--src/libs/softfloat-3e/source/extF80_tan.c76
-rw-r--r--src/libs/softfloat-3e/source/extF80_to_f128.c75
-rw-r--r--src/libs/softfloat-3e/source/extF80_to_f16.c96
-rw-r--r--src/libs/softfloat-3e/source/extF80_to_f32.c96
-rw-r--r--src/libs/softfloat-3e/source/extF80_to_f64.c96
-rw-r--r--src/libs/softfloat-3e/source/extF80_to_i32.c83
-rw-r--r--src/libs/softfloat-3e/source/extF80_to_i32_r_minMag.c97
-rw-r--r--src/libs/softfloat-3e/source/extF80_to_i64.c89
-rw-r--r--src/libs/softfloat-3e/source/extF80_to_i64_r_minMag.c94
-rw-r--r--src/libs/softfloat-3e/source/extF80_to_ui32.c83
-rw-r--r--src/libs/softfloat-3e/source/extF80_to_ui32_r_minMag.c88
-rw-r--r--src/libs/softfloat-3e/source/extF80_to_ui64.c84
-rw-r--r--src/libs/softfloat-3e/source/extF80_to_ui64_r_minMag.c88
-rw-r--r--src/libs/softfloat-3e/source/f128M_add.c98
-rw-r--r--src/libs/softfloat-3e/source/f128M_div.c187
-rw-r--r--src/libs/softfloat-3e/source/f128M_eq.c100
-rw-r--r--src/libs/softfloat-3e/source/f128M_eq_signaling.c92
-rw-r--r--src/libs/softfloat-3e/source/f128M_le.c93
-rw-r--r--src/libs/softfloat-3e/source/f128M_le_quiet.c96
-rw-r--r--src/libs/softfloat-3e/source/f128M_lt.c93
-rw-r--r--src/libs/softfloat-3e/source/f128M_lt_quiet.c96
-rw-r--r--src/libs/softfloat-3e/source/f128M_mul.c158
-rw-r--r--src/libs/softfloat-3e/source/f128M_mulAdd.c95
-rw-r--r--src/libs/softfloat-3e/source/f128M_rem.c182
-rw-r--r--src/libs/softfloat-3e/source/f128M_roundToInt.c225
-rw-r--r--src/libs/softfloat-3e/source/f128M_sqrt.c228
-rw-r--r--src/libs/softfloat-3e/source/f128M_sub.c98
-rw-r--r--src/libs/softfloat-3e/source/f128M_to_extF80M.c101
-rw-r--r--src/libs/softfloat-3e/source/f128M_to_f16.c113
-rw-r--r--src/libs/softfloat-3e/source/f128M_to_f32.c109
-rw-r--r--src/libs/softfloat-3e/source/f128M_to_f64.c112
-rw-r--r--src/libs/softfloat-3e/source/f128M_to_i32.c98
-rw-r--r--src/libs/softfloat-3e/source/f128M_to_i32_r_minMag.c106
-rw-r--r--src/libs/softfloat-3e/source/f128M_to_i64.c102
-rw-r--r--src/libs/softfloat-3e/source/f128M_to_i64_r_minMag.c124
-rw-r--r--src/libs/softfloat-3e/source/f128M_to_ui32.c98
-rw-r--r--src/libs/softfloat-3e/source/f128M_to_ui32_r_minMag.c102
-rw-r--r--src/libs/softfloat-3e/source/f128M_to_ui64.c102
-rw-r--r--src/libs/softfloat-3e/source/f128M_to_ui64_r_minMag.c114
-rw-r--r--src/libs/softfloat-3e/source/f128_add.c78
-rw-r--r--src/libs/softfloat-3e/source/f128_div.c199
-rw-r--r--src/libs/softfloat-3e/source/f128_eq.c73
-rw-r--r--src/libs/softfloat-3e/source/f128_eq_signaling.c67
-rw-r--r--src/libs/softfloat-3e/source/f128_isSignalingNaN.c51
-rw-r--r--src/libs/softfloat-3e/source/f128_le.c72
-rw-r--r--src/libs/softfloat-3e/source/f128_le_quiet.c78
-rw-r--r--src/libs/softfloat-3e/source/f128_lt.c72
-rw-r--r--src/libs/softfloat-3e/source/f128_lt_quiet.c78
-rw-r--r--src/libs/softfloat-3e/source/f128_mul.c163
-rw-r--r--src/libs/softfloat-3e/source/f128_mulAdd.c63
-rw-r--r--src/libs/softfloat-3e/source/f128_rem.c190
-rw-r--r--src/libs/softfloat-3e/source/f128_roundToInt.c174
-rw-r--r--src/libs/softfloat-3e/source/f128_sqrt.c201
-rw-r--r--src/libs/softfloat-3e/source/f128_sub.c78
-rw-r--r--src/libs/softfloat-3e/source/f128_to_extF80.c109
-rw-r--r--src/libs/softfloat-3e/source/f128_to_f16.c95
-rw-r--r--src/libs/softfloat-3e/source/f128_to_f32.c95
-rw-r--r--src/libs/softfloat-3e/source/f128_to_f64.c100
-rw-r--r--src/libs/softfloat-3e/source/f128_to_i32.c85
-rw-r--r--src/libs/softfloat-3e/source/f128_to_i32_r_minMag.c100
-rw-r--r--src/libs/softfloat-3e/source/f128_to_i64.c95
-rw-r--r--src/libs/softfloat-3e/source/f128_to_i64_r_minMag.c113
-rw-r--r--src/libs/softfloat-3e/source/f128_to_ui32.c86
-rw-r--r--src/libs/softfloat-3e/source/f128_to_ui32_r_minMag.c89
-rw-r--r--src/libs/softfloat-3e/source/f128_to_ui64.c96
-rw-r--r--src/libs/softfloat-3e/source/f128_to_ui64_r_minMag.c105
-rw-r--r--src/libs/softfloat-3e/source/f16_add.c70
-rw-r--r--src/libs/softfloat-3e/source/f16_div.c186
-rw-r--r--src/libs/softfloat-3e/source/f16_eq.c66
-rw-r--r--src/libs/softfloat-3e/source/f16_eq_signaling.c61
-rw-r--r--src/libs/softfloat-3e/source/f16_isSignalingNaN.c51
-rw-r--r--src/libs/softfloat-3e/source/f16_le.c66
-rw-r--r--src/libs/softfloat-3e/source/f16_le_quiet.c71
-rw-r--r--src/libs/softfloat-3e/source/f16_lt.c66
-rw-r--r--src/libs/softfloat-3e/source/f16_lt_quiet.c71
-rw-r--r--src/libs/softfloat-3e/source/f16_mul.c140
-rw-r--r--src/libs/softfloat-3e/source/f16_mulAdd.c60
-rw-r--r--src/libs/softfloat-3e/source/f16_rem.c171
-rw-r--r--src/libs/softfloat-3e/source/f16_roundToInt.c122
-rw-r--r--src/libs/softfloat-3e/source/f16_sqrt.c136
-rw-r--r--src/libs/softfloat-3e/source/f16_sub.c70
-rw-r--r--src/libs/softfloat-3e/source/f16_to_extF80.c101
-rw-r--r--src/libs/softfloat-3e/source/f16_to_extF80M.c111
-rw-r--r--src/libs/softfloat-3e/source/f16_to_f128.c96
-rw-r--r--src/libs/softfloat-3e/source/f16_to_f128M.c111
-rw-r--r--src/libs/softfloat-3e/source/f16_to_f32.c93
-rw-r--r--src/libs/softfloat-3e/source/f16_to_f64.c93
-rw-r--r--src/libs/softfloat-3e/source/f16_to_i32.c87
-rw-r--r--src/libs/softfloat-3e/source/f16_to_i32_r_minMag.c88
-rw-r--r--src/libs/softfloat-3e/source/f16_to_i64.c87
-rw-r--r--src/libs/softfloat-3e/source/f16_to_i64_r_minMag.c88
-rw-r--r--src/libs/softfloat-3e/source/f16_to_ui32.c84
-rw-r--r--src/libs/softfloat-3e/source/f16_to_ui32_r_minMag.c87
-rw-r--r--src/libs/softfloat-3e/source/f16_to_ui64.c96
-rw-r--r--src/libs/softfloat-3e/source/f16_to_ui64_r_minMag.c87
-rw-r--r--src/libs/softfloat-3e/source/f32_add.c70
-rw-r--r--src/libs/softfloat-3e/source/f32_div.c180
-rw-r--r--src/libs/softfloat-3e/source/f32_eq.c66
-rw-r--r--src/libs/softfloat-3e/source/f32_eq_signaling.c61
-rw-r--r--src/libs/softfloat-3e/source/f32_isSignalingNaN.c51
-rw-r--r--src/libs/softfloat-3e/source/f32_le.c66
-rw-r--r--src/libs/softfloat-3e/source/f32_le_quiet.c71
-rw-r--r--src/libs/softfloat-3e/source/f32_lt.c66
-rw-r--r--src/libs/softfloat-3e/source/f32_lt_quiet.c71
-rw-r--r--src/libs/softfloat-3e/source/f32_mul.c137
-rw-r--r--src/libs/softfloat-3e/source/f32_mulAdd.c60
-rw-r--r--src/libs/softfloat-3e/source/f32_rem.c168
-rw-r--r--src/libs/softfloat-3e/source/f32_roundToInt.c122
-rw-r--r--src/libs/softfloat-3e/source/f32_sqrt.c121
-rw-r--r--src/libs/softfloat-3e/source/f32_sub.c70
-rw-r--r--src/libs/softfloat-3e/source/f32_to_extF80.c101
-rw-r--r--src/libs/softfloat-3e/source/f32_to_extF80M.c111
-rw-r--r--src/libs/softfloat-3e/source/f32_to_f128.c96
-rw-r--r--src/libs/softfloat-3e/source/f32_to_f128M.c115
-rw-r--r--src/libs/softfloat-3e/source/f32_to_f16.c88
-rw-r--r--src/libs/softfloat-3e/source/f32_to_f64.c93
-rw-r--r--src/libs/softfloat-3e/source/f32_to_i32.c84
-rw-r--r--src/libs/softfloat-3e/source/f32_to_i32_r_minMag.c89
-rw-r--r--src/libs/softfloat-3e/source/f32_to_i64.c96
-rw-r--r--src/libs/softfloat-3e/source/f32_to_i64_r_minMag.c94
-rw-r--r--src/libs/softfloat-3e/source/f32_to_ui32.c84
-rw-r--r--src/libs/softfloat-3e/source/f32_to_ui32_r_minMag.c88
-rw-r--r--src/libs/softfloat-3e/source/f32_to_ui64.c96
-rw-r--r--src/libs/softfloat-3e/source/f32_to_ui64_r_minMag.c90
-rw-r--r--src/libs/softfloat-3e/source/f64_add.c74
-rw-r--r--src/libs/softfloat-3e/source/f64_div.c172
-rw-r--r--src/libs/softfloat-3e/source/f64_eq.c66
-rw-r--r--src/libs/softfloat-3e/source/f64_eq_signaling.c61
-rw-r--r--src/libs/softfloat-3e/source/f64_isSignalingNaN.c51
-rw-r--r--src/libs/softfloat-3e/source/f64_le.c67
-rw-r--r--src/libs/softfloat-3e/source/f64_le_quiet.c72
-rw-r--r--src/libs/softfloat-3e/source/f64_lt.c67
-rw-r--r--src/libs/softfloat-3e/source/f64_lt_quiet.c72
-rw-r--r--src/libs/softfloat-3e/source/f64_mul.c150
-rw-r--r--src/libs/softfloat-3e/source/f64_mulAdd.c60
-rw-r--r--src/libs/softfloat-3e/source/f64_rem.c189
-rw-r--r--src/libs/softfloat-3e/source/f64_roundToInt.c122
-rw-r--r--src/libs/softfloat-3e/source/f64_sqrt.c133
-rw-r--r--src/libs/softfloat-3e/source/f64_sub.c74
-rw-r--r--src/libs/softfloat-3e/source/f64_to_extF80.c101
-rw-r--r--src/libs/softfloat-3e/source/f64_to_extF80M.c111
-rw-r--r--src/libs/softfloat-3e/source/f64_to_f128.c98
-rw-r--r--src/libs/softfloat-3e/source/f64_to_f128M.c117
-rw-r--r--src/libs/softfloat-3e/source/f64_to_f16.c88
-rw-r--r--src/libs/softfloat-3e/source/f64_to_f32.c88
-rw-r--r--src/libs/softfloat-3e/source/f64_to_i32.c82
-rw-r--r--src/libs/softfloat-3e/source/f64_to_i32_r_minMag.c96
-rw-r--r--src/libs/softfloat-3e/source/f64_to_i64.c103
-rw-r--r--src/libs/softfloat-3e/source/f64_to_i64_r_minMag.c100
-rw-r--r--src/libs/softfloat-3e/source/f64_to_ui32.c82
-rw-r--r--src/libs/softfloat-3e/source/f64_to_ui32_r_minMag.c88
-rw-r--r--src/libs/softfloat-3e/source/f64_to_ui64.c103
-rw-r--r--src/libs/softfloat-3e/source/f64_to_ui64_r_minMag.c93
-rw-r--r--src/libs/softfloat-3e/source/i32_to_extF80.c66
-rw-r--r--src/libs/softfloat-3e/source/i32_to_extF80M.c79
-rw-r--r--src/libs/softfloat-3e/source/i32_to_f128.c65
-rw-r--r--src/libs/softfloat-3e/source/i32_to_f128M.c82
-rw-r--r--src/libs/softfloat-3e/source/i32_to_f16.c71
-rw-r--r--src/libs/softfloat-3e/source/i32_to_f32.c58
-rw-r--r--src/libs/softfloat-3e/source/i32_to_f64.c66
-rw-r--r--src/libs/softfloat-3e/source/i64_to_extF80.c66
-rw-r--r--src/libs/softfloat-3e/source/i64_to_extF80M.c79
-rw-r--r--src/libs/softfloat-3e/source/i64_to_f128.c73
-rw-r--r--src/libs/softfloat-3e/source/i64_to_f128M.c93
-rw-r--r--src/libs/softfloat-3e/source/i64_to_f16.c70
-rw-r--r--src/libs/softfloat-3e/source/i64_to_f32.c70
-rw-r--r--src/libs/softfloat-3e/source/i64_to_f64.c58
-rw-r--r--src/libs/softfloat-3e/source/include/internals.h286
-rw-r--r--src/libs/softfloat-3e/source/include/opts-GCC.h117
-rw-r--r--src/libs/softfloat-3e/source/include/primitiveTypes.h85
-rw-r--r--src/libs/softfloat-3e/source/include/primitives.h1160
-rw-r--r--src/libs/softfloat-3e/source/include/softfloat.h415
-rw-r--r--src/libs/softfloat-3e/source/include/softfloat_types.h121
-rw-r--r--src/libs/softfloat-3e/source/s_add128.c57
-rw-r--r--src/libs/softfloat-3e/source/s_add256M.c66
-rw-r--r--src/libs/softfloat-3e/source/s_addCarryM.c70
-rw-r--r--src/libs/softfloat-3e/source/s_addComplCarryM.c70
-rw-r--r--src/libs/softfloat-3e/source/s_addExtF80M.c187
-rw-r--r--src/libs/softfloat-3e/source/s_addF128M.c212
-rw-r--r--src/libs/softfloat-3e/source/s_addM.c70
-rw-r--r--src/libs/softfloat-3e/source/s_addMagsExtF80.c157
-rw-r--r--src/libs/softfloat-3e/source/s_addMagsF128.c155
-rw-r--r--src/libs/softfloat-3e/source/s_addMagsF16.c184
-rw-r--r--src/libs/softfloat-3e/source/s_addMagsF32.c126
-rw-r--r--src/libs/softfloat-3e/source/s_addMagsF64.c128
-rw-r--r--src/libs/softfloat-3e/source/s_approxRecip32_1.c67
-rw-r--r--src/libs/softfloat-3e/source/s_approxRecipSqrt32_1.c75
-rw-r--r--src/libs/softfloat-3e/source/s_approxRecipSqrt_1Ks.c49
-rw-r--r--src/libs/softfloat-3e/source/s_approxRecip_1Ks.c49
-rw-r--r--src/libs/softfloat-3e/source/s_compare128M.c62
-rw-r--r--src/libs/softfloat-3e/source/s_compare96M.c62
-rw-r--r--src/libs/softfloat-3e/source/s_compareNonnormExtF80M.c111
-rw-r--r--src/libs/softfloat-3e/source/s_countLeadingZeros16.c60
-rw-r--r--src/libs/softfloat-3e/source/s_countLeadingZeros32.c64
-rw-r--r--src/libs/softfloat-3e/source/s_countLeadingZeros64.c73
-rw-r--r--src/libs/softfloat-3e/source/s_countLeadingZeros8.c59
-rw-r--r--src/libs/softfloat-3e/source/s_eq128.c53
-rw-r--r--src/libs/softfloat-3e/source/s_invalidExtF80M.c49
-rw-r--r--src/libs/softfloat-3e/source/s_invalidF128M.c53
-rw-r--r--src/libs/softfloat-3e/source/s_isNaNF128M.c57
-rw-r--r--src/libs/softfloat-3e/source/s_le128.c53
-rw-r--r--src/libs/softfloat-3e/source/s_lt128.c53
-rw-r--r--src/libs/softfloat-3e/source/s_mul128By32.c58
-rw-r--r--src/libs/softfloat-3e/source/s_mul128MTo256M.c100
-rw-r--r--src/libs/softfloat-3e/source/s_mul128To256M.c71
-rw-r--r--src/libs/softfloat-3e/source/s_mul64ByShifted32To128.c56
-rw-r--r--src/libs/softfloat-3e/source/s_mul64To128.c66
-rw-r--r--src/libs/softfloat-3e/source/s_mul64To128M.c68
-rw-r--r--src/libs/softfloat-3e/source/s_mulAddF128.c351
-rw-r--r--src/libs/softfloat-3e/source/s_mulAddF128M.c383
-rw-r--r--src/libs/softfloat-3e/source/s_mulAddF16.c226
-rw-r--r--src/libs/softfloat-3e/source/s_mulAddF32.c224
-rw-r--r--src/libs/softfloat-3e/source/s_mulAddF64.c496
-rw-r--r--src/libs/softfloat-3e/source/s_negXM.c63
-rw-r--r--src/libs/softfloat-3e/source/s_normExtF80SigM.c52
-rw-r--r--src/libs/softfloat-3e/source/s_normRoundPackMToExtF80M.c79
-rw-r--r--src/libs/softfloat-3e/source/s_normRoundPackMToF128M.c73
-rw-r--r--src/libs/softfloat-3e/source/s_normRoundPackToExtF80.c72
-rw-r--r--src/libs/softfloat-3e/source/s_normRoundPackToF128.c81
-rw-r--r--src/libs/softfloat-3e/source/s_normRoundPackToF16.c58
-rw-r--r--src/libs/softfloat-3e/source/s_normRoundPackToF32.c58
-rw-r--r--src/libs/softfloat-3e/source/s_normRoundPackToF64.c58
-rw-r--r--src/libs/softfloat-3e/source/s_normSubnormalExtF80Sig.c52
-rw-r--r--src/libs/softfloat-3e/source/s_normSubnormalF128Sig.c65
-rw-r--r--src/libs/softfloat-3e/source/s_normSubnormalF128SigM.c61
-rw-r--r--src/libs/softfloat-3e/source/s_normSubnormalF16Sig.c52
-rw-r--r--src/libs/softfloat-3e/source/s_normSubnormalF32Sig.c52
-rw-r--r--src/libs/softfloat-3e/source/s_normSubnormalF64Sig.c52
-rw-r--r--src/libs/softfloat-3e/source/s_remStepMBy32.c86
-rw-r--r--src/libs/softfloat-3e/source/s_roundMToI64.c102
-rw-r--r--src/libs/softfloat-3e/source/s_roundMToUI64.c98
-rw-r--r--src/libs/softfloat-3e/source/s_roundPackMToExtF80M.c258
-rw-r--r--src/libs/softfloat-3e/source/s_roundPackMToF128M.c179
-rw-r--r--src/libs/softfloat-3e/source/s_roundPackToExtF80.c370
-rw-r--r--src/libs/softfloat-3e/source/s_roundPackToF128.c173
-rw-r--r--src/libs/softfloat-3e/source/s_roundPackToF16.c114
-rw-r--r--src/libs/softfloat-3e/source/s_roundPackToF32.c114
-rw-r--r--src/libs/softfloat-3e/source/s_roundPackToF64.c118
-rw-r--r--src/libs/softfloat-3e/source/s_roundToI32.c98
-rw-r--r--src/libs/softfloat-3e/source/s_roundToI64.c102
-rw-r--r--src/libs/softfloat-3e/source/s_roundToUI32.c93
-rw-r--r--src/libs/softfloat-3e/source/s_roundToUI64.c98
-rw-r--r--src/libs/softfloat-3e/source/s_shiftLeftM.c91
-rw-r--r--src/libs/softfloat-3e/source/s_shiftNormSigF128M.c78
-rw-r--r--src/libs/softfloat-3e/source/s_shiftRightJam128.c71
-rw-r--r--src/libs/softfloat-3e/source/s_shiftRightJam128Extra.c79
-rw-r--r--src/libs/softfloat-3e/source/s_shiftRightJam256M.c127
-rw-r--r--src/libs/softfloat-3e/source/s_shiftRightJam32.c53
-rw-r--r--src/libs/softfloat-3e/source/s_shiftRightJam64.c53
-rw-r--r--src/libs/softfloat-3e/source/s_shiftRightJam64Extra.c64
-rw-r--r--src/libs/softfloat-3e/source/s_shiftRightJamM.c101
-rw-r--r--src/libs/softfloat-3e/source/s_shiftRightM.c91
-rw-r--r--src/libs/softfloat-3e/source/s_shortShiftLeft128.c57
-rw-r--r--src/libs/softfloat-3e/source/s_shortShiftLeft64To96M.c56
-rw-r--r--src/libs/softfloat-3e/source/s_shortShiftLeftM.c70
-rw-r--r--src/libs/softfloat-3e/source/s_shortShiftRight128.c57
-rw-r--r--src/libs/softfloat-3e/source/s_shortShiftRightExtendM.c73
-rw-r--r--src/libs/softfloat-3e/source/s_shortShiftRightJam128.c62
-rw-r--r--src/libs/softfloat-3e/source/s_shortShiftRightJam128Extra.c61
-rw-r--r--src/libs/softfloat-3e/source/s_shortShiftRightJam64.c52
-rw-r--r--src/libs/softfloat-3e/source/s_shortShiftRightJam64Extra.c58
-rw-r--r--src/libs/softfloat-3e/source/s_shortShiftRightJamM.c72
-rw-r--r--src/libs/softfloat-3e/source/s_shortShiftRightM.c70
-rw-r--r--src/libs/softfloat-3e/source/s_sub128.c57
-rw-r--r--src/libs/softfloat-3e/source/s_sub1XM.c60
-rw-r--r--src/libs/softfloat-3e/source/s_sub256M.c66
-rw-r--r--src/libs/softfloat-3e/source/s_subM.c70
-rw-r--r--src/libs/softfloat-3e/source/s_subMagsExtF80.c159
-rw-r--r--src/libs/softfloat-3e/source/s_subMagsF128.c140
-rw-r--r--src/libs/softfloat-3e/source/s_subMagsF16.c187
-rw-r--r--src/libs/softfloat-3e/source/s_subMagsF32.c143
-rw-r--r--src/libs/softfloat-3e/source/s_subMagsF64.c141
-rw-r--r--src/libs/softfloat-3e/source/s_tryPropagateNaNExtF80M.c65
-rw-r--r--src/libs/softfloat-3e/source/s_tryPropagateNaNF128M.c55
-rw-r--r--src/libs/softfloat-3e/source/softfloat_state.c53
-rw-r--r--src/libs/softfloat-3e/source/ui32_to_extF80.c60
-rw-r--r--src/libs/softfloat-3e/source/ui32_to_extF80M.c75
-rw-r--r--src/libs/softfloat-3e/source/ui32_to_f128.c61
-rw-r--r--src/libs/softfloat-3e/source/ui32_to_f128M.c77
-rw-r--r--src/libs/softfloat-3e/source/ui32_to_f16.c65
-rw-r--r--src/libs/softfloat-3e/source/ui32_to_f32.c57
-rw-r--r--src/libs/softfloat-3e/source/ui32_to_f64.c60
-rw-r--r--src/libs/softfloat-3e/source/ui64_to_extF80.c60
-rw-r--r--src/libs/softfloat-3e/source/ui64_to_extF80M.c75
-rw-r--r--src/libs/softfloat-3e/source/ui64_to_f128.c69
-rw-r--r--src/libs/softfloat-3e/source/ui64_to_f128M.c87
-rw-r--r--src/libs/softfloat-3e/source/ui64_to_f16.c64
-rw-r--r--src/libs/softfloat-3e/source/ui64_to_f32.c64
-rw-r--r--src/libs/softfloat-3e/source/ui64_to_f64.c59
-rw-r--r--src/libs/softfloat-3e/testfloat/COPYING.txt37
-rw-r--r--src/libs/softfloat-3e/testfloat/Makefile.kmk271
-rw-r--r--src/libs/softfloat-3e/testfloat/README.html82
-rw-r--r--src/libs/softfloat-3e/testfloat/README.txt26
-rw-r--r--src/libs/softfloat-3e/testfloat/build/Linux-386-GCC/Makefile355
-rw-r--r--src/libs/softfloat-3e/testfloat/build/Linux-386-GCC/platform.h49
-rw-r--r--src/libs/softfloat-3e/testfloat/build/Linux-386-SSE2-GCC/Makefile355
-rw-r--r--src/libs/softfloat-3e/testfloat/build/Linux-386-SSE2-GCC/platform.h49
-rw-r--r--src/libs/softfloat-3e/testfloat/build/Linux-ARM-VFPv2-GCC/Makefile353
-rw-r--r--src/libs/softfloat-3e/testfloat/build/Linux-ARM-VFPv2-GCC/platform.h49
-rw-r--r--src/libs/softfloat-3e/testfloat/build/Linux-x86_64-GCC/Makefile355
-rw-r--r--src/libs/softfloat-3e/testfloat/build/Linux-x86_64-GCC/platform.h49
-rw-r--r--src/libs/softfloat-3e/testfloat/build/Win32-MinGW/Makefile355
-rw-r--r--src/libs/softfloat-3e/testfloat/build/Win32-MinGW/platform.h49
-rw-r--r--src/libs/softfloat-3e/testfloat/build/Win32-SSE2-MinGW/Makefile355
-rw-r--r--src/libs/softfloat-3e/testfloat/build/Win32-SSE2-MinGW/platform.h49
-rw-r--r--src/libs/softfloat-3e/testfloat/build/Win64-MinGW-w64/Makefile355
-rw-r--r--src/libs/softfloat-3e/testfloat/build/Win64-MinGW-w64/platform.h49
-rw-r--r--src/libs/softfloat-3e/testfloat/build/template/Makefile353
-rw-r--r--src/libs/softfloat-3e/testfloat/build/template/platform.h51
-rw-r--r--src/libs/softfloat-3e/testfloat/doc/TestFloat-general.html1148
-rw-r--r--src/libs/softfloat-3e/testfloat/doc/TestFloat-history.html272
-rw-r--r--src/libs/softfloat-3e/testfloat/doc/TestFloat-source.html639
-rw-r--r--src/libs/softfloat-3e/testfloat/doc/testfloat.html286
-rw-r--r--src/libs/softfloat-3e/testfloat/doc/testfloat_gen.html367
-rw-r--r--src/libs/softfloat-3e/testfloat/doc/testfloat_ver.html270
-rw-r--r--src/libs/softfloat-3e/testfloat/doc/testsoftfloat.html236
-rw-r--r--src/libs/softfloat-3e/testfloat/doc/timesoftfloat.html196
-rw-r--r--src/libs/softfloat-3e/testfloat/source/fail.c59
-rw-r--r--src/libs/softfloat-3e/testfloat/source/fail.h41
-rw-r--r--src/libs/softfloat-3e/testfloat/source/functionInfos.c290
-rw-r--r--src/libs/softfloat-3e/testfloat/source/functions.h324
-rw-r--r--src/libs/softfloat-3e/testfloat/source/functions_common.c60
-rw-r--r--src/libs/softfloat-3e/testfloat/source/genCases.h114
-rw-r--r--src/libs/softfloat-3e/testfloat/source/genCases_common.c58
-rw-r--r--src/libs/softfloat-3e/testfloat/source/genCases_extF80.c920
-rw-r--r--src/libs/softfloat-3e/testfloat/source/genCases_f128.c1090
-rw-r--r--src/libs/softfloat-3e/testfloat/source/genCases_f16.c585
-rw-r--r--src/libs/softfloat-3e/testfloat/source/genCases_f32.c664
-rw-r--r--src/libs/softfloat-3e/testfloat/source/genCases_f64.c808
-rw-r--r--src/libs/softfloat-3e/testfloat/source/genCases_i32.c362
-rw-r--r--src/libs/softfloat-3e/testfloat/source/genCases_i64.c554
-rw-r--r--src/libs/softfloat-3e/testfloat/source/genCases_ui32.c323
-rw-r--r--src/libs/softfloat-3e/testfloat/source/genCases_ui64.c483
-rw-r--r--src/libs/softfloat-3e/testfloat/source/genCases_writeTestsTotal.c63
-rw-r--r--src/libs/softfloat-3e/testfloat/source/genLoops.c2890
-rw-r--r--src/libs/softfloat-3e/testfloat/source/genLoops.h354
-rw-r--r--src/libs/softfloat-3e/testfloat/source/random.c138
-rw-r--r--src/libs/softfloat-3e/testfloat/source/random.h49
-rw-r--r--src/libs/softfloat-3e/testfloat/source/readHex.c190
-rw-r--r--src/libs/softfloat-3e/testfloat/source/readHex.h46
-rw-r--r--src/libs/softfloat-3e/testfloat/source/slowfloat.c3749
-rw-r--r--src/libs/softfloat-3e/testfloat/source/slowfloat.h298
-rw-r--r--src/libs/softfloat-3e/testfloat/source/standardFunctionInfos.c471
-rw-r--r--src/libs/softfloat-3e/testfloat/source/subj-C/subjfloat.c856
-rw-r--r--src/libs/softfloat-3e/testfloat/source/subj-C/subjfloat_config.h133
-rw-r--r--src/libs/softfloat-3e/testfloat/source/subjfloat.h516
-rw-r--r--src/libs/softfloat-3e/testfloat/source/subjfloat_functions.c1810
-rw-r--r--src/libs/softfloat-3e/testfloat/source/testLoops.h578
-rw-r--r--src/libs/softfloat-3e/testfloat/source/testLoops_common.c47
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f128.c107
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f16.c107
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f32.c107
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f64.c107
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i32_rx.c105
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i32_x.c104
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i64_rx.c106
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i64_x.c105
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui32_rx.c103
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui32_x.c102
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui64_rx.c103
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui64_x.c102
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f128_z_extF80.c107
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f128_z_f16.c107
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f128_z_f32.c107
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f128_z_f64.c107
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i32_rx.c104
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i32_x.c103
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i64_rx.c105
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i64_x.c104
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui32_rx.c103
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui32_x.c102
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui64_rx.c103
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui64_x.c102
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f16_z_extF80.c106
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f16_z_f128.c106
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f16_z_f32.c104
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f16_z_f64.c104
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i32_rx.c104
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i32_x.c103
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i64_rx.c105
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i64_x.c104
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui32_rx.c103
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui32_x.c102
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui64_rx.c103
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui64_x.c102
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f32_z_extF80.c106
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f32_z_f128.c106
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f32_z_f16.c104
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f32_z_f64.c104
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i32_rx.c100
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i32_x.c99
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i64_rx.c101
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i64_x.c100
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui32_rx.c99
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui32_x.c98
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui64_rx.c99
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui64_x.c98
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f64_z_extF80.c106
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f64_z_f128.c106
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f64_z_f16.c104
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f64_z_f32.c104
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i32_rx.c104
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i32_x.c103
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i64_rx.c105
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i64_x.c104
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui32_rx.c103
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui32_x.c102
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui64_rx.c103
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui64_x.c102
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_i32_z_extF80.c101
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f128.c101
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f16.c99
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f32.c95
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f64.c99
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_i64_z_extF80.c101
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f128.c101
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f16.c99
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f32.c95
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f64.c99
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_extF80.c101
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f128.c101
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f16.c99
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f32.c95
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f64.c99
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_extF80.c101
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f128.c101
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f16.c99
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f32.c95
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f64.c99
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_ab_extF80_z_bool.c104
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_ab_f128_z_bool.c103
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_ab_f16_z_bool.c103
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_ab_f32_z_bool.c99
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_ab_f64_z_bool.c103
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_abcz_f128.c125
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_abcz_f16.c111
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_abcz_f32.c107
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_abcz_f64.c111
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_abz_extF80.c113
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_abz_f128.c108
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_abz_f16.c108
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_abz_f32.c104
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_abz_f64.c108
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_az_extF80.c107
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_az_extF80_rx.c112
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_az_f128.c107
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_az_f128_rx.c110
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_az_f16.c104
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_az_f16_rx.c109
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_az_f32.c100
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_az_f32_rx.c105
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_az_f64.c104
-rw-r--r--src/libs/softfloat-3e/testfloat/source/test_az_f64_rx.c109
-rw-r--r--src/libs/softfloat-3e/testfloat/source/testfloat.c1715
-rw-r--r--src/libs/softfloat-3e/testfloat/source/testfloat_gen.c953
-rw-r--r--src/libs/softfloat-3e/testfloat/source/testfloat_ver.c795
-rw-r--r--src/libs/softfloat-3e/testfloat/source/testsoftfloat.c1127
-rw-r--r--src/libs/softfloat-3e/testfloat/source/timesoftfloat.c5060
-rw-r--r--src/libs/softfloat-3e/testfloat/source/uint128.c99
-rw-r--r--src/libs/softfloat-3e/testfloat/source/uint128.h76
-rw-r--r--src/libs/softfloat-3e/testfloat/source/uint128_inline.c56
-rw-r--r--src/libs/softfloat-3e/testfloat/source/verCases.h193
-rw-r--r--src/libs/softfloat-3e/testfloat/source/verCases_common.c138
-rw-r--r--src/libs/softfloat-3e/testfloat/source/verCases_inline.c138
-rw-r--r--src/libs/softfloat-3e/testfloat/source/verCases_writeFunctionName.c79
-rw-r--r--src/libs/softfloat-3e/testfloat/source/verLoops.c5283
-rw-r--r--src/libs/softfloat-3e/testfloat/source/verLoops.h320
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeCase.h97
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeCase_a_extF80M.c55
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeCase_a_f128M.c55
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeCase_a_f16.c55
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeCase_a_f32.c51
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeCase_a_f64.c55
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeCase_a_ui32.c51
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeCase_a_ui64.c51
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeCase_ab_extF80M.c62
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeCase_ab_f128M.c57
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeCase_ab_f16.c57
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeCase_ab_f32.c53
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeCase_ab_f64.c57
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeCase_abc_f128M.c61
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeCase_abc_f16.c59
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeCase_abc_f32.c55
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeCase_abc_f64.c59
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeCase_z_bool.c59
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeCase_z_extF80M.c67
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeCase_z_f128M.c67
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeCase_z_f16.c67
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeCase_z_f32.c63
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeCase_z_f64.c67
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeCase_z_ui32.c62
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeCase_z_ui64.c62
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeHex.c224
-rw-r--r--src/libs/softfloat-3e/testfloat/source/writeHex.h61
667 files changed, 104636 insertions, 0 deletions
diff --git a/src/libs/softfloat-3e/COPYING.txt b/src/libs/softfloat-3e/COPYING.txt
new file mode 100644
index 00000000..b5690fac
--- /dev/null
+++ b/src/libs/softfloat-3e/COPYING.txt
@@ -0,0 +1,37 @@
+
+License for Berkeley SoftFloat Release 3e
+
+John R. Hauser
+2018 January 20
+
+The following applies to the whole of SoftFloat Release 3e as well as to
+each source file individually.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions, and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
diff --git a/src/libs/softfloat-3e/Makefile.kmk b/src/libs/softfloat-3e/Makefile.kmk
new file mode 100644
index 00000000..39136b98
--- /dev/null
+++ b/src/libs/softfloat-3e/Makefile.kmk
@@ -0,0 +1,408 @@
+# $Id: Makefile.kmk $
+## @file
+# Sub-Makefile for SoftFloat-3e.
+#
+
+#
+# Copyright (C) 2022 Oracle and/or its affiliates.
+#
+# This file is part of VirtualBox base platform packages, as
+# available from https://www.virtualbox.org.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation, in version 3 of the
+# License.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses>.
+#
+# SPDX-License-Identifier: GPL-3.0-only
+#
+
+SUB_DEPTH = ../../..
+include $(KBUILD_PATH)/subheader.kmk
+
+VBOX_SOFTFLOAT_SPECIALIZATION := 8086
+
+ifndef defined(VBOX_ONLY_ADDITIONS)
+ LIBRARIES += VBox-SoftFloat
+endif
+VBox-SoftFloat_TEMPLATE := VBoxR3DllNonPedantic
+VBox-SoftFloat_DEFS := \
+ INLINE_LEVEL=5
+VBox-SoftFloat_INCS := \
+ build/vbox \
+ source/$(VBOX_SOFTFLOAT_SPECIALIZATION) \
+ source/include
+
+# -wd4146: primitives.h(74): warning C4146: unary minus operator applied to unsigned type, result still unsigned
+VBox-SoftFloat_CFLAGS.win := -wd4146
+
+# Primitives:
+VBox-SoftFloat_SOURCES := \
+ source/s_eq128.c \
+ source/s_le128.c \
+ source/s_lt128.c \
+ source/s_shortShiftLeft128.c \
+ source/s_shortShiftRight128.c \
+ source/s_shortShiftRightJam64.c \
+ source/s_shortShiftRightJam64Extra.c \
+ source/s_shortShiftRightJam128.c \
+ source/s_shortShiftRightJam128Extra.c \
+ source/s_shiftRightJam32.c \
+ source/s_shiftRightJam64.c \
+ source/s_shiftRightJam64Extra.c \
+ source/s_shiftRightJam128.c \
+ source/s_shiftRightJam128Extra.c \
+ source/s_shiftRightJam256M.c \
+ source/s_countLeadingZeros8.c \
+ source/s_countLeadingZeros16.c \
+ source/s_countLeadingZeros32.c \
+ source/s_countLeadingZeros64.c \
+ source/s_add128.c \
+ source/s_add256M.c \
+ source/s_sub128.c \
+ source/s_sub256M.c \
+ source/s_mul64ByShifted32To128.c \
+ source/s_mul64To128.c \
+ source/s_mul128By32.c \
+ source/s_mul128To256M.c \
+ source/s_approxRecip_1Ks.c \
+ source/s_approxRecip32_1.c \
+ source/s_approxRecipSqrt_1Ks.c \
+ source/s_approxRecipSqrt32_1.c
+
+# Specialization (target FPU behaviour):
+# @todo maybe use 8086-SSE here...
+VBox-SoftFloat_SOURCES += \
+ source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/softfloat_raiseFlags.c \
+ source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_f16UIToCommonNaN.c \
+ source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_commonNaNToF16UI.c \
+ source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_propagateNaNF16UI.c \
+ source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_f32UIToCommonNaN.c \
+ source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_commonNaNToF32UI.c \
+ source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_propagateNaNF32UI.c \
+ source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_f64UIToCommonNaN.c \
+ source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_commonNaNToF64UI.c \
+ source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_propagateNaNF64UI.c \
+ source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/extF80M_isSignalingNaN.c \
+ source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_extF80UIToCommonNaN.c \
+ source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_commonNaNToExtF80UI.c \
+ source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_propagateNaNExtF80UI.c \
+ source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/f128M_isSignalingNaN.c \
+ source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_f128UIToCommonNaN.c \
+ source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_commonNaNToF128UI.c \
+ source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_propagateNaNF128UI.c
+
+# Others:
+VBox-SoftFloat_SOURCES += \
+ source/s_roundToUI32.c \
+ source/s_roundToUI64.c \
+ source/s_roundToI32.c \
+ source/s_roundToI64.c \
+ source/s_normSubnormalF16Sig.c \
+ source/s_roundPackToF16.c \
+ source/s_normRoundPackToF16.c \
+ source/s_addMagsF16.c \
+ source/s_subMagsF16.c \
+ source/s_mulAddF16.c \
+ source/s_normSubnormalF32Sig.c \
+ source/s_roundPackToF32.c \
+ source/s_normRoundPackToF32.c \
+ source/s_addMagsF32.c \
+ source/s_subMagsF32.c \
+ source/s_mulAddF32.c \
+ source/s_normSubnormalF64Sig.c \
+ source/s_roundPackToF64.c \
+ source/s_normRoundPackToF64.c \
+ source/s_addMagsF64.c \
+ source/s_subMagsF64.c \
+ source/s_mulAddF64.c \
+ source/s_normSubnormalExtF80Sig.c \
+ source/s_roundPackToExtF80.c \
+ source/s_normRoundPackToExtF80.c \
+ source/s_addMagsExtF80.c \
+ source/s_subMagsExtF80.c \
+ source/s_normSubnormalF128Sig.c \
+ source/s_roundPackToF128.c \
+ source/s_normRoundPackToF128.c \
+ source/s_addMagsF128.c \
+ source/s_subMagsF128.c \
+ source/s_mulAddF128.c \
+ source/softfloat_state.c \
+ source/ui32_to_f16.c \
+ source/ui32_to_f32.c \
+ source/ui32_to_f64.c \
+ source/ui32_to_extF80.c \
+ source/ui32_to_extF80M.c \
+ source/ui32_to_f128.c \
+ source/ui32_to_f128M.c \
+ source/ui64_to_f16.c \
+ source/ui64_to_f32.c \
+ source/ui64_to_f64.c \
+ source/ui64_to_extF80.c \
+ source/ui64_to_extF80M.c \
+ source/ui64_to_f128.c \
+ source/ui64_to_f128M.c \
+ source/i32_to_f16.c \
+ source/i32_to_f32.c \
+ source/i32_to_f64.c \
+ source/i32_to_extF80.c \
+ source/i32_to_extF80M.c \
+ source/i32_to_f128.c \
+ source/i32_to_f128M.c \
+ source/i64_to_f16.c \
+ source/i64_to_f32.c \
+ source/i64_to_f64.c \
+ source/i64_to_extF80.c \
+ source/i64_to_extF80M.c \
+ source/i64_to_f128.c \
+ source/i64_to_f128M.c \
+ source/f16_to_ui32.c \
+ source/f16_to_ui64.c \
+ source/f16_to_i32.c \
+ source/f16_to_i64.c \
+ source/f16_to_ui32_r_minMag.c \
+ source/f16_to_ui64_r_minMag.c \
+ source/f16_to_i32_r_minMag.c \
+ source/f16_to_i64_r_minMag.c \
+ source/f16_to_f32.c \
+ source/f16_to_f64.c \
+ source/f16_to_extF80.c \
+ source/f16_to_extF80M.c \
+ source/f16_to_f128.c \
+ source/f16_to_f128M.c \
+ source/f16_roundToInt.c \
+ source/f16_add.c \
+ source/f16_sub.c \
+ source/f16_mul.c \
+ source/f16_mulAdd.c \
+ source/f16_div.c \
+ source/f16_rem.c \
+ source/f16_sqrt.c \
+ source/f16_eq.c \
+ source/f16_le.c \
+ source/f16_lt.c \
+ source/f16_eq_signaling.c \
+ source/f16_le_quiet.c \
+ source/f16_lt_quiet.c \
+ source/f16_isSignalingNaN.c \
+ source/f32_to_ui32.c \
+ source/f32_to_ui64.c \
+ source/f32_to_i32.c \
+ source/f32_to_i64.c \
+ source/f32_to_ui32_r_minMag.c \
+ source/f32_to_ui64_r_minMag.c \
+ source/f32_to_i32_r_minMag.c \
+ source/f32_to_i64_r_minMag.c \
+ source/f32_to_f16.c \
+ source/f32_to_f64.c \
+ source/f32_to_extF80.c \
+ source/f32_to_extF80M.c \
+ source/f32_to_f128.c \
+ source/f32_to_f128M.c \
+ source/f32_roundToInt.c \
+ source/f32_add.c \
+ source/f32_sub.c \
+ source/f32_mul.c \
+ source/f32_mulAdd.c \
+ source/f32_div.c \
+ source/f32_rem.c \
+ source/f32_sqrt.c \
+ source/f32_eq.c \
+ source/f32_le.c \
+ source/f32_lt.c \
+ source/f32_eq_signaling.c \
+ source/f32_le_quiet.c \
+ source/f32_lt_quiet.c \
+ source/f32_isSignalingNaN.c \
+ source/f64_to_ui32.c \
+ source/f64_to_ui64.c \
+ source/f64_to_i32.c \
+ source/f64_to_i64.c \
+ source/f64_to_ui32_r_minMag.c \
+ source/f64_to_ui64_r_minMag.c \
+ source/f64_to_i32_r_minMag.c \
+ source/f64_to_i64_r_minMag.c \
+ source/f64_to_f16.c \
+ source/f64_to_f32.c \
+ source/f64_to_extF80.c \
+ source/f64_to_extF80M.c \
+ source/f64_to_f128.c \
+ source/f64_to_f128M.c \
+ source/f64_roundToInt.c \
+ source/f64_add.c \
+ source/f64_sub.c \
+ source/f64_mul.c \
+ source/f64_mulAdd.c \
+ source/f64_div.c \
+ source/f64_rem.c \
+ source/f64_sqrt.c \
+ source/f64_eq.c \
+ source/f64_le.c \
+ source/f64_lt.c \
+ source/f64_eq_signaling.c \
+ source/f64_le_quiet.c \
+ source/f64_lt_quiet.c \
+ source/f64_isSignalingNaN.c \
+ source/extF80_to_ui32.c \
+ source/extF80_to_ui64.c \
+ source/extF80_to_i32.c \
+ source/extF80_to_i64.c \
+ source/extF80_to_ui32_r_minMag.c \
+ source/extF80_to_ui64_r_minMag.c \
+ source/extF80_to_i32_r_minMag.c \
+ source/extF80_to_i64_r_minMag.c \
+ source/extF80_to_f16.c \
+ source/extF80_to_f32.c \
+ source/extF80_to_f64.c \
+ source/extF80_to_f128.c \
+ source/extF80_roundToInt.c \
+ source/extF80_add.c \
+ source/extF80_sub.c \
+ source/extF80_mul.c \
+ source/extF80_div.c \
+ source/extF80_rem.c \
+ source/extF80_partialRem.c \
+ source/extF80_sincos.c \
+ source/extF80_log2.c \
+ source/extF80_tan.c \
+ source/extF80_sqrt.c \
+ source/extF80_scale_extF80.c \
+ source/extF80_eq.c \
+ source/extF80_le.c \
+ source/extF80_lt.c \
+ source/extF80_eq_signaling.c \
+ source/extF80_le_quiet.c \
+ source/extF80_lt_quiet.c \
+ source/extF80_isSignalingNaN.c \
+ source/extF80M_to_ui32.c \
+ source/extF80M_to_ui64.c \
+ source/extF80M_to_i32.c \
+ source/extF80M_to_i64.c \
+ source/extF80M_to_ui32_r_minMag.c \
+ source/extF80M_to_ui64_r_minMag.c \
+ source/extF80M_to_i32_r_minMag.c \
+ source/extF80M_to_i64_r_minMag.c \
+ source/extF80M_to_f16.c \
+ source/extF80M_to_f32.c \
+ source/extF80M_to_f64.c \
+ source/extF80M_to_f128M.c \
+ source/extF80M_roundToInt.c \
+ source/extF80M_add.c \
+ source/extF80M_sub.c \
+ source/extF80M_mul.c \
+ source/extF80M_div.c \
+ source/extF80M_rem.c \
+ source/extF80M_sqrt.c \
+ source/extF80M_eq.c \
+ source/extF80M_le.c \
+ source/extF80M_lt.c \
+ source/extF80M_eq_signaling.c \
+ source/extF80M_le_quiet.c \
+ source/extF80M_lt_quiet.c \
+ source/f128_to_ui32.c \
+ source/f128_to_ui64.c \
+ source/f128_to_i32.c \
+ source/f128_to_i64.c \
+ source/f128_to_ui32_r_minMag.c \
+ source/f128_to_ui64_r_minMag.c \
+ source/f128_to_i32_r_minMag.c \
+ source/f128_to_i64_r_minMag.c \
+ source/f128_to_f16.c \
+ source/f128_to_f32.c \
+ source/f128_to_extF80.c \
+ source/f128_to_f64.c \
+ source/f128_roundToInt.c \
+ source/f128_add.c \
+ source/f128_sub.c \
+ source/f128_mul.c \
+ source/f128_mulAdd.c \
+ source/f128_div.c \
+ source/f128_rem.c \
+ source/f128_sqrt.c \
+ source/f128_eq.c \
+ source/f128_le.c \
+ source/f128_lt.c \
+ source/f128_eq_signaling.c \
+ source/f128_le_quiet.c \
+ source/f128_lt_quiet.c \
+ source/f128_isSignalingNaN.c \
+ source/f128M_to_ui32.c \
+ source/f128M_to_ui64.c \
+ source/f128M_to_i32.c \
+ source/f128M_to_i64.c \
+ source/f128M_to_ui32_r_minMag.c \
+ source/f128M_to_ui64_r_minMag.c \
+ source/f128M_to_i32_r_minMag.c \
+ source/f128M_to_i64_r_minMag.c \
+ source/f128M_to_f16.c \
+ source/f128M_to_f32.c \
+ source/f128M_to_extF80M.c \
+ source/f128M_to_f64.c \
+ source/f128M_roundToInt.c \
+ source/f128M_add.c \
+ source/f128M_sub.c \
+ source/f128M_mul.c \
+ source/f128M_mulAdd.c \
+ source/f128M_div.c \
+ source/f128M_rem.c \
+ source/f128M_sqrt.c \
+ source/f128M_eq.c \
+ source/f128M_le.c \
+ source/f128M_lt.c \
+ source/f128M_eq_signaling.c \
+ source/f128M_le_quiet.c \
+ source/f128M_lt_quiet.c
+
+#
+# Ring-0 version of the above (has different compiler settings).
+#
+if defined(VBOX_WITH_R0_MODULES) && !defined(VBOX_ONLY_EXTPACKS) && !defined(VBOX_ONLY_ADDITIONS)
+ LIBRARIES += VBox-SoftFloatR0
+endif
+VBox-SoftFloatR0_EXTENDS := VBox-SoftFloat
+VBox-SoftFloatR0_TEMPLATE := VBoxR0
+VBox-SoftFloatR0_DEFS = $(NO_SUCH_VARIABLE)
+
+# -wd4245: f128_sqrt.c(184): warning C4245: '=': conversion from 'int' to 'uint_fast64_t', signed/unsigned mismatch
+# -wd4389: f64_to_i64_r_minMag.c(93): warning C4389: '!=': signed/unsigned mismatch
+VBox-SoftFloatR0_CFLAGS.win := $(VBox-SoftFloat_CFLAGS.win) -wd4245 -wd4389
+ifn1of ($(KBUILD_TARGET),win)
+VBox-SoftFloatR0_CFLAGS := $(VBox-SoftFloat_CFLAGS) -Wno-sign-compare
+endif
+
+
+ifdef VBOX_WITH_NOCRT_STATIC
+#
+# Static No-CRT version of the above for use with VBoxGL.dll in the GAs.
+#
+LIBRARIES.win += VBox-SoftFloatGuestR3Shared
+VBox-SoftFloatGuestR3Shared_TEMPLATE := NewerVccVBoxGuestR3Dll
+VBox-SoftFloatGuestR3Shared_EXTENDS := VBox-SoftFloat
+VBox-SoftFloatGuestR3Shared_INST = $(INST_ADDITIONS_LIB)
+
+# -wd4389: f64_to_i64_r_minMag.c(93): warning C4389: '!=': signed/unsigned mismatch
+VBox-SoftFloatGuestR3Shared_CFLAGS.win := $(VBox-SoftFloat_CFLAGS.win) -wd4245 -wd4389
+ ifn1of ($(KBUILD_TARGET),win)
+VBox-SoftFloatGuestR3Shared_CFLAGS := $(VBox-SoftFloat_CFLAGS) -Wno-sign-compare
+ endif
+
+#
+# And a x86 version of that again for amd64 targets.
+#
+LIBRARIES.win.amd64 += VBox-SoftFloatGuestR3Shared-x86
+VBox-SoftFloatGuestR3Shared-x86_TEMPLATE := NewerVccVBoxGuestR3Dll
+VBox-SoftFloatGuestR3Shared-x86_EXTENDS := VBox-SoftFloatGuestR3Shared
+VBox-SoftFloatGuestR3Shared-x86_BLD_TRG_ARCH := x86
+endif # VBOX_WITH_NOCRT_STATIC
+
+
+include $(FILE_KBUILD_SUB_FOOTER)
+
diff --git a/src/libs/softfloat-3e/README.html b/src/libs/softfloat-3e/README.html
new file mode 100644
index 00000000..e695c2bd
--- /dev/null
+++ b/src/libs/softfloat-3e/README.html
@@ -0,0 +1,49 @@
+
+<HTML>
+
+<HEAD>
+<TITLE>Berkeley SoftFloat Package Overview</TITLE>
+</HEAD>
+
+<BODY>
+
+<H1>Package Overview for Berkeley SoftFloat Release 3e</H1>
+
+<P>
+John R. Hauser<BR>
+2018 January 20<BR>
+</P>
+
+<P>
+Berkeley SoftFloat is a software implementation of binary floating-point that
+conforms to the IEEE Standard for Floating-Point Arithmetic.
+SoftFloat is distributed in the form of C source code.
+Building the SoftFloat sources generates a library file (typically
+<CODE>softfloat.a</CODE> or <CODE>libsoftfloat.a</CODE>) containing the
+floating-point subroutines.
+</P>
+
+<P>
+The SoftFloat package is documented in the following files in the
+<CODE>doc</CODE> subdirectory:
+<BLOCKQUOTE>
+<TABLE>
+<TR>
+<TD><A HREF="doc/SoftFloat.html"><NOBR><CODE>SoftFloat.html</CODE></NOBR></A></TD>
+<TD>Documentation for using the SoftFloat functions.</TD>
+</TR>
+<TR>
+<TD><A HREF="doc/SoftFloat-source.html"><NOBR><CODE>SoftFloat-source.html</CODE></NOBR></A></TD>
+<TD>Documentation for building SoftFloat.</TD>
+</TR>
+<TR>
+<TD><A HREF="doc/SoftFloat-history.html"><NOBR><CODE>SoftFloat-history.html</CODE></A><CODE>&nbsp;&nbsp;&nbsp;</CODE></NOBR></TD>
+<TD>History of the major changes to SoftFloat.</TD>
+</TR>
+</TABLE>
+</BLOCKQUOTE>
+Other files in the package comprise the source code for SoftFloat.
+</P>
+
+</BODY>
+
diff --git a/src/libs/softfloat-3e/README.txt b/src/libs/softfloat-3e/README.txt
new file mode 100644
index 00000000..1613c767
--- /dev/null
+++ b/src/libs/softfloat-3e/README.txt
@@ -0,0 +1,21 @@
+
+Package Overview for Berkeley SoftFloat Release 3e
+
+John R. Hauser
+2018 January 20
+
+Berkeley SoftFloat is a software implementation of binary floating-point
+that conforms to the IEEE Standard for Floating-Point Arithmetic. SoftFloat
+is distributed in the form of C source code. Building the SoftFloat sources
+generates a library file (typically "softfloat.a" or "libsoftfloat.a")
+containing the floating-point subroutines.
+
+The SoftFloat package is documented in the following files in the "doc"
+subdirectory:
+
+ SoftFloat.html Documentation for using the SoftFloat functions.
+ SoftFloat-source.html Documentation for building SoftFloat.
+ SoftFloat-history.html History of the major changes to SoftFloat.
+
+Other files in the package comprise the source code for SoftFloat.
+
diff --git a/src/libs/softfloat-3e/TestFloat-3e-patch.diff b/src/libs/softfloat-3e/TestFloat-3e-patch.diff
new file mode 100644
index 00000000..5b723f3f
--- /dev/null
+++ b/src/libs/softfloat-3e/TestFloat-3e-patch.diff
@@ -0,0 +1,311 @@
+diff -Nru TestFloat-3e-virgin/Makefile.kmk TestFloat-3e/Makefile.kmk
+--- TestFloat-3e-virgin/Makefile.kmk 1970-01-01 01:00:00.000000000 +0100
++++ TestFloat-3e/Makefile.kmk 2022-08-22 21:44:59.264546989 +0200
+@@ -0,0 +1,271 @@
++# $Id: TestFloat-3e-patch.diff $
++## @file
++# Sub-Makefile for TestFloat-3e.
++#
++
++#
++# Copyright (C) 2022 Oracle and/or its affiliates.
++#
++# This file is part of VirtualBox base platform packages, as
++# available from https://www.virtualbox.org.
++#
++# This program is free software; you can redistribute it and/or
++# modify it under the terms of the GNU General Public License
++# as published by the Free Software Foundation, in version 3 of the
++# License.
++#
++# This program is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++# General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, see <https://www.gnu.org/licenses>.
++#
++# SPDX-License-Identifier: GPL-3.0-only
++#
++
++SUB_DEPTH = ../../../..
++include $(KBUILD_PATH)/subheader.kmk
++
++#
++# Basis template for building test stuff.
++#
++TEMPLATE_VBoxTestFloat = Template for building SoftFloat-3e
++TEMPLATE_VBoxTestFloat_EXTENDS = VBoxR3DllNonPedantic
++TEMPLATE_VBoxTestFloat_SDKS = $(TEMPLATE_VBoxR3DllNonPedantic_SDKS) VBOX_SOFTFLOAT
++TEMPLATE_VBoxTestFloat_DEFS = $(TEMPLATE_VBoxR3DllNonPedantic_DEFS) \
++ FLOAT16 \
++ FLOAT64 \
++ EXTFLOAT80 \
++ FLOAT128 \
++ FLOAT_ROUND_ODD
++ifn1of ($(KBUILD_TARGET), win)
++TEMPLATE_VBoxTestFloat_DEFS.amd64 = $(TEMPLATE_VBoxR3DllNonPedantic_DEFS.amd64) LONG_DOUBLE_IS_EXTFLOAT80
++endif
++if1of ($(KBUILD_TARGET), win)
++ TEMPLATE_VBoxTestFloat_INCS.amd64 = ../build/Win-amd64-VCC $(TEMPLATE_VBoxR3DllNonPedantic_INCS.amd64)
++else
++ TEMPLATE_VBoxTestFloat_INCS.amd64 = build/Linux-x86_64-GCC $(TEMPLATE_VBoxR3DllNonPedantic_INCS.amd64)
++endif
++TEMPLATE_VBoxTestFloat_INCS = $(TEMPLATE_VBoxR3DllNonPedantic_INCS) \
++ source/subj-C \
++ source
++
++# -wd4068: test_a_ui32_z_f16.c(48): warning C4068: unknown pragma 'STDC'
++# -wd4146: primitives.h(74): warning C4146: unary minus operator applied to unsigned type, result still unsigned
++# -wd4715: genCases_f16.c(336) : warning C4715: 'f16Random': not all control paths return a value
++TEMPLATE_VBoxTestFloat_CFLAGS.win = $(TEMPLATE_VBoxR3DllNonPedantic_CFLAGS) -wd4068 -wd4146 -wd4715
++
++#
++# For linking test executables.
++#
++TEMPLATE_VBoxTestFloatExe = Template for building SoftFloat-3e programs.
++TEMPLATE_VBoxTestFloatExe_EXTENDS = VBoxTestFloat
++TEMPLATE_VBoxTestFloatExe_INST = $(INST_TESTCASE)
++TEMPLATE_VBoxTestFloatExe_LIBS = \
++ $(VBox-TestFloat_1_TARGET) \
++ $(TEMPLATE_VBoxTestFloat_LIBS)
++
++# -wd4098: testfloat.c(438): warning C4098: 'subjFunction_az_extF80_rx': 'void' function returning a value
++# -wd4102: testfloat.c(767): warning C4102: 'test_abz_f16': unreferenced label
++# -wd4701: testfloat.c(1410) : warning C4701: potentially uninitialized local variable 'roundingMode' used
++TEMPLATE_VBoxTestFloatExe_CFLAGS.win = $(TEMPLATE_VBoxTestFloat_CFLAGS.win) -wd4098 -wd4102 -wd4701
++
++
++#
++# Library.
++#
++LIBRARIES += VBox-TestFloat
++VBox-TestFloat_TEMPLATE := VBoxTestFloat
++VBox-TestFloat_INSTTYPE := none
++VBox-TestFloat_SOURCES := \
++ source/uint128_inline.c \
++ source/uint128.c \
++ source/fail.c \
++ source/functions_common.c \
++ source/functionInfos.c \
++ source/standardFunctionInfos.c \
++ source/random.c \
++ source/genCases_common.c \
++ source/genCases_writeTestsTotal.c \
++ source/verCases_inline.c \
++ source/verCases_common.c \
++ source/verCases_writeFunctionName.c \
++ source/readHex.c \
++ source/writeHex.c \
++ source/writeCase_a_ui32.c \
++ source/writeCase_a_ui64.c \
++ source/writeCase_a_f16.c \
++ source/writeCase_ab_f16.c \
++ source/writeCase_abc_f16.c \
++ source/writeCase_a_f32.c \
++ source/writeCase_ab_f32.c \
++ source/writeCase_abc_f32.c \
++ source/writeCase_a_f64.c \
++ source/writeCase_ab_f64.c \
++ source/writeCase_abc_f64.c \
++ source/writeCase_a_extF80M.c \
++ source/writeCase_ab_extF80M.c \
++ source/writeCase_a_f128M.c \
++ source/writeCase_ab_f128M.c \
++ source/writeCase_abc_f128M.c \
++ source/writeCase_z_bool.c \
++ source/writeCase_z_ui32.c \
++ source/writeCase_z_ui64.c \
++ source/writeCase_z_f16.c \
++ source/writeCase_z_f32.c \
++ source/writeCase_z_f64.c \
++ source/writeCase_z_extF80M.c \
++ source/writeCase_z_f128M.c \
++ source/testLoops_common.c \
++ \
++ source/test_a_ui32_z_f16.c \
++ source/test_a_ui32_z_f32.c \
++ source/test_a_ui32_z_f64.c \
++ source/test_a_ui32_z_extF80.c \
++ source/test_a_ui32_z_f128.c \
++ source/test_a_ui64_z_f16.c \
++ source/test_a_ui64_z_f32.c \
++ source/test_a_ui64_z_f64.c \
++ source/test_a_ui64_z_extF80.c \
++ source/test_a_ui64_z_f128.c \
++ source/test_a_i32_z_f16.c \
++ source/test_a_i32_z_f32.c \
++ source/test_a_i32_z_f64.c \
++ source/test_a_i32_z_extF80.c \
++ source/test_a_i32_z_f128.c \
++ source/test_a_i64_z_f16.c \
++ source/test_a_i64_z_f32.c \
++ source/test_a_i64_z_f64.c \
++ source/test_a_i64_z_extF80.c \
++ source/test_a_i64_z_f128.c \
++ source/test_a_f16_z_ui32_rx.c \
++ source/test_a_f16_z_ui64_rx.c \
++ source/test_a_f16_z_i32_rx.c \
++ source/test_a_f16_z_i64_rx.c \
++ source/test_a_f16_z_ui32_x.c \
++ source/test_a_f16_z_ui64_x.c \
++ source/test_a_f16_z_i32_x.c \
++ source/test_a_f16_z_i64_x.c \
++ source/test_a_f16_z_f32.c \
++ source/test_a_f16_z_f64.c \
++ source/test_a_f16_z_extF80.c \
++ source/test_a_f16_z_f128.c \
++ source/test_az_f16.c \
++ source/test_az_f16_rx.c \
++ source/test_abz_f16.c \
++ source/test_abcz_f16.c \
++ source/test_ab_f16_z_bool.c \
++ source/test_a_f32_z_ui32_rx.c \
++ source/test_a_f32_z_ui64_rx.c \
++ source/test_a_f32_z_i32_rx.c \
++ source/test_a_f32_z_i64_rx.c \
++ source/test_a_f32_z_ui32_x.c \
++ source/test_a_f32_z_ui64_x.c \
++ source/test_a_f32_z_i32_x.c \
++ source/test_a_f32_z_i64_x.c \
++ source/test_a_f32_z_f16.c \
++ source/test_a_f32_z_f64.c \
++ source/test_a_f32_z_extF80.c \
++ source/test_a_f32_z_f128.c \
++ source/test_az_f32.c \
++ source/test_az_f32_rx.c \
++ source/test_abz_f32.c \
++ source/test_abcz_f32.c \
++ source/test_ab_f32_z_bool.c \
++ source/test_a_f64_z_ui32_rx.c \
++ source/test_a_f64_z_ui64_rx.c \
++ source/test_a_f64_z_i32_rx.c \
++ source/test_a_f64_z_i64_rx.c \
++ source/test_a_f64_z_ui32_x.c \
++ source/test_a_f64_z_ui64_x.c \
++ source/test_a_f64_z_i32_x.c \
++ source/test_a_f64_z_i64_x.c \
++ source/test_a_f64_z_f16.c \
++ source/test_a_f64_z_f32.c \
++ source/test_a_f64_z_extF80.c \
++ source/test_a_f64_z_f128.c \
++ source/test_az_f64.c \
++ source/test_az_f64_rx.c \
++ source/test_abz_f64.c \
++ source/test_abcz_f64.c \
++ source/test_ab_f64_z_bool.c \
++ source/test_a_extF80_z_ui32_rx.c \
++ source/test_a_extF80_z_ui64_rx.c \
++ source/test_a_extF80_z_i32_rx.c \
++ source/test_a_extF80_z_i64_rx.c \
++ source/test_a_extF80_z_ui32_x.c \
++ source/test_a_extF80_z_ui64_x.c \
++ source/test_a_extF80_z_i32_x.c \
++ source/test_a_extF80_z_i64_x.c \
++ source/test_a_extF80_z_f16.c \
++ source/test_a_extF80_z_f32.c \
++ source/test_a_extF80_z_f64.c \
++ source/test_a_extF80_z_f128.c \
++ source/test_az_extF80.c \
++ source/test_az_extF80_rx.c \
++ source/test_abz_extF80.c \
++ source/test_ab_extF80_z_bool.c \
++ source/test_a_f128_z_ui32_rx.c \
++ source/test_a_f128_z_ui64_rx.c \
++ source/test_a_f128_z_i32_rx.c \
++ source/test_a_f128_z_i64_rx.c \
++ source/test_a_f128_z_ui32_x.c \
++ source/test_a_f128_z_ui64_x.c \
++ source/test_a_f128_z_i32_x.c \
++ source/test_a_f128_z_i64_x.c \
++ source/test_a_f128_z_f16.c \
++ source/test_a_f128_z_f32.c \
++ source/test_a_f128_z_f64.c \
++ source/test_a_f128_z_extF80.c \
++ source/test_az_f128.c \
++ source/test_az_f128_rx.c \
++ source/test_abz_f128.c \
++ source/test_abcz_f128.c \
++ source/test_ab_f128_z_bool.c \
++ \
++ source/genCases_ui32.c \
++ source/genCases_ui64.c \
++ source/genCases_i32.c \
++ source/genCases_i64.c \
++ source/genCases_f16.c \
++ source/genCases_f32.c \
++ source/genCases_f64.c \
++ source/genCases_extF80.c \
++ source/genCases_f128.c
++
++
++PROGRAMS += tstTestFloat
++tstTestFloat_TEMPLATE = VBoxTestFloatExe
++tstTestFloat_SOURCES = \
++ source/testfloat.c \
++ source/subjfloat_functions.c \
++ source/subj-C/subjfloat.c
++
++PROGRAMS += tstTestFloatVer
++tstTestFloatVer_TEMPLATE = VBoxTestFloatExe
++tstTestFloatVer_SOURCES = \
++ source/testfloat_ver.c \
++ source/verLoops.c
++
++PROGRAMS += tstTestFloatGen
++tstTestFloatGen_TEMPLATE = VBoxTestFloatExe
++tstTestFloatGen_SOURCES = \
++ source/testfloat_gen.c \
++ source/genLoops.c
++
++PROGRAMS += tstTestFloatTime
++tstTestFloatTime_TEMPLATE = VBoxTestFloatExe
++tstTestFloatTime_SOURCES = \
++ source/timesoftfloat.c
++tstTestFloatTime_CFLAGS.win = -wd4459 # timesoftfloat.c(4201): warning C4459: declaration of 'exact' hides global declaration
++
++PROGRAMS += tstTestFloat2
++tstTestFloat2_TEMPLATE = VBoxTestFloatExe
++tstTestFloat2_SOURCES = \
++ source/testsoftfloat.c \
++ source/slowfloat.c
++
++include $(FILE_KBUILD_SUB_FOOTER)
++
+diff -Nru TestFloat-3e-virgin/source/testfloat.c TestFloat-3e/source/testfloat.c
+--- TestFloat-3e-virgin/source/testfloat.c 2018-01-19 22:41:28.000000000 +0100
++++ TestFloat-3e/source/testfloat.c 2022-04-06 02:07:07.033310000 +0200
+@@ -1353,7 +1353,7 @@
+ bool standardFunctionHasFixedRounding;
+ int roundingCode;
+ bool exact;
+- uint_fast8_t roundingPrecision, roundingMode;
++ uint_fast8_t roundingPrecision, roundingMode = 0;
+
+ functionCode = standardFunctionInfoPtr->functionCode;
+ functionAttribs = functionInfos[functionCode].attribs;
+diff -Nru TestFloat-3e-virgin/source/testsoftfloat.c TestFloat-3e/source/testsoftfloat.c
+--- TestFloat-3e-virgin/source/testsoftfloat.c 2018-01-18 18:19:08.000000000 +0100
++++ TestFloat-3e/source/testsoftfloat.c 2022-04-06 02:07:28.791453300 +0200
+@@ -793,7 +793,7 @@
+ int functionAttribs;
+ uint_fast8_t roundingPrecision;
+ int roundingCode;
+- uint_fast8_t roundingMode;
++ uint_fast8_t roundingMode = 0;
+ int exactCode;
+ bool exact;
+ int tininessCode;
+diff -Nru TestFloat-3e-virgin/source/timesoftfloat.c TestFloat-3e/source/timesoftfloat.c
+--- TestFloat-3e-virgin/source/timesoftfloat.c 2018-01-18 18:19:08.000000000 +0100
++++ TestFloat-3e/source/timesoftfloat.c 2022-04-06 02:01:34.386232700 +0200
+@@ -4794,7 +4794,7 @@
+ )
+ {
+ int functionAttribs, exactCode;
+- uint_fast8_t roundingMode, tininessMode;
++ uint_fast8_t roundingMode = softfloat_round_near_even, tininessMode;
+
+ functionNamePtr = functionInfos[functionCode].namePtr;
+ functionAttribs = functionInfos[functionCode].attribs;
diff --git a/src/libs/softfloat-3e/build/Linux-386-GCC/Makefile b/src/libs/softfloat-3e/build/Linux-386-GCC/Makefile
new file mode 100644
index 00000000..faeb3972
--- /dev/null
+++ b/src/libs/softfloat-3e/build/Linux-386-GCC/Makefile
@@ -0,0 +1,325 @@
+
+#=============================================================================
+#
+# This Makefile is part of the SoftFloat IEEE Floating-Point Arithmetic
+# Package, Release 3e, by John R. Hauser.
+#
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+# University of California. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions, and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions, and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# 3. Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#=============================================================================
+
+SOURCE_DIR ?= ../../source
+SPECIALIZE_TYPE ?= 8086
+
+SOFTFLOAT_OPTS ?= \
+ -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \
+ -DSOFTFLOAT_FAST_DIV64TO32
+
+DELETE = rm -f
+C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include
+COMPILE_C = \
+ gcc -c -Werror-implicit-function-declaration $(SOFTFLOAT_OPTS) \
+ $(C_INCLUDES) -O2 -o $@
+MAKELIB = ar crs $@
+
+OBJ = .o
+LIB = .a
+
+OTHER_HEADERS =
+
+.PHONY: all
+all: softfloat$(LIB)
+
+OBJS_PRIMITIVES = \
+ s_compare96M$(OBJ) \
+ s_compare128M$(OBJ) \
+ s_shortShiftLeft64To96M$(OBJ) \
+ s_shortShiftLeftM$(OBJ) \
+ s_shiftLeftM$(OBJ) \
+ s_shortShiftRightM$(OBJ) \
+ s_shortShiftRightJam64$(OBJ) \
+ s_shortShiftRightJamM$(OBJ) \
+ s_shiftRightJam32$(OBJ) \
+ s_shiftRightJam64$(OBJ) \
+ s_shiftRightJamM$(OBJ) \
+ s_shiftRightM$(OBJ) \
+ s_countLeadingZeros8$(OBJ) \
+ s_countLeadingZeros16$(OBJ) \
+ s_countLeadingZeros32$(OBJ) \
+ s_countLeadingZeros64$(OBJ) \
+ s_addM$(OBJ) \
+ s_addCarryM$(OBJ) \
+ s_addComplCarryM$(OBJ) \
+ s_negXM$(OBJ) \
+ s_sub1XM$(OBJ) \
+ s_subM$(OBJ) \
+ s_mul64To128M$(OBJ) \
+ s_mul128MTo256M$(OBJ) \
+ s_approxRecip_1Ks$(OBJ) \
+ s_approxRecip32_1$(OBJ) \
+ s_approxRecipSqrt_1Ks$(OBJ) \
+ s_approxRecipSqrt32_1$(OBJ) \
+ s_remStepMBy32$(OBJ) \
+
+OBJS_SPECIALIZE = \
+ softfloat_raiseFlags$(OBJ) \
+ s_f16UIToCommonNaN$(OBJ) \
+ s_commonNaNToF16UI$(OBJ) \
+ s_propagateNaNF16UI$(OBJ) \
+ s_f32UIToCommonNaN$(OBJ) \
+ s_commonNaNToF32UI$(OBJ) \
+ s_propagateNaNF32UI$(OBJ) \
+ s_f64UIToCommonNaN$(OBJ) \
+ s_commonNaNToF64UI$(OBJ) \
+ s_propagateNaNF64UI$(OBJ) \
+ extF80M_isSignalingNaN$(OBJ) \
+ s_extF80MToCommonNaN$(OBJ) \
+ s_commonNaNToExtF80M$(OBJ) \
+ s_propagateNaNExtF80M$(OBJ) \
+ f128M_isSignalingNaN$(OBJ) \
+ s_f128MToCommonNaN$(OBJ) \
+ s_commonNaNToF128M$(OBJ) \
+ s_propagateNaNF128M$(OBJ) \
+
+OBJS_OTHERS = \
+ s_roundToUI32$(OBJ) \
+ s_roundMToUI64$(OBJ) \
+ s_roundToI32$(OBJ) \
+ s_roundMToI64$(OBJ) \
+ s_normSubnormalF16Sig$(OBJ) \
+ s_roundPackToF16$(OBJ) \
+ s_normRoundPackToF16$(OBJ) \
+ s_addMagsF16$(OBJ) \
+ s_subMagsF16$(OBJ) \
+ s_mulAddF16$(OBJ) \
+ s_normSubnormalF32Sig$(OBJ) \
+ s_roundPackToF32$(OBJ) \
+ s_normRoundPackToF32$(OBJ) \
+ s_addMagsF32$(OBJ) \
+ s_subMagsF32$(OBJ) \
+ s_mulAddF32$(OBJ) \
+ s_normSubnormalF64Sig$(OBJ) \
+ s_roundPackToF64$(OBJ) \
+ s_normRoundPackToF64$(OBJ) \
+ s_addMagsF64$(OBJ) \
+ s_subMagsF64$(OBJ) \
+ s_mulAddF64$(OBJ) \
+ s_tryPropagateNaNExtF80M$(OBJ) \
+ s_invalidExtF80M$(OBJ) \
+ s_normExtF80SigM$(OBJ) \
+ s_roundPackMToExtF80M$(OBJ) \
+ s_normRoundPackMToExtF80M$(OBJ) \
+ s_addExtF80M$(OBJ) \
+ s_compareNonnormExtF80M$(OBJ) \
+ s_isNaNF128M$(OBJ) \
+ s_tryPropagateNaNF128M$(OBJ) \
+ s_invalidF128M$(OBJ) \
+ s_shiftNormSigF128M$(OBJ) \
+ s_roundPackMToF128M$(OBJ) \
+ s_normRoundPackMToF128M$(OBJ) \
+ s_addF128M$(OBJ) \
+ s_mulAddF128M$(OBJ) \
+ softfloat_state$(OBJ) \
+ ui32_to_f16$(OBJ) \
+ ui32_to_f32$(OBJ) \
+ ui32_to_f64$(OBJ) \
+ ui32_to_extF80M$(OBJ) \
+ ui32_to_f128M$(OBJ) \
+ ui64_to_f16$(OBJ) \
+ ui64_to_f32$(OBJ) \
+ ui64_to_f64$(OBJ) \
+ ui64_to_extF80M$(OBJ) \
+ ui64_to_f128M$(OBJ) \
+ i32_to_f16$(OBJ) \
+ i32_to_f32$(OBJ) \
+ i32_to_f64$(OBJ) \
+ i32_to_extF80M$(OBJ) \
+ i32_to_f128M$(OBJ) \
+ i64_to_f16$(OBJ) \
+ i64_to_f32$(OBJ) \
+ i64_to_f64$(OBJ) \
+ i64_to_extF80M$(OBJ) \
+ i64_to_f128M$(OBJ) \
+ f16_to_ui32$(OBJ) \
+ f16_to_ui64$(OBJ) \
+ f16_to_i32$(OBJ) \
+ f16_to_i64$(OBJ) \
+ f16_to_ui32_r_minMag$(OBJ) \
+ f16_to_ui64_r_minMag$(OBJ) \
+ f16_to_i32_r_minMag$(OBJ) \
+ f16_to_i64_r_minMag$(OBJ) \
+ f16_to_f32$(OBJ) \
+ f16_to_f64$(OBJ) \
+ f16_to_extF80M$(OBJ) \
+ f16_to_f128M$(OBJ) \
+ f16_roundToInt$(OBJ) \
+ f16_add$(OBJ) \
+ f16_sub$(OBJ) \
+ f16_mul$(OBJ) \
+ f16_mulAdd$(OBJ) \
+ f16_div$(OBJ) \
+ f16_rem$(OBJ) \
+ f16_sqrt$(OBJ) \
+ f16_eq$(OBJ) \
+ f16_le$(OBJ) \
+ f16_lt$(OBJ) \
+ f16_eq_signaling$(OBJ) \
+ f16_le_quiet$(OBJ) \
+ f16_lt_quiet$(OBJ) \
+ f16_isSignalingNaN$(OBJ) \
+ f32_to_ui32$(OBJ) \
+ f32_to_ui64$(OBJ) \
+ f32_to_i32$(OBJ) \
+ f32_to_i64$(OBJ) \
+ f32_to_ui32_r_minMag$(OBJ) \
+ f32_to_ui64_r_minMag$(OBJ) \
+ f32_to_i32_r_minMag$(OBJ) \
+ f32_to_i64_r_minMag$(OBJ) \
+ f32_to_f16$(OBJ) \
+ f32_to_f64$(OBJ) \
+ f32_to_extF80M$(OBJ) \
+ f32_to_f128M$(OBJ) \
+ f32_roundToInt$(OBJ) \
+ f32_add$(OBJ) \
+ f32_sub$(OBJ) \
+ f32_mul$(OBJ) \
+ f32_mulAdd$(OBJ) \
+ f32_div$(OBJ) \
+ f32_rem$(OBJ) \
+ f32_sqrt$(OBJ) \
+ f32_eq$(OBJ) \
+ f32_le$(OBJ) \
+ f32_lt$(OBJ) \
+ f32_eq_signaling$(OBJ) \
+ f32_le_quiet$(OBJ) \
+ f32_lt_quiet$(OBJ) \
+ f32_isSignalingNaN$(OBJ) \
+ f64_to_ui32$(OBJ) \
+ f64_to_ui64$(OBJ) \
+ f64_to_i32$(OBJ) \
+ f64_to_i64$(OBJ) \
+ f64_to_ui32_r_minMag$(OBJ) \
+ f64_to_ui64_r_minMag$(OBJ) \
+ f64_to_i32_r_minMag$(OBJ) \
+ f64_to_i64_r_minMag$(OBJ) \
+ f64_to_f16$(OBJ) \
+ f64_to_f32$(OBJ) \
+ f64_to_extF80M$(OBJ) \
+ f64_to_f128M$(OBJ) \
+ f64_roundToInt$(OBJ) \
+ f64_add$(OBJ) \
+ f64_sub$(OBJ) \
+ f64_mul$(OBJ) \
+ f64_mulAdd$(OBJ) \
+ f64_div$(OBJ) \
+ f64_rem$(OBJ) \
+ f64_sqrt$(OBJ) \
+ f64_eq$(OBJ) \
+ f64_le$(OBJ) \
+ f64_lt$(OBJ) \
+ f64_eq_signaling$(OBJ) \
+ f64_le_quiet$(OBJ) \
+ f64_lt_quiet$(OBJ) \
+ f64_isSignalingNaN$(OBJ) \
+ extF80M_to_ui32$(OBJ) \
+ extF80M_to_ui64$(OBJ) \
+ extF80M_to_i32$(OBJ) \
+ extF80M_to_i64$(OBJ) \
+ extF80M_to_ui32_r_minMag$(OBJ) \
+ extF80M_to_ui64_r_minMag$(OBJ) \
+ extF80M_to_i32_r_minMag$(OBJ) \
+ extF80M_to_i64_r_minMag$(OBJ) \
+ extF80M_to_f16$(OBJ) \
+ extF80M_to_f32$(OBJ) \
+ extF80M_to_f64$(OBJ) \
+ extF80M_to_f128M$(OBJ) \
+ extF80M_roundToInt$(OBJ) \
+ extF80M_add$(OBJ) \
+ extF80M_sub$(OBJ) \
+ extF80M_mul$(OBJ) \
+ extF80M_div$(OBJ) \
+ extF80M_rem$(OBJ) \
+ extF80M_sqrt$(OBJ) \
+ extF80M_eq$(OBJ) \
+ extF80M_le$(OBJ) \
+ extF80M_lt$(OBJ) \
+ extF80M_eq_signaling$(OBJ) \
+ extF80M_le_quiet$(OBJ) \
+ extF80M_lt_quiet$(OBJ) \
+ f128M_to_ui32$(OBJ) \
+ f128M_to_ui64$(OBJ) \
+ f128M_to_i32$(OBJ) \
+ f128M_to_i64$(OBJ) \
+ f128M_to_ui32_r_minMag$(OBJ) \
+ f128M_to_ui64_r_minMag$(OBJ) \
+ f128M_to_i32_r_minMag$(OBJ) \
+ f128M_to_i64_r_minMag$(OBJ) \
+ f128M_to_f16$(OBJ) \
+ f128M_to_f32$(OBJ) \
+ f128M_to_f64$(OBJ) \
+ f128M_to_extF80M$(OBJ) \
+ f128M_roundToInt$(OBJ) \
+ f128M_add$(OBJ) \
+ f128M_sub$(OBJ) \
+ f128M_mul$(OBJ) \
+ f128M_mulAdd$(OBJ) \
+ f128M_div$(OBJ) \
+ f128M_rem$(OBJ) \
+ f128M_sqrt$(OBJ) \
+ f128M_eq$(OBJ) \
+ f128M_le$(OBJ) \
+ f128M_lt$(OBJ) \
+ f128M_eq_signaling$(OBJ) \
+ f128M_le_quiet$(OBJ) \
+ f128M_lt_quiet$(OBJ) \
+
+OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS)
+
+$(OBJS_ALL): \
+ $(OTHER_HEADERS) platform.h $(SOURCE_DIR)/include/primitiveTypes.h \
+ $(SOURCE_DIR)/include/primitives.h
+$(OBJS_SPECIALIZE) $(OBJS_OTHERS): \
+ $(SOURCE_DIR)/include/softfloat_types.h $(SOURCE_DIR)/include/internals.h \
+ $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/specialize.h \
+ $(SOURCE_DIR)/include/softfloat.h
+
+$(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$*.c
+
+$(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c
+
+softfloat$(LIB): $(OBJS_ALL)
+ $(DELETE) $@
+ $(MAKELIB) $^
+
+.PHONY: clean
+clean:
+ $(DELETE) $(OBJS_ALL) softfloat$(LIB)
+
diff --git a/src/libs/softfloat-3e/build/Linux-386-GCC/platform.h b/src/libs/softfloat-3e/build/Linux-386-GCC/platform.h
new file mode 100644
index 00000000..d514dbc4
--- /dev/null
+++ b/src/libs/softfloat-3e/build/Linux-386-GCC/platform.h
@@ -0,0 +1,53 @@
+
+/*============================================================================
+
+This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define LITTLEENDIAN 1
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef __GNUC_STDC_INLINE__
+#define INLINE inline
+#else
+#define INLINE extern inline
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define SOFTFLOAT_BUILTIN_CLZ 1
+#include "opts-GCC.h"
+
diff --git a/src/libs/softfloat-3e/build/Linux-386-SSE2-GCC/Makefile b/src/libs/softfloat-3e/build/Linux-386-SSE2-GCC/Makefile
new file mode 100644
index 00000000..ced977b6
--- /dev/null
+++ b/src/libs/softfloat-3e/build/Linux-386-SSE2-GCC/Makefile
@@ -0,0 +1,325 @@
+
+#=============================================================================
+#
+# This Makefile is part of the SoftFloat IEEE Floating-Point Arithmetic
+# Package, Release 3e, by John R. Hauser.
+#
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+# University of California. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions, and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions, and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# 3. Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#=============================================================================
+
+SOURCE_DIR ?= ../../source
+SPECIALIZE_TYPE ?= 8086-SSE
+
+SOFTFLOAT_OPTS ?= \
+ -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \
+ -DSOFTFLOAT_FAST_DIV64TO32
+
+DELETE = rm -f
+C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include
+COMPILE_C = \
+ gcc -c -Werror-implicit-function-declaration $(SOFTFLOAT_OPTS) \
+ $(C_INCLUDES) -O2 -o $@
+MAKELIB = ar crs $@
+
+OBJ = .o
+LIB = .a
+
+OTHER_HEADERS =
+
+.PHONY: all
+all: softfloat$(LIB)
+
+OBJS_PRIMITIVES = \
+ s_compare96M$(OBJ) \
+ s_compare128M$(OBJ) \
+ s_shortShiftLeft64To96M$(OBJ) \
+ s_shortShiftLeftM$(OBJ) \
+ s_shiftLeftM$(OBJ) \
+ s_shortShiftRightM$(OBJ) \
+ s_shortShiftRightJam64$(OBJ) \
+ s_shortShiftRightJamM$(OBJ) \
+ s_shiftRightJam32$(OBJ) \
+ s_shiftRightJam64$(OBJ) \
+ s_shiftRightJamM$(OBJ) \
+ s_shiftRightM$(OBJ) \
+ s_countLeadingZeros8$(OBJ) \
+ s_countLeadingZeros16$(OBJ) \
+ s_countLeadingZeros32$(OBJ) \
+ s_countLeadingZeros64$(OBJ) \
+ s_addM$(OBJ) \
+ s_addCarryM$(OBJ) \
+ s_addComplCarryM$(OBJ) \
+ s_negXM$(OBJ) \
+ s_sub1XM$(OBJ) \
+ s_subM$(OBJ) \
+ s_mul64To128M$(OBJ) \
+ s_mul128MTo256M$(OBJ) \
+ s_approxRecip_1Ks$(OBJ) \
+ s_approxRecip32_1$(OBJ) \
+ s_approxRecipSqrt_1Ks$(OBJ) \
+ s_approxRecipSqrt32_1$(OBJ) \
+ s_remStepMBy32$(OBJ) \
+
+OBJS_SPECIALIZE = \
+ softfloat_raiseFlags$(OBJ) \
+ s_f16UIToCommonNaN$(OBJ) \
+ s_commonNaNToF16UI$(OBJ) \
+ s_propagateNaNF16UI$(OBJ) \
+ s_f32UIToCommonNaN$(OBJ) \
+ s_commonNaNToF32UI$(OBJ) \
+ s_propagateNaNF32UI$(OBJ) \
+ s_f64UIToCommonNaN$(OBJ) \
+ s_commonNaNToF64UI$(OBJ) \
+ s_propagateNaNF64UI$(OBJ) \
+ extF80M_isSignalingNaN$(OBJ) \
+ s_extF80MToCommonNaN$(OBJ) \
+ s_commonNaNToExtF80M$(OBJ) \
+ s_propagateNaNExtF80M$(OBJ) \
+ f128M_isSignalingNaN$(OBJ) \
+ s_f128MToCommonNaN$(OBJ) \
+ s_commonNaNToF128M$(OBJ) \
+ s_propagateNaNF128M$(OBJ) \
+
+OBJS_OTHERS = \
+ s_roundToUI32$(OBJ) \
+ s_roundMToUI64$(OBJ) \
+ s_roundToI32$(OBJ) \
+ s_roundMToI64$(OBJ) \
+ s_normSubnormalF16Sig$(OBJ) \
+ s_roundPackToF16$(OBJ) \
+ s_normRoundPackToF16$(OBJ) \
+ s_addMagsF16$(OBJ) \
+ s_subMagsF16$(OBJ) \
+ s_mulAddF16$(OBJ) \
+ s_normSubnormalF32Sig$(OBJ) \
+ s_roundPackToF32$(OBJ) \
+ s_normRoundPackToF32$(OBJ) \
+ s_addMagsF32$(OBJ) \
+ s_subMagsF32$(OBJ) \
+ s_mulAddF32$(OBJ) \
+ s_normSubnormalF64Sig$(OBJ) \
+ s_roundPackToF64$(OBJ) \
+ s_normRoundPackToF64$(OBJ) \
+ s_addMagsF64$(OBJ) \
+ s_subMagsF64$(OBJ) \
+ s_mulAddF64$(OBJ) \
+ s_tryPropagateNaNExtF80M$(OBJ) \
+ s_invalidExtF80M$(OBJ) \
+ s_normExtF80SigM$(OBJ) \
+ s_roundPackMToExtF80M$(OBJ) \
+ s_normRoundPackMToExtF80M$(OBJ) \
+ s_addExtF80M$(OBJ) \
+ s_compareNonnormExtF80M$(OBJ) \
+ s_isNaNF128M$(OBJ) \
+ s_tryPropagateNaNF128M$(OBJ) \
+ s_invalidF128M$(OBJ) \
+ s_shiftNormSigF128M$(OBJ) \
+ s_roundPackMToF128M$(OBJ) \
+ s_normRoundPackMToF128M$(OBJ) \
+ s_addF128M$(OBJ) \
+ s_mulAddF128M$(OBJ) \
+ softfloat_state$(OBJ) \
+ ui32_to_f16$(OBJ) \
+ ui32_to_f32$(OBJ) \
+ ui32_to_f64$(OBJ) \
+ ui32_to_extF80M$(OBJ) \
+ ui32_to_f128M$(OBJ) \
+ ui64_to_f16$(OBJ) \
+ ui64_to_f32$(OBJ) \
+ ui64_to_f64$(OBJ) \
+ ui64_to_extF80M$(OBJ) \
+ ui64_to_f128M$(OBJ) \
+ i32_to_f16$(OBJ) \
+ i32_to_f32$(OBJ) \
+ i32_to_f64$(OBJ) \
+ i32_to_extF80M$(OBJ) \
+ i32_to_f128M$(OBJ) \
+ i64_to_f16$(OBJ) \
+ i64_to_f32$(OBJ) \
+ i64_to_f64$(OBJ) \
+ i64_to_extF80M$(OBJ) \
+ i64_to_f128M$(OBJ) \
+ f16_to_ui32$(OBJ) \
+ f16_to_ui64$(OBJ) \
+ f16_to_i32$(OBJ) \
+ f16_to_i64$(OBJ) \
+ f16_to_ui32_r_minMag$(OBJ) \
+ f16_to_ui64_r_minMag$(OBJ) \
+ f16_to_i32_r_minMag$(OBJ) \
+ f16_to_i64_r_minMag$(OBJ) \
+ f16_to_f32$(OBJ) \
+ f16_to_f64$(OBJ) \
+ f16_to_extF80M$(OBJ) \
+ f16_to_f128M$(OBJ) \
+ f16_roundToInt$(OBJ) \
+ f16_add$(OBJ) \
+ f16_sub$(OBJ) \
+ f16_mul$(OBJ) \
+ f16_mulAdd$(OBJ) \
+ f16_div$(OBJ) \
+ f16_rem$(OBJ) \
+ f16_sqrt$(OBJ) \
+ f16_eq$(OBJ) \
+ f16_le$(OBJ) \
+ f16_lt$(OBJ) \
+ f16_eq_signaling$(OBJ) \
+ f16_le_quiet$(OBJ) \
+ f16_lt_quiet$(OBJ) \
+ f16_isSignalingNaN$(OBJ) \
+ f32_to_ui32$(OBJ) \
+ f32_to_ui64$(OBJ) \
+ f32_to_i32$(OBJ) \
+ f32_to_i64$(OBJ) \
+ f32_to_ui32_r_minMag$(OBJ) \
+ f32_to_ui64_r_minMag$(OBJ) \
+ f32_to_i32_r_minMag$(OBJ) \
+ f32_to_i64_r_minMag$(OBJ) \
+ f32_to_f16$(OBJ) \
+ f32_to_f64$(OBJ) \
+ f32_to_extF80M$(OBJ) \
+ f32_to_f128M$(OBJ) \
+ f32_roundToInt$(OBJ) \
+ f32_add$(OBJ) \
+ f32_sub$(OBJ) \
+ f32_mul$(OBJ) \
+ f32_mulAdd$(OBJ) \
+ f32_div$(OBJ) \
+ f32_rem$(OBJ) \
+ f32_sqrt$(OBJ) \
+ f32_eq$(OBJ) \
+ f32_le$(OBJ) \
+ f32_lt$(OBJ) \
+ f32_eq_signaling$(OBJ) \
+ f32_le_quiet$(OBJ) \
+ f32_lt_quiet$(OBJ) \
+ f32_isSignalingNaN$(OBJ) \
+ f64_to_ui32$(OBJ) \
+ f64_to_ui64$(OBJ) \
+ f64_to_i32$(OBJ) \
+ f64_to_i64$(OBJ) \
+ f64_to_ui32_r_minMag$(OBJ) \
+ f64_to_ui64_r_minMag$(OBJ) \
+ f64_to_i32_r_minMag$(OBJ) \
+ f64_to_i64_r_minMag$(OBJ) \
+ f64_to_f16$(OBJ) \
+ f64_to_f32$(OBJ) \
+ f64_to_extF80M$(OBJ) \
+ f64_to_f128M$(OBJ) \
+ f64_roundToInt$(OBJ) \
+ f64_add$(OBJ) \
+ f64_sub$(OBJ) \
+ f64_mul$(OBJ) \
+ f64_mulAdd$(OBJ) \
+ f64_div$(OBJ) \
+ f64_rem$(OBJ) \
+ f64_sqrt$(OBJ) \
+ f64_eq$(OBJ) \
+ f64_le$(OBJ) \
+ f64_lt$(OBJ) \
+ f64_eq_signaling$(OBJ) \
+ f64_le_quiet$(OBJ) \
+ f64_lt_quiet$(OBJ) \
+ f64_isSignalingNaN$(OBJ) \
+ extF80M_to_ui32$(OBJ) \
+ extF80M_to_ui64$(OBJ) \
+ extF80M_to_i32$(OBJ) \
+ extF80M_to_i64$(OBJ) \
+ extF80M_to_ui32_r_minMag$(OBJ) \
+ extF80M_to_ui64_r_minMag$(OBJ) \
+ extF80M_to_i32_r_minMag$(OBJ) \
+ extF80M_to_i64_r_minMag$(OBJ) \
+ extF80M_to_f16$(OBJ) \
+ extF80M_to_f32$(OBJ) \
+ extF80M_to_f64$(OBJ) \
+ extF80M_to_f128M$(OBJ) \
+ extF80M_roundToInt$(OBJ) \
+ extF80M_add$(OBJ) \
+ extF80M_sub$(OBJ) \
+ extF80M_mul$(OBJ) \
+ extF80M_div$(OBJ) \
+ extF80M_rem$(OBJ) \
+ extF80M_sqrt$(OBJ) \
+ extF80M_eq$(OBJ) \
+ extF80M_le$(OBJ) \
+ extF80M_lt$(OBJ) \
+ extF80M_eq_signaling$(OBJ) \
+ extF80M_le_quiet$(OBJ) \
+ extF80M_lt_quiet$(OBJ) \
+ f128M_to_ui32$(OBJ) \
+ f128M_to_ui64$(OBJ) \
+ f128M_to_i32$(OBJ) \
+ f128M_to_i64$(OBJ) \
+ f128M_to_ui32_r_minMag$(OBJ) \
+ f128M_to_ui64_r_minMag$(OBJ) \
+ f128M_to_i32_r_minMag$(OBJ) \
+ f128M_to_i64_r_minMag$(OBJ) \
+ f128M_to_f16$(OBJ) \
+ f128M_to_f32$(OBJ) \
+ f128M_to_f64$(OBJ) \
+ f128M_to_extF80M$(OBJ) \
+ f128M_roundToInt$(OBJ) \
+ f128M_add$(OBJ) \
+ f128M_sub$(OBJ) \
+ f128M_mul$(OBJ) \
+ f128M_mulAdd$(OBJ) \
+ f128M_div$(OBJ) \
+ f128M_rem$(OBJ) \
+ f128M_sqrt$(OBJ) \
+ f128M_eq$(OBJ) \
+ f128M_le$(OBJ) \
+ f128M_lt$(OBJ) \
+ f128M_eq_signaling$(OBJ) \
+ f128M_le_quiet$(OBJ) \
+ f128M_lt_quiet$(OBJ) \
+
+OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS)
+
+$(OBJS_ALL): \
+ $(OTHER_HEADERS) platform.h $(SOURCE_DIR)/include/primitiveTypes.h \
+ $(SOURCE_DIR)/include/primitives.h
+$(OBJS_SPECIALIZE) $(OBJS_OTHERS): \
+ $(SOURCE_DIR)/include/softfloat_types.h $(SOURCE_DIR)/include/internals.h \
+ $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/specialize.h \
+ $(SOURCE_DIR)/include/softfloat.h
+
+$(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$*.c
+
+$(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c
+
+softfloat$(LIB): $(OBJS_ALL)
+ $(DELETE) $@
+ $(MAKELIB) $^
+
+.PHONY: clean
+clean:
+ $(DELETE) $(OBJS_ALL) softfloat$(LIB)
+
diff --git a/src/libs/softfloat-3e/build/Linux-386-SSE2-GCC/platform.h b/src/libs/softfloat-3e/build/Linux-386-SSE2-GCC/platform.h
new file mode 100644
index 00000000..d514dbc4
--- /dev/null
+++ b/src/libs/softfloat-3e/build/Linux-386-SSE2-GCC/platform.h
@@ -0,0 +1,53 @@
+
+/*============================================================================
+
+This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define LITTLEENDIAN 1
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef __GNUC_STDC_INLINE__
+#define INLINE inline
+#else
+#define INLINE extern inline
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define SOFTFLOAT_BUILTIN_CLZ 1
+#include "opts-GCC.h"
+
diff --git a/src/libs/softfloat-3e/build/Linux-ARM-VFPv2-GCC/Makefile b/src/libs/softfloat-3e/build/Linux-ARM-VFPv2-GCC/Makefile
new file mode 100644
index 00000000..a1e7c830
--- /dev/null
+++ b/src/libs/softfloat-3e/build/Linux-ARM-VFPv2-GCC/Makefile
@@ -0,0 +1,323 @@
+
+#=============================================================================
+#
+# This Makefile is part of the SoftFloat IEEE Floating-Point Arithmetic
+# Package, Release 3e, by John R. Hauser.
+#
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+# University of California. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions, and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions, and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# 3. Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#=============================================================================
+
+SOURCE_DIR ?= ../../source
+SPECIALIZE_TYPE ?= ARM-VFPv2
+
+SOFTFLOAT_OPTS ?= -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5
+
+DELETE = rm -f
+C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include
+COMPILE_C = \
+ gcc -c -Werror-implicit-function-declaration $(SOFTFLOAT_OPTS) \
+ $(C_INCLUDES) -O2 -o $@
+MAKELIB = ar crs $@
+
+OBJ = .o
+LIB = .a
+
+OTHER_HEADERS =
+
+.PHONY: all
+all: softfloat$(LIB)
+
+OBJS_PRIMITIVES = \
+ s_compare96M$(OBJ) \
+ s_compare128M$(OBJ) \
+ s_shortShiftLeft64To96M$(OBJ) \
+ s_shortShiftLeftM$(OBJ) \
+ s_shiftLeftM$(OBJ) \
+ s_shortShiftRightM$(OBJ) \
+ s_shortShiftRightJam64$(OBJ) \
+ s_shortShiftRightJamM$(OBJ) \
+ s_shiftRightJam32$(OBJ) \
+ s_shiftRightJam64$(OBJ) \
+ s_shiftRightJamM$(OBJ) \
+ s_shiftRightM$(OBJ) \
+ s_countLeadingZeros8$(OBJ) \
+ s_countLeadingZeros16$(OBJ) \
+ s_countLeadingZeros32$(OBJ) \
+ s_countLeadingZeros64$(OBJ) \
+ s_addM$(OBJ) \
+ s_addCarryM$(OBJ) \
+ s_addComplCarryM$(OBJ) \
+ s_negXM$(OBJ) \
+ s_sub1XM$(OBJ) \
+ s_subM$(OBJ) \
+ s_mul64To128M$(OBJ) \
+ s_mul128MTo256M$(OBJ) \
+ s_approxRecip_1Ks$(OBJ) \
+ s_approxRecip32_1$(OBJ) \
+ s_approxRecipSqrt_1Ks$(OBJ) \
+ s_approxRecipSqrt32_1$(OBJ) \
+ s_remStepMBy32$(OBJ) \
+
+OBJS_SPECIALIZE = \
+ softfloat_raiseFlags$(OBJ) \
+ s_f16UIToCommonNaN$(OBJ) \
+ s_commonNaNToF16UI$(OBJ) \
+ s_propagateNaNF16UI$(OBJ) \
+ s_f32UIToCommonNaN$(OBJ) \
+ s_commonNaNToF32UI$(OBJ) \
+ s_propagateNaNF32UI$(OBJ) \
+ s_f64UIToCommonNaN$(OBJ) \
+ s_commonNaNToF64UI$(OBJ) \
+ s_propagateNaNF64UI$(OBJ) \
+ extF80M_isSignalingNaN$(OBJ) \
+ s_extF80MToCommonNaN$(OBJ) \
+ s_commonNaNToExtF80M$(OBJ) \
+ s_propagateNaNExtF80M$(OBJ) \
+ f128M_isSignalingNaN$(OBJ) \
+ s_f128MToCommonNaN$(OBJ) \
+ s_commonNaNToF128M$(OBJ) \
+ s_propagateNaNF128M$(OBJ) \
+
+OBJS_OTHERS = \
+ s_roundToUI32$(OBJ) \
+ s_roundMToUI64$(OBJ) \
+ s_roundToI32$(OBJ) \
+ s_roundMToI64$(OBJ) \
+ s_normSubnormalF16Sig$(OBJ) \
+ s_roundPackToF16$(OBJ) \
+ s_normRoundPackToF16$(OBJ) \
+ s_addMagsF16$(OBJ) \
+ s_subMagsF16$(OBJ) \
+ s_mulAddF16$(OBJ) \
+ s_normSubnormalF32Sig$(OBJ) \
+ s_roundPackToF32$(OBJ) \
+ s_normRoundPackToF32$(OBJ) \
+ s_addMagsF32$(OBJ) \
+ s_subMagsF32$(OBJ) \
+ s_mulAddF32$(OBJ) \
+ s_normSubnormalF64Sig$(OBJ) \
+ s_roundPackToF64$(OBJ) \
+ s_normRoundPackToF64$(OBJ) \
+ s_addMagsF64$(OBJ) \
+ s_subMagsF64$(OBJ) \
+ s_mulAddF64$(OBJ) \
+ s_tryPropagateNaNExtF80M$(OBJ) \
+ s_invalidExtF80M$(OBJ) \
+ s_normExtF80SigM$(OBJ) \
+ s_roundPackMToExtF80M$(OBJ) \
+ s_normRoundPackMToExtF80M$(OBJ) \
+ s_addExtF80M$(OBJ) \
+ s_compareNonnormExtF80M$(OBJ) \
+ s_isNaNF128M$(OBJ) \
+ s_tryPropagateNaNF128M$(OBJ) \
+ s_invalidF128M$(OBJ) \
+ s_shiftNormSigF128M$(OBJ) \
+ s_roundPackMToF128M$(OBJ) \
+ s_normRoundPackMToF128M$(OBJ) \
+ s_addF128M$(OBJ) \
+ s_mulAddF128M$(OBJ) \
+ softfloat_state$(OBJ) \
+ ui32_to_f16$(OBJ) \
+ ui32_to_f32$(OBJ) \
+ ui32_to_f64$(OBJ) \
+ ui32_to_extF80M$(OBJ) \
+ ui32_to_f128M$(OBJ) \
+ ui64_to_f16$(OBJ) \
+ ui64_to_f32$(OBJ) \
+ ui64_to_f64$(OBJ) \
+ ui64_to_extF80M$(OBJ) \
+ ui64_to_f128M$(OBJ) \
+ i32_to_f16$(OBJ) \
+ i32_to_f32$(OBJ) \
+ i32_to_f64$(OBJ) \
+ i32_to_extF80M$(OBJ) \
+ i32_to_f128M$(OBJ) \
+ i64_to_f16$(OBJ) \
+ i64_to_f32$(OBJ) \
+ i64_to_f64$(OBJ) \
+ i64_to_extF80M$(OBJ) \
+ i64_to_f128M$(OBJ) \
+ f16_to_ui32$(OBJ) \
+ f16_to_ui64$(OBJ) \
+ f16_to_i32$(OBJ) \
+ f16_to_i64$(OBJ) \
+ f16_to_ui32_r_minMag$(OBJ) \
+ f16_to_ui64_r_minMag$(OBJ) \
+ f16_to_i32_r_minMag$(OBJ) \
+ f16_to_i64_r_minMag$(OBJ) \
+ f16_to_f32$(OBJ) \
+ f16_to_f64$(OBJ) \
+ f16_to_extF80M$(OBJ) \
+ f16_to_f128M$(OBJ) \
+ f16_roundToInt$(OBJ) \
+ f16_add$(OBJ) \
+ f16_sub$(OBJ) \
+ f16_mul$(OBJ) \
+ f16_mulAdd$(OBJ) \
+ f16_div$(OBJ) \
+ f16_rem$(OBJ) \
+ f16_sqrt$(OBJ) \
+ f16_eq$(OBJ) \
+ f16_le$(OBJ) \
+ f16_lt$(OBJ) \
+ f16_eq_signaling$(OBJ) \
+ f16_le_quiet$(OBJ) \
+ f16_lt_quiet$(OBJ) \
+ f16_isSignalingNaN$(OBJ) \
+ f32_to_ui32$(OBJ) \
+ f32_to_ui64$(OBJ) \
+ f32_to_i32$(OBJ) \
+ f32_to_i64$(OBJ) \
+ f32_to_ui32_r_minMag$(OBJ) \
+ f32_to_ui64_r_minMag$(OBJ) \
+ f32_to_i32_r_minMag$(OBJ) \
+ f32_to_i64_r_minMag$(OBJ) \
+ f32_to_f16$(OBJ) \
+ f32_to_f64$(OBJ) \
+ f32_to_extF80M$(OBJ) \
+ f32_to_f128M$(OBJ) \
+ f32_roundToInt$(OBJ) \
+ f32_add$(OBJ) \
+ f32_sub$(OBJ) \
+ f32_mul$(OBJ) \
+ f32_mulAdd$(OBJ) \
+ f32_div$(OBJ) \
+ f32_rem$(OBJ) \
+ f32_sqrt$(OBJ) \
+ f32_eq$(OBJ) \
+ f32_le$(OBJ) \
+ f32_lt$(OBJ) \
+ f32_eq_signaling$(OBJ) \
+ f32_le_quiet$(OBJ) \
+ f32_lt_quiet$(OBJ) \
+ f32_isSignalingNaN$(OBJ) \
+ f64_to_ui32$(OBJ) \
+ f64_to_ui64$(OBJ) \
+ f64_to_i32$(OBJ) \
+ f64_to_i64$(OBJ) \
+ f64_to_ui32_r_minMag$(OBJ) \
+ f64_to_ui64_r_minMag$(OBJ) \
+ f64_to_i32_r_minMag$(OBJ) \
+ f64_to_i64_r_minMag$(OBJ) \
+ f64_to_f16$(OBJ) \
+ f64_to_f32$(OBJ) \
+ f64_to_extF80M$(OBJ) \
+ f64_to_f128M$(OBJ) \
+ f64_roundToInt$(OBJ) \
+ f64_add$(OBJ) \
+ f64_sub$(OBJ) \
+ f64_mul$(OBJ) \
+ f64_mulAdd$(OBJ) \
+ f64_div$(OBJ) \
+ f64_rem$(OBJ) \
+ f64_sqrt$(OBJ) \
+ f64_eq$(OBJ) \
+ f64_le$(OBJ) \
+ f64_lt$(OBJ) \
+ f64_eq_signaling$(OBJ) \
+ f64_le_quiet$(OBJ) \
+ f64_lt_quiet$(OBJ) \
+ f64_isSignalingNaN$(OBJ) \
+ extF80M_to_ui32$(OBJ) \
+ extF80M_to_ui64$(OBJ) \
+ extF80M_to_i32$(OBJ) \
+ extF80M_to_i64$(OBJ) \
+ extF80M_to_ui32_r_minMag$(OBJ) \
+ extF80M_to_ui64_r_minMag$(OBJ) \
+ extF80M_to_i32_r_minMag$(OBJ) \
+ extF80M_to_i64_r_minMag$(OBJ) \
+ extF80M_to_f16$(OBJ) \
+ extF80M_to_f32$(OBJ) \
+ extF80M_to_f64$(OBJ) \
+ extF80M_to_f128M$(OBJ) \
+ extF80M_roundToInt$(OBJ) \
+ extF80M_add$(OBJ) \
+ extF80M_sub$(OBJ) \
+ extF80M_mul$(OBJ) \
+ extF80M_div$(OBJ) \
+ extF80M_rem$(OBJ) \
+ extF80M_sqrt$(OBJ) \
+ extF80M_eq$(OBJ) \
+ extF80M_le$(OBJ) \
+ extF80M_lt$(OBJ) \
+ extF80M_eq_signaling$(OBJ) \
+ extF80M_le_quiet$(OBJ) \
+ extF80M_lt_quiet$(OBJ) \
+ f128M_to_ui32$(OBJ) \
+ f128M_to_ui64$(OBJ) \
+ f128M_to_i32$(OBJ) \
+ f128M_to_i64$(OBJ) \
+ f128M_to_ui32_r_minMag$(OBJ) \
+ f128M_to_ui64_r_minMag$(OBJ) \
+ f128M_to_i32_r_minMag$(OBJ) \
+ f128M_to_i64_r_minMag$(OBJ) \
+ f128M_to_f16$(OBJ) \
+ f128M_to_f32$(OBJ) \
+ f128M_to_f64$(OBJ) \
+ f128M_to_extF80M$(OBJ) \
+ f128M_roundToInt$(OBJ) \
+ f128M_add$(OBJ) \
+ f128M_sub$(OBJ) \
+ f128M_mul$(OBJ) \
+ f128M_mulAdd$(OBJ) \
+ f128M_div$(OBJ) \
+ f128M_rem$(OBJ) \
+ f128M_sqrt$(OBJ) \
+ f128M_eq$(OBJ) \
+ f128M_le$(OBJ) \
+ f128M_lt$(OBJ) \
+ f128M_eq_signaling$(OBJ) \
+ f128M_le_quiet$(OBJ) \
+ f128M_lt_quiet$(OBJ) \
+
+OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS)
+
+$(OBJS_ALL): \
+ $(OTHER_HEADERS) platform.h $(SOURCE_DIR)/include/primitiveTypes.h \
+ $(SOURCE_DIR)/include/primitives.h
+$(OBJS_SPECIALIZE) $(OBJS_OTHERS): \
+ $(SOURCE_DIR)/include/softfloat_types.h $(SOURCE_DIR)/include/internals.h \
+ $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/specialize.h \
+ $(SOURCE_DIR)/include/softfloat.h
+
+$(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$*.c
+
+$(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c
+
+softfloat$(LIB): $(OBJS_ALL)
+ $(DELETE) $@
+ $(MAKELIB) $^
+
+.PHONY: clean
+clean:
+ $(DELETE) $(OBJS_ALL) softfloat$(LIB)
+
diff --git a/src/libs/softfloat-3e/build/Linux-ARM-VFPv2-GCC/platform.h b/src/libs/softfloat-3e/build/Linux-ARM-VFPv2-GCC/platform.h
new file mode 100644
index 00000000..d514dbc4
--- /dev/null
+++ b/src/libs/softfloat-3e/build/Linux-ARM-VFPv2-GCC/platform.h
@@ -0,0 +1,53 @@
+
+/*============================================================================
+
+This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define LITTLEENDIAN 1
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef __GNUC_STDC_INLINE__
+#define INLINE inline
+#else
+#define INLINE extern inline
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define SOFTFLOAT_BUILTIN_CLZ 1
+#include "opts-GCC.h"
+
diff --git a/src/libs/softfloat-3e/build/Linux-x86_64-GCC/Makefile b/src/libs/softfloat-3e/build/Linux-x86_64-GCC/Makefile
new file mode 100644
index 00000000..2ee5dad8
--- /dev/null
+++ b/src/libs/softfloat-3e/build/Linux-x86_64-GCC/Makefile
@@ -0,0 +1,390 @@
+
+#=============================================================================
+#
+# This Makefile is part of the SoftFloat IEEE Floating-Point Arithmetic
+# Package, Release 3e, by John R. Hauser.
+#
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+# University of California. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions, and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions, and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# 3. Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#=============================================================================
+
+SOURCE_DIR ?= ../../source
+SPECIALIZE_TYPE ?= 8086-SSE
+
+SOFTFLOAT_OPTS ?= \
+ -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \
+ -DSOFTFLOAT_FAST_DIV64TO32
+
+DELETE = rm -f
+C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include
+COMPILE_C = \
+ gcc -c -Werror-implicit-function-declaration -DSOFTFLOAT_FAST_INT64 \
+ $(SOFTFLOAT_OPTS) $(C_INCLUDES) -O2 -o $@
+MAKELIB = ar crs $@
+
+OBJ = .o
+LIB = .a
+
+OTHER_HEADERS = $(SOURCE_DIR)/include/opts-GCC.h
+
+.PHONY: all
+all: softfloat$(LIB)
+
+OBJS_PRIMITIVES = \
+ s_eq128$(OBJ) \
+ s_le128$(OBJ) \
+ s_lt128$(OBJ) \
+ s_shortShiftLeft128$(OBJ) \
+ s_shortShiftRight128$(OBJ) \
+ s_shortShiftRightJam64$(OBJ) \
+ s_shortShiftRightJam64Extra$(OBJ) \
+ s_shortShiftRightJam128$(OBJ) \
+ s_shortShiftRightJam128Extra$(OBJ) \
+ s_shiftRightJam32$(OBJ) \
+ s_shiftRightJam64$(OBJ) \
+ s_shiftRightJam64Extra$(OBJ) \
+ s_shiftRightJam128$(OBJ) \
+ s_shiftRightJam128Extra$(OBJ) \
+ s_shiftRightJam256M$(OBJ) \
+ s_countLeadingZeros8$(OBJ) \
+ s_countLeadingZeros16$(OBJ) \
+ s_countLeadingZeros32$(OBJ) \
+ s_countLeadingZeros64$(OBJ) \
+ s_add128$(OBJ) \
+ s_add256M$(OBJ) \
+ s_sub128$(OBJ) \
+ s_sub256M$(OBJ) \
+ s_mul64ByShifted32To128$(OBJ) \
+ s_mul64To128$(OBJ) \
+ s_mul128By32$(OBJ) \
+ s_mul128To256M$(OBJ) \
+ s_approxRecip_1Ks$(OBJ) \
+ s_approxRecip32_1$(OBJ) \
+ s_approxRecipSqrt_1Ks$(OBJ) \
+ s_approxRecipSqrt32_1$(OBJ) \
+
+OBJS_SPECIALIZE = \
+ softfloat_raiseFlags$(OBJ) \
+ s_f16UIToCommonNaN$(OBJ) \
+ s_commonNaNToF16UI$(OBJ) \
+ s_propagateNaNF16UI$(OBJ) \
+ s_f32UIToCommonNaN$(OBJ) \
+ s_commonNaNToF32UI$(OBJ) \
+ s_propagateNaNF32UI$(OBJ) \
+ s_f64UIToCommonNaN$(OBJ) \
+ s_commonNaNToF64UI$(OBJ) \
+ s_propagateNaNF64UI$(OBJ) \
+ extF80M_isSignalingNaN$(OBJ) \
+ s_extF80UIToCommonNaN$(OBJ) \
+ s_commonNaNToExtF80UI$(OBJ) \
+ s_propagateNaNExtF80UI$(OBJ) \
+ f128M_isSignalingNaN$(OBJ) \
+ s_f128UIToCommonNaN$(OBJ) \
+ s_commonNaNToF128UI$(OBJ) \
+ s_propagateNaNF128UI$(OBJ) \
+
+OBJS_OTHERS = \
+ s_roundToUI32$(OBJ) \
+ s_roundToUI64$(OBJ) \
+ s_roundToI32$(OBJ) \
+ s_roundToI64$(OBJ) \
+ s_normSubnormalF16Sig$(OBJ) \
+ s_roundPackToF16$(OBJ) \
+ s_normRoundPackToF16$(OBJ) \
+ s_addMagsF16$(OBJ) \
+ s_subMagsF16$(OBJ) \
+ s_mulAddF16$(OBJ) \
+ s_normSubnormalF32Sig$(OBJ) \
+ s_roundPackToF32$(OBJ) \
+ s_normRoundPackToF32$(OBJ) \
+ s_addMagsF32$(OBJ) \
+ s_subMagsF32$(OBJ) \
+ s_mulAddF32$(OBJ) \
+ s_normSubnormalF64Sig$(OBJ) \
+ s_roundPackToF64$(OBJ) \
+ s_normRoundPackToF64$(OBJ) \
+ s_addMagsF64$(OBJ) \
+ s_subMagsF64$(OBJ) \
+ s_mulAddF64$(OBJ) \
+ s_normSubnormalExtF80Sig$(OBJ) \
+ s_roundPackToExtF80$(OBJ) \
+ s_normRoundPackToExtF80$(OBJ) \
+ s_addMagsExtF80$(OBJ) \
+ s_subMagsExtF80$(OBJ) \
+ s_normSubnormalF128Sig$(OBJ) \
+ s_roundPackToF128$(OBJ) \
+ s_normRoundPackToF128$(OBJ) \
+ s_addMagsF128$(OBJ) \
+ s_subMagsF128$(OBJ) \
+ s_mulAddF128$(OBJ) \
+ softfloat_state$(OBJ) \
+ ui32_to_f16$(OBJ) \
+ ui32_to_f32$(OBJ) \
+ ui32_to_f64$(OBJ) \
+ ui32_to_extF80$(OBJ) \
+ ui32_to_extF80M$(OBJ) \
+ ui32_to_f128$(OBJ) \
+ ui32_to_f128M$(OBJ) \
+ ui64_to_f16$(OBJ) \
+ ui64_to_f32$(OBJ) \
+ ui64_to_f64$(OBJ) \
+ ui64_to_extF80$(OBJ) \
+ ui64_to_extF80M$(OBJ) \
+ ui64_to_f128$(OBJ) \
+ ui64_to_f128M$(OBJ) \
+ i32_to_f16$(OBJ) \
+ i32_to_f32$(OBJ) \
+ i32_to_f64$(OBJ) \
+ i32_to_extF80$(OBJ) \
+ i32_to_extF80M$(OBJ) \
+ i32_to_f128$(OBJ) \
+ i32_to_f128M$(OBJ) \
+ i64_to_f16$(OBJ) \
+ i64_to_f32$(OBJ) \
+ i64_to_f64$(OBJ) \
+ i64_to_extF80$(OBJ) \
+ i64_to_extF80M$(OBJ) \
+ i64_to_f128$(OBJ) \
+ i64_to_f128M$(OBJ) \
+ f16_to_ui32$(OBJ) \
+ f16_to_ui64$(OBJ) \
+ f16_to_i32$(OBJ) \
+ f16_to_i64$(OBJ) \
+ f16_to_ui32_r_minMag$(OBJ) \
+ f16_to_ui64_r_minMag$(OBJ) \
+ f16_to_i32_r_minMag$(OBJ) \
+ f16_to_i64_r_minMag$(OBJ) \
+ f16_to_f32$(OBJ) \
+ f16_to_f64$(OBJ) \
+ f16_to_extF80$(OBJ) \
+ f16_to_extF80M$(OBJ) \
+ f16_to_f128$(OBJ) \
+ f16_to_f128M$(OBJ) \
+ f16_roundToInt$(OBJ) \
+ f16_add$(OBJ) \
+ f16_sub$(OBJ) \
+ f16_mul$(OBJ) \
+ f16_mulAdd$(OBJ) \
+ f16_div$(OBJ) \
+ f16_rem$(OBJ) \
+ f16_sqrt$(OBJ) \
+ f16_eq$(OBJ) \
+ f16_le$(OBJ) \
+ f16_lt$(OBJ) \
+ f16_eq_signaling$(OBJ) \
+ f16_le_quiet$(OBJ) \
+ f16_lt_quiet$(OBJ) \
+ f16_isSignalingNaN$(OBJ) \
+ f32_to_ui32$(OBJ) \
+ f32_to_ui64$(OBJ) \
+ f32_to_i32$(OBJ) \
+ f32_to_i64$(OBJ) \
+ f32_to_ui32_r_minMag$(OBJ) \
+ f32_to_ui64_r_minMag$(OBJ) \
+ f32_to_i32_r_minMag$(OBJ) \
+ f32_to_i64_r_minMag$(OBJ) \
+ f32_to_f16$(OBJ) \
+ f32_to_f64$(OBJ) \
+ f32_to_extF80$(OBJ) \
+ f32_to_extF80M$(OBJ) \
+ f32_to_f128$(OBJ) \
+ f32_to_f128M$(OBJ) \
+ f32_roundToInt$(OBJ) \
+ f32_add$(OBJ) \
+ f32_sub$(OBJ) \
+ f32_mul$(OBJ) \
+ f32_mulAdd$(OBJ) \
+ f32_div$(OBJ) \
+ f32_rem$(OBJ) \
+ f32_sqrt$(OBJ) \
+ f32_eq$(OBJ) \
+ f32_le$(OBJ) \
+ f32_lt$(OBJ) \
+ f32_eq_signaling$(OBJ) \
+ f32_le_quiet$(OBJ) \
+ f32_lt_quiet$(OBJ) \
+ f32_isSignalingNaN$(OBJ) \
+ f64_to_ui32$(OBJ) \
+ f64_to_ui64$(OBJ) \
+ f64_to_i32$(OBJ) \
+ f64_to_i64$(OBJ) \
+ f64_to_ui32_r_minMag$(OBJ) \
+ f64_to_ui64_r_minMag$(OBJ) \
+ f64_to_i32_r_minMag$(OBJ) \
+ f64_to_i64_r_minMag$(OBJ) \
+ f64_to_f16$(OBJ) \
+ f64_to_f32$(OBJ) \
+ f64_to_extF80$(OBJ) \
+ f64_to_extF80M$(OBJ) \
+ f64_to_f128$(OBJ) \
+ f64_to_f128M$(OBJ) \
+ f64_roundToInt$(OBJ) \
+ f64_add$(OBJ) \
+ f64_sub$(OBJ) \
+ f64_mul$(OBJ) \
+ f64_mulAdd$(OBJ) \
+ f64_div$(OBJ) \
+ f64_rem$(OBJ) \
+ f64_sqrt$(OBJ) \
+ f64_eq$(OBJ) \
+ f64_le$(OBJ) \
+ f64_lt$(OBJ) \
+ f64_eq_signaling$(OBJ) \
+ f64_le_quiet$(OBJ) \
+ f64_lt_quiet$(OBJ) \
+ f64_isSignalingNaN$(OBJ) \
+ extF80_to_ui32$(OBJ) \
+ extF80_to_ui64$(OBJ) \
+ extF80_to_i32$(OBJ) \
+ extF80_to_i64$(OBJ) \
+ extF80_to_ui32_r_minMag$(OBJ) \
+ extF80_to_ui64_r_minMag$(OBJ) \
+ extF80_to_i32_r_minMag$(OBJ) \
+ extF80_to_i64_r_minMag$(OBJ) \
+ extF80_to_f16$(OBJ) \
+ extF80_to_f32$(OBJ) \
+ extF80_to_f64$(OBJ) \
+ extF80_to_f128$(OBJ) \
+ extF80_roundToInt$(OBJ) \
+ extF80_add$(OBJ) \
+ extF80_sub$(OBJ) \
+ extF80_mul$(OBJ) \
+ extF80_div$(OBJ) \
+ extF80_rem$(OBJ) \
+ extF80_sqrt$(OBJ) \
+ extF80_eq$(OBJ) \
+ extF80_le$(OBJ) \
+ extF80_lt$(OBJ) \
+ extF80_eq_signaling$(OBJ) \
+ extF80_le_quiet$(OBJ) \
+ extF80_lt_quiet$(OBJ) \
+ extF80_isSignalingNaN$(OBJ) \
+ extF80M_to_ui32$(OBJ) \
+ extF80M_to_ui64$(OBJ) \
+ extF80M_to_i32$(OBJ) \
+ extF80M_to_i64$(OBJ) \
+ extF80M_to_ui32_r_minMag$(OBJ) \
+ extF80M_to_ui64_r_minMag$(OBJ) \
+ extF80M_to_i32_r_minMag$(OBJ) \
+ extF80M_to_i64_r_minMag$(OBJ) \
+ extF80M_to_f16$(OBJ) \
+ extF80M_to_f32$(OBJ) \
+ extF80M_to_f64$(OBJ) \
+ extF80M_to_f128M$(OBJ) \
+ extF80M_roundToInt$(OBJ) \
+ extF80M_add$(OBJ) \
+ extF80M_sub$(OBJ) \
+ extF80M_mul$(OBJ) \
+ extF80M_div$(OBJ) \
+ extF80M_rem$(OBJ) \
+ extF80M_sqrt$(OBJ) \
+ extF80M_eq$(OBJ) \
+ extF80M_le$(OBJ) \
+ extF80M_lt$(OBJ) \
+ extF80M_eq_signaling$(OBJ) \
+ extF80M_le_quiet$(OBJ) \
+ extF80M_lt_quiet$(OBJ) \
+ f128_to_ui32$(OBJ) \
+ f128_to_ui64$(OBJ) \
+ f128_to_i32$(OBJ) \
+ f128_to_i64$(OBJ) \
+ f128_to_ui32_r_minMag$(OBJ) \
+ f128_to_ui64_r_minMag$(OBJ) \
+ f128_to_i32_r_minMag$(OBJ) \
+ f128_to_i64_r_minMag$(OBJ) \
+ f128_to_f16$(OBJ) \
+ f128_to_f32$(OBJ) \
+ f128_to_extF80$(OBJ) \
+ f128_to_f64$(OBJ) \
+ f128_roundToInt$(OBJ) \
+ f128_add$(OBJ) \
+ f128_sub$(OBJ) \
+ f128_mul$(OBJ) \
+ f128_mulAdd$(OBJ) \
+ f128_div$(OBJ) \
+ f128_rem$(OBJ) \
+ f128_sqrt$(OBJ) \
+ f128_eq$(OBJ) \
+ f128_le$(OBJ) \
+ f128_lt$(OBJ) \
+ f128_eq_signaling$(OBJ) \
+ f128_le_quiet$(OBJ) \
+ f128_lt_quiet$(OBJ) \
+ f128_isSignalingNaN$(OBJ) \
+ f128M_to_ui32$(OBJ) \
+ f128M_to_ui64$(OBJ) \
+ f128M_to_i32$(OBJ) \
+ f128M_to_i64$(OBJ) \
+ f128M_to_ui32_r_minMag$(OBJ) \
+ f128M_to_ui64_r_minMag$(OBJ) \
+ f128M_to_i32_r_minMag$(OBJ) \
+ f128M_to_i64_r_minMag$(OBJ) \
+ f128M_to_f16$(OBJ) \
+ f128M_to_f32$(OBJ) \
+ f128M_to_extF80M$(OBJ) \
+ f128M_to_f64$(OBJ) \
+ f128M_roundToInt$(OBJ) \
+ f128M_add$(OBJ) \
+ f128M_sub$(OBJ) \
+ f128M_mul$(OBJ) \
+ f128M_mulAdd$(OBJ) \
+ f128M_div$(OBJ) \
+ f128M_rem$(OBJ) \
+ f128M_sqrt$(OBJ) \
+ f128M_eq$(OBJ) \
+ f128M_le$(OBJ) \
+ f128M_lt$(OBJ) \
+ f128M_eq_signaling$(OBJ) \
+ f128M_le_quiet$(OBJ) \
+ f128M_lt_quiet$(OBJ) \
+
+OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS)
+
+$(OBJS_ALL): \
+ $(OTHER_HEADERS) platform.h $(SOURCE_DIR)/include/primitiveTypes.h \
+ $(SOURCE_DIR)/include/primitives.h
+$(OBJS_SPECIALIZE) $(OBJS_OTHERS): \
+ $(SOURCE_DIR)/include/softfloat_types.h $(SOURCE_DIR)/include/internals.h \
+ $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/specialize.h \
+ $(SOURCE_DIR)/include/softfloat.h
+
+$(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$*.c
+
+$(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c
+
+softfloat$(LIB): $(OBJS_ALL)
+ $(DELETE) $@
+ $(MAKELIB) $^
+
+.PHONY: clean
+clean:
+ $(DELETE) $(OBJS_ALL) softfloat$(LIB)
+
diff --git a/src/libs/softfloat-3e/build/Linux-x86_64-GCC/platform.h b/src/libs/softfloat-3e/build/Linux-x86_64-GCC/platform.h
new file mode 100644
index 00000000..b83a26ce
--- /dev/null
+++ b/src/libs/softfloat-3e/build/Linux-x86_64-GCC/platform.h
@@ -0,0 +1,57 @@
+
+/*============================================================================
+
+This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define LITTLEENDIAN 1
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef VBOX /* we end up with unresolved externals otherwise */
+# define INLINE static inline
+#else
+#ifdef __GNUC_STDC_INLINE__
+#define INLINE inline
+#else
+#define INLINE extern inline
+#endif
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define SOFTFLOAT_BUILTIN_CLZ 1
+#define SOFTFLOAT_INTRINSIC_INT128 1
+#include "opts-GCC.h"
diff --git a/src/libs/softfloat-3e/build/Win32-MinGW/Makefile b/src/libs/softfloat-3e/build/Win32-MinGW/Makefile
new file mode 100644
index 00000000..faeb3972
--- /dev/null
+++ b/src/libs/softfloat-3e/build/Win32-MinGW/Makefile
@@ -0,0 +1,325 @@
+
+#=============================================================================
+#
+# This Makefile is part of the SoftFloat IEEE Floating-Point Arithmetic
+# Package, Release 3e, by John R. Hauser.
+#
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+# University of California. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions, and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions, and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# 3. Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#=============================================================================
+
+SOURCE_DIR ?= ../../source
+SPECIALIZE_TYPE ?= 8086
+
+SOFTFLOAT_OPTS ?= \
+ -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \
+ -DSOFTFLOAT_FAST_DIV64TO32
+
+DELETE = rm -f
+C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include
+COMPILE_C = \
+ gcc -c -Werror-implicit-function-declaration $(SOFTFLOAT_OPTS) \
+ $(C_INCLUDES) -O2 -o $@
+MAKELIB = ar crs $@
+
+OBJ = .o
+LIB = .a
+
+OTHER_HEADERS =
+
+.PHONY: all
+all: softfloat$(LIB)
+
+OBJS_PRIMITIVES = \
+ s_compare96M$(OBJ) \
+ s_compare128M$(OBJ) \
+ s_shortShiftLeft64To96M$(OBJ) \
+ s_shortShiftLeftM$(OBJ) \
+ s_shiftLeftM$(OBJ) \
+ s_shortShiftRightM$(OBJ) \
+ s_shortShiftRightJam64$(OBJ) \
+ s_shortShiftRightJamM$(OBJ) \
+ s_shiftRightJam32$(OBJ) \
+ s_shiftRightJam64$(OBJ) \
+ s_shiftRightJamM$(OBJ) \
+ s_shiftRightM$(OBJ) \
+ s_countLeadingZeros8$(OBJ) \
+ s_countLeadingZeros16$(OBJ) \
+ s_countLeadingZeros32$(OBJ) \
+ s_countLeadingZeros64$(OBJ) \
+ s_addM$(OBJ) \
+ s_addCarryM$(OBJ) \
+ s_addComplCarryM$(OBJ) \
+ s_negXM$(OBJ) \
+ s_sub1XM$(OBJ) \
+ s_subM$(OBJ) \
+ s_mul64To128M$(OBJ) \
+ s_mul128MTo256M$(OBJ) \
+ s_approxRecip_1Ks$(OBJ) \
+ s_approxRecip32_1$(OBJ) \
+ s_approxRecipSqrt_1Ks$(OBJ) \
+ s_approxRecipSqrt32_1$(OBJ) \
+ s_remStepMBy32$(OBJ) \
+
+OBJS_SPECIALIZE = \
+ softfloat_raiseFlags$(OBJ) \
+ s_f16UIToCommonNaN$(OBJ) \
+ s_commonNaNToF16UI$(OBJ) \
+ s_propagateNaNF16UI$(OBJ) \
+ s_f32UIToCommonNaN$(OBJ) \
+ s_commonNaNToF32UI$(OBJ) \
+ s_propagateNaNF32UI$(OBJ) \
+ s_f64UIToCommonNaN$(OBJ) \
+ s_commonNaNToF64UI$(OBJ) \
+ s_propagateNaNF64UI$(OBJ) \
+ extF80M_isSignalingNaN$(OBJ) \
+ s_extF80MToCommonNaN$(OBJ) \
+ s_commonNaNToExtF80M$(OBJ) \
+ s_propagateNaNExtF80M$(OBJ) \
+ f128M_isSignalingNaN$(OBJ) \
+ s_f128MToCommonNaN$(OBJ) \
+ s_commonNaNToF128M$(OBJ) \
+ s_propagateNaNF128M$(OBJ) \
+
+OBJS_OTHERS = \
+ s_roundToUI32$(OBJ) \
+ s_roundMToUI64$(OBJ) \
+ s_roundToI32$(OBJ) \
+ s_roundMToI64$(OBJ) \
+ s_normSubnormalF16Sig$(OBJ) \
+ s_roundPackToF16$(OBJ) \
+ s_normRoundPackToF16$(OBJ) \
+ s_addMagsF16$(OBJ) \
+ s_subMagsF16$(OBJ) \
+ s_mulAddF16$(OBJ) \
+ s_normSubnormalF32Sig$(OBJ) \
+ s_roundPackToF32$(OBJ) \
+ s_normRoundPackToF32$(OBJ) \
+ s_addMagsF32$(OBJ) \
+ s_subMagsF32$(OBJ) \
+ s_mulAddF32$(OBJ) \
+ s_normSubnormalF64Sig$(OBJ) \
+ s_roundPackToF64$(OBJ) \
+ s_normRoundPackToF64$(OBJ) \
+ s_addMagsF64$(OBJ) \
+ s_subMagsF64$(OBJ) \
+ s_mulAddF64$(OBJ) \
+ s_tryPropagateNaNExtF80M$(OBJ) \
+ s_invalidExtF80M$(OBJ) \
+ s_normExtF80SigM$(OBJ) \
+ s_roundPackMToExtF80M$(OBJ) \
+ s_normRoundPackMToExtF80M$(OBJ) \
+ s_addExtF80M$(OBJ) \
+ s_compareNonnormExtF80M$(OBJ) \
+ s_isNaNF128M$(OBJ) \
+ s_tryPropagateNaNF128M$(OBJ) \
+ s_invalidF128M$(OBJ) \
+ s_shiftNormSigF128M$(OBJ) \
+ s_roundPackMToF128M$(OBJ) \
+ s_normRoundPackMToF128M$(OBJ) \
+ s_addF128M$(OBJ) \
+ s_mulAddF128M$(OBJ) \
+ softfloat_state$(OBJ) \
+ ui32_to_f16$(OBJ) \
+ ui32_to_f32$(OBJ) \
+ ui32_to_f64$(OBJ) \
+ ui32_to_extF80M$(OBJ) \
+ ui32_to_f128M$(OBJ) \
+ ui64_to_f16$(OBJ) \
+ ui64_to_f32$(OBJ) \
+ ui64_to_f64$(OBJ) \
+ ui64_to_extF80M$(OBJ) \
+ ui64_to_f128M$(OBJ) \
+ i32_to_f16$(OBJ) \
+ i32_to_f32$(OBJ) \
+ i32_to_f64$(OBJ) \
+ i32_to_extF80M$(OBJ) \
+ i32_to_f128M$(OBJ) \
+ i64_to_f16$(OBJ) \
+ i64_to_f32$(OBJ) \
+ i64_to_f64$(OBJ) \
+ i64_to_extF80M$(OBJ) \
+ i64_to_f128M$(OBJ) \
+ f16_to_ui32$(OBJ) \
+ f16_to_ui64$(OBJ) \
+ f16_to_i32$(OBJ) \
+ f16_to_i64$(OBJ) \
+ f16_to_ui32_r_minMag$(OBJ) \
+ f16_to_ui64_r_minMag$(OBJ) \
+ f16_to_i32_r_minMag$(OBJ) \
+ f16_to_i64_r_minMag$(OBJ) \
+ f16_to_f32$(OBJ) \
+ f16_to_f64$(OBJ) \
+ f16_to_extF80M$(OBJ) \
+ f16_to_f128M$(OBJ) \
+ f16_roundToInt$(OBJ) \
+ f16_add$(OBJ) \
+ f16_sub$(OBJ) \
+ f16_mul$(OBJ) \
+ f16_mulAdd$(OBJ) \
+ f16_div$(OBJ) \
+ f16_rem$(OBJ) \
+ f16_sqrt$(OBJ) \
+ f16_eq$(OBJ) \
+ f16_le$(OBJ) \
+ f16_lt$(OBJ) \
+ f16_eq_signaling$(OBJ) \
+ f16_le_quiet$(OBJ) \
+ f16_lt_quiet$(OBJ) \
+ f16_isSignalingNaN$(OBJ) \
+ f32_to_ui32$(OBJ) \
+ f32_to_ui64$(OBJ) \
+ f32_to_i32$(OBJ) \
+ f32_to_i64$(OBJ) \
+ f32_to_ui32_r_minMag$(OBJ) \
+ f32_to_ui64_r_minMag$(OBJ) \
+ f32_to_i32_r_minMag$(OBJ) \
+ f32_to_i64_r_minMag$(OBJ) \
+ f32_to_f16$(OBJ) \
+ f32_to_f64$(OBJ) \
+ f32_to_extF80M$(OBJ) \
+ f32_to_f128M$(OBJ) \
+ f32_roundToInt$(OBJ) \
+ f32_add$(OBJ) \
+ f32_sub$(OBJ) \
+ f32_mul$(OBJ) \
+ f32_mulAdd$(OBJ) \
+ f32_div$(OBJ) \
+ f32_rem$(OBJ) \
+ f32_sqrt$(OBJ) \
+ f32_eq$(OBJ) \
+ f32_le$(OBJ) \
+ f32_lt$(OBJ) \
+ f32_eq_signaling$(OBJ) \
+ f32_le_quiet$(OBJ) \
+ f32_lt_quiet$(OBJ) \
+ f32_isSignalingNaN$(OBJ) \
+ f64_to_ui32$(OBJ) \
+ f64_to_ui64$(OBJ) \
+ f64_to_i32$(OBJ) \
+ f64_to_i64$(OBJ) \
+ f64_to_ui32_r_minMag$(OBJ) \
+ f64_to_ui64_r_minMag$(OBJ) \
+ f64_to_i32_r_minMag$(OBJ) \
+ f64_to_i64_r_minMag$(OBJ) \
+ f64_to_f16$(OBJ) \
+ f64_to_f32$(OBJ) \
+ f64_to_extF80M$(OBJ) \
+ f64_to_f128M$(OBJ) \
+ f64_roundToInt$(OBJ) \
+ f64_add$(OBJ) \
+ f64_sub$(OBJ) \
+ f64_mul$(OBJ) \
+ f64_mulAdd$(OBJ) \
+ f64_div$(OBJ) \
+ f64_rem$(OBJ) \
+ f64_sqrt$(OBJ) \
+ f64_eq$(OBJ) \
+ f64_le$(OBJ) \
+ f64_lt$(OBJ) \
+ f64_eq_signaling$(OBJ) \
+ f64_le_quiet$(OBJ) \
+ f64_lt_quiet$(OBJ) \
+ f64_isSignalingNaN$(OBJ) \
+ extF80M_to_ui32$(OBJ) \
+ extF80M_to_ui64$(OBJ) \
+ extF80M_to_i32$(OBJ) \
+ extF80M_to_i64$(OBJ) \
+ extF80M_to_ui32_r_minMag$(OBJ) \
+ extF80M_to_ui64_r_minMag$(OBJ) \
+ extF80M_to_i32_r_minMag$(OBJ) \
+ extF80M_to_i64_r_minMag$(OBJ) \
+ extF80M_to_f16$(OBJ) \
+ extF80M_to_f32$(OBJ) \
+ extF80M_to_f64$(OBJ) \
+ extF80M_to_f128M$(OBJ) \
+ extF80M_roundToInt$(OBJ) \
+ extF80M_add$(OBJ) \
+ extF80M_sub$(OBJ) \
+ extF80M_mul$(OBJ) \
+ extF80M_div$(OBJ) \
+ extF80M_rem$(OBJ) \
+ extF80M_sqrt$(OBJ) \
+ extF80M_eq$(OBJ) \
+ extF80M_le$(OBJ) \
+ extF80M_lt$(OBJ) \
+ extF80M_eq_signaling$(OBJ) \
+ extF80M_le_quiet$(OBJ) \
+ extF80M_lt_quiet$(OBJ) \
+ f128M_to_ui32$(OBJ) \
+ f128M_to_ui64$(OBJ) \
+ f128M_to_i32$(OBJ) \
+ f128M_to_i64$(OBJ) \
+ f128M_to_ui32_r_minMag$(OBJ) \
+ f128M_to_ui64_r_minMag$(OBJ) \
+ f128M_to_i32_r_minMag$(OBJ) \
+ f128M_to_i64_r_minMag$(OBJ) \
+ f128M_to_f16$(OBJ) \
+ f128M_to_f32$(OBJ) \
+ f128M_to_f64$(OBJ) \
+ f128M_to_extF80M$(OBJ) \
+ f128M_roundToInt$(OBJ) \
+ f128M_add$(OBJ) \
+ f128M_sub$(OBJ) \
+ f128M_mul$(OBJ) \
+ f128M_mulAdd$(OBJ) \
+ f128M_div$(OBJ) \
+ f128M_rem$(OBJ) \
+ f128M_sqrt$(OBJ) \
+ f128M_eq$(OBJ) \
+ f128M_le$(OBJ) \
+ f128M_lt$(OBJ) \
+ f128M_eq_signaling$(OBJ) \
+ f128M_le_quiet$(OBJ) \
+ f128M_lt_quiet$(OBJ) \
+
+OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS)
+
+$(OBJS_ALL): \
+ $(OTHER_HEADERS) platform.h $(SOURCE_DIR)/include/primitiveTypes.h \
+ $(SOURCE_DIR)/include/primitives.h
+$(OBJS_SPECIALIZE) $(OBJS_OTHERS): \
+ $(SOURCE_DIR)/include/softfloat_types.h $(SOURCE_DIR)/include/internals.h \
+ $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/specialize.h \
+ $(SOURCE_DIR)/include/softfloat.h
+
+$(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$*.c
+
+$(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c
+
+softfloat$(LIB): $(OBJS_ALL)
+ $(DELETE) $@
+ $(MAKELIB) $^
+
+.PHONY: clean
+clean:
+ $(DELETE) $(OBJS_ALL) softfloat$(LIB)
+
diff --git a/src/libs/softfloat-3e/build/Win32-MinGW/platform.h b/src/libs/softfloat-3e/build/Win32-MinGW/platform.h
new file mode 100644
index 00000000..d514dbc4
--- /dev/null
+++ b/src/libs/softfloat-3e/build/Win32-MinGW/platform.h
@@ -0,0 +1,53 @@
+
+/*============================================================================
+
+This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define LITTLEENDIAN 1
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef __GNUC_STDC_INLINE__
+#define INLINE inline
+#else
+#define INLINE extern inline
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define SOFTFLOAT_BUILTIN_CLZ 1
+#include "opts-GCC.h"
+
diff --git a/src/libs/softfloat-3e/build/Win32-SSE2-MinGW/Makefile b/src/libs/softfloat-3e/build/Win32-SSE2-MinGW/Makefile
new file mode 100644
index 00000000..ced977b6
--- /dev/null
+++ b/src/libs/softfloat-3e/build/Win32-SSE2-MinGW/Makefile
@@ -0,0 +1,325 @@
+
+#=============================================================================
+#
+# This Makefile is part of the SoftFloat IEEE Floating-Point Arithmetic
+# Package, Release 3e, by John R. Hauser.
+#
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+# University of California. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions, and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions, and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# 3. Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#=============================================================================
+
+SOURCE_DIR ?= ../../source
+SPECIALIZE_TYPE ?= 8086-SSE
+
+SOFTFLOAT_OPTS ?= \
+ -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \
+ -DSOFTFLOAT_FAST_DIV64TO32
+
+DELETE = rm -f
+C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include
+COMPILE_C = \
+ gcc -c -Werror-implicit-function-declaration $(SOFTFLOAT_OPTS) \
+ $(C_INCLUDES) -O2 -o $@
+MAKELIB = ar crs $@
+
+OBJ = .o
+LIB = .a
+
+OTHER_HEADERS =
+
+.PHONY: all
+all: softfloat$(LIB)
+
+OBJS_PRIMITIVES = \
+ s_compare96M$(OBJ) \
+ s_compare128M$(OBJ) \
+ s_shortShiftLeft64To96M$(OBJ) \
+ s_shortShiftLeftM$(OBJ) \
+ s_shiftLeftM$(OBJ) \
+ s_shortShiftRightM$(OBJ) \
+ s_shortShiftRightJam64$(OBJ) \
+ s_shortShiftRightJamM$(OBJ) \
+ s_shiftRightJam32$(OBJ) \
+ s_shiftRightJam64$(OBJ) \
+ s_shiftRightJamM$(OBJ) \
+ s_shiftRightM$(OBJ) \
+ s_countLeadingZeros8$(OBJ) \
+ s_countLeadingZeros16$(OBJ) \
+ s_countLeadingZeros32$(OBJ) \
+ s_countLeadingZeros64$(OBJ) \
+ s_addM$(OBJ) \
+ s_addCarryM$(OBJ) \
+ s_addComplCarryM$(OBJ) \
+ s_negXM$(OBJ) \
+ s_sub1XM$(OBJ) \
+ s_subM$(OBJ) \
+ s_mul64To128M$(OBJ) \
+ s_mul128MTo256M$(OBJ) \
+ s_approxRecip_1Ks$(OBJ) \
+ s_approxRecip32_1$(OBJ) \
+ s_approxRecipSqrt_1Ks$(OBJ) \
+ s_approxRecipSqrt32_1$(OBJ) \
+ s_remStepMBy32$(OBJ) \
+
+OBJS_SPECIALIZE = \
+ softfloat_raiseFlags$(OBJ) \
+ s_f16UIToCommonNaN$(OBJ) \
+ s_commonNaNToF16UI$(OBJ) \
+ s_propagateNaNF16UI$(OBJ) \
+ s_f32UIToCommonNaN$(OBJ) \
+ s_commonNaNToF32UI$(OBJ) \
+ s_propagateNaNF32UI$(OBJ) \
+ s_f64UIToCommonNaN$(OBJ) \
+ s_commonNaNToF64UI$(OBJ) \
+ s_propagateNaNF64UI$(OBJ) \
+ extF80M_isSignalingNaN$(OBJ) \
+ s_extF80MToCommonNaN$(OBJ) \
+ s_commonNaNToExtF80M$(OBJ) \
+ s_propagateNaNExtF80M$(OBJ) \
+ f128M_isSignalingNaN$(OBJ) \
+ s_f128MToCommonNaN$(OBJ) \
+ s_commonNaNToF128M$(OBJ) \
+ s_propagateNaNF128M$(OBJ) \
+
+OBJS_OTHERS = \
+ s_roundToUI32$(OBJ) \
+ s_roundMToUI64$(OBJ) \
+ s_roundToI32$(OBJ) \
+ s_roundMToI64$(OBJ) \
+ s_normSubnormalF16Sig$(OBJ) \
+ s_roundPackToF16$(OBJ) \
+ s_normRoundPackToF16$(OBJ) \
+ s_addMagsF16$(OBJ) \
+ s_subMagsF16$(OBJ) \
+ s_mulAddF16$(OBJ) \
+ s_normSubnormalF32Sig$(OBJ) \
+ s_roundPackToF32$(OBJ) \
+ s_normRoundPackToF32$(OBJ) \
+ s_addMagsF32$(OBJ) \
+ s_subMagsF32$(OBJ) \
+ s_mulAddF32$(OBJ) \
+ s_normSubnormalF64Sig$(OBJ) \
+ s_roundPackToF64$(OBJ) \
+ s_normRoundPackToF64$(OBJ) \
+ s_addMagsF64$(OBJ) \
+ s_subMagsF64$(OBJ) \
+ s_mulAddF64$(OBJ) \
+ s_tryPropagateNaNExtF80M$(OBJ) \
+ s_invalidExtF80M$(OBJ) \
+ s_normExtF80SigM$(OBJ) \
+ s_roundPackMToExtF80M$(OBJ) \
+ s_normRoundPackMToExtF80M$(OBJ) \
+ s_addExtF80M$(OBJ) \
+ s_compareNonnormExtF80M$(OBJ) \
+ s_isNaNF128M$(OBJ) \
+ s_tryPropagateNaNF128M$(OBJ) \
+ s_invalidF128M$(OBJ) \
+ s_shiftNormSigF128M$(OBJ) \
+ s_roundPackMToF128M$(OBJ) \
+ s_normRoundPackMToF128M$(OBJ) \
+ s_addF128M$(OBJ) \
+ s_mulAddF128M$(OBJ) \
+ softfloat_state$(OBJ) \
+ ui32_to_f16$(OBJ) \
+ ui32_to_f32$(OBJ) \
+ ui32_to_f64$(OBJ) \
+ ui32_to_extF80M$(OBJ) \
+ ui32_to_f128M$(OBJ) \
+ ui64_to_f16$(OBJ) \
+ ui64_to_f32$(OBJ) \
+ ui64_to_f64$(OBJ) \
+ ui64_to_extF80M$(OBJ) \
+ ui64_to_f128M$(OBJ) \
+ i32_to_f16$(OBJ) \
+ i32_to_f32$(OBJ) \
+ i32_to_f64$(OBJ) \
+ i32_to_extF80M$(OBJ) \
+ i32_to_f128M$(OBJ) \
+ i64_to_f16$(OBJ) \
+ i64_to_f32$(OBJ) \
+ i64_to_f64$(OBJ) \
+ i64_to_extF80M$(OBJ) \
+ i64_to_f128M$(OBJ) \
+ f16_to_ui32$(OBJ) \
+ f16_to_ui64$(OBJ) \
+ f16_to_i32$(OBJ) \
+ f16_to_i64$(OBJ) \
+ f16_to_ui32_r_minMag$(OBJ) \
+ f16_to_ui64_r_minMag$(OBJ) \
+ f16_to_i32_r_minMag$(OBJ) \
+ f16_to_i64_r_minMag$(OBJ) \
+ f16_to_f32$(OBJ) \
+ f16_to_f64$(OBJ) \
+ f16_to_extF80M$(OBJ) \
+ f16_to_f128M$(OBJ) \
+ f16_roundToInt$(OBJ) \
+ f16_add$(OBJ) \
+ f16_sub$(OBJ) \
+ f16_mul$(OBJ) \
+ f16_mulAdd$(OBJ) \
+ f16_div$(OBJ) \
+ f16_rem$(OBJ) \
+ f16_sqrt$(OBJ) \
+ f16_eq$(OBJ) \
+ f16_le$(OBJ) \
+ f16_lt$(OBJ) \
+ f16_eq_signaling$(OBJ) \
+ f16_le_quiet$(OBJ) \
+ f16_lt_quiet$(OBJ) \
+ f16_isSignalingNaN$(OBJ) \
+ f32_to_ui32$(OBJ) \
+ f32_to_ui64$(OBJ) \
+ f32_to_i32$(OBJ) \
+ f32_to_i64$(OBJ) \
+ f32_to_ui32_r_minMag$(OBJ) \
+ f32_to_ui64_r_minMag$(OBJ) \
+ f32_to_i32_r_minMag$(OBJ) \
+ f32_to_i64_r_minMag$(OBJ) \
+ f32_to_f16$(OBJ) \
+ f32_to_f64$(OBJ) \
+ f32_to_extF80M$(OBJ) \
+ f32_to_f128M$(OBJ) \
+ f32_roundToInt$(OBJ) \
+ f32_add$(OBJ) \
+ f32_sub$(OBJ) \
+ f32_mul$(OBJ) \
+ f32_mulAdd$(OBJ) \
+ f32_div$(OBJ) \
+ f32_rem$(OBJ) \
+ f32_sqrt$(OBJ) \
+ f32_eq$(OBJ) \
+ f32_le$(OBJ) \
+ f32_lt$(OBJ) \
+ f32_eq_signaling$(OBJ) \
+ f32_le_quiet$(OBJ) \
+ f32_lt_quiet$(OBJ) \
+ f32_isSignalingNaN$(OBJ) \
+ f64_to_ui32$(OBJ) \
+ f64_to_ui64$(OBJ) \
+ f64_to_i32$(OBJ) \
+ f64_to_i64$(OBJ) \
+ f64_to_ui32_r_minMag$(OBJ) \
+ f64_to_ui64_r_minMag$(OBJ) \
+ f64_to_i32_r_minMag$(OBJ) \
+ f64_to_i64_r_minMag$(OBJ) \
+ f64_to_f16$(OBJ) \
+ f64_to_f32$(OBJ) \
+ f64_to_extF80M$(OBJ) \
+ f64_to_f128M$(OBJ) \
+ f64_roundToInt$(OBJ) \
+ f64_add$(OBJ) \
+ f64_sub$(OBJ) \
+ f64_mul$(OBJ) \
+ f64_mulAdd$(OBJ) \
+ f64_div$(OBJ) \
+ f64_rem$(OBJ) \
+ f64_sqrt$(OBJ) \
+ f64_eq$(OBJ) \
+ f64_le$(OBJ) \
+ f64_lt$(OBJ) \
+ f64_eq_signaling$(OBJ) \
+ f64_le_quiet$(OBJ) \
+ f64_lt_quiet$(OBJ) \
+ f64_isSignalingNaN$(OBJ) \
+ extF80M_to_ui32$(OBJ) \
+ extF80M_to_ui64$(OBJ) \
+ extF80M_to_i32$(OBJ) \
+ extF80M_to_i64$(OBJ) \
+ extF80M_to_ui32_r_minMag$(OBJ) \
+ extF80M_to_ui64_r_minMag$(OBJ) \
+ extF80M_to_i32_r_minMag$(OBJ) \
+ extF80M_to_i64_r_minMag$(OBJ) \
+ extF80M_to_f16$(OBJ) \
+ extF80M_to_f32$(OBJ) \
+ extF80M_to_f64$(OBJ) \
+ extF80M_to_f128M$(OBJ) \
+ extF80M_roundToInt$(OBJ) \
+ extF80M_add$(OBJ) \
+ extF80M_sub$(OBJ) \
+ extF80M_mul$(OBJ) \
+ extF80M_div$(OBJ) \
+ extF80M_rem$(OBJ) \
+ extF80M_sqrt$(OBJ) \
+ extF80M_eq$(OBJ) \
+ extF80M_le$(OBJ) \
+ extF80M_lt$(OBJ) \
+ extF80M_eq_signaling$(OBJ) \
+ extF80M_le_quiet$(OBJ) \
+ extF80M_lt_quiet$(OBJ) \
+ f128M_to_ui32$(OBJ) \
+ f128M_to_ui64$(OBJ) \
+ f128M_to_i32$(OBJ) \
+ f128M_to_i64$(OBJ) \
+ f128M_to_ui32_r_minMag$(OBJ) \
+ f128M_to_ui64_r_minMag$(OBJ) \
+ f128M_to_i32_r_minMag$(OBJ) \
+ f128M_to_i64_r_minMag$(OBJ) \
+ f128M_to_f16$(OBJ) \
+ f128M_to_f32$(OBJ) \
+ f128M_to_f64$(OBJ) \
+ f128M_to_extF80M$(OBJ) \
+ f128M_roundToInt$(OBJ) \
+ f128M_add$(OBJ) \
+ f128M_sub$(OBJ) \
+ f128M_mul$(OBJ) \
+ f128M_mulAdd$(OBJ) \
+ f128M_div$(OBJ) \
+ f128M_rem$(OBJ) \
+ f128M_sqrt$(OBJ) \
+ f128M_eq$(OBJ) \
+ f128M_le$(OBJ) \
+ f128M_lt$(OBJ) \
+ f128M_eq_signaling$(OBJ) \
+ f128M_le_quiet$(OBJ) \
+ f128M_lt_quiet$(OBJ) \
+
+OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS)
+
+$(OBJS_ALL): \
+ $(OTHER_HEADERS) platform.h $(SOURCE_DIR)/include/primitiveTypes.h \
+ $(SOURCE_DIR)/include/primitives.h
+$(OBJS_SPECIALIZE) $(OBJS_OTHERS): \
+ $(SOURCE_DIR)/include/softfloat_types.h $(SOURCE_DIR)/include/internals.h \
+ $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/specialize.h \
+ $(SOURCE_DIR)/include/softfloat.h
+
+$(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$*.c
+
+$(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c
+
+softfloat$(LIB): $(OBJS_ALL)
+ $(DELETE) $@
+ $(MAKELIB) $^
+
+.PHONY: clean
+clean:
+ $(DELETE) $(OBJS_ALL) softfloat$(LIB)
+
diff --git a/src/libs/softfloat-3e/build/Win32-SSE2-MinGW/platform.h b/src/libs/softfloat-3e/build/Win32-SSE2-MinGW/platform.h
new file mode 100644
index 00000000..d514dbc4
--- /dev/null
+++ b/src/libs/softfloat-3e/build/Win32-SSE2-MinGW/platform.h
@@ -0,0 +1,53 @@
+
+/*============================================================================
+
+This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define LITTLEENDIAN 1
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef __GNUC_STDC_INLINE__
+#define INLINE inline
+#else
+#define INLINE extern inline
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define SOFTFLOAT_BUILTIN_CLZ 1
+#include "opts-GCC.h"
+
diff --git a/src/libs/softfloat-3e/build/Win64-MinGW-w64/Makefile b/src/libs/softfloat-3e/build/Win64-MinGW-w64/Makefile
new file mode 100644
index 00000000..cc5bc0c5
--- /dev/null
+++ b/src/libs/softfloat-3e/build/Win64-MinGW-w64/Makefile
@@ -0,0 +1,390 @@
+
+#=============================================================================
+#
+# This Makefile is part of the SoftFloat IEEE Floating-Point Arithmetic
+# Package, Release 3e, by John R. Hauser.
+#
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+# University of California. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions, and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions, and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# 3. Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#=============================================================================
+
+SOURCE_DIR ?= ../../source
+SPECIALIZE_TYPE ?= 8086-SSE
+
+SOFTFLOAT_OPTS ?= \
+ -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \
+ -DSOFTFLOAT_FAST_DIV64TO32
+
+DELETE = rm -f
+C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include
+COMPILE_C = \
+ x86_64-w64-mingw32-gcc -c -Werror-implicit-function-declaration \
+ -DSOFTFLOAT_FAST_INT64 $(SOFTFLOAT_OPTS) $(C_INCLUDES) -O2 -o $@
+MAKELIB = x86_64-w64-mingw32-ar crs $@
+
+OBJ = .o
+LIB = .a
+
+OTHER_HEADERS = $(SOURCE_DIR)/include/opts-GCC.h
+
+.PHONY: all
+all: softfloat$(LIB)
+
+OBJS_PRIMITIVES = \
+ s_eq128$(OBJ) \
+ s_le128$(OBJ) \
+ s_lt128$(OBJ) \
+ s_shortShiftLeft128$(OBJ) \
+ s_shortShiftRight128$(OBJ) \
+ s_shortShiftRightJam64$(OBJ) \
+ s_shortShiftRightJam64Extra$(OBJ) \
+ s_shortShiftRightJam128$(OBJ) \
+ s_shortShiftRightJam128Extra$(OBJ) \
+ s_shiftRightJam32$(OBJ) \
+ s_shiftRightJam64$(OBJ) \
+ s_shiftRightJam64Extra$(OBJ) \
+ s_shiftRightJam128$(OBJ) \
+ s_shiftRightJam128Extra$(OBJ) \
+ s_shiftRightJam256M$(OBJ) \
+ s_countLeadingZeros8$(OBJ) \
+ s_countLeadingZeros16$(OBJ) \
+ s_countLeadingZeros32$(OBJ) \
+ s_countLeadingZeros64$(OBJ) \
+ s_add128$(OBJ) \
+ s_add256M$(OBJ) \
+ s_sub128$(OBJ) \
+ s_sub256M$(OBJ) \
+ s_mul64ByShifted32To128$(OBJ) \
+ s_mul64To128$(OBJ) \
+ s_mul128By32$(OBJ) \
+ s_mul128To256M$(OBJ) \
+ s_approxRecip_1Ks$(OBJ) \
+ s_approxRecip32_1$(OBJ) \
+ s_approxRecipSqrt_1Ks$(OBJ) \
+ s_approxRecipSqrt32_1$(OBJ) \
+
+OBJS_SPECIALIZE = \
+ softfloat_raiseFlags$(OBJ) \
+ s_f16UIToCommonNaN$(OBJ) \
+ s_commonNaNToF16UI$(OBJ) \
+ s_propagateNaNF16UI$(OBJ) \
+ s_f32UIToCommonNaN$(OBJ) \
+ s_commonNaNToF32UI$(OBJ) \
+ s_propagateNaNF32UI$(OBJ) \
+ s_f64UIToCommonNaN$(OBJ) \
+ s_commonNaNToF64UI$(OBJ) \
+ s_propagateNaNF64UI$(OBJ) \
+ extF80M_isSignalingNaN$(OBJ) \
+ s_extF80UIToCommonNaN$(OBJ) \
+ s_commonNaNToExtF80UI$(OBJ) \
+ s_propagateNaNExtF80UI$(OBJ) \
+ f128M_isSignalingNaN$(OBJ) \
+ s_f128UIToCommonNaN$(OBJ) \
+ s_commonNaNToF128UI$(OBJ) \
+ s_propagateNaNF128UI$(OBJ) \
+
+OBJS_OTHERS = \
+ s_roundToUI32$(OBJ) \
+ s_roundToUI64$(OBJ) \
+ s_roundToI32$(OBJ) \
+ s_roundToI64$(OBJ) \
+ s_normSubnormalF16Sig$(OBJ) \
+ s_roundPackToF16$(OBJ) \
+ s_normRoundPackToF16$(OBJ) \
+ s_addMagsF16$(OBJ) \
+ s_subMagsF16$(OBJ) \
+ s_mulAddF16$(OBJ) \
+ s_normSubnormalF32Sig$(OBJ) \
+ s_roundPackToF32$(OBJ) \
+ s_normRoundPackToF32$(OBJ) \
+ s_addMagsF32$(OBJ) \
+ s_subMagsF32$(OBJ) \
+ s_mulAddF32$(OBJ) \
+ s_normSubnormalF64Sig$(OBJ) \
+ s_roundPackToF64$(OBJ) \
+ s_normRoundPackToF64$(OBJ) \
+ s_addMagsF64$(OBJ) \
+ s_subMagsF64$(OBJ) \
+ s_mulAddF64$(OBJ) \
+ s_normSubnormalExtF80Sig$(OBJ) \
+ s_roundPackToExtF80$(OBJ) \
+ s_normRoundPackToExtF80$(OBJ) \
+ s_addMagsExtF80$(OBJ) \
+ s_subMagsExtF80$(OBJ) \
+ s_normSubnormalF128Sig$(OBJ) \
+ s_roundPackToF128$(OBJ) \
+ s_normRoundPackToF128$(OBJ) \
+ s_addMagsF128$(OBJ) \
+ s_subMagsF128$(OBJ) \
+ s_mulAddF128$(OBJ) \
+ softfloat_state$(OBJ) \
+ ui32_to_f16$(OBJ) \
+ ui32_to_f32$(OBJ) \
+ ui32_to_f64$(OBJ) \
+ ui32_to_extF80$(OBJ) \
+ ui32_to_extF80M$(OBJ) \
+ ui32_to_f128$(OBJ) \
+ ui32_to_f128M$(OBJ) \
+ ui64_to_f16$(OBJ) \
+ ui64_to_f32$(OBJ) \
+ ui64_to_f64$(OBJ) \
+ ui64_to_extF80$(OBJ) \
+ ui64_to_extF80M$(OBJ) \
+ ui64_to_f128$(OBJ) \
+ ui64_to_f128M$(OBJ) \
+ i32_to_f16$(OBJ) \
+ i32_to_f32$(OBJ) \
+ i32_to_f64$(OBJ) \
+ i32_to_extF80$(OBJ) \
+ i32_to_extF80M$(OBJ) \
+ i32_to_f128$(OBJ) \
+ i32_to_f128M$(OBJ) \
+ i64_to_f16$(OBJ) \
+ i64_to_f32$(OBJ) \
+ i64_to_f64$(OBJ) \
+ i64_to_extF80$(OBJ) \
+ i64_to_extF80M$(OBJ) \
+ i64_to_f128$(OBJ) \
+ i64_to_f128M$(OBJ) \
+ f16_to_ui32$(OBJ) \
+ f16_to_ui64$(OBJ) \
+ f16_to_i32$(OBJ) \
+ f16_to_i64$(OBJ) \
+ f16_to_ui32_r_minMag$(OBJ) \
+ f16_to_ui64_r_minMag$(OBJ) \
+ f16_to_i32_r_minMag$(OBJ) \
+ f16_to_i64_r_minMag$(OBJ) \
+ f16_to_f32$(OBJ) \
+ f16_to_f64$(OBJ) \
+ f16_to_extF80$(OBJ) \
+ f16_to_extF80M$(OBJ) \
+ f16_to_f128$(OBJ) \
+ f16_to_f128M$(OBJ) \
+ f16_roundToInt$(OBJ) \
+ f16_add$(OBJ) \
+ f16_sub$(OBJ) \
+ f16_mul$(OBJ) \
+ f16_mulAdd$(OBJ) \
+ f16_div$(OBJ) \
+ f16_rem$(OBJ) \
+ f16_sqrt$(OBJ) \
+ f16_eq$(OBJ) \
+ f16_le$(OBJ) \
+ f16_lt$(OBJ) \
+ f16_eq_signaling$(OBJ) \
+ f16_le_quiet$(OBJ) \
+ f16_lt_quiet$(OBJ) \
+ f16_isSignalingNaN$(OBJ) \
+ f32_to_ui32$(OBJ) \
+ f32_to_ui64$(OBJ) \
+ f32_to_i32$(OBJ) \
+ f32_to_i64$(OBJ) \
+ f32_to_ui32_r_minMag$(OBJ) \
+ f32_to_ui64_r_minMag$(OBJ) \
+ f32_to_i32_r_minMag$(OBJ) \
+ f32_to_i64_r_minMag$(OBJ) \
+ f32_to_f16$(OBJ) \
+ f32_to_f64$(OBJ) \
+ f32_to_extF80$(OBJ) \
+ f32_to_extF80M$(OBJ) \
+ f32_to_f128$(OBJ) \
+ f32_to_f128M$(OBJ) \
+ f32_roundToInt$(OBJ) \
+ f32_add$(OBJ) \
+ f32_sub$(OBJ) \
+ f32_mul$(OBJ) \
+ f32_mulAdd$(OBJ) \
+ f32_div$(OBJ) \
+ f32_rem$(OBJ) \
+ f32_sqrt$(OBJ) \
+ f32_eq$(OBJ) \
+ f32_le$(OBJ) \
+ f32_lt$(OBJ) \
+ f32_eq_signaling$(OBJ) \
+ f32_le_quiet$(OBJ) \
+ f32_lt_quiet$(OBJ) \
+ f32_isSignalingNaN$(OBJ) \
+ f64_to_ui32$(OBJ) \
+ f64_to_ui64$(OBJ) \
+ f64_to_i32$(OBJ) \
+ f64_to_i64$(OBJ) \
+ f64_to_ui32_r_minMag$(OBJ) \
+ f64_to_ui64_r_minMag$(OBJ) \
+ f64_to_i32_r_minMag$(OBJ) \
+ f64_to_i64_r_minMag$(OBJ) \
+ f64_to_f16$(OBJ) \
+ f64_to_f32$(OBJ) \
+ f64_to_extF80$(OBJ) \
+ f64_to_extF80M$(OBJ) \
+ f64_to_f128$(OBJ) \
+ f64_to_f128M$(OBJ) \
+ f64_roundToInt$(OBJ) \
+ f64_add$(OBJ) \
+ f64_sub$(OBJ) \
+ f64_mul$(OBJ) \
+ f64_mulAdd$(OBJ) \
+ f64_div$(OBJ) \
+ f64_rem$(OBJ) \
+ f64_sqrt$(OBJ) \
+ f64_eq$(OBJ) \
+ f64_le$(OBJ) \
+ f64_lt$(OBJ) \
+ f64_eq_signaling$(OBJ) \
+ f64_le_quiet$(OBJ) \
+ f64_lt_quiet$(OBJ) \
+ f64_isSignalingNaN$(OBJ) \
+ extF80_to_ui32$(OBJ) \
+ extF80_to_ui64$(OBJ) \
+ extF80_to_i32$(OBJ) \
+ extF80_to_i64$(OBJ) \
+ extF80_to_ui32_r_minMag$(OBJ) \
+ extF80_to_ui64_r_minMag$(OBJ) \
+ extF80_to_i32_r_minMag$(OBJ) \
+ extF80_to_i64_r_minMag$(OBJ) \
+ extF80_to_f16$(OBJ) \
+ extF80_to_f32$(OBJ) \
+ extF80_to_f64$(OBJ) \
+ extF80_to_f128$(OBJ) \
+ extF80_roundToInt$(OBJ) \
+ extF80_add$(OBJ) \
+ extF80_sub$(OBJ) \
+ extF80_mul$(OBJ) \
+ extF80_div$(OBJ) \
+ extF80_rem$(OBJ) \
+ extF80_sqrt$(OBJ) \
+ extF80_eq$(OBJ) \
+ extF80_le$(OBJ) \
+ extF80_lt$(OBJ) \
+ extF80_eq_signaling$(OBJ) \
+ extF80_le_quiet$(OBJ) \
+ extF80_lt_quiet$(OBJ) \
+ extF80_isSignalingNaN$(OBJ) \
+ extF80M_to_ui32$(OBJ) \
+ extF80M_to_ui64$(OBJ) \
+ extF80M_to_i32$(OBJ) \
+ extF80M_to_i64$(OBJ) \
+ extF80M_to_ui32_r_minMag$(OBJ) \
+ extF80M_to_ui64_r_minMag$(OBJ) \
+ extF80M_to_i32_r_minMag$(OBJ) \
+ extF80M_to_i64_r_minMag$(OBJ) \
+ extF80M_to_f16$(OBJ) \
+ extF80M_to_f32$(OBJ) \
+ extF80M_to_f64$(OBJ) \
+ extF80M_to_f128M$(OBJ) \
+ extF80M_roundToInt$(OBJ) \
+ extF80M_add$(OBJ) \
+ extF80M_sub$(OBJ) \
+ extF80M_mul$(OBJ) \
+ extF80M_div$(OBJ) \
+ extF80M_rem$(OBJ) \
+ extF80M_sqrt$(OBJ) \
+ extF80M_eq$(OBJ) \
+ extF80M_le$(OBJ) \
+ extF80M_lt$(OBJ) \
+ extF80M_eq_signaling$(OBJ) \
+ extF80M_le_quiet$(OBJ) \
+ extF80M_lt_quiet$(OBJ) \
+ f128_to_ui32$(OBJ) \
+ f128_to_ui64$(OBJ) \
+ f128_to_i32$(OBJ) \
+ f128_to_i64$(OBJ) \
+ f128_to_ui32_r_minMag$(OBJ) \
+ f128_to_ui64_r_minMag$(OBJ) \
+ f128_to_i32_r_minMag$(OBJ) \
+ f128_to_i64_r_minMag$(OBJ) \
+ f128_to_f16$(OBJ) \
+ f128_to_f32$(OBJ) \
+ f128_to_extF80$(OBJ) \
+ f128_to_f64$(OBJ) \
+ f128_roundToInt$(OBJ) \
+ f128_add$(OBJ) \
+ f128_sub$(OBJ) \
+ f128_mul$(OBJ) \
+ f128_mulAdd$(OBJ) \
+ f128_div$(OBJ) \
+ f128_rem$(OBJ) \
+ f128_sqrt$(OBJ) \
+ f128_eq$(OBJ) \
+ f128_le$(OBJ) \
+ f128_lt$(OBJ) \
+ f128_eq_signaling$(OBJ) \
+ f128_le_quiet$(OBJ) \
+ f128_lt_quiet$(OBJ) \
+ f128_isSignalingNaN$(OBJ) \
+ f128M_to_ui32$(OBJ) \
+ f128M_to_ui64$(OBJ) \
+ f128M_to_i32$(OBJ) \
+ f128M_to_i64$(OBJ) \
+ f128M_to_ui32_r_minMag$(OBJ) \
+ f128M_to_ui64_r_minMag$(OBJ) \
+ f128M_to_i32_r_minMag$(OBJ) \
+ f128M_to_i64_r_minMag$(OBJ) \
+ f128M_to_f16$(OBJ) \
+ f128M_to_f32$(OBJ) \
+ f128M_to_extF80M$(OBJ) \
+ f128M_to_f64$(OBJ) \
+ f128M_roundToInt$(OBJ) \
+ f128M_add$(OBJ) \
+ f128M_sub$(OBJ) \
+ f128M_mul$(OBJ) \
+ f128M_mulAdd$(OBJ) \
+ f128M_div$(OBJ) \
+ f128M_rem$(OBJ) \
+ f128M_sqrt$(OBJ) \
+ f128M_eq$(OBJ) \
+ f128M_le$(OBJ) \
+ f128M_lt$(OBJ) \
+ f128M_eq_signaling$(OBJ) \
+ f128M_le_quiet$(OBJ) \
+ f128M_lt_quiet$(OBJ) \
+
+OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS)
+
+$(OBJS_ALL): \
+ $(OTHER_HEADERS) platform.h $(SOURCE_DIR)/include/primitiveTypes.h \
+ $(SOURCE_DIR)/include/primitives.h
+$(OBJS_SPECIALIZE) $(OBJS_OTHERS): \
+ $(SOURCE_DIR)/include/softfloat_types.h $(SOURCE_DIR)/include/internals.h \
+ $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/specialize.h \
+ $(SOURCE_DIR)/include/softfloat.h
+
+$(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$*.c
+
+$(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c
+
+softfloat$(LIB): $(OBJS_ALL)
+ $(DELETE) $@
+ $(MAKELIB) $^
+
+.PHONY: clean
+clean:
+ $(DELETE) $(OBJS_ALL) softfloat$(LIB)
+
diff --git a/src/libs/softfloat-3e/build/Win64-MinGW-w64/platform.h b/src/libs/softfloat-3e/build/Win64-MinGW-w64/platform.h
new file mode 100644
index 00000000..c5e06f8e
--- /dev/null
+++ b/src/libs/softfloat-3e/build/Win64-MinGW-w64/platform.h
@@ -0,0 +1,54 @@
+
+/*============================================================================
+
+This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define LITTLEENDIAN 1
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef __GNUC_STDC_INLINE__
+#define INLINE inline
+#else
+#define INLINE extern inline
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define SOFTFLOAT_BUILTIN_CLZ 1
+#define SOFTFLOAT_INTRINSIC_INT128 1
+#include "opts-GCC.h"
+
diff --git a/src/libs/softfloat-3e/build/template-FAST_INT64/Makefile b/src/libs/softfloat-3e/build/template-FAST_INT64/Makefile
new file mode 100644
index 00000000..78e7ff5a
--- /dev/null
+++ b/src/libs/softfloat-3e/build/template-FAST_INT64/Makefile
@@ -0,0 +1,391 @@
+
+#=============================================================================
+#
+# This Makefile template is part of the SoftFloat IEEE Floating-Point
+# Arithmetic Package, Release 3e, by John R. Hauser.
+#
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+# University of California. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions, and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions, and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# 3. Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#=============================================================================
+
+# Edit lines marked with `==>'. See "SoftFloat-source.html".
+
+==> SOURCE_DIR ?= ../../source
+==> SPECIALIZE_TYPE ?= 8086
+
+==> SOFTFLOAT_OPTS ?= \
+==> -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \
+==> -DSOFTFLOAT_FAST_DIV64TO32
+
+==> DELETE = rm -f
+==> C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include
+==> COMPILE_C = \
+==> cc -c -DSOFTFLOAT_FAST_INT64 $(SOFTFLOAT_OPTS) $(C_INCLUDES) -O2 -o $@
+==> MAKELIB = ar crs $@
+
+==> OBJ = .o
+==> LIB = .a
+
+==> OTHER_HEADERS =
+
+.PHONY: all
+all: softfloat$(LIB)
+
+OBJS_PRIMITIVES = \
+ s_eq128$(OBJ) \
+ s_le128$(OBJ) \
+ s_lt128$(OBJ) \
+ s_shortShiftLeft128$(OBJ) \
+ s_shortShiftRight128$(OBJ) \
+ s_shortShiftRightJam64$(OBJ) \
+ s_shortShiftRightJam64Extra$(OBJ) \
+ s_shortShiftRightJam128$(OBJ) \
+ s_shortShiftRightJam128Extra$(OBJ) \
+ s_shiftRightJam32$(OBJ) \
+ s_shiftRightJam64$(OBJ) \
+ s_shiftRightJam64Extra$(OBJ) \
+ s_shiftRightJam128$(OBJ) \
+ s_shiftRightJam128Extra$(OBJ) \
+ s_shiftRightJam256M$(OBJ) \
+ s_countLeadingZeros8$(OBJ) \
+ s_countLeadingZeros16$(OBJ) \
+ s_countLeadingZeros32$(OBJ) \
+ s_countLeadingZeros64$(OBJ) \
+ s_add128$(OBJ) \
+ s_add256M$(OBJ) \
+ s_sub128$(OBJ) \
+ s_sub256M$(OBJ) \
+ s_mul64ByShifted32To128$(OBJ) \
+ s_mul64To128$(OBJ) \
+ s_mul128By32$(OBJ) \
+ s_mul128To256M$(OBJ) \
+ s_approxRecip_1Ks$(OBJ) \
+ s_approxRecip32_1$(OBJ) \
+ s_approxRecipSqrt_1Ks$(OBJ) \
+ s_approxRecipSqrt32_1$(OBJ) \
+
+OBJS_SPECIALIZE = \
+ softfloat_raiseFlags$(OBJ) \
+ s_f16UIToCommonNaN$(OBJ) \
+ s_commonNaNToF16UI$(OBJ) \
+ s_propagateNaNF16UI$(OBJ) \
+ s_f32UIToCommonNaN$(OBJ) \
+ s_commonNaNToF32UI$(OBJ) \
+ s_propagateNaNF32UI$(OBJ) \
+ s_f64UIToCommonNaN$(OBJ) \
+ s_commonNaNToF64UI$(OBJ) \
+ s_propagateNaNF64UI$(OBJ) \
+ extF80M_isSignalingNaN$(OBJ) \
+ s_extF80UIToCommonNaN$(OBJ) \
+ s_commonNaNToExtF80UI$(OBJ) \
+ s_propagateNaNExtF80UI$(OBJ) \
+ f128M_isSignalingNaN$(OBJ) \
+ s_f128UIToCommonNaN$(OBJ) \
+ s_commonNaNToF128UI$(OBJ) \
+ s_propagateNaNF128UI$(OBJ) \
+
+OBJS_OTHERS = \
+ s_roundToUI32$(OBJ) \
+ s_roundToUI64$(OBJ) \
+ s_roundToI32$(OBJ) \
+ s_roundToI64$(OBJ) \
+ s_normSubnormalF16Sig$(OBJ) \
+ s_roundPackToF16$(OBJ) \
+ s_normRoundPackToF16$(OBJ) \
+ s_addMagsF16$(OBJ) \
+ s_subMagsF16$(OBJ) \
+ s_mulAddF16$(OBJ) \
+ s_normSubnormalF32Sig$(OBJ) \
+ s_roundPackToF32$(OBJ) \
+ s_normRoundPackToF32$(OBJ) \
+ s_addMagsF32$(OBJ) \
+ s_subMagsF32$(OBJ) \
+ s_mulAddF32$(OBJ) \
+ s_normSubnormalF64Sig$(OBJ) \
+ s_roundPackToF64$(OBJ) \
+ s_normRoundPackToF64$(OBJ) \
+ s_addMagsF64$(OBJ) \
+ s_subMagsF64$(OBJ) \
+ s_mulAddF64$(OBJ) \
+ s_normSubnormalExtF80Sig$(OBJ) \
+ s_roundPackToExtF80$(OBJ) \
+ s_normRoundPackToExtF80$(OBJ) \
+ s_addMagsExtF80$(OBJ) \
+ s_subMagsExtF80$(OBJ) \
+ s_normSubnormalF128Sig$(OBJ) \
+ s_roundPackToF128$(OBJ) \
+ s_normRoundPackToF128$(OBJ) \
+ s_addMagsF128$(OBJ) \
+ s_subMagsF128$(OBJ) \
+ s_mulAddF128$(OBJ) \
+ softfloat_state$(OBJ) \
+ ui32_to_f16$(OBJ) \
+ ui32_to_f32$(OBJ) \
+ ui32_to_f64$(OBJ) \
+ ui32_to_extF80$(OBJ) \
+ ui32_to_extF80M$(OBJ) \
+ ui32_to_f128$(OBJ) \
+ ui32_to_f128M$(OBJ) \
+ ui64_to_f16$(OBJ) \
+ ui64_to_f32$(OBJ) \
+ ui64_to_f64$(OBJ) \
+ ui64_to_extF80$(OBJ) \
+ ui64_to_extF80M$(OBJ) \
+ ui64_to_f128$(OBJ) \
+ ui64_to_f128M$(OBJ) \
+ i32_to_f16$(OBJ) \
+ i32_to_f32$(OBJ) \
+ i32_to_f64$(OBJ) \
+ i32_to_extF80$(OBJ) \
+ i32_to_extF80M$(OBJ) \
+ i32_to_f128$(OBJ) \
+ i32_to_f128M$(OBJ) \
+ i64_to_f16$(OBJ) \
+ i64_to_f32$(OBJ) \
+ i64_to_f64$(OBJ) \
+ i64_to_extF80$(OBJ) \
+ i64_to_extF80M$(OBJ) \
+ i64_to_f128$(OBJ) \
+ i64_to_f128M$(OBJ) \
+ f16_to_ui32$(OBJ) \
+ f16_to_ui64$(OBJ) \
+ f16_to_i32$(OBJ) \
+ f16_to_i64$(OBJ) \
+ f16_to_ui32_r_minMag$(OBJ) \
+ f16_to_ui64_r_minMag$(OBJ) \
+ f16_to_i32_r_minMag$(OBJ) \
+ f16_to_i64_r_minMag$(OBJ) \
+ f16_to_f32$(OBJ) \
+ f16_to_f64$(OBJ) \
+ f16_to_extF80$(OBJ) \
+ f16_to_extF80M$(OBJ) \
+ f16_to_f128$(OBJ) \
+ f16_to_f128M$(OBJ) \
+ f16_roundToInt$(OBJ) \
+ f16_add$(OBJ) \
+ f16_sub$(OBJ) \
+ f16_mul$(OBJ) \
+ f16_mulAdd$(OBJ) \
+ f16_div$(OBJ) \
+ f16_rem$(OBJ) \
+ f16_sqrt$(OBJ) \
+ f16_eq$(OBJ) \
+ f16_le$(OBJ) \
+ f16_lt$(OBJ) \
+ f16_eq_signaling$(OBJ) \
+ f16_le_quiet$(OBJ) \
+ f16_lt_quiet$(OBJ) \
+ f16_isSignalingNaN$(OBJ) \
+ f32_to_ui32$(OBJ) \
+ f32_to_ui64$(OBJ) \
+ f32_to_i32$(OBJ) \
+ f32_to_i64$(OBJ) \
+ f32_to_ui32_r_minMag$(OBJ) \
+ f32_to_ui64_r_minMag$(OBJ) \
+ f32_to_i32_r_minMag$(OBJ) \
+ f32_to_i64_r_minMag$(OBJ) \
+ f32_to_f16$(OBJ) \
+ f32_to_f64$(OBJ) \
+ f32_to_extF80$(OBJ) \
+ f32_to_extF80M$(OBJ) \
+ f32_to_f128$(OBJ) \
+ f32_to_f128M$(OBJ) \
+ f32_roundToInt$(OBJ) \
+ f32_add$(OBJ) \
+ f32_sub$(OBJ) \
+ f32_mul$(OBJ) \
+ f32_mulAdd$(OBJ) \
+ f32_div$(OBJ) \
+ f32_rem$(OBJ) \
+ f32_sqrt$(OBJ) \
+ f32_eq$(OBJ) \
+ f32_le$(OBJ) \
+ f32_lt$(OBJ) \
+ f32_eq_signaling$(OBJ) \
+ f32_le_quiet$(OBJ) \
+ f32_lt_quiet$(OBJ) \
+ f32_isSignalingNaN$(OBJ) \
+ f64_to_ui32$(OBJ) \
+ f64_to_ui64$(OBJ) \
+ f64_to_i32$(OBJ) \
+ f64_to_i64$(OBJ) \
+ f64_to_ui32_r_minMag$(OBJ) \
+ f64_to_ui64_r_minMag$(OBJ) \
+ f64_to_i32_r_minMag$(OBJ) \
+ f64_to_i64_r_minMag$(OBJ) \
+ f64_to_f16$(OBJ) \
+ f64_to_f32$(OBJ) \
+ f64_to_extF80$(OBJ) \
+ f64_to_extF80M$(OBJ) \
+ f64_to_f128$(OBJ) \
+ f64_to_f128M$(OBJ) \
+ f64_roundToInt$(OBJ) \
+ f64_add$(OBJ) \
+ f64_sub$(OBJ) \
+ f64_mul$(OBJ) \
+ f64_mulAdd$(OBJ) \
+ f64_div$(OBJ) \
+ f64_rem$(OBJ) \
+ f64_sqrt$(OBJ) \
+ f64_eq$(OBJ) \
+ f64_le$(OBJ) \
+ f64_lt$(OBJ) \
+ f64_eq_signaling$(OBJ) \
+ f64_le_quiet$(OBJ) \
+ f64_lt_quiet$(OBJ) \
+ f64_isSignalingNaN$(OBJ) \
+ extF80_to_ui32$(OBJ) \
+ extF80_to_ui64$(OBJ) \
+ extF80_to_i32$(OBJ) \
+ extF80_to_i64$(OBJ) \
+ extF80_to_ui32_r_minMag$(OBJ) \
+ extF80_to_ui64_r_minMag$(OBJ) \
+ extF80_to_i32_r_minMag$(OBJ) \
+ extF80_to_i64_r_minMag$(OBJ) \
+ extF80_to_f16$(OBJ) \
+ extF80_to_f32$(OBJ) \
+ extF80_to_f64$(OBJ) \
+ extF80_to_f128$(OBJ) \
+ extF80_roundToInt$(OBJ) \
+ extF80_add$(OBJ) \
+ extF80_sub$(OBJ) \
+ extF80_mul$(OBJ) \
+ extF80_div$(OBJ) \
+ extF80_rem$(OBJ) \
+ extF80_sqrt$(OBJ) \
+ extF80_eq$(OBJ) \
+ extF80_le$(OBJ) \
+ extF80_lt$(OBJ) \
+ extF80_eq_signaling$(OBJ) \
+ extF80_le_quiet$(OBJ) \
+ extF80_lt_quiet$(OBJ) \
+ extF80_isSignalingNaN$(OBJ) \
+ extF80M_to_ui32$(OBJ) \
+ extF80M_to_ui64$(OBJ) \
+ extF80M_to_i32$(OBJ) \
+ extF80M_to_i64$(OBJ) \
+ extF80M_to_ui32_r_minMag$(OBJ) \
+ extF80M_to_ui64_r_minMag$(OBJ) \
+ extF80M_to_i32_r_minMag$(OBJ) \
+ extF80M_to_i64_r_minMag$(OBJ) \
+ extF80M_to_f16$(OBJ) \
+ extF80M_to_f32$(OBJ) \
+ extF80M_to_f64$(OBJ) \
+ extF80M_to_f128M$(OBJ) \
+ extF80M_roundToInt$(OBJ) \
+ extF80M_add$(OBJ) \
+ extF80M_sub$(OBJ) \
+ extF80M_mul$(OBJ) \
+ extF80M_div$(OBJ) \
+ extF80M_rem$(OBJ) \
+ extF80M_sqrt$(OBJ) \
+ extF80M_eq$(OBJ) \
+ extF80M_le$(OBJ) \
+ extF80M_lt$(OBJ) \
+ extF80M_eq_signaling$(OBJ) \
+ extF80M_le_quiet$(OBJ) \
+ extF80M_lt_quiet$(OBJ) \
+ f128_to_ui32$(OBJ) \
+ f128_to_ui64$(OBJ) \
+ f128_to_i32$(OBJ) \
+ f128_to_i64$(OBJ) \
+ f128_to_ui32_r_minMag$(OBJ) \
+ f128_to_ui64_r_minMag$(OBJ) \
+ f128_to_i32_r_minMag$(OBJ) \
+ f128_to_i64_r_minMag$(OBJ) \
+ f128_to_f16$(OBJ) \
+ f128_to_f32$(OBJ) \
+ f128_to_extF80$(OBJ) \
+ f128_to_f64$(OBJ) \
+ f128_roundToInt$(OBJ) \
+ f128_add$(OBJ) \
+ f128_sub$(OBJ) \
+ f128_mul$(OBJ) \
+ f128_mulAdd$(OBJ) \
+ f128_div$(OBJ) \
+ f128_rem$(OBJ) \
+ f128_sqrt$(OBJ) \
+ f128_eq$(OBJ) \
+ f128_le$(OBJ) \
+ f128_lt$(OBJ) \
+ f128_eq_signaling$(OBJ) \
+ f128_le_quiet$(OBJ) \
+ f128_lt_quiet$(OBJ) \
+ f128_isSignalingNaN$(OBJ) \
+ f128M_to_ui32$(OBJ) \
+ f128M_to_ui64$(OBJ) \
+ f128M_to_i32$(OBJ) \
+ f128M_to_i64$(OBJ) \
+ f128M_to_ui32_r_minMag$(OBJ) \
+ f128M_to_ui64_r_minMag$(OBJ) \
+ f128M_to_i32_r_minMag$(OBJ) \
+ f128M_to_i64_r_minMag$(OBJ) \
+ f128M_to_f16$(OBJ) \
+ f128M_to_f32$(OBJ) \
+ f128M_to_extF80M$(OBJ) \
+ f128M_to_f64$(OBJ) \
+ f128M_roundToInt$(OBJ) \
+ f128M_add$(OBJ) \
+ f128M_sub$(OBJ) \
+ f128M_mul$(OBJ) \
+ f128M_mulAdd$(OBJ) \
+ f128M_div$(OBJ) \
+ f128M_rem$(OBJ) \
+ f128M_sqrt$(OBJ) \
+ f128M_eq$(OBJ) \
+ f128M_le$(OBJ) \
+ f128M_lt$(OBJ) \
+ f128M_eq_signaling$(OBJ) \
+ f128M_le_quiet$(OBJ) \
+ f128M_lt_quiet$(OBJ) \
+
+OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS)
+
+$(OBJS_ALL): \
+ $(OTHER_HEADERS) platform.h $(SOURCE_DIR)/include/primitiveTypes.h \
+ $(SOURCE_DIR)/include/primitives.h
+$(OBJS_SPECIALIZE) $(OBJS_OTHERS): \
+ $(SOURCE_DIR)/include/softfloat_types.h $(SOURCE_DIR)/include/internals.h \
+ $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/specialize.h \
+ $(SOURCE_DIR)/include/softfloat.h
+
+$(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$*.c
+
+$(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c
+
+softfloat$(LIB): $(OBJS_ALL)
+ $(DELETE) $@
+ $(MAKELIB) $^
+
+.PHONY: clean
+clean:
+ $(DELETE) $(OBJS_ALL) softfloat$(LIB)
+
diff --git a/src/libs/softfloat-3e/build/template-FAST_INT64/platform.h b/src/libs/softfloat-3e/build/template-FAST_INT64/platform.h
new file mode 100644
index 00000000..20946587
--- /dev/null
+++ b/src/libs/softfloat-3e/build/template-FAST_INT64/platform.h
@@ -0,0 +1,50 @@
+
+/*============================================================================
+
+This C header template is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+// Edit lines marked with `==>'. See "SoftFloat-source.html".
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+==> #define LITTLEENDIAN 1
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+==> #define INLINE inline
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+==> #define THREAD_LOCAL _Thread_local
+
diff --git a/src/libs/softfloat-3e/build/template-not-FAST_INT64/Makefile b/src/libs/softfloat-3e/build/template-not-FAST_INT64/Makefile
new file mode 100644
index 00000000..48b2cd6b
--- /dev/null
+++ b/src/libs/softfloat-3e/build/template-not-FAST_INT64/Makefile
@@ -0,0 +1,325 @@
+
+#=============================================================================
+#
+# This Makefile template is part of the SoftFloat IEEE Floating-Point
+# Arithmetic Package, Release 3e, by John R. Hauser.
+#
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+# University of California. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions, and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions, and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# 3. Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#=============================================================================
+
+# Edit lines marked with `==>'. See "SoftFloat-source.html".
+
+==> SOURCE_DIR ?= ../../source
+==> SPECIALIZE_TYPE ?= 8086
+
+==> SOFTFLOAT_OPTS ?= \
+==> -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \
+==> -DSOFTFLOAT_FAST_DIV64TO32
+
+==> DELETE = rm -f
+==> C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include
+==> COMPILE_C = cc -c $(SOFTFLOAT_OPTS) $(C_INCLUDES) -O2 -o $@
+==> MAKELIB = ar crs $@
+
+==> OBJ = .o
+==> LIB = .a
+
+==> OTHER_HEADERS =
+
+.PHONY: all
+all: softfloat$(LIB)
+
+OBJS_PRIMITIVES = \
+ s_compare96M$(OBJ) \
+ s_compare128M$(OBJ) \
+ s_shortShiftLeft64To96M$(OBJ) \
+ s_shortShiftLeftM$(OBJ) \
+ s_shiftLeftM$(OBJ) \
+ s_shortShiftRightM$(OBJ) \
+ s_shortShiftRightJam64$(OBJ) \
+ s_shortShiftRightJamM$(OBJ) \
+ s_shiftRightJam32$(OBJ) \
+ s_shiftRightJam64$(OBJ) \
+ s_shiftRightJamM$(OBJ) \
+ s_shiftRightM$(OBJ) \
+ s_countLeadingZeros8$(OBJ) \
+ s_countLeadingZeros16$(OBJ) \
+ s_countLeadingZeros32$(OBJ) \
+ s_countLeadingZeros64$(OBJ) \
+ s_addM$(OBJ) \
+ s_addCarryM$(OBJ) \
+ s_addComplCarryM$(OBJ) \
+ s_negXM$(OBJ) \
+ s_sub1XM$(OBJ) \
+ s_subM$(OBJ) \
+ s_mul64To128M$(OBJ) \
+ s_mul128MTo256M$(OBJ) \
+ s_approxRecip_1Ks$(OBJ) \
+ s_approxRecip32_1$(OBJ) \
+ s_approxRecipSqrt_1Ks$(OBJ) \
+ s_approxRecipSqrt32_1$(OBJ) \
+ s_remStepMBy32$(OBJ) \
+
+OBJS_SPECIALIZE = \
+ softfloat_raiseFlags$(OBJ) \
+ s_f16UIToCommonNaN$(OBJ) \
+ s_commonNaNToF16UI$(OBJ) \
+ s_propagateNaNF16UI$(OBJ) \
+ s_f32UIToCommonNaN$(OBJ) \
+ s_commonNaNToF32UI$(OBJ) \
+ s_propagateNaNF32UI$(OBJ) \
+ s_f64UIToCommonNaN$(OBJ) \
+ s_commonNaNToF64UI$(OBJ) \
+ s_propagateNaNF64UI$(OBJ) \
+ extF80M_isSignalingNaN$(OBJ) \
+ s_extF80MToCommonNaN$(OBJ) \
+ s_commonNaNToExtF80M$(OBJ) \
+ s_propagateNaNExtF80M$(OBJ) \
+ f128M_isSignalingNaN$(OBJ) \
+ s_f128MToCommonNaN$(OBJ) \
+ s_commonNaNToF128M$(OBJ) \
+ s_propagateNaNF128M$(OBJ) \
+
+OBJS_OTHERS = \
+ s_roundToUI32$(OBJ) \
+ s_roundMToUI64$(OBJ) \
+ s_roundToI32$(OBJ) \
+ s_roundMToI64$(OBJ) \
+ s_normSubnormalF16Sig$(OBJ) \
+ s_roundPackToF16$(OBJ) \
+ s_normRoundPackToF16$(OBJ) \
+ s_addMagsF16$(OBJ) \
+ s_subMagsF16$(OBJ) \
+ s_mulAddF16$(OBJ) \
+ s_normSubnormalF32Sig$(OBJ) \
+ s_roundPackToF32$(OBJ) \
+ s_normRoundPackToF32$(OBJ) \
+ s_addMagsF32$(OBJ) \
+ s_subMagsF32$(OBJ) \
+ s_mulAddF32$(OBJ) \
+ s_normSubnormalF64Sig$(OBJ) \
+ s_roundPackToF64$(OBJ) \
+ s_normRoundPackToF64$(OBJ) \
+ s_addMagsF64$(OBJ) \
+ s_subMagsF64$(OBJ) \
+ s_mulAddF64$(OBJ) \
+ s_tryPropagateNaNExtF80M$(OBJ) \
+ s_invalidExtF80M$(OBJ) \
+ s_normExtF80SigM$(OBJ) \
+ s_roundPackMToExtF80M$(OBJ) \
+ s_normRoundPackMToExtF80M$(OBJ) \
+ s_addExtF80M$(OBJ) \
+ s_compareNonnormExtF80M$(OBJ) \
+ s_isNaNF128M$(OBJ) \
+ s_tryPropagateNaNF128M$(OBJ) \
+ s_invalidF128M$(OBJ) \
+ s_shiftNormSigF128M$(OBJ) \
+ s_roundPackMToF128M$(OBJ) \
+ s_normRoundPackMToF128M$(OBJ) \
+ s_addF128M$(OBJ) \
+ s_mulAddF128M$(OBJ) \
+ softfloat_state$(OBJ) \
+ ui32_to_f16$(OBJ) \
+ ui32_to_f32$(OBJ) \
+ ui32_to_f64$(OBJ) \
+ ui32_to_extF80M$(OBJ) \
+ ui32_to_f128M$(OBJ) \
+ ui64_to_f16$(OBJ) \
+ ui64_to_f32$(OBJ) \
+ ui64_to_f64$(OBJ) \
+ ui64_to_extF80M$(OBJ) \
+ ui64_to_f128M$(OBJ) \
+ i32_to_f16$(OBJ) \
+ i32_to_f32$(OBJ) \
+ i32_to_f64$(OBJ) \
+ i32_to_extF80M$(OBJ) \
+ i32_to_f128M$(OBJ) \
+ i64_to_f16$(OBJ) \
+ i64_to_f32$(OBJ) \
+ i64_to_f64$(OBJ) \
+ i64_to_extF80M$(OBJ) \
+ i64_to_f128M$(OBJ) \
+ f16_to_ui32$(OBJ) \
+ f16_to_ui64$(OBJ) \
+ f16_to_i32$(OBJ) \
+ f16_to_i64$(OBJ) \
+ f16_to_ui32_r_minMag$(OBJ) \
+ f16_to_ui64_r_minMag$(OBJ) \
+ f16_to_i32_r_minMag$(OBJ) \
+ f16_to_i64_r_minMag$(OBJ) \
+ f16_to_f32$(OBJ) \
+ f16_to_f64$(OBJ) \
+ f16_to_extF80M$(OBJ) \
+ f16_to_f128M$(OBJ) \
+ f16_roundToInt$(OBJ) \
+ f16_add$(OBJ) \
+ f16_sub$(OBJ) \
+ f16_mul$(OBJ) \
+ f16_mulAdd$(OBJ) \
+ f16_div$(OBJ) \
+ f16_rem$(OBJ) \
+ f16_sqrt$(OBJ) \
+ f16_eq$(OBJ) \
+ f16_le$(OBJ) \
+ f16_lt$(OBJ) \
+ f16_eq_signaling$(OBJ) \
+ f16_le_quiet$(OBJ) \
+ f16_lt_quiet$(OBJ) \
+ f16_isSignalingNaN$(OBJ) \
+ f32_to_ui32$(OBJ) \
+ f32_to_ui64$(OBJ) \
+ f32_to_i32$(OBJ) \
+ f32_to_i64$(OBJ) \
+ f32_to_ui32_r_minMag$(OBJ) \
+ f32_to_ui64_r_minMag$(OBJ) \
+ f32_to_i32_r_minMag$(OBJ) \
+ f32_to_i64_r_minMag$(OBJ) \
+ f32_to_f16$(OBJ) \
+ f32_to_f64$(OBJ) \
+ f32_to_extF80M$(OBJ) \
+ f32_to_f128M$(OBJ) \
+ f32_roundToInt$(OBJ) \
+ f32_add$(OBJ) \
+ f32_sub$(OBJ) \
+ f32_mul$(OBJ) \
+ f32_mulAdd$(OBJ) \
+ f32_div$(OBJ) \
+ f32_rem$(OBJ) \
+ f32_sqrt$(OBJ) \
+ f32_eq$(OBJ) \
+ f32_le$(OBJ) \
+ f32_lt$(OBJ) \
+ f32_eq_signaling$(OBJ) \
+ f32_le_quiet$(OBJ) \
+ f32_lt_quiet$(OBJ) \
+ f32_isSignalingNaN$(OBJ) \
+ f64_to_ui32$(OBJ) \
+ f64_to_ui64$(OBJ) \
+ f64_to_i32$(OBJ) \
+ f64_to_i64$(OBJ) \
+ f64_to_ui32_r_minMag$(OBJ) \
+ f64_to_ui64_r_minMag$(OBJ) \
+ f64_to_i32_r_minMag$(OBJ) \
+ f64_to_i64_r_minMag$(OBJ) \
+ f64_to_f16$(OBJ) \
+ f64_to_f32$(OBJ) \
+ f64_to_extF80M$(OBJ) \
+ f64_to_f128M$(OBJ) \
+ f64_roundToInt$(OBJ) \
+ f64_add$(OBJ) \
+ f64_sub$(OBJ) \
+ f64_mul$(OBJ) \
+ f64_mulAdd$(OBJ) \
+ f64_div$(OBJ) \
+ f64_rem$(OBJ) \
+ f64_sqrt$(OBJ) \
+ f64_eq$(OBJ) \
+ f64_le$(OBJ) \
+ f64_lt$(OBJ) \
+ f64_eq_signaling$(OBJ) \
+ f64_le_quiet$(OBJ) \
+ f64_lt_quiet$(OBJ) \
+ f64_isSignalingNaN$(OBJ) \
+ extF80M_to_ui32$(OBJ) \
+ extF80M_to_ui64$(OBJ) \
+ extF80M_to_i32$(OBJ) \
+ extF80M_to_i64$(OBJ) \
+ extF80M_to_ui32_r_minMag$(OBJ) \
+ extF80M_to_ui64_r_minMag$(OBJ) \
+ extF80M_to_i32_r_minMag$(OBJ) \
+ extF80M_to_i64_r_minMag$(OBJ) \
+ extF80M_to_f16$(OBJ) \
+ extF80M_to_f32$(OBJ) \
+ extF80M_to_f64$(OBJ) \
+ extF80M_to_f128M$(OBJ) \
+ extF80M_roundToInt$(OBJ) \
+ extF80M_add$(OBJ) \
+ extF80M_sub$(OBJ) \
+ extF80M_mul$(OBJ) \
+ extF80M_div$(OBJ) \
+ extF80M_rem$(OBJ) \
+ extF80M_sqrt$(OBJ) \
+ extF80M_eq$(OBJ) \
+ extF80M_le$(OBJ) \
+ extF80M_lt$(OBJ) \
+ extF80M_eq_signaling$(OBJ) \
+ extF80M_le_quiet$(OBJ) \
+ extF80M_lt_quiet$(OBJ) \
+ f128M_to_ui32$(OBJ) \
+ f128M_to_ui64$(OBJ) \
+ f128M_to_i32$(OBJ) \
+ f128M_to_i64$(OBJ) \
+ f128M_to_ui32_r_minMag$(OBJ) \
+ f128M_to_ui64_r_minMag$(OBJ) \
+ f128M_to_i32_r_minMag$(OBJ) \
+ f128M_to_i64_r_minMag$(OBJ) \
+ f128M_to_f16$(OBJ) \
+ f128M_to_f32$(OBJ) \
+ f128M_to_f64$(OBJ) \
+ f128M_to_extF80M$(OBJ) \
+ f128M_roundToInt$(OBJ) \
+ f128M_add$(OBJ) \
+ f128M_sub$(OBJ) \
+ f128M_mul$(OBJ) \
+ f128M_mulAdd$(OBJ) \
+ f128M_div$(OBJ) \
+ f128M_rem$(OBJ) \
+ f128M_sqrt$(OBJ) \
+ f128M_eq$(OBJ) \
+ f128M_le$(OBJ) \
+ f128M_lt$(OBJ) \
+ f128M_eq_signaling$(OBJ) \
+ f128M_le_quiet$(OBJ) \
+ f128M_lt_quiet$(OBJ) \
+
+OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS)
+
+$(OBJS_ALL): \
+ $(OTHER_HEADERS) platform.h $(SOURCE_DIR)/include/primitiveTypes.h \
+ $(SOURCE_DIR)/include/primitives.h
+$(OBJS_SPECIALIZE) $(OBJS_OTHERS): \
+ $(SOURCE_DIR)/include/softfloat_types.h $(SOURCE_DIR)/include/internals.h \
+ $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/specialize.h \
+ $(SOURCE_DIR)/include/softfloat.h
+
+$(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$*.c
+
+$(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c
+
+softfloat$(LIB): $(OBJS_ALL)
+ $(DELETE) $@
+ $(MAKELIB) $^
+
+.PHONY: clean
+clean:
+ $(DELETE) $(OBJS_ALL) softfloat$(LIB)
+
diff --git a/src/libs/softfloat-3e/build/template-not-FAST_INT64/platform.h b/src/libs/softfloat-3e/build/template-not-FAST_INT64/platform.h
new file mode 100644
index 00000000..20946587
--- /dev/null
+++ b/src/libs/softfloat-3e/build/template-not-FAST_INT64/platform.h
@@ -0,0 +1,50 @@
+
+/*============================================================================
+
+This C header template is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+// Edit lines marked with `==>'. See "SoftFloat-source.html".
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+==> #define LITTLEENDIAN 1
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+==> #define INLINE inline
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+==> #define THREAD_LOCAL _Thread_local
+
diff --git a/src/libs/softfloat-3e/build/vbox/platform.h b/src/libs/softfloat-3e/build/vbox/platform.h
new file mode 100644
index 00000000..959a4904
--- /dev/null
+++ b/src/libs/softfloat-3e/build/vbox/platform.h
@@ -0,0 +1,107 @@
+/* $Id: platform.h $ */
+/** @file
+ * Platform Header for all VirtualBox targets.
+ */
+
+/*
+ * Copyright (C) 2022 Oracle and/or its affiliates.
+ *
+ * This file is part of VirtualBox base platform packages, as
+ * available from https://www.virtualbox.org.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, in version 3 of the
+ * License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <https://www.gnu.org/licenses>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-only
+ */
+
+#ifndef VBOX_INCLUDED_SRC_vbox_platform_h
+#define VBOX_INCLUDED_SRC_vbox_platform_h
+#ifndef RT_WITHOUT_PRAGMA_ONCE
+# pragma once
+#endif
+
+/* For RT_LITTLE_ENDIAN, RT_ARCH_XXX and more: */
+#include <iprt/cdefs.h>
+
+/* Build config: */
+#define SOFTFLOAT_FAST_INT64 /**< We use functions guarded by this, so must be defined regardless of truthiness. */
+#define SOFTFLOAT_ROUND_ODD /** @todo Skip this? */
+
+/* IPRT should detect endianness correctly: */
+#ifdef RT_LITTLE_ENDIAN
+# define LITTLEENDIAN 1
+#endif
+
+/* Compiler/host configuration bits: */
+#define SOFTFLOAT_FAST_DIV32TO16
+#if ARCH_BITS > 32 || defined(RT_ARCH_X86)
+# define SOFTFLOAT_FAST_DIV64TO32
+#endif
+
+/* See DECLINLINE for guidance: */
+#ifdef __GNUC__
+# define INLINE static __inline__
+#elif defined(__cplusplus)
+# define INLINE static inline
+#elif defined(_MSC_VER)
+# define INLINE static _inline
+#else
+# error "Port me!"
+#endif
+
+/* Generic IPRT asm.h based optimizations: */
+#if !defined(__GNUC__)
+# include <iprt/asm.h>
+# define softfloat_countLeadingZeros16 softfloat_iprt_countLeadingZeros16
+DECLINLINE(uint_fast8_t) softfloat_iprt_countLeadingZeros16(uint16_t uVal)
+{
+ return 16 - ASMBitLastSetU16(uVal);
+}
+# define softfloat_countLeadingZeros32 softfloat_iprt_countLeadingZeros32
+DECLINLINE(uint_fast8_t) softfloat_iprt_countLeadingZeros32(uint32_t uVal)
+{
+ return 32 - ASMBitLastSetU32(uVal);
+}
+# define softfloat_countLeadingZeros64 softfloat_iprt_countLeadingZeros64
+DECLINLINE(uint_fast8_t) softfloat_iprt_countLeadingZeros64(uint64_t uVal)
+{
+ return 64 - ASMBitLastSetU64(uVal);
+}
+#endif
+
+/* Include GCC optimizations: */
+#ifdef __GNUC__
+# ifndef softfloat_countLeadingZeros16
+# define SOFTFLOAT_BUILTIN_CLZ 1
+# endif
+# if ARCH_BITS > 32 && defined(__SIZEOF_INT128__)
+# define SOFTFLOAT_INTRINSIC_INT128 1
+# endif
+# include "opts-GCC.h"
+#endif
+
+/* We've eliminated the global variables and need no TLS variable tricks. */
+#ifndef THREAD_LOCAL
+# if 1
+# define THREAD_LOCAL
+# else
+# ifdef _MSC_VER
+# define THREAD_LOCAL __declspec(thread)
+# else
+# define THREAD_LOCAL __thread
+# endif
+# endif
+#endif
+
+#endif /* !VBOX_INCLUDED_SRC_vbox_platform_h */
diff --git a/src/libs/softfloat-3e/doc/SoftFloat-history.html b/src/libs/softfloat-3e/doc/SoftFloat-history.html
new file mode 100644
index 00000000..d81c6bc5
--- /dev/null
+++ b/src/libs/softfloat-3e/doc/SoftFloat-history.html
@@ -0,0 +1,258 @@
+
+<HTML>
+
+<HEAD>
+<TITLE>Berkeley SoftFloat History</TITLE>
+</HEAD>
+
+<BODY>
+
+<H1>History of Berkeley SoftFloat, to Release 3e</H1>
+
+<P>
+John R. Hauser<BR>
+2018 January 20<BR>
+</P>
+
+
+<H3>Release 3e (2018 January)</H3>
+
+<UL>
+
+<LI>
+Changed the default numeric code for optional rounding mode <CODE>odd</CODE>
+(round to odd, also known as <EM>jamming</EM>) from 5 to 6.
+
+<LI>
+Modified the behavior of rounding mode <CODE>odd</CODE> when rounding to an
+integer value (either conversion to an integer format or a
+&lsquo;<CODE>roundToInt</CODE>&rsquo; function).
+Previously, for those cases only, rounding mode <CODE>odd</CODE> acted the same
+as rounding to minimum magnitude.
+Now all operations are rounded consistently.
+
+<LI>
+Fixed some errors in the specialization code modeling Intel x86 floating-point,
+specifically the integers returned on invalid operations and the propagation of
+NaN payloads in a few rare cases.
+
+<LI>
+Added specialization code modeling ARM floating-point, conforming to VFPv2 or
+later.
+
+<LI>
+Added an example target for ARM processors.
+
+<LI>
+Fixed a minor bug whereby function <CODE>f16_to_ui64</CODE> might return a
+different integer than expected in the case that the floating-point operand is
+negative.
+
+<LI>
+Added example target-specific optimization for GCC, employing GCC instrinsics
+and support for <NOBR>128-bit</NOBR> integer arithmetic.
+
+<LI>
+Made other minor improvements.
+
+</UL>
+
+
+<H3>Release 3d (2017 August)</H3>
+
+<UL>
+
+<LI>
+Fixed bugs in the square root functions for <NOBR>64-bit</NOBR>
+double-precision, <NOBR>80-bit</NOBR> double-extended-precision, and
+<NOBR>128-bit</NOBR> quadruple-precision.
+For <NOBR>64-bit</NOBR> double-precision (<CODE>f64_sqrt</CODE>), the result
+could sometimes be off by <NOBR>1 unit</NOBR> in the last place
+(<NOBR>1 ulp</NOBR>) from what it should be.
+For the larger formats, the square root could be wrong in a large portion of
+the less-significant bits.
+(A bug in <CODE>f128_sqrt</CODE> was first reported by Alexei Sibidanov.)
+
+</UL>
+
+
+<H3>Release 3c (2017 February)</H3>
+
+<UL>
+
+<LI>
+Added optional rounding mode <CODE>odd</CODE> (round to odd, also known as
+<EM>jamming</EM>).
+
+<LI>
+Corrected the documentation concerning non-canonical representations in
+<NOBR>80-bit</NOBR> double-extended-precision.
+
+</UL>
+
+
+<H3>Release 3b (2016 July)</H3>
+
+<UL>
+
+<LI>
+Implemented the common <NOBR>16-bit</NOBR> &ldquo;half-precision&rdquo;
+floating-point format (<CODE>float16_t</CODE>).
+
+<LI>
+Made the integer values returned on invalid conversions to integer formats
+be determined by the port-specific specialization instead of being the same for
+all ports.
+
+<LI>
+Added preprocessor macro <CODE>THREAD_LOCAL</CODE> to allow the floating-point
+state (modes and exception flags) to be made per-thread.
+
+<LI>
+Modified the provided Makefiles to allow some options to be overridden from the
+<CODE>make</CODE> command.
+
+<LI>
+Made other minor improvements.
+
+</UL>
+
+
+<H3>Release 3a (2015 October)</H3>
+
+<UL>
+
+<LI>
+Replaced the license text supplied by the University of California, Berkeley.
+
+</UL>
+
+
+<H3>Release 3 (2015 February)</H3>
+
+<UL>
+
+<LI>
+Complete rewrite, funded by the University of California, Berkeley, and
+consequently having a different use license than earlier releases.
+Major changes included renaming most types and functions, upgrading some
+algorithms, restructuring the source files, and making SoftFloat into a true
+library.
+
+<LI>
+Added functions to convert between floating-point and unsigned integers, both
+<NOBR>32-bit</NOBR> and <NOBR>64-bit</NOBR> (<CODE>uint32_t</CODE> and
+<CODE>uint64_t</CODE>).
+
+<LI>
+Added functions for fused multiply-add, for all supported floating-point
+formats except <NOBR>80-bit</NOBR> double-extended-precision.
+
+<LI>
+Added support for a fifth rounding mode, <CODE>near_maxMag</CODE> (round to
+nearest, with ties to maximum magnitude, away from zero).
+
+<LI>
+Dropped the <CODE>timesoftfloat</CODE> program (now part of the Berkeley
+TestFloat package).
+
+</UL>
+
+
+<H3>Release 2c (2015 January)</H3>
+
+<UL>
+
+<LI>
+Fixed mistakes affecting some <NOBR>64-bit</NOBR> processors.
+
+<LI>
+Further improved the documentation and the wording for the legal restrictions
+on using SoftFloat releases <NOBR>through 2c</NOBR> (not applicable to
+<NOBR>Release 3</NOBR> or later).
+
+</UL>
+
+
+<H3>Release 2b (2002 May)</H3>
+
+<UL>
+
+<LI>
+Made minor updates to the documentation, including improved wording for the
+legal restrictions on using SoftFloat.
+
+</UL>
+
+
+<H3>Release 2a (1998 December)</H3>
+
+<UL>
+
+<LI>
+Added functions to convert between <NOBR>64-bit</NOBR> integers
+(<CODE>int64</CODE>) and all supported floating-point formats.
+
+<LI>
+Fixed a bug in all <NOBR>64-bit</NOBR>-version square root functions except
+<CODE>float32_sqrt</CODE> that caused the result sometimes to be off by
+<NOBR>1 unit</NOBR> in the last place (<NOBR>1 ulp</NOBR>) from what it should
+be.
+(Bug discovered by Paul Donahue.)
+
+<LI>
+Improved the Makefiles.
+</UL>
+
+
+<H3>Release 2 (1997 June)</H3>
+
+<UL>
+
+<LI>
+Created the <NOBR>64-bit</NOBR> (<CODE>bits64</CODE>) version, adding the
+<CODE>floatx80</CODE> and <CODE>float128</CODE> formats.
+
+<LI>
+Changed the source directory structure, splitting the sources into a
+<CODE>bits32</CODE> and a <CODE>bits64</CODE> version.
+Renamed <CODE>environment.h</CODE> to <CODE>milieu.h</CODE> to avoid confusion
+with environment variables.
+
+<LI>
+Fixed a small error that caused <CODE>float64_round_to_int</CODE> often to
+round the wrong way in nearest/even mode when the operand was between
+2<SUP>20</SUP> and 2<SUP>21</SUP> and halfway between two integers.
+
+</UL>
+
+
+<H3>Release 1a (1996 July)</H3>
+
+<UL>
+
+<LI>
+Corrected a mistake that caused borderline underflow cases not to raise the
+underflow flag when they should have.
+(Problem reported by Doug Priest.)
+
+<LI>
+Added the <CODE>float_detect_tininess</CODE> variable to control whether
+tininess is detected before or after rounding.
+
+</UL>
+
+
+<H3>Release 1 (1996 July)</H3>
+
+<UL>
+
+<LI>
+Original release, based on work done for the International Computer Science
+Institute (ICSI) in Berkeley, California.
+
+</UL>
+
+
+</BODY>
+
diff --git a/src/libs/softfloat-3e/doc/SoftFloat-source.html b/src/libs/softfloat-3e/doc/SoftFloat-source.html
new file mode 100644
index 00000000..4ff9d4c4
--- /dev/null
+++ b/src/libs/softfloat-3e/doc/SoftFloat-source.html
@@ -0,0 +1,686 @@
+
+<HTML>
+
+<HEAD>
+<TITLE>Berkeley SoftFloat Source Documentation</TITLE>
+</HEAD>
+
+<BODY>
+
+<H1>Berkeley SoftFloat Release 3e: Source Documentation</H1>
+
+<P>
+John R. Hauser<BR>
+2018 January 20<BR>
+</P>
+
+
+<H2>Contents</H2>
+
+<BLOCKQUOTE>
+<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
+<COL WIDTH=25>
+<COL WIDTH=*>
+<TR><TD COLSPAN=2>1. Introduction</TD></TR>
+<TR><TD COLSPAN=2>2. Limitations</TD></TR>
+<TR><TD COLSPAN=2>3. Acknowledgments and License</TD></TR>
+<TR><TD COLSPAN=2>4. SoftFloat Package Directory Structure</TD></TR>
+<TR><TD COLSPAN=2>5. Issues for Porting SoftFloat to a New Target</TD></TR>
+<TR>
+ <TD></TD>
+ <TD>5.1. Standard Headers <CODE>&lt;stdbool.h&gt;</CODE> and
+ <CODE>&lt;stdint.h&gt;</CODE></TD>
+</TR>
+<TR><TD></TD><TD>5.2. Specializing Floating-Point Behavior</TD></TR>
+<TR><TD></TD><TD>5.3. Macros for Build Options</TD></TR>
+<TR><TD></TD><TD>5.4. Adapting a Template Target Directory</TD></TR>
+<TR>
+ <TD></TD><TD>5.5. Target-Specific Optimization of Primitive Functions</TD>
+</TR>
+<TR><TD COLSPAN=2>6. Testing SoftFloat</TD></TR>
+<TR>
+ <TD COLSPAN=2>7. Providing SoftFloat as a Common Library for Applications</TD>
+</TR>
+<TR><TD COLSPAN=2>8. Contact Information</TD></TR>
+</TABLE>
+</BLOCKQUOTE>
+
+
+<H2>1. Introduction</H2>
+
+<P>
+This document gives information needed for compiling and/or porting Berkeley
+SoftFloat, a library of C functions implementing binary floating-point
+conforming to the IEEE Standard for Floating-Point Arithmetic.
+For basic documentation about SoftFloat refer to
+<A HREF="SoftFloat.html"><NOBR><CODE>SoftFloat.html</CODE></NOBR></A>.
+</P>
+
+<P>
+The source code for SoftFloat is intended to be relatively machine-independent
+and should be compilable with any ISO-Standard C compiler that also supports
+<NOBR>64-bit</NOBR> integers.
+SoftFloat has been successfully compiled with the GNU C Compiler
+(<CODE>gcc</CODE>) for several platforms.
+</P>
+
+<P>
+<NOBR>Release 3</NOBR> of SoftFloat was a complete rewrite relative to
+<NOBR>Release 2</NOBR> or earlier.
+Changes to the interface of SoftFloat functions are documented in
+<A HREF="SoftFloat.html"><NOBR><CODE>SoftFloat.html</CODE></NOBR></A>.
+The current version of SoftFloat is <NOBR>Release 3e</NOBR>.
+</P>
+
+
+<H2>2. Limitations</H2>
+
+<P>
+SoftFloat assumes the computer has an addressable byte size of either 8 or
+<NOBR>16 bits</NOBR>.
+(Nearly all computers in use today have <NOBR>8-bit</NOBR> bytes.)
+</P>
+
+<P>
+SoftFloat is written in C and is designed to work with other C code.
+The C compiler used must conform at a minimum to the 1989 ANSI standard for the
+C language (same as the 1990 ISO standard) and must in addition support basic
+arithmetic on <NOBR>64-bit</NOBR> integers.
+Earlier releases of SoftFloat included implementations of <NOBR>32-bit</NOBR>
+single-precision and <NOBR>64-bit</NOBR> double-precision floating-point that
+did not require <NOBR>64-bit</NOBR> integers, but this option is not supported
+starting with <NOBR>Release 3</NOBR>.
+Since 1999, ISO standards for C have mandated compiler support for
+<NOBR>64-bit</NOBR> integers.
+A compiler conforming to the 1999 C Standard or later is recommended but not
+strictly required.
+</P>
+
+<P>
+<NOBR>C Standard</NOBR> header files <CODE>&lt;stdbool.h&gt;</CODE> and
+<CODE>&lt;stdint.h&gt;</CODE> are required for defining standard Boolean and
+integer types.
+If these headers are not supplied with the C compiler, minimal substitutes must
+be provided.
+SoftFloat&rsquo;s dependence on these headers is detailed later in
+<NOBR>section 5.1</NOBR>, <I>Standard Headers <CODE>&lt;stdbool.h&gt;</CODE>
+and <CODE>&lt;stdint.h&gt;</CODE></I>.
+</P>
+
+
+<H2>3. Acknowledgments and License</H2>
+
+<P>
+The SoftFloat package was written by me, <NOBR>John R.</NOBR> Hauser.
+<NOBR>Release 3</NOBR> of SoftFloat was a completely new implementation
+supplanting earlier releases.
+The project to create <NOBR>Release 3</NOBR> (now <NOBR>through 3e</NOBR>) was
+done in the employ of the University of California, Berkeley, within the
+Department of Electrical Engineering and Computer Sciences, first for the
+Parallel Computing Laboratory (Par Lab) and then for the ASPIRE Lab.
+The work was officially overseen by Prof. Krste Asanovic, with funding provided
+by these sources:
+<BLOCKQUOTE>
+<TABLE>
+<COL>
+<COL WIDTH=10>
+<COL>
+<TR>
+<TD VALIGN=TOP><NOBR>Par Lab:</NOBR></TD>
+<TD></TD>
+<TD>
+Microsoft (Award #024263), Intel (Award #024894), and U.C. Discovery
+(Award #DIG07-10227), with additional support from Par Lab affiliates Nokia,
+NVIDIA, Oracle, and Samsung.
+</TD>
+</TR>
+<TR>
+<TD VALIGN=TOP><NOBR>ASPIRE Lab:</NOBR></TD>
+<TD></TD>
+<TD>
+DARPA PERFECT program (Award #HR0011-12-2-0016), with additional support from
+ASPIRE industrial sponsor Intel and ASPIRE affiliates Google, Nokia, NVIDIA,
+Oracle, and Samsung.
+</TD>
+</TR>
+</TABLE>
+</BLOCKQUOTE>
+</P>
+
+<P>
+The following applies to the whole of SoftFloat <NOBR>Release 3e</NOBR> as well
+as to each source file individually.
+</P>
+
+<P>
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
+University of California.
+All rights reserved.
+</P>
+
+<P>
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+<OL>
+
+<LI>
+<P>
+Redistributions of source code must retain the above copyright notice, this
+list of conditions, and the following disclaimer.
+</P>
+
+<LI>
+<P>
+Redistributions in binary form must reproduce the above copyright notice, this
+list of conditions, and the following disclaimer in the documentation and/or
+other materials provided with the distribution.
+</P>
+
+<LI>
+<P>
+Neither the name of the University nor the names of its contributors may be
+used to endorse or promote products derived from this software without specific
+prior written permission.
+</P>
+
+</OL>
+</P>
+
+<P>
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS &ldquo;AS IS&rdquo;,
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED.
+IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</P>
+
+
+<H2>4. SoftFloat Package Directory Structure</H2>
+
+<P>
+Because SoftFloat is targeted to multiple platforms, its source code is
+slightly scattered between target-specific and target-independent directories
+and files.
+The supplied directory structure is as follows:
+<BLOCKQUOTE>
+<PRE>
+doc
+source
+ include
+ 8086
+ 8086-SSE
+ ARM-VFPv2
+ ARM-VFPv2-defaultNaN
+build
+ template-FAST_INT64
+ template-not-FAST_INT64
+ Linux-386-GCC
+ Linux-386-SSE2-GCC
+ Linux-x86_64-GCC
+ Linux-ARM-VFPv2-GCC
+ Win32-MinGW
+ Win32-SSE2-MinGW
+ Win64-MinGW-w64
+</PRE>
+</BLOCKQUOTE>
+The majority of the SoftFloat sources are provided in the <CODE>source</CODE>
+directory.
+The <CODE>include</CODE> subdirectory contains several header files
+(unsurprisingly), while the other subdirectories of <CODE>source</CODE> contain
+source files that specialize the floating-point behavior to match particular
+processor families:
+<BLOCKQUOTE>
+<DL>
+<DT><CODE>8086</CODE></DT>
+<DD>
+Intel&rsquo;s older, 8087-derived floating-point, extended to all supported
+floating-point types
+</DD>
+<DT><CODE>8086-SSE</CODE></DT>
+<DD>
+Intel&rsquo;s x86 processors with Streaming SIMD Extensions (SSE) and later
+compatible extensions, having 8087 behavior for <NOBR>80-bit</NOBR>
+double-extended-precision (<CODE>extFloat80_t</CODE>) and SSE behavior for
+other floating-point types
+</DD>
+<DT><CODE>ARM-VFPv2</CODE></DT>
+<DD>
+ARM&rsquo;s VFPv2 or later floating-point, with NaN payload propagation
+</DD>
+<DT><CODE>ARM-VFPv2-defaultNaN</CODE></DT>
+<DD>
+ARM&rsquo;s VFPv2 or later floating-point, with the &ldquo;default NaN&rdquo;
+option
+</DD>
+</DL>
+</BLOCKQUOTE>
+If other specializations are attempted, these would be expected to be other
+subdirectories of <CODE>source</CODE> alongside the ones listed above.
+Specialization is covered later, in <NOBR>section 5.2</NOBR>, <I>Specializing
+Floating-Point Behavior</I>.
+</P>
+
+<P>
+The <CODE>build</CODE> directory is intended to contain a subdirectory for each
+target platform for which a build of the SoftFloat library may be created.
+For each build target, the target&rsquo;s subdirectory is where all derived
+object files and the completed SoftFloat library (typically
+<CODE>softfloat.a</CODE> or <CODE>libsoftfloat.a</CODE>) are created.
+The two <CODE>template</CODE> subdirectories are not actual build targets but
+contain sample files for creating new target directories.
+(The meaning of <CODE>FAST_INT64</CODE> will be explained later.)
+</P>
+
+<P>
+Ignoring the <CODE>template</CODE> directories, the supplied target directories
+are intended to follow a naming system of
+<NOBR><CODE>&lt;<I>execution-environment</I>&gt;-&lt;<I>compiler</I>&gt;</CODE></NOBR>.
+For the example targets,
+<NOBR><CODE>&lt;<I>execution-environment</I>&gt;</CODE></NOBR> is
+<NOBR><CODE>Linux-386</CODE></NOBR>, <NOBR><CODE>Linux-386-SSE2</CODE></NOBR>,
+<NOBR><CODE>Linux-x86_64</CODE></NOBR>,
+<NOBR><CODE>Linux-ARM-VFPv2</CODE></NOBR>, <CODE>Win32</CODE>,
+<NOBR><CODE>Win32-SSE2</CODE></NOBR>, or <CODE>Win64</CODE>, and
+<NOBR><CODE>&lt;<I>compiler</I>&gt;</CODE></NOBR> is <CODE>GCC</CODE>,
+<CODE>MinGW</CODE>, or <NOBR><CODE>MinGW-w64</CODE></NOBR>.
+</P>
+
+<P>
+All of the supplied target directories are merely examples that may or may not
+be correct for compiling on any particular system.
+Despite requests, there are currently no plans to include and maintain in the
+SoftFloat package the build files needed for a great many users&rsquo;
+compilation environments, which can span a huge range of operating systems,
+compilers, and other tools.
+</P>
+
+<P>
+As supplied, each target directory contains two files:
+<BLOCKQUOTE>
+<PRE>
+Makefile
+platform.h
+</PRE>
+</BLOCKQUOTE>
+The provided <CODE>Makefile</CODE> is written for GNU <CODE>make</CODE>.
+A build of SoftFloat for the specific target is begun by executing the
+<CODE>make</CODE> command with the target directory as the current directory.
+A completely different build tool can be used if an appropriate
+<CODE>Makefile</CODE> equivalent is created.
+</P>
+
+<P>
+The <CODE>platform.h</CODE> header file exists to provide a location for
+additional C declarations specific to the build target.
+Every C source file of SoftFloat contains a <CODE>#include</CODE> for
+<CODE>platform.h</CODE>.
+In many cases, the contents of <CODE>platform.h</CODE> can be as simple as one
+or two lines of code.
+At the other extreme, to get maximal performance from SoftFloat, it may be
+desirable to include in header <CODE>platform.h</CODE> (directly or via
+<CODE>#include</CODE>) declarations for numerous target-specific optimizations.
+Such possibilities are discussed in the next section, <I>Issues for Porting
+SoftFloat to a New Target</I>.
+If the target&rsquo;s compiler or library has bugs or other shortcomings,
+workarounds for these issues may also be possible with target-specific
+declarations in <CODE>platform.h</CODE>, avoiding the need to modify the main
+SoftFloat sources.
+</P>
+
+
+<H2>5. Issues for Porting SoftFloat to a New Target</H2>
+
+<H3>5.1. Standard Headers <CODE>&lt;stdbool.h&gt;</CODE> and <CODE>&lt;stdint.h&gt;</CODE></H3>
+
+<P>
+The SoftFloat sources make use of standard headers
+<CODE>&lt;stdbool.h&gt;</CODE> and <CODE>&lt;stdint.h&gt;</CODE>, which have
+been part of the ISO C Standard Library since 1999.
+With any recent compiler, these standard headers are likely to be supported,
+even if the compiler does not claim complete conformance to the latest ISO C
+Standard.
+For older or nonstandard compilers, substitutes for
+<CODE>&lt;stdbool.h&gt;</CODE> and <CODE>&lt;stdint.h&gt;</CODE> may need to be
+created.
+SoftFloat depends on these names from <CODE>&lt;stdbool.h&gt;</CODE>:
+<BLOCKQUOTE>
+<PRE>
+bool
+true
+false
+</PRE>
+</BLOCKQUOTE>
+and on these names from <CODE>&lt;stdint.h&gt;</CODE>:
+<BLOCKQUOTE>
+<PRE>
+uint16_t
+uint32_t
+uint64_t
+int32_t
+int64_t
+UINT64_C
+INT64_C
+uint_least8_t
+uint_fast8_t
+uint_fast16_t
+uint_fast32_t
+uint_fast64_t
+int_fast8_t
+int_fast16_t
+int_fast32_t
+int_fast64_t
+</PRE>
+</BLOCKQUOTE>
+</P>
+
+
+<H3>5.2. Specializing Floating-Point Behavior</H3>
+
+<P>
+The IEEE Floating-Point Standard allows for some flexibility in a conforming
+implementation, particularly concerning NaNs.
+The SoftFloat <CODE>source</CODE> directory is supplied with some
+<I>specialization</I> subdirectories containing possible definitions for this
+implementation-specific behavior.
+For example, the <CODE>8086</CODE> and <NOBR><CODE>8086-SSE</CODE></NOBR>
+subdirectories have source files that specialize SoftFloat&rsquo;s behavior to
+match that of Intel&rsquo;s x86 line of processors.
+The files in a specialization subdirectory must determine:
+<UL>
+<LI>
+whether tininess for underflow is detected before or after rounding by default;
+<LI>
+how signaling NaNs are distinguished from quiet NaNs;
+<LI>
+what (if anything) special happens when exceptions are raised;
+<LI>
+the default generated quiet NaNs;
+<LI>
+how NaNs are propagated from function inputs to output; and
+<LI>
+the integer results returned when conversions to integer type raise the
+<I>invalid</I> exception.
+</UL>
+</P>
+
+<P>
+As provided, the build process for a target expects to involve exactly
+<EM>one</EM> specialization directory that defines <EM>all</EM> of these
+implementation-specific details for the target.
+A specialization directory such as <CODE>8086</CODE> is expected to contain a
+header file called <CODE>specialize.h</CODE>, together with whatever other
+source files are needed to complete the specialization.
+</P>
+
+<P>
+A new build target may use an existing specialization, such as the ones
+provided by the <CODE>8086</CODE> and <NOBR><CODE>8086-SSE</CODE></NOBR>
+subdirectories.
+If a build target needs a new specialization, different from any existing ones,
+it is recommended that a new specialization directory be created for this
+purpose.
+The <CODE>specialize.h</CODE> header file from any of the provided
+specialization subdirectories can be used as a model for what definitions are
+needed.
+</P>
+
+
+<H3>5.3. Macros for Build Options</H3>
+
+<P>
+The SoftFloat source files adapt the floating-point implementation according to
+several C preprocessor macros:
+<BLOCKQUOTE>
+<DL>
+<DT><CODE>LITTLEENDIAN</CODE>
+<DD>
+Must be defined for little-endian machines; must not be defined for big-endian
+machines.
+<DT><CODE>INLINE</CODE>
+<DD>
+Specifies the sequence of tokens used to indicate that a C function should be
+inlined.
+If macro <CODE>INLINE_LEVEL</CODE> is defined with a value of 1 or higher, this
+macro must be defined; otherwise, this macro is ignored and need not be
+defined.
+For compilers that conform to the C Standard&rsquo;s rules for inline
+functions, this macro can be defined as the single keyword <CODE>inline</CODE>.
+For other compilers that follow a convention pre-dating the standardization of
+<CODE>inline</CODE>, this macro may need to be defined to <CODE>extern</CODE>
+<CODE>inline</CODE>.
+<DT><CODE>THREAD_LOCAL</CODE>
+<DD>
+Can be defined to a sequence of tokens that, when appearing at the start of a
+variable declaration, indicates to the C compiler that the variable is
+<I>per-thread</I>, meaning that each execution thread gets its own separate
+instance of the variable.
+This macro is used in header <CODE>softfloat.h</CODE> in the declarations of
+variables <CODE>softfloat_roundingMode</CODE>,
+<CODE>softfloat_detectTininess</CODE>, <CODE>extF80_roundingPrecision</CODE>,
+and <CODE>softfloat_exceptionFlags</CODE>.
+If macro <CODE>THREAD_LOCAL</CODE> is left undefined, these variables will
+default to being ordinary global variables.
+Depending on the compiler, possible valid definitions of this macro include
+<CODE>_Thread_local</CODE> and <CODE>__thread</CODE>.
+</DL>
+<DL>
+<DT><CODE>SOFTFLOAT_ROUND_ODD</CODE>
+<DD>
+Can be defined to enable support for optional rounding mode
+<CODE>softfloat_round_odd</CODE>.
+</DL>
+<DL>
+<DT><CODE>INLINE_LEVEL</CODE>
+<DD>
+Can be defined to an integer to determine the degree of inlining requested of
+the compiler.
+Larger numbers request that more inlining be done.
+If this macro is not defined or is defined to a value less <NOBR>than 1</NOBR>
+(zero or negative), no inlining is requested.
+The maximum effective value is no higher <NOBR>than 5</NOBR>.
+Defining this macro to a value greater than 5 is the same as defining it
+<NOBR>to 5</NOBR>.
+<DT><CODE>SOFTFLOAT_FAST_INT64</CODE>
+<DD>
+Can be defined to indicate that the build target&rsquo;s implementation of
+<NOBR>64-bit</NOBR> arithmetic is efficient.
+For newer <NOBR>64-bit</NOBR> processors, this macro should usually be defined.
+For very small microprocessors whose buses and registers are <NOBR>8-bit</NOBR>
+or <NOBR>16-bit</NOBR> in size, this macro should usually not be defined.
+Whether this macro should be defined for a <NOBR>32-bit</NOBR> processor may
+depend on the target machine and the applications that will use SoftFloat.
+<DT><CODE>SOFTFLOAT_FAST_DIV32TO16</CODE>
+<DD>
+Can be defined to indicate that the target&rsquo;s division operator
+<NOBR>in C</NOBR> (written as <CODE>/</CODE>) is reasonably efficient for
+dividing a <NOBR>32-bit</NOBR> unsigned integer by a <NOBR>16-bit</NOBR>
+unsigned integer.
+Setting this macro may affect the performance of function <CODE>f16_div</CODE>.
+<DT><CODE>SOFTFLOAT_FAST_DIV64TO32</CODE>
+<DD>
+Can be defined to indicate that the target&rsquo;s division operator
+<NOBR>in C</NOBR> (written as <CODE>/</CODE>) is reasonably efficient for
+dividing a <NOBR>64-bit</NOBR> unsigned integer by a <NOBR>32-bit</NOBR>
+unsigned integer.
+Setting this macro may affect the performance of division, remainder, and
+square root operations other than <CODE>f16_div</CODE>.
+</DL>
+</BLOCKQUOTE>
+</P>
+
+<P>
+Following the usual custom <NOBR>for C</NOBR>, for most of these macros (all
+except <CODE>INLINE</CODE>, <CODE>THREAD_LOCAL</CODE>, and
+<CODE>INLINE_LEVEL</CODE>), the content of any definition is irrelevant;
+what matters is a macro&rsquo;s effect on <CODE>#ifdef</CODE> directives.
+</P>
+
+<P>
+It is recommended that any definitions of macros <CODE>LITTLEENDIAN</CODE>,
+<CODE>INLINE</CODE>, and <CODE>THREAD_LOCAL</CODE> be made in a build
+target&rsquo;s <CODE>platform.h</CODE> header file, because these macros are
+expected to be determined inflexibly by the target machine and compiler.
+The other five macros select options and control optimization, and thus might
+be better located in the target&rsquo;s Makefile (or its equivalent).
+</P>
+
+
+<H3>5.4. Adapting a Template Target Directory</H3>
+
+<P>
+In the <CODE>build</CODE> directory, two <CODE>template</CODE> subdirectories
+provide models for new target directories.
+Two different templates exist because different functions are needed in the
+SoftFloat library depending on whether macro <CODE>SOFTFLOAT_FAST_INT64</CODE>
+is defined.
+If macro <CODE>SOFTFLOAT_FAST_INT64</CODE> will be defined,
+<NOBR><CODE>template-FAST_INT64</CODE></NOBR> is the template to use;
+otherwise, <NOBR><CODE>template-not-FAST_INT64</CODE></NOBR> is the appropriate
+template.
+A new target directory can be created by copying the correct template directory
+and editing the files inside.
+To avoid confusion, it would be wise to refrain from editing the files within a
+template directory directly.
+</P>
+
+
+<H3>5.5. Target-Specific Optimization of Primitive Functions</H3>
+
+<P>
+Header file <CODE>primitives.h</CODE> (in directory
+<CODE>source/include</CODE>) declares macros and functions for numerous
+underlying arithmetic operations upon which many of SoftFloat&rsquo;s
+floating-point functions are ultimately built.
+The SoftFloat sources include implementations of all of these functions/macros,
+written as standard C code, so a complete and correct SoftFloat library can be
+created using only the supplied code for all functions.
+However, for many targets, SoftFloat&rsquo;s performance can be improved by
+substituting target-specific implementations of some of the functions/macros
+declared in <CODE>primitives.h</CODE>.
+</P>
+
+<P>
+For example, <CODE>primitives.h</CODE> declares a function called
+<CODE>softfloat_countLeadingZeros32</CODE> that takes an unsigned
+<NOBR>32-bit</NOBR> integer as an argument and returns the number of the
+integer&rsquo;s most-significant bits that are zeros.
+While the SoftFloat sources include an implementation of this function written
+in <NOBR>standard C</NOBR>, many processors can perform this same function
+directly in only one or two machine instructions.
+An alternative, target-specific implementation that maps to those instructions
+is likely to be more efficient than the generic C code from the SoftFloat
+package.
+</P>
+
+<P>
+A build target can replace the supplied version of any function or macro of
+<CODE>primitives.h</CODE> by defining a macro with the same name in the
+target&rsquo;s <CODE>platform.h</CODE> header file.
+For this purpose, it may be helpful for <CODE>platform.h</CODE> to
+<CODE>#include</CODE> header file <CODE>primitiveTypes.h</CODE>, which defines
+types used for arguments and results of functions declared in
+<CODE>primitives.h</CODE>.
+When a desired replacement implementation is a function, not a macro, it is
+sufficient for <CODE>platform.h</CODE> to include the line
+<BLOCKQUOTE>
+<PRE>
+#define &lt;<I>function-name</I>&gt; &lt;<I>function-name</I>&gt;
+</PRE>
+</BLOCKQUOTE>
+where <NOBR><CODE>&lt;<I>function-name</I>&gt;</CODE></NOBR> is the name of the
+function.
+This technically defines <NOBR><CODE>&lt;<I>function-name</I>&gt;</CODE></NOBR>
+as a macro, but one that resolves to the same name, which may then be a
+function.
+(A preprocessor that conforms to the C Standard is required to limit recursive
+macro expansion from being applied more than once.)
+</P>
+
+<P>
+The supplied header file <CODE>opts-GCC.h</CODE> (in directory
+<CODE>source/include</CODE>) provides an example of target-specific
+optimization for the GCC compiler.
+Each GCC target example in the <CODE>build</CODE> directory has
+<BLOCKQUOTE>
+<CODE>#include "opts-GCC.h"</CODE>
+</BLOCKQUOTE>
+in its <CODE>platform.h</CODE> header file.
+Before <CODE>opts-GCC.h</CODE> is included, the following macros must be
+defined (or not) to control which features are invoked:
+<BLOCKQUOTE>
+<DL>
+<DT><CODE>SOFTFLOAT_BUILTIN_CLZ</CODE></DT>
+<DD>
+If defined, SoftFloat&rsquo;s internal
+&lsquo;<CODE>countLeadingZeros</CODE>&rsquo; functions use intrinsics
+<CODE>__builtin_clz</CODE> and <CODE>__builtin_clzll</CODE>.
+</DD>
+<DT><CODE>SOFTFLOAT_INTRINSIC_INT128</CODE></DT>
+<DD>
+If defined, SoftFloat makes use of GCC&rsquo;s nonstandard <NOBR>128-bit</NOBR>
+integer type <CODE>__int128</CODE>.
+</DD>
+</DL>
+</BLOCKQUOTE>
+On some machines, these improvements are observed to increase the speeds of
+<CODE>f64_mul</CODE> and <CODE>f128_mul</CODE> by around 20 to 25%, although
+other functions receive less dramatic boosts, or none at all.
+Results can vary greatly across different platforms.
+</P>
+
+
+<H2>6. Testing SoftFloat</H2>
+
+<P>
+SoftFloat can be tested using the <CODE>testsoftfloat</CODE> program by the
+same author.
+This program is part of the Berkeley TestFloat package available at the Web
+page
+<A HREF="http://www.jhauser.us/arithmetic/TestFloat.html"><NOBR><CODE>http://www.jhauser.us/arithmetic/TestFloat.html</CODE></NOBR></A>.
+The TestFloat package also has a program called <CODE>timesoftfloat</CODE> that
+measures the speed of SoftFloat&rsquo;s floating-point functions.
+</P>
+
+
+<H2>7. Providing SoftFloat as a Common Library for Applications</H2>
+
+<P>
+Header file <CODE>softfloat.h</CODE> defines the SoftFloat interface as seen by
+clients.
+If the SoftFloat library will be made a common library for programs on a
+system, the supplied <CODE>softfloat.h</CODE> has a couple of deficiencies for
+this purpose:
+<UL>
+<LI>
+As supplied, <CODE>softfloat.h</CODE> depends on another header,
+<CODE>softfloat_types.h</CODE>, that is not intended for public use but which
+must also be visible to the programmer&rsquo;s compiler.
+<LI>
+More troubling, at the time <CODE>softfloat.h</CODE> is included in a C source
+file, macros <CODE>SOFTFLOAT_FAST_INT64</CODE> and <CODE>THREAD_LOCAL</CODE>
+must be defined, or not defined, consistent with how these macro were defined
+when the SoftFloat library was built.
+</UL>
+In the situation that new programs may regularly <CODE>#include</CODE> header
+file <CODE>softfloat.h</CODE>, it is recommended that a custom, self-contained
+version of this header file be created that eliminates these issues.
+</P>
+
+
+<H2>8. Contact Information</H2>
+
+<P>
+At the time of this writing, the most up-to-date information about SoftFloat
+and the latest release can be found at the Web page
+<A HREF="http://www.jhauser.us/arithmetic/SoftFloat.html"><NOBR><CODE>http://www.jhauser.us/arithmetic/SoftFloat.html</CODE></NOBR></A>.
+</P>
+
+
+</BODY>
+
diff --git a/src/libs/softfloat-3e/doc/SoftFloat.html b/src/libs/softfloat-3e/doc/SoftFloat.html
new file mode 100644
index 00000000..b72b407f
--- /dev/null
+++ b/src/libs/softfloat-3e/doc/SoftFloat.html
@@ -0,0 +1,1527 @@
+
+<HTML>
+
+<HEAD>
+<TITLE>Berkeley SoftFloat Library Interface</TITLE>
+</HEAD>
+
+<BODY>
+
+<H1>Berkeley SoftFloat Release 3e: Library Interface</H1>
+
+<P>
+John R. Hauser<BR>
+2018 January 20<BR>
+</P>
+
+
+<H2>Contents</H2>
+
+<BLOCKQUOTE>
+<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
+<COL WIDTH=25>
+<COL WIDTH=*>
+<TR><TD COLSPAN=2>1. Introduction</TD></TR>
+<TR><TD COLSPAN=2>2. Limitations</TD></TR>
+<TR><TD COLSPAN=2>3. Acknowledgments and License</TD></TR>
+<TR><TD COLSPAN=2>4. Types and Functions</TD></TR>
+<TR><TD></TD><TD>4.1. Boolean and Integer Types</TD></TR>
+<TR><TD></TD><TD>4.2. Floating-Point Types</TD></TR>
+<TR><TD></TD><TD>4.3. Supported Floating-Point Functions</TD></TR>
+<TR>
+ <TD></TD>
+ <TD>4.4. Non-canonical Representations in <CODE>extFloat80_t</CODE></TD>
+</TR>
+<TR><TD></TD><TD>4.5. Conventions for Passing Arguments and Results</TD></TR>
+<TR><TD COLSPAN=2>5. Reserved Names</TD></TR>
+<TR><TD COLSPAN=2>6. Mode Variables</TD></TR>
+<TR><TD></TD><TD>6.1. Rounding Mode</TD></TR>
+<TR><TD></TD><TD>6.2. Underflow Detection</TD></TR>
+<TR>
+ <TD></TD>
+ <TD>6.3. Rounding Precision for the <NOBR>80-Bit</NOBR> Extended Format</TD>
+</TR>
+<TR><TD COLSPAN=2>7. Exceptions and Exception Flags</TD></TR>
+<TR><TD COLSPAN=2>8. Function Details</TD></TR>
+<TR><TD></TD><TD>8.1. Conversions from Integer to Floating-Point</TD></TR>
+<TR><TD></TD><TD>8.2. Conversions from Floating-Point to Integer</TD></TR>
+<TR><TD></TD><TD>8.3. Conversions Among Floating-Point Types</TD></TR>
+<TR><TD></TD><TD>8.4. Basic Arithmetic Functions</TD></TR>
+<TR><TD></TD><TD>8.5. Fused Multiply-Add Functions</TD></TR>
+<TR><TD></TD><TD>8.6. Remainder Functions</TD></TR>
+<TR><TD></TD><TD>8.7. Round-to-Integer Functions</TD></TR>
+<TR><TD></TD><TD>8.8. Comparison Functions</TD></TR>
+<TR><TD></TD><TD>8.9. Signaling NaN Test Functions</TD></TR>
+<TR><TD></TD><TD>8.10. Raise-Exception Function</TD></TR>
+<TR><TD COLSPAN=2>9. Changes from SoftFloat <NOBR>Release 2</NOBR></TD></TR>
+<TR><TD></TD><TD>9.1. Name Changes</TD></TR>
+<TR><TD></TD><TD>9.2. Changes to Function Arguments</TD></TR>
+<TR><TD></TD><TD>9.3. Added Capabilities</TD></TR>
+<TR><TD></TD><TD>9.4. Better Compatibility with the C Language</TD></TR>
+<TR><TD></TD><TD>9.5. New Organization as a Library</TD></TR>
+<TR><TD></TD><TD>9.6. Optimization Gains (and Losses)</TD></TR>
+<TR><TD COLSPAN=2>10. Future Directions</TD></TR>
+<TR><TD COLSPAN=2>11. Contact Information</TD></TR>
+</TABLE>
+</BLOCKQUOTE>
+
+
+<H2>1. Introduction</H2>
+
+<P>
+Berkeley SoftFloat is a software implementation of binary floating-point that
+conforms to the IEEE Standard for Floating-Point Arithmetic.
+The current release supports five binary formats: <NOBR>16-bit</NOBR>
+half-precision, <NOBR>32-bit</NOBR> single-precision, <NOBR>64-bit</NOBR>
+double-precision, <NOBR>80-bit</NOBR> double-extended-precision, and
+<NOBR>128-bit</NOBR> quadruple-precision.
+The following functions are supported for each format:
+<UL>
+<LI>
+addition, subtraction, multiplication, division, and square root;
+<LI>
+fused multiply-add as defined by the IEEE Standard, except for
+<NOBR>80-bit</NOBR> double-extended-precision;
+<LI>
+remainder as defined by the IEEE Standard;
+<LI>
+round to integral value;
+<LI>
+comparisons;
+<LI>
+conversions to/from other supported formats; and
+<LI>
+conversions to/from <NOBR>32-bit</NOBR> and <NOBR>64-bit</NOBR> integers,
+signed and unsigned.
+</UL>
+All operations required by the original 1985 version of the IEEE Floating-Point
+Standard are implemented, except for conversions to and from decimal.
+</P>
+
+<P>
+This document gives information about the types defined and the routines
+implemented by SoftFloat.
+It does not attempt to define or explain the IEEE Floating-Point Standard.
+Information about the standard is available elsewhere.
+</P>
+
+<P>
+The current version of SoftFloat is <NOBR>Release 3e</NOBR>.
+This release modifies the behavior of the rarely used <I>odd</I> rounding mode
+(<I>round to odd</I>, also known as <I>jamming</I>), and also adds some new
+specialization and optimization examples for those compiling SoftFloat.
+</P>
+
+<P>
+The previous <NOBR>Release 3d</NOBR> fixed bugs that were found in the square
+root functions for the <NOBR>64-bit</NOBR>, <NOBR>80-bit</NOBR>, and
+<NOBR>128-bit</NOBR> floating-point formats.
+(Thanks to Alexei Sibidanov at the University of Victoria for reporting an
+incorrect result.)
+The bugs affected all prior <NOBR>Release-3</NOBR> versions of SoftFloat
+<NOBR>through 3c</NOBR>.
+The flaw in the <NOBR>64-bit</NOBR> floating-point square root function was of
+very minor impact, causing a <NOBR>1-ulp</NOBR> error (<NOBR>1 unit</NOBR> in
+the last place) a few times out of a billion.
+The bugs in the <NOBR>80-bit</NOBR> and <NOBR>128-bit</NOBR> square root
+functions were more serious.
+Although incorrect results again occurred only a few times out of a billion,
+when they did occur a large portion of the less-significant bits could be
+wrong.
+</P>
+
+<P>
+Among earlier releases, 3b was notable for adding support for the
+<NOBR>16-bit</NOBR> half-precision format.
+For more about the evolution of SoftFloat releases, see
+<A HREF="SoftFloat-history.html"><NOBR><CODE>SoftFloat-history.html</CODE></NOBR></A>.
+</P>
+
+<P>
+The functional interface of SoftFloat <NOBR>Release 3</NOBR> and later differs
+in many details from the releases that came before.
+For specifics of these differences, see <NOBR>section 9</NOBR> below,
+<I>Changes from SoftFloat <NOBR>Release 2</NOBR></I>.
+</P>
+
+
+<H2>2. Limitations</H2>
+
+<P>
+SoftFloat assumes the computer has an addressable byte size of 8 or
+<NOBR>16 bits</NOBR>.
+(Nearly all computers in use today have <NOBR>8-bit</NOBR> bytes.)
+</P>
+
+<P>
+SoftFloat is written in C and is designed to work with other C code.
+The C compiler used must conform at a minimum to the 1989 ANSI standard for the
+C language (same as the 1990 ISO standard) and must in addition support basic
+arithmetic on <NOBR>64-bit</NOBR> integers.
+Earlier releases of SoftFloat included implementations of <NOBR>32-bit</NOBR>
+single-precision and <NOBR>64-bit</NOBR> double-precision floating-point that
+did not require <NOBR>64-bit</NOBR> integers, but this option is not supported
+starting with <NOBR>Release 3</NOBR>.
+Since 1999, ISO standards for C have mandated compiler support for
+<NOBR>64-bit</NOBR> integers.
+A compiler conforming to the 1999 C Standard or later is recommended but not
+strictly required.
+</P>
+
+<P>
+Most operations not required by the original 1985 version of the IEEE
+Floating-Point Standard but added in the 2008 version are not yet supported in
+SoftFloat <NOBR>Release 3e</NOBR>.
+</P>
+
+
+<H2>3. Acknowledgments and License</H2>
+
+<P>
+The SoftFloat package was written by me, <NOBR>John R.</NOBR> Hauser.
+<NOBR>Release 3</NOBR> of SoftFloat was a completely new implementation
+supplanting earlier releases.
+The project to create <NOBR>Release 3</NOBR> (now <NOBR>through 3e</NOBR>) was
+done in the employ of the University of California, Berkeley, within the
+Department of Electrical Engineering and Computer Sciences, first for the
+Parallel Computing Laboratory (Par Lab) and then for the ASPIRE Lab.
+The work was officially overseen by Prof. Krste Asanovic, with funding provided
+by these sources:
+<BLOCKQUOTE>
+<TABLE>
+<COL>
+<COL WIDTH=10>
+<COL>
+<TR>
+<TD VALIGN=TOP><NOBR>Par Lab:</NOBR></TD>
+<TD></TD>
+<TD>
+Microsoft (Award #024263), Intel (Award #024894), and U.C. Discovery
+(Award #DIG07-10227), with additional support from Par Lab affiliates Nokia,
+NVIDIA, Oracle, and Samsung.
+</TD>
+</TR>
+<TR>
+<TD VALIGN=TOP><NOBR>ASPIRE Lab:</NOBR></TD>
+<TD></TD>
+<TD>
+DARPA PERFECT program (Award #HR0011-12-2-0016), with additional support from
+ASPIRE industrial sponsor Intel and ASPIRE affiliates Google, Nokia, NVIDIA,
+Oracle, and Samsung.
+</TD>
+</TR>
+</TABLE>
+</BLOCKQUOTE>
+</P>
+
+<P>
+The following applies to the whole of SoftFloat <NOBR>Release 3e</NOBR> as well
+as to each source file individually.
+</P>
+
+<P>
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
+University of California.
+All rights reserved.
+</P>
+
+<P>
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+<OL>
+
+<LI>
+<P>
+Redistributions of source code must retain the above copyright notice, this
+list of conditions, and the following disclaimer.
+</P>
+
+<LI>
+<P>
+Redistributions in binary form must reproduce the above copyright notice, this
+list of conditions, and the following disclaimer in the documentation and/or
+other materials provided with the distribution.
+</P>
+
+<LI>
+<P>
+Neither the name of the University nor the names of its contributors may be
+used to endorse or promote products derived from this software without specific
+prior written permission.
+</P>
+
+</OL>
+</P>
+
+<P>
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS &ldquo;AS IS&rdquo;,
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED.
+IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</P>
+
+
+<H2>4. Types and Functions</H2>
+
+<P>
+The types and functions of SoftFloat are declared in header file
+<CODE>softfloat.h</CODE>.
+</P>
+
+<H3>4.1. Boolean and Integer Types</H3>
+
+<P>
+Header file <CODE>softfloat.h</CODE> depends on standard headers
+<CODE>&lt;stdbool.h&gt;</CODE> and <CODE>&lt;stdint.h&gt;</CODE> to define type
+<CODE>bool</CODE> and several integer types.
+These standard headers have been part of the ISO C Standard Library since 1999.
+With any recent compiler, they are likely to be supported, even if the compiler
+does not claim complete conformance to the latest ISO C Standard.
+For older or nonstandard compilers, a port of SoftFloat may have substitutes
+for these headers.
+Header <CODE>softfloat.h</CODE> depends only on the name <CODE>bool</CODE> from
+<CODE>&lt;stdbool.h&gt;</CODE> and on these type names from
+<CODE>&lt;stdint.h&gt;</CODE>:
+<BLOCKQUOTE>
+<PRE>
+uint16_t
+uint32_t
+uint64_t
+int32_t
+int64_t
+uint_fast8_t
+uint_fast32_t
+uint_fast64_t
+int_fast32_t
+int_fast64_t
+</PRE>
+</BLOCKQUOTE>
+</P>
+
+
+<H3>4.2. Floating-Point Types</H3>
+
+<P>
+The <CODE>softfloat.h</CODE> header defines five floating-point types:
+<BLOCKQUOTE>
+<TABLE CELLSPACING=0 CELLPADDING=0>
+<TR>
+<TD><CODE>float16_t</CODE></TD>
+<TD><NOBR>16-bit</NOBR> half-precision binary format</TD>
+</TR>
+<TR>
+<TD><CODE>float32_t</CODE></TD>
+<TD><NOBR>32-bit</NOBR> single-precision binary format</TD>
+</TR>
+<TR>
+<TD><CODE>float64_t</CODE></TD>
+<TD><NOBR>64-bit</NOBR> double-precision binary format</TD>
+</TR>
+<TR>
+<TD><CODE>extFloat80_t&nbsp;&nbsp;&nbsp;</CODE></TD>
+<TD><NOBR>80-bit</NOBR> double-extended-precision binary format (old Intel or
+Motorola format)</TD>
+</TR>
+<TR>
+<TD><CODE>float128_t</CODE></TD>
+<TD><NOBR>128-bit</NOBR> quadruple-precision binary format</TD>
+</TR>
+</TABLE>
+</BLOCKQUOTE>
+The non-extended types are each exactly the size specified:
+<NOBR>16 bits</NOBR> for <CODE>float16_t</CODE>, <NOBR>32 bits</NOBR> for
+<CODE>float32_t</CODE>, <NOBR>64 bits</NOBR> for <CODE>float64_t</CODE>, and
+<NOBR>128 bits</NOBR> for <CODE>float128_t</CODE>.
+Aside from these size requirements, the definitions of all these types may
+differ for different ports of SoftFloat to specific systems.
+A given port of SoftFloat may or may not define some of the floating-point
+types as aliases for the C standard types <CODE>float</CODE>,
+<CODE>double</CODE>, and <CODE>long</CODE> <CODE>double</CODE>.
+</P>
+
+<P>
+Header file <CODE>softfloat.h</CODE> also defines a structure,
+<CODE>struct</CODE> <CODE>extFloat80M</CODE>, for the representation of
+<NOBR>80-bit</NOBR> double-extended-precision floating-point values in memory.
+This structure is the same size as type <CODE>extFloat80_t</CODE> and contains
+at least these two fields (not necessarily in this order):
+<BLOCKQUOTE>
+<PRE>
+uint16_t signExp;
+uint64_t signif;
+</PRE>
+</BLOCKQUOTE>
+Field <CODE>signExp</CODE> contains the sign and exponent of the floating-point
+value, with the sign in the most significant bit (<NOBR>bit 15</NOBR>) and the
+encoded exponent in the other <NOBR>15 bits</NOBR>.
+Field <CODE>signif</CODE> is the complete <NOBR>64-bit</NOBR> significand of
+the floating-point value.
+(In the usual encoding for <NOBR>80-bit</NOBR> extended floating-point, the
+leading <NOBR>1 bit</NOBR> of normalized numbers is not implicit but is stored
+in the most significant bit of the significand.)
+</P>
+
+<H3>4.3. Supported Floating-Point Functions</H3>
+
+<P>
+SoftFloat implements these arithmetic operations for its floating-point types:
+<UL>
+<LI>
+conversions between any two floating-point formats;
+<LI>
+for each floating-point format, conversions to and from signed and unsigned
+<NOBR>32-bit</NOBR> and <NOBR>64-bit</NOBR> integers;
+<LI>
+for each format, the usual addition, subtraction, multiplication, division, and
+square root operations;
+<LI>
+for each format except <CODE>extFloat80_t</CODE>, the fused multiply-add
+operation defined by the IEEE Standard;
+<LI>
+for each format, the floating-point remainder operation defined by the IEEE
+Standard;
+<LI>
+for each format, a &ldquo;round to integer&rdquo; operation that rounds to the
+nearest integer value in the same format; and
+<LI>
+comparisons between two values in the same floating-point format.
+</UL>
+</P>
+
+<P>
+The following operations required by the 2008 IEEE Floating-Point Standard are
+not supported in SoftFloat <NOBR>Release 3e</NOBR>:
+<UL>
+<LI>
+<B>nextUp</B>, <B>nextDown</B>, <B>minNum</B>, <B>maxNum</B>, <B>minNumMag</B>,
+<B>maxNumMag</B>, <B>scaleB</B>, and <B>logB</B>;
+<LI>
+conversions between floating-point formats and decimal or hexadecimal character
+sequences;
+<LI>
+all &ldquo;quiet-computation&rdquo; operations (<B>copy</B>, <B>negate</B>,
+<B>abs</B>, and <B>copySign</B>, which all involve only simple copying and/or
+manipulation of the floating-point sign bit); and
+<LI>
+all &ldquo;non-computational&rdquo; operations other than <B>isSignaling</B>
+(which is supported).
+</UL>
+</P>
+
+<H3>4.4. Non-canonical Representations in <CODE>extFloat80_t</CODE></H3>
+
+<P>
+Because the <NOBR>80-bit</NOBR> double-extended-precision format,
+<CODE>extFloat80_t</CODE>, stores an explicit leading significand bit, many
+finite floating-point numbers are encodable in this type in multiple equivalent
+forms.
+Of these multiple encodings, there is always a unique one with the least
+encoded exponent value, and this encoding is considered the <I>canonical</I>
+representation of the floating-point number.
+Any other equivalent representations (having a higher encoded exponent value)
+are <I>non-canonical</I>.
+For a value in the subnormal range (including zero), the canonical
+representation always has an encoded exponent of zero and a leading significand
+bit <NOBR>of 0</NOBR>.
+For finite values outside the subnormal range, the canonical representation
+always has an encoded exponent that is nonzero and a leading significand bit
+<NOBR>of 1</NOBR>.
+</P>
+
+<P>
+For an infinity or NaN, the leading significand bit is similarly expected to
+<NOBR>be 1</NOBR>.
+An infinity or NaN with a leading significand bit <NOBR>of 0</NOBR> is again
+considered non-canonical.
+Hence, altogether, to be canonical, a value of type <CODE>extFloat80_t</CODE>
+must have a leading significand bit <NOBR>of 1</NOBR>, unless the value is
+subnormal or zero, in which case the leading significand bit and the encoded
+exponent must both be zero.
+</P>
+
+<P>
+SoftFloat&rsquo;s functions are not guaranteed to operate as expected when
+inputs of type <CODE>extFloat80_t</CODE> are non-canonical.
+Assuming all of a function&rsquo;s <CODE>extFloat80_t</CODE> inputs (if any)
+are canonical, function outputs of type <CODE>extFloat80_t</CODE> will always
+be canonical.
+</P>
+
+<H3>4.5. Conventions for Passing Arguments and Results</H3>
+
+<P>
+Values that are at most <NOBR>64 bits</NOBR> in size (i.e., not the
+<NOBR>80-bit</NOBR> or <NOBR>128-bit</NOBR> floating-point formats) are in all
+cases passed as function arguments by value.
+Likewise, when an output of a function is no more than <NOBR>64 bits</NOBR>, it
+is always returned directly as the function result.
+Thus, for example, the SoftFloat function for adding two <NOBR>64-bit</NOBR>
+floating-point values has this simple signature:
+<BLOCKQUOTE>
+<CODE>float64_t f64_add( float64_t, float64_t );</CODE>
+</BLOCKQUOTE>
+</P>
+
+<P>
+The story is more complex when function inputs and outputs are
+<NOBR>80-bit</NOBR> and <NOBR>128-bit</NOBR> floating-point.
+For these types, SoftFloat always provides a function that passes these larger
+values into or out of the function indirectly, via pointers.
+For example, for adding two <NOBR>128-bit</NOBR> floating-point values,
+SoftFloat supplies this function:
+<BLOCKQUOTE>
+<CODE>void f128M_add( const float128_t *, const float128_t *, float128_t * );</CODE>
+</BLOCKQUOTE>
+The first two arguments point to the values to be added, and the last argument
+points to the location where the sum will be stored.
+The <CODE>M</CODE> in the name <CODE>f128M_add</CODE> is mnemonic for the fact
+that the <NOBR>128-bit</NOBR> inputs and outputs are &ldquo;in memory&rdquo;,
+pointed to by pointer arguments.
+</P>
+
+<P>
+All ports of SoftFloat implement these <I>pass-by-pointer</I> functions for
+types <CODE>extFloat80_t</CODE> and <CODE>float128_t</CODE>.
+At the same time, SoftFloat ports may also implement alternate versions of
+these same functions that pass <CODE>extFloat80_t</CODE> and
+<CODE>float128_t</CODE> by value, like the smaller formats.
+Thus, besides the function with name <CODE>f128M_add</CODE> shown above, a
+SoftFloat port may also supply an equivalent function with this signature:
+<BLOCKQUOTE>
+<CODE>float128_t f128_add( float128_t, float128_t );</CODE>
+</BLOCKQUOTE>
+</P>
+
+<P>
+As a general rule, on computers where the machine word size is
+<NOBR>32 bits</NOBR> or smaller, only the pass-by-pointer versions of functions
+(e.g., <CODE>f128M_add</CODE>) are provided for types <CODE>extFloat80_t</CODE>
+and <CODE>float128_t</CODE>, because passing such large types directly can have
+significant extra cost.
+On computers where the word size is <NOBR>64 bits</NOBR> or larger, both
+function versions (<CODE>f128M_add</CODE> and <CODE>f128_add</CODE>) are
+provided, because the cost of passing by value is then more reasonable.
+Applications that must be portable accross both classes of computers must use
+the pointer-based functions, as these are always implemented.
+However, if it is known that SoftFloat includes the by-value functions for all
+platforms of interest, programmers can use whichever version they prefer.
+</P>
+
+
+<H2>5. Reserved Names</H2>
+
+<P>
+In addition to the variables and functions documented here, SoftFloat defines
+some symbol names for its own private use.
+These private names always begin with the prefix
+&lsquo;<CODE>softfloat_</CODE>&rsquo;.
+When a program includes header <CODE>softfloat.h</CODE> or links with the
+SoftFloat library, all names with prefix &lsquo;<CODE>softfloat_</CODE>&rsquo;
+are reserved for possible use by SoftFloat.
+Applications that use SoftFloat should not define their own names with this
+prefix, and should reference only such names as are documented.
+</P>
+
+
+<H2>6. Mode Variables</H2>
+
+<P>
+The following global variables control rounding mode, underflow detection, and
+the <NOBR>80-bit</NOBR> extended format&rsquo;s rounding precision:
+<BLOCKQUOTE>
+<CODE>softfloat_roundingMode</CODE><BR>
+<CODE>softfloat_detectTininess</CODE><BR>
+<CODE>extF80_roundingPrecision</CODE>
+</BLOCKQUOTE>
+These mode variables are covered in the next several subsections.
+For some SoftFloat ports, these variables may be <I>per-thread</I> (declared
+<CODE>thread_local</CODE>), meaning that different execution threads have their
+own separate copies of the variables.
+</P>
+
+<H3>6.1. Rounding Mode</H3>
+
+<P>
+All five rounding modes defined by the 2008 IEEE Floating-Point Standard are
+implemented for all operations that require rounding.
+Some ports of SoftFloat may also implement the <I>round-to-odd</I> mode.
+</P>
+
+<P>
+The rounding mode is selected by the global variable
+<BLOCKQUOTE>
+<CODE>uint_fast8_t softfloat_roundingMode;</CODE>
+</BLOCKQUOTE>
+This variable may be set to one of the values
+<BLOCKQUOTE>
+<TABLE CELLSPACING=0 CELLPADDING=0>
+<TR>
+<TD><CODE>softfloat_round_near_even</CODE></TD>
+<TD>round to nearest, with ties to even</TD>
+</TR>
+<TR>
+<TD><CODE>softfloat_round_near_maxMag&nbsp;&nbsp;</CODE></TD>
+<TD>round to nearest, with ties to maximum magnitude (away from zero)</TD>
+</TR>
+<TR>
+<TD><CODE>softfloat_round_minMag</CODE></TD>
+<TD>round to minimum magnitude (toward zero)</TD>
+</TR>
+<TR>
+<TD><CODE>softfloat_round_min</CODE></TD>
+<TD>round to minimum (down)</TD>
+</TR>
+<TR>
+<TD><CODE>softfloat_round_max</CODE></TD>
+<TD>round to maximum (up)</TD>
+</TR>
+<TR>
+<TD><CODE>softfloat_round_odd</CODE></TD>
+<TD>round to odd (jamming), if supported by the SoftFloat port</TD>
+</TR>
+</TABLE>
+</BLOCKQUOTE>
+Variable <CODE>softfloat_roundingMode</CODE> is initialized to
+<CODE>softfloat_round_near_even</CODE>.
+</P>
+
+<P>
+When <CODE>softfloat_round_odd</CODE> is the rounding mode for a function that
+rounds to an integer value (either conversion to an integer format or a
+&lsquo;<CODE>roundToInt</CODE>&rsquo; function), if the input is not already an
+integer, the rounded result is the closest <EM>odd</EM> integer.
+For other operations, this rounding mode acts as though the floating-point
+result is first rounded to minimum magnitude, the same as
+<CODE>softfloat_round_minMag</CODE>, and then, if the result is inexact, the
+least-significant bit of the result is set <NOBR>to 1</NOBR>.
+Rounding to odd is also known as <EM>jamming</EM>.
+</P>
+
+<H3>6.2. Underflow Detection</H3>
+
+<P>
+In the terminology of the IEEE Standard, SoftFloat can detect tininess for
+underflow either before or after rounding.
+The choice is made by the global variable
+<BLOCKQUOTE>
+<CODE>uint_fast8_t softfloat_detectTininess;</CODE>
+</BLOCKQUOTE>
+which can be set to either
+<BLOCKQUOTE>
+<CODE>softfloat_tininess_beforeRounding</CODE><BR>
+<CODE>softfloat_tininess_afterRounding</CODE>
+</BLOCKQUOTE>
+Detecting tininess after rounding is usually better because it results in fewer
+spurious underflow signals.
+The other option is provided for compatibility with some systems.
+Like most systems (and as required by the newer 2008 IEEE Standard), SoftFloat
+always detects loss of accuracy for underflow as an inexact result.
+</P>
+
+<H3>6.3. Rounding Precision for the <NOBR>80-Bit</NOBR> Extended Format</H3>
+
+<P>
+For <CODE>extFloat80_t</CODE> only, the rounding precision of the basic
+arithmetic operations is controlled by the global variable
+<BLOCKQUOTE>
+<CODE>uint_fast8_t extF80_roundingPrecision;</CODE>
+</BLOCKQUOTE>
+The operations affected are:
+<BLOCKQUOTE>
+<CODE>extF80_add</CODE><BR>
+<CODE>extF80_sub</CODE><BR>
+<CODE>extF80_mul</CODE><BR>
+<CODE>extF80_div</CODE><BR>
+<CODE>extF80_sqrt</CODE>
+</BLOCKQUOTE>
+When <CODE>extF80_roundingPrecision</CODE> is set to its default value of 80,
+these operations are rounded to the full precision of the <NOBR>80-bit</NOBR>
+double-extended-precision format, like occurs for other formats.
+Setting <CODE>extF80_roundingPrecision</CODE> to 32 or to 64 causes the
+operations listed to be rounded to <NOBR>32-bit</NOBR> precision (equivalent to
+<CODE>float32_t</CODE>) or to <NOBR>64-bit</NOBR> precision (equivalent to
+<CODE>float64_t</CODE>), respectively.
+When rounding to reduced precision, additional bits in the result significand
+beyond the rounding point are set to zero.
+The consequences of setting <CODE>extF80_roundingPrecision</CODE> to a value
+other than 32, 64, or 80 is not specified.
+Operations other than the ones listed above are not affected by
+<CODE>extF80_roundingPrecision</CODE>.
+</P>
+
+
+<H2>7. Exceptions and Exception Flags</H2>
+
+<P>
+All five exception flags required by the IEEE Floating-Point Standard are
+implemented.
+Each flag is stored as a separate bit in the global variable
+<BLOCKQUOTE>
+<CODE>uint_fast8_t softfloat_exceptionFlags;</CODE>
+</BLOCKQUOTE>
+The positions of the exception flag bits within this variable are determined by
+the bit masks
+<BLOCKQUOTE>
+<CODE>softfloat_flag_inexact</CODE><BR>
+<CODE>softfloat_flag_underflow</CODE><BR>
+<CODE>softfloat_flag_overflow</CODE><BR>
+<CODE>softfloat_flag_infinite</CODE><BR>
+<CODE>softfloat_flag_invalid</CODE>
+</BLOCKQUOTE>
+Variable <CODE>softfloat_exceptionFlags</CODE> is initialized to all zeros,
+meaning no exceptions.
+</P>
+
+<P>
+For some SoftFloat ports, <CODE>softfloat_exceptionFlags</CODE> may be
+<I>per-thread</I> (declared <CODE>thread_local</CODE>), meaning that different
+execution threads have their own separate instances of it.
+</P>
+
+<P>
+An individual exception flag can be cleared with the statement
+<BLOCKQUOTE>
+<CODE>softfloat_exceptionFlags &= ~softfloat_flag_&lt;<I>exception</I>&gt;;</CODE>
+</BLOCKQUOTE>
+where <CODE>&lt;<I>exception</I>&gt;</CODE> is the appropriate name.
+To raise a floating-point exception, function <CODE>softfloat_raiseFlags</CODE>
+should normally be used.
+</P>
+
+<P>
+When SoftFloat detects an exception other than <I>inexact</I>, it calls
+<CODE>softfloat_raiseFlags</CODE>.
+The default version of this function simply raises the corresponding exception
+flags.
+Particular ports of SoftFloat may support alternate behavior, such as exception
+traps, by modifying the default <CODE>softfloat_raiseFlags</CODE>.
+A program may also supply its own <CODE>softfloat_raiseFlags</CODE> function to
+override the one from the SoftFloat library.
+</P>
+
+<P>
+Because inexact results occur frequently under most circumstances (and thus are
+hardly exceptional), SoftFloat does not ordinarily call
+<CODE>softfloat_raiseFlags</CODE> for <I>inexact</I> exceptions.
+It does always raise the <I>inexact</I> exception flag as required.
+</P>
+
+
+<H2>8. Function Details</H2>
+
+<P>
+In this section, <CODE>&lt;<I>float</I>&gt;</CODE> appears in function names as
+a substitute for one of these abbreviations:
+<BLOCKQUOTE>
+<TABLE CELLSPACING=0 CELLPADDING=0>
+<TR>
+<TD><CODE>f16</CODE></TD>
+<TD>indicates <CODE>float16_t</CODE>, passed by value</TD>
+</TR>
+<TR>
+<TD><CODE>f32</CODE></TD>
+<TD>indicates <CODE>float32_t</CODE>, passed by value</TD>
+</TR>
+<TR>
+<TD><CODE>f64</CODE></TD>
+<TD>indicates <CODE>float64_t</CODE>, passed by value</TD>
+</TR>
+<TR>
+<TD><CODE>extF80M&nbsp;&nbsp;&nbsp;</CODE></TD>
+<TD>indicates <CODE>extFloat80_t</CODE>, passed indirectly via pointers</TD>
+</TR>
+<TR>
+<TD><CODE>extF80</CODE></TD>
+<TD>indicates <CODE>extFloat80_t</CODE>, passed by value</TD>
+</TR>
+<TR>
+<TD><CODE>f128M</CODE></TD>
+<TD>indicates <CODE>float128_t</CODE>, passed indirectly via pointers</TD>
+</TR>
+<TR>
+<TD><CODE>f128</CODE></TD>
+<TD>indicates <CODE>float128_t</CODE>, passed by value</TD>
+</TR>
+</TABLE>
+</BLOCKQUOTE>
+The circumstances under which values of floating-point types
+<CODE>extFloat80_t</CODE> and <CODE>float128_t</CODE> may be passed either by
+value or indirectly via pointers was discussed earlier in
+<NOBR>section 4.5</NOBR>, <I>Conventions for Passing Arguments and Results</I>.
+</P>
+
+<H3>8.1. Conversions from Integer to Floating-Point</H3>
+
+<P>
+All conversions from a <NOBR>32-bit</NOBR> or <NOBR>64-bit</NOBR> integer,
+signed or unsigned, to a floating-point format are supported.
+Functions performing these conversions have these names:
+<BLOCKQUOTE>
+<CODE>ui32_to_&lt;<I>float</I>&gt;</CODE><BR>
+<CODE>ui64_to_&lt;<I>float</I>&gt;</CODE><BR>
+<CODE>i32_to_&lt;<I>float</I>&gt;</CODE><BR>
+<CODE>i64_to_&lt;<I>float</I>&gt;</CODE>
+</BLOCKQUOTE>
+Conversions from <NOBR>32-bit</NOBR> integers to <NOBR>64-bit</NOBR>
+double-precision and larger formats are always exact, and likewise conversions
+from <NOBR>64-bit</NOBR> integers to <NOBR>80-bit</NOBR>
+double-extended-precision and <NOBR>128-bit</NOBR> quadruple-precision are also
+always exact.
+</P>
+
+<P>
+Each conversion function takes one input of the appropriate type and generates
+one output.
+The following illustrates the signatures of these functions in cases when the
+floating-point result is passed either by value or via pointers:
+<BLOCKQUOTE>
+<PRE>
+float64_t i32_to_f64( int32_t <I>a</I> );
+</PRE>
+<PRE>
+void i32_to_f128M( int32_t <I>a</I>, float128_t *<I>destPtr</I> );
+</PRE>
+</BLOCKQUOTE>
+</P>
+
+<H3>8.2. Conversions from Floating-Point to Integer</H3>
+
+<P>
+Conversions from a floating-point format to a <NOBR>32-bit</NOBR> or
+<NOBR>64-bit</NOBR> integer, signed or unsigned, are supported with these
+functions:
+<BLOCKQUOTE>
+<CODE>&lt;<I>float</I>&gt;_to_ui32</CODE><BR>
+<CODE>&lt;<I>float</I>&gt;_to_ui64</CODE><BR>
+<CODE>&lt;<I>float</I>&gt;_to_i32</CODE><BR>
+<CODE>&lt;<I>float</I>&gt;_to_i64</CODE>
+</BLOCKQUOTE>
+The functions have signatures as follows, depending on whether the
+floating-point input is passed by value or via pointers:
+<BLOCKQUOTE>
+<PRE>
+int_fast32_t f64_to_i32( float64_t <I>a</I>, uint_fast8_t <I>roundingMode</I>, bool <I>exact</I> );
+</PRE>
+<PRE>
+int_fast32_t
+ f128M_to_i32( const float128_t *<I>aPtr</I>, uint_fast8_t <I>roundingMode</I>, bool <I>exact</I> );
+</PRE>
+</BLOCKQUOTE>
+</P>
+
+<P>
+The <CODE><I>roundingMode</I></CODE> argument specifies the rounding mode for
+the conversion.
+The variable that usually indicates rounding mode,
+<CODE>softfloat_roundingMode</CODE>, is ignored.
+Argument <CODE><I>exact</I></CODE> determines whether the <I>inexact</I>
+exception flag is raised if the conversion is not exact.
+If <CODE><I>exact</I></CODE> is <CODE>true</CODE>, the <I>inexact</I> flag may
+be raised;
+otherwise, it will not be, even if the conversion is inexact.
+</P>
+
+<P>
+A conversion from floating-point to integer format raises the <I>invalid</I>
+exception if the source value cannot be rounded to a representable integer of
+the desired size (32 or 64 bits).
+In such circumstances, the integer result returned is determined by the
+particular port of SoftFloat, although typically this value will be either the
+maximum or minimum value of the integer format.
+The functions that convert to integer types never raise the floating-point
+<I>overflow</I> exception.
+</P>
+
+<P>
+Because languages such <NOBR>as C</NOBR> require that conversions to integers
+be rounded toward zero, the following functions are provided for improved speed
+and convenience:
+<BLOCKQUOTE>
+<CODE>&lt;<I>float</I>&gt;_to_ui32_r_minMag</CODE><BR>
+<CODE>&lt;<I>float</I>&gt;_to_ui64_r_minMag</CODE><BR>
+<CODE>&lt;<I>float</I>&gt;_to_i32_r_minMag</CODE><BR>
+<CODE>&lt;<I>float</I>&gt;_to_i64_r_minMag</CODE>
+</BLOCKQUOTE>
+These functions round only toward zero (to minimum magnitude).
+The signatures for these functions are the same as above without the redundant
+<CODE><I>roundingMode</I></CODE> argument:
+<BLOCKQUOTE>
+<PRE>
+int_fast32_t f64_to_i32_r_minMag( float64_t <I>a</I>, bool <I>exact</I> );
+</PRE>
+<PRE>
+int_fast32_t f128M_to_i32_r_minMag( const float128_t *<I>aPtr</I>, bool <I>exact</I> );
+</PRE>
+</BLOCKQUOTE>
+</P>
+
+<H3>8.3. Conversions Among Floating-Point Types</H3>
+
+<P>
+Conversions between floating-point formats are done by functions with these
+names:
+<BLOCKQUOTE>
+<CODE>&lt;<I>float</I>&gt;_to_&lt;<I>float</I>&gt;</CODE>
+</BLOCKQUOTE>
+All combinations of source and result type are supported where the source and
+result are different formats.
+There are four different styles of signature for these functions, depending on
+whether the input and the output floating-point values are passed by value or
+via pointers:
+<BLOCKQUOTE>
+<PRE>
+float32_t f64_to_f32( float64_t <I>a</I> );
+</PRE>
+<PRE>
+float32_t f128M_to_f32( const float128_t *<I>aPtr</I> );
+</PRE>
+<PRE>
+void f32_to_f128M( float32_t <I>a</I>, float128_t *<I>destPtr</I> );
+</PRE>
+<PRE>
+void extF80M_to_f128M( const extFloat80_t *<I>aPtr</I>, float128_t *<I>destPtr</I> );
+</PRE>
+</BLOCKQUOTE>
+</P>
+
+<P>
+Conversions from a smaller to a larger floating-point format are always exact
+and so require no rounding.
+</P>
+
+<H3>8.4. Basic Arithmetic Functions</H3>
+
+<P>
+The following basic arithmetic functions are provided:
+<BLOCKQUOTE>
+<CODE>&lt;<I>float</I>&gt;_add</CODE><BR>
+<CODE>&lt;<I>float</I>&gt;_sub</CODE><BR>
+<CODE>&lt;<I>float</I>&gt;_mul</CODE><BR>
+<CODE>&lt;<I>float</I>&gt;_div</CODE><BR>
+<CODE>&lt;<I>float</I>&gt;_sqrt</CODE>
+</BLOCKQUOTE>
+Each floating-point operation takes two operands, except for <CODE>sqrt</CODE>
+(square root) which takes only one.
+The operands and result are all of the same floating-point format.
+Signatures for these functions take the following forms:
+<BLOCKQUOTE>
+<PRE>
+float64_t f64_add( float64_t <I>a</I>, float64_t <I>b</I> );
+</PRE>
+<PRE>
+void
+ f128M_add(
+ const float128_t *<I>aPtr</I>, const float128_t *<I>bPtr</I>, float128_t *<I>destPtr</I> );
+</PRE>
+<PRE>
+float64_t f64_sqrt( float64_t <I>a</I> );
+</PRE>
+<PRE>
+void f128M_sqrt( const float128_t *<I>aPtr</I>, float128_t *<I>destPtr</I> );
+</PRE>
+</BLOCKQUOTE>
+When floating-point values are passed indirectly through pointers, arguments
+<CODE><I>aPtr</I></CODE> and <CODE><I>bPtr</I></CODE> point to the input
+operands, and the last argument, <CODE><I>destPtr</I></CODE>, points to the
+location where the result is stored.
+</P>
+
+<P>
+Rounding of the <NOBR>80-bit</NOBR> double-extended-precision
+(<CODE>extFloat80_t</CODE>) functions is affected by variable
+<CODE>extF80_roundingPrecision</CODE>, as explained earlier in
+<NOBR>section 6.3</NOBR>,
+<I>Rounding Precision for the <NOBR>80-Bit</NOBR> Extended Format</I>.
+</P>
+
+<H3>8.5. Fused Multiply-Add Functions</H3>
+
+<P>
+The 2008 version of the IEEE Floating-Point Standard defines a <I>fused
+multiply-add</I> operation that does a combined multiplication and addition
+with only a single rounding.
+SoftFloat implements fused multiply-add with functions
+<BLOCKQUOTE>
+<CODE>&lt;<I>float</I>&gt;_mulAdd</CODE>
+</BLOCKQUOTE>
+Unlike other operations, fused multiple-add is not supported for the
+<NOBR>80-bit</NOBR> double-extended-precision format,
+<CODE>extFloat80_t</CODE>.
+</P>
+
+<P>
+Depending on whether floating-point values are passed by value or via pointers,
+the fused multiply-add functions have signatures of these forms:
+<BLOCKQUOTE>
+<PRE>
+float64_t f64_mulAdd( float64_t <I>a</I>, float64_t <I>b</I>, float64_t <I>c</I> );
+</PRE>
+<PRE>
+void
+ f128M_mulAdd(
+ const float128_t *<I>aPtr</I>,
+ const float128_t *<I>bPtr</I>,
+ const float128_t *<I>cPtr</I>,
+ float128_t *<I>destPtr</I>
+ );
+</PRE>
+</BLOCKQUOTE>
+The functions compute
+<NOBR>(<CODE><I>a</I></CODE> &times; <CODE><I>b</I></CODE>)
+ + <CODE><I>c</I></CODE></NOBR>
+with a single rounding.
+When floating-point values are passed indirectly through pointers, arguments
+<CODE><I>aPtr</I></CODE>, <CODE><I>bPtr</I></CODE>, and
+<CODE><I>cPtr</I></CODE> point to operands <CODE><I>a</I></CODE>,
+<CODE><I>b</I></CODE>, and <CODE><I>c</I></CODE> respectively, and
+<CODE><I>destPtr</I></CODE> points to the location where the result is stored.
+</P>
+
+<P>
+If one of the multiplication operands <CODE><I>a</I></CODE> and
+<CODE><I>b</I></CODE> is infinite and the other is zero, these functions raise
+the invalid exception even if operand <CODE><I>c</I></CODE> is a quiet NaN.
+</P>
+
+<H3>8.6. Remainder Functions</H3>
+
+<P>
+For each format, SoftFloat implements the remainder operation defined by the
+IEEE Floating-Point Standard.
+The remainder functions have names
+<BLOCKQUOTE>
+<CODE>&lt;<I>float</I>&gt;_rem</CODE>
+</BLOCKQUOTE>
+Each remainder operation takes two floating-point operands of the same format
+and returns a result in the same format.
+Depending on whether floating-point values are passed by value or via pointers,
+the remainder functions have signatures of these forms:
+<BLOCKQUOTE>
+<PRE>
+float64_t f64_rem( float64_t <I>a</I>, float64_t <I>b</I> );
+</PRE>
+<PRE>
+void
+ f128M_rem(
+ const float128_t *<I>aPtr</I>, const float128_t *<I>bPtr</I>, float128_t *<I>destPtr</I> );
+</PRE>
+</BLOCKQUOTE>
+When floating-point values are passed indirectly through pointers, arguments
+<CODE><I>aPtr</I></CODE> and <CODE><I>bPtr</I></CODE> point to operands
+<CODE><I>a</I></CODE> and <CODE><I>b</I></CODE> respectively, and
+<CODE><I>destPtr</I></CODE> points to the location where the result is stored.
+</P>
+
+<P>
+The IEEE Standard remainder operation computes the value
+<NOBR><CODE><I>a</I></CODE>
+ &minus; <I>n</I> &times; <CODE><I>b</I></CODE></NOBR>,
+where <I>n</I> is the integer closest to
+<NOBR><CODE><I>a</I></CODE> &divide; <CODE><I>b</I></CODE></NOBR>.
+If <NOBR><CODE><I>a</I></CODE> &divide; <CODE><I>b</I></CODE></NOBR> is exactly
+halfway between two integers, <I>n</I> is the <EM>even</EM> integer closest to
+<NOBR><CODE><I>a</I></CODE> &divide; <CODE><I>b</I></CODE></NOBR>.
+The IEEE Standard&rsquo;s remainder operation is always exact and so requires
+no rounding.
+</P>
+
+<P>
+Depending on the relative magnitudes of the operands, the remainder
+functions can take considerably longer to execute than the other SoftFloat
+functions.
+This is an inherent characteristic of the remainder operation itself and is not
+a flaw in the SoftFloat implementation.
+</P>
+
+<H3>8.7. Round-to-Integer Functions</H3>
+
+<P>
+For each format, SoftFloat implements the round-to-integer operation specified
+by the IEEE Floating-Point Standard.
+These functions are named
+<BLOCKQUOTE>
+<CODE>&lt;<I>float</I>&gt;_roundToInt</CODE>
+</BLOCKQUOTE>
+Each round-to-integer operation takes a single floating-point operand.
+This operand is rounded to an integer according to a specified rounding mode,
+and the resulting integer value is returned in the same floating-point format.
+(Note that the result is not an integer type.)
+</P>
+
+<P>
+The signatures of the round-to-integer functions are similar to those for
+conversions to an integer type:
+<BLOCKQUOTE>
+<PRE>
+float64_t f64_roundToInt( float64_t <I>a</I>, uint_fast8_t <I>roundingMode</I>, bool <I>exact</I> );
+</PRE>
+<PRE>
+void
+ f128M_roundToInt(
+ const float128_t *<I>aPtr</I>,
+ uint_fast8_t <I>roundingMode</I>,
+ bool <I>exact</I>,
+ float128_t *<I>destPtr</I>
+ );
+</PRE>
+</BLOCKQUOTE>
+When floating-point values are passed indirectly through pointers,
+<CODE><I>aPtr</I></CODE> points to the input operand and
+<CODE><I>destPtr</I></CODE> points to the location where the result is stored.
+</P>
+
+<P>
+The <CODE><I>roundingMode</I></CODE> argument specifies the rounding mode to
+apply.
+The variable that usually indicates rounding mode,
+<CODE>softfloat_roundingMode</CODE>, is ignored.
+Argument <CODE><I>exact</I></CODE> determines whether the <I>inexact</I>
+exception flag is raised if the conversion is not exact.
+If <CODE><I>exact</I></CODE> is <CODE>true</CODE>, the <I>inexact</I> flag may
+be raised;
+otherwise, it will not be, even if the conversion is inexact.
+</P>
+
+<H3>8.8. Comparison Functions</H3>
+
+<P>
+For each format, the following floating-point comparison functions are
+provided:
+<BLOCKQUOTE>
+<CODE>&lt;<I>float</I>&gt;_eq</CODE><BR>
+<CODE>&lt;<I>float</I>&gt;_le</CODE><BR>
+<CODE>&lt;<I>float</I>&gt;_lt</CODE>
+</BLOCKQUOTE>
+Each comparison takes two operands of the same type and returns a Boolean.
+The abbreviation <CODE>eq</CODE> stands for &ldquo;equal&rdquo; (=);
+<CODE>le</CODE> stands for &ldquo;less than or equal&rdquo; (&le;);
+and <CODE>lt</CODE> stands for &ldquo;less than&rdquo; (&lt;).
+Depending on whether the floating-point operands are passed by value or via
+pointers, the comparison functions have signatures of these forms:
+<BLOCKQUOTE>
+<PRE>
+bool f64_eq( float64_t <I>a</I>, float64_t <I>b</I> );
+</PRE>
+<PRE>
+bool f128M_eq( const float128_t *<I>aPtr</I>, const float128_t *<I>bPtr</I> );
+</PRE>
+</BLOCKQUOTE>
+</P>
+
+<P>
+The usual greater-than (&gt;), greater-than-or-equal (&ge;), and not-equal
+(&ne;) comparisons are easily obtained from the functions provided.
+The not-equal function is just the logical complement of the equal function.
+The greater-than-or-equal function is identical to the less-than-or-equal
+function with the arguments in reverse order, and likewise the greater-than
+function is identical to the less-than function with the arguments reversed.
+</P>
+
+<P>
+The IEEE Floating-Point Standard specifies that the less-than-or-equal and
+less-than comparisons by default raise the <I>invalid</I> exception if either
+operand is any kind of NaN.
+Equality comparisons, on the other hand, are defined by default to raise the
+<I>invalid</I> exception only for signaling NaNs, not quiet NaNs.
+For completeness, SoftFloat provides these complementary functions:
+<BLOCKQUOTE>
+<CODE>&lt;<I>float</I>&gt;_eq_signaling</CODE><BR>
+<CODE>&lt;<I>float</I>&gt;_le_quiet</CODE><BR>
+<CODE>&lt;<I>float</I>&gt;_lt_quiet</CODE>
+</BLOCKQUOTE>
+The <CODE>signaling</CODE> equality comparisons are identical to the default
+equality comparisons except that the <I>invalid</I> exception is raised for any
+NaN input, not just for signaling NaNs.
+Similarly, the <CODE>quiet</CODE> comparison functions are identical to their
+default counterparts except that the <I>invalid</I> exception is not raised for
+quiet NaNs.
+</P>
+
+<H3>8.9. Signaling NaN Test Functions</H3>
+
+<P>
+Functions for testing whether a floating-point value is a signaling NaN are
+provided with these names:
+<BLOCKQUOTE>
+<CODE>&lt;<I>float</I>&gt;_isSignalingNaN</CODE>
+</BLOCKQUOTE>
+The functions take one floating-point operand and return a Boolean indicating
+whether the operand is a signaling NaN.
+Accordingly, the functions have the forms
+<BLOCKQUOTE>
+<PRE>
+bool f64_isSignalingNaN( float64_t <I>a</I> );
+</PRE>
+<PRE>
+bool f128M_isSignalingNaN( const float128_t *<I>aPtr</I> );
+</PRE>
+</BLOCKQUOTE>
+</P>
+
+<H3>8.10. Raise-Exception Function</H3>
+
+<P>
+SoftFloat provides a single function for raising floating-point exceptions:
+<BLOCKQUOTE>
+<PRE>
+void softfloat_raiseFlags( uint_fast8_t <I>exceptions</I> );
+</PRE>
+</BLOCKQUOTE>
+The <CODE><I>exceptions</I></CODE> argument is a mask indicating the set of
+exceptions to raise.
+(See earlier section 7, <I>Exceptions and Exception Flags</I>.)
+In addition to setting the specified exception flags in variable
+<CODE>softfloat_exceptionFlags</CODE>, the <CODE>softfloat_raiseFlags</CODE>
+function may cause a trap or abort appropriate for the current system.
+</P>
+
+
+<H2>9. Changes from SoftFloat <NOBR>Release 2</NOBR></H2>
+
+<P>
+Apart from a change in the legal use license, <NOBR>Release 3</NOBR> of
+SoftFloat introduced numerous technical differences compared to earlier
+releases.
+</P>
+
+<H3>9.1. Name Changes</H3>
+
+<P>
+The most obvious and pervasive difference compared to <NOBR>Release 2</NOBR>
+is that the names of most functions and variables have changed, even when the
+behavior has not.
+First, the floating-point types, the mode variables, the exception flags
+variable, the function to raise exceptions, and various associated constants
+have been renamed as follows:
+<BLOCKQUOTE>
+<TABLE>
+<TR>
+<TD>old name, Release 2:</TD>
+<TD>new name, Release 3:</TD>
+</TR>
+<TR>
+<TD><CODE>float32</CODE></TD>
+<TD><CODE>float32_t</CODE></TD>
+</TR>
+<TR>
+<TD><CODE>float64</CODE></TD>
+<TD><CODE>float64_t</CODE></TD>
+</TR>
+<TR>
+<TD><CODE>floatx80</CODE></TD>
+<TD><CODE>extFloat80_t</CODE></TD>
+</TR>
+<TR>
+<TD><CODE>float128</CODE></TD>
+<TD><CODE>float128_t</CODE></TD>
+</TR>
+<TR>
+<TD><CODE>float_rounding_mode</CODE></TD>
+<TD><CODE>softfloat_roundingMode</CODE></TD>
+</TR>
+<TR>
+<TD><CODE>float_round_nearest_even</CODE></TD>
+<TD><CODE>softfloat_round_near_even</CODE></TD>
+</TR>
+<TR>
+<TD><CODE>float_round_to_zero</CODE></TD>
+<TD><CODE>softfloat_round_minMag</CODE></TD>
+</TR>
+<TR>
+<TD><CODE>float_round_down</CODE></TD>
+<TD><CODE>softfloat_round_min</CODE></TD>
+</TR>
+<TR>
+<TD><CODE>float_round_up</CODE></TD>
+<TD><CODE>softfloat_round_max</CODE></TD>
+</TR>
+<TR>
+<TD><CODE>float_detect_tininess</CODE></TD>
+<TD><CODE>softfloat_detectTininess</CODE></TD>
+</TR>
+<TR>
+<TD><CODE>float_tininess_before_rounding&nbsp;&nbsp;&nbsp;&nbsp;</CODE></TD>
+<TD><CODE>softfloat_tininess_beforeRounding</CODE></TD>
+</TR>
+<TR>
+<TD><CODE>float_tininess_after_rounding</CODE></TD>
+<TD><CODE>softfloat_tininess_afterRounding</CODE></TD>
+</TR>
+<TR>
+<TD><CODE>floatx80_rounding_precision</CODE></TD>
+<TD><CODE>extF80_roundingPrecision</CODE></TD>
+</TR>
+<TR>
+<TD><CODE>float_exception_flags</CODE></TD>
+<TD><CODE>softfloat_exceptionFlags</CODE></TD>
+</TR>
+<TR>
+<TD><CODE>float_flag_inexact</CODE></TD>
+<TD><CODE>softfloat_flag_inexact</CODE></TD>
+</TR>
+<TR>
+<TD><CODE>float_flag_underflow</CODE></TD>
+<TD><CODE>softfloat_flag_underflow</CODE></TD>
+</TR>
+<TR>
+<TD><CODE>float_flag_overflow</CODE></TD>
+<TD><CODE>softfloat_flag_overflow</CODE></TD>
+</TR>
+<TR>
+<TD><CODE>float_flag_divbyzero</CODE></TD>
+<TD><CODE>softfloat_flag_infinite</CODE></TD>
+</TR>
+<TR>
+<TD><CODE>float_flag_invalid</CODE></TD>
+<TD><CODE>softfloat_flag_invalid</CODE></TD>
+</TR>
+<TR>
+<TD><CODE>float_raise</CODE></TD>
+<TD><CODE>softfloat_raiseFlags</CODE></TD>
+</TR>
+</TABLE>
+</BLOCKQUOTE>
+</P>
+
+<P>
+Furthermore, <NOBR>Release 3</NOBR> adopted the following new abbreviations for
+function names:
+<BLOCKQUOTE>
+<TABLE>
+<TR>
+<TD>used in names in Release 2:<CODE>&nbsp;&nbsp;&nbsp;&nbsp;</CODE></TD>
+<TD>used in names in Release 3:</TD>
+</TR>
+<TR> <TD><CODE>int32</CODE></TD> <TD><CODE>i32</CODE></TD> </TR>
+<TR> <TD><CODE>int64</CODE></TD> <TD><CODE>i64</CODE></TD> </TR>
+<TR> <TD><CODE>float32</CODE></TD> <TD><CODE>f32</CODE></TD> </TR>
+<TR> <TD><CODE>float64</CODE></TD> <TD><CODE>f64</CODE></TD> </TR>
+<TR> <TD><CODE>floatx80</CODE></TD> <TD><CODE>extF80</CODE></TD> </TR>
+<TR> <TD><CODE>float128</CODE></TD> <TD><CODE>f128</CODE></TD> </TR>
+</TABLE>
+</BLOCKQUOTE>
+Thus, for example, the function to add two <NOBR>32-bit</NOBR> floating-point
+numbers, previously called <CODE>float32_add</CODE> in <NOBR>Release 2</NOBR>,
+is now <CODE>f32_add</CODE>.
+Lastly, there have been a few other changes to function names:
+<BLOCKQUOTE>
+<TABLE>
+<TR>
+<TD>used in names in Release 2:<CODE>&nbsp;&nbsp;&nbsp;</CODE></TD>
+<TD>used in names in Release 3:<CODE>&nbsp;&nbsp;&nbsp;</CODE></TD>
+<TD>relevant functions:</TD>
+</TR>
+<TR>
+<TD><CODE>_round_to_zero</CODE></TD>
+<TD><CODE>_r_minMag</CODE></TD>
+<TD>conversions from floating-point to integer (<NOBR>section 8.2</NOBR>)</TD>
+</TR>
+<TR>
+<TD><CODE>round_to_int</CODE></TD>
+<TD><CODE>roundToInt</CODE></TD>
+<TD>round-to-integer functions (<NOBR>section 8.7</NOBR>)</TD>
+</TR>
+<TR>
+<TD><CODE>is_signaling_nan&nbsp;&nbsp;&nbsp;&nbsp;</CODE></TD>
+<TD><CODE>isSignalingNaN</CODE></TD>
+<TD>signaling NaN test functions (<NOBR>section 8.9</NOBR>)</TD>
+</TR>
+</TABLE>
+</BLOCKQUOTE>
+</P>
+
+<H3>9.2. Changes to Function Arguments</H3>
+
+<P>
+Besides simple name changes, some operations were given a different interface
+in <NOBR>Release 3</NOBR> than they had in <NOBR>Release 2</NOBR>:
+<UL>
+
+<LI>
+<P>
+Since <NOBR>Release 3</NOBR>, integer arguments and results of functions have
+standard types from header <CODE>&lt;stdint.h&gt;</CODE>, such as
+<CODE>uint32_t</CODE>, whereas previously their types could be defined
+differently for each port of SoftFloat, usually using traditional C types such
+as <CODE>unsigned</CODE> <CODE>int</CODE>.
+Likewise, functions in <NOBR>Release 3</NOBR> and later pass Booleans as
+standard type <CODE>bool</CODE> from <CODE>&lt;stdbool.h&gt;</CODE>, whereas
+previously these were again passed as a port-specific type (usually
+<CODE>int</CODE>).
+</P>
+
+<LI>
+<P>
+As explained earlier in <NOBR>section 4.5</NOBR>, <I>Conventions for Passing
+Arguments and Results</I>, SoftFloat functions in <NOBR>Release 3</NOBR> and
+later may pass <NOBR>80-bit</NOBR> and <NOBR>128-bit</NOBR> floating-point
+values through pointers, meaning that functions take pointer arguments and then
+read or write floating-point values at the locations indicated by the pointers.
+In <NOBR>Release 2</NOBR>, floating-point arguments and results were always
+passed by value, regardless of their size.
+</P>
+
+<LI>
+<P>
+Functions that round to an integer have additional
+<CODE><I>roundingMode</I></CODE> and <CODE><I>exact</I></CODE> arguments that
+they did not have in <NOBR>Release 2</NOBR>.
+Refer to sections 8.2 <NOBR>and 8.7</NOBR> for descriptions of these functions
+since <NOBR>Release 3</NOBR>.
+For <NOBR>Release 2</NOBR>, the rounding mode, when needed, was taken from the
+same global variable that affects the basic arithmetic operations (now called
+<CODE>softfloat_roundingMode</CODE> but previously known as
+<CODE>float_rounding_mode</CODE>).
+Also, for <NOBR>Release 2</NOBR>, if the original floating-point input was not
+an exact integer value, and if the <I>invalid</I> exception was not raised by
+the function, the <I>inexact</I> exception was always raised.
+<NOBR>Release 2</NOBR> had no option to suppress raising <I>inexact</I> in this
+case.
+Applications using SoftFloat <NOBR>Release 3</NOBR> or later can get the same
+effect as <NOBR>Release 2</NOBR> by passing variable
+<CODE>softfloat_roundingMode</CODE> for argument
+<CODE><I>roundingMode</I></CODE> and <CODE>true</CODE> for argument
+<CODE><I>exact</I></CODE>.
+</P>
+
+</UL>
+</P>
+
+<H3>9.3. Added Capabilities</H3>
+
+<P>
+With <NOBR>Release 3</NOBR>, some new features have been added that were not
+present in <NOBR>Release 2</NOBR>:
+<UL>
+
+<LI>
+<P>
+A port of SoftFloat can now define any of the floating-point types
+<CODE>float32_t</CODE>, <CODE>float64_t</CODE>, <CODE>extFloat80_t</CODE>, and
+<CODE>float128_t</CODE> as aliases for C&rsquo;s standard floating-point types
+<CODE>float</CODE>, <CODE>double</CODE>, and <CODE>long</CODE>
+<CODE>double</CODE>, using either <CODE>#define</CODE> or <CODE>typedef</CODE>.
+This potential convenience was not supported under <NOBR>Release 2</NOBR>.
+</P>
+
+<P>
+(Note, however, that there may be a performance cost to defining
+SoftFloat&rsquo;s floating-point types this way, depending on the platform and
+the applications using SoftFloat.
+Ports of SoftFloat may choose to forgo the convenience in favor of better
+speed.)
+</P>
+
+<P>
+<LI>
+As of <NOBR>Release 3b</NOBR>, <NOBR>16-bit</NOBR> half-precision,
+<CODE>float16_t</CODE>, is supported.
+</P>
+
+<P>
+<LI>
+Functions have been added for converting between the floating-point types and
+unsigned integers.
+<NOBR>Release 2</NOBR> supported only signed integers, not unsigned.
+</P>
+
+<P>
+<LI>
+Fused multiply-add functions have been added for all floating-point formats
+except <NOBR>80-bit</NOBR> double-extended-precision,
+<CODE>extFloat80_t</CODE>.
+</P>
+
+<P>
+<LI>
+New rounding modes are supported:
+<CODE>softfloat_round_near_maxMag</CODE> (round to nearest, with ties to
+maximum magnitude, away from zero), and, as of <NOBR>Release 3c</NOBR>,
+optional <CODE>softfloat_round_odd</CODE> (round to odd, also known as
+jamming).
+</P>
+
+</UL>
+</P>
+
+<H3>9.4. Better Compatibility with the C Language</H3>
+
+<P>
+<NOBR>Release 3</NOBR> of SoftFloat was written to conform better to the ISO C
+Standard&rsquo;s rules for portability.
+For example, older releases of SoftFloat employed type conversions in ways
+that, while commonly practiced, are not fully defined by the C Standard.
+Such problematic type conversions have generally been replaced by the use of
+unions, the behavior around which is more strictly regulated these days.
+</P>
+
+<H3>9.5. New Organization as a Library</H3>
+
+<P>
+Starting with <NOBR>Release 3</NOBR>, SoftFloat now builds as a library.
+Previously, SoftFloat compiled into a single, monolithic object file containing
+all the SoftFloat functions, with the consequence that a program linking with
+SoftFloat would get every SoftFloat function in its binary file even if only a
+few functions were actually used.
+With SoftFloat in the form of a library, a program that is linked by a standard
+linker will include only those functions of SoftFloat that it needs and no
+others.
+</P>
+
+<H3>9.6. Optimization Gains (and Losses)</H3>
+
+<P>
+Individual SoftFloat functions have been variously improved in
+<NOBR>Release 3</NOBR> compared to earlier releases.
+In particular, better, faster algorithms have been deployed for the operations
+of division, square root, and remainder.
+For functions operating on the larger <NOBR>80-bit</NOBR> and
+<NOBR>128-bit</NOBR> formats, <CODE>extFloat80_t</CODE> and
+<CODE>float128_t</CODE>, code size has also generally been reduced.
+</P>
+
+<P>
+However, because <NOBR>Release 2</NOBR> compiled all of SoftFloat together as a
+single object file, compilers could make optimizations across function calls
+when one SoftFloat function calls another.
+Now that the functions of SoftFloat are compiled separately and only afterward
+linked together into a program, there is not usually the same opportunity to
+optimize across function calls.
+Some loss of speed has been observed due to this change.
+</P>
+
+
+<H2>10. Future Directions</H2>
+
+<P>
+The following improvements are anticipated for future releases of SoftFloat:
+<UL>
+<LI>
+more functions from the 2008 version of the IEEE Floating-Point Standard;
+<LI>
+consistent, defined behavior for non-canonical representations of extended
+format <CODE>extFloat80_t</CODE> (discussed in <NOBR>section 4.4</NOBR>,
+<I>Non-canonical Representations in <CODE>extFloat80_t</CODE></I>).
+
+</UL>
+</P>
+
+
+<H2>11. Contact Information</H2>
+
+<P>
+At the time of this writing, the most up-to-date information about SoftFloat
+and the latest release can be found at the Web page
+<A HREF="http://www.jhauser.us/arithmetic/SoftFloat.html"><NOBR><CODE>http://www.jhauser.us/arithmetic/SoftFloat.html</CODE></NOBR></A>.
+</P>
+
+
+</BODY>
+
diff --git a/src/libs/softfloat-3e/source/8086-SSE/extF80M_isSignalingNaN.c b/src/libs/softfloat-3e/source/8086-SSE/extF80M_isSignalingNaN.c
new file mode 100644
index 00000000..c2cca65c
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086-SSE/extF80M_isSignalingNaN.c
@@ -0,0 +1,57 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+bool extF80M_isSignalingNaN( const extFloat80_t *aPtr )
+{
+ const struct extFloat80M *aSPtr;
+ uint64_t uiA0;
+
+ aSPtr = (const struct extFloat80M *) aPtr;
+ if ( (aSPtr->signExp & 0x7FFF) != 0x7FFF ) return false;
+ uiA0 = aSPtr->signif;
+ return
+ ! (uiA0 & UINT64_C( 0x4000000000000000 ))
+ && (uiA0 & UINT64_C( 0x3FFFFFFFFFFFFFFF));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086-SSE/f128M_isSignalingNaN.c b/src/libs/softfloat-3e/source/8086-SSE/f128M_isSignalingNaN.c
new file mode 100644
index 00000000..9ff83d72
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086-SSE/f128M_isSignalingNaN.c
@@ -0,0 +1,60 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+bool f128M_isSignalingNaN( const float128_t *aPtr )
+{
+ const uint32_t *aWPtr;
+ uint32_t uiA96;
+
+ aWPtr = (const uint32_t *) aPtr;
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ if ( (uiA96 & 0x7FFF8000) != 0x7FFF0000 ) return false;
+ return
+ ((uiA96 & 0x00007FFF) != 0)
+ || ((aWPtr[indexWord( 4, 2 )] | aWPtr[indexWord( 4, 1 )]
+ | aWPtr[indexWord( 4, 0 )])
+ != 0);
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToExtF80M.c b/src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToExtF80M.c
new file mode 100644
index 00000000..06302aa1
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToExtF80M.c
@@ -0,0 +1,56 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by `aPtr' into an 80-bit extended
+| floating-point NaN, and stores this NaN at the location pointed to by
+| `zSPtr'.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_commonNaNToExtF80M(
+ const struct commonNaN *aPtr, struct extFloat80M *zSPtr )
+{
+
+ zSPtr->signExp = packToExtF80UI64( aPtr->sign, 0x7FFF );
+ zSPtr->signif = UINT64_C( 0xC000000000000000 ) | aPtr->v64>>1;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToExtF80UI.c b/src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToExtF80UI.c
new file mode 100644
index 00000000..7325468f
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToExtF80UI.c
@@ -0,0 +1,56 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by `aPtr' into an 80-bit extended
+| floating-point NaN, and returns the bit pattern of this value as an unsigned
+| integer.
+*----------------------------------------------------------------------------*/
+struct uint128 softfloat_commonNaNToExtF80UI( const struct commonNaN *aPtr )
+{
+ struct uint128 uiZ;
+
+ uiZ.v64 = (uint_fast16_t) aPtr->sign<<15 | 0x7FFF;
+ uiZ.v0 = UINT64_C( 0xC000000000000000 ) | aPtr->v64>>1;
+ return uiZ;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToF128M.c b/src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToF128M.c
new file mode 100644
index 00000000..e2940bb7
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToF128M.c
@@ -0,0 +1,56 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by `aPtr' into a 128-bit floating-point
+| NaN, and stores this NaN at the location pointed to by `zWPtr'. Argument
+| `zWPtr' points to an array of four 32-bit elements that concatenate in the
+| platform's normal endian order to form a 128-bit floating-point value.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_commonNaNToF128M( const struct commonNaN *aPtr, uint32_t *zWPtr )
+{
+
+ softfloat_shortShiftRight128M( (const uint32_t *) &aPtr->v0, 16, zWPtr );
+ zWPtr[indexWordHi( 4 )] |= (uint32_t) aPtr->sign<<31 | 0x7FFF8000;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToF128UI.c b/src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToF128UI.c
new file mode 100644
index 00000000..ac8ea7b7
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToF128UI.c
@@ -0,0 +1,55 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by `aPtr' into a 128-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+struct uint128 softfloat_commonNaNToF128UI( const struct commonNaN *aPtr )
+{
+ struct uint128 uiZ;
+
+ uiZ = softfloat_shortShiftRight128( aPtr->v64, aPtr->v0, 16 );
+ uiZ.v64 |= (uint_fast64_t) aPtr->sign<<63 | UINT64_C( 0x7FFF800000000000 );
+ return uiZ;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToF16UI.c b/src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToF16UI.c
new file mode 100644
index 00000000..07679d71
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToF16UI.c
@@ -0,0 +1,51 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by `aPtr' into a 16-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+uint_fast16_t softfloat_commonNaNToF16UI( const struct commonNaN *aPtr )
+{
+
+ return (uint_fast16_t) aPtr->sign<<15 | 0x7E00 | aPtr->v64>>54;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToF32UI.c b/src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToF32UI.c
new file mode 100644
index 00000000..982c1edf
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToF32UI.c
@@ -0,0 +1,51 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by `aPtr' into a 32-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+uint_fast32_t softfloat_commonNaNToF32UI( const struct commonNaN *aPtr )
+{
+
+ return (uint_fast32_t) aPtr->sign<<31 | 0x7FC00000 | aPtr->v64>>41;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToF64UI.c b/src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToF64UI.c
new file mode 100644
index 00000000..d88c68ad
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086-SSE/s_commonNaNToF64UI.c
@@ -0,0 +1,53 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by `aPtr' into a 64-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+uint_fast64_t softfloat_commonNaNToF64UI( const struct commonNaN *aPtr )
+{
+
+ return
+ (uint_fast64_t) aPtr->sign<<63 | UINT64_C( 0x7FF8000000000000 )
+ | aPtr->v64>>12;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086-SSE/s_extF80MToCommonNaN.c b/src/libs/softfloat-3e/source/8086-SSE/s_extF80MToCommonNaN.c
new file mode 100644
index 00000000..dfaa05cd
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086-SSE/s_extF80MToCommonNaN.c
@@ -0,0 +1,62 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming the 80-bit extended floating-point value pointed to by `aSPtr' is
+| a NaN, converts this NaN to the common NaN form, and stores the resulting
+| common NaN at the location pointed to by `zPtr'. If the NaN is a signaling
+| NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_extF80MToCommonNaN(
+ const struct extFloat80M *aSPtr, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ if ( extF80M_isSignalingNaN( (const extFloat80_t *) aSPtr ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ zPtr->sign = signExtF80UI64( aSPtr->signExp );
+ zPtr->v64 = aSPtr->signif<<1;
+ zPtr->v0 = 0;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086-SSE/s_extF80UIToCommonNaN.c b/src/libs/softfloat-3e/source/8086-SSE/s_extF80UIToCommonNaN.c
new file mode 100644
index 00000000..3e1c97bf
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086-SSE/s_extF80UIToCommonNaN.c
@@ -0,0 +1,62 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming the unsigned integer formed from concatenating `uiA64' and `uiA0'
+| has the bit pattern of an 80-bit extended floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_extF80UIToCommonNaN(
+ uint_fast16_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ if ( softfloat_isSigNaNExtF80UI( uiA64, uiA0 ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ zPtr->sign = uiA64>>15;
+ zPtr->v64 = uiA0<<1;
+ zPtr->v0 = 0;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086-SSE/s_f128MToCommonNaN.c b/src/libs/softfloat-3e/source/8086-SSE/s_f128MToCommonNaN.c
new file mode 100644
index 00000000..ae3784f5
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086-SSE/s_f128MToCommonNaN.c
@@ -0,0 +1,62 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming the 128-bit floating-point value pointed to by `aWPtr' is a NaN,
+| converts this NaN to the common NaN form, and stores the resulting common
+| NaN at the location pointed to by `zPtr'. If the NaN is a signaling NaN,
+| the invalid exception is raised. Argument `aWPtr' points to an array of
+| four 32-bit elements that concatenate in the platform's normal endian order
+| to form a 128-bit floating-point value.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_f128MToCommonNaN( const uint32_t *aWPtr, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ if ( f128M_isSignalingNaN( (const float128_t *) aWPtr ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ zPtr->sign = aWPtr[indexWordHi( 4 )]>>31;
+ softfloat_shortShiftLeft128M( aWPtr, 16, (uint32_t *) &zPtr->v0 );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086-SSE/s_f128UIToCommonNaN.c b/src/libs/softfloat-3e/source/8086-SSE/s_f128UIToCommonNaN.c
new file mode 100644
index 00000000..f578e4c3
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086-SSE/s_f128UIToCommonNaN.c
@@ -0,0 +1,65 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming the unsigned integer formed from concatenating `uiA64' and `uiA0'
+| has the bit pattern of a 128-bit floating-point NaN, converts this NaN to
+| the common NaN form, and stores the resulting common NaN at the location
+| pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid exception
+| is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_f128UIToCommonNaN(
+ uint_fast64_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ struct uint128 NaNSig;
+
+ if ( softfloat_isSigNaNF128UI( uiA64, uiA0 ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ NaNSig = softfloat_shortShiftLeft128( uiA64, uiA0, 16 );
+ zPtr->sign = uiA64>>63;
+ zPtr->v64 = NaNSig.v64;
+ zPtr->v0 = NaNSig.v0;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086-SSE/s_f16UIToCommonNaN.c b/src/libs/softfloat-3e/source/8086-SSE/s_f16UIToCommonNaN.c
new file mode 100644
index 00000000..4f7c3f3c
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086-SSE/s_f16UIToCommonNaN.c
@@ -0,0 +1,59 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming `uiA' has the bit pattern of a 16-bit floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void softfloat_f16UIToCommonNaN( uint_fast16_t uiA, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ if ( softfloat_isSigNaNF16UI( uiA ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ zPtr->sign = uiA>>15;
+ zPtr->v64 = (uint_fast64_t) uiA<<54;
+ zPtr->v0 = 0;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086-SSE/s_f32UIToCommonNaN.c b/src/libs/softfloat-3e/source/8086-SSE/s_f32UIToCommonNaN.c
new file mode 100644
index 00000000..50bc7edb
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086-SSE/s_f32UIToCommonNaN.c
@@ -0,0 +1,59 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming `uiA' has the bit pattern of a 32-bit floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void softfloat_f32UIToCommonNaN( uint_fast32_t uiA, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ if ( softfloat_isSigNaNF32UI( uiA ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ zPtr->sign = uiA>>31;
+ zPtr->v64 = (uint_fast64_t) uiA<<41;
+ zPtr->v0 = 0;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086-SSE/s_f64UIToCommonNaN.c b/src/libs/softfloat-3e/source/8086-SSE/s_f64UIToCommonNaN.c
new file mode 100644
index 00000000..0b1f953c
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086-SSE/s_f64UIToCommonNaN.c
@@ -0,0 +1,59 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming `uiA' has the bit pattern of a 64-bit floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void softfloat_f64UIToCommonNaN( uint_fast64_t uiA, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ if ( softfloat_isSigNaNF64UI( uiA ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ zPtr->sign = uiA>>63;
+ zPtr->v64 = uiA<<12;
+ zPtr->v0 = 0;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNExtF80M.c b/src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNExtF80M.c
new file mode 100644
index 00000000..8b30c87a
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNExtF80M.c
@@ -0,0 +1,108 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming at least one of the two 80-bit extended floating-point values
+| pointed to by `aSPtr' and `bSPtr' is a NaN, stores the combined NaN result
+| at the location pointed to by `zSPtr'. If either original floating-point
+| value is a signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_propagateNaNExtF80M(
+ const struct extFloat80M *aSPtr,
+ const struct extFloat80M *bSPtr,
+ struct extFloat80M *zSPtr
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ bool isSigNaNA;
+ const struct extFloat80M *sPtr;
+ bool isSigNaNB;
+ uint_fast16_t uiB64;
+ uint64_t uiB0;
+ uint_fast16_t uiA64;
+ uint64_t uiA0;
+ uint_fast16_t uiMagA64, uiMagB64;
+
+ isSigNaNA = extF80M_isSignalingNaN( (const extFloat80_t *) aSPtr );
+ sPtr = aSPtr;
+ if ( ! bSPtr ) {
+ if ( isSigNaNA ) softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ goto copy;
+ }
+ isSigNaNB = extF80M_isSignalingNaN( (const extFloat80_t *) bSPtr );
+ if ( isSigNaNA | isSigNaNB ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ if ( isSigNaNA ) {
+ uiB64 = bSPtr->signExp;
+ if ( isSigNaNB ) goto returnLargerUIMag;
+ uiB0 = bSPtr->signif;
+ if ( isNaNExtF80UI( uiB64, uiB0 ) ) goto copyB;
+ goto copy;
+ } else {
+ uiA64 = aSPtr->signExp;
+ uiA0 = aSPtr->signif;
+ if ( isNaNExtF80UI( uiA64, uiA0 ) ) goto copy;
+ goto copyB;
+ }
+ }
+ uiB64 = bSPtr->signExp;
+ returnLargerUIMag:
+ uiA64 = aSPtr->signExp;
+ uiMagA64 = uiA64 & 0x7FFF;
+ uiMagB64 = uiB64 & 0x7FFF;
+ if ( uiMagA64 < uiMagB64 ) goto copyB;
+ if ( uiMagB64 < uiMagA64 ) goto copy;
+ uiA0 = aSPtr->signif;
+ uiB0 = bSPtr->signif;
+ if ( uiA0 < uiB0 ) goto copyB;
+ if ( uiB0 < uiA0 ) goto copy;
+ if ( uiA64 < uiB64 ) goto copy;
+ copyB:
+ sPtr = bSPtr;
+ copy:
+ zSPtr->signExp = sPtr->signExp;
+ zSPtr->signif = sPtr->signif | UINT64_C( 0xC000000000000000 );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNExtF80UI.c b/src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNExtF80UI.c
new file mode 100644
index 00000000..0dcadd64
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNExtF80UI.c
@@ -0,0 +1,107 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Interpreting the unsigned integer formed from concatenating 'uiA64' and
+| 'uiA0' as an 80-bit extended floating-point value, and likewise interpreting
+| the unsigned integer formed from concatenating 'uiB64' and 'uiB0' as another
+| 80-bit extended floating-point value, and assuming at least on of these
+| floating-point values is a NaN, returns the bit pattern of the combined NaN
+| result. If either original floating-point value is a signaling NaN, the
+| invalid exception is raised.
+*----------------------------------------------------------------------------*/
+struct uint128
+ softfloat_propagateNaNExtF80UI(
+ uint_fast16_t uiA64,
+ uint_fast64_t uiA0,
+ uint_fast16_t uiB64,
+ uint_fast64_t uiB0
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ bool isSigNaNA, isSigNaNB;
+ uint_fast64_t uiNonsigA0, uiNonsigB0;
+ uint_fast16_t uiMagA64, uiMagB64;
+ struct uint128 uiZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ isSigNaNA = softfloat_isSigNaNExtF80UI( uiA64, uiA0 );
+ isSigNaNB = softfloat_isSigNaNExtF80UI( uiB64, uiB0 );
+ /*------------------------------------------------------------------------
+ | Make NaNs non-signaling.
+ *------------------------------------------------------------------------*/
+ uiNonsigA0 = uiA0 | UINT64_C( 0xC000000000000000 );
+ uiNonsigB0 = uiB0 | UINT64_C( 0xC000000000000000 );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( isSigNaNA | isSigNaNB ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ if ( isSigNaNA ) {
+ if ( isSigNaNB ) goto returnLargerMag;
+ if ( isNaNExtF80UI( uiB64, uiB0 ) ) goto returnB;
+ goto returnA;
+ } else {
+ if ( isNaNExtF80UI( uiA64, uiA0 ) ) goto returnA;
+ goto returnB;
+ }
+ }
+ returnLargerMag:
+ uiMagA64 = uiA64 & 0x7FFF;
+ uiMagB64 = uiB64 & 0x7FFF;
+ if ( uiMagA64 < uiMagB64 ) goto returnB;
+ if ( uiMagB64 < uiMagA64 ) goto returnA;
+ if ( uiA0 < uiB0 ) goto returnB;
+ if ( uiB0 < uiA0 ) goto returnA;
+ if ( uiA64 < uiB64 ) goto returnA;
+ returnB:
+ uiZ.v64 = uiB64;
+ uiZ.v0 = uiNonsigB0;
+ return uiZ;
+ returnA:
+ uiZ.v64 = uiA64;
+ uiZ.v0 = uiNonsigA0;
+ return uiZ;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNF128M.c b/src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNF128M.c
new file mode 100644
index 00000000..94b6c1fa
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNF128M.c
@@ -0,0 +1,76 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming at least one of the two 128-bit floating-point values pointed to by
+| `aWPtr' and `bWPtr' is a NaN, stores the combined NaN result at the location
+| pointed to by `zWPtr'. If either original floating-point value is a
+| signaling NaN, the invalid exception is raised. Each of `aWPtr', `bWPtr',
+| and `zWPtr' points to an array of four 32-bit elements that concatenate in
+| the platform's normal endian order to form a 128-bit floating-point value.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_propagateNaNF128M(
+ const uint32_t *aWPtr, const uint32_t *bWPtr, uint32_t *zWPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ bool isSigNaNA;
+ const uint32_t *ptr;
+
+ ptr = aWPtr;
+ isSigNaNA = f128M_isSignalingNaN( (const float128_t *) aWPtr );
+ if (
+ isSigNaNA
+ || (bWPtr && f128M_isSignalingNaN( (const float128_t *) bWPtr ))
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ if ( isSigNaNA ) goto copy;
+ }
+ if ( ! softfloat_isNaNF128M( aWPtr ) ) ptr = bWPtr;
+ copy:
+ zWPtr[indexWordHi( 4 )] = ptr[indexWordHi( 4 )] | 0x00008000;
+ zWPtr[indexWord( 4, 2 )] = ptr[indexWord( 4, 2 )];
+ zWPtr[indexWord( 4, 1 )] = ptr[indexWord( 4, 1 )];
+ zWPtr[indexWord( 4, 0 )] = ptr[indexWord( 4, 0 )];
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNF128UI.c b/src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNF128UI.c
new file mode 100644
index 00000000..d4ea7a6c
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNF128UI.c
@@ -0,0 +1,82 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Interpreting the unsigned integer formed from concatenating `uiA64' and
+| `uiA0' as a 128-bit floating-point value, and likewise interpreting the
+| unsigned integer formed from concatenating `uiB64' and `uiB0' as another
+| 128-bit floating-point value, and assuming at least on of these floating-
+| point values is a NaN, returns the bit pattern of the combined NaN result.
+| If either original floating-point value is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+struct uint128
+ softfloat_propagateNaNF128UI(
+ uint_fast64_t uiA64,
+ uint_fast64_t uiA0,
+ uint_fast64_t uiB64,
+ uint_fast64_t uiB0
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ bool isSigNaNA;
+ struct uint128 uiZ;
+
+ isSigNaNA = softfloat_isSigNaNF128UI( uiA64, uiA0 );
+ if ( isSigNaNA || softfloat_isSigNaNF128UI( uiB64, uiB0 ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ if ( isSigNaNA ) goto returnNonsigA;
+ }
+ if ( isNaNF128UI( uiA64, uiA0 ) ) {
+ returnNonsigA:
+ uiZ.v64 = uiA64;
+ uiZ.v0 = uiA0;
+ } else {
+ uiZ.v64 = uiB64;
+ uiZ.v0 = uiB0;
+ }
+ uiZ.v64 |= UINT64_C( 0x0000800000000000 );
+ return uiZ;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNF16UI.c b/src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNF16UI.c
new file mode 100644
index 00000000..269f9ec4
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNF16UI.c
@@ -0,0 +1,63 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Interpreting `uiA' and `uiB' as the bit patterns of two 16-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either `uiA' or `uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast16_t
+ softfloat_propagateNaNF16UI( uint_fast16_t uiA, uint_fast16_t uiB SOFTFLOAT_STATE_DECL_COMMA )
+{
+ bool isSigNaNA;
+
+ isSigNaNA = softfloat_isSigNaNF16UI( uiA );
+ if ( isSigNaNA || softfloat_isSigNaNF16UI( uiB ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ if ( isSigNaNA ) return uiA | 0x0200;
+ }
+ return (isNaNF16UI( uiA ) ? uiA : uiB) | 0x0200;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNF32UI.c b/src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNF32UI.c
new file mode 100644
index 00000000..36c6779e
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNF32UI.c
@@ -0,0 +1,63 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Interpreting `uiA' and `uiB' as the bit patterns of two 32-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either `uiA' or `uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast32_t
+ softfloat_propagateNaNF32UI( uint_fast32_t uiA, uint_fast32_t uiB SOFTFLOAT_STATE_DECL_COMMA )
+{
+ bool isSigNaNA;
+
+ isSigNaNA = softfloat_isSigNaNF32UI( uiA );
+ if ( isSigNaNA || softfloat_isSigNaNF32UI( uiB ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ if ( isSigNaNA ) return uiA | 0x00400000;
+ }
+ return (isNaNF32UI( uiA ) ? uiA : uiB) | 0x00400000;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNF64UI.c b/src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNF64UI.c
new file mode 100644
index 00000000..f5c28292
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086-SSE/s_propagateNaNF64UI.c
@@ -0,0 +1,63 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Interpreting `uiA' and `uiB' as the bit patterns of two 64-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either `uiA' or `uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast64_t
+ softfloat_propagateNaNF64UI( uint_fast64_t uiA, uint_fast64_t uiB SOFTFLOAT_STATE_DECL_COMMA )
+{
+ bool isSigNaNA;
+
+ isSigNaNA = softfloat_isSigNaNF64UI( uiA );
+ if ( isSigNaNA || softfloat_isSigNaNF64UI( uiB ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ if ( isSigNaNA ) return uiA | UINT64_C( 0x0008000000000000 );
+ }
+ return (isNaNF64UI( uiA ) ? uiA : uiB) | UINT64_C( 0x0008000000000000 );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086-SSE/softfloat_raiseFlags.c b/src/libs/softfloat-3e/source/8086-SSE/softfloat_raiseFlags.c
new file mode 100644
index 00000000..1df5eabc
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086-SSE/softfloat_raiseFlags.c
@@ -0,0 +1,56 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include "platform.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Raises the exceptions specified by `flags'. Floating-point traps can be
+| defined here if desired. It is currently not possible for such a trap
+| to substitute a result value. If traps are not implemented, this routine
+| should be simply `softfloat_exceptionFlags |= flags;'.
+*----------------------------------------------------------------------------*/
+void softfloat_raiseFlags( uint_fast8_t flags SOFTFLOAT_STATE_ARG_COMMA )
+{
+
+#ifdef VBOX_WITHOUT_SOFTFLOAT_GLOBALS
+ softfloat_exceptionFlags |= flags;
+#else
+ pState->exceptionFlags |= flags;
+#endif
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086-SSE/specialize.h b/src/libs/softfloat-3e/source/8086-SSE/specialize.h
new file mode 100644
index 00000000..a0f6ba70
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086-SSE/specialize.h
@@ -0,0 +1,379 @@
+
+/*============================================================================
+
+This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2018 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#ifndef specialize_h
+#define specialize_h 1
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "primitiveTypes.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Default value for 'softfloat_detectTininess'.
+*----------------------------------------------------------------------------*/
+#define init_detectTininess softfloat_tininess_afterRounding
+
+/*----------------------------------------------------------------------------
+| The values to return on conversions to 32-bit integer formats that raise an
+| invalid exception.
+*----------------------------------------------------------------------------*/
+#define ui32_fromPosOverflow 0xFFFFFFFF
+#define ui32_fromNegOverflow 0xFFFFFFFF
+#define ui32_fromNaN 0xFFFFFFFF
+#define i32_fromPosOverflow (-0x7FFFFFFF - 1)
+#define i32_fromNegOverflow (-0x7FFFFFFF - 1)
+#define i32_fromNaN (-0x7FFFFFFF - 1)
+
+/*----------------------------------------------------------------------------
+| The values to return on conversions to 64-bit integer formats that raise an
+| invalid exception.
+*----------------------------------------------------------------------------*/
+#define ui64_fromPosOverflow UINT64_C( 0xFFFFFFFFFFFFFFFF )
+#define ui64_fromNegOverflow UINT64_C( 0xFFFFFFFFFFFFFFFF )
+#define ui64_fromNaN UINT64_C( 0xFFFFFFFFFFFFFFFF )
+#define i64_fromPosOverflow (-INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+#define i64_fromNegOverflow (-INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+#define i64_fromNaN (-INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+
+/*----------------------------------------------------------------------------
+| "Common NaN" structure, used to transfer NaN representations from one format
+| to another.
+*----------------------------------------------------------------------------*/
+struct commonNaN {
+ bool sign;
+#ifdef LITTLEENDIAN
+ uint64_t v0, v64;
+#else
+ uint64_t v64, v0;
+#endif
+};
+
+/*----------------------------------------------------------------------------
+| The bit pattern for a default generated 16-bit floating-point NaN.
+*----------------------------------------------------------------------------*/
+#define defaultNaNF16UI 0xFE00
+
+/*----------------------------------------------------------------------------
+| Returns true when 16-bit unsigned integer 'uiA' has the bit pattern of a
+| 16-bit floating-point signaling NaN.
+| Note: This macro evaluates its argument more than once.
+*----------------------------------------------------------------------------*/
+#define softfloat_isSigNaNF16UI( uiA ) ((((uiA) & 0x7E00) == 0x7C00) && ((uiA) & 0x01FF))
+
+/*----------------------------------------------------------------------------
+| Assuming 'uiA' has the bit pattern of a 16-bit floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void softfloat_f16UIToCommonNaN( uint_fast16_t uiA, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 16-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+uint_fast16_t softfloat_commonNaNToF16UI( const struct commonNaN *aPtr );
+
+/*----------------------------------------------------------------------------
+| Interpreting 'uiA' and 'uiB' as the bit patterns of two 16-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either 'uiA' or 'uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast16_t
+ softfloat_propagateNaNF16UI( uint_fast16_t uiA, uint_fast16_t uiB SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| The bit pattern for a default generated 32-bit floating-point NaN.
+*----------------------------------------------------------------------------*/
+#define defaultNaNF32UI 0xFFC00000
+
+/*----------------------------------------------------------------------------
+| Returns true when 32-bit unsigned integer 'uiA' has the bit pattern of a
+| 32-bit floating-point signaling NaN.
+| Note: This macro evaluates its argument more than once.
+*----------------------------------------------------------------------------*/
+#define softfloat_isSigNaNF32UI( uiA ) ((((uiA) & 0x7FC00000) == 0x7F800000) && ((uiA) & 0x003FFFFF))
+
+/*----------------------------------------------------------------------------
+| Assuming 'uiA' has the bit pattern of a 32-bit floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void softfloat_f32UIToCommonNaN( uint_fast32_t uiA, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 32-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+uint_fast32_t softfloat_commonNaNToF32UI( const struct commonNaN *aPtr );
+
+/*----------------------------------------------------------------------------
+| Interpreting 'uiA' and 'uiB' as the bit patterns of two 32-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either 'uiA' or 'uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast32_t
+ softfloat_propagateNaNF32UI( uint_fast32_t uiA, uint_fast32_t uiB SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| The bit pattern for a default generated 64-bit floating-point NaN.
+*----------------------------------------------------------------------------*/
+#define defaultNaNF64UI UINT64_C( 0xFFF8000000000000 )
+
+/*----------------------------------------------------------------------------
+| Returns true when 64-bit unsigned integer 'uiA' has the bit pattern of a
+| 64-bit floating-point signaling NaN.
+| Note: This macro evaluates its argument more than once.
+*----------------------------------------------------------------------------*/
+#define softfloat_isSigNaNF64UI( uiA ) ((((uiA) & UINT64_C( 0x7FF8000000000000 )) == UINT64_C( 0x7FF0000000000000 )) && ((uiA) & UINT64_C( 0x0007FFFFFFFFFFFF )))
+
+/*----------------------------------------------------------------------------
+| Assuming 'uiA' has the bit pattern of a 64-bit floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void softfloat_f64UIToCommonNaN( uint_fast64_t uiA, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 64-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+uint_fast64_t softfloat_commonNaNToF64UI( const struct commonNaN *aPtr );
+
+/*----------------------------------------------------------------------------
+| Interpreting 'uiA' and 'uiB' as the bit patterns of two 64-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either 'uiA' or 'uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast64_t
+ softfloat_propagateNaNF64UI( uint_fast64_t uiA, uint_fast64_t uiB SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| The bit pattern for a default generated 80-bit extended floating-point NaN.
+*----------------------------------------------------------------------------*/
+#define defaultNaNExtF80UI64 0xFFFF
+#define defaultNaNExtF80UI0 UINT64_C( 0xC000000000000000 )
+
+/*----------------------------------------------------------------------------
+| Returns true when the 80-bit unsigned integer formed from concatenating
+| 16-bit 'uiA64' and 64-bit 'uiA0' has the bit pattern of an 80-bit extended
+| floating-point signaling NaN.
+| Note: This macro evaluates its arguments more than once.
+*----------------------------------------------------------------------------*/
+#define softfloat_isSigNaNExtF80UI( uiA64, uiA0 ) ((((uiA64) & 0x7FFF) == 0x7FFF) && ! ((uiA0) & UINT64_C( 0x4000000000000000 )) && ((uiA0) & UINT64_C( 0x3FFFFFFFFFFFFFFF )))
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+/*----------------------------------------------------------------------------
+| The following functions are needed only when 'SOFTFLOAT_FAST_INT64' is
+| defined.
+*----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+| Assuming the unsigned integer formed from concatenating 'uiA64' and 'uiA0'
+| has the bit pattern of an 80-bit extended floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_extF80UIToCommonNaN(
+ uint_fast16_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into an 80-bit extended
+| floating-point NaN, and returns the bit pattern of this value as an unsigned
+| integer.
+*----------------------------------------------------------------------------*/
+struct uint128 softfloat_commonNaNToExtF80UI( const struct commonNaN *aPtr );
+
+/*----------------------------------------------------------------------------
+| Interpreting the unsigned integer formed from concatenating 'uiA64' and
+| 'uiA0' as an 80-bit extended floating-point value, and likewise interpreting
+| the unsigned integer formed from concatenating 'uiB64' and 'uiB0' as another
+| 80-bit extended floating-point value, and assuming at least on of these
+| floating-point values is a NaN, returns the bit pattern of the combined NaN
+| result. If either original floating-point value is a signaling NaN, the
+| invalid exception is raised.
+*----------------------------------------------------------------------------*/
+struct uint128
+ softfloat_propagateNaNExtF80UI(
+ uint_fast16_t uiA64,
+ uint_fast64_t uiA0,
+ uint_fast16_t uiB64,
+ uint_fast64_t uiB0
+ SOFTFLOAT_STATE_DECL_COMMA
+ );
+
+/*----------------------------------------------------------------------------
+| The bit pattern for a default generated 128-bit floating-point NaN.
+*----------------------------------------------------------------------------*/
+#define defaultNaNF128UI64 UINT64_C( 0xFFFF800000000000 )
+#define defaultNaNF128UI0 UINT64_C( 0 )
+
+/*----------------------------------------------------------------------------
+| Returns true when the 128-bit unsigned integer formed from concatenating
+| 64-bit 'uiA64' and 64-bit 'uiA0' has the bit pattern of a 128-bit floating-
+| point signaling NaN.
+| Note: This macro evaluates its arguments more than once.
+*----------------------------------------------------------------------------*/
+#define softfloat_isSigNaNF128UI( uiA64, uiA0 ) ((((uiA64) & UINT64_C( 0x7FFF800000000000 )) == UINT64_C( 0x7FFF000000000000 )) && ((uiA0) || ((uiA64) & UINT64_C( 0x00007FFFFFFFFFFF ))))
+
+/*----------------------------------------------------------------------------
+| Assuming the unsigned integer formed from concatenating 'uiA64' and 'uiA0'
+| has the bit pattern of a 128-bit floating-point NaN, converts this NaN to
+| the common NaN form, and stores the resulting common NaN at the location
+| pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid exception
+| is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_f128UIToCommonNaN(
+ uint_fast64_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 128-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+struct uint128 softfloat_commonNaNToF128UI( const struct commonNaN * );
+
+/*----------------------------------------------------------------------------
+| Interpreting the unsigned integer formed from concatenating 'uiA64' and
+| 'uiA0' as a 128-bit floating-point value, and likewise interpreting the
+| unsigned integer formed from concatenating 'uiB64' and 'uiB0' as another
+| 128-bit floating-point value, and assuming at least on of these floating-
+| point values is a NaN, returns the bit pattern of the combined NaN result.
+| If either original floating-point value is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+struct uint128
+ softfloat_propagateNaNF128UI(
+ uint_fast64_t uiA64,
+ uint_fast64_t uiA0,
+ uint_fast64_t uiB64,
+ uint_fast64_t uiB0
+ SOFTFLOAT_STATE_DECL_COMMA
+ );
+
+#else
+
+/*----------------------------------------------------------------------------
+| The following functions are needed only when 'SOFTFLOAT_FAST_INT64' is not
+| defined.
+*----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+| Assuming the 80-bit extended floating-point value pointed to by 'aSPtr' is
+| a NaN, converts this NaN to the common NaN form, and stores the resulting
+| common NaN at the location pointed to by 'zPtr'. If the NaN is a signaling
+| NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_extF80MToCommonNaN(
+ const struct extFloat80M *aSPtr, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into an 80-bit extended
+| floating-point NaN, and stores this NaN at the location pointed to by
+| 'zSPtr'.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_commonNaNToExtF80M(
+ const struct commonNaN *aPtr, struct extFloat80M *zSPtr );
+
+/*----------------------------------------------------------------------------
+| Assuming at least one of the two 80-bit extended floating-point values
+| pointed to by 'aSPtr' and 'bSPtr' is a NaN, stores the combined NaN result
+| at the location pointed to by 'zSPtr'. If either original floating-point
+| value is a signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_propagateNaNExtF80M(
+ const struct extFloat80M *aSPtr,
+ const struct extFloat80M *bSPtr,
+ struct extFloat80M *zSPtr
+ SOFTFLOAT_STATE_DECL_COMMA
+ );
+
+/*----------------------------------------------------------------------------
+| The bit pattern for a default generated 128-bit floating-point NaN.
+*----------------------------------------------------------------------------*/
+#define defaultNaNF128UI96 0xFFFF8000
+#define defaultNaNF128UI64 0
+#define defaultNaNF128UI32 0
+#define defaultNaNF128UI0 0
+
+/*----------------------------------------------------------------------------
+| Assuming the 128-bit floating-point value pointed to by 'aWPtr' is a NaN,
+| converts this NaN to the common NaN form, and stores the resulting common
+| NaN at the location pointed to by 'zPtr'. If the NaN is a signaling NaN,
+| the invalid exception is raised. Argument 'aWPtr' points to an array of
+| four 32-bit elements that concatenate in the platform's normal endian order
+| to form a 128-bit floating-point value.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_f128MToCommonNaN( const uint32_t *aWPtr, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 128-bit floating-point
+| NaN, and stores this NaN at the location pointed to by 'zWPtr'. Argument
+| 'zWPtr' points to an array of four 32-bit elements that concatenate in the
+| platform's normal endian order to form a 128-bit floating-point value.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_commonNaNToF128M( const struct commonNaN *aPtr, uint32_t *zWPtr );
+
+/*----------------------------------------------------------------------------
+| Assuming at least one of the two 128-bit floating-point values pointed to by
+| 'aWPtr' and 'bWPtr' is a NaN, stores the combined NaN result at the location
+| pointed to by 'zWPtr'. If either original floating-point value is a
+| signaling NaN, the invalid exception is raised. Each of 'aWPtr', 'bWPtr',
+| and 'zWPtr' points to an array of four 32-bit elements that concatenate in
+| the platform's normal endian order to form a 128-bit floating-point value.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_propagateNaNF128M(
+ const uint32_t *aWPtr, const uint32_t *bWPtr, uint32_t *zWPtr SOFTFLOAT_STATE_DECL_COMMA );
+
+#endif
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/8086/Makefile.kup b/src/libs/softfloat-3e/source/8086/Makefile.kup
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/Makefile.kup
diff --git a/src/libs/softfloat-3e/source/8086/extF80M_isSignalingNaN.c b/src/libs/softfloat-3e/source/8086/extF80M_isSignalingNaN.c
new file mode 100644
index 00000000..c2cca65c
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/extF80M_isSignalingNaN.c
@@ -0,0 +1,57 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+bool extF80M_isSignalingNaN( const extFloat80_t *aPtr )
+{
+ const struct extFloat80M *aSPtr;
+ uint64_t uiA0;
+
+ aSPtr = (const struct extFloat80M *) aPtr;
+ if ( (aSPtr->signExp & 0x7FFF) != 0x7FFF ) return false;
+ uiA0 = aSPtr->signif;
+ return
+ ! (uiA0 & UINT64_C( 0x4000000000000000 ))
+ && (uiA0 & UINT64_C( 0x3FFFFFFFFFFFFFFF));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086/f128M_isSignalingNaN.c b/src/libs/softfloat-3e/source/8086/f128M_isSignalingNaN.c
new file mode 100644
index 00000000..9ff83d72
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/f128M_isSignalingNaN.c
@@ -0,0 +1,60 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+bool f128M_isSignalingNaN( const float128_t *aPtr )
+{
+ const uint32_t *aWPtr;
+ uint32_t uiA96;
+
+ aWPtr = (const uint32_t *) aPtr;
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ if ( (uiA96 & 0x7FFF8000) != 0x7FFF0000 ) return false;
+ return
+ ((uiA96 & 0x00007FFF) != 0)
+ || ((aWPtr[indexWord( 4, 2 )] | aWPtr[indexWord( 4, 1 )]
+ | aWPtr[indexWord( 4, 0 )])
+ != 0);
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086/s_commonNaNToExtF80M.c b/src/libs/softfloat-3e/source/8086/s_commonNaNToExtF80M.c
new file mode 100644
index 00000000..06302aa1
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/s_commonNaNToExtF80M.c
@@ -0,0 +1,56 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by `aPtr' into an 80-bit extended
+| floating-point NaN, and stores this NaN at the location pointed to by
+| `zSPtr'.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_commonNaNToExtF80M(
+ const struct commonNaN *aPtr, struct extFloat80M *zSPtr )
+{
+
+ zSPtr->signExp = packToExtF80UI64( aPtr->sign, 0x7FFF );
+ zSPtr->signif = UINT64_C( 0xC000000000000000 ) | aPtr->v64>>1;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086/s_commonNaNToExtF80UI.c b/src/libs/softfloat-3e/source/8086/s_commonNaNToExtF80UI.c
new file mode 100644
index 00000000..7325468f
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/s_commonNaNToExtF80UI.c
@@ -0,0 +1,56 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by `aPtr' into an 80-bit extended
+| floating-point NaN, and returns the bit pattern of this value as an unsigned
+| integer.
+*----------------------------------------------------------------------------*/
+struct uint128 softfloat_commonNaNToExtF80UI( const struct commonNaN *aPtr )
+{
+ struct uint128 uiZ;
+
+ uiZ.v64 = (uint_fast16_t) aPtr->sign<<15 | 0x7FFF;
+ uiZ.v0 = UINT64_C( 0xC000000000000000 ) | aPtr->v64>>1;
+ return uiZ;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086/s_commonNaNToF128M.c b/src/libs/softfloat-3e/source/8086/s_commonNaNToF128M.c
new file mode 100644
index 00000000..e2940bb7
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/s_commonNaNToF128M.c
@@ -0,0 +1,56 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by `aPtr' into a 128-bit floating-point
+| NaN, and stores this NaN at the location pointed to by `zWPtr'. Argument
+| `zWPtr' points to an array of four 32-bit elements that concatenate in the
+| platform's normal endian order to form a 128-bit floating-point value.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_commonNaNToF128M( const struct commonNaN *aPtr, uint32_t *zWPtr )
+{
+
+ softfloat_shortShiftRight128M( (const uint32_t *) &aPtr->v0, 16, zWPtr );
+ zWPtr[indexWordHi( 4 )] |= (uint32_t) aPtr->sign<<31 | 0x7FFF8000;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086/s_commonNaNToF128UI.c b/src/libs/softfloat-3e/source/8086/s_commonNaNToF128UI.c
new file mode 100644
index 00000000..ac8ea7b7
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/s_commonNaNToF128UI.c
@@ -0,0 +1,55 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by `aPtr' into a 128-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+struct uint128 softfloat_commonNaNToF128UI( const struct commonNaN *aPtr )
+{
+ struct uint128 uiZ;
+
+ uiZ = softfloat_shortShiftRight128( aPtr->v64, aPtr->v0, 16 );
+ uiZ.v64 |= (uint_fast64_t) aPtr->sign<<63 | UINT64_C( 0x7FFF800000000000 );
+ return uiZ;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086/s_commonNaNToF16UI.c b/src/libs/softfloat-3e/source/8086/s_commonNaNToF16UI.c
new file mode 100644
index 00000000..07679d71
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/s_commonNaNToF16UI.c
@@ -0,0 +1,51 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by `aPtr' into a 16-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+uint_fast16_t softfloat_commonNaNToF16UI( const struct commonNaN *aPtr )
+{
+
+ return (uint_fast16_t) aPtr->sign<<15 | 0x7E00 | aPtr->v64>>54;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086/s_commonNaNToF32UI.c b/src/libs/softfloat-3e/source/8086/s_commonNaNToF32UI.c
new file mode 100644
index 00000000..982c1edf
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/s_commonNaNToF32UI.c
@@ -0,0 +1,51 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by `aPtr' into a 32-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+uint_fast32_t softfloat_commonNaNToF32UI( const struct commonNaN *aPtr )
+{
+
+ return (uint_fast32_t) aPtr->sign<<31 | 0x7FC00000 | aPtr->v64>>41;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086/s_commonNaNToF64UI.c b/src/libs/softfloat-3e/source/8086/s_commonNaNToF64UI.c
new file mode 100644
index 00000000..d88c68ad
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/s_commonNaNToF64UI.c
@@ -0,0 +1,53 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by `aPtr' into a 64-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+uint_fast64_t softfloat_commonNaNToF64UI( const struct commonNaN *aPtr )
+{
+
+ return
+ (uint_fast64_t) aPtr->sign<<63 | UINT64_C( 0x7FF8000000000000 )
+ | aPtr->v64>>12;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086/s_extF80MToCommonNaN.c b/src/libs/softfloat-3e/source/8086/s_extF80MToCommonNaN.c
new file mode 100644
index 00000000..dfaa05cd
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/s_extF80MToCommonNaN.c
@@ -0,0 +1,62 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming the 80-bit extended floating-point value pointed to by `aSPtr' is
+| a NaN, converts this NaN to the common NaN form, and stores the resulting
+| common NaN at the location pointed to by `zPtr'. If the NaN is a signaling
+| NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_extF80MToCommonNaN(
+ const struct extFloat80M *aSPtr, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ if ( extF80M_isSignalingNaN( (const extFloat80_t *) aSPtr ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ zPtr->sign = signExtF80UI64( aSPtr->signExp );
+ zPtr->v64 = aSPtr->signif<<1;
+ zPtr->v0 = 0;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086/s_extF80UIToCommonNaN.c b/src/libs/softfloat-3e/source/8086/s_extF80UIToCommonNaN.c
new file mode 100644
index 00000000..3e1c97bf
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/s_extF80UIToCommonNaN.c
@@ -0,0 +1,62 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming the unsigned integer formed from concatenating `uiA64' and `uiA0'
+| has the bit pattern of an 80-bit extended floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_extF80UIToCommonNaN(
+ uint_fast16_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ if ( softfloat_isSigNaNExtF80UI( uiA64, uiA0 ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ zPtr->sign = uiA64>>15;
+ zPtr->v64 = uiA0<<1;
+ zPtr->v0 = 0;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086/s_f128MToCommonNaN.c b/src/libs/softfloat-3e/source/8086/s_f128MToCommonNaN.c
new file mode 100644
index 00000000..ae3784f5
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/s_f128MToCommonNaN.c
@@ -0,0 +1,62 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming the 128-bit floating-point value pointed to by `aWPtr' is a NaN,
+| converts this NaN to the common NaN form, and stores the resulting common
+| NaN at the location pointed to by `zPtr'. If the NaN is a signaling NaN,
+| the invalid exception is raised. Argument `aWPtr' points to an array of
+| four 32-bit elements that concatenate in the platform's normal endian order
+| to form a 128-bit floating-point value.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_f128MToCommonNaN( const uint32_t *aWPtr, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ if ( f128M_isSignalingNaN( (const float128_t *) aWPtr ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ zPtr->sign = aWPtr[indexWordHi( 4 )]>>31;
+ softfloat_shortShiftLeft128M( aWPtr, 16, (uint32_t *) &zPtr->v0 );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086/s_f128UIToCommonNaN.c b/src/libs/softfloat-3e/source/8086/s_f128UIToCommonNaN.c
new file mode 100644
index 00000000..f578e4c3
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/s_f128UIToCommonNaN.c
@@ -0,0 +1,65 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming the unsigned integer formed from concatenating `uiA64' and `uiA0'
+| has the bit pattern of a 128-bit floating-point NaN, converts this NaN to
+| the common NaN form, and stores the resulting common NaN at the location
+| pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid exception
+| is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_f128UIToCommonNaN(
+ uint_fast64_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ struct uint128 NaNSig;
+
+ if ( softfloat_isSigNaNF128UI( uiA64, uiA0 ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ NaNSig = softfloat_shortShiftLeft128( uiA64, uiA0, 16 );
+ zPtr->sign = uiA64>>63;
+ zPtr->v64 = NaNSig.v64;
+ zPtr->v0 = NaNSig.v0;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086/s_f16UIToCommonNaN.c b/src/libs/softfloat-3e/source/8086/s_f16UIToCommonNaN.c
new file mode 100644
index 00000000..4f7c3f3c
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/s_f16UIToCommonNaN.c
@@ -0,0 +1,59 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming `uiA' has the bit pattern of a 16-bit floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void softfloat_f16UIToCommonNaN( uint_fast16_t uiA, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ if ( softfloat_isSigNaNF16UI( uiA ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ zPtr->sign = uiA>>15;
+ zPtr->v64 = (uint_fast64_t) uiA<<54;
+ zPtr->v0 = 0;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086/s_f32UIToCommonNaN.c b/src/libs/softfloat-3e/source/8086/s_f32UIToCommonNaN.c
new file mode 100644
index 00000000..50bc7edb
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/s_f32UIToCommonNaN.c
@@ -0,0 +1,59 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming `uiA' has the bit pattern of a 32-bit floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void softfloat_f32UIToCommonNaN( uint_fast32_t uiA, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ if ( softfloat_isSigNaNF32UI( uiA ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ zPtr->sign = uiA>>31;
+ zPtr->v64 = (uint_fast64_t) uiA<<41;
+ zPtr->v0 = 0;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086/s_f64UIToCommonNaN.c b/src/libs/softfloat-3e/source/8086/s_f64UIToCommonNaN.c
new file mode 100644
index 00000000..0b1f953c
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/s_f64UIToCommonNaN.c
@@ -0,0 +1,59 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming `uiA' has the bit pattern of a 64-bit floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void softfloat_f64UIToCommonNaN( uint_fast64_t uiA, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ if ( softfloat_isSigNaNF64UI( uiA ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ zPtr->sign = uiA>>63;
+ zPtr->v64 = uiA<<12;
+ zPtr->v0 = 0;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086/s_propagateNaNExtF80M.c b/src/libs/softfloat-3e/source/8086/s_propagateNaNExtF80M.c
new file mode 100644
index 00000000..8b30c87a
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/s_propagateNaNExtF80M.c
@@ -0,0 +1,108 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming at least one of the two 80-bit extended floating-point values
+| pointed to by `aSPtr' and `bSPtr' is a NaN, stores the combined NaN result
+| at the location pointed to by `zSPtr'. If either original floating-point
+| value is a signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_propagateNaNExtF80M(
+ const struct extFloat80M *aSPtr,
+ const struct extFloat80M *bSPtr,
+ struct extFloat80M *zSPtr
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ bool isSigNaNA;
+ const struct extFloat80M *sPtr;
+ bool isSigNaNB;
+ uint_fast16_t uiB64;
+ uint64_t uiB0;
+ uint_fast16_t uiA64;
+ uint64_t uiA0;
+ uint_fast16_t uiMagA64, uiMagB64;
+
+ isSigNaNA = extF80M_isSignalingNaN( (const extFloat80_t *) aSPtr );
+ sPtr = aSPtr;
+ if ( ! bSPtr ) {
+ if ( isSigNaNA ) softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ goto copy;
+ }
+ isSigNaNB = extF80M_isSignalingNaN( (const extFloat80_t *) bSPtr );
+ if ( isSigNaNA | isSigNaNB ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ if ( isSigNaNA ) {
+ uiB64 = bSPtr->signExp;
+ if ( isSigNaNB ) goto returnLargerUIMag;
+ uiB0 = bSPtr->signif;
+ if ( isNaNExtF80UI( uiB64, uiB0 ) ) goto copyB;
+ goto copy;
+ } else {
+ uiA64 = aSPtr->signExp;
+ uiA0 = aSPtr->signif;
+ if ( isNaNExtF80UI( uiA64, uiA0 ) ) goto copy;
+ goto copyB;
+ }
+ }
+ uiB64 = bSPtr->signExp;
+ returnLargerUIMag:
+ uiA64 = aSPtr->signExp;
+ uiMagA64 = uiA64 & 0x7FFF;
+ uiMagB64 = uiB64 & 0x7FFF;
+ if ( uiMagA64 < uiMagB64 ) goto copyB;
+ if ( uiMagB64 < uiMagA64 ) goto copy;
+ uiA0 = aSPtr->signif;
+ uiB0 = bSPtr->signif;
+ if ( uiA0 < uiB0 ) goto copyB;
+ if ( uiB0 < uiA0 ) goto copy;
+ if ( uiA64 < uiB64 ) goto copy;
+ copyB:
+ sPtr = bSPtr;
+ copy:
+ zSPtr->signExp = sPtr->signExp;
+ zSPtr->signif = sPtr->signif | UINT64_C( 0xC000000000000000 );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086/s_propagateNaNExtF80UI.c b/src/libs/softfloat-3e/source/8086/s_propagateNaNExtF80UI.c
new file mode 100644
index 00000000..0dcadd64
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/s_propagateNaNExtF80UI.c
@@ -0,0 +1,107 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Interpreting the unsigned integer formed from concatenating 'uiA64' and
+| 'uiA0' as an 80-bit extended floating-point value, and likewise interpreting
+| the unsigned integer formed from concatenating 'uiB64' and 'uiB0' as another
+| 80-bit extended floating-point value, and assuming at least on of these
+| floating-point values is a NaN, returns the bit pattern of the combined NaN
+| result. If either original floating-point value is a signaling NaN, the
+| invalid exception is raised.
+*----------------------------------------------------------------------------*/
+struct uint128
+ softfloat_propagateNaNExtF80UI(
+ uint_fast16_t uiA64,
+ uint_fast64_t uiA0,
+ uint_fast16_t uiB64,
+ uint_fast64_t uiB0
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ bool isSigNaNA, isSigNaNB;
+ uint_fast64_t uiNonsigA0, uiNonsigB0;
+ uint_fast16_t uiMagA64, uiMagB64;
+ struct uint128 uiZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ isSigNaNA = softfloat_isSigNaNExtF80UI( uiA64, uiA0 );
+ isSigNaNB = softfloat_isSigNaNExtF80UI( uiB64, uiB0 );
+ /*------------------------------------------------------------------------
+ | Make NaNs non-signaling.
+ *------------------------------------------------------------------------*/
+ uiNonsigA0 = uiA0 | UINT64_C( 0xC000000000000000 );
+ uiNonsigB0 = uiB0 | UINT64_C( 0xC000000000000000 );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( isSigNaNA | isSigNaNB ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ if ( isSigNaNA ) {
+ if ( isSigNaNB ) goto returnLargerMag;
+ if ( isNaNExtF80UI( uiB64, uiB0 ) ) goto returnB;
+ goto returnA;
+ } else {
+ if ( isNaNExtF80UI( uiA64, uiA0 ) ) goto returnA;
+ goto returnB;
+ }
+ }
+ returnLargerMag:
+ uiMagA64 = uiA64 & 0x7FFF;
+ uiMagB64 = uiB64 & 0x7FFF;
+ if ( uiMagA64 < uiMagB64 ) goto returnB;
+ if ( uiMagB64 < uiMagA64 ) goto returnA;
+ if ( uiA0 < uiB0 ) goto returnB;
+ if ( uiB0 < uiA0 ) goto returnA;
+ if ( uiA64 < uiB64 ) goto returnA;
+ returnB:
+ uiZ.v64 = uiB64;
+ uiZ.v0 = uiNonsigB0;
+ return uiZ;
+ returnA:
+ uiZ.v64 = uiA64;
+ uiZ.v0 = uiNonsigA0;
+ return uiZ;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086/s_propagateNaNF128M.c b/src/libs/softfloat-3e/source/8086/s_propagateNaNF128M.c
new file mode 100644
index 00000000..d2b33416
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/s_propagateNaNF128M.c
@@ -0,0 +1,108 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming at least one of the two 128-bit floating-point values pointed to by
+| `aWPtr' and `bWPtr' is a NaN, stores the combined NaN result at the location
+| pointed to by `zWPtr'. If either original floating-point value is a
+| signaling NaN, the invalid exception is raised. Each of `aWPtr', `bWPtr',
+| and `zWPtr' points to an array of four 32-bit elements that concatenate in
+| the platform's normal endian order to form a 128-bit floating-point value.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_propagateNaNF128M(
+ const uint32_t *aWPtr, const uint32_t *bWPtr, uint32_t *zWPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ bool isSigNaNA;
+ const uint32_t *ptr;
+ bool isSigNaNB;
+ uint32_t uiA96, uiB96, wordMagA, wordMagB;
+
+ isSigNaNA = f128M_isSignalingNaN( (const float128_t *) aWPtr );
+ ptr = aWPtr;
+ if ( ! bWPtr ) {
+ if ( isSigNaNA ) softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ goto copy;
+ }
+ isSigNaNB = f128M_isSignalingNaN( (const float128_t *) bWPtr );
+ if ( isSigNaNA | isSigNaNB ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ if ( isSigNaNA ) {
+ if ( isSigNaNB ) goto returnLargerUIMag;
+ if ( softfloat_isNaNF128M( bWPtr ) ) goto copyB;
+ goto copy;
+ } else {
+ if ( softfloat_isNaNF128M( aWPtr ) ) goto copy;
+ goto copyB;
+ }
+ }
+ returnLargerUIMag:
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ uiB96 = bWPtr[indexWordHi( 4 )];
+ wordMagA = uiA96 & 0x7FFFFFFF;
+ wordMagB = uiB96 & 0x7FFFFFFF;
+ if ( wordMagA < wordMagB ) goto copyB;
+ if ( wordMagB < wordMagA ) goto copy;
+ wordMagA = aWPtr[indexWord( 4, 2 )];
+ wordMagB = bWPtr[indexWord( 4, 2 )];
+ if ( wordMagA < wordMagB ) goto copyB;
+ if ( wordMagB < wordMagA ) goto copy;
+ wordMagA = aWPtr[indexWord( 4, 1 )];
+ wordMagB = bWPtr[indexWord( 4, 1 )];
+ if ( wordMagA < wordMagB ) goto copyB;
+ if ( wordMagB < wordMagA ) goto copy;
+ wordMagA = aWPtr[indexWord( 4, 0 )];
+ wordMagB = bWPtr[indexWord( 4, 0 )];
+ if ( wordMagA < wordMagB ) goto copyB;
+ if ( wordMagB < wordMagA ) goto copy;
+ if ( uiA96 < uiB96 ) goto copy;
+ copyB:
+ ptr = bWPtr;
+ copy:
+ zWPtr[indexWordHi( 4 )] = ptr[indexWordHi( 4 )] | 0x00008000;
+ zWPtr[indexWord( 4, 2 )] = ptr[indexWord( 4, 2 )];
+ zWPtr[indexWord( 4, 1 )] = ptr[indexWord( 4, 1 )];
+ zWPtr[indexWord( 4, 0 )] = ptr[indexWord( 4, 0 )];
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086/s_propagateNaNF128UI.c b/src/libs/softfloat-3e/source/8086/s_propagateNaNF128UI.c
new file mode 100644
index 00000000..fdb30349
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/s_propagateNaNF128UI.c
@@ -0,0 +1,106 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Interpreting the unsigned integer formed from concatenating 'uiA64' and
+| 'uiA0' as a 128-bit floating-point value, and likewise interpreting the
+| unsigned integer formed from concatenating 'uiB64' and 'uiB0' as another
+| 128-bit floating-point value, and assuming at least on of these floating-
+| point values is a NaN, returns the bit pattern of the combined NaN result.
+| If either original floating-point value is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+struct uint128
+ softfloat_propagateNaNF128UI(
+ uint_fast64_t uiA64,
+ uint_fast64_t uiA0,
+ uint_fast64_t uiB64,
+ uint_fast64_t uiB0
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ bool isSigNaNA, isSigNaNB;
+ uint_fast64_t uiNonsigA64, uiNonsigB64, uiMagA64, uiMagB64;
+ struct uint128 uiZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ isSigNaNA = softfloat_isSigNaNF128UI( uiA64, uiA0 );
+ isSigNaNB = softfloat_isSigNaNF128UI( uiB64, uiB0 );
+ /*------------------------------------------------------------------------
+ | Make NaNs non-signaling.
+ *------------------------------------------------------------------------*/
+ uiNonsigA64 = uiA64 | UINT64_C( 0x0000800000000000 );
+ uiNonsigB64 = uiB64 | UINT64_C( 0x0000800000000000 );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( isSigNaNA | isSigNaNB ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ if ( isSigNaNA ) {
+ if ( isSigNaNB ) goto returnLargerMag;
+ if ( isNaNF128UI( uiB64, uiB0 ) ) goto returnB;
+ goto returnA;
+ } else {
+ if ( isNaNF128UI( uiA64, uiA0 ) ) goto returnA;
+ goto returnB;
+ }
+ }
+ returnLargerMag:
+ uiMagA64 = uiA64 & UINT64_C( 0x7FFFFFFFFFFFFFFF );
+ uiMagB64 = uiB64 & UINT64_C( 0x7FFFFFFFFFFFFFFF );
+ if ( uiMagA64 < uiMagB64 ) goto returnB;
+ if ( uiMagB64 < uiMagA64 ) goto returnA;
+ if ( uiA0 < uiB0 ) goto returnB;
+ if ( uiB0 < uiA0 ) goto returnA;
+ if ( uiNonsigA64 < uiNonsigB64 ) goto returnA;
+ returnB:
+ uiZ.v64 = uiNonsigB64;
+ uiZ.v0 = uiB0;
+ return uiZ;
+ returnA:
+ uiZ.v64 = uiNonsigA64;
+ uiZ.v0 = uiA0;
+ return uiZ;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086/s_propagateNaNF16UI.c b/src/libs/softfloat-3e/source/8086/s_propagateNaNF16UI.c
new file mode 100644
index 00000000..f6f82b01
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/s_propagateNaNF16UI.c
@@ -0,0 +1,84 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2018 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Interpreting 'uiA' and 'uiB' as the bit patterns of two 16-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either 'uiA' or 'uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast16_t
+ softfloat_propagateNaNF16UI( uint_fast16_t uiA, uint_fast16_t uiB SOFTFLOAT_STATE_DECL_COMMA )
+{
+ bool isSigNaNA, isSigNaNB;
+ uint_fast16_t uiNonsigA, uiNonsigB, uiMagA, uiMagB;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ isSigNaNA = softfloat_isSigNaNF16UI( uiA );
+ isSigNaNB = softfloat_isSigNaNF16UI( uiB );
+ /*------------------------------------------------------------------------
+ | Make NaNs non-signaling.
+ *------------------------------------------------------------------------*/
+ uiNonsigA = uiA | 0x0200;
+ uiNonsigB = uiB | 0x0200;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( isSigNaNA | isSigNaNB ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ if ( isSigNaNA ) {
+ if ( isSigNaNB ) goto returnLargerMag;
+ return isNaNF16UI( uiB ) ? uiNonsigB : uiNonsigA;
+ } else {
+ return isNaNF16UI( uiA ) ? uiNonsigA : uiNonsigB;
+ }
+ }
+ returnLargerMag:
+ uiMagA = uiA & 0x7FFF;
+ uiMagB = uiB & 0x7FFF;
+ if ( uiMagA < uiMagB ) return uiNonsigB;
+ if ( uiMagB < uiMagA ) return uiNonsigA;
+ return (uiNonsigA < uiNonsigB) ? uiNonsigA : uiNonsigB;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086/s_propagateNaNF32UI.c b/src/libs/softfloat-3e/source/8086/s_propagateNaNF32UI.c
new file mode 100644
index 00000000..772949e0
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/s_propagateNaNF32UI.c
@@ -0,0 +1,84 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Interpreting 'uiA' and 'uiB' as the bit patterns of two 32-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either 'uiA' or 'uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast32_t
+ softfloat_propagateNaNF32UI( uint_fast32_t uiA, uint_fast32_t uiB SOFTFLOAT_STATE_DECL_COMMA )
+{
+ bool isSigNaNA, isSigNaNB;
+ uint_fast32_t uiNonsigA, uiNonsigB, uiMagA, uiMagB;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ isSigNaNA = softfloat_isSigNaNF32UI( uiA );
+ isSigNaNB = softfloat_isSigNaNF32UI( uiB );
+ /*------------------------------------------------------------------------
+ | Make NaNs non-signaling.
+ *------------------------------------------------------------------------*/
+ uiNonsigA = uiA | 0x00400000;
+ uiNonsigB = uiB | 0x00400000;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( isSigNaNA | isSigNaNB ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ if ( isSigNaNA ) {
+ if ( isSigNaNB ) goto returnLargerMag;
+ return isNaNF32UI( uiB ) ? uiNonsigB : uiNonsigA;
+ } else {
+ return isNaNF32UI( uiA ) ? uiNonsigA : uiNonsigB;
+ }
+ }
+ returnLargerMag:
+ uiMagA = uiA & 0x7FFFFFFF;
+ uiMagB = uiB & 0x7FFFFFFF;
+ if ( uiMagA < uiMagB ) return uiNonsigB;
+ if ( uiMagB < uiMagA ) return uiNonsigA;
+ return (uiNonsigA < uiNonsigB) ? uiNonsigA : uiNonsigB;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086/s_propagateNaNF64UI.c b/src/libs/softfloat-3e/source/8086/s_propagateNaNF64UI.c
new file mode 100644
index 00000000..7b11f13d
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/s_propagateNaNF64UI.c
@@ -0,0 +1,84 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Interpreting 'uiA' and 'uiB' as the bit patterns of two 64-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either 'uiA' or 'uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast64_t
+ softfloat_propagateNaNF64UI( uint_fast64_t uiA, uint_fast64_t uiB SOFTFLOAT_STATE_DECL_COMMA )
+{
+ bool isSigNaNA, isSigNaNB;
+ uint_fast64_t uiNonsigA, uiNonsigB, uiMagA, uiMagB;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ isSigNaNA = softfloat_isSigNaNF64UI( uiA );
+ isSigNaNB = softfloat_isSigNaNF64UI( uiB );
+ /*------------------------------------------------------------------------
+ | Make NaNs non-signaling.
+ *------------------------------------------------------------------------*/
+ uiNonsigA = uiA | UINT64_C( 0x0008000000000000 );
+ uiNonsigB = uiB | UINT64_C( 0x0008000000000000 );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( isSigNaNA | isSigNaNB ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ if ( isSigNaNA ) {
+ if ( isSigNaNB ) goto returnLargerMag;
+ return isNaNF64UI( uiB ) ? uiNonsigB : uiNonsigA;
+ } else {
+ return isNaNF64UI( uiA ) ? uiNonsigA : uiNonsigB;
+ }
+ }
+ returnLargerMag:
+ uiMagA = uiA & UINT64_C( 0x7FFFFFFFFFFFFFFF );
+ uiMagB = uiB & UINT64_C( 0x7FFFFFFFFFFFFFFF );
+ if ( uiMagA < uiMagB ) return uiNonsigB;
+ if ( uiMagB < uiMagA ) return uiNonsigA;
+ return (uiNonsigA < uiNonsigB) ? uiNonsigA : uiNonsigB;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086/softfloat_raiseFlags.c b/src/libs/softfloat-3e/source/8086/softfloat_raiseFlags.c
new file mode 100644
index 00000000..64ea08b2
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/softfloat_raiseFlags.c
@@ -0,0 +1,56 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include "platform.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Raises the exceptions specified by `flags'. Floating-point traps can be
+| defined here if desired. It is currently not possible for such a trap
+| to substitute a result value. If traps are not implemented, this routine
+| should be simply `softfloat_exceptionFlags |= flags;'.
+*----------------------------------------------------------------------------*/
+void softfloat_raiseFlags( uint_fast8_t flags SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+#ifdef VBOX_WITHOUT_SOFTFLOAT_GLOBALS
+ softfloat_exceptionFlags |= flags;
+#else
+ pState->exceptionFlags |= flags;
+#endif
+
+}
+
diff --git a/src/libs/softfloat-3e/source/8086/specialize.h b/src/libs/softfloat-3e/source/8086/specialize.h
new file mode 100644
index 00000000..a0f6ba70
--- /dev/null
+++ b/src/libs/softfloat-3e/source/8086/specialize.h
@@ -0,0 +1,379 @@
+
+/*============================================================================
+
+This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2018 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#ifndef specialize_h
+#define specialize_h 1
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "primitiveTypes.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Default value for 'softfloat_detectTininess'.
+*----------------------------------------------------------------------------*/
+#define init_detectTininess softfloat_tininess_afterRounding
+
+/*----------------------------------------------------------------------------
+| The values to return on conversions to 32-bit integer formats that raise an
+| invalid exception.
+*----------------------------------------------------------------------------*/
+#define ui32_fromPosOverflow 0xFFFFFFFF
+#define ui32_fromNegOverflow 0xFFFFFFFF
+#define ui32_fromNaN 0xFFFFFFFF
+#define i32_fromPosOverflow (-0x7FFFFFFF - 1)
+#define i32_fromNegOverflow (-0x7FFFFFFF - 1)
+#define i32_fromNaN (-0x7FFFFFFF - 1)
+
+/*----------------------------------------------------------------------------
+| The values to return on conversions to 64-bit integer formats that raise an
+| invalid exception.
+*----------------------------------------------------------------------------*/
+#define ui64_fromPosOverflow UINT64_C( 0xFFFFFFFFFFFFFFFF )
+#define ui64_fromNegOverflow UINT64_C( 0xFFFFFFFFFFFFFFFF )
+#define ui64_fromNaN UINT64_C( 0xFFFFFFFFFFFFFFFF )
+#define i64_fromPosOverflow (-INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+#define i64_fromNegOverflow (-INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+#define i64_fromNaN (-INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+
+/*----------------------------------------------------------------------------
+| "Common NaN" structure, used to transfer NaN representations from one format
+| to another.
+*----------------------------------------------------------------------------*/
+struct commonNaN {
+ bool sign;
+#ifdef LITTLEENDIAN
+ uint64_t v0, v64;
+#else
+ uint64_t v64, v0;
+#endif
+};
+
+/*----------------------------------------------------------------------------
+| The bit pattern for a default generated 16-bit floating-point NaN.
+*----------------------------------------------------------------------------*/
+#define defaultNaNF16UI 0xFE00
+
+/*----------------------------------------------------------------------------
+| Returns true when 16-bit unsigned integer 'uiA' has the bit pattern of a
+| 16-bit floating-point signaling NaN.
+| Note: This macro evaluates its argument more than once.
+*----------------------------------------------------------------------------*/
+#define softfloat_isSigNaNF16UI( uiA ) ((((uiA) & 0x7E00) == 0x7C00) && ((uiA) & 0x01FF))
+
+/*----------------------------------------------------------------------------
+| Assuming 'uiA' has the bit pattern of a 16-bit floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void softfloat_f16UIToCommonNaN( uint_fast16_t uiA, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 16-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+uint_fast16_t softfloat_commonNaNToF16UI( const struct commonNaN *aPtr );
+
+/*----------------------------------------------------------------------------
+| Interpreting 'uiA' and 'uiB' as the bit patterns of two 16-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either 'uiA' or 'uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast16_t
+ softfloat_propagateNaNF16UI( uint_fast16_t uiA, uint_fast16_t uiB SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| The bit pattern for a default generated 32-bit floating-point NaN.
+*----------------------------------------------------------------------------*/
+#define defaultNaNF32UI 0xFFC00000
+
+/*----------------------------------------------------------------------------
+| Returns true when 32-bit unsigned integer 'uiA' has the bit pattern of a
+| 32-bit floating-point signaling NaN.
+| Note: This macro evaluates its argument more than once.
+*----------------------------------------------------------------------------*/
+#define softfloat_isSigNaNF32UI( uiA ) ((((uiA) & 0x7FC00000) == 0x7F800000) && ((uiA) & 0x003FFFFF))
+
+/*----------------------------------------------------------------------------
+| Assuming 'uiA' has the bit pattern of a 32-bit floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void softfloat_f32UIToCommonNaN( uint_fast32_t uiA, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 32-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+uint_fast32_t softfloat_commonNaNToF32UI( const struct commonNaN *aPtr );
+
+/*----------------------------------------------------------------------------
+| Interpreting 'uiA' and 'uiB' as the bit patterns of two 32-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either 'uiA' or 'uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast32_t
+ softfloat_propagateNaNF32UI( uint_fast32_t uiA, uint_fast32_t uiB SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| The bit pattern for a default generated 64-bit floating-point NaN.
+*----------------------------------------------------------------------------*/
+#define defaultNaNF64UI UINT64_C( 0xFFF8000000000000 )
+
+/*----------------------------------------------------------------------------
+| Returns true when 64-bit unsigned integer 'uiA' has the bit pattern of a
+| 64-bit floating-point signaling NaN.
+| Note: This macro evaluates its argument more than once.
+*----------------------------------------------------------------------------*/
+#define softfloat_isSigNaNF64UI( uiA ) ((((uiA) & UINT64_C( 0x7FF8000000000000 )) == UINT64_C( 0x7FF0000000000000 )) && ((uiA) & UINT64_C( 0x0007FFFFFFFFFFFF )))
+
+/*----------------------------------------------------------------------------
+| Assuming 'uiA' has the bit pattern of a 64-bit floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void softfloat_f64UIToCommonNaN( uint_fast64_t uiA, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 64-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+uint_fast64_t softfloat_commonNaNToF64UI( const struct commonNaN *aPtr );
+
+/*----------------------------------------------------------------------------
+| Interpreting 'uiA' and 'uiB' as the bit patterns of two 64-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either 'uiA' or 'uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast64_t
+ softfloat_propagateNaNF64UI( uint_fast64_t uiA, uint_fast64_t uiB SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| The bit pattern for a default generated 80-bit extended floating-point NaN.
+*----------------------------------------------------------------------------*/
+#define defaultNaNExtF80UI64 0xFFFF
+#define defaultNaNExtF80UI0 UINT64_C( 0xC000000000000000 )
+
+/*----------------------------------------------------------------------------
+| Returns true when the 80-bit unsigned integer formed from concatenating
+| 16-bit 'uiA64' and 64-bit 'uiA0' has the bit pattern of an 80-bit extended
+| floating-point signaling NaN.
+| Note: This macro evaluates its arguments more than once.
+*----------------------------------------------------------------------------*/
+#define softfloat_isSigNaNExtF80UI( uiA64, uiA0 ) ((((uiA64) & 0x7FFF) == 0x7FFF) && ! ((uiA0) & UINT64_C( 0x4000000000000000 )) && ((uiA0) & UINT64_C( 0x3FFFFFFFFFFFFFFF )))
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+/*----------------------------------------------------------------------------
+| The following functions are needed only when 'SOFTFLOAT_FAST_INT64' is
+| defined.
+*----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+| Assuming the unsigned integer formed from concatenating 'uiA64' and 'uiA0'
+| has the bit pattern of an 80-bit extended floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_extF80UIToCommonNaN(
+ uint_fast16_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into an 80-bit extended
+| floating-point NaN, and returns the bit pattern of this value as an unsigned
+| integer.
+*----------------------------------------------------------------------------*/
+struct uint128 softfloat_commonNaNToExtF80UI( const struct commonNaN *aPtr );
+
+/*----------------------------------------------------------------------------
+| Interpreting the unsigned integer formed from concatenating 'uiA64' and
+| 'uiA0' as an 80-bit extended floating-point value, and likewise interpreting
+| the unsigned integer formed from concatenating 'uiB64' and 'uiB0' as another
+| 80-bit extended floating-point value, and assuming at least on of these
+| floating-point values is a NaN, returns the bit pattern of the combined NaN
+| result. If either original floating-point value is a signaling NaN, the
+| invalid exception is raised.
+*----------------------------------------------------------------------------*/
+struct uint128
+ softfloat_propagateNaNExtF80UI(
+ uint_fast16_t uiA64,
+ uint_fast64_t uiA0,
+ uint_fast16_t uiB64,
+ uint_fast64_t uiB0
+ SOFTFLOAT_STATE_DECL_COMMA
+ );
+
+/*----------------------------------------------------------------------------
+| The bit pattern for a default generated 128-bit floating-point NaN.
+*----------------------------------------------------------------------------*/
+#define defaultNaNF128UI64 UINT64_C( 0xFFFF800000000000 )
+#define defaultNaNF128UI0 UINT64_C( 0 )
+
+/*----------------------------------------------------------------------------
+| Returns true when the 128-bit unsigned integer formed from concatenating
+| 64-bit 'uiA64' and 64-bit 'uiA0' has the bit pattern of a 128-bit floating-
+| point signaling NaN.
+| Note: This macro evaluates its arguments more than once.
+*----------------------------------------------------------------------------*/
+#define softfloat_isSigNaNF128UI( uiA64, uiA0 ) ((((uiA64) & UINT64_C( 0x7FFF800000000000 )) == UINT64_C( 0x7FFF000000000000 )) && ((uiA0) || ((uiA64) & UINT64_C( 0x00007FFFFFFFFFFF ))))
+
+/*----------------------------------------------------------------------------
+| Assuming the unsigned integer formed from concatenating 'uiA64' and 'uiA0'
+| has the bit pattern of a 128-bit floating-point NaN, converts this NaN to
+| the common NaN form, and stores the resulting common NaN at the location
+| pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid exception
+| is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_f128UIToCommonNaN(
+ uint_fast64_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 128-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+struct uint128 softfloat_commonNaNToF128UI( const struct commonNaN * );
+
+/*----------------------------------------------------------------------------
+| Interpreting the unsigned integer formed from concatenating 'uiA64' and
+| 'uiA0' as a 128-bit floating-point value, and likewise interpreting the
+| unsigned integer formed from concatenating 'uiB64' and 'uiB0' as another
+| 128-bit floating-point value, and assuming at least on of these floating-
+| point values is a NaN, returns the bit pattern of the combined NaN result.
+| If either original floating-point value is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+struct uint128
+ softfloat_propagateNaNF128UI(
+ uint_fast64_t uiA64,
+ uint_fast64_t uiA0,
+ uint_fast64_t uiB64,
+ uint_fast64_t uiB0
+ SOFTFLOAT_STATE_DECL_COMMA
+ );
+
+#else
+
+/*----------------------------------------------------------------------------
+| The following functions are needed only when 'SOFTFLOAT_FAST_INT64' is not
+| defined.
+*----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+| Assuming the 80-bit extended floating-point value pointed to by 'aSPtr' is
+| a NaN, converts this NaN to the common NaN form, and stores the resulting
+| common NaN at the location pointed to by 'zPtr'. If the NaN is a signaling
+| NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_extF80MToCommonNaN(
+ const struct extFloat80M *aSPtr, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into an 80-bit extended
+| floating-point NaN, and stores this NaN at the location pointed to by
+| 'zSPtr'.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_commonNaNToExtF80M(
+ const struct commonNaN *aPtr, struct extFloat80M *zSPtr );
+
+/*----------------------------------------------------------------------------
+| Assuming at least one of the two 80-bit extended floating-point values
+| pointed to by 'aSPtr' and 'bSPtr' is a NaN, stores the combined NaN result
+| at the location pointed to by 'zSPtr'. If either original floating-point
+| value is a signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_propagateNaNExtF80M(
+ const struct extFloat80M *aSPtr,
+ const struct extFloat80M *bSPtr,
+ struct extFloat80M *zSPtr
+ SOFTFLOAT_STATE_DECL_COMMA
+ );
+
+/*----------------------------------------------------------------------------
+| The bit pattern for a default generated 128-bit floating-point NaN.
+*----------------------------------------------------------------------------*/
+#define defaultNaNF128UI96 0xFFFF8000
+#define defaultNaNF128UI64 0
+#define defaultNaNF128UI32 0
+#define defaultNaNF128UI0 0
+
+/*----------------------------------------------------------------------------
+| Assuming the 128-bit floating-point value pointed to by 'aWPtr' is a NaN,
+| converts this NaN to the common NaN form, and stores the resulting common
+| NaN at the location pointed to by 'zPtr'. If the NaN is a signaling NaN,
+| the invalid exception is raised. Argument 'aWPtr' points to an array of
+| four 32-bit elements that concatenate in the platform's normal endian order
+| to form a 128-bit floating-point value.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_f128MToCommonNaN( const uint32_t *aWPtr, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 128-bit floating-point
+| NaN, and stores this NaN at the location pointed to by 'zWPtr'. Argument
+| 'zWPtr' points to an array of four 32-bit elements that concatenate in the
+| platform's normal endian order to form a 128-bit floating-point value.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_commonNaNToF128M( const struct commonNaN *aPtr, uint32_t *zWPtr );
+
+/*----------------------------------------------------------------------------
+| Assuming at least one of the two 128-bit floating-point values pointed to by
+| 'aWPtr' and 'bWPtr' is a NaN, stores the combined NaN result at the location
+| pointed to by 'zWPtr'. If either original floating-point value is a
+| signaling NaN, the invalid exception is raised. Each of 'aWPtr', 'bWPtr',
+| and 'zWPtr' points to an array of four 32-bit elements that concatenate in
+| the platform's normal endian order to form a 128-bit floating-point value.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_propagateNaNF128M(
+ const uint32_t *aWPtr, const uint32_t *bWPtr, uint32_t *zWPtr SOFTFLOAT_STATE_DECL_COMMA );
+
+#endif
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/extF80M_isSignalingNaN.c b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/extF80M_isSignalingNaN.c
new file mode 100644
index 00000000..c2cca65c
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/extF80M_isSignalingNaN.c
@@ -0,0 +1,57 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+bool extF80M_isSignalingNaN( const extFloat80_t *aPtr )
+{
+ const struct extFloat80M *aSPtr;
+ uint64_t uiA0;
+
+ aSPtr = (const struct extFloat80M *) aPtr;
+ if ( (aSPtr->signExp & 0x7FFF) != 0x7FFF ) return false;
+ uiA0 = aSPtr->signif;
+ return
+ ! (uiA0 & UINT64_C( 0x4000000000000000 ))
+ && (uiA0 & UINT64_C( 0x3FFFFFFFFFFFFFFF));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/f128M_isSignalingNaN.c b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/f128M_isSignalingNaN.c
new file mode 100644
index 00000000..9ff83d72
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/f128M_isSignalingNaN.c
@@ -0,0 +1,60 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+bool f128M_isSignalingNaN( const float128_t *aPtr )
+{
+ const uint32_t *aWPtr;
+ uint32_t uiA96;
+
+ aWPtr = (const uint32_t *) aPtr;
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ if ( (uiA96 & 0x7FFF8000) != 0x7FFF0000 ) return false;
+ return
+ ((uiA96 & 0x00007FFF) != 0)
+ || ((aWPtr[indexWord( 4, 2 )] | aWPtr[indexWord( 4, 1 )]
+ | aWPtr[indexWord( 4, 0 )])
+ != 0);
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToExtF80M.c b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToExtF80M.c
new file mode 100644
index 00000000..2e6bf7c7
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToExtF80M.c
@@ -0,0 +1,57 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include "platform.h"
+#include "softfloat_types.h"
+
+#define softfloat_commonNaNToExtF80M softfloat_commonNaNToExtF80M
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into an 80-bit extended
+| floating-point NaN, and stores this NaN at the location pointed to by
+| 'zSPtr'.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_commonNaNToExtF80M(
+ const struct commonNaN *aPtr, struct extFloat80M *zSPtr )
+{
+
+ zSPtr->signExp = defaultNaNExtF80UI64;
+ zSPtr->signif = defaultNaNExtF80UI0;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToExtF80UI.c b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToExtF80UI.c
new file mode 100644
index 00000000..e37004f7
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToExtF80UI.c
@@ -0,0 +1,57 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#define softfloat_commonNaNToExtF80UI softfloat_commonNaNToExtF80UI
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into an 80-bit extended
+| floating-point NaN, and returns the bit pattern of this value as an unsigned
+| integer.
+*----------------------------------------------------------------------------*/
+struct uint128 softfloat_commonNaNToExtF80UI( const struct commonNaN *aPtr )
+{
+ struct uint128 uiZ;
+
+ uiZ.v64 = defaultNaNExtF80UI64;
+ uiZ.v0 = defaultNaNExtF80UI0;
+ return uiZ;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToF128M.c b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToF128M.c
new file mode 100644
index 00000000..2ff4c163
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToF128M.c
@@ -0,0 +1,60 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#define softfloat_commonNaNToF128M softfloat_commonNaNToF128M
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 128-bit floating-point
+| NaN, and stores this NaN at the location pointed to by 'zWPtr'. Argument
+| 'zWPtr' points to an array of four 32-bit elements that concatenate in the
+| platform's normal endian order to form a 128-bit floating-point value.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_commonNaNToF128M( const struct commonNaN *aPtr, uint32_t *zWPtr )
+{
+
+ zWPtr[indexWord( 4, 3 )] = defaultNaNF128UI96;
+ zWPtr[indexWord( 4, 2 )] = defaultNaNF128UI64;
+ zWPtr[indexWord( 4, 1 )] = defaultNaNF128UI32;
+ zWPtr[indexWord( 4, 0 )] = defaultNaNF128UI0;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToF128UI.c b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToF128UI.c
new file mode 100644
index 00000000..05dfb5f1
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToF128UI.c
@@ -0,0 +1,56 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#define softfloat_commonNaNToF128UI softfloat_commonNaNToF128UI
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 128-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+struct uint128 softfloat_commonNaNToF128UI( const struct commonNaN *aPtr )
+{
+ struct uint128 uiZ;
+
+ uiZ.v64 = defaultNaNF128UI64;
+ uiZ.v0 = defaultNaNF128UI0;
+ return uiZ;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToF16UI.c b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToF16UI.c
new file mode 100644
index 00000000..861b2696
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToF16UI.c
@@ -0,0 +1,5 @@
+
+/*----------------------------------------------------------------------------
+| This file intentionally contains no code.
+*----------------------------------------------------------------------------*/
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToF32UI.c b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToF32UI.c
new file mode 100644
index 00000000..861b2696
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToF32UI.c
@@ -0,0 +1,5 @@
+
+/*----------------------------------------------------------------------------
+| This file intentionally contains no code.
+*----------------------------------------------------------------------------*/
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToF64UI.c b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToF64UI.c
new file mode 100644
index 00000000..861b2696
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_commonNaNToF64UI.c
@@ -0,0 +1,5 @@
+
+/*----------------------------------------------------------------------------
+| This file intentionally contains no code.
+*----------------------------------------------------------------------------*/
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_extF80MToCommonNaN.c b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_extF80MToCommonNaN.c
new file mode 100644
index 00000000..861b2696
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_extF80MToCommonNaN.c
@@ -0,0 +1,5 @@
+
+/*----------------------------------------------------------------------------
+| This file intentionally contains no code.
+*----------------------------------------------------------------------------*/
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_extF80UIToCommonNaN.c b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_extF80UIToCommonNaN.c
new file mode 100644
index 00000000..861b2696
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_extF80UIToCommonNaN.c
@@ -0,0 +1,5 @@
+
+/*----------------------------------------------------------------------------
+| This file intentionally contains no code.
+*----------------------------------------------------------------------------*/
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_f128MToCommonNaN.c b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_f128MToCommonNaN.c
new file mode 100644
index 00000000..861b2696
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_f128MToCommonNaN.c
@@ -0,0 +1,5 @@
+
+/*----------------------------------------------------------------------------
+| This file intentionally contains no code.
+*----------------------------------------------------------------------------*/
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_f128UIToCommonNaN.c b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_f128UIToCommonNaN.c
new file mode 100644
index 00000000..861b2696
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_f128UIToCommonNaN.c
@@ -0,0 +1,5 @@
+
+/*----------------------------------------------------------------------------
+| This file intentionally contains no code.
+*----------------------------------------------------------------------------*/
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_f16UIToCommonNaN.c b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_f16UIToCommonNaN.c
new file mode 100644
index 00000000..861b2696
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_f16UIToCommonNaN.c
@@ -0,0 +1,5 @@
+
+/*----------------------------------------------------------------------------
+| This file intentionally contains no code.
+*----------------------------------------------------------------------------*/
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_f32UIToCommonNaN.c b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_f32UIToCommonNaN.c
new file mode 100644
index 00000000..861b2696
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_f32UIToCommonNaN.c
@@ -0,0 +1,5 @@
+
+/*----------------------------------------------------------------------------
+| This file intentionally contains no code.
+*----------------------------------------------------------------------------*/
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_f64UIToCommonNaN.c b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_f64UIToCommonNaN.c
new file mode 100644
index 00000000..861b2696
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_f64UIToCommonNaN.c
@@ -0,0 +1,5 @@
+
+/*----------------------------------------------------------------------------
+| This file intentionally contains no code.
+*----------------------------------------------------------------------------*/
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNExtF80M.c b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNExtF80M.c
new file mode 100644
index 00000000..b2742a43
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNExtF80M.c
@@ -0,0 +1,75 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming at least one of the two 80-bit extended floating-point values
+| pointed to by 'aSPtr' and 'bSPtr' is a NaN, stores the combined NaN result
+| at the location pointed to by 'zSPtr'. If either original floating-point
+| value is a signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_propagateNaNExtF80M(
+ const struct extFloat80M *aSPtr,
+ const struct extFloat80M *bSPtr,
+ struct extFloat80M *zSPtr
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ uint_fast16_t ui64;
+ uint_fast64_t ui0;
+
+ ui64 = aSPtr->signExp;
+ ui0 = aSPtr->signif;
+ if (
+ softfloat_isSigNaNExtF80UI( ui64, ui0 )
+ || (bSPtr
+ && (ui64 = bSPtr->signExp,
+ ui0 = bSPtr->signif,
+ softfloat_isSigNaNExtF80UI( ui64, ui0 )))
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ zSPtr->signExp = defaultNaNExtF80UI64;
+ zSPtr->signif = defaultNaNExtF80UI0;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNExtF80UI.c b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNExtF80UI.c
new file mode 100644
index 00000000..3418bbdd
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNExtF80UI.c
@@ -0,0 +1,74 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Interpreting the unsigned integer formed from concatenating 'uiA64' and
+| 'uiA0' as an 80-bit extended floating-point value, and likewise interpreting
+| the unsigned integer formed from concatenating 'uiB64' and 'uiB0' as another
+| 80-bit extended floating-point value, and assuming at least on of these
+| floating-point values is a NaN, returns the bit pattern of the combined NaN
+| result. If either original floating-point value is a signaling NaN, the
+| invalid exception is raised.
+*----------------------------------------------------------------------------*/
+struct uint128
+ softfloat_propagateNaNExtF80UI(
+ uint_fast16_t uiA64,
+ uint_fast64_t uiA0,
+ uint_fast16_t uiB64,
+ uint_fast64_t uiB0
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ struct uint128 uiZ;
+
+ if (
+ softfloat_isSigNaNExtF80UI( uiA64, uiA0 )
+ || softfloat_isSigNaNExtF80UI( uiB64, uiB0 )
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ uiZ.v64 = defaultNaNExtF80UI64;
+ uiZ.v0 = defaultNaNExtF80UI0;
+ return uiZ;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNF128M.c b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNF128M.c
new file mode 100644
index 00000000..2c963701
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNF128M.c
@@ -0,0 +1,68 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming at least one of the two 128-bit floating-point values pointed to by
+| 'aWPtr' and 'bWPtr' is a NaN, stores the combined NaN result at the location
+| pointed to by 'zWPtr'. If either original floating-point value is a
+| signaling NaN, the invalid exception is raised. Each of 'aWPtr', 'bWPtr',
+| and 'zWPtr' points to an array of four 32-bit elements that concatenate in
+| the platform's normal endian order to form a 128-bit floating-point value.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_propagateNaNF128M(
+ const uint32_t *aWPtr, const uint32_t *bWPtr, uint32_t *zWPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ if (
+ f128M_isSignalingNaN( (const float128_t *) aWPtr );
+ || (bWPtr && f128M_isSignalingNaN( (const float128_t *) bWPtr ))
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ zWPtr[indexWord( 4, 3 )] = defaultNaNF128UI96;
+ zWPtr[indexWord( 4, 2 )] = defaultNaNF128UI64;
+ zWPtr[indexWord( 4, 1 )] = defaultNaNF128UI32;
+ zWPtr[indexWord( 4, 0 )] = defaultNaNF128UI0;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNF128UI.c b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNF128UI.c
new file mode 100644
index 00000000..7a9916ea
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNF128UI.c
@@ -0,0 +1,74 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Interpreting the unsigned integer formed from concatenating 'uiA64' and
+| 'uiA0' as a 128-bit floating-point value, and likewise interpreting the
+| unsigned integer formed from concatenating 'uiB64' and 'uiB0' as another
+| 128-bit floating-point value, and assuming at least on of these floating-
+| point values is a NaN, returns the bit pattern of the combined NaN result.
+| If either original floating-point value is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+struct uint128
+ softfloat_propagateNaNF128UI(
+ uint_fast64_t uiA64,
+ uint_fast64_t uiA0,
+ uint_fast64_t uiB64,
+ uint_fast64_t uiB0
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ struct uint128 uiZ;
+
+ if (
+ softfloat_isSigNaNF128UI( uiA64, uiA0 )
+ || softfloat_isSigNaNF128UI( uiB64, uiB0 )
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ uiZ.v64 = defaultNaNF128UI64;
+ uiZ.v0 = defaultNaNF128UI0;
+ return uiZ;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNF16UI.c b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNF16UI.c
new file mode 100644
index 00000000..dc6af83e
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNF16UI.c
@@ -0,0 +1,58 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Interpreting 'uiA' and 'uiB' as the bit patterns of two 16-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either 'uiA' or 'uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast16_t
+ softfloat_propagateNaNF16UI( uint_fast16_t uiA, uint_fast16_t uiB SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ if ( softfloat_isSigNaNF16UI( uiA ) || softfloat_isSigNaNF16UI( uiB ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ return defaultNaNF16UI;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNF32UI.c b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNF32UI.c
new file mode 100644
index 00000000..bde082a2
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNF32UI.c
@@ -0,0 +1,58 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Interpreting 'uiA' and 'uiB' as the bit patterns of two 32-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either 'uiA' or 'uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast32_t
+ softfloat_propagateNaNF32UI( uint_fast32_t uiA, uint_fast32_t uiB SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ if ( softfloat_isSigNaNF32UI( uiA ) || softfloat_isSigNaNF32UI( uiB ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ return defaultNaNF32UI;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNF64UI.c b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNF64UI.c
new file mode 100644
index 00000000..251ff36a
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/s_propagateNaNF64UI.c
@@ -0,0 +1,58 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Interpreting 'uiA' and 'uiB' as the bit patterns of two 64-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either 'uiA' or 'uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast64_t
+ softfloat_propagateNaNF64UI( uint_fast64_t uiA, uint_fast64_t uiB SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ if ( softfloat_isSigNaNF64UI( uiA ) || softfloat_isSigNaNF64UI( uiB ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ return defaultNaNF64UI;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/softfloat_raiseFlags.c b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/softfloat_raiseFlags.c
new file mode 100644
index 00000000..5b0d2a92
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/softfloat_raiseFlags.c
@@ -0,0 +1,56 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include "platform.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Raises the exceptions specified by 'flags'. Floating-point traps can be
+| defined here if desired. It is currently not possible for such a trap
+| to substitute a result value. If traps are not implemented, this routine
+| should be simply 'softfloat_exceptionFlags |= flags;'.
+*----------------------------------------------------------------------------*/
+void softfloat_raiseFlags( uint_fast8_t flags SOFTFLOAT_STATE_ARG_COMMA )
+{
+
+#ifdef VBOX_WITHOUT_SOFTFLOAT_GLOBALS
+ softfloat_exceptionFlags |= flags;
+#else
+ pState->exceptionFlags |= flags;
+#endif
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/specialize.h b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/specialize.h
new file mode 100644
index 00000000..7079c953
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2-defaultNaN/specialize.h
@@ -0,0 +1,438 @@
+
+/*============================================================================
+
+This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#ifndef specialize_h
+#define specialize_h 1
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "primitiveTypes.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Default value for 'softfloat_detectTininess'.
+*----------------------------------------------------------------------------*/
+#define init_detectTininess softfloat_tininess_beforeRounding
+
+/*----------------------------------------------------------------------------
+| The values to return on conversions to 32-bit integer formats that raise an
+| invalid exception.
+*----------------------------------------------------------------------------*/
+#define ui32_fromPosOverflow 0xFFFFFFFF
+#define ui32_fromNegOverflow 0
+#define ui32_fromNaN 0
+#define i32_fromPosOverflow 0x7FFFFFFF
+#define i32_fromNegOverflow (-0x7FFFFFFF - 1)
+#define i32_fromNaN 0
+
+/*----------------------------------------------------------------------------
+| The values to return on conversions to 64-bit integer formats that raise an
+| invalid exception.
+*----------------------------------------------------------------------------*/
+#define ui64_fromPosOverflow UINT64_C( 0xFFFFFFFFFFFFFFFF )
+#define ui64_fromNegOverflow 0
+#define ui64_fromNaN 0
+#define i64_fromPosOverflow INT64_C( 0x7FFFFFFFFFFFFFFF )
+#define i64_fromNegOverflow (-INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+#define i64_fromNaN 0
+
+/*----------------------------------------------------------------------------
+| "Common NaN" structure, used to transfer NaN representations from one format
+| to another.
+*----------------------------------------------------------------------------*/
+struct commonNaN { char _unused; };
+
+/*----------------------------------------------------------------------------
+| The bit pattern for a default generated 16-bit floating-point NaN.
+*----------------------------------------------------------------------------*/
+#define defaultNaNF16UI 0x7E00
+
+/*----------------------------------------------------------------------------
+| Returns true when 16-bit unsigned integer 'uiA' has the bit pattern of a
+| 16-bit floating-point signaling NaN.
+| Note: This macro evaluates its argument more than once.
+*----------------------------------------------------------------------------*/
+#define softfloat_isSigNaNF16UI( uiA ) ((((uiA) & 0x7E00) == 0x7C00) && ((uiA) & 0x01FF))
+
+/*----------------------------------------------------------------------------
+| Assuming 'uiA' has the bit pattern of a 16-bit floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+#ifdef VBOX_WITHOUT_SOFTFLOAT_GLOBALS
+#define softfloat_f16UIToCommonNaN( uiA, zPtr ) if ( ! ((uiA) & 0x0200) ) softfloat_raiseFlags( softfloat_flag_invalid )
+#else
+# define softfloat_f16UIToCommonNaN( uiA, zPtr, pState ) if ( ! ((uiA) & 0x0200) ) softfloat_raiseFlags( softfloat_flag_invalid, pState )
+#endif
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 16-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+#define softfloat_commonNaNToF16UI( aPtr ) ((uint_fast16_t) defaultNaNF16UI)
+
+/*----------------------------------------------------------------------------
+| Interpreting 'uiA' and 'uiB' as the bit patterns of two 16-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either 'uiA' or 'uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast16_t
+ softfloat_propagateNaNF16UI( uint_fast16_t uiA, uint_fast16_t uiB SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| The bit pattern for a default generated 32-bit floating-point NaN.
+*----------------------------------------------------------------------------*/
+#define defaultNaNF32UI 0x7FC00000
+
+/*----------------------------------------------------------------------------
+| Returns true when 32-bit unsigned integer 'uiA' has the bit pattern of a
+| 32-bit floating-point signaling NaN.
+| Note: This macro evaluates its argument more than once.
+*----------------------------------------------------------------------------*/
+#define softfloat_isSigNaNF32UI( uiA ) ((((uiA) & 0x7FC00000) == 0x7F800000) && ((uiA) & 0x003FFFFF))
+
+/*----------------------------------------------------------------------------
+| Assuming 'uiA' has the bit pattern of a 32-bit floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+#ifdef VBOX_WITHOUT_SOFTFLOAT_GLOBALS
+#define softfloat_f32UIToCommonNaN( uiA, zPtr ) if ( ! ((uiA) & 0x00400000) ) softfloat_raiseFlags( softfloat_flag_invalid )
+#else
+# define softfloat_f32UIToCommonNaN( uiA, zPtr, pState ) if ( ! ((uiA) & 0x00400000) ) softfloat_raiseFlags( softfloat_flag_invalid, pState )
+#endif
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 32-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+#define softfloat_commonNaNToF32UI( aPtr ) ((uint_fast32_t) defaultNaNF32UI)
+
+/*----------------------------------------------------------------------------
+| Interpreting 'uiA' and 'uiB' as the bit patterns of two 32-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either 'uiA' or 'uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast32_t
+ softfloat_propagateNaNF32UI( uint_fast32_t uiA, uint_fast32_t uiB SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| The bit pattern for a default generated 64-bit floating-point NaN.
+*----------------------------------------------------------------------------*/
+#define defaultNaNF64UI UINT64_C( 0x7FF8000000000000 )
+
+/*----------------------------------------------------------------------------
+| Returns true when 64-bit unsigned integer 'uiA' has the bit pattern of a
+| 64-bit floating-point signaling NaN.
+| Note: This macro evaluates its argument more than once.
+*----------------------------------------------------------------------------*/
+#define softfloat_isSigNaNF64UI( uiA ) ((((uiA) & UINT64_C( 0x7FF8000000000000 )) == UINT64_C( 0x7FF0000000000000 )) && ((uiA) & UINT64_C( 0x0007FFFFFFFFFFFF )))
+
+/*----------------------------------------------------------------------------
+| Assuming 'uiA' has the bit pattern of a 64-bit floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+#ifdef VBOX_WITHOUT_SOFTFLOAT_GLOBALS
+#define softfloat_f64UIToCommonNaN( uiA, zPtr ) if ( ! ((uiA) & UINT64_C( 0x0008000000000000 )) ) softfloat_raiseFlags( softfloat_flag_invalid )
+#else
+# define softfloat_f64UIToCommonNaN( uiA, zPtr, pState ) if ( ! ((uiA) & UINT64_C( 0x0008000000000000 )) ) softfloat_raiseFlags( softfloat_flag_invalid, pState )
+#endif
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 64-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+#define softfloat_commonNaNToF64UI( aPtr ) ((uint_fast64_t) defaultNaNF64UI)
+
+/*----------------------------------------------------------------------------
+| Interpreting 'uiA' and 'uiB' as the bit patterns of two 64-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either 'uiA' or 'uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast64_t
+ softfloat_propagateNaNF64UI( uint_fast64_t uiA, uint_fast64_t uiB SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| The bit pattern for a default generated 80-bit extended floating-point NaN.
+*----------------------------------------------------------------------------*/
+#define defaultNaNExtF80UI64 0x7FFF
+#define defaultNaNExtF80UI0 UINT64_C( 0xC000000000000000 )
+
+/*----------------------------------------------------------------------------
+| Returns true when the 80-bit unsigned integer formed from concatenating
+| 16-bit 'uiA64' and 64-bit 'uiA0' has the bit pattern of an 80-bit extended
+| floating-point signaling NaN.
+| Note: This macro evaluates its arguments more than once.
+*----------------------------------------------------------------------------*/
+#define softfloat_isSigNaNExtF80UI( uiA64, uiA0 ) ((((uiA64) & 0x7FFF) == 0x7FFF) && ! ((uiA0) & UINT64_C( 0x4000000000000000 )) && ((uiA0) & UINT64_C( 0x3FFFFFFFFFFFFFFF )))
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+/*----------------------------------------------------------------------------
+| The following functions are needed only when 'SOFTFLOAT_FAST_INT64' is
+| defined.
+*----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+| Assuming the unsigned integer formed from concatenating 'uiA64' and 'uiA0'
+| has the bit pattern of an 80-bit extended floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+#ifdef VBOX_WITHOUT_SOFTFLOAT_GLOBALS
+#define softfloat_extF80UIToCommonNaN( uiA64, uiA0, zPtr ) if ( ! ((uiA0) & UINT64_C( 0x4000000000000000 )) ) softfloat_raiseFlags( softfloat_flag_invalid )
+#else
+# define softfloat_extF80UIToCommonNaN( uiA64, uiA0, zPtr, pState ) if ( ! ((uiA0) & UINT64_C( 0x4000000000000000 )) ) softfloat_raiseFlags( softfloat_flag_invalid, pState )
+#endif
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into an 80-bit extended
+| floating-point NaN, and returns the bit pattern of this value as an unsigned
+| integer.
+*----------------------------------------------------------------------------*/
+#if defined INLINE && ! defined softfloat_commonNaNToExtF80UI
+INLINE
+struct uint128 softfloat_commonNaNToExtF80UI( const struct commonNaN *aPtr )
+{
+ struct uint128 uiZ;
+ uiZ.v64 = defaultNaNExtF80UI64;
+ uiZ.v0 = defaultNaNExtF80UI0;
+ return uiZ;
+}
+#else
+struct uint128 softfloat_commonNaNToExtF80UI( const struct commonNaN *aPtr );
+#endif
+
+/*----------------------------------------------------------------------------
+| Interpreting the unsigned integer formed from concatenating 'uiA64' and
+| 'uiA0' as an 80-bit extended floating-point value, and likewise interpreting
+| the unsigned integer formed from concatenating 'uiB64' and 'uiB0' as another
+| 80-bit extended floating-point value, and assuming at least on of these
+| floating-point values is a NaN, returns the bit pattern of the combined NaN
+| result. If either original floating-point value is a signaling NaN, the
+| invalid exception is raised.
+*----------------------------------------------------------------------------*/
+struct uint128
+ softfloat_propagateNaNExtF80UI(
+ uint_fast16_t uiA64,
+ uint_fast64_t uiA0,
+ uint_fast16_t uiB64,
+ uint_fast64_t uiB0
+ SOFTFLOAT_STATE_DECL_COMMA
+ );
+
+/*----------------------------------------------------------------------------
+| The bit pattern for a default generated 128-bit floating-point NaN.
+*----------------------------------------------------------------------------*/
+#define defaultNaNF128UI64 UINT64_C( 0x7FFF800000000000 )
+#define defaultNaNF128UI0 UINT64_C( 0 )
+
+/*----------------------------------------------------------------------------
+| Returns true when the 128-bit unsigned integer formed from concatenating
+| 64-bit 'uiA64' and 64-bit 'uiA0' has the bit pattern of a 128-bit floating-
+| point signaling NaN.
+| Note: This macro evaluates its arguments more than once.
+*----------------------------------------------------------------------------*/
+#define softfloat_isSigNaNF128UI( uiA64, uiA0 ) ((((uiA64) & UINT64_C( 0x7FFF800000000000 )) == UINT64_C( 0x7FFF000000000000 )) && ((uiA0) || ((uiA64) & UINT64_C( 0x00007FFFFFFFFFFF ))))
+
+/*----------------------------------------------------------------------------
+| Assuming the unsigned integer formed from concatenating 'uiA64' and 'uiA0'
+| has the bit pattern of a 128-bit floating-point NaN, converts this NaN to
+| the common NaN form, and stores the resulting common NaN at the location
+| pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid exception
+| is raised.
+*----------------------------------------------------------------------------*/
+#ifdef VBOX_WITHOUT_SOFTFLOAT_GLOBALS
+#define softfloat_f128UIToCommonNaN( uiA64, uiA0, zPtr ) if ( ! ((uiA64) & UINT64_C( 0x0000800000000000 )) ) softfloat_raiseFlags( softfloat_flag_invalid )
+#else
+# define softfloat_f128UIToCommonNaN( uiA64, uiA0, zPtr, pState ) if ( ! ((uiA64) & UINT64_C( 0x0000800000000000 )) ) softfloat_raiseFlags( softfloat_flag_invalid, pState)
+#endif
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 128-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+#if defined INLINE && ! defined softfloat_commonNaNToF128UI
+INLINE
+struct uint128 softfloat_commonNaNToF128UI( const struct commonNaN *aPtr )
+{
+ struct uint128 uiZ;
+ uiZ.v64 = defaultNaNF128UI64;
+ uiZ.v0 = defaultNaNF128UI0;
+ return uiZ;
+}
+#else
+struct uint128 softfloat_commonNaNToF128UI( const struct commonNaN * );
+#endif
+
+/*----------------------------------------------------------------------------
+| Interpreting the unsigned integer formed from concatenating 'uiA64' and
+| 'uiA0' as a 128-bit floating-point value, and likewise interpreting the
+| unsigned integer formed from concatenating 'uiB64' and 'uiB0' as another
+| 128-bit floating-point value, and assuming at least on of these floating-
+| point values is a NaN, returns the bit pattern of the combined NaN result.
+| If either original floating-point value is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+struct uint128
+ softfloat_propagateNaNF128UI(
+ uint_fast64_t uiA64,
+ uint_fast64_t uiA0,
+ uint_fast64_t uiB64,
+ uint_fast64_t uiB0
+ SOFTFLOAT_STATE_DECL_COMMA
+ );
+
+#else
+
+/*----------------------------------------------------------------------------
+| The following functions are needed only when 'SOFTFLOAT_FAST_INT64' is not
+| defined.
+*----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+| Assuming the 80-bit extended floating-point value pointed to by 'aSPtr' is
+| a NaN, converts this NaN to the common NaN form, and stores the resulting
+| common NaN at the location pointed to by 'zPtr'. If the NaN is a signaling
+| NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+#ifdef VBOX_WITHOUT_SOFTFLOAT_GLOBALS
+#define softfloat_extF80MToCommonNaN( aSPtr, zPtr ) if ( ! ((aSPtr)->signif & UINT64_C( 0x4000000000000000 )) ) softfloat_raiseFlags( softfloat_flag_invalid )
+#else
+# define softfloat_extF80MToCommonNaN( aSPtr, zPtr, pState ) if ( ! ((aSPtr)->signif & UINT64_C( 0x4000000000000000 )) ) softfloat_raiseFlags( softfloat_flag_invalid, pState )
+#endif
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into an 80-bit extended
+| floating-point NaN, and stores this NaN at the location pointed to by
+| 'zSPtr'.
+*----------------------------------------------------------------------------*/
+#if defined INLINE && ! defined softfloat_commonNaNToExtF80M
+INLINE
+void
+ softfloat_commonNaNToExtF80M(
+ const struct commonNaN *aPtr, struct extFloat80M *zSPtr )
+{
+ zSPtr->signExp = defaultNaNExtF80UI64;
+ zSPtr->signif = defaultNaNExtF80UI0;
+}
+#else
+void
+ softfloat_commonNaNToExtF80M(
+ const struct commonNaN *aPtr, struct extFloat80M *zSPtr );
+#endif
+
+/*----------------------------------------------------------------------------
+| Assuming at least one of the two 80-bit extended floating-point values
+| pointed to by 'aSPtr' and 'bSPtr' is a NaN, stores the combined NaN result
+| at the location pointed to by 'zSPtr'. If either original floating-point
+| value is a signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_propagateNaNExtF80M(
+ const struct extFloat80M *aSPtr,
+ const struct extFloat80M *bSPtr,
+ struct extFloat80M *zSPtr
+ SOFTFLOAT_STATE_DECL_COMMA
+ );
+
+/*----------------------------------------------------------------------------
+| The bit pattern for a default generated 128-bit floating-point NaN.
+*----------------------------------------------------------------------------*/
+#define defaultNaNF128UI96 0x7FFF8000
+#define defaultNaNF128UI64 0
+#define defaultNaNF128UI32 0
+#define defaultNaNF128UI0 0
+
+/*----------------------------------------------------------------------------
+| Assuming the 128-bit floating-point value pointed to by 'aWPtr' is a NaN,
+| converts this NaN to the common NaN form, and stores the resulting common
+| NaN at the location pointed to by 'zPtr'. If the NaN is a signaling NaN,
+| the invalid exception is raised. Argument 'aWPtr' points to an array of
+| four 32-bit elements that concatenate in the platform's normal endian order
+| to form a 128-bit floating-point value.
+*----------------------------------------------------------------------------*/
+#ifdef VBOX_WITHOUT_SOFTFLOAT_GLOBALS
+#define softfloat_f128MToCommonNaN( aWPtr, zPtr ) if ( ! ((aWPtr)[indexWordHi( 4 )] & UINT64_C( 0x0000800000000000 )) ) softfloat_raiseFlags( softfloat_flag_invalid )
+#else
+# define softfloat_f128MToCommonNaN( aWPtr, zPtr ) if ( ! ((aWPtr)[indexWordHi( 4 )] & UINT64_C( 0x0000800000000000 )) ) softfloat_raiseFlags( softfloat_flag_invalid, pState )
+#endif
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 128-bit floating-point
+| NaN, and stores this NaN at the location pointed to by 'zWPtr'. Argument
+| 'zWPtr' points to an array of four 32-bit elements that concatenate in the
+| platform's normal endian order to form a 128-bit floating-point value.
+*----------------------------------------------------------------------------*/
+#if defined INLINE && ! defined softfloat_commonNaNToF128M
+INLINE
+void
+ softfloat_commonNaNToF128M( const struct commonNaN *aPtr, uint32_t *zWPtr )
+{
+ zWPtr[indexWord( 4, 3 )] = defaultNaNF128UI96;
+ zWPtr[indexWord( 4, 2 )] = defaultNaNF128UI64;
+ zWPtr[indexWord( 4, 1 )] = defaultNaNF128UI32;
+ zWPtr[indexWord( 4, 0 )] = defaultNaNF128UI0;
+}
+#else
+void
+ softfloat_commonNaNToF128M( const struct commonNaN *aPtr, uint32_t *zWPtr );
+#endif
+
+/*----------------------------------------------------------------------------
+| Assuming at least one of the two 128-bit floating-point values pointed to by
+| 'aWPtr' and 'bWPtr' is a NaN, stores the combined NaN result at the location
+| pointed to by 'zWPtr'. If either original floating-point value is a
+| signaling NaN, the invalid exception is raised. Each of 'aWPtr', 'bWPtr',
+| and 'zWPtr' points to an array of four 32-bit elements that concatenate in
+| the platform's normal endian order to form a 128-bit floating-point value.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_propagateNaNF128M(
+ const uint32_t *aWPtr, const uint32_t *bWPtr, uint32_t *zWPtr SOFTFLOAT_STATE_DECL_COMMA );
+
+#endif
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2/extF80M_isSignalingNaN.c b/src/libs/softfloat-3e/source/ARM-VFPv2/extF80M_isSignalingNaN.c
new file mode 100644
index 00000000..c2cca65c
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2/extF80M_isSignalingNaN.c
@@ -0,0 +1,57 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+bool extF80M_isSignalingNaN( const extFloat80_t *aPtr )
+{
+ const struct extFloat80M *aSPtr;
+ uint64_t uiA0;
+
+ aSPtr = (const struct extFloat80M *) aPtr;
+ if ( (aSPtr->signExp & 0x7FFF) != 0x7FFF ) return false;
+ uiA0 = aSPtr->signif;
+ return
+ ! (uiA0 & UINT64_C( 0x4000000000000000 ))
+ && (uiA0 & UINT64_C( 0x3FFFFFFFFFFFFFFF));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2/f128M_isSignalingNaN.c b/src/libs/softfloat-3e/source/ARM-VFPv2/f128M_isSignalingNaN.c
new file mode 100644
index 00000000..9ff83d72
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2/f128M_isSignalingNaN.c
@@ -0,0 +1,60 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+bool f128M_isSignalingNaN( const float128_t *aPtr )
+{
+ const uint32_t *aWPtr;
+ uint32_t uiA96;
+
+ aWPtr = (const uint32_t *) aPtr;
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ if ( (uiA96 & 0x7FFF8000) != 0x7FFF0000 ) return false;
+ return
+ ((uiA96 & 0x00007FFF) != 0)
+ || ((aWPtr[indexWord( 4, 2 )] | aWPtr[indexWord( 4, 1 )]
+ | aWPtr[indexWord( 4, 0 )])
+ != 0);
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToExtF80M.c b/src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToExtF80M.c
new file mode 100644
index 00000000..6bb922a1
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToExtF80M.c
@@ -0,0 +1,56 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into an 80-bit extended
+| floating-point NaN, and stores this NaN at the location pointed to by
+| 'zSPtr'.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_commonNaNToExtF80M(
+ const struct commonNaN *aPtr, struct extFloat80M *zSPtr )
+{
+
+ zSPtr->signExp = packToExtF80UI64( aPtr->sign, 0x7FFF );
+ zSPtr->signif = UINT64_C( 0xC000000000000000 ) | aPtr->v64>>1;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToExtF80UI.c b/src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToExtF80UI.c
new file mode 100644
index 00000000..5e841b25
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToExtF80UI.c
@@ -0,0 +1,56 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into an 80-bit extended
+| floating-point NaN, and returns the bit pattern of this value as an unsigned
+| integer.
+*----------------------------------------------------------------------------*/
+struct uint128 softfloat_commonNaNToExtF80UI( const struct commonNaN *aPtr )
+{
+ struct uint128 uiZ;
+
+ uiZ.v64 = (uint_fast16_t) aPtr->sign<<15 | 0x7FFF;
+ uiZ.v0 = UINT64_C( 0xC000000000000000 ) | aPtr->v64>>1;
+ return uiZ;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToF128M.c b/src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToF128M.c
new file mode 100644
index 00000000..02e23485
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToF128M.c
@@ -0,0 +1,56 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 128-bit floating-point
+| NaN, and stores this NaN at the location pointed to by 'zWPtr'. Argument
+| 'zWPtr' points to an array of four 32-bit elements that concatenate in the
+| platform's normal endian order to form a 128-bit floating-point value.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_commonNaNToF128M( const struct commonNaN *aPtr, uint32_t *zWPtr )
+{
+
+ softfloat_shortShiftRight128M( (const uint32_t *) &aPtr->v0, 16, zWPtr );
+ zWPtr[indexWordHi( 4 )] |= (uint32_t) aPtr->sign<<31 | 0x7FFF8000;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToF128UI.c b/src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToF128UI.c
new file mode 100644
index 00000000..fa87d75f
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToF128UI.c
@@ -0,0 +1,55 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 128-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+struct uint128 softfloat_commonNaNToF128UI( const struct commonNaN *aPtr )
+{
+ struct uint128 uiZ;
+
+ uiZ = softfloat_shortShiftRight128( aPtr->v64, aPtr->v0, 16 );
+ uiZ.v64 |= (uint_fast64_t) aPtr->sign<<63 | UINT64_C( 0x7FFF800000000000 );
+ return uiZ;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToF16UI.c b/src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToF16UI.c
new file mode 100644
index 00000000..6d5bf9ab
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToF16UI.c
@@ -0,0 +1,51 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 16-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+uint_fast16_t softfloat_commonNaNToF16UI( const struct commonNaN *aPtr )
+{
+
+ return (uint_fast16_t) aPtr->sign<<15 | 0x7E00 | aPtr->v64>>54;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToF32UI.c b/src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToF32UI.c
new file mode 100644
index 00000000..e45d63b3
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToF32UI.c
@@ -0,0 +1,51 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 32-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+uint_fast32_t softfloat_commonNaNToF32UI( const struct commonNaN *aPtr )
+{
+
+ return (uint_fast32_t) aPtr->sign<<31 | 0x7FC00000 | aPtr->v64>>41;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToF64UI.c b/src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToF64UI.c
new file mode 100644
index 00000000..bfde88bb
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2/s_commonNaNToF64UI.c
@@ -0,0 +1,53 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 64-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+uint_fast64_t softfloat_commonNaNToF64UI( const struct commonNaN *aPtr )
+{
+
+ return
+ (uint_fast64_t) aPtr->sign<<63 | UINT64_C( 0x7FF8000000000000 )
+ | aPtr->v64>>12;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2/s_extF80MToCommonNaN.c b/src/libs/softfloat-3e/source/ARM-VFPv2/s_extF80MToCommonNaN.c
new file mode 100644
index 00000000..e6571f63
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2/s_extF80MToCommonNaN.c
@@ -0,0 +1,62 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming the 80-bit extended floating-point value pointed to by 'aSPtr' is
+| a NaN, converts this NaN to the common NaN form, and stores the resulting
+| common NaN at the location pointed to by 'zPtr'. If the NaN is a signaling
+| NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_extF80MToCommonNaN(
+ const struct extFloat80M *aSPtr, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ if ( extF80M_isSignalingNaN( (const extFloat80_t *) aSPtr ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ zPtr->sign = signExtF80UI64( aSPtr->signExp );
+ zPtr->v64 = aSPtr->signif<<1;
+ zPtr->v0 = 0;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2/s_extF80UIToCommonNaN.c b/src/libs/softfloat-3e/source/ARM-VFPv2/s_extF80UIToCommonNaN.c
new file mode 100644
index 00000000..977b505f
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2/s_extF80UIToCommonNaN.c
@@ -0,0 +1,62 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming the unsigned integer formed from concatenating 'uiA64' and 'uiA0'
+| has the bit pattern of an 80-bit extended floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_extF80UIToCommonNaN(
+ uint_fast16_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ if ( softfloat_isSigNaNExtF80UI( uiA64, uiA0 ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ zPtr->sign = uiA64>>15;
+ zPtr->v64 = uiA0<<1;
+ zPtr->v0 = 0;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2/s_f128MToCommonNaN.c b/src/libs/softfloat-3e/source/ARM-VFPv2/s_f128MToCommonNaN.c
new file mode 100644
index 00000000..df75bc69
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2/s_f128MToCommonNaN.c
@@ -0,0 +1,62 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming the 128-bit floating-point value pointed to by 'aWPtr' is a NaN,
+| converts this NaN to the common NaN form, and stores the resulting common
+| NaN at the location pointed to by 'zPtr'. If the NaN is a signaling NaN,
+| the invalid exception is raised. Argument 'aWPtr' points to an array of
+| four 32-bit elements that concatenate in the platform's normal endian order
+| to form a 128-bit floating-point value.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_f128MToCommonNaN( const uint32_t *aWPtr, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ if ( f128M_isSignalingNaN( (const float128_t *) aWPtr ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ zPtr->sign = aWPtr[indexWordHi( 4 )]>>31;
+ softfloat_shortShiftLeft128M( aWPtr, 16, (uint32_t *) &zPtr->v0 );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2/s_f128UIToCommonNaN.c b/src/libs/softfloat-3e/source/ARM-VFPv2/s_f128UIToCommonNaN.c
new file mode 100644
index 00000000..fe1eb705
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2/s_f128UIToCommonNaN.c
@@ -0,0 +1,65 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming the unsigned integer formed from concatenating 'uiA64' and 'uiA0'
+| has the bit pattern of a 128-bit floating-point NaN, converts this NaN to
+| the common NaN form, and stores the resulting common NaN at the location
+| pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid exception
+| is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_f128UIToCommonNaN(
+ uint_fast64_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ struct uint128 NaNSig;
+
+ if ( softfloat_isSigNaNF128UI( uiA64, uiA0 ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ NaNSig = softfloat_shortShiftLeft128( uiA64, uiA0, 16 );
+ zPtr->sign = uiA64>>63;
+ zPtr->v64 = NaNSig.v64;
+ zPtr->v0 = NaNSig.v0;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2/s_f16UIToCommonNaN.c b/src/libs/softfloat-3e/source/ARM-VFPv2/s_f16UIToCommonNaN.c
new file mode 100644
index 00000000..26099f17
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2/s_f16UIToCommonNaN.c
@@ -0,0 +1,59 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming 'uiA' has the bit pattern of a 16-bit floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void softfloat_f16UIToCommonNaN( uint_fast16_t uiA, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ if ( softfloat_isSigNaNF16UI( uiA ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ zPtr->sign = uiA>>15;
+ zPtr->v64 = (uint_fast64_t) uiA<<54;
+ zPtr->v0 = 0;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2/s_f32UIToCommonNaN.c b/src/libs/softfloat-3e/source/ARM-VFPv2/s_f32UIToCommonNaN.c
new file mode 100644
index 00000000..2c9dad46
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2/s_f32UIToCommonNaN.c
@@ -0,0 +1,59 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming 'uiA' has the bit pattern of a 32-bit floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void softfloat_f32UIToCommonNaN( uint_fast32_t uiA, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ if ( softfloat_isSigNaNF32UI( uiA ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ zPtr->sign = uiA>>31;
+ zPtr->v64 = (uint_fast64_t) uiA<<41;
+ zPtr->v0 = 0;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2/s_f64UIToCommonNaN.c b/src/libs/softfloat-3e/source/ARM-VFPv2/s_f64UIToCommonNaN.c
new file mode 100644
index 00000000..39fcb8b9
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2/s_f64UIToCommonNaN.c
@@ -0,0 +1,59 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming 'uiA' has the bit pattern of a 64-bit floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void softfloat_f64UIToCommonNaN( uint_fast64_t uiA, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ if ( softfloat_isSigNaNF64UI( uiA ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ zPtr->sign = uiA>>63;
+ zPtr->v64 = uiA<<12;
+ zPtr->v0 = 0;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNExtF80M.c b/src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNExtF80M.c
new file mode 100644
index 00000000..37d4d1a8
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNExtF80M.c
@@ -0,0 +1,87 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming at least one of the two 80-bit extended floating-point values
+| pointed to by 'aSPtr' and 'bSPtr' is a NaN, stores the combined NaN result
+| at the location pointed to by 'zSPtr'. If either original floating-point
+| value is a signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_propagateNaNExtF80M(
+ const struct extFloat80M *aSPtr,
+ const struct extFloat80M *bSPtr,
+ struct extFloat80M *zSPtr
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ const struct extFloat80M *sPtr;
+ bool isSigNaNA;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+
+ sPtr = aSPtr;
+ isSigNaNA = extF80M_isSignalingNaN( (const extFloat80_t *) aSPtr );
+ if (
+ isSigNaNA
+ || (bSPtr
+ && extF80M_isSignalingNaN( (const extFloat80_t *) bSPtr ))
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ if ( isSigNaNA ) goto copyNonsig;
+ goto copyNonsigB;
+ }
+ uiZ64 = sPtr->signExp;
+ uiZ0 = sPtr->signif;
+ if ( isNaNExtF80UI( uiZ64, uiZ0 ) ) goto returnNonsig;
+ copyNonsigB:
+ sPtr = bSPtr;
+ copyNonsig:
+ uiZ64 = sPtr->signExp;
+ uiZ0 = sPtr->signif;
+ returnNonsig:
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = uiZ0 | UINT64_C( 0xC000000000000000 );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNExtF80UI.c b/src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNExtF80UI.c
new file mode 100644
index 00000000..3b1eebb0
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNExtF80UI.c
@@ -0,0 +1,84 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Interpreting the unsigned integer formed from concatenating 'uiA64' and
+| 'uiA0' as an 80-bit extended floating-point value, and likewise interpreting
+| the unsigned integer formed from concatenating 'uiB64' and 'uiB0' as another
+| 80-bit extended floating-point value, and assuming at least on of these
+| floating-point values is a NaN, returns the bit pattern of the combined NaN
+| result. If either original floating-point value is a signaling NaN, the
+| invalid exception is raised.
+*----------------------------------------------------------------------------*/
+struct uint128
+ softfloat_propagateNaNExtF80UI(
+ uint_fast16_t uiA64,
+ uint_fast64_t uiA0,
+ uint_fast16_t uiB64,
+ uint_fast64_t uiB0
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ bool isSigNaNA;
+ struct uint128 uiZ;
+
+ isSigNaNA = softfloat_isSigNaNExtF80UI( uiA64, uiA0 );
+ if ( isSigNaNA || softfloat_isSigNaNExtF80UI( uiB64, uiB0 ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ if ( isSigNaNA ) goto returnNonsigA;
+ goto returnNonsigB;
+ }
+ if ( isNaNExtF80UI( uiA64, uiA0 ) ) {
+ returnNonsigA:
+ uiZ.v64 = uiA64;
+ uiZ.v0 = uiA0;
+ } else {
+ returnNonsigB:
+ uiZ.v64 = uiB64;
+ uiZ.v0 = uiB0;
+ }
+ uiZ.v0 | UINT64_C( 0xC000000000000000 );
+ return uiZ;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNF128M.c b/src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNF128M.c
new file mode 100644
index 00000000..b60ecf1c
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNF128M.c
@@ -0,0 +1,77 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming at least one of the two 128-bit floating-point values pointed to by
+| 'aWPtr' and 'bWPtr' is a NaN, stores the combined NaN result at the location
+| pointed to by 'zWPtr'. If either original floating-point value is a
+| signaling NaN, the invalid exception is raised. Each of 'aWPtr', 'bWPtr',
+| and 'zWPtr' points to an array of four 32-bit elements that concatenate in
+| the platform's normal endian order to form a 128-bit floating-point value.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_propagateNaNF128M(
+ const uint32_t *aWPtr, const uint32_t *bWPtr, uint32_t *zWPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint32_t *ptr;
+ bool isSigNaNA;
+
+ ptr = aWPtr;
+ isSigNaNA = f128M_isSignalingNaN( (const float128_t *) aWPtr );
+ if (
+ isSigNaNA
+ || (bWPtr && f128M_isSignalingNaN( (const float128_t *) bWPtr ))
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ if ( ! isSigNaNA ) ptr = bWPtr;
+ goto copyNonsig;
+ }
+ if ( ! softfloat_isNaNF128M( aWPtr ) ) ptr = bWPtr;
+ copyNonsig:
+ zWPtr[indexWordHi( 4 )] = ptr[indexWordHi( 4 )] | 0x00008000;
+ zWPtr[indexWord( 4, 2 )] = ptr[indexWord( 4, 2 )];
+ zWPtr[indexWord( 4, 1 )] = ptr[indexWord( 4, 1 )];
+ zWPtr[indexWord( 4, 0 )] = ptr[indexWord( 4, 0 )];
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNF128UI.c b/src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNF128UI.c
new file mode 100644
index 00000000..e97e9797
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNF128UI.c
@@ -0,0 +1,84 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Interpreting the unsigned integer formed from concatenating 'uiA64' and
+| 'uiA0' as a 128-bit floating-point value, and likewise interpreting the
+| unsigned integer formed from concatenating 'uiB64' and 'uiB0' as another
+| 128-bit floating-point value, and assuming at least on of these floating-
+| point values is a NaN, returns the bit pattern of the combined NaN result.
+| If either original floating-point value is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+struct uint128
+ softfloat_propagateNaNF128UI(
+ uint_fast64_t uiA64,
+ uint_fast64_t uiA0,
+ uint_fast64_t uiB64,
+ uint_fast64_t uiB0
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ bool isSigNaNA;
+ struct uint128 uiZ;
+
+ isSigNaNA = softfloat_isSigNaNF128UI( uiA64, uiA0 );
+ if ( isSigNaNA || softfloat_isSigNaNF128UI( uiB64, uiB0 ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ if ( isSigNaNA ) goto returnNonsigA;
+ goto returnNonsigB;
+ }
+ if ( isNaNF128UI( uiA64, uiA0 ) ) {
+ returnNonsigA:
+ uiZ.v64 = uiA64;
+ uiZ.v0 = uiA0;
+ } else {
+ returnNonsigB:
+ uiZ.v64 = uiB64;
+ uiZ.v0 = uiB0;
+ }
+ uiZ.v64 |= UINT64_C( 0x0000800000000000 );
+ return uiZ;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNF16UI.c b/src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNF16UI.c
new file mode 100644
index 00000000..11ec2e2f
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNF16UI.c
@@ -0,0 +1,63 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Interpreting 'uiA' and 'uiB' as the bit patterns of two 16-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either 'uiA' or 'uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast16_t
+ softfloat_propagateNaNF16UI( uint_fast16_t uiA, uint_fast16_t uiB SOFTFLOAT_STATE_DECL_COMMA )
+{
+ bool isSigNaNA;
+
+ isSigNaNA = softfloat_isSigNaNF16UI( uiA );
+ if ( isSigNaNA || softfloat_isSigNaNF16UI( uiB ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return (isSigNaNA ? uiA : uiB) | 0x0200;
+ }
+ return isNaNF16UI( uiA ) ? uiA : uiB;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNF32UI.c b/src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNF32UI.c
new file mode 100644
index 00000000..ac21c261
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNF32UI.c
@@ -0,0 +1,63 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Interpreting 'uiA' and 'uiB' as the bit patterns of two 32-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either 'uiA' or 'uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast32_t
+ softfloat_propagateNaNF32UI( uint_fast32_t uiA, uint_fast32_t uiB SOFTFLOAT_STATE_DECL_COMMA )
+{
+ bool isSigNaNA;
+
+ isSigNaNA = softfloat_isSigNaNF32UI( uiA );
+ if ( isSigNaNA || softfloat_isSigNaNF32UI( uiB ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return (isSigNaNA ? uiA : uiB) | 0x00400000;
+ }
+ return isNaNF32UI( uiA ) ? uiA : uiB;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNF64UI.c b/src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNF64UI.c
new file mode 100644
index 00000000..5882c467
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2/s_propagateNaNF64UI.c
@@ -0,0 +1,63 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Interpreting 'uiA' and 'uiB' as the bit patterns of two 64-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either 'uiA' or 'uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast64_t
+ softfloat_propagateNaNF64UI( uint_fast64_t uiA, uint_fast64_t uiB SOFTFLOAT_STATE_DECL_COMMA )
+{
+ bool isSigNaNA;
+
+ isSigNaNA = softfloat_isSigNaNF64UI( uiA );
+ if ( isSigNaNA || softfloat_isSigNaNF64UI( uiB ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return (isSigNaNA ? uiA : uiB) | UINT64_C( 0x0008000000000000 );
+ }
+ return isNaNF64UI( uiA ) ? uiA : uiB;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2/softfloat_raiseFlags.c b/src/libs/softfloat-3e/source/ARM-VFPv2/softfloat_raiseFlags.c
new file mode 100644
index 00000000..5b0d2a92
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2/softfloat_raiseFlags.c
@@ -0,0 +1,56 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include "platform.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Raises the exceptions specified by 'flags'. Floating-point traps can be
+| defined here if desired. It is currently not possible for such a trap
+| to substitute a result value. If traps are not implemented, this routine
+| should be simply 'softfloat_exceptionFlags |= flags;'.
+*----------------------------------------------------------------------------*/
+void softfloat_raiseFlags( uint_fast8_t flags SOFTFLOAT_STATE_ARG_COMMA )
+{
+
+#ifdef VBOX_WITHOUT_SOFTFLOAT_GLOBALS
+ softfloat_exceptionFlags |= flags;
+#else
+ pState->exceptionFlags |= flags;
+#endif
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ARM-VFPv2/specialize.h b/src/libs/softfloat-3e/source/ARM-VFPv2/specialize.h
new file mode 100644
index 00000000..b079fab2
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ARM-VFPv2/specialize.h
@@ -0,0 +1,379 @@
+
+/*============================================================================
+
+This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#ifndef specialize_h
+#define specialize_h 1
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "primitiveTypes.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Default value for 'softfloat_detectTininess'.
+*----------------------------------------------------------------------------*/
+#define init_detectTininess softfloat_tininess_beforeRounding
+
+/*----------------------------------------------------------------------------
+| The values to return on conversions to 32-bit integer formats that raise an
+| invalid exception.
+*----------------------------------------------------------------------------*/
+#define ui32_fromPosOverflow 0xFFFFFFFF
+#define ui32_fromNegOverflow 0
+#define ui32_fromNaN 0
+#define i32_fromPosOverflow 0x7FFFFFFF
+#define i32_fromNegOverflow (-0x7FFFFFFF - 1)
+#define i32_fromNaN 0
+
+/*----------------------------------------------------------------------------
+| The values to return on conversions to 64-bit integer formats that raise an
+| invalid exception.
+*----------------------------------------------------------------------------*/
+#define ui64_fromPosOverflow UINT64_C( 0xFFFFFFFFFFFFFFFF )
+#define ui64_fromNegOverflow 0
+#define ui64_fromNaN 0
+#define i64_fromPosOverflow INT64_C( 0x7FFFFFFFFFFFFFFF )
+#define i64_fromNegOverflow (-INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+#define i64_fromNaN 0
+
+/*----------------------------------------------------------------------------
+| "Common NaN" structure, used to transfer NaN representations from one format
+| to another.
+*----------------------------------------------------------------------------*/
+struct commonNaN {
+ bool sign;
+#ifdef LITTLEENDIAN
+ uint64_t v0, v64;
+#else
+ uint64_t v64, v0;
+#endif
+};
+
+/*----------------------------------------------------------------------------
+| The bit pattern for a default generated 16-bit floating-point NaN.
+*----------------------------------------------------------------------------*/
+#define defaultNaNF16UI 0x7E00
+
+/*----------------------------------------------------------------------------
+| Returns true when 16-bit unsigned integer 'uiA' has the bit pattern of a
+| 16-bit floating-point signaling NaN.
+| Note: This macro evaluates its argument more than once.
+*----------------------------------------------------------------------------*/
+#define softfloat_isSigNaNF16UI( uiA ) ((((uiA) & 0x7E00) == 0x7C00) && ((uiA) & 0x01FF))
+
+/*----------------------------------------------------------------------------
+| Assuming 'uiA' has the bit pattern of a 16-bit floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void softfloat_f16UIToCommonNaN( uint_fast16_t uiA, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 16-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+uint_fast16_t softfloat_commonNaNToF16UI( const struct commonNaN *aPtr );
+
+/*----------------------------------------------------------------------------
+| Interpreting 'uiA' and 'uiB' as the bit patterns of two 16-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either 'uiA' or 'uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast16_t
+ softfloat_propagateNaNF16UI( uint_fast16_t uiA, uint_fast16_t uiB SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| The bit pattern for a default generated 32-bit floating-point NaN.
+*----------------------------------------------------------------------------*/
+#define defaultNaNF32UI 0x7FC00000
+
+/*----------------------------------------------------------------------------
+| Returns true when 32-bit unsigned integer 'uiA' has the bit pattern of a
+| 32-bit floating-point signaling NaN.
+| Note: This macro evaluates its argument more than once.
+*----------------------------------------------------------------------------*/
+#define softfloat_isSigNaNF32UI( uiA ) ((((uiA) & 0x7FC00000) == 0x7F800000) && ((uiA) & 0x003FFFFF))
+
+/*----------------------------------------------------------------------------
+| Assuming 'uiA' has the bit pattern of a 32-bit floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void softfloat_f32UIToCommonNaN( uint_fast32_t uiA, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 32-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+uint_fast32_t softfloat_commonNaNToF32UI( const struct commonNaN *aPtr );
+
+/*----------------------------------------------------------------------------
+| Interpreting 'uiA' and 'uiB' as the bit patterns of two 32-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either 'uiA' or 'uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast32_t
+ softfloat_propagateNaNF32UI( uint_fast32_t uiA, uint_fast32_t uiB SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| The bit pattern for a default generated 64-bit floating-point NaN.
+*----------------------------------------------------------------------------*/
+#define defaultNaNF64UI UINT64_C( 0x7FF8000000000000 )
+
+/*----------------------------------------------------------------------------
+| Returns true when 64-bit unsigned integer 'uiA' has the bit pattern of a
+| 64-bit floating-point signaling NaN.
+| Note: This macro evaluates its argument more than once.
+*----------------------------------------------------------------------------*/
+#define softfloat_isSigNaNF64UI( uiA ) ((((uiA) & UINT64_C( 0x7FF8000000000000 )) == UINT64_C( 0x7FF0000000000000 )) && ((uiA) & UINT64_C( 0x0007FFFFFFFFFFFF )))
+
+/*----------------------------------------------------------------------------
+| Assuming 'uiA' has the bit pattern of a 64-bit floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void softfloat_f64UIToCommonNaN( uint_fast64_t uiA, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 64-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+uint_fast64_t softfloat_commonNaNToF64UI( const struct commonNaN *aPtr );
+
+/*----------------------------------------------------------------------------
+| Interpreting 'uiA' and 'uiB' as the bit patterns of two 64-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either 'uiA' or 'uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast64_t
+ softfloat_propagateNaNF64UI( uint_fast64_t uiA, uint_fast64_t uiB SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| The bit pattern for a default generated 80-bit extended floating-point NaN.
+*----------------------------------------------------------------------------*/
+#define defaultNaNExtF80UI64 0x7FFF
+#define defaultNaNExtF80UI0 UINT64_C( 0xC000000000000000 )
+
+/*----------------------------------------------------------------------------
+| Returns true when the 80-bit unsigned integer formed from concatenating
+| 16-bit 'uiA64' and 64-bit 'uiA0' has the bit pattern of an 80-bit extended
+| floating-point signaling NaN.
+| Note: This macro evaluates its arguments more than once.
+*----------------------------------------------------------------------------*/
+#define softfloat_isSigNaNExtF80UI( uiA64, uiA0 ) ((((uiA64) & 0x7FFF) == 0x7FFF) && ! ((uiA0) & UINT64_C( 0x4000000000000000 )) && ((uiA0) & UINT64_C( 0x3FFFFFFFFFFFFFFF )))
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+/*----------------------------------------------------------------------------
+| The following functions are needed only when 'SOFTFLOAT_FAST_INT64' is
+| defined.
+*----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+| Assuming the unsigned integer formed from concatenating 'uiA64' and 'uiA0'
+| has the bit pattern of an 80-bit extended floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_extF80UIToCommonNaN(
+ uint_fast16_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into an 80-bit extended
+| floating-point NaN, and returns the bit pattern of this value as an unsigned
+| integer.
+*----------------------------------------------------------------------------*/
+struct uint128 softfloat_commonNaNToExtF80UI( const struct commonNaN *aPtr );
+
+/*----------------------------------------------------------------------------
+| Interpreting the unsigned integer formed from concatenating 'uiA64' and
+| 'uiA0' as an 80-bit extended floating-point value, and likewise interpreting
+| the unsigned integer formed from concatenating 'uiB64' and 'uiB0' as another
+| 80-bit extended floating-point value, and assuming at least on of these
+| floating-point values is a NaN, returns the bit pattern of the combined NaN
+| result. If either original floating-point value is a signaling NaN, the
+| invalid exception is raised.
+*----------------------------------------------------------------------------*/
+struct uint128
+ softfloat_propagateNaNExtF80UI(
+ uint_fast16_t uiA64,
+ uint_fast64_t uiA0,
+ uint_fast16_t uiB64,
+ uint_fast64_t uiB0
+ SOFTFLOAT_STATE_DECL_COMMA
+ );
+
+/*----------------------------------------------------------------------------
+| The bit pattern for a default generated 128-bit floating-point NaN.
+*----------------------------------------------------------------------------*/
+#define defaultNaNF128UI64 UINT64_C( 0x7FFF800000000000 )
+#define defaultNaNF128UI0 UINT64_C( 0 )
+
+/*----------------------------------------------------------------------------
+| Returns true when the 128-bit unsigned integer formed from concatenating
+| 64-bit 'uiA64' and 64-bit 'uiA0' has the bit pattern of a 128-bit floating-
+| point signaling NaN.
+| Note: This macro evaluates its arguments more than once.
+*----------------------------------------------------------------------------*/
+#define softfloat_isSigNaNF128UI( uiA64, uiA0 ) ((((uiA64) & UINT64_C( 0x7FFF800000000000 )) == UINT64_C( 0x7FFF000000000000 )) && ((uiA0) || ((uiA64) & UINT64_C( 0x00007FFFFFFFFFFF ))))
+
+/*----------------------------------------------------------------------------
+| Assuming the unsigned integer formed from concatenating 'uiA64' and 'uiA0'
+| has the bit pattern of a 128-bit floating-point NaN, converts this NaN to
+| the common NaN form, and stores the resulting common NaN at the location
+| pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid exception
+| is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_f128UIToCommonNaN(
+ uint_fast64_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 128-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+struct uint128 softfloat_commonNaNToF128UI( const struct commonNaN * );
+
+/*----------------------------------------------------------------------------
+| Interpreting the unsigned integer formed from concatenating 'uiA64' and
+| 'uiA0' as a 128-bit floating-point value, and likewise interpreting the
+| unsigned integer formed from concatenating 'uiB64' and 'uiB0' as another
+| 128-bit floating-point value, and assuming at least on of these floating-
+| point values is a NaN, returns the bit pattern of the combined NaN result.
+| If either original floating-point value is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+struct uint128
+ softfloat_propagateNaNF128UI(
+ uint_fast64_t uiA64,
+ uint_fast64_t uiA0,
+ uint_fast64_t uiB64,
+ uint_fast64_t uiB0
+ SOFTFLOAT_STATE_DECL_COMMA
+ );
+
+#else
+
+/*----------------------------------------------------------------------------
+| The following functions are needed only when 'SOFTFLOAT_FAST_INT64' is not
+| defined.
+*----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+| Assuming the 80-bit extended floating-point value pointed to by 'aSPtr' is
+| a NaN, converts this NaN to the common NaN form, and stores the resulting
+| common NaN at the location pointed to by 'zPtr'. If the NaN is a signaling
+| NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_extF80MToCommonNaN(
+ const struct extFloat80M *aSPtr, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into an 80-bit extended
+| floating-point NaN, and stores this NaN at the location pointed to by
+| 'zSPtr'.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_commonNaNToExtF80M(
+ const struct commonNaN *aPtr, struct extFloat80M *zSPtr );
+
+/*----------------------------------------------------------------------------
+| Assuming at least one of the two 80-bit extended floating-point values
+| pointed to by 'aSPtr' and 'bSPtr' is a NaN, stores the combined NaN result
+| at the location pointed to by 'zSPtr'. If either original floating-point
+| value is a signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_propagateNaNExtF80M(
+ const struct extFloat80M *aSPtr,
+ const struct extFloat80M *bSPtr,
+ struct extFloat80M *zSPtr
+ SOFTFLOAT_STATE_DECL_COMMA
+ );
+
+/*----------------------------------------------------------------------------
+| The bit pattern for a default generated 128-bit floating-point NaN.
+*----------------------------------------------------------------------------*/
+#define defaultNaNF128UI96 0x7FFF8000
+#define defaultNaNF128UI64 0
+#define defaultNaNF128UI32 0
+#define defaultNaNF128UI0 0
+
+/*----------------------------------------------------------------------------
+| Assuming the 128-bit floating-point value pointed to by 'aWPtr' is a NaN,
+| converts this NaN to the common NaN form, and stores the resulting common
+| NaN at the location pointed to by 'zPtr'. If the NaN is a signaling NaN,
+| the invalid exception is raised. Argument 'aWPtr' points to an array of
+| four 32-bit elements that concatenate in the platform's normal endian order
+| to form a 128-bit floating-point value.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_f128MToCommonNaN( const uint32_t *aWPtr, struct commonNaN *zPtr SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by 'aPtr' into a 128-bit floating-point
+| NaN, and stores this NaN at the location pointed to by 'zWPtr'. Argument
+| 'zWPtr' points to an array of four 32-bit elements that concatenate in the
+| platform's normal endian order to form a 128-bit floating-point value.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_commonNaNToF128M( const struct commonNaN *aPtr, uint32_t *zWPtr );
+
+/*----------------------------------------------------------------------------
+| Assuming at least one of the two 128-bit floating-point values pointed to by
+| 'aWPtr' and 'bWPtr' is a NaN, stores the combined NaN result at the location
+| pointed to by 'zWPtr'. If either original floating-point value is a
+| signaling NaN, the invalid exception is raised. Each of 'aWPtr', 'bWPtr',
+| and 'zWPtr' points to an array of four 32-bit elements that concatenate in
+| the platform's normal endian order to form a 128-bit floating-point value.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_propagateNaNF128M(
+ const uint32_t *aWPtr, const uint32_t *bWPtr, uint32_t *zWPtr SOFTFLOAT_STATE_DECL_COMMA );
+
+#endif
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/Makefile.kup b/src/libs/softfloat-3e/source/Makefile.kup
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/src/libs/softfloat-3e/source/Makefile.kup
diff --git a/src/libs/softfloat-3e/source/extF80M_add.c b/src/libs/softfloat-3e/source/extF80M_add.c
new file mode 100644
index 00000000..836f4d3c
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80M_add.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void
+ extF80M_add(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const struct extFloat80M *aSPtr, *bSPtr;
+ uint_fast16_t uiA64;
+ uint_fast64_t uiA0;
+ bool signA;
+ uint_fast16_t uiB64;
+ uint_fast64_t uiB0;
+ bool signB;
+#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 2)
+ extFloat80_t
+ (*magsFuncPtr)(
+ uint_fast16_t, uint_fast64_t, uint_fast16_t, uint_fast64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+#endif
+
+ aSPtr = (const struct extFloat80M *) aPtr;
+ bSPtr = (const struct extFloat80M *) bPtr;
+ uiA64 = aSPtr->signExp;
+ uiA0 = aSPtr->signif;
+ signA = signExtF80UI64( uiA64 );
+ uiB64 = bSPtr->signExp;
+ uiB0 = bSPtr->signif;
+ signB = signExtF80UI64( uiB64 );
+#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
+ if ( signA == signB ) {
+ *zPtr = softfloat_addMagsExtF80( uiA64, uiA0, uiB64, uiB0, signA SOFTFLOAT_STATE_ARG_COMMA );
+ } else {
+ *zPtr = softfloat_subMagsExtF80( uiA64, uiA0, uiB64, uiB0, signA SOFTFLOAT_STATE_ARG_COMMA );
+ }
+#else
+ magsFuncPtr =
+ (signA == signB) ? softfloat_addMagsExtF80 : softfloat_subMagsExtF80;
+ *zPtr = (*magsFuncPtr)( uiA64, uiA0, uiB64, uiB0, signA SOFTFLOAT_STATE_ARG_COMMA );
+#endif
+
+}
+
+#else
+
+void
+ extF80M_add(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ softfloat_addExtF80M(
+ (const struct extFloat80M *) aPtr,
+ (const struct extFloat80M *) bPtr,
+ (struct extFloat80M *) zPtr,
+ false
+ SOFTFLOAT_STATE_ARG_COMMA
+ );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/extF80M_div.c b/src/libs/softfloat-3e/source/extF80M_div.c
new file mode 100644
index 00000000..3787d62b
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80M_div.c
@@ -0,0 +1,194 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void
+ extF80M_div(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ *zPtr = extF80_div( *aPtr, *bPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void
+ extF80M_div(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const struct extFloat80M *aSPtr, *bSPtr;
+ struct extFloat80M *zSPtr;
+ uint_fast16_t uiA64;
+ int32_t expA;
+ uint_fast16_t uiB64;
+ int32_t expB;
+ bool signZ;
+ uint64_t sigA, x64;
+ int32_t expZ;
+ int shiftDist;
+ uint32_t y[3], recip32, sigB[3];
+ int ix;
+ uint32_t q, qs[2];
+ uint_fast16_t uiZ64;
+ uint64_t uiZ0;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aSPtr = (const struct extFloat80M *) aPtr;
+ bSPtr = (const struct extFloat80M *) bPtr;
+ zSPtr = (struct extFloat80M *) zPtr;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiA64 = aSPtr->signExp;
+ expA = expExtF80UI64( uiA64 );
+ uiB64 = bSPtr->signExp;
+ expB = expExtF80UI64( uiB64 );
+ signZ = signExtF80UI64( uiA64 ) ^ signExtF80UI64( uiB64 );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( (expA == 0x7FFF) || (expB == 0x7FFF) ) {
+ if ( softfloat_tryPropagateNaNExtF80M( aSPtr, bSPtr, zSPtr SOFTFLOAT_STATE_ARG_COMMA ) ) return;
+ if ( expA == 0x7FFF ) {
+ if ( expB == 0x7FFF ) goto invalid;
+ goto infinity;
+ }
+ goto zero;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sigA = aSPtr->signif;
+ x64 = bSPtr->signif;
+ if ( ! expB ) expB = 1;
+ if ( ! (x64 & UINT64_C( 0x8000000000000000 )) ) {
+ if ( ! x64 ) {
+ if ( ! sigA ) goto invalid;
+ softfloat_raiseFlags( softfloat_flag_infinite SOFTFLOAT_STATE_ARG_COMMA );
+ goto infinity;
+ }
+ expB += softfloat_normExtF80SigM( &x64 );
+ }
+ if ( ! expA ) expA = 1;
+ if ( ! (sigA & UINT64_C( 0x8000000000000000 )) ) {
+ if ( ! sigA ) goto zero;
+ expA += softfloat_normExtF80SigM( &sigA );
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expZ = expA - expB + 0x3FFF;
+ shiftDist = 29;
+ if ( sigA < x64 ) {
+ --expZ;
+ shiftDist = 30;
+ }
+ softfloat_shortShiftLeft64To96M( sigA, shiftDist, y );
+ recip32 = softfloat_approxRecip32_1( x64>>32 );
+ sigB[indexWord( 3, 0 )] = (uint32_t) x64<<30;
+ x64 >>= 2;
+ sigB[indexWord( 3, 2 )] = x64>>32;
+ sigB[indexWord( 3, 1 )] = x64;
+ ix = 2;
+ for (;;) {
+ x64 = (uint64_t) y[indexWordHi( 3 )] * recip32;
+ q = (x64 + 0x80000000)>>32;
+ --ix;
+ if ( ix < 0 ) break;
+ softfloat_remStep96MBy32( y, 29, sigB, q, y );
+ if ( y[indexWordHi( 3 )] & 0x80000000 ) {
+ --q;
+ softfloat_add96M( y, sigB, y );
+ }
+ qs[ix] = q;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ((q + 1) & 0x3FFFFF) < 2 ) {
+ softfloat_remStep96MBy32( y, 29, sigB, q, y );
+ if ( y[indexWordHi( 3 )] & 0x80000000 ) {
+ --q;
+ softfloat_add96M( y, sigB, y );
+ } else if ( softfloat_compare96M( sigB, y ) <= 0 ) {
+ ++q;
+ softfloat_sub96M( y, sigB, y );
+ }
+ if (
+ y[indexWordLo( 3 )] || y[indexWord( 3, 1 )] || y[indexWord( 3, 2 )]
+ ) {
+ q |= 1;
+ }
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ x64 = (uint64_t) q<<9;
+ y[indexWord( 3, 0 )] = x64;
+ x64 = ((uint64_t) qs[0]<<6) + (x64>>32);
+ y[indexWord( 3, 1 )] = x64;
+ y[indexWord( 3, 2 )] = (qs[1]<<3) + (x64>>32);
+ softfloat_roundPackMToExtF80M(
+ signZ, expZ, y, extF80_roundingPrecision, zSPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_invalidExtF80M( zSPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ infinity:
+ uiZ64 = packToExtF80UI64( signZ, 0x7FFF );
+ uiZ0 = UINT64_C( 0x8000000000000000 );
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zero:
+ uiZ64 = packToExtF80UI64( signZ, 0 );
+ uiZ0 = 0;
+ uiZ:
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = uiZ0;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/extF80M_eq.c b/src/libs/softfloat-3e/source/extF80M_eq.c
new file mode 100644
index 00000000..71683d3d
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80M_eq.c
@@ -0,0 +1,98 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+bool extF80M_eq( const extFloat80_t *aPtr, const extFloat80_t *bPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return extF80_eq( *aPtr, *bPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+bool extF80M_eq( const extFloat80_t *aPtr, const extFloat80_t *bPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const struct extFloat80M *aSPtr, *bSPtr;
+ uint_fast16_t uiA64;
+ uint64_t uiA0;
+ uint_fast16_t uiB64;
+ uint64_t uiB0;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aSPtr = (const struct extFloat80M *) aPtr;
+ bSPtr = (const struct extFloat80M *) bPtr;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiA64 = aSPtr->signExp;
+ uiA0 = aSPtr->signif;
+ uiB64 = bSPtr->signExp;
+ uiB0 = bSPtr->signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( isNaNExtF80UI( uiA64, uiA0 ) || isNaNExtF80UI( uiB64, uiB0 ) ) {
+ if (
+ softfloat_isSigNaNExtF80UI( uiA64, uiA0 )
+ || softfloat_isSigNaNExtF80UI( uiB64, uiB0 )
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ return false;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( uiA0 == uiB0 ) {
+ return (uiA64 == uiB64) || ! uiA0;
+ } else {
+ if ( ! ((uiA0 & uiB0) & UINT64_C( 0x8000000000000000 )) ) {
+ return ! softfloat_compareNonnormExtF80M( aSPtr, bSPtr );
+ }
+ return false;
+ }
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/extF80M_eq_signaling.c b/src/libs/softfloat-3e/source/extF80M_eq_signaling.c
new file mode 100644
index 00000000..711c3411
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80M_eq_signaling.c
@@ -0,0 +1,92 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+bool extF80M_eq_signaling( const extFloat80_t *aPtr, const extFloat80_t *bPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return extF80_eq_signaling( *aPtr, *bPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+bool extF80M_eq_signaling( const extFloat80_t *aPtr, const extFloat80_t *bPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const struct extFloat80M *aSPtr, *bSPtr;
+ uint_fast16_t uiA64;
+ uint64_t uiA0;
+ uint_fast16_t uiB64;
+ uint64_t uiB0;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aSPtr = (const struct extFloat80M *) aPtr;
+ bSPtr = (const struct extFloat80M *) bPtr;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiA64 = aSPtr->signExp;
+ uiA0 = aSPtr->signif;
+ uiB64 = bSPtr->signExp;
+ uiB0 = bSPtr->signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( isNaNExtF80UI( uiA64, uiA0 ) || isNaNExtF80UI( uiB64, uiB0 ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return false;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( uiA0 == uiB0 ) {
+ return (uiA64 == uiB64) || ! uiA0;
+ } else {
+ if ( ! ((uiA0 & uiB0) & UINT64_C( 0x8000000000000000 )) ) {
+ return ! softfloat_compareNonnormExtF80M( aSPtr, bSPtr );
+ }
+ return false;
+ }
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/extF80M_le.c b/src/libs/softfloat-3e/source/extF80M_le.c
new file mode 100644
index 00000000..35037f54
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80M_le.c
@@ -0,0 +1,106 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+bool extF80M_le( const extFloat80_t *aPtr, const extFloat80_t *bPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return extF80_le( *aPtr, *bPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+bool extF80M_le( const extFloat80_t *aPtr, const extFloat80_t *bPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const struct extFloat80M *aSPtr, *bSPtr;
+ uint_fast16_t uiA64;
+ uint64_t uiA0;
+ uint_fast16_t uiB64;
+ uint64_t uiB0;
+ bool signA, ltMags;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aSPtr = (const struct extFloat80M *) aPtr;
+ bSPtr = (const struct extFloat80M *) bPtr;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiA64 = aSPtr->signExp;
+ uiA0 = aSPtr->signif;
+ uiB64 = bSPtr->signExp;
+ uiB0 = bSPtr->signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( isNaNExtF80UI( uiA64, uiA0 ) || isNaNExtF80UI( uiB64, uiB0 ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return false;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ signA = signExtF80UI64( uiA64 );
+ if ( (uiA64 ^ uiB64) & 0x8000 ) {
+ /*--------------------------------------------------------------------
+ | Signs are different.
+ *--------------------------------------------------------------------*/
+ return signA || ! (uiA0 | uiB0);
+ } else {
+ /*--------------------------------------------------------------------
+ | Signs are the same.
+ *--------------------------------------------------------------------*/
+ if ( ! ((uiA0 & uiB0) & UINT64_C( 0x8000000000000000 )) ) {
+ return (softfloat_compareNonnormExtF80M( aSPtr, bSPtr ) <= 0);
+ }
+ if ( uiA64 == uiB64 ) {
+ if ( uiA0 == uiB0 ) return true;
+ ltMags = (uiA0 < uiB0);
+ } else {
+ ltMags = (uiA64 < uiB64);
+ }
+ return signA ^ ltMags;
+ }
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/extF80M_le_quiet.c b/src/libs/softfloat-3e/source/extF80M_le_quiet.c
new file mode 100644
index 00000000..4980f814
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80M_le_quiet.c
@@ -0,0 +1,112 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+bool extF80M_le_quiet( const extFloat80_t *aPtr, const extFloat80_t *bPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return extF80_le_quiet( *aPtr, *bPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+bool extF80M_le_quiet( const extFloat80_t *aPtr, const extFloat80_t *bPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const struct extFloat80M *aSPtr, *bSPtr;
+ uint_fast16_t uiA64;
+ uint64_t uiA0;
+ uint_fast16_t uiB64;
+ uint64_t uiB0;
+ bool signA, ltMags;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aSPtr = (const struct extFloat80M *) aPtr;
+ bSPtr = (const struct extFloat80M *) bPtr;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiA64 = aSPtr->signExp;
+ uiA0 = aSPtr->signif;
+ uiB64 = bSPtr->signExp;
+ uiB0 = bSPtr->signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( isNaNExtF80UI( uiA64, uiA0 ) || isNaNExtF80UI( uiB64, uiB0 ) ) {
+ if (
+ softfloat_isSigNaNExtF80UI( uiA64, uiA0 )
+ || softfloat_isSigNaNExtF80UI( uiB64, uiB0 )
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ return false;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ signA = signExtF80UI64( uiA64 );
+ if ( (uiA64 ^ uiB64) & 0x8000 ) {
+ /*--------------------------------------------------------------------
+ | Signs are different.
+ *--------------------------------------------------------------------*/
+ return signA || ! (uiA0 | uiB0);
+ } else {
+ /*--------------------------------------------------------------------
+ | Signs are the same.
+ *--------------------------------------------------------------------*/
+ if ( ! ((uiA0 & uiB0) & UINT64_C( 0x8000000000000000 )) ) {
+ return (softfloat_compareNonnormExtF80M( aSPtr, bSPtr ) <= 0);
+ }
+ if ( uiA64 == uiB64 ) {
+ if ( uiA0 == uiB0 ) return true;
+ ltMags = (uiA0 < uiB0);
+ } else {
+ ltMags = (uiA64 < uiB64);
+ }
+ return signA ^ ltMags;
+ }
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/extF80M_lt.c b/src/libs/softfloat-3e/source/extF80M_lt.c
new file mode 100644
index 00000000..62a182bb
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80M_lt.c
@@ -0,0 +1,106 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+bool extF80M_lt( const extFloat80_t *aPtr, const extFloat80_t *bPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return extF80_lt( *aPtr, *bPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+bool extF80M_lt( const extFloat80_t *aPtr, const extFloat80_t *bPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const struct extFloat80M *aSPtr, *bSPtr;
+ uint_fast16_t uiA64;
+ uint64_t uiA0;
+ uint_fast16_t uiB64;
+ uint64_t uiB0;
+ bool signA, ltMags;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aSPtr = (const struct extFloat80M *) aPtr;
+ bSPtr = (const struct extFloat80M *) bPtr;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiA64 = aSPtr->signExp;
+ uiA0 = aSPtr->signif;
+ uiB64 = bSPtr->signExp;
+ uiB0 = bSPtr->signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( isNaNExtF80UI( uiA64, uiA0 ) || isNaNExtF80UI( uiB64, uiB0 ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return false;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ signA = signExtF80UI64( uiA64 );
+ if ( (uiA64 ^ uiB64) & 0x8000 ) {
+ /*--------------------------------------------------------------------
+ | Signs are different.
+ *--------------------------------------------------------------------*/
+ return signA && ((uiA0 | uiB0) != 0);
+ } else {
+ /*--------------------------------------------------------------------
+ | Signs are the same.
+ *--------------------------------------------------------------------*/
+ if ( ! ((uiA0 & uiB0) & UINT64_C( 0x8000000000000000 )) ) {
+ return (softfloat_compareNonnormExtF80M( aSPtr, bSPtr ) < 0);
+ }
+ if ( uiA64 == uiB64 ) {
+ if ( uiA0 == uiB0 ) return false;
+ ltMags = (uiA0 < uiB0);
+ } else {
+ ltMags = (uiA64 < uiB64);
+ }
+ return signA ^ ltMags;
+ }
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/extF80M_lt_quiet.c b/src/libs/softfloat-3e/source/extF80M_lt_quiet.c
new file mode 100644
index 00000000..acfc25bf
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80M_lt_quiet.c
@@ -0,0 +1,112 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+bool extF80M_lt_quiet( const extFloat80_t *aPtr, const extFloat80_t *bPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return extF80_lt_quiet( *aPtr, *bPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+bool extF80M_lt_quiet( const extFloat80_t *aPtr, const extFloat80_t *bPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const struct extFloat80M *aSPtr, *bSPtr;
+ uint_fast16_t uiA64;
+ uint64_t uiA0;
+ uint_fast16_t uiB64;
+ uint64_t uiB0;
+ bool signA, ltMags;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aSPtr = (const struct extFloat80M *) aPtr;
+ bSPtr = (const struct extFloat80M *) bPtr;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiA64 = aSPtr->signExp;
+ uiA0 = aSPtr->signif;
+ uiB64 = bSPtr->signExp;
+ uiB0 = bSPtr->signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( isNaNExtF80UI( uiA64, uiA0 ) || isNaNExtF80UI( uiB64, uiB0 ) ) {
+ if (
+ softfloat_isSigNaNExtF80UI( uiA64, uiA0 )
+ || softfloat_isSigNaNExtF80UI( uiB64, uiB0 )
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ return false;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ signA = signExtF80UI64( uiA64 );
+ if ( (uiA64 ^ uiB64) & 0x8000 ) {
+ /*--------------------------------------------------------------------
+ | Signs are different.
+ *--------------------------------------------------------------------*/
+ return signA && ((uiA0 | uiB0) != 0);
+ } else {
+ /*--------------------------------------------------------------------
+ | Signs are the same.
+ *--------------------------------------------------------------------*/
+ if ( ! ((uiA0 & uiB0) & UINT64_C( 0x8000000000000000 )) ) {
+ return (softfloat_compareNonnormExtF80M( aSPtr, bSPtr ) < 0);
+ }
+ if ( uiA64 == uiB64 ) {
+ if ( uiA0 == uiB0 ) return false;
+ ltMags = (uiA0 < uiB0);
+ } else {
+ ltMags = (uiA64 < uiB64);
+ }
+ return signA ^ ltMags;
+ }
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/extF80M_mul.c b/src/libs/softfloat-3e/source/extF80M_mul.c
new file mode 100644
index 00000000..92464c4d
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80M_mul.c
@@ -0,0 +1,139 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void
+ extF80M_mul(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ *zPtr = extF80_mul( *aPtr, *bPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void
+ extF80M_mul(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const struct extFloat80M *aSPtr, *bSPtr;
+ struct extFloat80M *zSPtr;
+ uint_fast16_t uiA64;
+ int32_t expA;
+ uint_fast16_t uiB64;
+ int32_t expB;
+ bool signZ;
+ uint_fast16_t exp, uiZ64;
+ uint64_t uiZ0, sigA, sigB;
+ int32_t expZ;
+ uint32_t sigProd[4], *extSigZPtr;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aSPtr = (const struct extFloat80M *) aPtr;
+ bSPtr = (const struct extFloat80M *) bPtr;
+ zSPtr = (struct extFloat80M *) zPtr;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiA64 = aSPtr->signExp;
+ expA = expExtF80UI64( uiA64 );
+ uiB64 = bSPtr->signExp;
+ expB = expExtF80UI64( uiB64 );
+ signZ = signExtF80UI64( uiA64 ) ^ signExtF80UI64( uiB64 );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( (expA == 0x7FFF) || (expB == 0x7FFF) ) {
+ if ( softfloat_tryPropagateNaNExtF80M( aSPtr, bSPtr, zSPtr SOFTFLOAT_STATE_ARG_COMMA ) ) return;
+ if (
+ (! aSPtr->signif && (expA != 0x7FFF))
+ || (! bSPtr->signif && (expB != 0x7FFF))
+ ) {
+ softfloat_invalidExtF80M( zSPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return;
+ }
+ uiZ64 = packToExtF80UI64( signZ, 0x7FFF );
+ uiZ0 = UINT64_C( 0x8000000000000000 );
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expA ) expA = 1;
+ sigA = aSPtr->signif;
+ if ( ! (sigA & UINT64_C( 0x8000000000000000 )) ) {
+ if ( ! sigA ) goto zero;
+ expA += softfloat_normExtF80SigM( &sigA );
+ }
+ if ( ! expB ) expB = 1;
+ sigB = bSPtr->signif;
+ if ( ! (sigB & UINT64_C( 0x8000000000000000 )) ) {
+ if ( ! sigB ) goto zero;
+ expB += softfloat_normExtF80SigM( &sigB );
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expZ = expA + expB - 0x3FFE;
+ softfloat_mul64To128M( sigA, sigB, sigProd );
+ if ( sigProd[indexWordLo( 4 )] ) sigProd[indexWord( 4, 1 )] |= 1;
+ extSigZPtr = &sigProd[indexMultiwordHi( 4, 3 )];
+ if ( sigProd[indexWordHi( 4 )] < 0x80000000 ) {
+ --expZ;
+ softfloat_add96M( extSigZPtr, extSigZPtr, extSigZPtr );
+ }
+ softfloat_roundPackMToExtF80M(
+ signZ, expZ, extSigZPtr, extF80_roundingPrecision, zSPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zero:
+ uiZ64 = packToExtF80UI64( signZ, 0 );
+ uiZ0 = 0;
+ uiZ:
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = uiZ0;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/extF80M_rem.c b/src/libs/softfloat-3e/source/extF80M_rem.c
new file mode 100644
index 00000000..74bd5eb3
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80M_rem.c
@@ -0,0 +1,204 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void
+ extF80M_rem(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ *zPtr = extF80_rem( *aPtr, *bPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void
+ extF80M_rem(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const struct extFloat80M *aSPtr, *bSPtr;
+ struct extFloat80M *zSPtr;
+ uint_fast16_t uiA64;
+ int32_t expA, expB;
+ uint64_t x64;
+ bool signRem;
+ uint64_t sigA;
+ int32_t expDiff;
+ uint32_t rem[3], x[3], sig32B, q, recip32, rem2[3], *remPtr, *altRemPtr;
+ uint32_t *newRemPtr, wordMeanRem;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aSPtr = (const struct extFloat80M *) aPtr;
+ bSPtr = (const struct extFloat80M *) bPtr;
+ zSPtr = (struct extFloat80M *) zPtr;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiA64 = aSPtr->signExp;
+ expA = expExtF80UI64( uiA64 );
+ expB = expExtF80UI64( bSPtr->signExp );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( (expA == 0x7FFF) || (expB == 0x7FFF) ) {
+ if ( softfloat_tryPropagateNaNExtF80M( aSPtr, bSPtr, zSPtr SOFTFLOAT_STATE_ARG_COMMA ) ) return;
+ if ( expA == 0x7FFF ) goto invalid;
+ /*--------------------------------------------------------------------
+ | If we get here, then argument b is an infinity and `expB' is 0x7FFF;
+ | Doubling `expB' is an easy way to ensure that `expDiff' later is
+ | less than -1, which will result in returning a canonicalized version
+ | of argument a.
+ *--------------------------------------------------------------------*/
+ expB += expB;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expB ) expB = 1;
+ x64 = bSPtr->signif;
+ if ( ! (x64 & UINT64_C( 0x8000000000000000 )) ) {
+ if ( ! x64 ) goto invalid;
+ expB += softfloat_normExtF80SigM( &x64 );
+ }
+ signRem = signExtF80UI64( uiA64 );
+ if ( ! expA ) expA = 1;
+ sigA = aSPtr->signif;
+ if ( ! (sigA & UINT64_C( 0x8000000000000000 )) ) {
+ if ( ! sigA ) {
+ expA = 0;
+ goto copyA;
+ }
+ expA += softfloat_normExtF80SigM( &sigA );
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expDiff = expA - expB;
+ if ( expDiff < -1 ) goto copyA;
+ rem[indexWord( 3, 2 )] = sigA>>34;
+ rem[indexWord( 3, 1 )] = sigA>>2;
+ rem[indexWord( 3, 0 )] = (uint32_t) sigA<<30;
+ x[indexWord( 3, 0 )] = (uint32_t) x64<<30;
+ sig32B = x64>>32;
+ x64 >>= 2;
+ x[indexWord( 3, 2 )] = x64>>32;
+ x[indexWord( 3, 1 )] = x64;
+ if ( expDiff < 1 ) {
+ if ( expDiff ) {
+ --expB;
+ softfloat_add96M( x, x, x );
+ q = 0;
+ } else {
+ q = (softfloat_compare96M( x, rem ) <= 0);
+ if ( q ) softfloat_sub96M( rem, x, rem );
+ }
+ } else {
+ recip32 = softfloat_approxRecip32_1( sig32B );
+ expDiff -= 30;
+ for (;;) {
+ x64 = (uint64_t) rem[indexWordHi( 3 )] * recip32;
+ if ( expDiff < 0 ) break;
+ q = (x64 + 0x80000000)>>32;
+ softfloat_remStep96MBy32( rem, 29, x, q, rem );
+ if ( rem[indexWordHi( 3 )] & 0x80000000 ) {
+ softfloat_add96M( rem, x, rem );
+ }
+ expDiff -= 29;
+ }
+ /*--------------------------------------------------------------------
+ | (`expDiff' cannot be less than -29 here.)
+ *--------------------------------------------------------------------*/
+ q = (uint32_t) (x64>>32)>>(~expDiff & 31);
+ softfloat_remStep96MBy32( rem, expDiff + 30, x, q, rem );
+ if ( rem[indexWordHi( 3 )] & 0x80000000 ) {
+ remPtr = rem;
+ altRemPtr = rem2;
+ softfloat_add96M( remPtr, x, altRemPtr );
+ goto selectRem;
+ }
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ remPtr = rem;
+ altRemPtr = rem2;
+ do {
+ ++q;
+ newRemPtr = altRemPtr;
+ softfloat_sub96M( remPtr, x, newRemPtr );
+ altRemPtr = remPtr;
+ remPtr = newRemPtr;
+ } while ( ! (remPtr[indexWordHi( 3 )] & 0x80000000) );
+ selectRem:
+ softfloat_add96M( remPtr, altRemPtr, x );
+ wordMeanRem = x[indexWordHi( 3 )];
+ if (
+ (wordMeanRem & 0x80000000)
+ || (! wordMeanRem && (q & 1) && ! x[indexWord( 3, 0 )]
+ && ! x[indexWord( 3, 1 )])
+ ) {
+ remPtr = altRemPtr;
+ }
+ if ( remPtr[indexWordHi( 3 )] & 0x80000000 ) {
+ signRem = ! signRem;
+ softfloat_negX96M( remPtr );
+ }
+ softfloat_normRoundPackMToExtF80M( signRem, expB + 2, remPtr, 80, zSPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_invalidExtF80M( zSPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ copyA:
+ if ( expA < 1 ) {
+ sigA >>= 1 - expA;
+ expA = 0;
+ }
+ zSPtr->signExp = packToExtF80UI64( signRem, expA );
+ zSPtr->signif = sigA;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/extF80M_roundToInt.c b/src/libs/softfloat-3e/source/extF80M_roundToInt.c
new file mode 100644
index 00000000..f22774c8
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80M_roundToInt.c
@@ -0,0 +1,178 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void
+ extF80M_roundToInt(
+ const extFloat80_t *aPtr,
+ uint_fast8_t roundingMode,
+ bool exact,
+ extFloat80_t *zPtr
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+
+ *zPtr = extF80_roundToInt( *aPtr, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void
+ extF80M_roundToInt(
+ const extFloat80_t *aPtr,
+ uint_fast8_t roundingMode,
+ bool exact,
+ extFloat80_t *zPtr
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ const struct extFloat80M *aSPtr;
+ struct extFloat80M *zSPtr;
+ uint_fast16_t uiA64, signUI64;
+ int32_t exp;
+ uint64_t sigA;
+ uint_fast16_t uiZ64;
+ uint64_t sigZ, lastBitMask, roundBitsMask;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aSPtr = (const struct extFloat80M *) aPtr;
+ zSPtr = (struct extFloat80M *) zPtr;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiA64 = aSPtr->signExp;
+ signUI64 = uiA64 & packToExtF80UI64( 1, 0 );
+ exp = expExtF80UI64( uiA64 );
+ sigA = aSPtr->signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( !(sigA & UINT64_C( 0x8000000000000000 )) && (exp != 0x7FFF) ) {
+ if ( !sigA ) {
+ uiZ64 = signUI64;
+ sigZ = 0;
+ goto uiZ;
+ }
+ exp += softfloat_normExtF80SigM( &sigA );
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp <= 0x3FFE ) {
+ if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+ switch ( roundingMode ) {
+ case softfloat_round_near_even:
+ if ( !(sigA & UINT64_C( 0x7FFFFFFFFFFFFFFF )) ) break;
+ case softfloat_round_near_maxMag:
+ if ( exp == 0x3FFE ) goto mag1;
+ break;
+ case softfloat_round_min:
+ if ( signUI64 ) goto mag1;
+ break;
+ case softfloat_round_max:
+ if ( !signUI64 ) goto mag1;
+ break;
+#ifdef SOFTFLOAT_ROUND_ODD
+ case softfloat_round_odd:
+ goto mag1;
+#endif
+ }
+ uiZ64 = signUI64;
+ sigZ = 0;
+ goto uiZ;
+ mag1:
+ uiZ64 = signUI64 | 0x3FFF;
+ sigZ = UINT64_C( 0x8000000000000000 );
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( 0x403E <= exp ) {
+ if ( exp == 0x7FFF ) {
+ if ( sigA & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) {
+ softfloat_propagateNaNExtF80M( aSPtr, 0, zSPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return;
+ }
+ sigZ = UINT64_C( 0x8000000000000000 );
+ } else {
+ sigZ = sigA;
+ }
+ uiZ64 = signUI64 | exp;
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ64 = signUI64 | exp;
+ lastBitMask = (uint64_t) 1<<(0x403E - exp);
+ roundBitsMask = lastBitMask - 1;
+ sigZ = sigA;
+ if ( roundingMode == softfloat_round_near_maxMag ) {
+ sigZ += lastBitMask>>1;
+ } else if ( roundingMode == softfloat_round_near_even ) {
+ sigZ += lastBitMask>>1;
+ if ( !(sigZ & roundBitsMask) ) sigZ &= ~lastBitMask;
+ } else if (
+ roundingMode == (signUI64 ? softfloat_round_min : softfloat_round_max)
+ ) {
+ sigZ += roundBitsMask;
+ }
+ sigZ &= ~roundBitsMask;
+ if ( !sigZ ) {
+ ++uiZ64;
+ sigZ = UINT64_C( 0x8000000000000000 );
+ }
+ if ( sigZ != sigA ) {
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) sigZ |= lastBitMask;
+#endif
+ if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ uiZ:
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = sigZ;
+ return;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/extF80M_sqrt.c b/src/libs/softfloat-3e/source/extF80M_sqrt.c
new file mode 100644
index 00000000..e2d4fd21
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80M_sqrt.c
@@ -0,0 +1,180 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void extF80M_sqrt( const extFloat80_t *aPtr, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ *zPtr = extF80_sqrt( *aPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void extF80M_sqrt( const extFloat80_t *aPtr, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const struct extFloat80M *aSPtr;
+ struct extFloat80M *zSPtr;
+ uint_fast16_t uiA64, signUI64;
+ int32_t expA;
+ uint64_t rem64;
+ int32_t expZ;
+ uint32_t rem96[3], sig32A, recipSqrt32, sig32Z, q;
+ uint64_t sig64Z, x64;
+ uint32_t rem32, term[4], rem[4], extSigZ[3];
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aSPtr = (const struct extFloat80M *) aPtr;
+ zSPtr = (struct extFloat80M *) zPtr;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiA64 = aSPtr->signExp;
+ signUI64 = uiA64 & packToExtF80UI64( 1, 0 );
+ expA = expExtF80UI64( uiA64 );
+ rem64 = aSPtr->signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0x7FFF ) {
+ if ( rem64 & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) {
+ softfloat_propagateNaNExtF80M( aSPtr, 0, zSPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return;
+ }
+ if ( signUI64 ) goto invalid;
+ rem64 = UINT64_C( 0x8000000000000000 );
+ goto copyA;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expA ) expA = 1;
+ if ( ! (rem64 & UINT64_C( 0x8000000000000000 )) ) {
+ if ( ! rem64 ) {
+ uiA64 = signUI64;
+ goto copyA;
+ }
+ expA += softfloat_normExtF80SigM( &rem64 );
+ }
+ if ( signUI64 ) goto invalid;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expZ = ((expA - 0x3FFF)>>1) + 0x3FFF;
+ expA &= 1;
+ softfloat_shortShiftLeft64To96M( rem64, 30 - expA, rem96 );
+ sig32A = rem64>>32;
+ recipSqrt32 = softfloat_approxRecipSqrt32_1( expA, sig32A );
+ sig32Z = ((uint64_t) sig32A * recipSqrt32)>>32;
+ if ( expA ) sig32Z >>= 1;
+ rem64 =
+ ((uint64_t) rem96[indexWord( 3, 2 )]<<32 | rem96[indexWord( 3, 1 )])
+ - (uint64_t) sig32Z * sig32Z;
+ rem96[indexWord( 3, 2 )] = rem64>>32;
+ rem96[indexWord( 3, 1 )] = rem64;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ q = ((uint32_t) (rem64>>2) * (uint64_t) recipSqrt32)>>32;
+ sig64Z = ((uint64_t) sig32Z<<32) + ((uint64_t) q<<3);
+ term[indexWord( 3, 2 )] = 0;
+ /*------------------------------------------------------------------------
+ | (Repeating this loop is a rare occurrence.)
+ *------------------------------------------------------------------------*/
+ for (;;) {
+ x64 = ((uint64_t) sig32Z<<32) + sig64Z;
+ term[indexWord( 3, 1 )] = x64>>32;
+ term[indexWord( 3, 0 )] = x64;
+ softfloat_remStep96MBy32(
+ rem96, 29, term, q, &rem[indexMultiwordHi( 4, 3 )] );
+ rem32 = rem[indexWord( 4, 3 )];
+ if ( ! (rem32 & 0x80000000) ) break;
+ --q;
+ sig64Z -= 1<<3;
+ }
+ rem64 = (uint64_t) rem32<<32 | rem[indexWord( 4, 2 )];
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ q = (((uint32_t) (rem64>>2) * (uint64_t) recipSqrt32)>>32) + 2;
+ if ( rem64>>34 ) q += recipSqrt32;
+ x64 = (uint64_t) q<<7;
+ extSigZ[indexWord( 3, 0 )] = x64;
+ x64 = (sig64Z<<1) + (x64>>32);
+ extSigZ[indexWord( 3, 2 )] = x64>>32;
+ extSigZ[indexWord( 3, 1 )] = x64;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( (q & 0xFFFFFF) <= 2 ) {
+ q &= ~(uint32_t) 0xFFFF;
+ extSigZ[indexWordLo( 3 )] = q<<7;
+ x64 = sig64Z + (q>>27);
+ term[indexWord( 4, 3 )] = 0;
+ term[indexWord( 4, 2 )] = x64>>32;
+ term[indexWord( 4, 1 )] = x64;
+ term[indexWord( 4, 0 )] = q<<5;
+ rem[indexWord( 4, 0 )] = 0;
+ softfloat_remStep128MBy32( rem, 28, term, q, rem );
+ q = rem[indexWordHi( 4 )];
+ if ( q & 0x80000000 ) {
+ softfloat_sub1X96M( extSigZ );
+ } else {
+ if ( q || rem[indexWord( 4, 1 )] || rem[indexWord( 4, 2 )] ) {
+ extSigZ[indexWordLo( 3 )] |= 1;
+ }
+ }
+ }
+ softfloat_roundPackMToExtF80M(
+ 0, expZ, extSigZ, extF80_roundingPrecision, zSPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_invalidExtF80M( zSPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ copyA:
+ zSPtr->signExp = uiA64;
+ zSPtr->signif = rem64;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/extF80M_sub.c b/src/libs/softfloat-3e/source/extF80M_sub.c
new file mode 100644
index 00000000..d7fbd139
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80M_sub.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void
+ extF80M_sub(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const struct extFloat80M *aSPtr, *bSPtr;
+ uint_fast16_t uiA64;
+ uint_fast64_t uiA0;
+ bool signA;
+ uint_fast16_t uiB64;
+ uint_fast64_t uiB0;
+ bool signB;
+#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 2)
+ extFloat80_t
+ (*magsFuncPtr)(
+ uint_fast16_t, uint_fast64_t, uint_fast16_t, uint_fast64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+#endif
+
+ aSPtr = (const struct extFloat80M *) aPtr;
+ bSPtr = (const struct extFloat80M *) bPtr;
+ uiA64 = aSPtr->signExp;
+ uiA0 = aSPtr->signif;
+ signA = signExtF80UI64( uiA64 );
+ uiB64 = bSPtr->signExp;
+ uiB0 = bSPtr->signif;
+ signB = signExtF80UI64( uiB64 );
+#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
+ if ( signA == signB ) {
+ *zPtr = softfloat_subMagsExtF80( uiA64, uiA0, uiB64, uiB0, signA SOFTFLOAT_STATE_ARG_COMMA );
+ } else {
+ *zPtr = softfloat_addMagsExtF80( uiA64, uiA0, uiB64, uiB0, signA SOFTFLOAT_STATE_ARG_COMMA );
+ }
+#else
+ magsFuncPtr =
+ (signA == signB) ? softfloat_subMagsExtF80 : softfloat_addMagsExtF80;
+ *zPtr = (*magsFuncPtr)( uiA64, uiA0, uiB64, uiB0, signA SOFTFLOAT_STATE_ARG_COMMA );
+#endif
+
+}
+
+#else
+
+void
+ extF80M_sub(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ softfloat_addExtF80M(
+ (const struct extFloat80M *) aPtr,
+ (const struct extFloat80M *) bPtr,
+ (struct extFloat80M *) zPtr,
+ true
+ SOFTFLOAT_STATE_ARG_COMMA
+ );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/extF80M_to_f128M.c b/src/libs/softfloat-3e/source/extF80M_to_f128M.c
new file mode 100644
index 00000000..a7641209
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80M_to_f128M.c
@@ -0,0 +1,125 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void extF80M_to_f128M( const extFloat80_t *aPtr, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ *zPtr = extF80_to_f128( *aPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void extF80M_to_f128M( const extFloat80_t *aPtr, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const struct extFloat80M *aSPtr;
+ uint32_t *zWPtr;
+ uint_fast16_t uiA64;
+ bool sign;
+ int32_t exp;
+ uint64_t sig;
+ struct commonNaN commonNaN;
+ uint32_t uiZ96;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aSPtr = (const struct extFloat80M *) aPtr;
+ zWPtr = (uint32_t *) zPtr;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiA64 = aSPtr->signExp;
+ sign = signExtF80UI64( uiA64 );
+ exp = expExtF80UI64( uiA64 );
+ sig = aSPtr->signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zWPtr[indexWord( 4, 0 )] = 0;
+ if ( exp == 0x7FFF ) {
+ if ( sig & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) {
+ softfloat_extF80MToCommonNaN( aSPtr, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ softfloat_commonNaNToF128M( &commonNaN, zWPtr );
+ return;
+ }
+ uiZ96 = packToF128UI96( sign, 0x7FFF, 0 );
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp ) --exp;
+ if ( ! (sig & UINT64_C( 0x8000000000000000 )) ) {
+ if ( ! sig ) {
+ uiZ96 = packToF128UI96( sign, 0, 0 );
+ goto uiZ;
+ }
+ exp += softfloat_normExtF80SigM( &sig );
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zWPtr[indexWord( 4, 1 )] = (uint32_t) sig<<17;
+ sig >>= 15;
+ zWPtr[indexWord( 4, 2 )] = sig;
+ if ( exp < 0 ) {
+ zWPtr[indexWordHi( 4 )] = sig>>32;
+ softfloat_shiftRight96M(
+ &zWPtr[indexMultiwordHi( 4, 3 )],
+ -exp,
+ &zWPtr[indexMultiwordHi( 4, 3 )]
+ );
+ exp = 0;
+ sig = (uint64_t) zWPtr[indexWordHi( 4 )]<<32;
+ }
+ zWPtr[indexWordHi( 4 )] = packToF128UI96( sign, exp, sig>>32 );
+ return;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ:
+ zWPtr[indexWord( 4, 3 )] = uiZ96;
+ zWPtr[indexWord( 4, 2 )] = 0;
+ zWPtr[indexWord( 4, 1 )] = 0;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/extF80M_to_f16.c b/src/libs/softfloat-3e/source/extF80M_to_f16.c
new file mode 100644
index 00000000..482254c0
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80M_to_f16.c
@@ -0,0 +1,112 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+float16_t extF80M_to_f16( const extFloat80_t *aPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return extF80_to_f16( *aPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+float16_t extF80M_to_f16( const extFloat80_t *aPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const struct extFloat80M *aSPtr;
+ uint_fast16_t uiA64;
+ bool sign;
+ int32_t exp;
+ uint64_t sig;
+ struct commonNaN commonNaN;
+ uint16_t uiZ, sig16;
+ union ui16_f16 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aSPtr = (const struct extFloat80M *) aPtr;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiA64 = aSPtr->signExp;
+ sign = signExtF80UI64( uiA64 );
+ exp = expExtF80UI64( uiA64 );
+ sig = aSPtr->signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x7FFF ) {
+ if ( sig & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) {
+ softfloat_extF80MToCommonNaN( aSPtr, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToF16UI( &commonNaN );
+ } else {
+ uiZ = packToF16UI( sign, 0x1F, 0 );
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! (sig & UINT64_C( 0x8000000000000000 )) ) {
+ if ( ! sig ) {
+ uiZ = packToF16UI( sign, 0, 0 );
+ goto uiZ;
+ }
+ exp += softfloat_normExtF80SigM( &sig );
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sig16 = softfloat_shortShiftRightJam64( sig, 49 );
+ exp -= 0x3FF1;
+ if ( sizeof (int_fast16_t) < sizeof (int32_t) ) {
+ if ( exp < -0x40 ) exp = -0x40;
+ }
+ return softfloat_roundPackToF16( sign, exp, sig16 SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/extF80M_to_f32.c b/src/libs/softfloat-3e/source/extF80M_to_f32.c
new file mode 100644
index 00000000..bd0e2e66
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80M_to_f32.c
@@ -0,0 +1,112 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+float32_t extF80M_to_f32( const extFloat80_t *aPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return extF80_to_f32( *aPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+float32_t extF80M_to_f32( const extFloat80_t *aPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const struct extFloat80M *aSPtr;
+ uint_fast16_t uiA64;
+ bool sign;
+ int32_t exp;
+ uint64_t sig;
+ struct commonNaN commonNaN;
+ uint32_t uiZ, sig32;
+ union ui32_f32 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aSPtr = (const struct extFloat80M *) aPtr;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiA64 = aSPtr->signExp;
+ sign = signExtF80UI64( uiA64 );
+ exp = expExtF80UI64( uiA64 );
+ sig = aSPtr->signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x7FFF ) {
+ if ( sig & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) {
+ softfloat_extF80MToCommonNaN( aSPtr, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToF32UI( &commonNaN );
+ } else {
+ uiZ = packToF32UI( sign, 0xFF, 0 );
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! (sig & UINT64_C( 0x8000000000000000 )) ) {
+ if ( ! sig ) {
+ uiZ = packToF32UI( sign, 0, 0 );
+ goto uiZ;
+ }
+ exp += softfloat_normExtF80SigM( &sig );
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sig32 = softfloat_shortShiftRightJam64( sig, 33 );
+ exp -= 0x3F81;
+ if ( sizeof (int_fast16_t) < sizeof (int32_t) ) {
+ if ( exp < -0x1000 ) exp = -0x1000;
+ }
+ return softfloat_roundPackToF32( sign, exp, sig32 SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/extF80M_to_f64.c b/src/libs/softfloat-3e/source/extF80M_to_f64.c
new file mode 100644
index 00000000..10c09747
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80M_to_f64.c
@@ -0,0 +1,112 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+float64_t extF80M_to_f64( const extFloat80_t *aPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return extF80_to_f64( *aPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+float64_t extF80M_to_f64( const extFloat80_t *aPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const struct extFloat80M *aSPtr;
+ uint_fast16_t uiA64;
+ bool sign;
+ int32_t exp;
+ uint64_t sig;
+ struct commonNaN commonNaN;
+ uint64_t uiZ;
+ union ui64_f64 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aSPtr = (const struct extFloat80M *) aPtr;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiA64 = aSPtr->signExp;
+ sign = signExtF80UI64( uiA64 );
+ exp = expExtF80UI64( uiA64 );
+ sig = aSPtr->signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x7FFF ) {
+ if ( sig & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) {
+ softfloat_extF80MToCommonNaN( aSPtr, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToF64UI( &commonNaN );
+ } else {
+ uiZ = packToF64UI( sign, 0x7FF, 0 );
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! (sig & UINT64_C( 0x8000000000000000 )) ) {
+ if ( ! sig ) {
+ uiZ = packToF64UI( sign, 0, 0 );
+ goto uiZ;
+ }
+ exp += softfloat_normExtF80SigM( &sig );
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sig = softfloat_shortShiftRightJam64( sig, 1 );
+ exp -= 0x3C01;
+ if ( sizeof (int_fast16_t) < sizeof (int32_t) ) {
+ if ( exp < -0x1000 ) exp = -0x1000;
+ }
+ return softfloat_roundPackToF64( sign, exp, sig SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/extF80M_to_i32.c b/src/libs/softfloat-3e/source/extF80M_to_i32.c
new file mode 100644
index 00000000..c1566a1c
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80M_to_i32.c
@@ -0,0 +1,100 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+int_fast32_t
+ extF80M_to_i32(
+ const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return extF80_to_i32( *aPtr, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+int_fast32_t
+ extF80M_to_i32(
+ const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const struct extFloat80M *aSPtr;
+ uint_fast16_t uiA64;
+ bool sign;
+ int32_t exp;
+ uint64_t sig;
+ int32_t shiftDist;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aSPtr = (const struct extFloat80M *) aPtr;
+ uiA64 = aSPtr->signExp;
+ sign = signExtF80UI64( uiA64 );
+ exp = expExtF80UI64( uiA64 );
+ sig = aSPtr->signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x4032 - exp;
+ if ( shiftDist <= 0 ) {
+ if ( sig>>32 ) goto invalid;
+ if ( -32 < shiftDist ) {
+ sig <<= -shiftDist;
+ } else {
+ if ( (uint32_t) sig ) goto invalid;
+ }
+ } else {
+ sig = softfloat_shiftRightJam64( sig, shiftDist );
+ }
+ return softfloat_roundToI32( sign, sig, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF )) ? i32_fromNaN
+ : sign ? i32_fromNegOverflow : i32_fromPosOverflow;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/extF80M_to_i32_r_minMag.c b/src/libs/softfloat-3e/source/extF80M_to_i32_r_minMag.c
new file mode 100644
index 00000000..a12b06c8
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80M_to_i32_r_minMag.c
@@ -0,0 +1,120 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+int_fast32_t extF80M_to_i32_r_minMag( const extFloat80_t *aPtr, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return extF80_to_i32_r_minMag( *aPtr, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+int_fast32_t extF80M_to_i32_r_minMag( const extFloat80_t *aPtr, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const struct extFloat80M *aSPtr;
+ uint_fast16_t uiA64;
+ int32_t exp;
+ uint64_t sig;
+ int32_t shiftDist;
+ bool sign, raiseInexact;
+ int32_t z;
+ uint64_t shiftedSig;
+ uint32_t absZ;
+ union { uint32_t ui; int32_t i; } u;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aSPtr = (const struct extFloat80M *) aPtr;
+ uiA64 = aSPtr->signExp;
+ exp = expExtF80UI64( uiA64 );
+ sig = aSPtr->signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! sig && (exp != 0x7FFF) ) return 0;
+ shiftDist = 0x403E - exp;
+ if ( 64 <= shiftDist ) {
+ raiseInexact = exact;
+ z = 0;
+ } else {
+ sign = signExtF80UI64( uiA64 );
+ raiseInexact = false;
+ if ( shiftDist < 0 ) {
+ if ( sig>>32 || (shiftDist <= -31) ) goto invalid;
+ shiftedSig = (uint64_t) (uint32_t) sig<<-shiftDist;
+ if ( shiftedSig>>32 ) goto invalid;
+ absZ = shiftedSig;
+ } else {
+ shiftedSig = sig;
+ if ( shiftDist ) shiftedSig >>= shiftDist;
+ if ( shiftedSig>>32 ) goto invalid;
+ absZ = shiftedSig;
+ if ( exact && shiftDist ) {
+ raiseInexact = ((uint64_t) absZ<<shiftDist != sig);
+ }
+ }
+ if ( sign ) {
+ if ( 0x80000000 < absZ ) goto invalid;
+ u.ui = -absZ;
+ z = u.i;
+ } else {
+ if ( 0x80000000 <= absZ ) goto invalid;
+ z = absZ;
+ }
+ }
+ if ( raiseInexact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+ return z;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF )) ? i32_fromNaN
+ : sign ? i32_fromNegOverflow : i32_fromPosOverflow;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/extF80M_to_i64.c b/src/libs/softfloat-3e/source/extF80M_to_i64.c
new file mode 100644
index 00000000..acf7cfc6
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80M_to_i64.c
@@ -0,0 +1,97 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+int_fast64_t
+ extF80M_to_i64(
+ const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return extF80_to_i64( *aPtr, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+int_fast64_t
+ extF80M_to_i64(
+ const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const struct extFloat80M *aSPtr;
+ uint_fast16_t uiA64;
+ bool sign;
+ int32_t exp;
+ uint64_t sig;
+ int32_t shiftDist;
+ uint32_t extSig[3];
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aSPtr = (const struct extFloat80M *) aPtr;
+ uiA64 = aSPtr->signExp;
+ sign = signExtF80UI64( uiA64 );
+ exp = expExtF80UI64( uiA64 );
+ sig = aSPtr->signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x403E - exp;
+ if ( shiftDist < 0 ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
+ ? i64_fromNaN
+ : sign ? i64_fromNegOverflow : i64_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ extSig[indexWord( 3, 2 )] = sig>>32;
+ extSig[indexWord( 3, 1 )] = sig;
+ extSig[indexWord( 3, 0 )] = 0;
+ if ( shiftDist ) softfloat_shiftRightJam96M( extSig, shiftDist, extSig );
+ return softfloat_roundMToI64( sign, extSig, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/extF80M_to_i64_r_minMag.c b/src/libs/softfloat-3e/source/extF80M_to_i64_r_minMag.c
new file mode 100644
index 00000000..fc5f750c
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80M_to_i64_r_minMag.c
@@ -0,0 +1,115 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+int_fast64_t extF80M_to_i64_r_minMag( const extFloat80_t *aPtr, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return extF80_to_i64_r_minMag( *aPtr, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+int_fast64_t extF80M_to_i64_r_minMag( const extFloat80_t *aPtr, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const struct extFloat80M *aSPtr;
+ uint_fast16_t uiA64;
+ int32_t exp;
+ uint64_t sig;
+ int32_t shiftDist;
+ bool sign, raiseInexact;
+ int64_t z;
+ uint64_t absZ;
+ union { uint64_t ui; int64_t i; } u;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aSPtr = (const struct extFloat80M *) aPtr;
+ uiA64 = aSPtr->signExp;
+ exp = expExtF80UI64( uiA64 );
+ sig = aSPtr->signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! sig && (exp != 0x7FFF) ) return 0;
+ shiftDist = 0x403E - exp;
+ if ( 64 <= shiftDist ) {
+ raiseInexact = exact;
+ z = 0;
+ } else {
+ sign = signExtF80UI64( uiA64 );
+ raiseInexact = false;
+ if ( shiftDist < 0 ) {
+ if ( shiftDist <= -63 ) goto invalid;
+ shiftDist = -shiftDist;
+ absZ = sig<<shiftDist;
+ if ( absZ>>shiftDist != sig ) goto invalid;
+ } else {
+ absZ = sig;
+ if ( shiftDist ) absZ >>= shiftDist;
+ if ( exact && shiftDist ) raiseInexact = (absZ<<shiftDist != sig);
+ }
+ if ( sign ) {
+ if ( UINT64_C( 0x8000000000000000 ) < absZ ) goto invalid;
+ u.ui = -absZ;
+ z = u.i;
+ } else {
+ if ( UINT64_C( 0x8000000000000000 ) <= absZ ) goto invalid;
+ z = absZ;
+ }
+ }
+ if ( raiseInexact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+ return z;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF )) ? i64_fromNaN
+ : sign ? i64_fromNegOverflow : i64_fromPosOverflow;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/extF80M_to_ui32.c b/src/libs/softfloat-3e/source/extF80M_to_ui32.c
new file mode 100644
index 00000000..5119ee26
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80M_to_ui32.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+uint_fast32_t
+ extF80M_to_ui32(
+ const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return extF80_to_ui32( *aPtr, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+uint_fast32_t
+ extF80M_to_ui32(
+ const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const struct extFloat80M *aSPtr;
+ uint_fast16_t uiA64;
+ bool sign;
+ int32_t exp;
+ uint64_t sig;
+ int32_t shiftDist;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aSPtr = (const struct extFloat80M *) aPtr;
+ uiA64 = aSPtr->signExp;
+ sign = signExtF80UI64( uiA64 );
+ exp = expExtF80UI64( uiA64 );
+ sig = aSPtr->signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x4032 - exp;
+ if ( shiftDist <= 0 ) {
+ if ( sig>>32 ) goto invalid;
+ if ( -32 < shiftDist ) {
+ sig <<= -shiftDist;
+ } else {
+ if ( (uint32_t) sig ) goto invalid;
+ }
+ } else {
+ sig = softfloat_shiftRightJam64( sig, shiftDist );
+ }
+ return softfloat_roundToUI32( sign, sig, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
+ ? ui32_fromNaN
+ : sign ? ui32_fromNegOverflow : ui32_fromPosOverflow;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/extF80M_to_ui32_r_minMag.c b/src/libs/softfloat-3e/source/extF80M_to_ui32_r_minMag.c
new file mode 100644
index 00000000..79a3351f
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80M_to_ui32_r_minMag.c
@@ -0,0 +1,111 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+uint_fast32_t extF80M_to_ui32_r_minMag( const extFloat80_t *aPtr, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return extF80_to_ui32_r_minMag( *aPtr, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+uint_fast32_t extF80M_to_ui32_r_minMag( const extFloat80_t *aPtr, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const struct extFloat80M *aSPtr;
+ uint_fast16_t uiA64;
+ int32_t exp;
+ uint64_t sig;
+ int32_t shiftDist;
+ bool sign;
+ uint64_t shiftedSig;
+ uint32_t z;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aSPtr = (const struct extFloat80M *) aPtr;
+ uiA64 = aSPtr->signExp;
+ exp = expExtF80UI64( uiA64 );
+ sig = aSPtr->signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! sig && (exp != 0x7FFF) ) return 0;
+ shiftDist = 0x403E - exp;
+ if ( 64 <= shiftDist ) {
+ if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+ return 0;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sign = signExtF80UI64( uiA64 );
+ if ( shiftDist < 0 ) {
+ if ( sign || sig>>32 || (shiftDist <= -31) ) goto invalid;
+ shiftedSig = (uint64_t) (uint32_t) sig<<-shiftDist;
+ if ( shiftedSig>>32 ) goto invalid;
+ z = shiftedSig;
+ } else {
+ shiftedSig = sig;
+ if ( shiftDist ) shiftedSig >>= shiftDist;
+ if ( shiftedSig>>32 ) goto invalid;
+ z = shiftedSig;
+ if ( sign && z ) goto invalid;
+ if ( exact && shiftDist && ((uint64_t) z<<shiftDist != sig) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ }
+ return z;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
+ ? ui32_fromNaN
+ : sign ? ui32_fromNegOverflow : ui32_fromPosOverflow;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/extF80M_to_ui64.c b/src/libs/softfloat-3e/source/extF80M_to_ui64.c
new file mode 100644
index 00000000..4179abc0
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80M_to_ui64.c
@@ -0,0 +1,97 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+uint_fast64_t
+ extF80M_to_ui64(
+ const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return extF80_to_ui64( *aPtr, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+uint_fast64_t
+ extF80M_to_ui64(
+ const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const struct extFloat80M *aSPtr;
+ uint_fast16_t uiA64;
+ bool sign;
+ int32_t exp;
+ uint64_t sig;
+ int32_t shiftDist;
+ uint32_t extSig[3];
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aSPtr = (const struct extFloat80M *) aPtr;
+ uiA64 = aSPtr->signExp;
+ sign = signExtF80UI64( uiA64 );
+ exp = expExtF80UI64( uiA64 );
+ sig = aSPtr->signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x403E - exp;
+ if ( shiftDist < 0 ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
+ ? ui64_fromNaN
+ : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ extSig[indexWord( 3, 2 )] = sig>>32;
+ extSig[indexWord( 3, 1 )] = sig;
+ extSig[indexWord( 3, 0 )] = 0;
+ if ( shiftDist ) softfloat_shiftRightJam96M( extSig, shiftDist, extSig );
+ return softfloat_roundMToUI64( sign, extSig, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA);
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/extF80M_to_ui64_r_minMag.c b/src/libs/softfloat-3e/source/extF80M_to_ui64_r_minMag.c
new file mode 100644
index 00000000..8d9e77d3
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80M_to_ui64_r_minMag.c
@@ -0,0 +1,108 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+uint_fast64_t extF80M_to_ui64_r_minMag( const extFloat80_t *aPtr, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return extF80_to_ui64_r_minMag( *aPtr, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+uint_fast64_t extF80M_to_ui64_r_minMag( const extFloat80_t *aPtr, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const struct extFloat80M *aSPtr;
+ uint_fast16_t uiA64;
+ int32_t exp;
+ uint64_t sig;
+ int32_t shiftDist;
+ bool sign;
+ uint64_t z;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aSPtr = (const struct extFloat80M *) aPtr;
+ uiA64 = aSPtr->signExp;
+ exp = expExtF80UI64( uiA64 );
+ sig = aSPtr->signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! sig && (exp != 0x7FFF) ) return 0;
+ shiftDist = 0x403E - exp;
+ if ( 64 <= shiftDist ) {
+ if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+ return 0;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sign = signExtF80UI64( uiA64 );
+ if ( shiftDist < 0 ) {
+ if ( sign || (shiftDist <= -63) ) goto invalid;
+ shiftDist = -shiftDist;
+ z = sig<<shiftDist;
+ if ( z>>shiftDist != sig ) goto invalid;
+ } else {
+ z = sig;
+ if ( shiftDist ) z >>= shiftDist;
+ if ( sign && z ) goto invalid;
+ if ( exact && shiftDist && (z<<shiftDist != sig) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ }
+ return z;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
+ ? ui64_fromNaN
+ : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/extF80_add.c b/src/libs/softfloat-3e/source/extF80_add.c
new file mode 100644
index 00000000..139a6a32
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_add.c
@@ -0,0 +1,80 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+extFloat80_t extF80_add( extFloat80_t a, extFloat80_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64;
+ uint_fast64_t uiA0;
+ bool signA;
+ union { struct extFloat80M s; extFloat80_t f; } uB;
+ uint_fast16_t uiB64;
+ uint_fast64_t uiB0;
+ bool signB;
+#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 2)
+ extFloat80_t
+ (*magsFuncPtr)(
+ uint_fast16_t, uint_fast64_t, uint_fast16_t, uint_fast64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+#endif
+
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ uiA0 = uA.s.signif;
+ signA = signExtF80UI64( uiA64 );
+ uB.f = b;
+ uiB64 = uB.s.signExp;
+ uiB0 = uB.s.signif;
+ signB = signExtF80UI64( uiB64 );
+#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
+ if ( signA == signB ) {
+ return softfloat_addMagsExtF80( uiA64, uiA0, uiB64, uiB0, signA SOFTFLOAT_STATE_ARG_COMMA );
+ } else {
+ return softfloat_subMagsExtF80( uiA64, uiA0, uiB64, uiB0, signA SOFTFLOAT_STATE_ARG_COMMA );
+ }
+#else
+ magsFuncPtr =
+ (signA == signB) ? softfloat_addMagsExtF80 : softfloat_subMagsExtF80;
+ return (*magsFuncPtr)( uiA64, uiA0, uiB64, uiB0, signA SOFTFLOAT_STATE_ARG_COMMA );
+#endif
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_div.c b/src/libs/softfloat-3e/source/extF80_div.c
new file mode 100644
index 00000000..28f43ba7
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_div.c
@@ -0,0 +1,203 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+extFloat80_t extF80_div( extFloat80_t a, extFloat80_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64;
+ uint_fast64_t uiA0;
+ bool signA;
+ int_fast32_t expA;
+ uint_fast64_t sigA;
+ union { struct extFloat80M s; extFloat80_t f; } uB;
+ uint_fast16_t uiB64;
+ uint_fast64_t uiB0;
+ bool signB;
+ int_fast32_t expB;
+ uint_fast64_t sigB;
+ bool signZ;
+ struct exp32_sig64 normExpSig;
+ int_fast32_t expZ;
+ struct uint128 rem;
+ uint_fast32_t recip32;
+ uint_fast64_t sigZ;
+ int ix;
+ uint_fast64_t q64;
+ uint_fast32_t q;
+ struct uint128 term;
+ uint_fast64_t sigZExtra;
+ struct uint128 uiZ;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+ union { struct extFloat80M s; extFloat80_t f; } uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ uiA0 = uA.s.signif;
+ signA = signExtF80UI64( uiA64 );
+ expA = expExtF80UI64( uiA64 );
+ sigA = uiA0;
+ uB.f = b;
+ uiB64 = uB.s.signExp;
+ uiB0 = uB.s.signif;
+ signB = signExtF80UI64( uiB64 );
+ expB = expExtF80UI64( uiB64 );
+ sigB = uiB0;
+ signZ = signA ^ signB;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0x7FFF ) {
+ if ( sigA & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) goto propagateNaN;
+ if ( expB == 0x7FFF ) {
+ if ( sigB & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) goto propagateNaN;
+ goto invalid;
+ }
+ goto infinity;
+ }
+ if ( expB == 0x7FFF ) {
+ if ( sigB & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) goto propagateNaN;
+ goto zero;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expB ) expB = 1;
+ if ( ! (sigB & UINT64_C( 0x8000000000000000 )) ) {
+ if ( ! sigB ) {
+ if ( ! sigA ) goto invalid;
+ softfloat_raiseFlags( softfloat_flag_infinite SOFTFLOAT_STATE_ARG_COMMA );
+ goto infinity;
+ }
+ normExpSig = softfloat_normSubnormalExtF80Sig( sigB );
+ expB += normExpSig.exp;
+ sigB = normExpSig.sig;
+ }
+ if ( ! expA ) expA = 1;
+ if ( ! (sigA & UINT64_C( 0x8000000000000000 )) ) {
+ if ( ! sigA ) goto zero;
+ normExpSig = softfloat_normSubnormalExtF80Sig( sigA );
+ expA += normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expZ = expA - expB + 0x3FFF;
+ if ( sigA < sigB ) {
+ --expZ;
+ rem = softfloat_shortShiftLeft128( 0, sigA, 32 );
+ } else {
+ rem = softfloat_shortShiftLeft128( 0, sigA, 31 );
+ }
+ recip32 = softfloat_approxRecip32_1( sigB>>32 );
+ sigZ = 0;
+ ix = 2;
+ for (;;) {
+ q64 = (uint_fast64_t) (uint32_t) (rem.v64>>2) * recip32;
+ q = (q64 + 0x80000000)>>32;
+ --ix;
+ if ( ix < 0 ) break;
+ rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, 29 );
+ term = softfloat_mul64ByShifted32To128( sigB, q );
+ rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 );
+ if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) {
+ --q;
+ rem = softfloat_add128( rem.v64, rem.v0, sigB>>32, sigB<<32 );
+ }
+ sigZ = (sigZ<<29) + q;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ((q + 1) & 0x3FFFFF) < 2 ) {
+ rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, 29 );
+ term = softfloat_mul64ByShifted32To128( sigB, q );
+ rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 );
+ term = softfloat_shortShiftLeft128( 0, sigB, 32 );
+ if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) {
+ --q;
+ rem = softfloat_add128( rem.v64, rem.v0, term.v64, term.v0 );
+ } else if ( softfloat_le128( term.v64, term.v0, rem.v64, rem.v0 ) ) {
+ ++q;
+ rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 );
+ }
+ if ( rem.v64 | rem.v0 ) q |= 1;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sigZ = (sigZ<<6) + (q>>23);
+ sigZExtra = (uint64_t) ((uint_fast64_t) q<<41);
+ return
+ softfloat_roundPackToExtF80(
+ signZ, expZ, sigZ, sigZExtra, extF80_roundingPrecision SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN:
+ uiZ = softfloat_propagateNaNExtF80UI( uiA64, uiA0, uiB64, uiB0 SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ64 = uiZ.v64;
+ uiZ0 = uiZ.v0;
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ64 = defaultNaNExtF80UI64;
+ uiZ0 = defaultNaNExtF80UI0;
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ infinity:
+ uiZ64 = packToExtF80UI64( signZ, 0x7FFF );
+ uiZ0 = UINT64_C( 0x8000000000000000 );
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zero:
+ uiZ64 = packToExtF80UI64( signZ, 0 );
+ uiZ0 = 0;
+ uiZ:
+ uZ.s.signExp = uiZ64;
+ uZ.s.signif = uiZ0;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_eq.c b/src/libs/softfloat-3e/source/extF80_eq.c
new file mode 100644
index 00000000..3ea98e8d
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_eq.c
@@ -0,0 +1,73 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool extF80_eq( extFloat80_t a, extFloat80_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64;
+ uint_fast64_t uiA0;
+ union { struct extFloat80M s; extFloat80_t f; } uB;
+ uint_fast16_t uiB64;
+ uint_fast64_t uiB0;
+
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ uiA0 = uA.s.signif;
+ uB.f = b;
+ uiB64 = uB.s.signExp;
+ uiB0 = uB.s.signif;
+ if ( isNaNExtF80UI( uiA64, uiA0 ) || isNaNExtF80UI( uiB64, uiB0 ) ) {
+ if (
+ softfloat_isSigNaNExtF80UI( uiA64, uiA0 )
+ || softfloat_isSigNaNExtF80UI( uiB64, uiB0 )
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ return false;
+ }
+ return
+ (uiA0 == uiB0)
+ && ((uiA64 == uiB64) || (! uiA0 && ! ((uiA64 | uiB64) & 0x7FFF)));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_eq_signaling.c b/src/libs/softfloat-3e/source/extF80_eq_signaling.c
new file mode 100644
index 00000000..976077ad
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_eq_signaling.c
@@ -0,0 +1,67 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+bool extF80_eq_signaling( extFloat80_t a, extFloat80_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64;
+ uint_fast64_t uiA0;
+ union { struct extFloat80M s; extFloat80_t f; } uB;
+ uint_fast16_t uiB64;
+ uint_fast64_t uiB0;
+
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ uiA0 = uA.s.signif;
+ uB.f = b;
+ uiB64 = uB.s.signExp;
+ uiB0 = uB.s.signif;
+ if ( isNaNExtF80UI( uiA64, uiA0 ) || isNaNExtF80UI( uiB64, uiB0 ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return false;
+ }
+ return
+ (uiA0 == uiB0)
+ && ((uiA64 == uiB64) || (! uiA0 && ! ((uiA64 | uiB64) & 0x7FFF)));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_isSignalingNaN.c b/src/libs/softfloat-3e/source/extF80_isSignalingNaN.c
new file mode 100644
index 00000000..6086f4b7
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_isSignalingNaN.c
@@ -0,0 +1,51 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool extF80_isSignalingNaN( extFloat80_t a )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+
+ uA.f = a;
+ return softfloat_isSigNaNExtF80UI( uA.s.signExp, uA.s.signif );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_le.c b/src/libs/softfloat-3e/source/extF80_le.c
new file mode 100644
index 00000000..62e05102
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_le.c
@@ -0,0 +1,73 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool extF80_le( extFloat80_t a, extFloat80_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64;
+ uint_fast64_t uiA0;
+ union { struct extFloat80M s; extFloat80_t f; } uB;
+ uint_fast16_t uiB64;
+ uint_fast64_t uiB0;
+ bool signA, signB;
+
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ uiA0 = uA.s.signif;
+ uB.f = b;
+ uiB64 = uB.s.signExp;
+ uiB0 = uB.s.signif;
+ if ( isNaNExtF80UI( uiA64, uiA0 ) || isNaNExtF80UI( uiB64, uiB0 ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return false;
+ }
+ signA = signExtF80UI64( uiA64 );
+ signB = signExtF80UI64( uiB64 );
+ return
+ (signA != signB)
+ ? signA || ! (((uiA64 | uiB64) & 0x7FFF) | uiA0 | uiB0)
+ : ((uiA64 == uiB64) && (uiA0 == uiB0))
+ || (signA ^ softfloat_lt128( uiA64, uiA0, uiB64, uiB0 ));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_le_quiet.c b/src/libs/softfloat-3e/source/extF80_le_quiet.c
new file mode 100644
index 00000000..27927f20
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_le_quiet.c
@@ -0,0 +1,78 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool extF80_le_quiet( extFloat80_t a, extFloat80_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64;
+ uint_fast64_t uiA0;
+ union { struct extFloat80M s; extFloat80_t f; } uB;
+ uint_fast16_t uiB64;
+ uint_fast64_t uiB0;
+ bool signA, signB;
+
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ uiA0 = uA.s.signif;
+ uB.f = b;
+ uiB64 = uB.s.signExp;
+ uiB0 = uB.s.signif;
+ if ( isNaNExtF80UI( uiA64, uiA0 ) || isNaNExtF80UI( uiB64, uiB0 ) ) {
+ if (
+ softfloat_isSigNaNExtF80UI( uiA64, uiA0 )
+ || softfloat_isSigNaNExtF80UI( uiB64, uiB0 )
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ return false;
+ }
+ signA = signExtF80UI64( uiA64 );
+ signB = signExtF80UI64( uiB64 );
+ return
+ (signA != signB)
+ ? signA || ! (((uiA64 | uiB64) & 0x7FFF) | uiA0 | uiB0)
+ : ((uiA64 == uiB64) && (uiA0 == uiB0))
+ || (signA ^ softfloat_lt128( uiA64, uiA0, uiB64, uiB0 ));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_log2.c b/src/libs/softfloat-3e/source/extF80_log2.c
new file mode 100644
index 00000000..7b028ece
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_log2.c
@@ -0,0 +1,80 @@
+/** @file
+ * SoftFloat - VBox Extension - extF80_ylog2x, extF80_ylog2xp1.
+ */
+
+/*
+ * Copyright (C) 2022 Oracle and/or its affiliates.
+ *
+ * This file is part of VirtualYox base platform packages, as
+ * available from https://www.virtualbox.org.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, in version 3 of the
+ * License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTAYILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <https://www.gnu.org/licenses>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-only
+ */
+
+/*********************************************************************************************************************************
+ * Header Files *
+ *********************************************************************************************************************************/
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+#include <iprt/types.h>
+#include <iprt/x86.h>
+
+extFloat80_t extF80_ylog2x(extFloat80_t y, extFloat80_t x SOFTFLOAT_STATE_DECL_COMMA)
+{
+ union { struct extFloat80M s; extFloat80_t f; } uX, uXM;
+ uint_fast16_t uiX64;
+ uint_fast64_t uiX0;
+ bool signX;
+ int_fast32_t expX;
+ uint_fast64_t sigX;
+ extFloat80_t v;
+
+ uX.f = x;
+ uiX64 = uX.s.signExp;
+ uiX0 = uX.s.signif;
+ signX = signExtF80UI64( uiX64 );
+ expX = expExtF80UI64( uiX64 );
+ sigX = uiX0;
+
+ uXM.s.signExp = RTFLOAT80U_EXP_BIAS;
+ uXM.s.signif = sigX;
+
+ v = ui32_to_extF80(expX - RTFLOAT80U_EXP_BIAS - 1, pState);
+ v = extF80_add(v, uXM.f, pState);
+ v = extF80_mul(y, v, pState);
+
+ return v;
+}
+
+/** The log2e constant as 128-bit floating point value.
+ * base-10: 1.44269504088896340735992468100189185
+ * base-16: 1.71547652b82fe1777d0ffda0d239
+ * base-2 : 1.0111000101010100011101100101001010111000001011111110000101110111011111010000111111111101101000001101001000111001 */
+const RTFLOAT128U g_r128Log2e = RTFLOAT128U_INIT_C(0, 0x71547652b82f, 0xe1777d0ffda0d239, 0x3fff);
+
+extFloat80_t extF80_ylog2xp1(extFloat80_t y, extFloat80_t x SOFTFLOAT_STATE_DECL_COMMA)
+{
+ extFloat80_t v = f128_to_extF80(*(float128_t *)&g_r128Log2e, pState);
+
+ v = extF80_mul(v, y, pState);
+ v = extF80_mul(v, x, pState);
+
+ return v;
+}
diff --git a/src/libs/softfloat-3e/source/extF80_lt.c b/src/libs/softfloat-3e/source/extF80_lt.c
new file mode 100644
index 00000000..ca824086
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_lt.c
@@ -0,0 +1,73 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool extF80_lt( extFloat80_t a, extFloat80_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64;
+ uint_fast64_t uiA0;
+ union { struct extFloat80M s; extFloat80_t f; } uB;
+ uint_fast16_t uiB64;
+ uint_fast64_t uiB0;
+ bool signA, signB;
+
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ uiA0 = uA.s.signif;
+ uB.f = b;
+ uiB64 = uB.s.signExp;
+ uiB0 = uB.s.signif;
+ if ( isNaNExtF80UI( uiA64, uiA0 ) || isNaNExtF80UI( uiB64, uiB0 ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return false;
+ }
+ signA = signExtF80UI64( uiA64 );
+ signB = signExtF80UI64( uiB64 );
+ return
+ (signA != signB)
+ ? signA && (((uiA64 | uiB64) & 0x7FFF) | uiA0 | uiB0)
+ : ((uiA64 != uiB64) || (uiA0 != uiB0))
+ && (signA ^ softfloat_lt128( uiA64, uiA0, uiB64, uiB0 ));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_lt_quiet.c b/src/libs/softfloat-3e/source/extF80_lt_quiet.c
new file mode 100644
index 00000000..08c18d62
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_lt_quiet.c
@@ -0,0 +1,78 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool extF80_lt_quiet( extFloat80_t a, extFloat80_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64;
+ uint_fast64_t uiA0;
+ union { struct extFloat80M s; extFloat80_t f; } uB;
+ uint_fast16_t uiB64;
+ uint_fast64_t uiB0;
+ bool signA, signB;
+
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ uiA0 = uA.s.signif;
+ uB.f = b;
+ uiB64 = uB.s.signExp;
+ uiB0 = uB.s.signif;
+ if ( isNaNExtF80UI( uiA64, uiA0 ) || isNaNExtF80UI( uiB64, uiB0 ) ) {
+ if (
+ softfloat_isSigNaNExtF80UI( uiA64, uiA0 )
+ || softfloat_isSigNaNExtF80UI( uiB64, uiB0 )
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ return false;
+ }
+ signA = signExtF80UI64( uiA64 );
+ signB = signExtF80UI64( uiB64 );
+ return
+ (signA != signB)
+ ? signA && (((uiA64 | uiB64) & 0x7FFF) | uiA0 | uiB0)
+ : ((uiA64 != uiB64) || (uiA0 != uiB0))
+ && (signA ^ softfloat_lt128( uiA64, uiA0, uiB64, uiB0 ));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_mul.c b/src/libs/softfloat-3e/source/extF80_mul.c
new file mode 100644
index 00000000..696535c1
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_mul.c
@@ -0,0 +1,158 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+extFloat80_t extF80_mul( extFloat80_t a, extFloat80_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64;
+ uint_fast64_t uiA0;
+ bool signA;
+ int_fast32_t expA;
+ uint_fast64_t sigA;
+ union { struct extFloat80M s; extFloat80_t f; } uB;
+ uint_fast16_t uiB64;
+ uint_fast64_t uiB0;
+ bool signB;
+ int_fast32_t expB;
+ uint_fast64_t sigB;
+ bool signZ;
+ uint_fast64_t magBits;
+ struct exp32_sig64 normExpSig;
+ int_fast32_t expZ;
+ struct uint128 sig128Z, uiZ;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+ union { struct extFloat80M s; extFloat80_t f; } uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ uiA0 = uA.s.signif;
+ signA = signExtF80UI64( uiA64 );
+ expA = expExtF80UI64( uiA64 );
+ sigA = uiA0;
+ uB.f = b;
+ uiB64 = uB.s.signExp;
+ uiB0 = uB.s.signif;
+ signB = signExtF80UI64( uiB64 );
+ expB = expExtF80UI64( uiB64 );
+ sigB = uiB0;
+ signZ = signA ^ signB;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0x7FFF ) {
+ if (
+ (sigA & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
+ || ((expB == 0x7FFF) && (sigB & UINT64_C( 0x7FFFFFFFFFFFFFFF )))
+ ) {
+ goto propagateNaN;
+ }
+ magBits = expB | sigB;
+ goto infArg;
+ }
+ if ( expB == 0x7FFF ) {
+ if ( sigB & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) goto propagateNaN;
+ magBits = expA | sigA;
+ goto infArg;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expA ) expA = 1;
+ if ( ! (sigA & UINT64_C( 0x8000000000000000 )) ) {
+ if ( ! sigA ) goto zero;
+ normExpSig = softfloat_normSubnormalExtF80Sig( sigA );
+ expA += normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ if ( ! expB ) expB = 1;
+ if ( ! (sigB & UINT64_C( 0x8000000000000000 )) ) {
+ if ( ! sigB ) goto zero;
+ normExpSig = softfloat_normSubnormalExtF80Sig( sigB );
+ expB += normExpSig.exp;
+ sigB = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expZ = expA + expB - 0x3FFE;
+ sig128Z = softfloat_mul64To128( sigA, sigB );
+ if ( sig128Z.v64 < UINT64_C( 0x8000000000000000 ) ) {
+ --expZ;
+ sig128Z =
+ softfloat_add128(
+ sig128Z.v64, sig128Z.v0, sig128Z.v64, sig128Z.v0 );
+ }
+ return
+ softfloat_roundPackToExtF80(
+ signZ, expZ, sig128Z.v64, sig128Z.v0, extF80_roundingPrecision SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN:
+ uiZ = softfloat_propagateNaNExtF80UI( uiA64, uiA0, uiB64, uiB0 SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ64 = uiZ.v64;
+ uiZ0 = uiZ.v0;
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ infArg:
+ if ( ! magBits ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ64 = defaultNaNExtF80UI64;
+ uiZ0 = defaultNaNExtF80UI0;
+ } else {
+ uiZ64 = packToExtF80UI64( signZ, 0x7FFF );
+ uiZ0 = UINT64_C( 0x8000000000000000 );
+ }
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zero:
+ uiZ64 = packToExtF80UI64( signZ, 0 );
+ uiZ0 = 0;
+ uiZ:
+ uZ.s.signExp = uiZ64;
+ uZ.s.signif = uiZ0;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_partialRem.c b/src/libs/softfloat-3e/source/extF80_partialRem.c
new file mode 100644
index 00000000..abce80bd
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_partialRem.c
@@ -0,0 +1,292 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+#include <iprt/cdefs.h> /* RT_BIT_64 */
+#include <iprt/x86.h> /* X86_FSW_C? */
+#include <iprt/assert.h>
+
+/** VBox: Copy of extF80_rem modified to fit FPREM and FPREM1. */
+extFloat80_t extF80_partialRem( extFloat80_t a, extFloat80_t b, uint8_t roundingMode,
+ uint16_t *pfCxFlags, softfloat_state_t *pState )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64;
+ uint_fast64_t uiA0;
+ bool signA;
+ int_fast32_t expA;
+ uint_fast64_t sigA;
+ union { struct extFloat80M s; extFloat80_t f; } uB;
+ uint_fast16_t uiB64;
+ uint_fast64_t uiB0;
+ int_fast32_t expB;
+ uint_fast64_t sigB;
+ struct exp32_sig64 normExpSig;
+ int_fast32_t expDiff;
+ struct uint128 rem, shiftedSigB;
+ uint_fast32_t q, recip32;
+ uint_fast64_t q64;
+ struct uint128 term, altRem, meanRem;
+ bool signRem;
+ struct uint128 uiZ;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+ union { struct extFloat80M s; extFloat80_t f; } uZ;
+
+ *pfCxFlags = 0; /* C2=0 - complete */ /* VBox */
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ uiA0 = uA.s.signif;
+ signA = signExtF80UI64( uiA64 );
+ expA = expExtF80UI64( uiA64 );
+ sigA = uiA0;
+ uB.f = b;
+ uiB64 = uB.s.signExp;
+ uiB0 = uB.s.signif;
+ expB = expExtF80UI64( uiB64 );
+ sigB = uiB0;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0x7FFF ) {
+ if (
+ (sigA & UINT64_C( 0x7FFFFFFFFFFFFFFF )) /* VBox: NaN or Indefinite */
+ || ((expB == 0x7FFF) && (sigB & UINT64_C( 0x7FFFFFFFFFFFFFFF ))) /* VBox: NaN or Indefinite */
+ ) {
+ goto propagateNaN;
+ }
+ goto invalid; /* VBox: Infinity */
+ }
+ if ( expB == 0x7FFF ) {
+ if ( sigB & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) goto propagateNaN; /* VBox: NaN or Indefinite */
+ /*--------------------------------------------------------------------
+ | Argument b is an infinity. Doubling `expB' is an easy way to ensure
+ | that `expDiff' later is less than -1, which will result in returning
+ | a canonicalized version of argument a.
+ *--------------------------------------------------------------------*/
+ expB += expB;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expB ) expB = 1;
+ if ( ! (sigB & UINT64_C( 0x8000000000000000 )) ) {
+ if ( ! sigB ) goto invalid; /* VBox: Zero -> /0 -> invalid. */
+ normExpSig = softfloat_normSubnormalExtF80Sig( sigB );
+ expB += normExpSig.exp;
+ sigB = normExpSig.sig;
+ }
+ if ( ! expA ) expA = 1;
+ if ( ! (sigA & UINT64_C( 0x8000000000000000 )) ) {
+ if ( ! sigA ) {
+#if 0 /* A is zero. VBox: Don't mix denormals and zero returns! */ /* VBox */
+ expA = 0;
+ goto copyA;
+#else /* VBox */
+ uiZ64 = packToExtF80UI64( signA, 0); /* VBox */
+ uiZ0 = 0; /* VBox */
+ goto uiZ; /* VBox */
+#endif /* VBox */
+ }
+ normExpSig = softfloat_normSubnormalExtF80Sig( sigA );
+ expA += normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expDiff = expA - expB;
+
+ /*------------------------------------------------------------------------ VBox
+ | Do at most 63 rounds. If exponent difference is 64 or higher, return VBox
+ | a partial remainder. VBox
+ *------------------------------------------------------------------------*/ /* VBox */
+ bool const fPartial = expDiff >= 64; /* VBox */
+ if ( fPartial ) { /* VBox */ /* VBox */
+ unsigned N = 32 + ((unsigned)expDiff % 32); /* (Amount of work documented by AMD.) */ /* VBox */
+ expB = expA - N; /* VBox */
+ expDiff = N; /* VBox */
+ roundingMode = softfloat_round_minMag; /* VBox */
+ } /* VBox */
+
+ /*------------------------------------------------------------------------
+ | The final rounds.
+ *------------------------------------------------------------------------*/
+ if ( expDiff < -1 ) goto copyA;
+ rem = softfloat_shortShiftLeft128( 0, sigA, 32 );
+ shiftedSigB = softfloat_shortShiftLeft128( 0, sigB, 32 );
+ uint64_t quotient = 0; /* VBox */
+ if ( expDiff < 1 ) {
+ if ( expDiff ) {
+ --expB;
+ shiftedSigB = softfloat_shortShiftLeft128( 0, sigB, 33 );
+ q = 0;
+ } else {
+ q = (sigB <= sigA);
+ quotient = q; /* VBox */
+ if ( q ) {
+ rem =
+ softfloat_sub128(
+ rem.v64, rem.v0, shiftedSigB.v64, shiftedSigB.v0 );
+ }
+ }
+ } else {
+ recip32 = softfloat_approxRecip32_1( sigB>>32 );
+ expDiff -= 30;
+ for (;;) {
+ q64 = (uint_fast64_t) (uint32_t) (rem.v64>>2) * recip32;
+ if ( expDiff < 0 ) break;
+ q = (q64 + 0x80000000)>>32;
+ quotient = (quotient << 29) + q; /* VBox */
+ rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, 29 );
+ term = softfloat_mul64ByShifted32To128( sigB, q );
+ rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 );
+ if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) {
+ rem =
+ softfloat_add128(
+ rem.v64, rem.v0, shiftedSigB.v64, shiftedSigB.v0 );
+ quotient--; /* VBox */
+ }
+ expDiff -= 29;
+ }
+ /*--------------------------------------------------------------------
+ | (`expDiff' cannot be less than -29 here.)
+ *--------------------------------------------------------------------*/
+ q = (uint32_t) (q64>>32)>>(~expDiff & 31);
+ quotient = (quotient << (expDiff + 30)) + q; /* VBox */
+ rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, expDiff + 30 );
+ term = softfloat_mul64ByShifted32To128( sigB, q );
+ rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 );
+ if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) {
+ altRem =
+ softfloat_add128(
+ rem.v64, rem.v0, shiftedSigB.v64, shiftedSigB.v0 );
+ goto selectRem;
+ }
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ do {
+ altRem = rem;
+ ++q;
+ quotient++; /* VBox */
+ rem =
+ softfloat_sub128(
+ rem.v64, rem.v0, shiftedSigB.v64, shiftedSigB.v0 );
+ } while ( ! (rem.v64 & UINT64_C( 0x8000000000000000 )) );
+ selectRem:
+ if (roundingMode == softfloat_round_near_even) { /* VBox */
+ meanRem = softfloat_add128( rem.v64, rem.v0, altRem.v64, altRem.v0 );
+ if (
+ (meanRem.v64 & UINT64_C( 0x8000000000000000 ))
+ || (! (meanRem.v64 | meanRem.v0) && (q & 1))
+ ) {
+ rem = altRem;
+ quotient--; /* VBox */
+ }
+ } /* VBox */
+ signRem = signA;
+ if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) {
+ if (roundingMode != softfloat_round_near_even) { /* VBox */
+ rem = altRem; /* VBox */
+ quotient--; /* VBox */
+ } else { /* VBox */
+ signRem = ! signRem;
+ rem = softfloat_sub128( 0, 0, rem.v64, rem.v0 );
+ Assert(!fPartial); /* VBox */
+ } /* VBox */
+ } else Assert(roundingMode == softfloat_round_near_even); /* VBox */
+
+ /* VBox: Set pfCxFlags */ /* VBox */
+ if ( fPartial ) { /* VBox */
+ *pfCxFlags = X86_FSW_C2; /* C2 = 1 - incomplete */ /* VBox */
+ } else { /* VBox */
+ *pfCxFlags = X86_FSW_CX_FROM_QUOTIENT( quotient ); /* C2 = 0 - complete */ /* VBox */
+ } /* VBox */
+
+ return
+ softfloat_normRoundPackToExtF80(
+ signRem, rem.v64 | rem.v0 ? expB + 32 : 0, rem.v64, rem.v0, 80 SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN:
+ uiZ = softfloat_propagateNaNExtF80UI( uiA64, uiA0, uiB64, uiB0 SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ64 = uiZ.v64;
+ uiZ0 = uiZ.v0;
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ64 = defaultNaNExtF80UI64;
+ uiZ0 = defaultNaNExtF80UI0;
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ copyA:
+ if ( expA < 1 ) {
+#if 0 /* VBox */
+ sigA >>= 1 - expA;
+ expA = 0;
+#else /* VBox */
+ Assert(sigA != 0); /* We don't get here for zero values, only denormals. */ /* VBox */
+ /* Apply the bias adjust if underflows exceptions aren't masked, unless VBox
+ the divisor is +/-Infinity. VBox
+ Note! extB has been tweaked, so don't use if for Inf classification. */ /* VBox */
+ if ( (pState->exceptionMask & softfloat_flag_underflow) /* VBox */
+ || (expExtF80UI64( b.signExp ) == 0x7fff && !(sigB & (RT_BIT_64( 63 ) - 1))) ) { /* VBox */
+ sigA >>= 1 - expA; /* VBox */
+ expA = 0; /* VBox */
+ } else { /* VBox */
+ softfloat_raiseFlags( softfloat_flag_underflow SOFTFLOAT_STATE_ARG_COMMA ); /* VBox */
+ expA = (expA + RTFLOAT80U_EXP_BIAS_ADJUST) & RTFLOAT80U_EXP_MAX; /* VBox */
+ } /* VBox */
+#endif /* VBox */
+ }
+ uiZ64 = packToExtF80UI64( signA, expA );
+ uiZ0 = sigA;
+ uiZ:
+ uZ.s.signExp = uiZ64;
+ uZ.s.signif = uiZ0;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_rem.c b/src/libs/softfloat-3e/source/extF80_rem.c
new file mode 100644
index 00000000..5f7d7723
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_rem.c
@@ -0,0 +1,225 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+extFloat80_t extF80_rem( extFloat80_t a, extFloat80_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64;
+ uint_fast64_t uiA0;
+ bool signA;
+ int_fast32_t expA;
+ uint_fast64_t sigA;
+ union { struct extFloat80M s; extFloat80_t f; } uB;
+ uint_fast16_t uiB64;
+ uint_fast64_t uiB0;
+ int_fast32_t expB;
+ uint_fast64_t sigB;
+ struct exp32_sig64 normExpSig;
+ int_fast32_t expDiff;
+ struct uint128 rem, shiftedSigB;
+ uint_fast32_t q, recip32;
+ uint_fast64_t q64;
+ struct uint128 term, altRem, meanRem;
+ bool signRem;
+ struct uint128 uiZ;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+ union { struct extFloat80M s; extFloat80_t f; } uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ uiA0 = uA.s.signif;
+ signA = signExtF80UI64( uiA64 );
+ expA = expExtF80UI64( uiA64 );
+ sigA = uiA0;
+ uB.f = b;
+ uiB64 = uB.s.signExp;
+ uiB0 = uB.s.signif;
+ expB = expExtF80UI64( uiB64 );
+ sigB = uiB0;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0x7FFF ) {
+ if (
+ (sigA & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
+ || ((expB == 0x7FFF) && (sigB & UINT64_C( 0x7FFFFFFFFFFFFFFF )))
+ ) {
+ goto propagateNaN;
+ }
+ goto invalid;
+ }
+ if ( expB == 0x7FFF ) {
+ if ( sigB & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) goto propagateNaN;
+ /*--------------------------------------------------------------------
+ | Argument b is an infinity. Doubling `expB' is an easy way to ensure
+ | that `expDiff' later is less than -1, which will result in returning
+ | a canonicalized version of argument a.
+ *--------------------------------------------------------------------*/
+ expB += expB;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expB ) expB = 1;
+ if ( ! (sigB & UINT64_C( 0x8000000000000000 )) ) {
+ if ( ! sigB ) goto invalid;
+ normExpSig = softfloat_normSubnormalExtF80Sig( sigB );
+ expB += normExpSig.exp;
+ sigB = normExpSig.sig;
+ }
+ if ( ! expA ) expA = 1;
+ if ( ! (sigA & UINT64_C( 0x8000000000000000 )) ) {
+ if ( ! sigA ) {
+ expA = 0;
+ goto copyA;
+ }
+ normExpSig = softfloat_normSubnormalExtF80Sig( sigA );
+ expA += normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expDiff = expA - expB;
+ if ( expDiff < -1 ) goto copyA;
+ rem = softfloat_shortShiftLeft128( 0, sigA, 32 );
+ shiftedSigB = softfloat_shortShiftLeft128( 0, sigB, 32 );
+ if ( expDiff < 1 ) {
+ if ( expDiff ) {
+ --expB;
+ shiftedSigB = softfloat_shortShiftLeft128( 0, sigB, 33 );
+ q = 0;
+ } else {
+ q = (sigB <= sigA);
+ if ( q ) {
+ rem =
+ softfloat_sub128(
+ rem.v64, rem.v0, shiftedSigB.v64, shiftedSigB.v0 );
+ }
+ }
+ } else {
+ recip32 = softfloat_approxRecip32_1( sigB>>32 );
+ expDiff -= 30;
+ for (;;) {
+ q64 = (uint_fast64_t) (uint32_t) (rem.v64>>2) * recip32;
+ if ( expDiff < 0 ) break;
+ q = (q64 + 0x80000000)>>32;
+ rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, 29 );
+ term = softfloat_mul64ByShifted32To128( sigB, q );
+ rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 );
+ if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) {
+ rem =
+ softfloat_add128(
+ rem.v64, rem.v0, shiftedSigB.v64, shiftedSigB.v0 );
+ }
+ expDiff -= 29;
+ }
+ /*--------------------------------------------------------------------
+ | (`expDiff' cannot be less than -29 here.)
+ *--------------------------------------------------------------------*/
+ q = (uint32_t) (q64>>32)>>(~expDiff & 31);
+ rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, expDiff + 30 );
+ term = softfloat_mul64ByShifted32To128( sigB, q );
+ rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 );
+ if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) {
+ altRem =
+ softfloat_add128(
+ rem.v64, rem.v0, shiftedSigB.v64, shiftedSigB.v0 );
+ goto selectRem;
+ }
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ do {
+ altRem = rem;
+ ++q;
+ rem =
+ softfloat_sub128(
+ rem.v64, rem.v0, shiftedSigB.v64, shiftedSigB.v0 );
+ } while ( ! (rem.v64 & UINT64_C( 0x8000000000000000 )) );
+ selectRem:
+ meanRem = softfloat_add128( rem.v64, rem.v0, altRem.v64, altRem.v0 );
+ if (
+ (meanRem.v64 & UINT64_C( 0x8000000000000000 ))
+ || (! (meanRem.v64 | meanRem.v0) && (q & 1))
+ ) {
+ rem = altRem;
+ }
+ signRem = signA;
+ if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) {
+ signRem = ! signRem;
+ rem = softfloat_sub128( 0, 0, rem.v64, rem.v0 );
+ }
+ return
+ softfloat_normRoundPackToExtF80(
+ signRem, rem.v64 | rem.v0 ? expB + 32 : 0, rem.v64, rem.v0, 80 SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN:
+ uiZ = softfloat_propagateNaNExtF80UI( uiA64, uiA0, uiB64, uiB0 SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ64 = uiZ.v64;
+ uiZ0 = uiZ.v0;
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ64 = defaultNaNExtF80UI64;
+ uiZ0 = defaultNaNExtF80UI0;
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ copyA:
+ if ( expA < 1 ) {
+ sigA >>= 1 - expA;
+ expA = 0;
+ }
+ uiZ64 = packToExtF80UI64( signA, expA );
+ uiZ0 = sigA;
+ uiZ:
+ uZ.s.signExp = uiZ64;
+ uZ.s.signif = uiZ0;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_roundToInt.c b/src/libs/softfloat-3e/source/extF80_roundToInt.c
new file mode 100644
index 00000000..ee76c3be
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_roundToInt.c
@@ -0,0 +1,158 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+#include <iprt/cdefs.h> /* VBox: for RT_FALL_THROUGH */
+
+extFloat80_t
+ extF80_roundToInt( extFloat80_t a, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64, signUI64;
+ int_fast32_t exp;
+ uint_fast64_t sigA;
+ uint_fast16_t uiZ64;
+ uint_fast64_t sigZ;
+ struct exp32_sig64 normExpSig;
+ struct uint128 uiZ;
+ uint_fast64_t lastBitMask, roundBitsMask;
+ union { struct extFloat80M s; extFloat80_t f; } uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ signUI64 = uiA64 & packToExtF80UI64( 1, 0 );
+ exp = expExtF80UI64( uiA64 );
+ sigA = uA.s.signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( !(sigA & UINT64_C( 0x8000000000000000 )) && (exp != 0x7FFF) ) {
+ if ( !sigA ) {
+ uiZ64 = signUI64;
+ sigZ = 0;
+ goto uiZ;
+ }
+ normExpSig = softfloat_normSubnormalExtF80Sig( sigA );
+ exp += normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( 0x403E <= exp ) {
+ if ( exp == 0x7FFF ) {
+ if ( sigA & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) {
+ uiZ = softfloat_propagateNaNExtF80UI( uiA64, sigA, 0, 0 SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ64 = uiZ.v64;
+ sigZ = uiZ.v0;
+ goto uiZ;
+ }
+ sigZ = UINT64_C( 0x8000000000000000 );
+ } else {
+ sigZ = sigA;
+ }
+ uiZ64 = signUI64 | exp;
+ goto uiZ;
+ }
+ if ( exp <= 0x3FFE ) {
+ if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+ switch ( roundingMode ) {
+ case softfloat_round_near_even:
+ if ( !(sigA & UINT64_C( 0x7FFFFFFFFFFFFFFF )) ) break;
+ RT_FALL_THROUGH(); /* VBox */
+ case softfloat_round_near_maxMag:
+ if ( exp == 0x3FFE ) goto mag1;
+ break;
+ case softfloat_round_min:
+ if ( signUI64 ) goto mag1;
+ break;
+ case softfloat_round_max:
+ if ( !signUI64 ) goto mag1;
+ break;
+#ifdef SOFTFLOAT_ROUND_ODD
+ case softfloat_round_odd:
+ goto mag1;
+#endif
+ }
+ uiZ64 = signUI64;
+ sigZ = 0;
+ goto uiZ;
+ mag1:
+ uiZ64 = signUI64 | 0x3FFF;
+ sigZ = UINT64_C( 0x8000000000000000 );
+ softfloat_exceptionFlags |= softfloat_flag_c1; /* VBox */
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ64 = signUI64 | exp;
+ lastBitMask = (uint_fast64_t) 1<<(0x403E - exp);
+ roundBitsMask = lastBitMask - 1;
+ sigZ = sigA;
+ if ( roundingMode == softfloat_round_near_maxMag ) {
+ sigZ += lastBitMask>>1;
+ } else if ( roundingMode == softfloat_round_near_even ) {
+ sigZ += lastBitMask>>1;
+ if ( !(sigZ & roundBitsMask) ) sigZ &= ~lastBitMask;
+ } else if (
+ roundingMode == (signUI64 ? softfloat_round_min : softfloat_round_max)
+ ) {
+ sigZ += roundBitsMask;
+ }
+ sigZ &= ~roundBitsMask;
+ if ( !sigZ ) {
+ ++uiZ64;
+ sigZ = UINT64_C( 0x8000000000000000 );
+ softfloat_exceptionFlags |= softfloat_flag_c1; /* VBox */
+ } else if ( sigZ > sigA ) softfloat_exceptionFlags |= softfloat_flag_c1; /* VBox */
+ if ( sigZ != sigA ) {
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) sigZ |= lastBitMask;
+#endif
+ if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ uiZ:
+ uZ.s.signExp = uiZ64;
+ uZ.s.signif = sigZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_scale_extF80.c b/src/libs/softfloat-3e/source/extF80_scale_extF80.c
new file mode 100644
index 00000000..3f537fa1
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_scale_extF80.c
@@ -0,0 +1,191 @@
+/* $Id: extF80_scale_extF80.c $ */
+/** @file
+ * SoftFloat - 387-style fscale.
+ */
+
+/*
+ * Copyright (C) 2022 Oracle and/or its affiliates.
+ *
+ * This file is part of VirtualBox base platform packages, as
+ * available from https://www.virtualbox.org.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, in version 3 of the
+ * License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <https://www.gnu.org/licenses>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-only
+ */
+
+
+/*********************************************************************************************************************************
+* Header Files *
+*********************************************************************************************************************************/
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+#include <iprt/assert.h>
+#include <iprt/asm.h>
+
+
+/**
+ * Wrapper around softfloat_propagateNaNExtF80UI that returns extFloat80_t
+ * and takes fully unpacked input.
+ */
+DECLINLINE(extFloat80_t)
+softfloat_extF80_propagateNaN(bool fSignA, int_fast32_t iExpA, uint_fast64_t uSigA,
+ bool fSignB, int_fast32_t iExpB, uint_fast64_t uSigB SOFTFLOAT_STATE_DECL_COMMA)
+{
+ struct uint128 uiZ = softfloat_propagateNaNExtF80UI(packToExtF80UI64(fSignA, iExpA), uSigA,
+ packToExtF80UI64(fSignB, iExpB), uSigB SOFTFLOAT_STATE_ARG_COMMA);
+ union extF80M_extF80 Ret;
+ Ret.fM.signExp = uiZ.v64;
+ Ret.fM.signif = uiZ.v0;
+ return Ret.f;
+}
+
+
+/**
+ * This performs a function similar to extF80_to_i32_r_minMag, but returns
+ * proper MIN/MAX values and no NaNs.
+ *
+ * ASSUMES the input is normalized.
+ *
+ * @returns Values in the range -2^24...+2^24.
+ */
+static int_fast32_t convertToInt(bool fSign, uint_fast64_t uSig, int_fast32_t iExp)
+{
+ iExp -= RTFLOAT80U_EXP_BIAS;
+ if (iExp < 0)
+ return 0;
+
+ /* Restrict the range to -2^24...+2^24 to prevent overflows during scaling. */
+ if (iExp >= 24)
+ return fSign ? INT32_MIN / 128 : INT32_MAX / 128;
+
+ int_fast32_t iRet = (int_fast32_t)(uSig >> (63 - iExp));
+ if (fSign)
+ return -iRet;
+ return iRet;
+}
+
+
+/**
+ * VBox: scale @a a by 2^truncateToInt(@a b)
+ *
+ * This function accepts and deals correctly with denormals (pseudo and
+ * otherwise).
+ */
+extFloat80_t extF80_scale_extF80(extFloat80_t a, extFloat80_t b, softfloat_state_t *pState)
+{
+ static union extF80M_extF80 const s_extF80Indefinite = EXTF80M_EXTF80_INIT(defaultNaNExtF80UI64, defaultNaNExtF80UI0);
+ static union extF80M_extF80 const s_aExtF80Zero[2] =
+ {
+ EXTF80M_EXTF80_INIT3_C(0, 0, 0), EXTF80M_EXTF80_INIT3_C(1, 0, 0),
+ };
+ static union extF80M_extF80 const s_aExtF80Infinity[2] =
+ {
+ EXTF80M_EXTF80_INIT3(0, RT_BIT_64(63), RTFLOAT80U_EXP_MAX),
+ EXTF80M_EXTF80_INIT3(1, RT_BIT_64(63), RTFLOAT80U_EXP_MAX),
+ };
+
+ /*
+ * Unpack the input.
+ */
+ bool const fSignA = signExtF80UI64(a.signExp);
+ int_fast32_t iExpA = expExtF80UI64(a.signExp);
+ uint_fast64_t uSigA = a.signif;
+
+ bool const fSignB = signExtF80UI64(b.signExp);
+ int_fast32_t iExpB = expExtF80UI64(b.signExp);
+ uint_fast64_t uSigB = b.signif;
+
+ /*
+ * Deal with funny input.
+ */
+ /* Invalid first. We ASSUME subnormals are rejected here. */
+ if ( RTFLOAT80U_IS_387_INVALID_EX(uSigA, iExpA)
+ || RTFLOAT80U_IS_387_INVALID_EX(uSigB, iExpB))
+ {
+ softfloat_raiseFlags(softfloat_flag_invalid, pState);
+ return s_extF80Indefinite.f;
+ }
+
+ /* Then NaNs and indefinites (special NaNs): */
+ if ( RTFLOAT80U_IS_INDEFINITE_OR_QUIET_OR_SIGNALLING_NAN_EX(uSigA, iExpA)
+ || RTFLOAT80U_IS_INDEFINITE_OR_QUIET_OR_SIGNALLING_NAN_EX(uSigB, iExpB))
+ return softfloat_extF80_propagateNaN(fSignA, iExpA, uSigA, fSignB, iExpB, uSigB, pState);
+
+ /* Normalize denormal inputs: */
+ if (RTFLOAT80U_IS_DENORMAL_OR_PSEUDO_DENORMAL_EX(uSigA, iExpA))
+ {
+ softfloat_raiseFlags(softfloat_flag_denormal, pState);
+ if (uSigA & RT_BIT_64(63))
+ iExpA = 1; /* -16382 */
+ else
+ {
+ /* We must return the denormal a value unchanged when b=zero, intel 10980XE
+ does this at least. Where-as pseudo-denormals are normalized. Go figure. */
+ if (RTFLOAT80U_IS_ZERO_EX(uSigB, iExpB))
+ return a;
+ iExpA = 64 - ASMBitLastSetU64(uSigA);
+ uSigA <<= iExpA;
+ iExpA = 1 - iExpA; /* -16382 - shift */
+ }
+ }
+
+ if (RTFLOAT80U_IS_DENORMAL_OR_PSEUDO_DENORMAL_EX(uSigB, iExpB))
+ {
+ softfloat_raiseFlags(softfloat_flag_denormal, pState);
+ if (uSigB & RT_BIT_64(63))
+ iExpB = 1; /* -16382 */
+ else
+ {
+ iExpB = 64 - ASMBitLastSetU64(uSigB);
+ uSigB <<= iExpB;
+ iExpB = 1 - iExpB; /* -16382 - shift */
+ }
+ }
+
+ /* Infinities and zeros: If a is Zero or Infinity, return it as-is unless
+ b=-Infinity & a=+/-Infinity or b=+Infinity & a=+/-zero when we have to
+ raise #I and return indefinite instead.
+
+ Note! If b is zero, don't, because pseudo-denormals should be returned
+ normalized (intel does that at least). Excpetion is b=zero and
+ a=denormal, which is handled above. */
+ if ( RTFLOAT80U_IS_INF_EX(uSigA, iExpA)
+ || RTFLOAT80U_IS_ZERO_EX(uSigA, iExpA))
+ {
+ if (RTFLOAT80U_IS_INF_EX(uSigB, iExpB) && fSignB == RTFLOAT80U_IS_INF_EX(uSigA, iExpA))
+ {
+ softfloat_raiseFlags(softfloat_flag_invalid, pState);
+ return s_extF80Indefinite.f;
+ }
+ return a;
+ }
+
+ if (RTFLOAT80U_IS_INF_EX(uSigB, iExpB))
+ {
+ if (fSignB)
+ return s_aExtF80Zero[fSignA].f;
+ return s_aExtF80Infinity[fSignA].f;
+ }
+
+ /*
+ * Convert b to an integer and do the scaling.
+ */
+ int_fast32_t iScaleFactor = convertToInt(fSignB, uSigB, iExpB);
+ int_fast32_t iScaledExp = iExpA + iScaleFactor;
+ return softfloat_normRoundPackToExtF80(fSignA, iScaledExp, uSigA, 0 /*sigExtra*/, 80 /*precision*/, pState);
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_sincos.c b/src/libs/softfloat-3e/source/extF80_sincos.c
new file mode 100644
index 00000000..3905439d
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_sincos.c
@@ -0,0 +1,323 @@
+/* $Id: extF80_sincos.c $ */
+/** @file
+ * SoftFloat - VBox Extension - extF80_sin, extF80_cos, extF80_sincos, extF80_atan2.
+ */
+
+/*
+ * Copyright (C) 2022 Oracle and/or its affiliates.
+ *
+ * This file is part of VirtualBox base platform packages, as
+ * available from https://www.virtualbox.org.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, in version 3 of the
+ * License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <https://www.gnu.org/licenses>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-only
+ */
+
+
+/*********************************************************************************************************************************
+* Header Files *
+*********************************************************************************************************************************/
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+#include <iprt/types.h>
+#include <iprt/x86.h>
+
+#include "extF80_sincos.h"
+
+
+static void cordic_sincos( float128_t z, float128_t *pv1, float128_t *pv2 SOFTFLOAT_STATE_DECL_COMMA )
+{
+ float128_t v1 = { { 0, 0 } }; /* MSC thinks it can be used uninitialized */
+ float128_t v2 = { { 0, 0 } }; /* MSC thinks it can be used uninitialized */
+ /** @todo TBD: CORDIC kernel should be easily implemented in assembly * */
+
+ float128_t x1 = ui32_to_f128(1, pState);
+ float128_t x2 = ui32_to_f128(0, pState);
+ float128_t zz = ui32_to_f128(0, pState);
+
+ float128_t p2m = ui32_to_f128(1, pState);
+ float128_t two = ui32_to_f128(2, pState);
+
+ for (unsigned k = 0; k < RT_ELEMENTS(g_ar128FsincosCORDICConsts); k++)
+ {
+ float128_t atg = *(float128_t *)&g_ar128FsincosCORDICConsts[k];
+ float128_t scale = *(float128_t *)&g_ar128FsincosCORDICConsts2[k];
+
+ float128_t px1 = f128_mul(x1, p2m, pState);
+ float128_t px2 = f128_mul(x2, p2m, pState);
+
+ if (f128_le(zz, z, pState))
+ {
+ x1 = f128_sub(x1, px2, pState);
+ x2 = f128_add(x2, px1, pState);
+ zz = f128_add(zz, atg, pState);
+ }
+ else
+ {
+ x1 = f128_add(x1, px2, pState);
+ x2 = f128_sub(x2, px1, pState);
+ zz = f128_sub(zz, atg, pState);
+ }
+
+ p2m = f128_div(p2m, two, pState);
+
+ v1 = f128_mul(x1, scale, pState);
+ v2 = f128_mul(x2, scale, pState);
+ }
+
+ *pv1 = v1;
+ *pv2 = v2;
+}
+
+static float128_t cordic_atan2( float128_t y, float128_t x SOFTFLOAT_STATE_DECL_COMMA )
+{
+ float128_t v1 = { { 0, 0 } }; /* MSC thinks it can be used uninitialized */
+ float128_t v2 = { { 0, 0 } }; /* MSC thinks it can be used uninitialized */
+ /** @todo TBD: CORDIC kernel should be easily implemented in assembly * */
+
+ float128_t x1 = x, x2 = y;
+ float128_t z = ui32_to_f128(0, pState);
+ float128_t zero = ui32_to_f128(0, pState);
+ float128_t p2m = ui32_to_f128(1, pState);
+ float128_t two = ui32_to_f128(2, pState);
+
+ for (unsigned k = 0; k < RT_ELEMENTS(g_ar128FsincosCORDICConsts); k++)
+ {
+ float128_t atg = *(float128_t *)&g_ar128FsincosCORDICConsts[k];
+ float128_t scale = *(float128_t *)&g_ar128FsincosCORDICConsts2[k];
+
+ float128_t px1 = f128_mul(x1, p2m, pState);
+ float128_t px2 = f128_mul(x2, p2m, pState);
+
+ if (f128_le(x2, zero, pState))
+ {
+ x1 = f128_sub(x1, px2, pState);
+ x2 = f128_add(x2, px1, pState);
+ z = f128_sub(z, atg, pState);
+ }
+ else
+ {
+ x1 = f128_add(x1, px2, pState);
+ x2 = f128_sub(x2, px1, pState);
+ z = f128_add(z, atg, pState);
+ }
+
+ p2m = f128_div(p2m, two, pState);
+
+ v1 = f128_mul(x1, scale, pState);
+ v2 = f128_mul(x2, scale, pState);
+ }
+
+ return z;
+}
+
+extFloat80_t extF80_sin( extFloat80_t x SOFTFLOAT_STATE_DECL_COMMA )
+{
+ int32_t fSign = 0;
+ extFloat80_t f80zero = ui32_to_extF80(0, pState);
+ if (extF80_le(x, f80zero, pState))
+ {
+ x = extF80_sub(f80zero, x, pState);
+ fSign = 1;
+ }
+
+ extFloat80_t f80pi2 = f128_to_extF80(*(float128_t *)&g_r128pi2, pState);
+
+ /** @todo TBD: Partial remainder should be calculated using float128 value of pi2 to increase precision **/
+ uint16_t fCxFlags = 0;
+ extFloat80_t rem = extF80_partialRem(x, f80pi2, pState->roundingMode, &fCxFlags, pState);
+ int32_t const quo = X86_FSW_CX_TO_QUOTIENT(fCxFlags);
+
+ float128_t z = extF80_to_f128(rem, pState);
+ float128_t f128zero = ui32_to_f128(0, pState);
+
+ float128_t v1, v2;
+ cordic_sincos(z, &v1, &v2, pState);
+
+ float128_t v;
+ switch(quo % 4)
+ {
+#ifdef _MSC_VER /* stupid MSC thinks v might be used uninitialized otherwise: */
+ default:
+#endif
+ case 0:
+ v = v2;
+ break;
+
+ case 1:
+ v = v1;
+ break;
+
+ case 2:
+ v = f128_sub(f128zero, v2, pState);
+ break;
+
+ case 3:
+ v = f128_sub(f128zero, v1, pState);
+ break;
+ }
+
+ if (fSign)
+ v = f128_sub(f128zero, v, pState);
+
+ return f128_to_extF80(v, pState);
+}
+
+extFloat80_t extF80_cos( extFloat80_t x SOFTFLOAT_STATE_DECL_COMMA )
+{
+ extFloat80_t f80zero = ui32_to_extF80(0, pState);
+ if (extF80_le(x, f80zero, pState))
+ x = extF80_sub(f80zero, x, pState);
+
+ extFloat80_t f80pi2 = f128_to_extF80(*(float128_t *)&g_r128pi2, pState);
+
+ /** TBD: Partial remainder should be calculated using float128 value of pi2 to increase precision **/
+ uint16_t fCxFlags = 0;
+ extFloat80_t rem = extF80_partialRem(x, f80pi2, pState->roundingMode, &fCxFlags, pState);
+ int32_t const quo = X86_FSW_CX_TO_QUOTIENT(fCxFlags);
+
+ float128_t z = extF80_to_f128(rem, pState);
+ float128_t f128zero = ui32_to_f128(0, pState);
+
+ float128_t v1, v2;
+ cordic_sincos(z, &v1, &v2, pState);
+
+ float128_t v;
+ switch(quo % 4)
+ {
+#ifdef _MSC_VER /* stupid MSC thinks v might be used uninitialized otherwise: */
+ default:
+#endif
+ case 0:
+ v = v1;
+ break;
+
+ case 1:
+ v = f128_sub(f128zero, v2, pState);;
+ break;
+
+ case 2:
+ v = f128_sub(f128zero, v1, pState);
+ break;
+
+ case 3:
+ v = v2;
+ break;
+ }
+
+ return f128_to_extF80(v, pState);
+}
+
+void extF80_sincos( extFloat80_t x, extFloat80_t* pSin, extFloat80_t* pCos SOFTFLOAT_STATE_DECL_COMMA )
+{
+ uint16_t fCxFlags = 0;
+ int32_t quo;
+ extFloat80_t rem, f80pi2, f80zero;
+ int32_t fSign = 0;
+
+ f80zero = ui32_to_extF80(0, pState);
+ if (extF80_le(x, f80zero, pState))
+ {
+ x = extF80_sub(f80zero, x, pState);
+ fSign = 1;
+ }
+
+ f80pi2 = f128_to_extF80(*(float128_t const *)&g_r128pi2, pState);
+
+ /** @todo TBD: Partial remainder should be calculated using float128 value of pi2 to increase precision **/
+ rem = extF80_partialRem(x, f80pi2, pState->roundingMode, &fCxFlags, pState);
+ quo = X86_FSW_CX_TO_QUOTIENT(fCxFlags);
+
+ float128_t z = extF80_to_f128(rem, pState);
+ float128_t f128zero = ui32_to_f128(0, pState);
+
+ float128_t v1, v2;
+ cordic_sincos(z, &v1, &v2, pState);
+
+ float128_t vCos, vSin;
+ switch(quo % 4)
+ {
+#ifdef _MSC_VER /* stupid MSC thinks vCos & cSin might be used uninitialized otherwise: */
+ default:
+#endif
+ case 0:
+ vCos = v1;
+ vSin = v2;
+ break;
+
+ case 1:
+ vCos = f128_sub(f128zero, v2, pState);
+ vSin = v1;
+ break;
+
+ case 2:
+ vCos = f128_sub(f128zero, v1, pState);
+ vSin = f128_sub(f128zero, v2, pState);
+ break;
+
+ case 3:
+ vCos = v2;
+ vSin = f128_sub(f128zero, v1, pState);
+ break;
+ }
+
+ if (fSign)
+ vSin = f128_sub(f128zero, vSin, pState);
+
+ *pCos = f128_to_extF80(vCos, pState);
+ *pSin = f128_to_extF80(vSin, pState);
+}
+
+extFloat80_t extF80_atan2( extFloat80_t f80y, extFloat80_t f80x SOFTFLOAT_STATE_DECL_COMMA )
+{
+ float128_t v;
+ int32_t fSignX = 0, fSignY = 0;
+ float128_t f128zero = ui32_to_f128(0, pState);
+ float128_t y = extF80_to_f128(f80y, pState);
+ float128_t x = extF80_to_f128(f80x, pState);
+
+ if (f128_le(x, f128zero, pState))
+ {
+ x = f128_sub(f128zero, x, pState);
+ fSignX = 1;
+ }
+
+ if (f128_le(y, f128zero, pState))
+ {
+ y = f128_sub(f128zero, y, pState);
+ fSignY = 1;
+ }
+
+ v = cordic_atan2(y, x, pState);
+
+ if (fSignX)
+ {
+ if (fSignY)
+ v = f128_sub(v, *(float128_t const *)&g_r128pi, pState);
+ else
+ v = f128_sub(*(float128_t const *)&g_r128pi, v, pState);
+ }
+ else
+ {
+ if (fSignY)
+ v = f128_sub(f128zero, v, pState);
+ }
+
+ return f128_to_extF80(v, pState);
+}
diff --git a/src/libs/softfloat-3e/source/extF80_sincos.h b/src/libs/softfloat-3e/source/extF80_sincos.h
new file mode 100644
index 00000000..5f40ea86
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_sincos.h
@@ -0,0 +1,736 @@
+/* $Id: extF80_sincos.h $ */
+/** @file
+ * SoftFloat - VBox Extension - constants for sine & cosine calculation.
+ */
+
+/*
+ * Copyright (C) 2022 Oracle and/or its affiliates.
+ *
+ * This file is part of VirtualBox base platform packages, as
+ * available from https://www.virtualbox.org.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, in version 3 of the
+ * License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <https://www.gnu.org/licenses>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-only
+ */
+
+#ifndef VBOX_INCLUDED_SRC_source_extF80_sincos_h
+#define VBOX_INCLUDED_SRC_source_extF80_sincos_h
+#ifndef RT_WITHOUT_PRAGMA_ONCE
+# pragma once
+#endif
+
+/** The pi constant as 128-bit floating point value.
+ * base-10: 3.14159265358979323846264338327950279
+ * base-16: 3.243f6a8885a308d313198a2e0370
+ * base-2 : 1.1001001000011111101101010100010001000010110100011000010001101001100010011000110011000101000101110000000110111000e1 */
+const RTFLOAT128U g_r128pi = RTFLOAT128U_INIT_C(0, 0x921fb54442d1, 0x8469898cc51701b8, 0x4000);
+
+/** The pi/2 constant as 128-bit floating point value.
+ * base-10: 1.57079632679489661923132169163975139
+ * base-16: 1.921fb54442d18469898cc51701b8
+ * base-2 : 1.1001001000011111101101010100010001000010110100011000010001101001100010011000110011000101000101110000000110111000 */
+const RTFLOAT128U g_r128pi2 = RTFLOAT128U_INIT_C(0, 0x921fb54442d1, 0x8469898cc51701b8, 0x3fff);
+
+/** CORDIC constants for fsin and fcos, defined by c(i)=atan(2^(-i)) */
+const RTFLOAT128U g_ar128FsincosCORDICConsts[] =
+{
+ /* c0
+ * base-10: 7.85398163397448309615660845819875699e-1
+ * base-16: c.90fdaa22168c234c4c6628b80dc0@-1
+ * base-2 : 1.1001001000011111101101010100010001000010110100011000010001101001100010011000110011000101000101110000000110111000e-1 */
+ RTFLOAT128U_INIT_C(0, 0x921fb54442d1, 0x8469898cc51701b8, 0x3ffe),
+ /* c1
+ * base-10: 4.63647609000806116214256231461214397e-1
+ * base-16: 7.6b19c1586ed3da2b7f222f65e1d4@-1
+ * base-2 : 1.1101101011000110011100000101011000011011101101001111011010001010110111111100100010001011110110010111100001110101e-2 */
+ RTFLOAT128U_INIT_C(0, 0xdac670561bb4, 0xf68adfc88bd97875, 0x3ffd),
+ /* c2
+ * base-10: 2.44978663126864154172082481211275806e-1
+ * base-16: 3.eb6ebf25901bac55b71e7bd7de88@-1
+ * base-2 : 1.1111010110110111010111111001001011001000000011011101011000101010110110111000111100111101111010111110111101000100e-3 */
+ RTFLOAT128U_INIT_C(0, 0xf5b75f92c80d, 0xd62adb8f3debef44, 0x3ffc),
+ /* c3
+ * base-10: 1.24354994546761435031354849163871024e-1
+ * base-16: 1.fd5ba9aac2f6dc65912f313e7d11@-1
+ * base-2 : 1.1111110101011011101010011010101011000010111101101101110001100101100100010010111100110001001111100111110100010001e-4 */
+ RTFLOAT128U_INIT_C(0, 0xfd5ba9aac2f6, 0xdc65912f313e7d11, 0x3ffb),
+ /* c4
+ * base-10: 6.24188099959573484739791129855051129e-2
+ * base-16: f.faaddb967ef4e36cb2792dc0e2e0@-2
+ * base-2 : 1.1111111101010101101110110111001011001111110111101001110001101101100101100100111100100101101110000001110001011100e-5 */
+ RTFLOAT128U_INIT_C(0, 0xff55bb72cfde, 0x9c6d964f25b81c5c, 0x3ffa),
+ /* c5
+ * base-10: 3.12398334302682762537117448924909747e-2
+ * base-16: 7.ff556eea5d892a13bcebbb6ed460@-2
+ * base-2 : 1.1111111111010101010110111011101010010111011000100100101010000100111011110011101011101110110110111011010100011000e-6 */
+ RTFLOAT128U_INIT_C(0, 0xffd55bba9762, 0x4a84ef3aeedbb518, 0x3ff9),
+ /* c6
+ * base-10: 1.56237286204768308028015212565703177e-2
+ * base-16: 3.ffeaab776e5356ef9e31590057dc@-2
+ * base-2 : 1.1111111111110101010101011011101110110111001010011010101101110111110011110001100010101100100000000010101111101110e-7 */
+ RTFLOAT128U_INIT_C(0, 0xfff555bbb729, 0xab77cf18ac802bee, 0x3ff8),
+ /* c7
+ * base-10: 7.81234106010111129646339184219928134e-3
+ * base-16: 1.fffd555bbba972d00c46a3f77cc1@-2
+ * base-2 : 1.1111111111111101010101010101101110111011101010010111001011010000000011000100011010100011111101110111110011000001e-8 */
+ RTFLOAT128U_INIT_C(0, 0xfffd555bbba9, 0x72d00c46a3f77cc1, 0x3ff7),
+ /* c8
+ * base-10: 3.90623013196697182762866531142438676e-3
+ * base-16: f.fffaaaaddddb94bb12afb6b6d4f0@-3
+ * base-2 : 1.1111111111111111010101010101010110111011101110110111001010010111011000100101010111110110110101101101101010011110e-9 */
+ RTFLOAT128U_INIT_C(0, 0xffff5555bbbb, 0x72976255f6d6da9e, 0x3ff6),
+ /* c9
+ * base-10: 1.95312251647881868512148262507671384e-3
+ * base-16: 7.ffff55556eeeea5ca6adeab02250@-3
+ * base-2 : 1.1111111111111111110101010101010101011011101110111011101010010111001010011010101101111010101011000000100010010100e-10 */
+ RTFLOAT128U_INIT_C(0, 0xffffd5555bbb, 0xba9729ab7aac0894, 0x3ff5),
+ /* c10
+ * base-10: 9.76562189559319430403430199717290821e-4
+ * base-16: 3.ffffeaaaab77776e52e5a019fbce@-3
+ * base-2 : 1.1111111111111111111101010101010101010101101110111011101110110111001010010111001011010000000011001111110111100111e-11 */
+ RTFLOAT128U_INIT_C(0, 0xfffff55555bb, 0xbbb72972d00cfde7, 0x3ff4),
+ /* c11
+ * base-10: 4.88281211194898275469239625644848635e-4
+ * base-16: 1.fffffd55555bbbbba97297625624@-3
+ * base-2 : 1.1111111111111111111111010101010101010101010110111011101110111011101010010111001010010111011000100101011000100100e-12 */
+ RTFLOAT128U_INIT_C(0, 0xfffffd55555b, 0xbbbba97297625624, 0x3ff3),
+ /* c12
+ * base-10: 2.44140620149361764016722943259659969e-4
+ * base-16: f.fffffaaaaaaddddddb94b94d5bd0@-4
+ * base-2 : 1.1111111111111111111111110101010101010101010101011011101110111011101110110111001010010111001010011010101101111010e-13 */
+ RTFLOAT128U_INIT_C(0, 0xffffff555555, 0xbbbbbb729729ab7a, 0x3ff2),
+ /* c13
+ * base-10: 1.22070311893670204239058646117956300e-4
+ * base-16: 7.ffffff5555556eeeeeea5ca5cb40@-4
+ * base-2 : 1.1111111111111111111111111101010101010101010101010101101110111011101110111011101010010111001010010111001011010000e-14 */
+ RTFLOAT128U_INIT_C(0, 0xffffffd55555, 0x5bbbbbba972972d0, 0x3ff1),
+ /* c14
+ * base-10: 6.10351561742087750216625691738291515e-5
+ * base-16: 3.ffffffeaaaaaab7777776e52e52e@-4
+ * base-2 : 1.1111111111111111111111111111010101010101010101010101010110111011101110111011101110110111001010010111001010010111e-15 */
+ RTFLOAT128U_INIT_C(0, 0xfffffff55555, 0x55bbbbbbb7297297, 0x3ff0),
+ /* c15
+ * base-10: 3.05175781155260968618259534385360192e-5
+ * base-16: 1.fffffffd5555555bbbbbbba97297@-4
+ * base-2 : 1.1111111111111111111111111111110101010101010101010101010101011011101110111011101110111011101010010111001010010111e-16 */
+ RTFLOAT128U_INIT_C(0, 0xfffffffd5555, 0x555bbbbbbba97297, 0x3fef),
+ /* c16
+ * base-10: 1.52587890613157621072319358126978848e-5
+ * base-16: f.fffffffaaaaaaaaddddddddb94b8@-5
+ * base-2 : 1.1111111111111111111111111111111101010101010101010101010101010101101110111011101110111011101110110111001010010111e-17 */
+ RTFLOAT128U_INIT_C(0, 0xffffffff5555, 0x5555bbbbbbbb7297, 0x3fee),
+ /* c17
+ * base-10: 7.62939453110197026338848234010509046e-6
+ * base-16: 7.ffffffff555555556eeeeeeeea5c@-5
+ * base-2 : 1.1111111111111111111111111111111111010101010101010101010101010101010110111011101110111011101110111011101010010111e-18 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffd555, 0x55555bbbbbbbba97, 0x3fed),
+ /* c18
+ * base-10: 3.81469726560649628292307561637299366e-6
+ * base-16: 3.ffffffffeaaaaaaaab777777776e@-5
+ * base-2 : 1.1111111111111111111111111111111111110101010101010101010101010101010101011011101110111011101110111011101110110111e-19 */
+ RTFLOAT128U_INIT_C(0, 0xfffffffff555, 0x555555bbbbbbbbb7, 0x3fec),
+ /* c19
+ * base-10: 1.90734863281018703536536930591724404e-6
+ * base-16: 1.fffffffffd555555555bbbbbbbbb@-5
+ * base-2 : 1.1111111111111111111111111111111111111101010101010101010101010101010101010101101110111011101110111011101110111011e-20 */
+ RTFLOAT128U_INIT_C(0, 0xfffffffffd55, 0x5555555bbbbbbbbb, 0x3feb),
+ /* c20
+ * base-10: 9.53674316405960879420670689923112322e-7
+ * base-16: f.fffffffffaaaaaaaaaadddddddd8@-6
+ * base-2 : 1.1111111111111111111111111111111111111111010101010101010101010101010101010101010110111011101110111011101110111011e-21 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffff55, 0x55555555bbbbbbbb, 0x3fea),
+ /* c21
+ * base-10: 4.76837158203088859927583821449247042e-7
+ * base-16: 7.ffffffffff55555555556eeeeeec@-6
+ * base-2 : 1.1111111111111111111111111111111111111111110101010101010101010101010101010101010101011011101110111011101110111011e-22 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffd5, 0x555555555bbbbbbb, 0x3fe9),
+ /* c22
+ * base-10: 2.38418579101557982490947977218932680e-7
+ * base-16: 3.ffffffffffeaaaaaaaaaab777776@-6
+ * base-2 : 1.1111111111111111111111111111111111111111111101010101010101010101010101010101010101010101101110111011101110111011e-23 */
+ RTFLOAT128U_INIT_C(0, 0xfffffffffff5, 0x5555555555bbbbbb, 0x3fe8),
+ /* c23
+ * base-10: 1.19209289550780685311368497137922104e-7
+ * base-16: 1.fffffffffffd55555555555bbbbb@-6
+ * base-2 : 1.1111111111111111111111111111111111111111111111010101010101010101010101010101010101010101010110111011101110111011e-24 */
+ RTFLOAT128U_INIT_C(0, 0xfffffffffffd, 0x55555555555bbbbb, 0x3fe7),
+ /* c24
+ * base-10: 5.96046447753905544139210621417888700e-8
+ * base-16: f.fffffffffffaaaaaaaaaaaadddd8@-7
+ * base-2 : 1.1111111111111111111111111111111111111111111111110101010101010101010101010101010101010101010101011011101110111011e-25 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0x555555555555bbbb, 0x3fe6),
+ /* c25
+ * base-10: 2.98023223876953036767401327677095012e-8
+ * base-16: 7.ffffffffffff5555555555556eec@-7
+ * base-2 : 1.1111111111111111111111111111111111111111111111111101010101010101010101010101010101010101010101010101101110111011e-26 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xd555555555555bbb, 0x3fe5),
+ /* c26
+ * base-10: 1.49011611938476551470925165959632460e-8
+ * base-16: 3.ffffffffffffeaaaaaaaaaaaab76@-7
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111010101010101010101010101010101010101010101010101010110111011e-27 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xf5555555555555bb, 0x3fe4),
+ /* c27
+ * base-10: 7.45058059692382798713656457449539158e-9
+ * base-16: 1.fffffffffffffd5555555555555b@-7
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111110101010101010101010101010101010101010101010101010101011011e-28 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xfd5555555555555b, 0x3fe3),
+ /* c28
+ * base-10: 3.72529029846191404526707057181192332e-9
+ * base-16: f.fffffffffffffaaaaaaaaaaaaaa8@-8
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111101010101010101010101010101010101010101010101010101010101e-29 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xff55555555555555, 0x3fe2),
+ /* c29
+ * base-10: 1.86264514923095702909588382147649037e-9
+ * base-16: 7.ffffffffffffff55555555555554@-8
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111010101010101010101010101010101010101010101010101010101e-30 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xffd5555555555555, 0x3fe1),
+ /* c30
+ * base-10: 9.31322574615478515355735477684561273e-10
+ * base-16: 3.ffffffffffffffeaaaaaaaaaaaaa@-8
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111110101010101010101010101010101010101010101010101010101e-31 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xfff5555555555555, 0x3fe0),
+ /* c31
+ * base-10: 4.65661287307739257778841934710570148e-10
+ * base-16: 1.fffffffffffffffd555555555555@-8
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111101010101010101010101010101010101010101010101010101e-32 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xfffd555555555555, 0x3fdf),
+ /* c32
+ * base-10: 2.32830643653869628902042741838821262e-10
+ * base-16: f.fffffffffffffffaaaaaaaaaaaa8@-9
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111010101010101010101010101010101010101010101010101e-33 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xffff555555555555, 0x3fde),
+ /* c33
+ * base-10: 1.16415321826934814452599092729852655e-10
+ * base-16: 7.ffffffffffffffff555555555554@-9
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111110101010101010101010101010101010101010101010101e-34 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xffffd55555555555, 0x3fdd),
+ /* c34
+ * base-10: 5.82076609134674072264967615912315804e-11
+ * base-16: 3.ffffffffffffffffeaaaaaaaaaaa@-9
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111101010101010101010101010101010101010101010101e-35 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xfffff55555555555, 0x3fdc),
+ /* c35
+ * base-10: 2.91038304567337036132730326989039468e-11
+ * base-16: 1.fffffffffffffffffd5555555555@-9
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111010101010101010101010101010101010101010101e-36 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xfffffd5555555555, 0x3fdb),
+ /* c36
+ * base-10: 1.45519152283668518066395978373629930e-11
+ * base-16: f.fffffffffffffffffaaaaaaaaaa8@-10
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111110101010101010101010101010101010101010101e-37 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xffffff5555555555, 0x3fda),
+ /* c37
+ * base-10: 7.27595761418342590332018410467037395e-12
+ * base-16: 7.ffffffffffffffffff5555555554@-10
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111101010101010101010101010101010101010101e-38 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xffffffd555555555, 0x3fd9),
+ /* c38
+ * base-10: 3.63797880709171295166014020058379665e-12
+ * base-16: 3.ffffffffffffffffffeaaaaaaaaa@-10
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111010101010101010101010101010101010101e-39 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xfffffff555555555, 0x3fd8),
+ /* c39
+ * base-10: 1.81898940354585647583007611882297453e-12
+ * base-16: 1.fffffffffffffffffffd55555555@-10
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111110101010101010101010101010101010101e-40 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xfffffffd55555555, 0x3fd7),
+ /* c40
+ * base-10: 9.09494701772928237915038811727871795e-13
+ * base-16: f.fffffffffffffffffffaaaaaaaa8@-11
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111101010101010101010101010101010101e-41 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xffffffff55555555, 0x3fd6),
+ /* c41
+ * base-10: 4.54747350886464118957519499903483963e-13
+ * base-16: 7.ffffffffffffffffffff55555554@-11
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111010101010101010101010101010101e-42 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xffffffffd5555555, 0x3fd5),
+ /* c42
+ * base-10: 2.27373675443232059478759761706685489e-13
+ * base-16: 3.ffffffffffffffffffffeaaaaaaa@-11
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111110101010101010101010101010101e-43 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xfffffffff5555555, 0x3fd4),
+ /* c43
+ * base-10: 1.13686837721616029739379882322710683e-13
+ * base-16: 1.fffffffffffffffffffffd555555@-11
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111101010101010101010101010101e-44 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xfffffffffd555555, 0x3fd3),
+ /* c44
+ * base-10: 5.68434188608080148696899413450263340e-14
+ * base-16: f.fffffffffffffffffffffaaaaaa8@-12
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111010101010101010101010101e-45 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xffffffffff555555, 0x3fd2),
+ /* c45
+ * base-10: 2.84217094304040074348449706954720410e-14
+ * base-16: 7.ffffffffffffffffffffff555554@-12
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110101010101010101010101e-46 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xffffffffffd55555, 0x3fd1),
+ /* c46
+ * base-10: 1.42108547152020037174224853506058797e-14
+ * base-16: 3.ffffffffffffffffffffffeaaaaa@-12
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101010101010101010101e-47 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xfffffffffff55555, 0x3fd0),
+ /* c47
+ * base-10: 7.10542735760100185871124267566167230e-15
+ * base-16: 1.fffffffffffffffffffffffd5555@-12
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111010101010101010101e-48 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xfffffffffffd5555, 0x3fcf),
+ /* c48
+ * base-10: 3.55271367880050092935562133787567770e-15
+ * base-16: f.fffffffffffffffffffffffaaaa8@-13
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110101010101010101e-49 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xffffffffffff5555, 0x3fce),
+ /* c49
+ * base-10: 1.77635683940025046467781066894344404e-15
+ * base-16: 7.ffffffffffffffffffffffff5554@-13
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101010101010101e-50 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xffffffffffffd555, 0x3fcd),
+ /* c50
+ * base-10: 8.88178419700125232338905334472422671e-16
+ * base-16: 3.ffffffffffffffffffffffffeaaa@-13
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111010101010101e-51 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xfffffffffffff555, 0x3fcc),
+ /* c51
+ * base-10: 4.44089209850062616169452667236298917e-16
+ * base-16: 1.fffffffffffffffffffffffffd55@-13
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110101010101e-52 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xfffffffffffffd55, 0x3fcb),
+ /* c52
+ * base-10: 2.22044604925031308084726333618160406e-16
+ * base-16: f.fffffffffffffffffffffffffaa8@-14
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101010101e-53 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xffffffffffffff55, 0x3fca),
+ /* c53
+ * base-10: 1.11022302462515654042363166809081571e-16
+ * base-16: 7.ffffffffffffffffffffffffff54@-14
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111010101e-54 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xffffffffffffffd5, 0x3fc9),
+ /* c54
+ * base-10: 5.55111512312578270211815834045409568e-17
+ * base-16: 3.ffffffffffffffffffffffffffea@-14
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110101e-55 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xfffffffffffffff5, 0x3fc8),
+ /* c55
+ * base-10: 2.77555756156289135105907917022704997e-17
+ * base-16: 1.fffffffffffffffffffffffffffd@-14
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101e-56 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xfffffffffffffffd, 0x3fc7),
+ /* c56
+ * base-10: 1.38777878078144567552953958511352525e-17
+ * base-16: f.fffffffffffffffffffffffffff8@-15
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111e-57 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xffffffffffffffff, 0x3fc6),
+ /* c57
+ * base-10: 6.93889390390722837764769792556762628e-18
+ * base-16: 7.fffffffffffffffffffffffffffc@-15
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111e-58 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xffffffffffffffff, 0x3fc5),
+ /* c58
+ * base-10: 3.46944695195361418882384896278381314e-18
+ * base-16: 3.fffffffffffffffffffffffffffe@-15
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111e-59 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xffffffffffffffff, 0x3fc4),
+ /* c59
+ * base-10: 1.73472347597680709441192448139190657e-18
+ * base-16: 1.ffffffffffffffffffffffffffff@-15
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111e-60 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xffffffffffffffff, 0x3fc3),
+ /* c60
+ * base-10: 8.67361737988403547205962240695953285e-19
+ * base-16: f.fffffffffffffffffffffffffff8@-16
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111e-61 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xffffffffffffffff, 0x3fc2),
+ /* c61
+ * base-10: 4.33680868994201773602981120347976642e-19
+ * base-16: 7.fffffffffffffffffffffffffffc@-16
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111e-62 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xffffffffffffffff, 0x3fc1),
+ /* c62
+ * base-10: 2.16840434497100886801490560173988321e-19
+ * base-16: 3.fffffffffffffffffffffffffffe@-16
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111e-63 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xffffffffffffffff, 0x3fc0),
+ /* c63
+ * base-10: 1.08420217248550443400745280086994160e-19
+ * base-16: 1.ffffffffffffffffffffffffffff@-16
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111e-64 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xffffffffffffffff, 0x3fbf),
+ /* c64
+ * base-10: 5.42101086242752217003726400434970803e-20
+ * base-16: f.fffffffffffffffffffffffffff8@-17
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111e-65 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xffffffffffffffff, 0x3fbe),
+ /* c65
+ * base-10: 2.71050543121376108501863200217485401e-20
+ * base-16: 7.fffffffffffffffffffffffffffc@-17
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111e-66 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xffffffffffffffff, 0x3fbd),
+ /* c66
+ * base-10: 1.35525271560688054250931600108742700e-20
+ * base-16: 3.fffffffffffffffffffffffffffe@-17
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111e-67 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xffffffffffffffff, 0x3fbc),
+ /* c67
+ * base-10: 6.77626357803440271254658000543713504e-21
+ * base-16: 1.ffffffffffffffffffffffffffff@-17
+ * base-2 : 1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111e-68 */
+ RTFLOAT128U_INIT_C(0, 0xffffffffffff, 0xffffffffffffffff, 0x3fbb),
+};
+
+/** CORDIC multipliers for fsin and fcos, defined by K(i)=1/sqrt(1+2^(-2i)) */
+const RTFLOAT128U g_ar128FsincosCORDICConsts2[] =
+{
+ /* K_0
+ * base-10: 7.07106781186547524400844362104848992e-1
+ * base-16: b.504f333f9de6484597d89b3754a8@-1
+ * base-2 : 1.0110101000001001111001100110011111110011101111001100100100001000101100101111101100010011011001101110101010010101e-1 */
+ RTFLOAT128U_INIT_C(0, 0x6a09e667f3bc, 0xc908b2fb1366ea95, 0x3ffe),
+ /* K_1
+ * base-10: 6.32455532033675866399778708886543707e-1
+ * base-16: a.1e89b12424876d9b744b679ebd80@-1
+ * base-2 : 1.0100001111010001001101100010010010000100100100001110110110110011011011101000100101101100111100111101011110110000e-1 */
+ RTFLOAT128U_INIT_C(0, 0x43d136248490, 0xedb36e896cf3d7b0, 0x3ffe),
+ /* K_2
+ * base-10: 6.13571991077896349607809087758040841e-1
+ * base-16: 9.d130dd36bd1b4be3ce38c2fa55e8@-1
+ * base-2 : 1.0011101000100110000110111010011011010111101000110110100101111100011110011100011100011000010111110100101010111101e-1 */
+ RTFLOAT128U_INIT_C(0, 0x3a261ba6d7a3, 0x697c79c7185f4abd, 0x3ffe),
+ /* K_3
+ * base-10: 6.08833912517752421022113507547389826e-1
+ * base-16: 9.bdc8a0ef59fef6a460db793be8a8@-1
+ * base-2 : 1.0011011110111001000101000001110111101011001111111101111011010100100011000001101101101111001001110111110100010101e-1 */
+ RTFLOAT128U_INIT_C(0, 0x37b9141deb3f, 0xded48c1b6f277d15, 0x3ffe),
+ /* K_4
+ * base-10: 6.07648256256168200929321660309522991e-1
+ * base-16: 9.b8ed60c1777ac645ec45ba994918@-1
+ * base-2 : 1.0011011100011101101011000001100000101110111011110101100011001000101111011000100010110111010100110010100100100011e-1 */
+ RTFLOAT128U_INIT_C(0, 0x371dac182eef, 0x58c8bd88b7532923, 0x3ffe),
+ /* K_5
+ * base-10: 6.07351770141295959053512390387764175e-1
+ * base-16: 9.b7b67d5ecb0f9eb3185c60b4f4d8@-1
+ * base-2 : 1.0011011011110110110011111010101111011001011000011111001111010110011000110000101110001100000101101001111010011011e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36f6cfabd961, 0xf3d6630b8c169e9b, 0x3ffe),
+ /* K_6
+ * base-10: 6.07277644093525999046915367337588874e-1
+ * base-16: 9.b768c34f93f4616513c2419d8f20@-1
+ * base-2 : 1.0011011011101101000110000110100111110010011111101000110000101100101000100111100001001000001100111011000111100100e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36ed1869f27e, 0x8c2ca2784833b1e4, 0x3ffe),
+ /* K_7
+ * base-10: 6.07259112298892730060294541822503540e-1
+ * base-16: 9.b75554b859077bd2a38fd31394f0@-1
+ * base-2 : 1.0011011011101010101010101001011100001011001000001110111101111010010101000111000111111010011000100111001010011110e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36eaaa970b20, 0xef7a5471fa62729e, 0x3ffe),
+ /* K_8
+ * base-10: 6.07254479332562329717398086325156546e-1
+ * base-16: 9.b7507911536845cc04aea4f6eba0@-1
+ * base-2 : 1.0011011011101010000011110010001000101010011011010000100010111001100000001001010111010100100111101101110101110100e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36ea0f222a6d, 0x08b98095d49edd74, 0x3ffe),
+ /* K_9
+ * base-10: 6.07253321089875163343435198563766406e-1
+ * base-16: 9.b74f42277e91f21041fa5fc3b078@-1
+ * base-2 : 1.0011011011101001111010000100010011101111110100100011111001000010000010000011111101001011111110000111011000001111e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9e844efd2, 0x3e42083f4bf8760f, 0x3ffe),
+ /* K_10
+ * base-10: 6.07253031529134335402284654661528154e-1
+ * base-16: 9.b74ef46d082573a3ecafb1c8b090@-1
+ * base-2 : 1.0011011011101001110111101000110110100001000001001010111001110100011111011001010111110110001110010001011000010010e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9de8da104, 0xae747d95f6391612, 0x3ffe),
+ /* K_11
+ * base-10: 6.07252959138944813630351797637571092e-1
+ * base-16: 9.b74ee0fe6a76e56c9a04725fa1e8@-1
+ * base-2 : 1.0011011011101001110111000001111111001101010011101101110010101101100100110100000010001110010010111111010000111101e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9dc1fcd4e, 0xdcad93408e4bf43d, 0x3ffe),
+ /* K_12
+ * base-10: 6.07252941041397163512970186424103417e-1
+ * base-16: 9.b74edc22c30a0af4efe7db5b8e50@-1
+ * base-2 : 1.0011011011101001110110111000010001011000011000010100000101011110100111011111110011111011011010110111000111001010e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db845861, 0x415e9dfcfb6b71ca, 0x3ffe),
+ /* K_13
+ * base-10: 6.07252936517010234128971242079738721e-1
+ * base-16: 9.b74edaebd92ec0e867c3282d3d10@-1
+ * base-2 : 1.0011011011101001110110110101110101111011001001011101100000011101000011001111100001100101000001011010011110100010e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5d7b25, 0xd81d0cf86505a7a2, 0x3ffe),
+ /* K_14
+ * base-10: 6.07252935385913500729555602745276675e-1
+ * base-16: 9.b74eda9e1eb7ed2e5bdf08c6e640@-1
+ * base-2 : 1.0011011011101001110110110101001111000011110101101111110110100101110010110111101111100001000110001101110011001000e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db53c3d6, 0xfda5cb7be118dcc8, 0x3ffe),
+ /* K_15
+ * base-10: 6.07252935103139317313863198069543355e-1
+ * base-16: 9.b74eda8ab01a382c6a484d5c94b0@-1
+ * base-2 : 1.0011011011101001110110110101000101010110000000110100011100000101100011010100100100001001101010111001001010010110e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db515603, 0x47058d4909ab9296, 0x3ffe),
+ /* K_16
+ * base-10: 6.07252935032445771455825190959085565e-1
+ * base-16: 9.b74eda85d472caeab6f8c3375850@-1
+ * base-2 : 1.0011011011101001110110110101000010111010100011100101100101011101010101101101111100011000011001101110101100001010e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db50ba8e, 0x595d56df1866eb0a, 0x3ffe),
+ /* K_17
+ * base-10: 6.07252935014772384991058507559908879e-1
+ * base-16: 9.b74eda849d88ef9a36b642f91850@-1
+ * base-2 : 1.0011011011101001110110110101000010010011101100010001110111110011010001101101011011001000010111110010001100001010e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5093b1, 0x1df346d6c85f230a, 0x3ffe),
+ /* K_18
+ * base-10: 6.07252935010354038374850762858763680e-1
+ * base-16: 9.b74eda844fce78c6156eb90e3828@-1
+ * base-2 : 1.0011011011101001110110110101000010001001111110011100111100011000110000101010110111010111001000011100011100000101e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5089f9, 0xcf18c2add721c705, 0x3ffe),
+ /* K_19
+ * base-10: 6.07252935009249451720797822067767802e-1
+ * base-16: 9.b74eda843c5fdb110d0967f5cb10@-1
+ * base-2 : 1.0011011011101001110110110101000010000111100010111111101101100010001000011010000100101100111111101011100101100010e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db50878b, 0xfb6221a12cfeb962, 0x3ffe),
+ /* K_20
+ * base-10: 6.07252935008973305057284524081536971e-1
+ * base-16: 9.b74eda84378433a3caeedcc5d478@-1
+ * base-2 : 1.0011011011101001110110110101000010000110111100001000011001110100011110010101110111011011100110001011101010001111e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086f0, 0x8674795ddb98ba8f, 0x3ffe),
+ /* K_21
+ * base-10: 6.07252935008904268391406195660699088e-1
+ * base-16: 9.b74eda84364d49c87a68268b3918@-1
+ * base-2 : 1.0011011011101001110110110101000010000110110010011010100100111001000011110100110100000100110100010110011100100011e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086c9, 0xa9390f4d04d16723, 0x3ffe),
+ /* K_22
+ * base-10: 6.07252935008887009224936613310222053e-1
+ * base-16: 9.b74eda8435ff8f51a64677c5a860@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111111111000111101010001101001100100011001110111110001011010100001100e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bf, 0xf1ea34c8cef8b50c, 0x3ffe),
+ /* K_23
+ * base-10: 6.07252935008882694433319217707273524e-1
+ * base-16: 9.b74eda8435ec20b3f13e0c00d590@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111011000010000010110011111100010011111000001100000000001101010110010e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bd, 0x84167e27c1801ab2, 0x3ffe),
+ /* K_24
+ * base-10: 6.07252935008881615735414868805578290e-1
+ * base-16: 9.b74eda8435e7450c83fbf10e69f0@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001110100010100001100100000111111101111110001000011100110100111110e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xe8a1907f7e21cd3e, 0x3ffe),
+ /* K_25
+ * base-10: 6.07252935008881346060938781580094585e-1
+ * base-16: 9.b74eda8435e60e22a8ab6a51bb98@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001100000111000100010101010001010101101101010010100011011101110011e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xc1c455156d4a3773, 0x3ffe),
+ /* K_26
+ * base-10: 6.07252935008881278642319759773719879e-1
+ * base-16: 9.b74eda8435e5c06831d748a28ec8@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011100000001101000001100011101011101001000101000101000111011001e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb80d063ae91451d9, 0x3ffe),
+ /* K_27
+ * base-10: 6.07252935008881261787665004322125961e-1
+ * base-16: 9.b74eda8435e5acf994224036c380@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010110011111001100101000010001001000000001101101100001110000e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb59f32844806d870, 0x3ffe),
+ /* K_28
+ * base-10: 6.07252935008881257574001315459227506e-1
+ * base-16: 9.b74eda8435e5a81decb4fe1bd0b0@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010100000011101111011001011010011111110000110111101000010110e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb503bd969fc37a16, 0x3ffe),
+ /* K_29
+ * base-10: 6.07252935008881256520585393243502941e-1
+ * base-16: 9.b74eda8435e5a6e702d9ad951400@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011011100111000000101101100110101101100101010001010000000e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4dce05b35b2a280, 0x3ffe),
+ /* K_30
+ * base-10: 6.07252935008881256257231412689571847e-1
+ * base-16: 9.b74eda8435e5a6994862d97364d8@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011010011001010010000110001011011001011100110110010011011e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4d3290c5b2e6c9b, 0x3ffe),
+ /* K_31
+ * base-10: 6.07252935008881256191392917551089098e-1
+ * base-16: 9.b74eda8435e5a685d9c5246af910@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011010000101110110011100010100100100011010101111100100010e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4d0bb38a48d5f22, 0x3ffe),
+ /* K_32
+ * base-10: 6.07252935008881256174933293766468435e-1
+ * base-16: 9.b74eda8435e5a680fe1db728de20@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011010000000111111100001110110110111001010001101111000100e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4d01fc3b6e51bc4, 0x3ffe),
+ /* K_33
+ * base-10: 6.07252935008881256170818387820313317e-1
+ * base-16: 9.b74eda8435e5a67fc733dbd85768@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111110001110011001111011011110110000101011101101e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cff8e67b7b0aed, 0x3ffe),
+ /* K_34
+ * base-10: 6.07252935008881256169789661333774610e-1
+ * base-16: 9.b74eda8435e5a67f7979650435c0@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111011110010111100101100101000001000011010111000e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfef2f2ca086b8, 0x3ffe),
+ /* K_35
+ * base-10: 6.07252935008881256169532479712139957e-1
+ * base-16: 9.b74eda8435e5a67f660ac74f2d58@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111011001100000101011000111010011110010110101011e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfecc158e9e5ab, 0x3ffe),
+ /* K_36
+ * base-10: 6.07252935008881256169468184306731318e-1
+ * base-16: 9.b74eda8435e5a67f612f1fe1eb40@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111011000010010111100011111111000011110101101000e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfec25e3fc3d68, 0x3ffe),
+ /* K_37
+ * base-10: 6.07252935008881256169452110455379231e-1
+ * base-16: 9.b74eda8435e5a67f5ff836069ac0@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111111100000110110000001101001101011000e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebff06c0d358, 0x3ffe),
+ /* K_38
+ * base-10: 6.07252935008881256169448091992541305e-1
+ * base-16: 9.b74eda8435e5a67f5faa7b8fc6a8@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111010101001111011100011111100011010101e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf54f71f8d5, 0x3ffe),
+ /* K_39
+ * base-10: 6.07252935008881256169447087376831896e-1
+ * base-16: 9.b74eda8435e5a67f5f970cf211a8@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001011100001100111100100001000110101e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf2e19e4235, 0x3ffe),
+ /* K_40
+ * base-10: 6.07252935008881256169446836222904544e-1
+ * base-16: 9.b74eda8435e5a67f5f92314aa468@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001001000110001010010101010010001101e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf24629548d, 0x3ffe),
+ /* K_41
+ * base-10: 6.07252935008881256169446773434422802e-1
+ * base-16: 9.b74eda8435e5a67f5f90fa60c920@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000011111010011000001100100100100e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf21f4c1924, 0x3ffe),
+ /* K_42
+ * base-10: 6.07252935008881256169446757737302390e-1
+ * base-16: 9.b74eda8435e5a67f5f90aca65250@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010101100101001100101001001010e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf21594ca4a, 0x3ffe),
+ /* K_43
+ * base-10: 6.07252935008881256169446753813022336e-1
+ * base-16: 9.b74eda8435e5a67f5f909937b4a0@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010011001001101111011010010100e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf21326f694, 0x3ffe),
+ /* K_44
+ * base-10: 6.07252935008881256169446752831952370e-1
+ * base-16: 9.b74eda8435e5a67f5f90945c0d38@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010010100010111000000110100111e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf2128b81a7, 0x3ffe),
+ /* K_45
+ * base-10: 6.07252935008881256169446752586684903e-1
+ * base-16: 9.b74eda8435e5a67f5f9093252360@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010010011001001010010001101100e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf21264a46c, 0x3ffe),
+ /* K_46
+ * base-10: 6.07252935008881256169446752525368108e-1
+ * base-16: 9.b74eda8435e5a67f5f9092d768f0@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010010010110101110110100011110e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf2125aed1e, 0x3ffe),
+ /* K_47
+ * base-10: 6.07252935008881256169446752510038958e-1
+ * base-16: 9.b74eda8435e5a67f5f9092c3fa58@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010010010110000111111101001011e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf212587f4b, 0x3ffe),
+ /* K_48
+ * base-10: 6.07252935008881256169446752506206742e-1
+ * base-16: 9.b74eda8435e5a67f5f9092bf1eb8@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010010010101111110001111010111e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf21257e3d7, 0x3ffe),
+ /* K_49
+ * base-10: 6.07252935008881256169446752505248689e-1
+ * base-16: 9.b74eda8435e5a67f5f9092bde7d0@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010010010101111011110011111010e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf21257bcfa, 0x3ffe),
+ /* K_50
+ * base-10: 6.07252935008881256169446752505009199e-1
+ * base-16: 9.b74eda8435e5a67f5f9092bd9a18@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010010010101111011001101000011e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf21257b343, 0x3ffe),
+ /* K_51
+ * base-10: 6.07252935008881256169446752504949399e-1
+ * base-16: 9.b74eda8435e5a67f5f9092bd86b0@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010010010101111011000011010110e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf21257b0d6, 0x3ffe),
+ /* K_52
+ * base-10: 6.07252935008881256169446752504934473e-1
+ * base-16: 9.b74eda8435e5a67f5f9092bd81d8@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010010010101111011000000111011e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf21257b03b, 0x3ffe),
+ /* K_53
+ * base-10: 6.07252935008881256169446752504930814e-1
+ * base-16: 9.b74eda8435e5a67f5f9092bd80a8@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010010010101111011000000010101e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf21257b015, 0x3ffe),
+ /* K_54
+ * base-10: 6.07252935008881256169446752504929947e-1
+ * base-16: 9.b74eda8435e5a67f5f9092bd8060@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010010010101111011000000001100e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf21257b00c, 0x3ffe),
+ /* K_55
+ * base-10: 6.07252935008881256169446752504929755e-1
+ * base-16: 9.b74eda8435e5a67f5f9092bd8050@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010010010101111011000000001010e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf21257b00a, 0x3ffe),
+ /* K_56
+ * base-10: 6.07252935008881256169446752504929755e-1
+ * base-16: 9.b74eda8435e5a67f5f9092bd8050@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010010010101111011000000001010e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf21257b00a, 0x3ffe),
+ /* K_57
+ * base-10: 6.07252935008881256169446752504929755e-1
+ * base-16: 9.b74eda8435e5a67f5f9092bd8050@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010010010101111011000000001010e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf21257b00a, 0x3ffe),
+ /* K_58
+ * base-10: 6.07252935008881256169446752504929755e-1
+ * base-16: 9.b74eda8435e5a67f5f9092bd8050@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010010010101111011000000001010e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf21257b00a, 0x3ffe),
+ /* K_59
+ * base-10: 6.07252935008881256169446752504929755e-1
+ * base-16: 9.b74eda8435e5a67f5f9092bd8050@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010010010101111011000000001010e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf21257b00a, 0x3ffe),
+ /* K_60
+ * base-10: 6.07252935008881256169446752504929755e-1
+ * base-16: 9.b74eda8435e5a67f5f9092bd8050@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010010010101111011000000001010e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf21257b00a, 0x3ffe),
+ /* K_61
+ * base-10: 6.07252935008881256169446752504929755e-1
+ * base-16: 9.b74eda8435e5a67f5f9092bd8050@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010010010101111011000000001010e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf21257b00a, 0x3ffe),
+ /* K_62
+ * base-10: 6.07252935008881256169446752504929755e-1
+ * base-16: 9.b74eda8435e5a67f5f9092bd8050@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010010010101111011000000001010e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf21257b00a, 0x3ffe),
+ /* K_63
+ * base-10: 6.07252935008881256169446752504929755e-1
+ * base-16: 9.b74eda8435e5a67f5f9092bd8050@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010010010101111011000000001010e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf21257b00a, 0x3ffe),
+ /* K_64
+ * base-10: 6.07252935008881256169446752504929755e-1
+ * base-16: 9.b74eda8435e5a67f5f9092bd8050@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010010010101111011000000001010e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf21257b00a, 0x3ffe),
+ /* K_65
+ * base-10: 6.07252935008881256169446752504929755e-1
+ * base-16: 9.b74eda8435e5a67f5f9092bd8050@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010010010101111011000000001010e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf21257b00a, 0x3ffe),
+ /* K_66
+ * base-10: 6.07252935008881256169446752504929755e-1
+ * base-16: 9.b74eda8435e5a67f5f9092bd8050@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010010010101111011000000001010e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf21257b00a, 0x3ffe),
+ /* K_67
+ * base-10: 6.07252935008881256169446752504929755e-1
+ * base-16: 9.b74eda8435e5a67f5f9092bd8050@-1
+ * base-2 : 1.0011011011101001110110110101000010000110101111001011010011001111111010111111001000010010010101111011000000001010e-1 */
+ RTFLOAT128U_INIT_C(0, 0x36e9db5086bc, 0xb4cfebf21257b00a, 0x3ffe),
+};
+
+#endif /* !VBOX_INCLUDED_SRC_source_extF80_sincos_h */
diff --git a/src/libs/softfloat-3e/source/extF80_sqrt.c b/src/libs/softfloat-3e/source/extF80_sqrt.c
new file mode 100644
index 00000000..50c40248
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_sqrt.c
@@ -0,0 +1,176 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+extFloat80_t extF80_sqrt( extFloat80_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64;
+ uint_fast64_t uiA0;
+ bool signA;
+ int_fast32_t expA;
+ uint_fast64_t sigA;
+ struct uint128 uiZ;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+ struct exp32_sig64 normExpSig;
+ int_fast32_t expZ;
+ uint_fast32_t sig32A, recipSqrt32, sig32Z;
+ struct uint128 rem;
+ uint_fast64_t q, x64, sigZ;
+ struct uint128 y, term;
+ uint_fast64_t sigZExtra;
+ union { struct extFloat80M s; extFloat80_t f; } uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ uiA0 = uA.s.signif;
+ signA = signExtF80UI64( uiA64 );
+ expA = expExtF80UI64( uiA64 );
+ sigA = uiA0;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0x7FFF ) {
+ if ( sigA & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) {
+ uiZ = softfloat_propagateNaNExtF80UI( uiA64, uiA0, 0, 0 SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ64 = uiZ.v64;
+ uiZ0 = uiZ.v0;
+ goto uiZ;
+ }
+ if ( ! signA ) return a;
+ goto invalid;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( signA ) {
+ if ( ! sigA ) goto zero;
+ goto invalid;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expA ) expA = 1;
+ if ( ! (sigA & UINT64_C( 0x8000000000000000 )) ) {
+ if ( ! sigA ) goto zero;
+ normExpSig = softfloat_normSubnormalExtF80Sig( sigA );
+ expA += normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ | (`sig32Z' is guaranteed to be a lower bound on the square root of
+ | `sig32A', which makes `sig32Z' also a lower bound on the square root of
+ | `sigA'.)
+ *------------------------------------------------------------------------*/
+ expZ = ((expA - 0x3FFF)>>1) + 0x3FFF;
+ expA &= 1;
+ sig32A = sigA>>32;
+ recipSqrt32 = softfloat_approxRecipSqrt32_1( expA, sig32A );
+ sig32Z = ((uint_fast64_t) sig32A * recipSqrt32)>>32;
+ if ( expA ) {
+ sig32Z >>= 1;
+ rem = softfloat_shortShiftLeft128( 0, sigA, 61 );
+ } else {
+ rem = softfloat_shortShiftLeft128( 0, sigA, 62 );
+ }
+ rem.v64 -= (uint_fast64_t) sig32Z * sig32Z;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ q = ((uint32_t) (rem.v64>>2) * (uint_fast64_t) recipSqrt32)>>32;
+ x64 = (uint_fast64_t) sig32Z<<32;
+ sigZ = x64 + (q<<3);
+ y = softfloat_shortShiftLeft128( rem.v64, rem.v0, 29 );
+ /*------------------------------------------------------------------------
+ | (Repeating this loop is a rare occurrence.)
+ *------------------------------------------------------------------------*/
+ for (;;) {
+ term = softfloat_mul64ByShifted32To128( x64 + sigZ, q );
+ rem = softfloat_sub128( y.v64, y.v0, term.v64, term.v0 );
+ if ( ! (rem.v64 & UINT64_C( 0x8000000000000000 )) ) break;
+ --q;
+ sigZ -= 1<<3;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ q = (((rem.v64>>2) * recipSqrt32)>>32) + 2;
+ x64 = sigZ;
+ sigZ = (sigZ<<1) + (q>>25);
+ sigZExtra = (uint64_t) (q<<39);
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( (q & 0xFFFFFF) <= 2 ) {
+ q &= ~(uint_fast64_t) 0xFFFF;
+ sigZExtra = (uint64_t) (q<<39);
+ term = softfloat_mul64ByShifted32To128( x64 + (q>>27), q );
+ x64 = (uint32_t) (q<<5) * (uint_fast64_t) (uint32_t) q;
+ term = softfloat_add128( term.v64, term.v0, 0, x64 );
+ rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, 28 );
+ rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 );
+ if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) {
+ if ( ! sigZExtra ) --sigZ;
+ --sigZExtra;
+ } else {
+ if ( rem.v64 | rem.v0 ) sigZExtra |= 1;
+ }
+ }
+ return
+ softfloat_roundPackToExtF80(
+ 0, expZ, sigZ, sigZExtra, extF80_roundingPrecision SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ64 = defaultNaNExtF80UI64;
+ uiZ0 = defaultNaNExtF80UI0;
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zero:
+ uiZ64 = packToExtF80UI64( signA, 0 );
+ uiZ0 = 0;
+ uiZ:
+ uZ.s.signExp = uiZ64;
+ uZ.s.signif = uiZ0;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_sub.c b/src/libs/softfloat-3e/source/extF80_sub.c
new file mode 100644
index 00000000..78bbec56
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_sub.c
@@ -0,0 +1,80 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+extFloat80_t extF80_sub( extFloat80_t a, extFloat80_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64;
+ uint_fast64_t uiA0;
+ bool signA;
+ union { struct extFloat80M s; extFloat80_t f; } uB;
+ uint_fast16_t uiB64;
+ uint_fast64_t uiB0;
+ bool signB;
+#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 2)
+ extFloat80_t
+ (*magsFuncPtr)(
+ uint_fast16_t, uint_fast64_t, uint_fast16_t, uint_fast64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+#endif
+
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ uiA0 = uA.s.signif;
+ signA = signExtF80UI64( uiA64 );
+ uB.f = b;
+ uiB64 = uB.s.signExp;
+ uiB0 = uB.s.signif;
+ signB = signExtF80UI64( uiB64 );
+#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
+ if ( signA == signB ) {
+ return softfloat_subMagsExtF80( uiA64, uiA0, uiB64, uiB0, signA SOFTFLOAT_STATE_ARG_COMMA );
+ } else {
+ return softfloat_addMagsExtF80( uiA64, uiA0, uiB64, uiB0, signA SOFTFLOAT_STATE_ARG_COMMA );
+ }
+#else
+ magsFuncPtr =
+ (signA == signB) ? softfloat_subMagsExtF80 : softfloat_addMagsExtF80;
+ return (*magsFuncPtr)( uiA64, uiA0, uiB64, uiB0, signA SOFTFLOAT_STATE_ARG_COMMA );
+#endif
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_tan.c b/src/libs/softfloat-3e/source/extF80_tan.c
new file mode 100644
index 00000000..24c0430f
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_tan.c
@@ -0,0 +1,76 @@
+/** @file
+ * SoftFloat - VBox Extension - extF80_tan.
+ */
+
+/*
+ * Copyright (C) 2022 Oracle and/or its affiliates.
+ *
+ * This file is part of VirtualBox base platform packages, as
+ * available from https://www.virtualbox.org.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, in version 3 of the
+ * License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <https://www.gnu.org/licenses>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-only
+ */
+
+
+/*********************************************************************************************************************************
+* Header Files *
+*********************************************************************************************************************************/
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+#include <iprt/types.h>
+#include <iprt/x86.h>
+
+extern const RTFLOAT128U g_r128pi2;
+
+extFloat80_t extF80_tan( extFloat80_t x SOFTFLOAT_STATE_DECL_COMMA )
+{
+ int32_t fSign = 0;
+ extFloat80_t v, f80Zero, f80One, f80Pi2;
+
+ f80Zero = ui32_to_extF80(0, pState);
+ f80One = ui32_to_extF80(1, pState);
+ f80Pi2 = f128_to_extF80(*(float128_t *)&g_r128pi2, pState);
+
+ if (extF80_le(x, f80Zero, pState))
+ {
+ x = extF80_sub(f80Zero, x, pState);
+ fSign = 1;
+ }
+
+ uint16_t fCxFlags = 0;
+ extFloat80_t rem = extF80_partialRem(x, f80Pi2, pState->roundingMode, &fCxFlags, pState);
+ int32_t const quo = X86_FSW_CX_TO_QUOTIENT(fCxFlags);
+
+ v = extF80_div(rem, f80Pi2, pState);
+ v = extF80_mul(v, v, pState);
+ v = extF80_sub(f80One, v, pState);
+ v = extF80_div(rem, v, pState);
+
+ if (quo % 2)
+ {
+ v = extF80_div(f80One, v, pState);
+ v = extF80_sub(f80Zero, v, pState);
+ }
+
+ if (fSign)
+ v = extF80_sub(f80Zero, v, pState);
+
+ return v;
+}
diff --git a/src/libs/softfloat-3e/source/extF80_to_f128.c b/src/libs/softfloat-3e/source/extF80_to_f128.c
new file mode 100644
index 00000000..3e9a57d8
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_to_f128.c
@@ -0,0 +1,75 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float128_t extF80_to_f128( extFloat80_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64;
+ uint_fast64_t uiA0;
+ uint_fast16_t exp;
+ uint_fast64_t frac;
+ struct commonNaN commonNaN;
+ struct uint128 uiZ;
+ bool sign;
+ struct uint128 frac128;
+ union ui128_f128 uZ;
+
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ uiA0 = uA.s.signif;
+ exp = expExtF80UI64( uiA64 );
+ frac = uiA0 & UINT64_C( 0x7FFFFFFFFFFFFFFF );
+ if ( (exp == 0x7FFF) && frac ) {
+ softfloat_extF80UIToCommonNaN( uiA64, uiA0, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToF128UI( &commonNaN );
+ } else {
+ sign = signExtF80UI64( uiA64 );
+ frac128 = softfloat_shortShiftLeft128( 0, frac, 49 );
+ uiZ.v64 = packToF128UI64( sign, exp, frac128.v64 );
+ uiZ.v0 = frac128.v0;
+ }
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_to_f16.c b/src/libs/softfloat-3e/source/extF80_to_f16.c
new file mode 100644
index 00000000..70f7ed36
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_to_f16.c
@@ -0,0 +1,96 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float16_t extF80_to_f16( extFloat80_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64;
+ uint_fast64_t uiA0;
+ bool sign;
+ int_fast32_t exp;
+ uint_fast64_t sig;
+ struct commonNaN commonNaN;
+ uint_fast16_t uiZ, sig16;
+ union ui16_f16 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ uiA0 = uA.s.signif;
+ sign = signExtF80UI64( uiA64 );
+ exp = expExtF80UI64( uiA64 );
+ sig = uiA0;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x7FFF ) {
+ if ( sig & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) {
+ softfloat_extF80UIToCommonNaN( uiA64, uiA0, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToF16UI( &commonNaN );
+ } else {
+ uiZ = packToF16UI( sign, 0x1F, 0 );
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sig16 = softfloat_shortShiftRightJam64( sig, 49 );
+ if ( ! (exp | sig16) ) {
+ uiZ = packToF16UI( sign, 0, 0 );
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ exp -= 0x3FF1;
+ if ( sizeof (int_fast16_t) < sizeof (int_fast32_t) ) {
+ if ( exp < -0x40 ) exp = -0x40;
+ }
+ return softfloat_roundPackToF16( sign, exp, sig16 SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_to_f32.c b/src/libs/softfloat-3e/source/extF80_to_f32.c
new file mode 100644
index 00000000..b94915a2
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_to_f32.c
@@ -0,0 +1,96 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float32_t extF80_to_f32( extFloat80_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64;
+ uint_fast64_t uiA0;
+ bool sign;
+ int_fast32_t exp;
+ uint_fast64_t sig;
+ struct commonNaN commonNaN;
+ uint_fast32_t uiZ, sig32;
+ union ui32_f32 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ uiA0 = uA.s.signif;
+ sign = signExtF80UI64( uiA64 );
+ exp = expExtF80UI64( uiA64 );
+ sig = uiA0;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x7FFF ) {
+ if ( sig & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) {
+ softfloat_extF80UIToCommonNaN( uiA64, uiA0, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToF32UI( &commonNaN );
+ } else {
+ uiZ = packToF32UI( sign, 0xFF, 0 );
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sig32 = softfloat_shortShiftRightJam64( sig, 33 );
+ if ( ! (exp | sig32) ) {
+ uiZ = packToF32UI( sign, 0, 0 );
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ exp -= 0x3F81;
+ if ( sizeof (int_fast16_t) < sizeof (int_fast32_t) ) {
+ if ( exp < -0x1000 ) exp = -0x1000;
+ }
+ return softfloat_roundPackToF32( sign, exp, sig32 SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_to_f64.c b/src/libs/softfloat-3e/source/extF80_to_f64.c
new file mode 100644
index 00000000..012832da
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_to_f64.c
@@ -0,0 +1,96 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float64_t extF80_to_f64( extFloat80_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64;
+ uint_fast64_t uiA0;
+ bool sign;
+ int_fast32_t exp;
+ uint_fast64_t sig;
+ struct commonNaN commonNaN;
+ uint_fast64_t uiZ;
+ union ui64_f64 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ uiA0 = uA.s.signif;
+ sign = signExtF80UI64( uiA64 );
+ exp = expExtF80UI64( uiA64 );
+ sig = uiA0;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! (exp | sig) ) {
+ uiZ = packToF64UI( sign, 0, 0 );
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x7FFF ) {
+ if ( sig & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) {
+ softfloat_extF80UIToCommonNaN( uiA64, uiA0, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToF64UI( &commonNaN );
+ } else {
+ uiZ = packToF64UI( sign, 0x7FF, 0 );
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sig = softfloat_shortShiftRightJam64( sig, 1 );
+ exp -= 0x3C01;
+ if ( sizeof (int_fast16_t) < sizeof (int_fast32_t) ) {
+ if ( exp < -0x1000 ) exp = -0x1000;
+ }
+ return softfloat_roundPackToF64( sign, exp, sig SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_to_i32.c b/src/libs/softfloat-3e/source/extF80_to_i32.c
new file mode 100644
index 00000000..2d9d8eba
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_to_i32.c
@@ -0,0 +1,83 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+int_fast32_t
+ extF80_to_i32( extFloat80_t a, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64;
+ bool sign;
+ int_fast32_t exp;
+ uint_fast64_t sig;
+ int_fast32_t shiftDist;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ sign = signExtF80UI64( uiA64 );
+ exp = expExtF80UI64( uiA64 );
+ sig = uA.s.signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#if (i32_fromNaN != i32_fromPosOverflow) || (i32_fromNaN != i32_fromNegOverflow)
+ if ( (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF )) ) {
+#if (i32_fromNaN == i32_fromPosOverflow)
+ sign = 0;
+#elif (i32_fromNaN == i32_fromNegOverflow)
+ sign = 1;
+#else
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return i32_fromNaN;
+#endif
+ }
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x4032 - exp;
+ if ( shiftDist <= 0 ) shiftDist = 1;
+ sig = softfloat_shiftRightJam64( sig, shiftDist );
+ return softfloat_roundToI32( sign, sig, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_to_i32_r_minMag.c b/src/libs/softfloat-3e/source/extF80_to_i32_r_minMag.c
new file mode 100644
index 00000000..420884cd
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_to_i32_r_minMag.c
@@ -0,0 +1,97 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+int_fast32_t extF80_to_i32_r_minMag( extFloat80_t a, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64;
+ int_fast32_t exp;
+ uint_fast64_t sig;
+ int_fast32_t shiftDist;
+ bool sign;
+ int_fast32_t absZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ exp = expExtF80UI64( uiA64 );
+ sig = uA.s.signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x403E - exp;
+ if ( 64 <= shiftDist ) {
+ if ( exact && (exp | sig) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return 0;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sign = signExtF80UI64( uiA64 );
+ if ( shiftDist < 33 ) {
+ if (
+ (uiA64 == packToExtF80UI64( 1, 0x401E ))
+ && (sig < UINT64_C( 0x8000000100000000 ))
+ ) {
+ if ( exact && (sig & UINT64_C( 0x00000000FFFFFFFF )) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return -0x7FFFFFFF - 1;
+ }
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
+ ? i32_fromNaN
+ : sign ? i32_fromNegOverflow : i32_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ absZ = sig>>shiftDist;
+ if ( exact && ((uint_fast64_t) (uint_fast32_t) absZ<<shiftDist != sig) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return sign ? -absZ : absZ;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_to_i64.c b/src/libs/softfloat-3e/source/extF80_to_i64.c
new file mode 100644
index 00000000..e62ca164
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_to_i64.c
@@ -0,0 +1,89 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+int_fast64_t
+ extF80_to_i64( extFloat80_t a, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64;
+ bool sign;
+ int_fast32_t exp;
+ uint_fast64_t sig;
+ int_fast32_t shiftDist;
+ uint_fast64_t sigExtra;
+ struct uint64_extra sig64Extra;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ sign = signExtF80UI64( uiA64 );
+ exp = expExtF80UI64( uiA64 );
+ sig = uA.s.signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x403E - exp;
+ if ( shiftDist <= 0 ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( shiftDist ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
+ ? i64_fromNaN
+ : sign ? i64_fromNegOverflow : i64_fromPosOverflow;
+ }
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ sigExtra = 0;
+ } else {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ sig64Extra = softfloat_shiftRightJam64Extra( sig, 0, shiftDist );
+ sig = sig64Extra.v;
+ sigExtra = sig64Extra.extra;
+ }
+ return softfloat_roundToI64( sign, sig, sigExtra, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_to_i64_r_minMag.c b/src/libs/softfloat-3e/source/extF80_to_i64_r_minMag.c
new file mode 100644
index 00000000..390cf445
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_to_i64_r_minMag.c
@@ -0,0 +1,94 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+int_fast64_t extF80_to_i64_r_minMag( extFloat80_t a, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64;
+ int_fast32_t exp;
+ uint_fast64_t sig;
+ int_fast32_t shiftDist;
+ bool sign;
+ int_fast64_t absZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ exp = expExtF80UI64( uiA64 );
+ sig = uA.s.signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x403E - exp;
+ if ( 64 <= shiftDist ) {
+ if ( exact && (exp | sig) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return 0;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sign = signExtF80UI64( uiA64 );
+ if ( shiftDist <= 0 ) {
+ if (
+ (uiA64 == packToExtF80UI64( 1, 0x403E ))
+ && (sig == UINT64_C( 0x8000000000000000 ))
+ ) {
+ return -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1;
+ }
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
+ ? i64_fromNaN
+ : sign ? i64_fromNegOverflow : i64_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ absZ = sig>>shiftDist;
+ if ( exact && (uint64_t) (sig<<(-shiftDist & 63)) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return sign ? -absZ : absZ;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_to_ui32.c b/src/libs/softfloat-3e/source/extF80_to_ui32.c
new file mode 100644
index 00000000..90800776
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_to_ui32.c
@@ -0,0 +1,83 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+uint_fast32_t
+ extF80_to_ui32( extFloat80_t a, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64;
+ bool sign;
+ int_fast32_t exp;
+ uint_fast64_t sig;
+ int_fast32_t shiftDist;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ sign = signExtF80UI64( uiA64 );
+ exp = expExtF80UI64( uiA64 );
+ sig = uA.s.signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#if (ui32_fromNaN != ui32_fromPosOverflow) || (ui32_fromNaN != ui32_fromNegOverflow)
+ if ( (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF )) ) {
+#if (ui32_fromNaN == ui32_fromPosOverflow)
+ sign = 0;
+#elif (ui32_fromNaN == ui32_fromNegOverflow)
+ sign = 1;
+#else
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return ui32_fromNaN;
+#endif
+ }
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x4032 - exp;
+ if ( shiftDist <= 0 ) shiftDist = 1;
+ sig = softfloat_shiftRightJam64( sig, shiftDist );
+ return softfloat_roundToUI32( sign, sig, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_to_ui32_r_minMag.c b/src/libs/softfloat-3e/source/extF80_to_ui32_r_minMag.c
new file mode 100644
index 00000000..19352d56
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_to_ui32_r_minMag.c
@@ -0,0 +1,88 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+uint_fast32_t extF80_to_ui32_r_minMag( extFloat80_t a, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64;
+ int_fast32_t exp;
+ uint_fast64_t sig;
+ int_fast32_t shiftDist;
+ bool sign;
+ uint_fast32_t z;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ exp = expExtF80UI64( uiA64 );
+ sig = uA.s.signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x403E - exp;
+ if ( 64 <= shiftDist ) {
+ if ( exact && (exp | sig) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return 0;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sign = signExtF80UI64( uiA64 );
+ if ( sign || (shiftDist < 32) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
+ ? ui32_fromNaN
+ : sign ? ui32_fromNegOverflow : ui32_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ z = sig>>shiftDist;
+ if ( exact && ((uint_fast64_t) z<<shiftDist != sig) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return z;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_to_ui64.c b/src/libs/softfloat-3e/source/extF80_to_ui64.c
new file mode 100644
index 00000000..d37a43da
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_to_ui64.c
@@ -0,0 +1,84 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+uint_fast64_t
+ extF80_to_ui64( extFloat80_t a, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64;
+ bool sign;
+ int_fast32_t exp;
+ uint_fast64_t sig;
+ int_fast32_t shiftDist;
+ uint_fast64_t sigExtra;
+ struct uint64_extra sig64Extra;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ sign = signExtF80UI64( uiA64 );
+ exp = expExtF80UI64( uiA64 );
+ sig = uA.s.signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x403E - exp;
+ if ( shiftDist < 0 ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
+ ? ui64_fromNaN
+ : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sigExtra = 0;
+ if ( shiftDist ) {
+ sig64Extra = softfloat_shiftRightJam64Extra( sig, 0, shiftDist );
+ sig = sig64Extra.v;
+ sigExtra = sig64Extra.extra;
+ }
+ return softfloat_roundToUI64( sign, sig, sigExtra, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/extF80_to_ui64_r_minMag.c b/src/libs/softfloat-3e/source/extF80_to_ui64_r_minMag.c
new file mode 100644
index 00000000..425c4074
--- /dev/null
+++ b/src/libs/softfloat-3e/source/extF80_to_ui64_r_minMag.c
@@ -0,0 +1,88 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+uint_fast64_t extF80_to_ui64_r_minMag( extFloat80_t a, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union { struct extFloat80M s; extFloat80_t f; } uA;
+ uint_fast16_t uiA64;
+ int_fast32_t exp;
+ uint_fast64_t sig;
+ int_fast32_t shiftDist;
+ bool sign;
+ uint_fast64_t z;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.s.signExp;
+ exp = expExtF80UI64( uiA64 );
+ sig = uA.s.signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x403E - exp;
+ if ( 64 <= shiftDist ) {
+ if ( exact && (exp | sig) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return 0;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sign = signExtF80UI64( uiA64 );
+ if ( sign || (shiftDist < 0) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF) && (sig & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
+ ? ui64_fromNaN
+ : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ z = sig>>shiftDist;
+ if ( exact && (z<<shiftDist != sig) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return z;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128M_add.c b/src/libs/softfloat-3e/source/f128M_add.c
new file mode 100644
index 00000000..3d1c7384
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_add.c
@@ -0,0 +1,98 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void
+ f128M_add( const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint64_t *aWPtr, *bWPtr;
+ uint_fast64_t uiA64, uiA0;
+ bool signA;
+ uint_fast64_t uiB64, uiB0;
+ bool signB;
+#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 2)
+ float128_t
+ (*magsFuncPtr)(
+ uint_fast64_t, uint_fast64_t, uint_fast64_t, uint_fast64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+#endif
+
+ aWPtr = (const uint64_t *) aPtr;
+ bWPtr = (const uint64_t *) bPtr;
+ uiA64 = aWPtr[indexWord( 2, 1 )];
+ uiA0 = aWPtr[indexWord( 2, 0 )];
+ signA = signF128UI64( uiA64 );
+ uiB64 = bWPtr[indexWord( 2, 1 )];
+ uiB0 = bWPtr[indexWord( 2, 0 )];
+ signB = signF128UI64( uiB64 );
+#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
+ if ( signA == signB ) {
+ *zPtr = softfloat_addMagsF128( uiA64, uiA0, uiB64, uiB0, signA SOFTFLOAT_STATE_ARG_COMMA );
+ } else {
+ *zPtr = softfloat_subMagsF128( uiA64, uiA0, uiB64, uiB0, signA SOFTFLOAT_STATE_ARG_COMMA );
+ }
+#else
+ magsFuncPtr =
+ (signA == signB) ? softfloat_addMagsF128 : softfloat_subMagsF128;
+ *zPtr = (*magsFuncPtr)( uiA64, uiA0, uiB64, uiB0, signA SOFTFLOAT_STATE_ARG_COMMA );
+#endif
+
+}
+
+#else
+
+void
+ f128M_add( const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ softfloat_addF128M(
+ (const uint32_t *) aPtr,
+ (const uint32_t *) bPtr,
+ (uint32_t *) zPtr,
+ false
+ SOFTFLOAT_STATE_ARG_COMMA
+ );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128M_div.c b/src/libs/softfloat-3e/source/f128M_div.c
new file mode 100644
index 00000000..9473fad8
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_div.c
@@ -0,0 +1,187 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void
+ f128M_div( const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ *zPtr = f128_div( *aPtr, *bPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void
+ f128M_div( const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint32_t *aWPtr, *bWPtr;
+ uint32_t *zWPtr, uiA96;
+ bool signA;
+ int32_t expA;
+ uint32_t uiB96;
+ bool signB;
+ int32_t expB;
+ bool signZ;
+ uint32_t y[5], sigB[4];
+ int32_t expZ;
+ uint32_t recip32;
+ int ix;
+ uint64_t q64;
+ uint32_t q, qs[3], uiZ96;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aWPtr = (const uint32_t *) aPtr;
+ bWPtr = (const uint32_t *) bPtr;
+ zWPtr = (uint32_t *) zPtr;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ signA = signF128UI96( uiA96 );
+ expA = expF128UI96( uiA96 );
+ uiB96 = bWPtr[indexWordHi( 4 )];
+ signB = signF128UI96( uiB96 );
+ expB = expF128UI96( uiB96 );
+ signZ = signA ^ signB;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( (expA == 0x7FFF) || (expB == 0x7FFF) ) {
+ if ( softfloat_tryPropagateNaNF128M( aWPtr, bWPtr, zWPtr SOFTFLOAT_STATE_ARG_COMMA ) ) return;
+ if ( expA == 0x7FFF ) {
+ if ( expB == 0x7FFF ) goto invalid;
+ goto infinity;
+ }
+ goto zero;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expA = softfloat_shiftNormSigF128M( aWPtr, 13, y );
+ expB = softfloat_shiftNormSigF128M( bWPtr, 13, sigB );
+ if ( expA == -128 ) {
+ if ( expB == -128 ) goto invalid;
+ goto zero;
+ }
+ if ( expB == -128 ) {
+ softfloat_raiseFlags( softfloat_flag_infinite SOFTFLOAT_STATE_ARG_COMMA );
+ goto infinity;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expZ = expA - expB + 0x3FFE;
+ if ( softfloat_compare128M( y, sigB ) < 0 ) {
+ --expZ;
+ softfloat_add128M( y, y, y );
+ }
+ recip32 =
+ softfloat_approxRecip32_1(
+ ((uint64_t) sigB[indexWord( 4, 3 )]<<32 | sigB[indexWord( 4, 2 )])
+ >>30
+ );
+ ix = 3;
+ for (;;) {
+ q64 = (uint64_t) y[indexWordHi( 4 )] * recip32;
+ q = (q64 + 0x80000000)>>32;
+ --ix;
+ if ( ix < 0 ) break;
+ softfloat_remStep128MBy32( y, 29, sigB, q, y );
+ if ( y[indexWordHi( 4 )] & 0x80000000 ) {
+ --q;
+ softfloat_add128M( y, sigB, y );
+ }
+ qs[ix] = q;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ((q + 1) & 7) < 2 ) {
+ softfloat_remStep128MBy32( y, 29, sigB, q, y );
+ if ( y[indexWordHi( 4 )] & 0x80000000 ) {
+ --q;
+ softfloat_add128M( y, sigB, y );
+ } else if ( softfloat_compare128M( sigB, y ) <= 0 ) {
+ ++q;
+ softfloat_sub128M( y, sigB, y );
+ }
+ if (
+ y[indexWordLo( 4 )] || y[indexWord( 4, 1 )]
+ || (y[indexWord( 4, 2 )] | y[indexWord( 4, 3 )])
+ ) {
+ q |= 1;
+ }
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ q64 = (uint64_t) q<<28;
+ y[indexWord( 5, 0 )] = q64;
+ q64 = ((uint64_t) qs[0]<<25) + (q64>>32);
+ y[indexWord( 5, 1 )] = q64;
+ q64 = ((uint64_t) qs[1]<<22) + (q64>>32);
+ y[indexWord( 5, 2 )] = q64;
+ q64 = ((uint64_t) qs[2]<<19) + (q64>>32);
+ y[indexWord( 5, 3 )] = q64;
+ y[indexWord( 5, 4 )] = q64>>32;
+ softfloat_roundPackMToF128M( signZ, expZ, y, zWPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_invalidF128M( zWPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ infinity:
+ uiZ96 = packToF128UI96( signZ, 0x7FFF, 0 );
+ goto uiZ96;
+ zero:
+ uiZ96 = packToF128UI96( signZ, 0, 0 );
+ uiZ96:
+ zWPtr[indexWordHi( 4 )] = uiZ96;
+ zWPtr[indexWord( 4, 2 )] = 0;
+ zWPtr[indexWord( 4, 1 )] = 0;
+ zWPtr[indexWord( 4, 0 )] = 0;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128M_eq.c b/src/libs/softfloat-3e/source/f128M_eq.c
new file mode 100644
index 00000000..29c9fbc9
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_eq.c
@@ -0,0 +1,100 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+bool f128M_eq( const float128_t *aPtr, const float128_t *bPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return f128_eq( *aPtr, *bPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+bool f128M_eq( const float128_t *aPtr, const float128_t *bPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint32_t *aWPtr, *bWPtr;
+ uint32_t wordA, wordB, uiA96, uiB96;
+ bool possibleOppositeZeros;
+ uint32_t mashWord;
+
+ aWPtr = (const uint32_t *) aPtr;
+ bWPtr = (const uint32_t *) bPtr;
+ wordA = aWPtr[indexWord( 4, 2 )];
+ wordB = bWPtr[indexWord( 4, 2 )];
+ if ( wordA != wordB ) goto false_checkSigNaNs;
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ uiB96 = bWPtr[indexWordHi( 4 )];
+ possibleOppositeZeros = false;
+ if ( uiA96 != uiB96 ) {
+ possibleOppositeZeros = (((uiA96 | uiB96) & 0x7FFFFFFF) == 0);
+ if ( ! possibleOppositeZeros ) goto false_checkSigNaNs;
+ }
+ mashWord = wordA | wordB;
+ wordA = aWPtr[indexWord( 4, 1 )];
+ wordB = bWPtr[indexWord( 4, 1 )];
+ if ( wordA != wordB ) goto false_checkSigNaNs;
+ mashWord |= wordA | wordB;
+ wordA = aWPtr[indexWord( 4, 0 )];
+ wordB = bWPtr[indexWord( 4, 0 )];
+ if ( wordA != wordB ) goto false_checkSigNaNs;
+ if ( possibleOppositeZeros && ((mashWord | wordA | wordB) != 0) ) {
+ goto false_checkSigNaNs;
+ }
+ if ( ! softfloat_isNaNF128M( aWPtr ) && ! softfloat_isNaNF128M( bWPtr ) ) {
+ return true;
+ }
+ false_checkSigNaNs:
+ if (
+ f128M_isSignalingNaN( (const float128_t *) aWPtr )
+ || f128M_isSignalingNaN( (const float128_t *) bWPtr )
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ return false;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128M_eq_signaling.c b/src/libs/softfloat-3e/source/f128M_eq_signaling.c
new file mode 100644
index 00000000..e019fd51
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_eq_signaling.c
@@ -0,0 +1,92 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+bool f128M_eq_signaling( const float128_t *aPtr, const float128_t *bPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return f128_eq_signaling( *aPtr, *bPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+bool f128M_eq_signaling( const float128_t *aPtr, const float128_t *bPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint32_t *aWPtr, *bWPtr;
+ uint32_t wordA, wordB, uiA96, uiB96;
+ bool possibleOppositeZeros;
+ uint32_t mashWord;
+
+ aWPtr = (const uint32_t *) aPtr;
+ bWPtr = (const uint32_t *) bPtr;
+ if ( softfloat_isNaNF128M( aWPtr ) || softfloat_isNaNF128M( bWPtr ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return false;
+ }
+ wordA = aWPtr[indexWord( 4, 2 )];
+ wordB = bWPtr[indexWord( 4, 2 )];
+ if ( wordA != wordB ) return false;
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ uiB96 = bWPtr[indexWordHi( 4 )];
+ possibleOppositeZeros = false;
+ if ( uiA96 != uiB96 ) {
+ possibleOppositeZeros = (((uiA96 | uiB96) & 0x7FFFFFFF) == 0);
+ if ( ! possibleOppositeZeros ) return false;
+ }
+ mashWord = wordA | wordB;
+ wordA = aWPtr[indexWord( 4, 1 )];
+ wordB = bWPtr[indexWord( 4, 1 )];
+ if ( wordA != wordB ) return false;
+ mashWord |= wordA | wordB;
+ wordA = aWPtr[indexWord( 4, 0 )];
+ wordB = bWPtr[indexWord( 4, 0 )];
+ return
+ (wordA == wordB)
+ && (! possibleOppositeZeros || ((mashWord | wordA | wordB) == 0));
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128M_le.c b/src/libs/softfloat-3e/source/f128M_le.c
new file mode 100644
index 00000000..07313e2b
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_le.c
@@ -0,0 +1,93 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+bool f128M_le( const float128_t *aPtr, const float128_t *bPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return f128_le( *aPtr, *bPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+bool f128M_le( const float128_t *aPtr, const float128_t *bPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint32_t *aWPtr, *bWPtr;
+ uint32_t uiA96, uiB96;
+ bool signA, signB;
+ uint32_t wordA, wordB;
+
+ aWPtr = (const uint32_t *) aPtr;
+ bWPtr = (const uint32_t *) bPtr;
+ if ( softfloat_isNaNF128M( aWPtr ) || softfloat_isNaNF128M( bWPtr ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return false;
+ }
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ uiB96 = bWPtr[indexWordHi( 4 )];
+ signA = signF128UI96( uiA96 );
+ signB = signF128UI96( uiB96 );
+ if ( signA != signB ) {
+ if ( signA ) return true;
+ if ( (uiA96 | uiB96) & 0x7FFFFFFF ) return false;
+ wordA = aWPtr[indexWord( 4, 2 )];
+ wordB = bWPtr[indexWord( 4, 2 )];
+ if ( wordA | wordB ) return false;
+ wordA = aWPtr[indexWord( 4, 1 )];
+ wordB = bWPtr[indexWord( 4, 1 )];
+ if ( wordA | wordB ) return false;
+ wordA = aWPtr[indexWord( 4, 0 )];
+ wordB = bWPtr[indexWord( 4, 0 )];
+ return ((wordA | wordB) == 0);
+ }
+ if ( signA ) {
+ aWPtr = (const uint32_t *) bPtr;
+ bWPtr = (const uint32_t *) aPtr;
+ }
+ return (softfloat_compare128M( aWPtr, bWPtr ) <= 0);
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128M_le_quiet.c b/src/libs/softfloat-3e/source/f128M_le_quiet.c
new file mode 100644
index 00000000..b1028b00
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_le_quiet.c
@@ -0,0 +1,96 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+bool f128M_le_quiet( const float128_t *aPtr, const float128_t *bPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return f128_le_quiet( *aPtr, *bPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+bool f128M_le_quiet( const float128_t *aPtr, const float128_t *bPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint32_t *aWPtr, *bWPtr;
+ uint32_t uiA96, uiB96;
+ bool signA, signB;
+ uint32_t wordA, wordB;
+
+ aWPtr = (const uint32_t *) aPtr;
+ bWPtr = (const uint32_t *) bPtr;
+ if ( softfloat_isNaNF128M( aWPtr ) || softfloat_isNaNF128M( bWPtr ) ) {
+ if ( f128M_isSignalingNaN( aPtr ) || f128M_isSignalingNaN( bPtr ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ return false;
+ }
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ uiB96 = bWPtr[indexWordHi( 4 )];
+ signA = signF128UI96( uiA96 );
+ signB = signF128UI96( uiB96 );
+ if ( signA != signB ) {
+ if ( signA ) return true;
+ if ( (uiA96 | uiB96) & 0x7FFFFFFF ) return false;
+ wordA = aWPtr[indexWord( 4, 2 )];
+ wordB = bWPtr[indexWord( 4, 2 )];
+ if ( wordA | wordB ) return false;
+ wordA = aWPtr[indexWord( 4, 1 )];
+ wordB = bWPtr[indexWord( 4, 1 )];
+ if ( wordA | wordB ) return false;
+ wordA = aWPtr[indexWord( 4, 0 )];
+ wordB = bWPtr[indexWord( 4, 0 )];
+ return ((wordA | wordB) == 0);
+ }
+ if ( signA ) {
+ aWPtr = (const uint32_t *) bPtr;
+ bWPtr = (const uint32_t *) aPtr;
+ }
+ return (softfloat_compare128M( aWPtr, bWPtr ) <= 0);
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128M_lt.c b/src/libs/softfloat-3e/source/f128M_lt.c
new file mode 100644
index 00000000..7347cc91
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_lt.c
@@ -0,0 +1,93 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+bool f128M_lt( const float128_t *aPtr, const float128_t *bPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return f128_lt( *aPtr, *bPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+bool f128M_lt( const float128_t *aPtr, const float128_t *bPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint32_t *aWPtr, *bWPtr;
+ uint32_t uiA96, uiB96;
+ bool signA, signB;
+ uint32_t wordA, wordB;
+
+ aWPtr = (const uint32_t *) aPtr;
+ bWPtr = (const uint32_t *) bPtr;
+ if ( softfloat_isNaNF128M( aWPtr ) || softfloat_isNaNF128M( bWPtr ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return false;
+ }
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ uiB96 = bWPtr[indexWordHi( 4 )];
+ signA = signF128UI96( uiA96 );
+ signB = signF128UI96( uiB96 );
+ if ( signA != signB ) {
+ if ( signB ) return false;
+ if ( (uiA96 | uiB96) & 0x7FFFFFFF ) return true;
+ wordA = aWPtr[indexWord( 4, 2 )];
+ wordB = bWPtr[indexWord( 4, 2 )];
+ if ( wordA | wordB ) return true;
+ wordA = aWPtr[indexWord( 4, 1 )];
+ wordB = bWPtr[indexWord( 4, 1 )];
+ if ( wordA | wordB ) return true;
+ wordA = aWPtr[indexWord( 4, 0 )];
+ wordB = bWPtr[indexWord( 4, 0 )];
+ return ((wordA | wordB) != 0);
+ }
+ if ( signA ) {
+ aWPtr = (const uint32_t *) bPtr;
+ bWPtr = (const uint32_t *) aPtr;
+ }
+ return (softfloat_compare128M( aWPtr, bWPtr ) < 0);
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128M_lt_quiet.c b/src/libs/softfloat-3e/source/f128M_lt_quiet.c
new file mode 100644
index 00000000..4a1c0630
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_lt_quiet.c
@@ -0,0 +1,96 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+bool f128M_lt_quiet( const float128_t *aPtr, const float128_t *bPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return f128_lt_quiet( *aPtr, *bPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+bool f128M_lt_quiet( const float128_t *aPtr, const float128_t *bPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint32_t *aWPtr, *bWPtr;
+ uint32_t uiA96, uiB96;
+ bool signA, signB;
+ uint32_t wordA, wordB;
+
+ aWPtr = (const uint32_t *) aPtr;
+ bWPtr = (const uint32_t *) bPtr;
+ if ( softfloat_isNaNF128M( aWPtr ) || softfloat_isNaNF128M( bWPtr ) ) {
+ if ( f128M_isSignalingNaN( aPtr ) || f128M_isSignalingNaN( bPtr ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ return false;
+ }
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ uiB96 = bWPtr[indexWordHi( 4 )];
+ signA = signF128UI96( uiA96 );
+ signB = signF128UI96( uiB96 );
+ if ( signA != signB ) {
+ if ( signB ) return false;
+ if ( (uiA96 | uiB96) & 0x7FFFFFFF ) return true;
+ wordA = aWPtr[indexWord( 4, 2 )];
+ wordB = bWPtr[indexWord( 4, 2 )];
+ if ( wordA | wordB ) return true;
+ wordA = aWPtr[indexWord( 4, 1 )];
+ wordB = bWPtr[indexWord( 4, 1 )];
+ if ( wordA | wordB ) return true;
+ wordA = aWPtr[indexWord( 4, 0 )];
+ wordB = bWPtr[indexWord( 4, 0 )];
+ return ((wordA | wordB) != 0);
+ }
+ if ( signA ) {
+ aWPtr = (const uint32_t *) bPtr;
+ bWPtr = (const uint32_t *) aPtr;
+ }
+ return (softfloat_compare128M( aWPtr, bWPtr ) < 0);
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128M_mul.c b/src/libs/softfloat-3e/source/f128M_mul.c
new file mode 100644
index 00000000..ada366f8
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_mul.c
@@ -0,0 +1,158 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void
+ f128M_mul( const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ *zPtr = f128_mul( *aPtr, *bPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void
+ f128M_mul( const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint32_t *aWPtr, *bWPtr;
+ uint32_t *zWPtr;
+ uint32_t uiA96;
+ int32_t expA;
+ uint32_t uiB96;
+ int32_t expB;
+ bool signZ;
+ const uint32_t *ptr;
+ uint32_t uiZ96, sigA[4];
+ uint_fast8_t shiftDist;
+ uint32_t sigB[4];
+ int32_t expZ;
+ uint32_t sigProd[8], *extSigZPtr;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aWPtr = (const uint32_t *) aPtr;
+ bWPtr = (const uint32_t *) bPtr;
+ zWPtr = (uint32_t *) zPtr;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ expA = expF128UI96( uiA96 );
+ uiB96 = bWPtr[indexWordHi( 4 )];
+ expB = expF128UI96( uiB96 );
+ signZ = signF128UI96( uiA96 ) ^ signF128UI96( uiB96 );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( (expA == 0x7FFF) || (expB == 0x7FFF) ) {
+ if ( softfloat_tryPropagateNaNF128M( aWPtr, bWPtr, zWPtr SOFTFLOAT_STATE_ARG_COMMA ) ) return;
+ ptr = aWPtr;
+ if ( ! expA ) goto possiblyInvalid;
+ if ( ! expB ) {
+ ptr = bWPtr;
+ possiblyInvalid:
+ if (
+ ! fracF128UI96( ptr[indexWordHi( 4 )] )
+ && ! (ptr[indexWord( 4, 2 )] | ptr[indexWord( 4, 1 )]
+ | ptr[indexWord( 4, 0 )])
+ ) {
+ softfloat_invalidF128M( zWPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return;
+ }
+ }
+ uiZ96 = packToF128UI96( signZ, 0x7FFF, 0 );
+ goto uiZ96;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA ) {
+ sigA[indexWordHi( 4 )] = fracF128UI96( uiA96 ) | 0x00010000;
+ sigA[indexWord( 4, 2 )] = aWPtr[indexWord( 4, 2 )];
+ sigA[indexWord( 4, 1 )] = aWPtr[indexWord( 4, 1 )];
+ sigA[indexWord( 4, 0 )] = aWPtr[indexWord( 4, 0 )];
+ } else {
+ expA = softfloat_shiftNormSigF128M( aWPtr, 0, sigA );
+ if ( expA == -128 ) goto zero;
+ }
+ if ( expB ) {
+ sigB[indexWordHi( 4 )] = fracF128UI96( uiB96 ) | 0x00010000;
+ sigB[indexWord( 4, 2 )] = bWPtr[indexWord( 4, 2 )];
+ sigB[indexWord( 4, 1 )] = bWPtr[indexWord( 4, 1 )];
+ sigB[indexWord( 4, 0 )] = bWPtr[indexWord( 4, 0 )];
+ } else {
+ expB = softfloat_shiftNormSigF128M( bWPtr, 0, sigB );
+ if ( expB == -128 ) goto zero;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expZ = expA + expB - 0x4000;
+ softfloat_mul128MTo256M( sigA, sigB, sigProd );
+ if (
+ sigProd[indexWord( 8, 2 )]
+ || (sigProd[indexWord( 8, 1 )] | sigProd[indexWord( 8, 0 )])
+ ) {
+ sigProd[indexWord( 8, 3 )] |= 1;
+ }
+ extSigZPtr = &sigProd[indexMultiwordHi( 8, 5 )];
+ shiftDist = 16;
+ if ( extSigZPtr[indexWordHi( 5 )] & 2 ) {
+ ++expZ;
+ shiftDist = 15;
+ }
+ softfloat_shortShiftLeft160M( extSigZPtr, shiftDist, extSigZPtr );
+ softfloat_roundPackMToF128M( signZ, expZ, extSigZPtr, zWPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zero:
+ uiZ96 = packToF128UI96( signZ, 0, 0 );
+ uiZ96:
+ zWPtr[indexWordHi( 4 )] = uiZ96;
+ zWPtr[indexWord( 4, 2 )] = 0;
+ zWPtr[indexWord( 4, 1 )] = 0;
+ zWPtr[indexWord( 4, 0 )] = 0;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128M_mulAdd.c b/src/libs/softfloat-3e/source/f128M_mulAdd.c
new file mode 100644
index 00000000..1845a376
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_mulAdd.c
@@ -0,0 +1,95 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void
+ f128M_mulAdd(
+ const float128_t *aPtr,
+ const float128_t *bPtr,
+ const float128_t *cPtr,
+ float128_t *zPtr
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ const uint64_t *aWPtr, *bWPtr, *cWPtr;
+ uint_fast64_t uiA64, uiA0;
+ uint_fast64_t uiB64, uiB0;
+ uint_fast64_t uiC64, uiC0;
+
+ aWPtr = (const uint64_t *) aPtr;
+ bWPtr = (const uint64_t *) bPtr;
+ cWPtr = (const uint64_t *) cPtr;
+ uiA64 = aWPtr[indexWord( 2, 1 )];
+ uiA0 = aWPtr[indexWord( 2, 0 )];
+ uiB64 = bWPtr[indexWord( 2, 1 )];
+ uiB0 = bWPtr[indexWord( 2, 0 )];
+ uiC64 = cWPtr[indexWord( 2, 1 )];
+ uiC0 = cWPtr[indexWord( 2, 0 )];
+ *zPtr = softfloat_mulAddF128( uiA64, uiA0, uiB64, uiB0, uiC64, uiC0, 0 SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void
+ f128M_mulAdd(
+ const float128_t *aPtr,
+ const float128_t *bPtr,
+ const float128_t *cPtr,
+ float128_t *zPtr
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+
+ softfloat_mulAddF128M(
+ (const uint32_t *) aPtr,
+ (const uint32_t *) bPtr,
+ (const uint32_t *) cPtr,
+ (uint32_t *) zPtr,
+ 0
+ SOFTFLOAT_STATE_ARG_COMMA
+ );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128M_rem.c b/src/libs/softfloat-3e/source/f128M_rem.c
new file mode 100644
index 00000000..dcef134c
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_rem.c
@@ -0,0 +1,182 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void
+ f128M_rem( const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ *zPtr = f128_rem( *aPtr, *bPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void
+ f128M_rem( const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint32_t *aWPtr, *bWPtr;
+ uint32_t *zWPtr, uiA96;
+ int32_t expA, expB;
+ uint32_t x[4], rem1[5], *remPtr;
+ bool signRem;
+ int32_t expDiff;
+ uint32_t q, recip32;
+ uint64_t q64;
+ uint32_t rem2[5], *altRemPtr, *newRemPtr, wordMeanRem;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aWPtr = (const uint32_t *) aPtr;
+ bWPtr = (const uint32_t *) bPtr;
+ zWPtr = (uint32_t *) zPtr;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ expA = expF128UI96( uiA96 );
+ expB = expF128UI96( bWPtr[indexWordHi( 4 )] );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( (expA == 0x7FFF) || (expB == 0x7FFF) ) {
+ if ( softfloat_tryPropagateNaNF128M( aWPtr, bWPtr, zWPtr SOFTFLOAT_STATE_ARG_COMMA ) ) return;
+ if ( expA == 0x7FFF ) goto invalid;
+ goto copyA;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA < expB - 1 ) goto copyA;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expB = softfloat_shiftNormSigF128M( bWPtr, 13, x );
+ if ( expB == -128 ) goto invalid;
+ remPtr = &rem1[indexMultiwordLo( 5, 4 )];
+ expA = softfloat_shiftNormSigF128M( aWPtr, 13, remPtr );
+ if ( expA == -128 ) goto copyA;
+ signRem = signF128UI96( uiA96 );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expDiff = expA - expB;
+ if ( expDiff < 1 ) {
+ if ( expDiff < -1 ) goto copyA;
+ if ( expDiff ) {
+ --expB;
+ softfloat_add128M( x, x, x );
+ q = 0;
+ } else {
+ q = (softfloat_compare128M( x, remPtr ) <= 0);
+ if ( q ) softfloat_sub128M( remPtr, x, remPtr );
+ }
+ } else {
+ recip32 =
+ softfloat_approxRecip32_1(
+ ((uint64_t) x[indexWord( 4, 3 )]<<32 | x[indexWord( 4, 2 )])
+ >>30
+ );
+ expDiff -= 30;
+ for (;;) {
+ q64 = (uint64_t) remPtr[indexWordHi( 4 )] * recip32;
+ if ( expDiff < 0 ) break;
+ q = (q64 + 0x80000000)>>32;
+ softfloat_remStep128MBy32( remPtr, 29, x, q, remPtr );
+ if ( remPtr[indexWordHi( 4 )] & 0x80000000 ) {
+ softfloat_add128M( remPtr, x, remPtr );
+ }
+ expDiff -= 29;
+ }
+ /*--------------------------------------------------------------------
+ | (`expDiff' cannot be less than -29 here.)
+ *--------------------------------------------------------------------*/
+ q = (uint32_t) (q64>>32)>>(~expDiff & 31);
+ softfloat_remStep128MBy32( remPtr, expDiff + 30, x, q, remPtr );
+ if ( remPtr[indexWordHi( 4 )] & 0x80000000 ) {
+ altRemPtr = &rem2[indexMultiwordLo( 5, 4 )];
+ softfloat_add128M( remPtr, x, altRemPtr );
+ goto selectRem;
+ }
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ altRemPtr = &rem2[indexMultiwordLo( 5, 4 )];
+ do {
+ ++q;
+ newRemPtr = altRemPtr;
+ softfloat_sub128M( remPtr, x, newRemPtr );
+ altRemPtr = remPtr;
+ remPtr = newRemPtr;
+ } while ( ! (remPtr[indexWordHi( 4 )] & 0x80000000) );
+ selectRem:
+ softfloat_add128M( remPtr, altRemPtr, x );
+ wordMeanRem = x[indexWordHi( 4 )];
+ if (
+ (wordMeanRem & 0x80000000)
+ || (! wordMeanRem && (q & 1) && ! x[indexWord( 4, 0 )]
+ && ! (x[indexWord( 4, 2 )] | x[indexWord( 4, 1 )]))
+ ) {
+ remPtr = altRemPtr;
+ }
+ if ( remPtr[indexWordHi( 4 )] & 0x80000000 ) {
+ signRem = ! signRem;
+ softfloat_negX128M( remPtr );
+ }
+ remPtr -= indexMultiwordLo( 5, 4 );
+ remPtr[indexWordHi( 5 )] = 0;
+ softfloat_normRoundPackMToF128M( signRem, expB + 18, remPtr, zWPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_invalidF128M( zWPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ copyA:
+ zWPtr[indexWordHi( 4 )] = uiA96;
+ zWPtr[indexWord( 4, 2 )] = aWPtr[indexWord( 4, 2 )];
+ zWPtr[indexWord( 4, 1 )] = aWPtr[indexWord( 4, 1 )];
+ zWPtr[indexWord( 4, 0 )] = aWPtr[indexWord( 4, 0 )];
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128M_roundToInt.c b/src/libs/softfloat-3e/source/f128M_roundToInt.c
new file mode 100644
index 00000000..7b48d522
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_roundToInt.c
@@ -0,0 +1,225 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void
+ f128M_roundToInt(
+ const float128_t *aPtr,
+ uint_fast8_t roundingMode,
+ bool exact,
+ float128_t *zPtr
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+
+ *zPtr = f128_roundToInt( *aPtr, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void
+ f128M_roundToInt(
+ const float128_t *aPtr,
+ uint_fast8_t roundingMode,
+ bool exact,
+ float128_t *zPtr
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ const uint32_t *aWPtr;
+ uint32_t *zWPtr;
+ uint32_t ui96;
+ int32_t exp;
+ uint32_t sigExtra;
+ bool sign;
+ uint_fast8_t bitPos;
+ bool roundNear;
+ unsigned int index, lastIndex;
+ bool extra;
+ uint32_t wordA, bit, wordZ;
+ uint_fast8_t carry;
+ uint32_t extrasMask;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aWPtr = (const uint32_t *) aPtr;
+ zWPtr = (uint32_t *) zPtr;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ ui96 = aWPtr[indexWordHi( 4 )];
+ exp = expF128UI96( ui96 );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp < 0x3FFF ) {
+ zWPtr[indexWord( 4, 2 )] = 0;
+ zWPtr[indexWord( 4, 1 )] = 0;
+ zWPtr[indexWord( 4, 0 )] = 0;
+ sigExtra = aWPtr[indexWord( 4, 2 )];
+ if ( !sigExtra ) {
+ sigExtra = aWPtr[indexWord( 4, 1 )] | aWPtr[indexWord( 4, 0 )];
+ }
+ if ( !sigExtra && !(ui96 & 0x7FFFFFFF) ) goto ui96;
+ if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+ sign = signF128UI96( ui96 );
+ switch ( roundingMode ) {
+ case softfloat_round_near_even:
+ if ( !fracF128UI96( ui96 ) && !sigExtra ) break;
+ case softfloat_round_near_maxMag:
+ if ( exp == 0x3FFE ) goto mag1;
+ break;
+ case softfloat_round_min:
+ if ( sign ) goto mag1;
+ break;
+ case softfloat_round_max:
+ if ( !sign ) goto mag1;
+ break;
+#ifdef SOFTFLOAT_ROUND_ODD
+ case softfloat_round_odd:
+ goto mag1;
+#endif
+ }
+ ui96 = packToF128UI96( sign, 0, 0 );
+ goto ui96;
+ mag1:
+ ui96 = packToF128UI96( sign, 0x3FFF, 0 );
+ goto ui96;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( 0x406F <= exp ) {
+ if (
+ (exp == 0x7FFF)
+ && (fracF128UI96( ui96 )
+ || (aWPtr[indexWord( 4, 2 )] | aWPtr[indexWord( 4, 1 )]
+ | aWPtr[indexWord( 4, 0 )]))
+ ) {
+ softfloat_propagateNaNF128M( aWPtr, 0, zWPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return;
+ }
+ zWPtr[indexWord( 4, 2 )] = aWPtr[indexWord( 4, 2 )];
+ zWPtr[indexWord( 4, 1 )] = aWPtr[indexWord( 4, 1 )];
+ zWPtr[indexWord( 4, 0 )] = aWPtr[indexWord( 4, 0 )];
+ goto ui96;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ bitPos = 0x406F - exp;
+ roundNear =
+ (roundingMode == softfloat_round_near_maxMag)
+ || (roundingMode == softfloat_round_near_even);
+ bitPos -= roundNear;
+ index = indexWordLo( 4 );
+ lastIndex = indexWordHi( 4 );
+ extra = 0;
+ for (;;) {
+ wordA = aWPtr[index];
+ if ( bitPos < 32 ) break;
+ if ( wordA ) extra = 1;
+ zWPtr[index] = 0;
+ index += wordIncr;
+ bitPos -= 32;
+ }
+ bit = (uint32_t) 1<<bitPos;
+ if ( roundNear ) {
+ wordZ = wordA + bit;
+ carry = (wordZ < wordA);
+ bit <<= 1;
+ extrasMask = bit - 1;
+ if ( exact && (extra || (wordA & extrasMask)) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ if (
+ (roundingMode == softfloat_round_near_even)
+ && !extra && !(wordZ & extrasMask)
+ ) {
+ if ( !bit ) {
+ zWPtr[index] = wordZ;
+ index += wordIncr;
+ wordZ = aWPtr[index] + carry;
+ carry &= !wordZ;
+ zWPtr[index] = wordZ & ~1;
+ goto propagateCarry;
+ }
+ wordZ &= ~bit;
+ }
+ } else {
+ wordZ = wordA;
+ carry = 0;
+ extrasMask = bit - 1;
+ if ( extra || (wordA & extrasMask) ) {
+ if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+ if (
+ roundingMode
+ == (signF128UI96( ui96 ) ? softfloat_round_min
+ : softfloat_round_max)
+ ) {
+ wordZ += bit;
+ carry = (wordZ < wordA);
+#ifdef SOFTFLOAT_ROUND_ODD
+ } else if ( roundingMode == softfloat_round_odd ) {
+ wordZ |= bit;
+#endif
+ }
+ }
+ }
+ wordZ &= ~extrasMask;
+ zWPtr[index] = wordZ;
+ propagateCarry:
+ while ( index != lastIndex ) {
+ index += wordIncr;
+ wordZ = aWPtr[index] + carry;
+ zWPtr[index] = wordZ;
+ carry &= !wordZ;
+ }
+ return;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ ui96:
+ zWPtr[indexWordHi( 4 )] = ui96;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128M_sqrt.c b/src/libs/softfloat-3e/source/f128M_sqrt.c
new file mode 100644
index 00000000..5fc1a263
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_sqrt.c
@@ -0,0 +1,228 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void f128M_sqrt( const float128_t *aPtr, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ *zPtr = f128_sqrt( *aPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void f128M_sqrt( const float128_t *aPtr, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint32_t *aWPtr;
+ uint32_t *zWPtr;
+ uint32_t uiA96;
+ bool signA;
+ int32_t rawExpA;
+ uint32_t rem[6];
+ int32_t expA, expZ;
+ uint64_t rem64;
+ uint32_t sig32A, recipSqrt32, sig32Z, qs[3], q;
+ uint64_t sig64Z;
+ uint32_t term[5];
+ uint64_t x64;
+ uint32_t y[5], rem32;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aWPtr = (const uint32_t *) aPtr;
+ zWPtr = (uint32_t *) zPtr;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ signA = signF128UI96( uiA96 );
+ rawExpA = expF128UI96( uiA96 );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( rawExpA == 0x7FFF ) {
+ if (
+ fracF128UI96( uiA96 )
+ || (aWPtr[indexWord( 4, 2 )] | aWPtr[indexWord( 4, 1 )]
+ | aWPtr[indexWord( 4, 0 )])
+ ) {
+ softfloat_propagateNaNF128M( aWPtr, 0, zWPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return;
+ }
+ if ( ! signA ) goto copyA;
+ goto invalid;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expA = softfloat_shiftNormSigF128M( aWPtr, 13 - (rawExpA & 1), rem );
+ if ( expA == -128 ) goto copyA;
+ if ( signA ) goto invalid;
+ /*------------------------------------------------------------------------
+ | (`sig32Z' is guaranteed to be a lower bound on the square root of
+ | `sig32A', which makes `sig32Z' also a lower bound on the square root of
+ | `sigA'.)
+ *------------------------------------------------------------------------*/
+ expZ = ((expA - 0x3FFF)>>1) + 0x3FFE;
+ expA &= 1;
+ rem64 = (uint64_t) rem[indexWord( 4, 3 )]<<32 | rem[indexWord( 4, 2 )];
+ if ( expA ) {
+ if ( ! rawExpA ) {
+ softfloat_shortShiftRight128M( rem, 1, rem );
+ rem64 >>= 1;
+ }
+ sig32A = rem64>>29;
+ } else {
+ sig32A = rem64>>30;
+ }
+ recipSqrt32 = softfloat_approxRecipSqrt32_1( expA, sig32A );
+ sig32Z = ((uint64_t) sig32A * recipSqrt32)>>32;
+ if ( expA ) sig32Z >>= 1;
+ qs[2] = sig32Z;
+ rem64 -= (uint64_t) sig32Z * sig32Z;
+ rem[indexWord( 4, 3 )] = rem64>>32;
+ rem[indexWord( 4, 2 )] = rem64;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ q = ((uint32_t) (rem64>>2) * (uint64_t) recipSqrt32)>>32;
+ sig64Z = ((uint64_t) sig32Z<<32) + ((uint64_t) q<<3);
+ term[indexWord( 4, 3 )] = 0;
+ term[indexWord( 4, 0 )] = 0;
+ /*------------------------------------------------------------------------
+ | (Repeating this loop is a rare occurrence.)
+ *------------------------------------------------------------------------*/
+ for (;;) {
+ x64 = ((uint64_t) sig32Z<<32) + sig64Z;
+ term[indexWord( 4, 2 )] = x64>>32;
+ term[indexWord( 4, 1 )] = x64;
+ softfloat_remStep128MBy32( rem, 29, term, q, y );
+ rem32 = y[indexWord( 4, 3 )];
+ if ( ! (rem32 & 0x80000000) ) break;
+ --q;
+ sig64Z -= 1<<3;
+ }
+ qs[1] = q;
+ rem64 = (uint64_t) rem32<<32 | y[indexWord( 4, 2 )];
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ q = ((uint32_t) (rem64>>2) * (uint64_t) recipSqrt32)>>32;
+ if ( rem64>>34 ) q += recipSqrt32;
+ sig64Z <<= 1;
+ /*------------------------------------------------------------------------
+ | (Repeating this loop is a rare occurrence.)
+ *------------------------------------------------------------------------*/
+ for (;;) {
+ x64 = sig64Z + (q>>26);
+ term[indexWord( 4, 2 )] = x64>>32;
+ term[indexWord( 4, 1 )] = x64;
+ term[indexWord( 4, 0 )] = q<<6;
+ softfloat_remStep128MBy32(
+ y, 29, term, q, &rem[indexMultiwordHi( 6, 4 )] );
+ rem32 = rem[indexWordHi( 6 )];
+ if ( ! (rem32 & 0x80000000) ) break;
+ --q;
+ }
+ qs[0] = q;
+ rem64 = (uint64_t) rem32<<32 | rem[indexWord( 6, 4 )];
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ q = (((uint32_t) (rem64>>2) * (uint64_t) recipSqrt32)>>32) + 2;
+ if ( rem64>>34 ) q += recipSqrt32;
+ x64 = (uint64_t) q<<27;
+ y[indexWord( 5, 0 )] = x64;
+ x64 = ((uint64_t) qs[0]<<24) + (x64>>32);
+ y[indexWord( 5, 1 )] = x64;
+ x64 = ((uint64_t) qs[1]<<21) + (x64>>32);
+ y[indexWord( 5, 2 )] = x64;
+ x64 = ((uint64_t) qs[2]<<18) + (x64>>32);
+ y[indexWord( 5, 3 )] = x64;
+ y[indexWord( 5, 4 )] = x64>>32;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( (q & 0xF) <= 2 ) {
+ q &= ~3;
+ y[indexWordLo( 5 )] = q<<27;
+ term[indexWord( 5, 4 )] = 0;
+ term[indexWord( 5, 3 )] = 0;
+ term[indexWord( 5, 2 )] = 0;
+ term[indexWord( 5, 1 )] = q>>6;
+ term[indexWord( 5, 0 )] = q<<26;
+ softfloat_sub160M( y, term, term );
+ rem[indexWord( 6, 1 )] = 0;
+ rem[indexWord( 6, 0 )] = 0;
+ softfloat_remStep160MBy32(
+ &rem[indexMultiwordLo( 6, 5 )],
+ 14,
+ term,
+ q,
+ &rem[indexMultiwordLo( 6, 5 )]
+ );
+ rem32 = rem[indexWord( 6, 4 )];
+ if ( rem32 & 0x80000000 ) {
+ softfloat_sub1X160M( y );
+ } else {
+ if (
+ rem32 || rem[indexWord( 6, 0 )] || rem[indexWord( 6, 1 )]
+ || (rem[indexWord( 6, 3 )] | rem[indexWord( 6, 2 )])
+ ) {
+ y[indexWordLo( 5 )] |= 1;
+ }
+ }
+ }
+ softfloat_roundPackMToF128M( 0, expZ, y, zWPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_invalidF128M( zWPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ copyA:
+ zWPtr[indexWordHi( 4 )] = uiA96;
+ zWPtr[indexWord( 4, 2 )] = aWPtr[indexWord( 4, 2 )];
+ zWPtr[indexWord( 4, 1 )] = aWPtr[indexWord( 4, 1 )];
+ zWPtr[indexWord( 4, 0 )] = aWPtr[indexWord( 4, 0 )];
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128M_sub.c b/src/libs/softfloat-3e/source/f128M_sub.c
new file mode 100644
index 00000000..cb913cdb
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_sub.c
@@ -0,0 +1,98 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void
+ f128M_sub( const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint64_t *aWPtr, *bWPtr;
+ uint_fast64_t uiA64, uiA0;
+ bool signA;
+ uint_fast64_t uiB64, uiB0;
+ bool signB;
+#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 2)
+ float128_t
+ (*magsFuncPtr)(
+ uint_fast64_t, uint_fast64_t, uint_fast64_t, uint_fast64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+#endif
+
+ aWPtr = (const uint64_t *) aPtr;
+ bWPtr = (const uint64_t *) bPtr;
+ uiA64 = aWPtr[indexWord( 2, 1 )];
+ uiA0 = aWPtr[indexWord( 2, 0 )];
+ signA = signF128UI64( uiA64 );
+ uiB64 = bWPtr[indexWord( 2, 1 )];
+ uiB0 = bWPtr[indexWord( 2, 0 )];
+ signB = signF128UI64( uiB64 );
+#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
+ if ( signA == signB ) {
+ *zPtr = softfloat_subMagsF128( uiA64, uiA0, uiB64, uiB0, signA SOFTFLOAT_STATE_ARG_COMMA );
+ } else {
+ *zPtr = softfloat_addMagsF128( uiA64, uiA0, uiB64, uiB0, signA SOFTFLOAT_STATE_ARG_COMMA );
+ }
+#else
+ magsFuncPtr =
+ (signA == signB) ? softfloat_subMagsF128 : softfloat_addMagsF128;
+ *zPtr = (*magsFuncPtr)( uiA64, uiA0, uiB64, uiB0, signA SOFTFLOAT_STATE_ARG_COMMA );
+#endif
+
+}
+
+#else
+
+void
+ f128M_sub( const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ softfloat_addF128M(
+ (const uint32_t *) aPtr,
+ (const uint32_t *) bPtr,
+ (uint32_t *) zPtr,
+ true
+ SOFTFLOAT_STATE_ARG_COMMA
+ );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128M_to_extF80M.c b/src/libs/softfloat-3e/source/f128M_to_extF80M.c
new file mode 100644
index 00000000..1a69c9fb
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_to_extF80M.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void f128M_to_extF80M( const float128_t *aPtr, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ *zPtr = f128_to_extF80( *aPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void f128M_to_extF80M( const float128_t *aPtr, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint32_t *aWPtr;
+ struct extFloat80M *zSPtr;
+ uint32_t uiA96;
+ bool sign;
+ int32_t exp;
+ struct commonNaN commonNaN;
+ uint32_t sig[4];
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aWPtr = (const uint32_t *) aPtr;
+ zSPtr = (struct extFloat80M *) zPtr;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ sign = signF128UI96( uiA96 );
+ exp = expF128UI96( uiA96 );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x7FFF ) {
+ if ( softfloat_isNaNF128M( aWPtr ) ) {
+ softfloat_f128MToCommonNaN( aWPtr, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ softfloat_commonNaNToExtF80M( &commonNaN, zSPtr );
+ return;
+ }
+ zSPtr->signExp = packToExtF80UI64( sign, 0x7FFF );
+ zSPtr->signif = UINT64_C( 0x8000000000000000 );
+ return;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ exp = softfloat_shiftNormSigF128M( aWPtr, 15, sig );
+ if ( exp == -128 ) {
+ zSPtr->signExp = packToExtF80UI64( sign, 0 );
+ zSPtr->signif = 0;
+ return;
+ }
+ if ( sig[indexWord( 4, 0 )] ) sig[indexWord( 4, 1 )] |= 1;
+ softfloat_roundPackMToExtF80M(
+ sign, exp, &sig[indexMultiwordHi( 4, 3 )], 80, zSPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128M_to_f16.c b/src/libs/softfloat-3e/source/f128M_to_f16.c
new file mode 100644
index 00000000..033a8e1f
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_to_f16.c
@@ -0,0 +1,113 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+float16_t f128M_to_f16( const float128_t *aPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return f128_to_f16( *aPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+float16_t f128M_to_f16( const float128_t *aPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint32_t *aWPtr;
+ uint32_t uiA96;
+ bool sign;
+ int32_t exp;
+ uint32_t frac32;
+ struct commonNaN commonNaN;
+ uint16_t uiZ, frac16;
+ union ui16_f16 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aWPtr = (const uint32_t *) aPtr;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ sign = signF128UI96( uiA96 );
+ exp = expF128UI96( uiA96 );
+ frac32 =
+ fracF128UI96( uiA96 )
+ | ((aWPtr[indexWord( 4, 2 )] | aWPtr[indexWord( 4, 1 )]
+ | aWPtr[indexWord( 4, 0 )])
+ != 0);
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x7FFF ) {
+ if ( frac32 ) {
+ softfloat_f128MToCommonNaN( aWPtr, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToF16UI( &commonNaN );
+ } else {
+ uiZ = packToF16UI( sign, 0x1F, 0 );
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ frac16 = frac32>>2 | (frac32 & 3);
+ if ( ! (exp | frac16) ) {
+ uiZ = packToF16UI( sign, 0, 0 );
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ exp -= 0x3FF1;
+ if ( sizeof (int_fast16_t) < sizeof (int32_t) ) {
+ if ( exp < -0x40 ) exp = -0x40;
+ }
+ return softfloat_roundPackToF16( sign, exp, frac16 | 0x4000 SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128M_to_f32.c b/src/libs/softfloat-3e/source/f128M_to_f32.c
new file mode 100644
index 00000000..bc460f4a
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_to_f32.c
@@ -0,0 +1,109 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+float32_t f128M_to_f32( const float128_t *aPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return f128_to_f32( *aPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+float32_t f128M_to_f32( const float128_t *aPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint32_t *aWPtr;
+ uint32_t uiA96;
+ bool sign;
+ int32_t exp;
+ uint64_t frac64;
+ struct commonNaN commonNaN;
+ uint32_t uiZ, frac32;
+ union ui32_f32 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aWPtr = (const uint32_t *) aPtr;
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ sign = signF128UI96( uiA96 );
+ exp = expF128UI96( uiA96 );
+ frac64 =
+ (uint64_t) fracF128UI96( uiA96 )<<32 | aWPtr[indexWord( 4, 2 )]
+ | ((aWPtr[indexWord( 4, 1 )] | aWPtr[indexWord( 4, 0 )]) != 0);
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x7FFF ) {
+ if ( frac64 ) {
+ softfloat_f128MToCommonNaN( aWPtr, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToF32UI( &commonNaN );
+ } else {
+ uiZ = packToF32UI( sign, 0xFF, 0 );
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ frac32 = softfloat_shortShiftRightJam64( frac64, 18 );
+ if ( ! (exp | frac32) ) {
+ uiZ = packToF32UI( sign, 0, 0 );
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ exp -= 0x3F81;
+ if ( sizeof (int_fast16_t) < sizeof (int32_t) ) {
+ if ( exp < -0x1000 ) exp = -0x1000;
+ }
+ return softfloat_roundPackToF32( sign, exp, frac32 | 0x40000000 SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128M_to_f64.c b/src/libs/softfloat-3e/source/f128M_to_f64.c
new file mode 100644
index 00000000..73508af9
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_to_f64.c
@@ -0,0 +1,112 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+float64_t f128M_to_f64( const float128_t *aPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return f128_to_f64( *aPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+float64_t f128M_to_f64( const float128_t *aPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint32_t *aWPtr;
+ uint32_t uiA96;
+ bool sign;
+ int32_t exp;
+ uint64_t frac64;
+ struct commonNaN commonNaN;
+ uint64_t uiZ;
+ uint32_t frac32;
+ union ui64_f64 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aWPtr = (const uint32_t *) aPtr;
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ sign = signF128UI96( uiA96 );
+ exp = expF128UI96( uiA96 );
+ frac64 = (uint64_t) fracF128UI96( uiA96 )<<32 | aWPtr[indexWord( 4, 2 )];
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x7FFF ) {
+ if ( frac64 || aWPtr[indexWord( 4, 1 )] | aWPtr[indexWord( 4, 0 )] ) {
+ softfloat_f128MToCommonNaN( aWPtr, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToF64UI( &commonNaN );
+ } else {
+ uiZ = packToF64UI( sign, 0x7FF, 0 );
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ frac32 = aWPtr[indexWord( 4, 1 )];
+ frac64 = frac64<<14 | frac32>>18;
+ if ( (frac32 & 0x0003FFFF) || aWPtr[indexWord( 4, 0 )] ) frac64 |= 1;
+ if ( ! (exp | frac64) ) {
+ uiZ = packToF64UI( sign, 0, 0 );
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ exp -= 0x3C01;
+ if ( sizeof (int_fast16_t) < sizeof (int32_t) ) {
+ if ( exp < -0x1000 ) exp = -0x1000;
+ }
+ return
+ softfloat_roundPackToF64(
+ sign, exp, frac64 | UINT64_C( 0x4000000000000000 ) SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128M_to_i32.c b/src/libs/softfloat-3e/source/f128M_to_i32.c
new file mode 100644
index 00000000..e40820d7
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_to_i32.c
@@ -0,0 +1,98 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+int_fast32_t
+ f128M_to_i32( const float128_t *aPtr, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return f128_to_i32( *aPtr, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+int_fast32_t
+ f128M_to_i32( const float128_t *aPtr, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint32_t *aWPtr;
+ uint32_t uiA96;
+ bool sign;
+ int32_t exp;
+ uint64_t sig64;
+ int32_t shiftDist;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aWPtr = (const uint32_t *) aPtr;
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ sign = signF128UI96( uiA96 );
+ exp = expF128UI96( uiA96 );
+ sig64 = (uint64_t) fracF128UI96( uiA96 )<<32 | aWPtr[indexWord( 4, 2 )];
+ if ( aWPtr[indexWord( 4, 1 )] | aWPtr[indexWord( 4, 0 )] ) sig64 |= 1;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#if (i32_fromNaN != i32_fromPosOverflow) || (i32_fromNaN != i32_fromNegOverflow)
+ if ( (exp == 0x7FFF) && sig64 ) {
+#if (i32_fromNaN == i32_fromPosOverflow)
+ sign = 0;
+#elif (i32_fromNaN == i32_fromNegOverflow)
+ sign = 1;
+#else
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return i32_fromNaN;
+#endif
+ }
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp ) sig64 |= UINT64_C( 0x0001000000000000 );
+ shiftDist = 0x4023 - exp;
+ if ( 0 < shiftDist ) sig64 = softfloat_shiftRightJam64( sig64, shiftDist );
+ return softfloat_roundToI32( sign, sig64, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128M_to_i32_r_minMag.c b/src/libs/softfloat-3e/source/f128M_to_i32_r_minMag.c
new file mode 100644
index 00000000..11b0e6dd
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_to_i32_r_minMag.c
@@ -0,0 +1,106 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+int_fast32_t f128M_to_i32_r_minMag( const float128_t *aPtr, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return f128_to_i32_r_minMag( *aPtr, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+int_fast32_t f128M_to_i32_r_minMag( const float128_t *aPtr, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint32_t *aWPtr;
+ uint32_t uiA96;
+ bool sign;
+ int32_t exp;
+ uint64_t sig64;
+ int32_t shiftDist;
+ uint32_t absZ, uiZ;
+ union { uint32_t ui; int32_t i; } uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aWPtr = (const uint32_t *) aPtr;
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ sign = signF128UI96( uiA96 );
+ exp = expF128UI96( uiA96 );
+ sig64 = (uint64_t) fracF128UI96( uiA96 )<<32 | aWPtr[indexWord( 4, 2 )];
+ if ( aWPtr[indexWord( 4, 1 )] | aWPtr[indexWord( 4, 0 )] ) sig64 |= 1;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp < 0x3FFF ) {
+ if ( exact && (exp | sig64) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return 0;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( 0x401F <= exp ) goto invalid;
+ shiftDist = 0x402F - exp;
+ sig64 |= UINT64_C( 0x0001000000000000 );
+ absZ = sig64>>shiftDist;
+ uiZ = sign ? -absZ : absZ;
+ if ( uiZ>>31 != sign ) goto invalid;
+ if ( exact && ((uint64_t) absZ<<shiftDist != sig64) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ uZ.ui = uiZ;
+ return uZ.i;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF) && sig64 ? i32_fromNaN
+ : sign ? i32_fromNegOverflow : i32_fromPosOverflow;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128M_to_i64.c b/src/libs/softfloat-3e/source/f128M_to_i64.c
new file mode 100644
index 00000000..3a18dda7
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_to_i64.c
@@ -0,0 +1,102 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+int_fast64_t
+ f128M_to_i64( const float128_t *aPtr, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return f128_to_i64( *aPtr, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+int_fast64_t
+ f128M_to_i64( const float128_t *aPtr, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint32_t *aWPtr;
+ uint32_t uiA96;
+ bool sign;
+ int32_t exp;
+ uint32_t sig96;
+ int32_t shiftDist;
+ uint32_t sig[4];
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aWPtr = (const uint32_t *) aPtr;
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ sign = signF128UI96( uiA96 );
+ exp = expF128UI96( uiA96 );
+ sig96 = fracF128UI96( uiA96 );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x404F - exp;
+ if ( shiftDist < 17 ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF)
+ && (sig96
+ || (aWPtr[indexWord( 4, 2 )] | aWPtr[indexWord( 4, 1 )]
+ | aWPtr[indexWord( 4, 0 )]))
+ ? i64_fromNaN
+ : sign ? i64_fromNegOverflow : i64_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp ) sig96 |= 0x00010000;
+ sig[indexWord( 4, 3 )] = sig96;
+ sig[indexWord( 4, 2 )] = aWPtr[indexWord( 4, 2 )];
+ sig[indexWord( 4, 1 )] = aWPtr[indexWord( 4, 1 )];
+ sig[indexWord( 4, 0 )] = aWPtr[indexWord( 4, 0 )];
+ softfloat_shiftRightJam128M( sig, shiftDist, sig );
+ return
+ softfloat_roundMToI64(
+ sign, sig + indexMultiwordLo( 4, 3 ), roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128M_to_i64_r_minMag.c b/src/libs/softfloat-3e/source/f128M_to_i64_r_minMag.c
new file mode 100644
index 00000000..47438b7d
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_to_i64_r_minMag.c
@@ -0,0 +1,124 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+int_fast64_t f128M_to_i64_r_minMag( const float128_t *aPtr, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return f128_to_i64_r_minMag( *aPtr, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+int_fast64_t f128M_to_i64_r_minMag( const float128_t *aPtr, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint32_t *aWPtr;
+ uint32_t uiA96;
+ bool sign;
+ int32_t exp;
+ uint32_t sig96;
+ int32_t shiftDist;
+ uint32_t sig[4];
+ uint64_t uiZ;
+ union { uint64_t ui; int64_t i; } uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aWPtr = (const uint32_t *) aPtr;
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ sign = signF128UI96( uiA96 );
+ exp = expF128UI96( uiA96 );
+ sig96 = fracF128UI96( uiA96 );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x403E - exp;
+ if ( shiftDist < 0 ) goto invalid;
+ if ( exact ) {
+ if ( exp ) sig96 |= 0x00010000;
+ sig[indexWord( 4, 3 )] = sig96;
+ sig[indexWord( 4, 2 )] = aWPtr[indexWord( 4, 2 )];
+ sig[indexWord( 4, 1 )] = aWPtr[indexWord( 4, 1 )];
+ sig[indexWord( 4, 0 )] = aWPtr[indexWord( 4, 0 )];
+ softfloat_shiftRightJam128M( sig, shiftDist + 17, sig );
+ uiZ = (uint64_t) sig[indexWord( 4, 2 )]<<32 | sig[indexWord( 4, 1 )];
+ if ( uiZ>>63 && (! sign || (uiZ != UINT64_C( 0x8000000000000000 ))) ) {
+ goto invalid;
+ }
+ if ( sig[indexWordLo( 4 )] ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ } else {
+ if ( 64 <= shiftDist ) return 0;
+ uiZ =
+ (uint64_t) sig96<<47
+ | (uint64_t) aWPtr[indexWord( 4, 2 )]<<15
+ | aWPtr[indexWord( 4, 1 )]>>17;
+ if ( shiftDist ) {
+ uiZ |= UINT64_C( 0x8000000000000000 );
+ uiZ >>= shiftDist;
+ } else {
+ if ( uiZ || ! sign ) goto invalid;
+ uiZ |= UINT64_C( 0x8000000000000000 );
+ }
+ }
+ if ( sign ) uiZ = -uiZ;
+ uZ.ui = uiZ;
+ return uZ.i;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF)
+ && (sig96
+ || (aWPtr[indexWord( 4, 2 )] | aWPtr[indexWord( 4, 1 )]
+ | aWPtr[indexWord( 4, 0 )]))
+ ? i64_fromNaN
+ : sign ? i64_fromNegOverflow : i64_fromPosOverflow;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128M_to_ui32.c b/src/libs/softfloat-3e/source/f128M_to_ui32.c
new file mode 100644
index 00000000..c89ff987
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_to_ui32.c
@@ -0,0 +1,98 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+uint_fast32_t
+ f128M_to_ui32( const float128_t *aPtr, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return f128_to_ui32( *aPtr, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+uint_fast32_t
+ f128M_to_ui32( const float128_t *aPtr, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint32_t *aWPtr;
+ uint32_t uiA96;
+ bool sign;
+ int32_t exp;
+ uint64_t sig64;
+ int32_t shiftDist;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aWPtr = (const uint32_t *) aPtr;
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ sign = signF128UI96( uiA96 );
+ exp = expF128UI96( uiA96 );
+ sig64 = (uint64_t) fracF128UI96( uiA96 )<<32 | aWPtr[indexWord( 4, 2 )];
+ if ( aWPtr[indexWord( 4, 1 )] | aWPtr[indexWord( 4, 0 )] ) sig64 |= 1;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#if (ui32_fromNaN != ui32_fromPosOverflow) || (ui32_fromNaN != ui32_fromNegOverflow)
+ if ( (exp == 0x7FFF) && sig64 ) {
+#if (ui32_fromNaN == ui32_fromPosOverflow)
+ sign = 0;
+#elif (ui32_fromNaN == ui32_fromNegOverflow)
+ sign = 1;
+#else
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return ui32_fromNaN;
+#endif
+ }
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp ) sig64 |= UINT64_C( 0x0001000000000000 );
+ shiftDist = 0x4023 - exp;
+ if ( 0 < shiftDist ) sig64 = softfloat_shiftRightJam64( sig64, shiftDist );
+ return softfloat_roundToUI32( sign, sig64, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128M_to_ui32_r_minMag.c b/src/libs/softfloat-3e/source/f128M_to_ui32_r_minMag.c
new file mode 100644
index 00000000..3f483f56
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_to_ui32_r_minMag.c
@@ -0,0 +1,102 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+uint_fast32_t f128M_to_ui32_r_minMag( const float128_t *aPtr, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return f128_to_ui32_r_minMag( *aPtr, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+uint_fast32_t f128M_to_ui32_r_minMag( const float128_t *aPtr, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint32_t *aWPtr;
+ uint32_t uiA96;
+ int32_t exp;
+ uint64_t sig64;
+ int32_t shiftDist;
+ bool sign;
+ uint32_t z;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aWPtr = (const uint32_t *) aPtr;
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ exp = expF128UI96( uiA96 );
+ sig64 = (uint64_t) fracF128UI96( uiA96 )<<32 | aWPtr[indexWord( 4, 2 )];
+ if ( aWPtr[indexWord( 4, 1 )] | aWPtr[indexWord( 4, 0 )] ) sig64 |= 1;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x402F - exp;
+ if ( 49 <= shiftDist ) {
+ if ( exact && (exp | sig64) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return 0;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sign = signF128UI96( uiA96 );
+ if ( sign || (shiftDist < 17) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF) && sig64 ? ui32_fromNaN
+ : sign ? ui32_fromNegOverflow : ui32_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sig64 |= UINT64_C( 0x0001000000000000 );
+ z = sig64>>shiftDist;
+ if ( exact && ((uint64_t) z<<shiftDist != sig64) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return z;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128M_to_ui64.c b/src/libs/softfloat-3e/source/f128M_to_ui64.c
new file mode 100644
index 00000000..386ca290
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_to_ui64.c
@@ -0,0 +1,102 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+uint_fast64_t
+ f128M_to_ui64( const float128_t *aPtr, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return f128_to_ui64( *aPtr, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+uint_fast64_t
+ f128M_to_ui64( const float128_t *aPtr, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint32_t *aWPtr;
+ uint32_t uiA96;
+ bool sign;
+ int32_t exp;
+ uint32_t sig96;
+ int32_t shiftDist;
+ uint32_t sig[4];
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aWPtr = (const uint32_t *) aPtr;
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ sign = signF128UI96( uiA96 );
+ exp = expF128UI96( uiA96 );
+ sig96 = fracF128UI96( uiA96 );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x404F - exp;
+ if ( shiftDist < 17 ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF)
+ && (sig96
+ || (aWPtr[indexWord( 4, 2 )] | aWPtr[indexWord( 4, 1 )]
+ | aWPtr[indexWord( 4, 0 )]))
+ ? ui64_fromNaN
+ : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp ) sig96 |= 0x00010000;
+ sig[indexWord( 4, 3 )] = sig96;
+ sig[indexWord( 4, 2 )] = aWPtr[indexWord( 4, 2 )];
+ sig[indexWord( 4, 1 )] = aWPtr[indexWord( 4, 1 )];
+ sig[indexWord( 4, 0 )] = aWPtr[indexWord( 4, 0 )];
+ softfloat_shiftRightJam128M( sig, shiftDist, sig );
+ return
+ softfloat_roundMToUI64(
+ sign, sig + indexMultiwordLo( 4, 3 ), roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA);
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128M_to_ui64_r_minMag.c b/src/libs/softfloat-3e/source/f128M_to_ui64_r_minMag.c
new file mode 100644
index 00000000..d454def6
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128M_to_ui64_r_minMag.c
@@ -0,0 +1,114 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+uint_fast64_t f128M_to_ui64_r_minMag( const float128_t *aPtr, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ return f128_to_ui64_r_minMag( *aPtr, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+uint_fast64_t f128M_to_ui64_r_minMag( const float128_t *aPtr, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint32_t *aWPtr;
+ uint32_t uiA96;
+ bool sign;
+ int32_t exp;
+ uint32_t sig96;
+ int32_t shiftDist;
+ uint32_t sig[4];
+ uint64_t z;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ aWPtr = (const uint32_t *) aPtr;
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ sign = signF128UI96( uiA96 );
+ exp = expF128UI96( uiA96 );
+ sig96 = fracF128UI96( uiA96 );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x403E - exp;
+ if ( shiftDist < 0 ) goto invalid;
+ if ( exact ) {
+ if ( exp ) sig96 |= 0x00010000;
+ sig[indexWord( 4, 3 )] = sig96;
+ sig[indexWord( 4, 2 )] = aWPtr[indexWord( 4, 2 )];
+ sig[indexWord( 4, 1 )] = aWPtr[indexWord( 4, 1 )];
+ sig[indexWord( 4, 0 )] = aWPtr[indexWord( 4, 0 )];
+ softfloat_shiftRightJam128M( sig, shiftDist + 17, sig );
+ z = (uint64_t) sig[indexWord( 4, 2 )]<<32 | sig[indexWord( 4, 1 )];
+ if ( sign && z ) goto invalid;
+ if ( sig[indexWordLo( 4 )] ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ } else {
+ if ( 64 <= shiftDist ) return 0;
+ if ( sign ) goto invalid;
+ z = UINT64_C( 0x8000000000000000 )
+ | (uint64_t) sig96<<47
+ | (uint64_t) aWPtr[indexWord( 4, 2 )]<<15
+ | aWPtr[indexWord( 4, 1 )]>>17;
+ z >>= shiftDist;
+ }
+ return z;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF)
+ && (sig96
+ || (aWPtr[indexWord( 4, 2 )] | aWPtr[indexWord( 4, 1 )]
+ | aWPtr[indexWord( 4, 0 )]))
+ ? ui64_fromNaN
+ : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f128_add.c b/src/libs/softfloat-3e/source/f128_add.c
new file mode 100644
index 00000000..2e1ccd27
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_add.c
@@ -0,0 +1,78 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float128_t f128_add( float128_t a, float128_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ bool signA;
+ union ui128_f128 uB;
+ uint_fast64_t uiB64, uiB0;
+ bool signB;
+#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 2)
+ float128_t
+ (*magsFuncPtr)(
+ uint_fast64_t, uint_fast64_t, uint_fast64_t, uint_fast64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+#endif
+
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ signA = signF128UI64( uiA64 );
+ uB.f = b;
+ uiB64 = uB.ui.v64;
+ uiB0 = uB.ui.v0;
+ signB = signF128UI64( uiB64 );
+#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
+ if ( signA == signB ) {
+ return softfloat_addMagsF128( uiA64, uiA0, uiB64, uiB0, signA SOFTFLOAT_STATE_ARG_COMMA );
+ } else {
+ return softfloat_subMagsF128( uiA64, uiA0, uiB64, uiB0, signA SOFTFLOAT_STATE_ARG_COMMA );
+ }
+#else
+ magsFuncPtr =
+ (signA == signB) ? softfloat_addMagsF128 : softfloat_subMagsF128;
+ return (*magsFuncPtr)( uiA64, uiA0, uiB64, uiB0, signA SOFTFLOAT_STATE_ARG_COMMA );
+#endif
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_div.c b/src/libs/softfloat-3e/source/f128_div.c
new file mode 100644
index 00000000..b550ca1f
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_div.c
@@ -0,0 +1,199 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float128_t f128_div( float128_t a, float128_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ bool signA;
+ int_fast32_t expA;
+ struct uint128 sigA;
+ union ui128_f128 uB;
+ uint_fast64_t uiB64, uiB0;
+ bool signB;
+ int_fast32_t expB;
+ struct uint128 sigB;
+ bool signZ;
+ struct exp32_sig128 normExpSig;
+ int_fast32_t expZ;
+ struct uint128 rem;
+ uint_fast32_t recip32;
+ int ix;
+ uint_fast64_t q64;
+ uint_fast32_t q;
+ struct uint128 term;
+ uint_fast32_t qs[3];
+ uint_fast64_t sigZExtra;
+ struct uint128 sigZ, uiZ;
+ union ui128_f128 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ signA = signF128UI64( uiA64 );
+ expA = expF128UI64( uiA64 );
+ sigA.v64 = fracF128UI64( uiA64 );
+ sigA.v0 = uiA0;
+ uB.f = b;
+ uiB64 = uB.ui.v64;
+ uiB0 = uB.ui.v0;
+ signB = signF128UI64( uiB64 );
+ expB = expF128UI64( uiB64 );
+ sigB.v64 = fracF128UI64( uiB64 );
+ sigB.v0 = uiB0;
+ signZ = signA ^ signB;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0x7FFF ) {
+ if ( sigA.v64 | sigA.v0 ) goto propagateNaN;
+ if ( expB == 0x7FFF ) {
+ if ( sigB.v64 | sigB.v0 ) goto propagateNaN;
+ goto invalid;
+ }
+ goto infinity;
+ }
+ if ( expB == 0x7FFF ) {
+ if ( sigB.v64 | sigB.v0 ) goto propagateNaN;
+ goto zero;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expB ) {
+ if ( ! (sigB.v64 | sigB.v0) ) {
+ if ( ! (expA | sigA.v64 | sigA.v0) ) goto invalid;
+ softfloat_raiseFlags( softfloat_flag_infinite SOFTFLOAT_STATE_ARG_COMMA );
+ goto infinity;
+ }
+ normExpSig = softfloat_normSubnormalF128Sig( sigB.v64, sigB.v0 );
+ expB = normExpSig.exp;
+ sigB = normExpSig.sig;
+ }
+ if ( ! expA ) {
+ if ( ! (sigA.v64 | sigA.v0) ) goto zero;
+ normExpSig = softfloat_normSubnormalF128Sig( sigA.v64, sigA.v0 );
+ expA = normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expZ = expA - expB + 0x3FFE;
+ sigA.v64 |= UINT64_C( 0x0001000000000000 );
+ sigB.v64 |= UINT64_C( 0x0001000000000000 );
+ rem = sigA;
+ if ( softfloat_lt128( sigA.v64, sigA.v0, sigB.v64, sigB.v0 ) ) {
+ --expZ;
+ rem = softfloat_add128( sigA.v64, sigA.v0, sigA.v64, sigA.v0 );
+ }
+ recip32 = softfloat_approxRecip32_1( sigB.v64>>17 );
+ ix = 3;
+ for (;;) {
+ q64 = (uint_fast64_t) (uint32_t) (rem.v64>>19) * recip32;
+ q = (q64 + 0x80000000)>>32;
+ --ix;
+ if ( ix < 0 ) break;
+ rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, 29 );
+ term = softfloat_mul128By32( sigB.v64, sigB.v0, q );
+ rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 );
+ if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) {
+ --q;
+ rem = softfloat_add128( rem.v64, rem.v0, sigB.v64, sigB.v0 );
+ }
+ qs[ix] = q;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ((q + 1) & 7) < 2 ) {
+ rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, 29 );
+ term = softfloat_mul128By32( sigB.v64, sigB.v0, q );
+ rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 );
+ if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) {
+ --q;
+ rem = softfloat_add128( rem.v64, rem.v0, sigB.v64, sigB.v0 );
+ } else if ( softfloat_le128( sigB.v64, sigB.v0, rem.v64, rem.v0 ) ) {
+ ++q;
+ rem = softfloat_sub128( rem.v64, rem.v0, sigB.v64, sigB.v0 );
+ }
+ if ( rem.v64 | rem.v0 ) q |= 1;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sigZExtra = (uint64_t) ((uint_fast64_t) q<<60);
+ term = softfloat_shortShiftLeft128( 0, qs[1], 54 );
+ sigZ =
+ softfloat_add128(
+ (uint_fast64_t) qs[2]<<19, ((uint_fast64_t) qs[0]<<25) + (q>>4),
+ term.v64, term.v0
+ );
+ return
+ softfloat_roundPackToF128( signZ, expZ, sigZ.v64, sigZ.v0, sigZExtra SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN:
+ uiZ = softfloat_propagateNaNF128UI( uiA64, uiA0, uiB64, uiB0 SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ.v64 = defaultNaNF128UI64;
+ uiZ.v0 = defaultNaNF128UI0;
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ infinity:
+ uiZ.v64 = packToF128UI64( signZ, 0x7FFF, 0 );
+ goto uiZ0;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zero:
+ uiZ.v64 = packToF128UI64( signZ, 0, 0 );
+ uiZ0:
+ uiZ.v0 = 0;
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_eq.c b/src/libs/softfloat-3e/source/f128_eq.c
new file mode 100644
index 00000000..9f8a6253
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_eq.c
@@ -0,0 +1,73 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool f128_eq( float128_t a, float128_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ union ui128_f128 uB;
+ uint_fast64_t uiB64, uiB0;
+
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ uB.f = b;
+ uiB64 = uB.ui.v64;
+ uiB0 = uB.ui.v0;
+ if ( isNaNF128UI( uiA64, uiA0 ) || isNaNF128UI( uiB64, uiB0 ) ) {
+ if (
+ softfloat_isSigNaNF128UI( uiA64, uiA0 )
+ || softfloat_isSigNaNF128UI( uiB64, uiB0 )
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ return false;
+ }
+ return
+ (uiA0 == uiB0)
+ && ( (uiA64 == uiB64)
+ || (! uiA0 && ! ((uiA64 | uiB64) & UINT64_C( 0x7FFFFFFFFFFFFFFF )))
+ );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_eq_signaling.c b/src/libs/softfloat-3e/source/f128_eq_signaling.c
new file mode 100644
index 00000000..77350545
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_eq_signaling.c
@@ -0,0 +1,67 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+bool f128_eq_signaling( float128_t a, float128_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ union ui128_f128 uB;
+ uint_fast64_t uiB64, uiB0;
+
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ uB.f = b;
+ uiB64 = uB.ui.v64;
+ uiB0 = uB.ui.v0;
+ if ( isNaNF128UI( uiA64, uiA0 ) || isNaNF128UI( uiB64, uiB0 ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return false;
+ }
+ return
+ (uiA0 == uiB0)
+ && ( (uiA64 == uiB64)
+ || (! uiA0 && ! ((uiA64 | uiB64) & UINT64_C( 0x7FFFFFFFFFFFFFFF )))
+ );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_isSignalingNaN.c b/src/libs/softfloat-3e/source/f128_isSignalingNaN.c
new file mode 100644
index 00000000..f8e5d236
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_isSignalingNaN.c
@@ -0,0 +1,51 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool f128_isSignalingNaN( float128_t a )
+{
+ union ui128_f128 uA;
+
+ uA.f = a;
+ return softfloat_isSigNaNF128UI( uA.ui.v64, uA.ui.v0 );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_le.c b/src/libs/softfloat-3e/source/f128_le.c
new file mode 100644
index 00000000..9eacb174
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_le.c
@@ -0,0 +1,72 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+bool f128_le( float128_t a, float128_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ union ui128_f128 uB;
+ uint_fast64_t uiB64, uiB0;
+ bool signA, signB;
+
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ uB.f = b;
+ uiB64 = uB.ui.v64;
+ uiB0 = uB.ui.v0;
+ if ( isNaNF128UI( uiA64, uiA0 ) || isNaNF128UI( uiB64, uiB0 ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return false;
+ }
+ signA = signF128UI64( uiA64 );
+ signB = signF128UI64( uiB64 );
+ return
+ (signA != signB)
+ ? signA
+ || ! (((uiA64 | uiB64) & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
+ | uiA0 | uiB0)
+ : ((uiA64 == uiB64) && (uiA0 == uiB0))
+ || (signA ^ softfloat_lt128( uiA64, uiA0, uiB64, uiB0 ));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_le_quiet.c b/src/libs/softfloat-3e/source/f128_le_quiet.c
new file mode 100644
index 00000000..9ee376d9
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_le_quiet.c
@@ -0,0 +1,78 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool f128_le_quiet( float128_t a, float128_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ union ui128_f128 uB;
+ uint_fast64_t uiB64, uiB0;
+ bool signA, signB;
+
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ uB.f = b;
+ uiB64 = uB.ui.v64;
+ uiB0 = uB.ui.v0;
+ if ( isNaNF128UI( uiA64, uiA0 ) || isNaNF128UI( uiB64, uiB0 ) ) {
+ if (
+ softfloat_isSigNaNF128UI( uiA64, uiA0 )
+ || softfloat_isSigNaNF128UI( uiB64, uiB0 )
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ return false;
+ }
+ signA = signF128UI64( uiA64 );
+ signB = signF128UI64( uiB64 );
+ return
+ (signA != signB)
+ ? signA
+ || ! (((uiA64 | uiB64) & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
+ | uiA0 | uiB0)
+ : ((uiA64 == uiB64) && (uiA0 == uiB0))
+ || (signA ^ softfloat_lt128( uiA64, uiA0, uiB64, uiB0 ));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_lt.c b/src/libs/softfloat-3e/source/f128_lt.c
new file mode 100644
index 00000000..f94e3f2d
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_lt.c
@@ -0,0 +1,72 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+bool f128_lt( float128_t a, float128_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ union ui128_f128 uB;
+ uint_fast64_t uiB64, uiB0;
+ bool signA, signB;
+
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ uB.f = b;
+ uiB64 = uB.ui.v64;
+ uiB0 = uB.ui.v0;
+ if ( isNaNF128UI( uiA64, uiA0 ) || isNaNF128UI( uiB64, uiB0 ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return false;
+ }
+ signA = signF128UI64( uiA64 );
+ signB = signF128UI64( uiB64 );
+ return
+ (signA != signB)
+ ? signA
+ && (((uiA64 | uiB64) & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
+ | uiA0 | uiB0)
+ : ((uiA64 != uiB64) || (uiA0 != uiB0))
+ && (signA ^ softfloat_lt128( uiA64, uiA0, uiB64, uiB0 ));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_lt_quiet.c b/src/libs/softfloat-3e/source/f128_lt_quiet.c
new file mode 100644
index 00000000..663c90d1
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_lt_quiet.c
@@ -0,0 +1,78 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool f128_lt_quiet( float128_t a, float128_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ union ui128_f128 uB;
+ uint_fast64_t uiB64, uiB0;
+ bool signA, signB;
+
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ uB.f = b;
+ uiB64 = uB.ui.v64;
+ uiB0 = uB.ui.v0;
+ if ( isNaNF128UI( uiA64, uiA0 ) || isNaNF128UI( uiB64, uiB0 ) ) {
+ if (
+ softfloat_isSigNaNF128UI( uiA64, uiA0 )
+ || softfloat_isSigNaNF128UI( uiB64, uiB0 )
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ return false;
+ }
+ signA = signF128UI64( uiA64 );
+ signB = signF128UI64( uiB64 );
+ return
+ (signA != signB)
+ ? signA
+ && (((uiA64 | uiB64) & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
+ | uiA0 | uiB0)
+ : ((uiA64 != uiB64) || (uiA0 != uiB0))
+ && (signA ^ softfloat_lt128( uiA64, uiA0, uiB64, uiB0 ));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_mul.c b/src/libs/softfloat-3e/source/f128_mul.c
new file mode 100644
index 00000000..91b6acf7
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_mul.c
@@ -0,0 +1,163 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float128_t f128_mul( float128_t a, float128_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ bool signA;
+ int_fast32_t expA;
+ struct uint128 sigA;
+ union ui128_f128 uB;
+ uint_fast64_t uiB64, uiB0;
+ bool signB;
+ int_fast32_t expB;
+ struct uint128 sigB;
+ bool signZ;
+ uint_fast64_t magBits;
+ struct exp32_sig128 normExpSig;
+ int_fast32_t expZ;
+ uint64_t sig256Z[4];
+ uint_fast64_t sigZExtra;
+ struct uint128 sigZ;
+ struct uint128_extra sig128Extra;
+ struct uint128 uiZ;
+ union ui128_f128 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ signA = signF128UI64( uiA64 );
+ expA = expF128UI64( uiA64 );
+ sigA.v64 = fracF128UI64( uiA64 );
+ sigA.v0 = uiA0;
+ uB.f = b;
+ uiB64 = uB.ui.v64;
+ uiB0 = uB.ui.v0;
+ signB = signF128UI64( uiB64 );
+ expB = expF128UI64( uiB64 );
+ sigB.v64 = fracF128UI64( uiB64 );
+ sigB.v0 = uiB0;
+ signZ = signA ^ signB;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0x7FFF ) {
+ if (
+ (sigA.v64 | sigA.v0) || ((expB == 0x7FFF) && (sigB.v64 | sigB.v0))
+ ) {
+ goto propagateNaN;
+ }
+ magBits = expB | sigB.v64 | sigB.v0;
+ goto infArg;
+ }
+ if ( expB == 0x7FFF ) {
+ if ( sigB.v64 | sigB.v0 ) goto propagateNaN;
+ magBits = expA | sigA.v64 | sigA.v0;
+ goto infArg;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expA ) {
+ if ( ! (sigA.v64 | sigA.v0) ) goto zero;
+ normExpSig = softfloat_normSubnormalF128Sig( sigA.v64, sigA.v0 );
+ expA = normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ if ( ! expB ) {
+ if ( ! (sigB.v64 | sigB.v0) ) goto zero;
+ normExpSig = softfloat_normSubnormalF128Sig( sigB.v64, sigB.v0 );
+ expB = normExpSig.exp;
+ sigB = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expZ = expA + expB - 0x4000;
+ sigA.v64 |= UINT64_C( 0x0001000000000000 );
+ sigB = softfloat_shortShiftLeft128( sigB.v64, sigB.v0, 16 );
+ softfloat_mul128To256M( sigA.v64, sigA.v0, sigB.v64, sigB.v0, sig256Z );
+ sigZExtra = sig256Z[indexWord( 4, 1 )] | (sig256Z[indexWord( 4, 0 )] != 0);
+ sigZ =
+ softfloat_add128(
+ sig256Z[indexWord( 4, 3 )], sig256Z[indexWord( 4, 2 )],
+ sigA.v64, sigA.v0
+ );
+ if ( UINT64_C( 0x0002000000000000 ) <= sigZ.v64 ) {
+ ++expZ;
+ sig128Extra =
+ softfloat_shortShiftRightJam128Extra(
+ sigZ.v64, sigZ.v0, sigZExtra, 1 );
+ sigZ = sig128Extra.v;
+ sigZExtra = sig128Extra.extra;
+ }
+ return
+ softfloat_roundPackToF128( signZ, expZ, sigZ.v64, sigZ.v0, sigZExtra SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN:
+ uiZ = softfloat_propagateNaNF128UI( uiA64, uiA0, uiB64, uiB0 SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ infArg:
+ if ( ! magBits ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ.v64 = defaultNaNF128UI64;
+ uiZ.v0 = defaultNaNF128UI0;
+ goto uiZ;
+ }
+ uiZ.v64 = packToF128UI64( signZ, 0x7FFF, 0 );
+ goto uiZ0;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zero:
+ uiZ.v64 = packToF128UI64( signZ, 0, 0 );
+ uiZ0:
+ uiZ.v0 = 0;
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_mulAdd.c b/src/libs/softfloat-3e/source/f128_mulAdd.c
new file mode 100644
index 00000000..4d7bb73d
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_mulAdd.c
@@ -0,0 +1,63 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float128_t f128_mulAdd( float128_t a, float128_t b, float128_t c SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ union ui128_f128 uB;
+ uint_fast64_t uiB64, uiB0;
+ union ui128_f128 uC;
+ uint_fast64_t uiC64, uiC0;
+
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ uB.f = b;
+ uiB64 = uB.ui.v64;
+ uiB0 = uB.ui.v0;
+ uC.f = c;
+ uiC64 = uC.ui.v64;
+ uiC0 = uC.ui.v0;
+ return softfloat_mulAddF128( uiA64, uiA0, uiB64, uiB0, uiC64, uiC0, 0 SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_rem.c b/src/libs/softfloat-3e/source/f128_rem.c
new file mode 100644
index 00000000..499cbfeb
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_rem.c
@@ -0,0 +1,190 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float128_t f128_rem( float128_t a, float128_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ bool signA;
+ int_fast32_t expA;
+ struct uint128 sigA;
+ union ui128_f128 uB;
+ uint_fast64_t uiB64, uiB0;
+ int_fast32_t expB;
+ struct uint128 sigB;
+ struct exp32_sig128 normExpSig;
+ struct uint128 rem;
+ int_fast32_t expDiff;
+ uint_fast32_t q, recip32;
+ uint_fast64_t q64;
+ struct uint128 term, altRem, meanRem;
+ bool signRem;
+ struct uint128 uiZ;
+ union ui128_f128 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ signA = signF128UI64( uiA64 );
+ expA = expF128UI64( uiA64 );
+ sigA.v64 = fracF128UI64( uiA64 );
+ sigA.v0 = uiA0;
+ uB.f = b;
+ uiB64 = uB.ui.v64;
+ uiB0 = uB.ui.v0;
+ expB = expF128UI64( uiB64 );
+ sigB.v64 = fracF128UI64( uiB64 );
+ sigB.v0 = uiB0;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0x7FFF ) {
+ if (
+ (sigA.v64 | sigA.v0) || ((expB == 0x7FFF) && (sigB.v64 | sigB.v0))
+ ) {
+ goto propagateNaN;
+ }
+ goto invalid;
+ }
+ if ( expB == 0x7FFF ) {
+ if ( sigB.v64 | sigB.v0 ) goto propagateNaN;
+ return a;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expB ) {
+ if ( ! (sigB.v64 | sigB.v0) ) goto invalid;
+ normExpSig = softfloat_normSubnormalF128Sig( sigB.v64, sigB.v0 );
+ expB = normExpSig.exp;
+ sigB = normExpSig.sig;
+ }
+ if ( ! expA ) {
+ if ( ! (sigA.v64 | sigA.v0) ) return a;
+ normExpSig = softfloat_normSubnormalF128Sig( sigA.v64, sigA.v0 );
+ expA = normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sigA.v64 |= UINT64_C( 0x0001000000000000 );
+ sigB.v64 |= UINT64_C( 0x0001000000000000 );
+ rem = sigA;
+ expDiff = expA - expB;
+ if ( expDiff < 1 ) {
+ if ( expDiff < -1 ) return a;
+ if ( expDiff ) {
+ --expB;
+ sigB = softfloat_add128( sigB.v64, sigB.v0, sigB.v64, sigB.v0 );
+ q = 0;
+ } else {
+ q = softfloat_le128( sigB.v64, sigB.v0, rem.v64, rem.v0 );
+ if ( q ) {
+ rem = softfloat_sub128( rem.v64, rem.v0, sigB.v64, sigB.v0 );
+ }
+ }
+ } else {
+ recip32 = softfloat_approxRecip32_1( sigB.v64>>17 );
+ expDiff -= 30;
+ for (;;) {
+ q64 = (uint_fast64_t) (uint32_t) (rem.v64>>19) * recip32;
+ if ( expDiff < 0 ) break;
+ q = (q64 + 0x80000000)>>32;
+ rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, 29 );
+ term = softfloat_mul128By32( sigB.v64, sigB.v0, q );
+ rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 );
+ if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) {
+ rem = softfloat_add128( rem.v64, rem.v0, sigB.v64, sigB.v0 );
+ }
+ expDiff -= 29;
+ }
+ /*--------------------------------------------------------------------
+ | (`expDiff' cannot be less than -29 here.)
+ *--------------------------------------------------------------------*/
+ q = (uint32_t) (q64>>32)>>(~expDiff & 31);
+ rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, expDiff + 30 );
+ term = softfloat_mul128By32( sigB.v64, sigB.v0, q );
+ rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 );
+ if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) {
+ altRem = softfloat_add128( rem.v64, rem.v0, sigB.v64, sigB.v0 );
+ goto selectRem;
+ }
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ do {
+ altRem = rem;
+ ++q;
+ rem = softfloat_sub128( rem.v64, rem.v0, sigB.v64, sigB.v0 );
+ } while ( ! (rem.v64 & UINT64_C( 0x8000000000000000 )) );
+ selectRem:
+ meanRem = softfloat_add128( rem.v64, rem.v0, altRem.v64, altRem.v0 );
+ if (
+ (meanRem.v64 & UINT64_C( 0x8000000000000000 ))
+ || (! (meanRem.v64 | meanRem.v0) && (q & 1))
+ ) {
+ rem = altRem;
+ }
+ signRem = signA;
+ if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) {
+ signRem = ! signRem;
+ rem = softfloat_sub128( 0, 0, rem.v64, rem.v0 );
+ }
+ return softfloat_normRoundPackToF128( signRem, expB - 1, rem.v64, rem.v0 SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN:
+ uiZ = softfloat_propagateNaNF128UI( uiA64, uiA0, uiB64, uiB0 SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ.v64 = defaultNaNF128UI64;
+ uiZ.v0 = defaultNaNF128UI0;
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_roundToInt.c b/src/libs/softfloat-3e/source/f128_roundToInt.c
new file mode 100644
index 00000000..f643296b
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_roundToInt.c
@@ -0,0 +1,174 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+#include <iprt/cdefs.h> /* VBox: for RT_FALL_THROUGH */
+
+float128_t
+ f128_roundToInt( float128_t a, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ int_fast32_t exp;
+ struct uint128 uiZ;
+ uint_fast64_t lastBitMask0, roundBitsMask;
+ bool roundNearEven;
+ uint_fast64_t lastBitMask64;
+ union ui128_f128 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ exp = expF128UI64( uiA64 );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( 0x402F <= exp ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( 0x406F <= exp ) {
+ if ( (exp == 0x7FFF) && (fracF128UI64( uiA64 ) | uiA0) ) {
+ uiZ = softfloat_propagateNaNF128UI( uiA64, uiA0, 0, 0 SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ }
+ return a;
+ }
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ lastBitMask0 = (uint_fast64_t) 2<<(0x406E - exp);
+ roundBitsMask = lastBitMask0 - 1;
+ uiZ.v64 = uiA64;
+ uiZ.v0 = uiA0;
+ roundNearEven = (roundingMode == softfloat_round_near_even);
+ if ( roundNearEven || (roundingMode == softfloat_round_near_maxMag) ) {
+ if ( exp == 0x402F ) {
+ if ( UINT64_C( 0x8000000000000000 ) <= uiZ.v0 ) {
+ ++uiZ.v64;
+ if (
+ roundNearEven
+ && (uiZ.v0 == UINT64_C( 0x8000000000000000 ))
+ ) {
+ uiZ.v64 &= ~1;
+ }
+ }
+ } else {
+ uiZ = softfloat_add128( uiZ.v64, uiZ.v0, 0, lastBitMask0>>1 );
+ if ( roundNearEven && !(uiZ.v0 & roundBitsMask) ) {
+ uiZ.v0 &= ~lastBitMask0;
+ }
+ }
+ } else if (
+ roundingMode
+ == (signF128UI64( uiZ.v64 ) ? softfloat_round_min
+ : softfloat_round_max)
+ ) {
+ uiZ = softfloat_add128( uiZ.v64, uiZ.v0, 0, roundBitsMask );
+ }
+ uiZ.v0 &= ~roundBitsMask;
+ lastBitMask64 = !lastBitMask0;
+ } else {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( exp < 0x3FFF ) {
+ if ( !((uiA64 & UINT64_C( 0x7FFFFFFFFFFFFFFF )) | uiA0) ) return a;
+ if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+ uiZ.v64 = uiA64 & packToF128UI64( 1, 0, 0 );
+ uiZ.v0 = 0;
+ switch ( roundingMode ) {
+ case softfloat_round_near_even:
+ if ( !(fracF128UI64( uiA64 ) | uiA0) ) break;
+ RT_FALL_THROUGH(); /* VBox */
+ case softfloat_round_near_maxMag:
+ if ( exp == 0x3FFE ) uiZ.v64 |= packToF128UI64( 0, 0x3FFF, 0 );
+ break;
+ case softfloat_round_min:
+ if ( uiZ.v64 ) uiZ.v64 = packToF128UI64( 1, 0x3FFF, 0 );
+ break;
+ case softfloat_round_max:
+ if ( !uiZ.v64 ) uiZ.v64 = packToF128UI64( 0, 0x3FFF, 0 );
+ break;
+#ifdef SOFTFLOAT_ROUND_ODD
+ case softfloat_round_odd:
+ uiZ.v64 |= packToF128UI64( 0, 0x3FFF, 0 );
+ break;
+#endif
+ }
+ goto uiZ;
+ }
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ uiZ.v64 = uiA64;
+ uiZ.v0 = 0;
+ lastBitMask64 = (uint_fast64_t) 1<<(0x402F - exp);
+ roundBitsMask = lastBitMask64 - 1;
+ if ( roundingMode == softfloat_round_near_maxMag ) {
+ uiZ.v64 += lastBitMask64>>1;
+ } else if ( roundingMode == softfloat_round_near_even ) {
+ uiZ.v64 += lastBitMask64>>1;
+ if ( !((uiZ.v64 & roundBitsMask) | uiA0) ) {
+ uiZ.v64 &= ~lastBitMask64;
+ }
+ } else if (
+ roundingMode
+ == (signF128UI64( uiZ.v64 ) ? softfloat_round_min
+ : softfloat_round_max)
+ ) {
+ uiZ.v64 = (uiZ.v64 | (uiA0 != 0)) + roundBitsMask;
+ }
+ uiZ.v64 &= ~roundBitsMask;
+ lastBitMask0 = 0;
+ }
+ if ( (uiZ.v64 != uiA64) || (uiZ.v0 != uiA0) ) {
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) {
+ uiZ.v64 |= lastBitMask64;
+ uiZ.v0 |= lastBitMask0;
+ }
+#endif
+ if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_sqrt.c b/src/libs/softfloat-3e/source/f128_sqrt.c
new file mode 100644
index 00000000..1a1539b0
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_sqrt.c
@@ -0,0 +1,201 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float128_t f128_sqrt( float128_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ bool signA;
+ int_fast32_t expA;
+ struct uint128 sigA, uiZ;
+ struct exp32_sig128 normExpSig;
+ int_fast32_t expZ;
+ uint_fast32_t sig32A, recipSqrt32, sig32Z;
+ struct uint128 rem;
+ uint32_t qs[3];
+ uint_fast32_t q;
+ uint_fast64_t x64, sig64Z;
+ struct uint128 y, term;
+ uint_fast64_t sigZExtra;
+ struct uint128 sigZ;
+ union ui128_f128 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ signA = signF128UI64( uiA64 );
+ expA = expF128UI64( uiA64 );
+ sigA.v64 = fracF128UI64( uiA64 );
+ sigA.v0 = uiA0;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0x7FFF ) {
+ if ( sigA.v64 | sigA.v0 ) {
+ uiZ = softfloat_propagateNaNF128UI( uiA64, uiA0, 0, 0 SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ }
+ if ( ! signA ) return a;
+ goto invalid;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( signA ) {
+ if ( ! (expA | sigA.v64 | sigA.v0) ) return a;
+ goto invalid;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expA ) {
+ if ( ! (sigA.v64 | sigA.v0) ) return a;
+ normExpSig = softfloat_normSubnormalF128Sig( sigA.v64, sigA.v0 );
+ expA = normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ | (`sig32Z' is guaranteed to be a lower bound on the square root of
+ | `sig32A', which makes `sig32Z' also a lower bound on the square root of
+ | `sigA'.)
+ *------------------------------------------------------------------------*/
+ expZ = ((expA - 0x3FFF)>>1) + 0x3FFE;
+ expA &= 1;
+ sigA.v64 |= UINT64_C( 0x0001000000000000 );
+ sig32A = sigA.v64>>17;
+ recipSqrt32 = softfloat_approxRecipSqrt32_1( expA, sig32A );
+ sig32Z = ((uint_fast64_t) sig32A * recipSqrt32)>>32;
+ if ( expA ) {
+ sig32Z >>= 1;
+ rem = softfloat_shortShiftLeft128( sigA.v64, sigA.v0, 12 );
+ } else {
+ rem = softfloat_shortShiftLeft128( sigA.v64, sigA.v0, 13 );
+ }
+ qs[2] = sig32Z;
+ rem.v64 -= (uint_fast64_t) sig32Z * sig32Z;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ q = ((uint32_t) (rem.v64>>2) * (uint_fast64_t) recipSqrt32)>>32;
+ x64 = (uint_fast64_t) sig32Z<<32;
+ sig64Z = x64 + ((uint_fast64_t) q<<3);
+ y = softfloat_shortShiftLeft128( rem.v64, rem.v0, 29 );
+ /*------------------------------------------------------------------------
+ | (Repeating this loop is a rare occurrence.)
+ *------------------------------------------------------------------------*/
+ for (;;) {
+ term = softfloat_mul64ByShifted32To128( x64 + sig64Z, q );
+ rem = softfloat_sub128( y.v64, y.v0, term.v64, term.v0 );
+ if ( ! (rem.v64 & UINT64_C( 0x8000000000000000 )) ) break;
+ --q;
+ sig64Z -= 1<<3;
+ }
+ qs[1] = q;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ q = ((rem.v64>>2) * recipSqrt32)>>32;
+ y = softfloat_shortShiftLeft128( rem.v64, rem.v0, 29 );
+ sig64Z <<= 1;
+ /*------------------------------------------------------------------------
+ | (Repeating this loop is a rare occurrence.)
+ *------------------------------------------------------------------------*/
+ for (;;) {
+ term = softfloat_shortShiftLeft128( 0, sig64Z, 32 );
+ term = softfloat_add128( term.v64, term.v0, 0, (uint_fast64_t) q<<6 );
+ term = softfloat_mul128By32( term.v64, term.v0, q );
+ rem = softfloat_sub128( y.v64, y.v0, term.v64, term.v0 );
+ if ( ! (rem.v64 & UINT64_C( 0x8000000000000000 )) ) break;
+ --q;
+ }
+ qs[0] = q;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ q = (((rem.v64>>2) * recipSqrt32)>>32) + 2;
+ sigZExtra = (uint64_t) ((uint_fast64_t) q<<59);
+ term = softfloat_shortShiftLeft128( 0, qs[1], 53 );
+ sigZ =
+ softfloat_add128(
+ (uint_fast64_t) qs[2]<<18, ((uint_fast64_t) qs[0]<<24) + (q>>5),
+ term.v64, term.v0
+ );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( (q & 0xF) <= 2 ) {
+ q &= ~3;
+ sigZExtra = (uint64_t) ((uint_fast64_t) q<<59);
+ y = softfloat_shortShiftLeft128( sigZ.v64, sigZ.v0, 6 );
+ y.v0 |= sigZExtra>>58;
+ term = softfloat_sub128( y.v64, y.v0, 0, q );
+ y = softfloat_mul64ByShifted32To128( term.v0, q );
+ term = softfloat_mul64ByShifted32To128( term.v64, q );
+ term = softfloat_add128( term.v64, term.v0, 0, y.v64 );
+ rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, 20 );
+ term = softfloat_sub128( term.v64, term.v0, rem.v64, rem.v0 );
+ /*--------------------------------------------------------------------
+ | The concatenation of `term' and `y.v0' is now the negative remainder
+ | (3 words altogether).
+ *--------------------------------------------------------------------*/
+ if ( term.v64 & UINT64_C( 0x8000000000000000 ) ) {
+ sigZExtra |= 1;
+ } else {
+ if ( term.v64 | term.v0 | y.v0 ) {
+ if ( sigZExtra ) {
+ --sigZExtra;
+ } else {
+ sigZ = softfloat_sub128( sigZ.v64, sigZ.v0, 0, 1 );
+ sigZExtra = ~0;
+ }
+ }
+ }
+ }
+ return softfloat_roundPackToF128( 0, expZ, sigZ.v64, sigZ.v0, sigZExtra SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ.v64 = defaultNaNF128UI64;
+ uiZ.v0 = defaultNaNF128UI0;
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_sub.c b/src/libs/softfloat-3e/source/f128_sub.c
new file mode 100644
index 00000000..a76926e6
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_sub.c
@@ -0,0 +1,78 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float128_t f128_sub( float128_t a, float128_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ bool signA;
+ union ui128_f128 uB;
+ uint_fast64_t uiB64, uiB0;
+ bool signB;
+#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 2)
+ float128_t
+ (*magsFuncPtr)(
+ uint_fast64_t, uint_fast64_t, uint_fast64_t, uint_fast64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+#endif
+
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ signA = signF128UI64( uiA64 );
+ uB.f = b;
+ uiB64 = uB.ui.v64;
+ uiB0 = uB.ui.v0;
+ signB = signF128UI64( uiB64 );
+#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
+ if ( signA == signB ) {
+ return softfloat_subMagsF128( uiA64, uiA0, uiB64, uiB0, signA SOFTFLOAT_STATE_ARG_COMMA );
+ } else {
+ return softfloat_addMagsF128( uiA64, uiA0, uiB64, uiB0, signA SOFTFLOAT_STATE_ARG_COMMA );
+ }
+#else
+ magsFuncPtr =
+ (signA == signB) ? softfloat_subMagsF128 : softfloat_addMagsF128;
+ return (*magsFuncPtr)( uiA64, uiA0, uiB64, uiB0, signA SOFTFLOAT_STATE_ARG_COMMA );
+#endif
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_to_extF80.c b/src/libs/softfloat-3e/source/f128_to_extF80.c
new file mode 100644
index 00000000..a80c3c60
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_to_extF80.c
@@ -0,0 +1,109 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+extFloat80_t f128_to_extF80( float128_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ bool sign;
+ int_fast32_t exp;
+ uint_fast64_t frac64, frac0;
+ struct commonNaN commonNaN;
+ struct uint128 uiZ;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+ struct exp32_sig128 normExpSig;
+ struct uint128 sig128;
+ union { struct extFloat80M s; extFloat80_t f; } uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ sign = signF128UI64( uiA64 );
+ exp = expF128UI64( uiA64 );
+ frac64 = fracF128UI64( uiA64 );
+ frac0 = uiA0;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x7FFF ) {
+ if ( frac64 | frac0 ) {
+ softfloat_f128UIToCommonNaN( uiA64, uiA0, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToExtF80UI( &commonNaN );
+ uiZ64 = uiZ.v64;
+ uiZ0 = uiZ.v0;
+ } else {
+ uiZ64 = packToExtF80UI64( sign, 0x7FFF );
+ uiZ0 = UINT64_C( 0x8000000000000000 );
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! exp ) {
+ if ( ! (frac64 | frac0) ) {
+ uiZ64 = packToExtF80UI64( sign, 0 );
+ uiZ0 = 0;
+ goto uiZ;
+ }
+ normExpSig = softfloat_normSubnormalF128Sig( frac64, frac0 );
+ exp = normExpSig.exp;
+ frac64 = normExpSig.sig.v64;
+ frac0 = normExpSig.sig.v0;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sig128 =
+ softfloat_shortShiftLeft128(
+ frac64 | UINT64_C( 0x0001000000000000 ), frac0, 15 );
+ return softfloat_roundPackToExtF80( sign, exp, sig128.v64, sig128.v0, 80 SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ:
+ uZ.s.signExp = uiZ64;
+ uZ.s.signif = uiZ0;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_to_f16.c b/src/libs/softfloat-3e/source/f128_to_f16.c
new file mode 100644
index 00000000..b36cd139
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_to_f16.c
@@ -0,0 +1,95 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float16_t f128_to_f16( float128_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ bool sign;
+ int_fast32_t exp;
+ uint_fast64_t frac64;
+ struct commonNaN commonNaN;
+ uint_fast16_t uiZ, frac16;
+ union ui16_f16 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ sign = signF128UI64( uiA64 );
+ exp = expF128UI64( uiA64 );
+ frac64 = fracF128UI64( uiA64 ) | (uiA0 != 0);
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x7FFF ) {
+ if ( frac64 ) {
+ softfloat_f128UIToCommonNaN( uiA64, uiA0, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToF16UI( &commonNaN );
+ } else {
+ uiZ = packToF16UI( sign, 0x1F, 0 );
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ frac16 = softfloat_shortShiftRightJam64( frac64, 34 );
+ if ( ! (exp | frac16) ) {
+ uiZ = packToF16UI( sign, 0, 0 );
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ exp -= 0x3FF1;
+ if ( sizeof (int_fast16_t) < sizeof (int_fast32_t) ) {
+ if ( exp < -0x40 ) exp = -0x40;
+ }
+ return softfloat_roundPackToF16( sign, exp, frac16 | 0x4000 SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_to_f32.c b/src/libs/softfloat-3e/source/f128_to_f32.c
new file mode 100644
index 00000000..163d132f
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_to_f32.c
@@ -0,0 +1,95 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float32_t f128_to_f32( float128_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ bool sign;
+ int_fast32_t exp;
+ uint_fast64_t frac64;
+ struct commonNaN commonNaN;
+ uint_fast32_t uiZ, frac32;
+ union ui32_f32 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ sign = signF128UI64( uiA64 );
+ exp = expF128UI64( uiA64 );
+ frac64 = fracF128UI64( uiA64 ) | (uiA0 != 0);
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x7FFF ) {
+ if ( frac64 ) {
+ softfloat_f128UIToCommonNaN( uiA64, uiA0, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToF32UI( &commonNaN );
+ } else {
+ uiZ = packToF32UI( sign, 0xFF, 0 );
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ frac32 = softfloat_shortShiftRightJam64( frac64, 18 );
+ if ( ! (exp | frac32) ) {
+ uiZ = packToF32UI( sign, 0, 0 );
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ exp -= 0x3F81;
+ if ( sizeof (int_fast16_t) < sizeof (int_fast32_t) ) {
+ if ( exp < -0x1000 ) exp = -0x1000;
+ }
+ return softfloat_roundPackToF32( sign, exp, frac32 | 0x40000000 SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_to_f64.c b/src/libs/softfloat-3e/source/f128_to_f64.c
new file mode 100644
index 00000000..8f8154f3
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_to_f64.c
@@ -0,0 +1,100 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float64_t f128_to_f64( float128_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ bool sign;
+ int_fast32_t exp;
+ uint_fast64_t frac64, frac0;
+ struct commonNaN commonNaN;
+ uint_fast64_t uiZ;
+ struct uint128 frac128;
+ union ui64_f64 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ sign = signF128UI64( uiA64 );
+ exp = expF128UI64( uiA64 );
+ frac64 = fracF128UI64( uiA64 );
+ frac0 = uiA0;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x7FFF ) {
+ if ( frac64 | frac0 ) {
+ softfloat_f128UIToCommonNaN( uiA64, uiA0, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToF64UI( &commonNaN );
+ } else {
+ uiZ = packToF64UI( sign, 0x7FF, 0 );
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ frac128 = softfloat_shortShiftLeft128( frac64, frac0, 14 );
+ frac64 = frac128.v64 | (frac128.v0 != 0);
+ if ( ! (exp | frac64) ) {
+ uiZ = packToF64UI( sign, 0, 0 );
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ exp -= 0x3C01;
+ if ( sizeof (int_fast16_t) < sizeof (int_fast32_t) ) {
+ if ( exp < -0x1000 ) exp = -0x1000;
+ }
+ return
+ softfloat_roundPackToF64(
+ sign, exp, frac64 | UINT64_C( 0x4000000000000000 ) SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_to_i32.c b/src/libs/softfloat-3e/source/f128_to_i32.c
new file mode 100644
index 00000000..694e10ce
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_to_i32.c
@@ -0,0 +1,85 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+int_fast32_t f128_to_i32( float128_t a, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ bool sign;
+ int_fast32_t exp;
+ uint_fast64_t sig64, sig0;
+ int_fast32_t shiftDist;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ sign = signF128UI64( uiA64 );
+ exp = expF128UI64( uiA64 );
+ sig64 = fracF128UI64( uiA64 );
+ sig0 = uiA0;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#if (i32_fromNaN != i32_fromPosOverflow) || (i32_fromNaN != i32_fromNegOverflow)
+ if ( (exp == 0x7FFF) && (sig64 | sig0) ) {
+#if (i32_fromNaN == i32_fromPosOverflow)
+ sign = 0;
+#elif (i32_fromNaN == i32_fromNegOverflow)
+ sign = 1;
+#else
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return i32_fromNaN;
+#endif
+ }
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp ) sig64 |= UINT64_C( 0x0001000000000000 );
+ sig64 |= (sig0 != 0);
+ shiftDist = 0x4023 - exp;
+ if ( 0 < shiftDist ) sig64 = softfloat_shiftRightJam64( sig64, shiftDist );
+ return softfloat_roundToI32( sign, sig64, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_to_i32_r_minMag.c b/src/libs/softfloat-3e/source/f128_to_i32_r_minMag.c
new file mode 100644
index 00000000..da6ca13c
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_to_i32_r_minMag.c
@@ -0,0 +1,100 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+int_fast32_t f128_to_i32_r_minMag( float128_t a, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ int_fast32_t exp;
+ uint_fast64_t sig64;
+ int_fast32_t shiftDist;
+ bool sign;
+ int_fast32_t absZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ exp = expF128UI64( uiA64 );
+ sig64 = fracF128UI64( uiA64 ) | (uiA0 != 0);
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x402F - exp;
+ if ( 49 <= shiftDist ) {
+ if ( exact && (exp | sig64) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return 0;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sign = signF128UI64( uiA64 );
+ if ( shiftDist < 18 ) {
+ if (
+ sign && (shiftDist == 17)
+ && (sig64 < UINT64_C( 0x0000000000020000 ))
+ ) {
+ if ( exact && sig64 ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return -0x7FFFFFFF - 1;
+ }
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF) && sig64 ? i32_fromNaN
+ : sign ? i32_fromNegOverflow : i32_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sig64 |= UINT64_C( 0x0001000000000000 );
+ absZ = sig64>>shiftDist;
+ if (
+ exact && ((uint_fast64_t) (uint_fast32_t) absZ<<shiftDist != sig64)
+ ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return sign ? -absZ : absZ;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_to_i64.c b/src/libs/softfloat-3e/source/f128_to_i64.c
new file mode 100644
index 00000000..6a8370d9
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_to_i64.c
@@ -0,0 +1,95 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+int_fast64_t f128_to_i64( float128_t a, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ bool sign;
+ int_fast32_t exp;
+ uint_fast64_t sig64, sig0;
+ int_fast32_t shiftDist;
+ struct uint128 sig128;
+ struct uint64_extra sigExtra;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ sign = signF128UI64( uiA64 );
+ exp = expF128UI64( uiA64 );
+ sig64 = fracF128UI64( uiA64 );
+ sig0 = uiA0;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x402F - exp;
+ if ( shiftDist <= 0 ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( shiftDist < -15 ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF) && (sig64 | sig0) ? i64_fromNaN
+ : sign ? i64_fromNegOverflow : i64_fromPosOverflow;
+ }
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ sig64 |= UINT64_C( 0x0001000000000000 );
+ if ( shiftDist ) {
+ sig128 = softfloat_shortShiftLeft128( sig64, sig0, -shiftDist );
+ sig64 = sig128.v64;
+ sig0 = sig128.v0;
+ }
+ } else {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( exp ) sig64 |= UINT64_C( 0x0001000000000000 );
+ sigExtra = softfloat_shiftRightJam64Extra( sig64, sig0, shiftDist );
+ sig64 = sigExtra.v;
+ sig0 = sigExtra.extra;
+ }
+ return softfloat_roundToI64( sign, sig64, sig0, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_to_i64_r_minMag.c b/src/libs/softfloat-3e/source/f128_to_i64_r_minMag.c
new file mode 100644
index 00000000..88fa4b64
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_to_i64_r_minMag.c
@@ -0,0 +1,113 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+int_fast64_t f128_to_i64_r_minMag( float128_t a, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ bool sign;
+ int_fast32_t exp;
+ uint_fast64_t sig64, sig0;
+ int_fast32_t shiftDist;
+ int_fast8_t negShiftDist;
+ int_fast64_t absZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ sign = signF128UI64( uiA64 );
+ exp = expF128UI64( uiA64 );
+ sig64 = fracF128UI64( uiA64 );
+ sig0 = uiA0;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x402F - exp;
+ if ( shiftDist < 0 ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( shiftDist < -14 ) {
+ if (
+ (uiA64 == UINT64_C( 0xC03E000000000000 ))
+ && (sig0 < UINT64_C( 0x0002000000000000 ))
+ ) {
+ if ( exact && sig0 ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1;
+ }
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF) && (sig64 | sig0) ? i64_fromNaN
+ : sign ? i64_fromNegOverflow : i64_fromPosOverflow;
+ }
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ sig64 |= UINT64_C( 0x0001000000000000 );
+ negShiftDist = -shiftDist;
+ absZ = sig64<<negShiftDist | sig0>>(shiftDist & 63);
+ if ( exact && (uint64_t) (sig0<<negShiftDist) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ } else {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( 49 <= shiftDist ) {
+ if ( exact && (exp | sig64 | sig0) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return 0;
+ }
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ sig64 |= UINT64_C( 0x0001000000000000 );
+ absZ = sig64>>shiftDist;
+ if ( exact && (sig0 || (absZ<<shiftDist != sig64)) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ }
+ return sign ? -absZ : absZ;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_to_ui32.c b/src/libs/softfloat-3e/source/f128_to_ui32.c
new file mode 100644
index 00000000..7868fb4e
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_to_ui32.c
@@ -0,0 +1,86 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+uint_fast32_t
+ f128_to_ui32( float128_t a, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ bool sign;
+ int_fast32_t exp;
+ uint_fast64_t sig64;
+ int_fast32_t shiftDist;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ sign = signF128UI64( uiA64 );
+ exp = expF128UI64( uiA64 );
+ sig64 = fracF128UI64( uiA64 ) | (uiA0 != 0);
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#if (ui32_fromNaN != ui32_fromPosOverflow) || (ui32_fromNaN != ui32_fromNegOverflow)
+ if ( (exp == 0x7FFF) && sig64 ) {
+#if (ui32_fromNaN == ui32_fromPosOverflow)
+ sign = 0;
+#elif (ui32_fromNaN == ui32_fromNegOverflow)
+ sign = 1;
+#else
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return ui32_fromNaN;
+#endif
+ }
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp ) sig64 |= UINT64_C( 0x0001000000000000 );
+ shiftDist = 0x4023 - exp;
+ if ( 0 < shiftDist ) {
+ sig64 = softfloat_shiftRightJam64( sig64, shiftDist );
+ }
+ return softfloat_roundToUI32( sign, sig64, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_to_ui32_r_minMag.c b/src/libs/softfloat-3e/source/f128_to_ui32_r_minMag.c
new file mode 100644
index 00000000..44d86db3
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_to_ui32_r_minMag.c
@@ -0,0 +1,89 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+uint_fast32_t f128_to_ui32_r_minMag( float128_t a, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ int_fast32_t exp;
+ uint_fast64_t sig64;
+ int_fast32_t shiftDist;
+ bool sign;
+ uint_fast32_t z;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ exp = expF128UI64( uiA64 );
+ sig64 = fracF128UI64( uiA64 ) | (uiA0 != 0);
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x402F - exp;
+ if ( 49 <= shiftDist ) {
+ if ( exact && (exp | sig64) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return 0;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sign = signF128UI64( uiA64 );
+ if ( sign || (shiftDist < 17) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF) && sig64 ? ui32_fromNaN
+ : sign ? ui32_fromNegOverflow : ui32_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sig64 |= UINT64_C( 0x0001000000000000 );
+ z = sig64>>shiftDist;
+ if ( exact && ((uint_fast64_t) z<<shiftDist != sig64) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return z;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_to_ui64.c b/src/libs/softfloat-3e/source/f128_to_ui64.c
new file mode 100644
index 00000000..1798987c
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_to_ui64.c
@@ -0,0 +1,96 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+uint_fast64_t
+ f128_to_ui64( float128_t a, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ bool sign;
+ int_fast32_t exp;
+ uint_fast64_t sig64, sig0;
+ int_fast32_t shiftDist;
+ struct uint128 sig128;
+ struct uint64_extra sigExtra;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ sign = signF128UI64( uiA64 );
+ exp = expF128UI64( uiA64 );
+ sig64 = fracF128UI64( uiA64 );
+ sig0 = uiA0;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x402F - exp;
+ if ( shiftDist <= 0 ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( shiftDist < -15 ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF) && (sig64 | sig0) ? ui64_fromNaN
+ : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow;
+ }
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ sig64 |= UINT64_C( 0x0001000000000000 );
+ if ( shiftDist ) {
+ sig128 = softfloat_shortShiftLeft128( sig64, sig0, -shiftDist );
+ sig64 = sig128.v64;
+ sig0 = sig128.v0;
+ }
+ } else {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( exp ) sig64 |= UINT64_C( 0x0001000000000000 );
+ sigExtra = softfloat_shiftRightJam64Extra( sig64, sig0, shiftDist );
+ sig64 = sigExtra.v;
+ sig0 = sigExtra.extra;
+ }
+ return softfloat_roundToUI64( sign, sig64, sig0, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f128_to_ui64_r_minMag.c b/src/libs/softfloat-3e/source/f128_to_ui64_r_minMag.c
new file mode 100644
index 00000000..4e0ec3cb
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f128_to_ui64_r_minMag.c
@@ -0,0 +1,105 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+uint_fast64_t f128_to_ui64_r_minMag( float128_t a, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui128_f128 uA;
+ uint_fast64_t uiA64, uiA0;
+ bool sign;
+ int_fast32_t exp;
+ uint_fast64_t sig64, sig0;
+ int_fast32_t shiftDist;
+ int_fast8_t negShiftDist;
+ uint_fast64_t z;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA64 = uA.ui.v64;
+ uiA0 = uA.ui.v0;
+ sign = signF128UI64( uiA64 );
+ exp = expF128UI64( uiA64 );
+ sig64 = fracF128UI64( uiA64 );
+ sig0 = uiA0;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x402F - exp;
+ if ( shiftDist < 0 ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( sign || (shiftDist < -15) ) goto invalid;
+ sig64 |= UINT64_C( 0x0001000000000000 );
+ negShiftDist = -shiftDist;
+ z = sig64<<negShiftDist | sig0>>(shiftDist & 63);
+ if ( exact && (uint64_t) (sig0<<negShiftDist) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ } else {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( 49 <= shiftDist ) {
+ if ( exact && (exp | sig64 | sig0) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return 0;
+ }
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( sign ) goto invalid;
+ sig64 |= UINT64_C( 0x0001000000000000 );
+ z = sig64>>shiftDist;
+ if ( exact && (sig0 || (z<<shiftDist != sig64)) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ }
+ return z;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FFF) && (sig64 | sig0) ? ui64_fromNaN
+ : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_add.c b/src/libs/softfloat-3e/source/f16_add.c
new file mode 100644
index 00000000..19a5dd3d
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_add.c
@@ -0,0 +1,70 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float16_t f16_add( float16_t a, float16_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ union ui16_f16 uB;
+ uint_fast16_t uiB;
+#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 1)
+ float16_t (*magsFuncPtr)( uint_fast16_t, uint_fast16_t SOFTFLOAT_STATE_DECL_COMMA );
+#endif
+
+ uA.f = a;
+ uiA = uA.ui;
+ uB.f = b;
+ uiB = uB.ui;
+#if defined INLINE_LEVEL && (1 <= INLINE_LEVEL)
+ if ( signF16UI( uiA ^ uiB ) ) {
+ return softfloat_subMagsF16( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ } else {
+ return softfloat_addMagsF16( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ }
+#else
+ magsFuncPtr =
+ signF16UI( uiA ^ uiB ) ? softfloat_subMagsF16 : softfloat_addMagsF16;
+ return (*magsFuncPtr)( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+#endif
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_div.c b/src/libs/softfloat-3e/source/f16_div.c
new file mode 100644
index 00000000..a7f63373
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_div.c
@@ -0,0 +1,186 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+extern const uint16_t softfloat_approxRecip_1k0s[];
+extern const uint16_t softfloat_approxRecip_1k1s[];
+
+float16_t f16_div( float16_t a, float16_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ bool signA;
+ int_fast8_t expA;
+ uint_fast16_t sigA;
+ union ui16_f16 uB;
+ uint_fast16_t uiB;
+ bool signB;
+ int_fast8_t expB;
+ uint_fast16_t sigB;
+ bool signZ;
+ struct exp8_sig16 normExpSig;
+ int_fast8_t expZ;
+#ifdef SOFTFLOAT_FAST_DIV32TO16
+ uint_fast32_t sig32A;
+ uint_fast16_t sigZ;
+#else
+ int index;
+ uint16_t r0;
+ uint_fast16_t sigZ, rem;
+#endif
+ uint_fast16_t uiZ;
+ union ui16_f16 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ signA = signF16UI( uiA );
+ expA = expF16UI( uiA );
+ sigA = fracF16UI( uiA );
+ uB.f = b;
+ uiB = uB.ui;
+ signB = signF16UI( uiB );
+ expB = expF16UI( uiB );
+ sigB = fracF16UI( uiB );
+ signZ = signA ^ signB;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0x1F ) {
+ if ( sigA ) goto propagateNaN;
+ if ( expB == 0x1F ) {
+ if ( sigB ) goto propagateNaN;
+ goto invalid;
+ }
+ goto infinity;
+ }
+ if ( expB == 0x1F ) {
+ if ( sigB ) goto propagateNaN;
+ goto zero;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expB ) {
+ if ( ! sigB ) {
+ if ( ! (expA | sigA) ) goto invalid;
+ softfloat_raiseFlags( softfloat_flag_infinite SOFTFLOAT_STATE_ARG_COMMA );
+ goto infinity;
+ }
+ normExpSig = softfloat_normSubnormalF16Sig( sigB );
+ expB = normExpSig.exp;
+ sigB = normExpSig.sig;
+ }
+ if ( ! expA ) {
+ if ( ! sigA ) goto zero;
+ normExpSig = softfloat_normSubnormalF16Sig( sigA );
+ expA = normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expZ = expA - expB + 0xE;
+ sigA |= 0x0400;
+ sigB |= 0x0400;
+#ifdef SOFTFLOAT_FAST_DIV32TO16
+ if ( sigA < sigB ) {
+ --expZ;
+ sig32A = (uint_fast32_t) sigA<<15;
+ } else {
+ sig32A = (uint_fast32_t) sigA<<14;
+ }
+ sigZ = sig32A / sigB;
+ if ( ! (sigZ & 7) ) sigZ |= ((uint_fast32_t) sigB * sigZ != sig32A);
+#else
+ if ( sigA < sigB ) {
+ --expZ;
+ sigA <<= 5;
+ } else {
+ sigA <<= 4;
+ }
+ index = sigB>>6 & 0xF;
+ r0 = softfloat_approxRecip_1k0s[index]
+ - (((uint_fast32_t) softfloat_approxRecip_1k1s[index]
+ * (sigB & 0x3F))
+ >>10);
+ sigZ = ((uint_fast32_t) sigA * r0)>>16;
+ rem = (sigA<<10) - sigZ * sigB;
+ sigZ += (rem * (uint_fast32_t) r0)>>26;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ ++sigZ;
+ if ( ! (sigZ & 7) ) {
+ sigZ &= ~1;
+ rem = (sigA<<10) - sigZ * sigB;
+ if ( rem & 0x8000 ) {
+ sigZ -= 2;
+ } else {
+ if ( rem ) sigZ |= 1;
+ }
+ }
+#endif
+ return softfloat_roundPackToF16( signZ, expZ, sigZ SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN:
+ uiZ = softfloat_propagateNaNF16UI( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = defaultNaNF16UI;
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ infinity:
+ uiZ = packToF16UI( signZ, 0x1F, 0 );
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zero:
+ uiZ = packToF16UI( signZ, 0, 0 );
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_eq.c b/src/libs/softfloat-3e/source/f16_eq.c
new file mode 100644
index 00000000..4489d1a1
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_eq.c
@@ -0,0 +1,66 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool f16_eq( float16_t a, float16_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ union ui16_f16 uB;
+ uint_fast16_t uiB;
+
+ uA.f = a;
+ uiA = uA.ui;
+ uB.f = b;
+ uiB = uB.ui;
+ if ( isNaNF16UI( uiA ) || isNaNF16UI( uiB ) ) {
+ if (
+ softfloat_isSigNaNF16UI( uiA ) || softfloat_isSigNaNF16UI( uiB )
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ return false;
+ }
+ return (uiA == uiB) || ! (uint16_t) ((uiA | uiB)<<1);
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_eq_signaling.c b/src/libs/softfloat-3e/source/f16_eq_signaling.c
new file mode 100644
index 00000000..6885367a
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_eq_signaling.c
@@ -0,0 +1,61 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+bool f16_eq_signaling( float16_t a, float16_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ union ui16_f16 uB;
+ uint_fast16_t uiB;
+
+ uA.f = a;
+ uiA = uA.ui;
+ uB.f = b;
+ uiB = uB.ui;
+ if ( isNaNF16UI( uiA ) || isNaNF16UI( uiB ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return false;
+ }
+ return (uiA == uiB) || ! (uint16_t) ((uiA | uiB)<<1);
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_isSignalingNaN.c b/src/libs/softfloat-3e/source/f16_isSignalingNaN.c
new file mode 100644
index 00000000..c49e0f2e
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_isSignalingNaN.c
@@ -0,0 +1,51 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool f16_isSignalingNaN( float16_t a )
+{
+ union ui16_f16 uA;
+
+ uA.f = a;
+ return softfloat_isSigNaNF16UI( uA.ui );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_le.c b/src/libs/softfloat-3e/source/f16_le.c
new file mode 100644
index 00000000..e8f320fb
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_le.c
@@ -0,0 +1,66 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+bool f16_le( float16_t a, float16_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ union ui16_f16 uB;
+ uint_fast16_t uiB;
+ bool signA, signB;
+
+ uA.f = a;
+ uiA = uA.ui;
+ uB.f = b;
+ uiB = uB.ui;
+ if ( isNaNF16UI( uiA ) || isNaNF16UI( uiB ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return false;
+ }
+ signA = signF16UI( uiA );
+ signB = signF16UI( uiB );
+ return
+ (signA != signB) ? signA || ! (uint16_t) ((uiA | uiB)<<1)
+ : (uiA == uiB) || (signA ^ (uiA < uiB));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_le_quiet.c b/src/libs/softfloat-3e/source/f16_le_quiet.c
new file mode 100644
index 00000000..625dadd3
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_le_quiet.c
@@ -0,0 +1,71 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool f16_le_quiet( float16_t a, float16_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ union ui16_f16 uB;
+ uint_fast16_t uiB;
+ bool signA, signB;
+
+ uA.f = a;
+ uiA = uA.ui;
+ uB.f = b;
+ uiB = uB.ui;
+ if ( isNaNF16UI( uiA ) || isNaNF16UI( uiB ) ) {
+ if (
+ softfloat_isSigNaNF16UI( uiA ) || softfloat_isSigNaNF16UI( uiB )
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ return false;
+ }
+ signA = signF16UI( uiA );
+ signB = signF16UI( uiB );
+ return
+ (signA != signB) ? signA || ! (uint16_t) ((uiA | uiB)<<1)
+ : (uiA == uiB) || (signA ^ (uiA < uiB));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_lt.c b/src/libs/softfloat-3e/source/f16_lt.c
new file mode 100644
index 00000000..45ad4041
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_lt.c
@@ -0,0 +1,66 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+bool f16_lt( float16_t a, float16_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ union ui16_f16 uB;
+ uint_fast16_t uiB;
+ bool signA, signB;
+
+ uA.f = a;
+ uiA = uA.ui;
+ uB.f = b;
+ uiB = uB.ui;
+ if ( isNaNF16UI( uiA ) || isNaNF16UI( uiB ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return false;
+ }
+ signA = signF16UI( uiA );
+ signB = signF16UI( uiB );
+ return
+ (signA != signB) ? signA && ((uint16_t) ((uiA | uiB)<<1) != 0)
+ : (uiA != uiB) && (signA ^ (uiA < uiB));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_lt_quiet.c b/src/libs/softfloat-3e/source/f16_lt_quiet.c
new file mode 100644
index 00000000..5fba7f9f
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_lt_quiet.c
@@ -0,0 +1,71 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool f16_lt_quiet( float16_t a, float16_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ union ui16_f16 uB;
+ uint_fast16_t uiB;
+ bool signA, signB;
+
+ uA.f = a;
+ uiA = uA.ui;
+ uB.f = b;
+ uiB = uB.ui;
+ if ( isNaNF16UI( uiA ) || isNaNF16UI( uiB ) ) {
+ if (
+ softfloat_isSigNaNF16UI( uiA ) || softfloat_isSigNaNF16UI( uiB )
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ return false;
+ }
+ signA = signF16UI( uiA );
+ signB = signF16UI( uiB );
+ return
+ (signA != signB) ? signA && ((uint16_t) ((uiA | uiB)<<1) != 0)
+ : (uiA != uiB) && (signA ^ (uiA < uiB));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_mul.c b/src/libs/softfloat-3e/source/f16_mul.c
new file mode 100644
index 00000000..18e5398f
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_mul.c
@@ -0,0 +1,140 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float16_t f16_mul( float16_t a, float16_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ bool signA;
+ int_fast8_t expA;
+ uint_fast16_t sigA;
+ union ui16_f16 uB;
+ uint_fast16_t uiB;
+ bool signB;
+ int_fast8_t expB;
+ uint_fast16_t sigB;
+ bool signZ;
+ uint_fast16_t magBits;
+ struct exp8_sig16 normExpSig;
+ int_fast8_t expZ;
+ uint_fast32_t sig32Z;
+ uint_fast16_t sigZ, uiZ;
+ union ui16_f16 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ signA = signF16UI( uiA );
+ expA = expF16UI( uiA );
+ sigA = fracF16UI( uiA );
+ uB.f = b;
+ uiB = uB.ui;
+ signB = signF16UI( uiB );
+ expB = expF16UI( uiB );
+ sigB = fracF16UI( uiB );
+ signZ = signA ^ signB;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0x1F ) {
+ if ( sigA || ((expB == 0x1F) && sigB) ) goto propagateNaN;
+ magBits = expB | sigB;
+ goto infArg;
+ }
+ if ( expB == 0x1F ) {
+ if ( sigB ) goto propagateNaN;
+ magBits = expA | sigA;
+ goto infArg;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expA ) {
+ if ( ! sigA ) goto zero;
+ normExpSig = softfloat_normSubnormalF16Sig( sigA );
+ expA = normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ if ( ! expB ) {
+ if ( ! sigB ) goto zero;
+ normExpSig = softfloat_normSubnormalF16Sig( sigB );
+ expB = normExpSig.exp;
+ sigB = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expZ = expA + expB - 0xF;
+ sigA = (sigA | 0x0400)<<4;
+ sigB = (sigB | 0x0400)<<5;
+ sig32Z = (uint_fast32_t) sigA * sigB;
+ sigZ = sig32Z>>16;
+ if ( sig32Z & 0xFFFF ) sigZ |= 1;
+ if ( sigZ < 0x4000 ) {
+ --expZ;
+ sigZ <<= 1;
+ }
+ return softfloat_roundPackToF16( signZ, expZ, sigZ SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN:
+ uiZ = softfloat_propagateNaNF16UI( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ infArg:
+ if ( ! magBits ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = defaultNaNF16UI;
+ } else {
+ uiZ = packToF16UI( signZ, 0x1F, 0 );
+ }
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zero:
+ uiZ = packToF16UI( signZ, 0, 0 );
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_mulAdd.c b/src/libs/softfloat-3e/source/f16_mulAdd.c
new file mode 100644
index 00000000..e8651986
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_mulAdd.c
@@ -0,0 +1,60 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float16_t f16_mulAdd( float16_t a, float16_t b, float16_t c SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ union ui16_f16 uB;
+ uint_fast16_t uiB;
+ union ui16_f16 uC;
+ uint_fast16_t uiC;
+
+ uA.f = a;
+ uiA = uA.ui;
+ uB.f = b;
+ uiB = uB.ui;
+ uC.f = c;
+ uiC = uC.ui;
+ return softfloat_mulAddF16( uiA, uiB, uiC, 0 SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_rem.c b/src/libs/softfloat-3e/source/f16_rem.c
new file mode 100644
index 00000000..dee10db7
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_rem.c
@@ -0,0 +1,171 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float16_t f16_rem( float16_t a, float16_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ bool signA;
+ int_fast8_t expA;
+ uint_fast16_t sigA;
+ union ui16_f16 uB;
+ uint_fast16_t uiB;
+ int_fast8_t expB;
+ uint_fast16_t sigB;
+ struct exp8_sig16 normExpSig;
+ uint16_t rem;
+ int_fast8_t expDiff;
+ uint_fast16_t q;
+ uint32_t recip32, q32;
+ uint16_t altRem, meanRem;
+ bool signRem;
+ uint_fast16_t uiZ;
+ union ui16_f16 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ signA = signF16UI( uiA );
+ expA = expF16UI( uiA );
+ sigA = fracF16UI( uiA );
+ uB.f = b;
+ uiB = uB.ui;
+ expB = expF16UI( uiB );
+ sigB = fracF16UI( uiB );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0x1F ) {
+ if ( sigA || ((expB == 0x1F) && sigB) ) goto propagateNaN;
+ goto invalid;
+ }
+ if ( expB == 0x1F ) {
+ if ( sigB ) goto propagateNaN;
+ return a;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expB ) {
+ if ( ! sigB ) goto invalid;
+ normExpSig = softfloat_normSubnormalF16Sig( sigB );
+ expB = normExpSig.exp;
+ sigB = normExpSig.sig;
+ }
+ if ( ! expA ) {
+ if ( ! sigA ) return a;
+ normExpSig = softfloat_normSubnormalF16Sig( sigA );
+ expA = normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ rem = sigA | 0x0400;
+ sigB |= 0x0400;
+ expDiff = expA - expB;
+ if ( expDiff < 1 ) {
+ if ( expDiff < -1 ) return a;
+ sigB <<= 3;
+ if ( expDiff ) {
+ rem <<= 2;
+ q = 0;
+ } else {
+ rem <<= 3;
+ q = (sigB <= rem);
+ if ( q ) rem -= sigB;
+ }
+ } else {
+ recip32 = softfloat_approxRecip32_1( (uint_fast32_t) sigB<<21 );
+ /*--------------------------------------------------------------------
+ | Changing the shift of `rem' here requires also changing the initial
+ | subtraction from `expDiff'.
+ *--------------------------------------------------------------------*/
+ rem <<= 4;
+ expDiff -= 31;
+ /*--------------------------------------------------------------------
+ | The scale of `sigB' affects how many bits are obtained during each
+ | cycle of the loop. Currently this is 29 bits per loop iteration,
+ | which is believed to be the maximum possible.
+ *--------------------------------------------------------------------*/
+ sigB <<= 3;
+ for (;;) {
+ q32 = (rem * (uint_fast64_t) recip32)>>16;
+ if ( expDiff < 0 ) break;
+ rem = -((uint_fast16_t) q32 * sigB);
+ expDiff -= 29;
+ }
+ /*--------------------------------------------------------------------
+ | (`expDiff' cannot be less than -30 here.)
+ *--------------------------------------------------------------------*/
+ q32 >>= ~expDiff & 31;
+ q = q32;
+ rem = (rem<<(expDiff + 30)) - q * sigB;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ do {
+ altRem = rem;
+ ++q;
+ rem -= sigB;
+ } while ( ! (rem & 0x8000) );
+ meanRem = rem + altRem;
+ if ( (meanRem & 0x8000) || (! meanRem && (q & 1)) ) rem = altRem;
+ signRem = signA;
+ if ( 0x8000 <= rem ) {
+ signRem = ! signRem;
+ rem = -rem;
+ }
+ return softfloat_normRoundPackToF16( signRem, expB, rem SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN:
+ uiZ = softfloat_propagateNaNF16UI( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = defaultNaNF16UI;
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_roundToInt.c b/src/libs/softfloat-3e/source/f16_roundToInt.c
new file mode 100644
index 00000000..f53c77f7
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_roundToInt.c
@@ -0,0 +1,122 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+#include <iprt/cdefs.h> /* VBox: for RT_FALL_THROUGH */
+
+float16_t f16_roundToInt( float16_t a, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ int_fast8_t exp;
+ uint_fast16_t uiZ, lastBitMask, roundBitsMask;
+ union ui16_f16 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ exp = expF16UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp <= 0xE ) {
+ if ( !(uint16_t) (uiA<<1) ) return a;
+ if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+ uiZ = uiA & packToF16UI( 1, 0, 0 );
+ switch ( roundingMode ) {
+ case softfloat_round_near_even:
+ if ( !fracF16UI( uiA ) ) break;
+ RT_FALL_THROUGH(); /* VBox */
+ case softfloat_round_near_maxMag:
+ if ( exp == 0xE ) uiZ |= packToF16UI( 0, 0xF, 0 );
+ break;
+ case softfloat_round_min:
+ if ( uiZ ) uiZ = packToF16UI( 1, 0xF, 0 );
+ break;
+ case softfloat_round_max:
+ if ( !uiZ ) uiZ = packToF16UI( 0, 0xF, 0 );
+ break;
+#ifdef SOFTFLOAT_ROUND_ODD
+ case softfloat_round_odd:
+ uiZ |= packToF16UI( 0, 0xF, 0 );
+ break;
+#endif
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( 0x19 <= exp ) {
+ if ( (exp == 0x1F) && fracF16UI( uiA ) ) {
+ uiZ = softfloat_propagateNaNF16UI( uiA, 0 SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ }
+ return a;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ = uiA;
+ lastBitMask = (uint_fast16_t) 1<<(0x19 - exp);
+ roundBitsMask = lastBitMask - 1;
+ if ( roundingMode == softfloat_round_near_maxMag ) {
+ uiZ += lastBitMask>>1;
+ } else if ( roundingMode == softfloat_round_near_even ) {
+ uiZ += lastBitMask>>1;
+ if ( !(uiZ & roundBitsMask) ) uiZ &= ~lastBitMask;
+ } else if (
+ roundingMode
+ == (signF16UI( uiZ ) ? softfloat_round_min : softfloat_round_max)
+ ) {
+ uiZ += roundBitsMask;
+ }
+ uiZ &= ~roundBitsMask;
+ if ( uiZ != uiA ) {
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) uiZ |= lastBitMask;
+#endif
+ if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_sqrt.c b/src/libs/softfloat-3e/source/f16_sqrt.c
new file mode 100644
index 00000000..e107b402
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_sqrt.c
@@ -0,0 +1,136 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+extern const uint16_t softfloat_approxRecipSqrt_1k0s[];
+extern const uint16_t softfloat_approxRecipSqrt_1k1s[];
+
+float16_t f16_sqrt( float16_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ bool signA;
+ int_fast8_t expA;
+ uint_fast16_t sigA, uiZ;
+ struct exp8_sig16 normExpSig;
+ int_fast8_t expZ;
+ int index;
+ uint_fast16_t r0;
+ uint_fast32_t ESqrR0;
+ uint16_t sigma0;
+ uint_fast16_t recipSqrt16, sigZ, shiftedSigZ;
+ uint16_t negRem;
+ union ui16_f16 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ signA = signF16UI( uiA );
+ expA = expF16UI( uiA );
+ sigA = fracF16UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0x1F ) {
+ if ( sigA ) {
+ uiZ = softfloat_propagateNaNF16UI( uiA, 0 SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ }
+ if ( ! signA ) return a;
+ goto invalid;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( signA ) {
+ if ( ! (expA | sigA) ) return a;
+ goto invalid;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expA ) {
+ if ( ! sigA ) return a;
+ normExpSig = softfloat_normSubnormalF16Sig( sigA );
+ expA = normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expZ = ((expA - 0xF)>>1) + 0xE;
+ expA &= 1;
+ sigA |= 0x0400;
+ index = (sigA>>6 & 0xE) + expA;
+ r0 = softfloat_approxRecipSqrt_1k0s[index]
+ - (((uint_fast32_t) softfloat_approxRecipSqrt_1k1s[index]
+ * (sigA & 0x7F))
+ >>11);
+ ESqrR0 = ((uint_fast32_t) r0 * r0)>>1;
+ if ( expA ) ESqrR0 >>= 1;
+ sigma0 = ~(uint_fast16_t) ((ESqrR0 * sigA)>>16);
+ recipSqrt16 = r0 + (((uint_fast32_t) r0 * sigma0)>>25);
+ if ( ! (recipSqrt16 & 0x8000) ) recipSqrt16 = 0x8000;
+ sigZ = ((uint_fast32_t) (sigA<<5) * recipSqrt16)>>16;
+ if ( expA ) sigZ >>= 1;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ ++sigZ;
+ if ( ! (sigZ & 7) ) {
+ shiftedSigZ = sigZ>>1;
+ negRem = shiftedSigZ * shiftedSigZ;
+ sigZ &= ~1;
+ if ( negRem & 0x8000 ) {
+ sigZ |= 1;
+ } else {
+ if ( negRem ) --sigZ;
+ }
+ }
+ return softfloat_roundPackToF16( 0, expZ, sigZ SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = defaultNaNF16UI;
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_sub.c b/src/libs/softfloat-3e/source/f16_sub.c
new file mode 100644
index 00000000..23379367
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_sub.c
@@ -0,0 +1,70 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float16_t f16_sub( float16_t a, float16_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ union ui16_f16 uB;
+ uint_fast16_t uiB;
+#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 1)
+ float16_t (*magsFuncPtr)( uint_fast16_t, uint_fast16_t SOFTFLOAT_STATE_DECL_COMMA );
+#endif
+
+ uA.f = a;
+ uiA = uA.ui;
+ uB.f = b;
+ uiB = uB.ui;
+#if defined INLINE_LEVEL && (1 <= INLINE_LEVEL)
+ if ( signF16UI( uiA ^ uiB ) ) {
+ return softfloat_addMagsF16( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ } else {
+ return softfloat_subMagsF16( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ }
+#else
+ magsFuncPtr =
+ signF16UI( uiA ^ uiB ) ? softfloat_addMagsF16 : softfloat_subMagsF16;
+ return (*magsFuncPtr)( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+#endif
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_to_extF80.c b/src/libs/softfloat-3e/source/f16_to_extF80.c
new file mode 100644
index 00000000..ae83d1fd
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_to_extF80.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+extFloat80_t f16_to_extF80( float16_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ bool sign;
+ int_fast8_t exp;
+ uint_fast16_t frac;
+ struct commonNaN commonNaN;
+ struct uint128 uiZ;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+ struct exp8_sig16 normExpSig;
+ union { struct extFloat80M s; extFloat80_t f; } uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF16UI( uiA );
+ exp = expF16UI( uiA );
+ frac = fracF16UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x1F ) {
+ if ( frac ) {
+ softfloat_f16UIToCommonNaN( uiA, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToExtF80UI( &commonNaN );
+ uiZ64 = uiZ.v64;
+ uiZ0 = uiZ.v0;
+ } else {
+ uiZ64 = packToExtF80UI64( sign, 0x7FFF );
+ uiZ0 = UINT64_C( 0x8000000000000000 );
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! exp ) {
+ if ( ! frac ) {
+ uiZ64 = packToExtF80UI64( sign, 0 );
+ uiZ0 = 0;
+ goto uiZ;
+ }
+ normExpSig = softfloat_normSubnormalF16Sig( frac );
+ exp = normExpSig.exp;
+ frac = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ64 = packToExtF80UI64( sign, exp + 0x3FF0 );
+ uiZ0 = (uint_fast64_t) (frac | 0x0400)<<53;
+ uiZ:
+ uZ.s.signExp = uiZ64;
+ uZ.s.signif = uiZ0;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_to_extF80M.c b/src/libs/softfloat-3e/source/f16_to_extF80M.c
new file mode 100644
index 00000000..a96a254b
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_to_extF80M.c
@@ -0,0 +1,111 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void f16_to_extF80M( float16_t a, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ *zPtr = f16_to_extF80( a SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void f16_to_extF80M( float16_t a, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ struct extFloat80M *zSPtr;
+ union ui16_f16 uA;
+ uint16_t uiA;
+ bool sign;
+ int_fast8_t exp;
+ uint16_t frac;
+ struct commonNaN commonNaN;
+ uint_fast16_t uiZ64;
+ uint32_t uiZ32;
+ struct exp8_sig16 normExpSig;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zSPtr = (struct extFloat80M *) zPtr;
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF16UI( uiA );
+ exp = expF16UI( uiA );
+ frac = fracF16UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x1F ) {
+ if ( frac ) {
+ softfloat_f16UIToCommonNaN( uiA, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ softfloat_commonNaNToExtF80M( &commonNaN, zSPtr );
+ return;
+ }
+ uiZ64 = packToExtF80UI64( sign, 0x7FFF );
+ uiZ32 = 0x80000000;
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! exp ) {
+ if ( ! frac ) {
+ uiZ64 = packToExtF80UI64( sign, 0 );
+ uiZ32 = 0;
+ goto uiZ;
+ }
+ normExpSig = softfloat_normSubnormalF16Sig( frac );
+ exp = normExpSig.exp;
+ frac = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ64 = packToExtF80UI64( sign, exp + 0x3FF0 );
+ uiZ32 = 0x80000000 | (uint32_t) frac<<21;
+ uiZ:
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = (uint64_t) uiZ32<<32;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f16_to_f128.c b/src/libs/softfloat-3e/source/f16_to_f128.c
new file mode 100644
index 00000000..c3f23cd4
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_to_f128.c
@@ -0,0 +1,96 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float128_t f16_to_f128( float16_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ bool sign;
+ int_fast8_t exp;
+ uint_fast16_t frac;
+ struct commonNaN commonNaN;
+ struct uint128 uiZ;
+ struct exp8_sig16 normExpSig;
+ union ui128_f128 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF16UI( uiA );
+ exp = expF16UI( uiA );
+ frac = fracF16UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x1F ) {
+ if ( frac ) {
+ softfloat_f16UIToCommonNaN( uiA, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToF128UI( &commonNaN );
+ } else {
+ uiZ.v64 = packToF128UI64( sign, 0x7FFF, 0 );
+ uiZ.v0 = 0;
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! exp ) {
+ if ( ! frac ) {
+ uiZ.v64 = packToF128UI64( sign, 0, 0 );
+ uiZ.v0 = 0;
+ goto uiZ;
+ }
+ normExpSig = softfloat_normSubnormalF16Sig( frac );
+ exp = normExpSig.exp - 1;
+ frac = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ.v64 = packToF128UI64( sign, exp + 0x3FF0, (uint_fast64_t) frac<<38 );
+ uiZ.v0 = 0;
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_to_f128M.c b/src/libs/softfloat-3e/source/f16_to_f128M.c
new file mode 100644
index 00000000..6aed6050
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_to_f128M.c
@@ -0,0 +1,111 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void f16_to_f128M( float16_t a, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ *zPtr = f16_to_f128( a SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void f16_to_f128M( float16_t a, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ uint32_t *zWPtr;
+ union ui16_f16 uA;
+ uint16_t uiA;
+ bool sign;
+ int_fast8_t exp;
+ uint16_t frac;
+ struct commonNaN commonNaN;
+ uint32_t uiZ96;
+ struct exp8_sig16 normExpSig;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zWPtr = (uint32_t *) zPtr;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF16UI( uiA );
+ exp = expF16UI( uiA );
+ frac = fracF16UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x1F ) {
+ if ( frac ) {
+ softfloat_f16UIToCommonNaN( uiA, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ softfloat_commonNaNToF128M( &commonNaN, zWPtr );
+ return;
+ }
+ uiZ96 = packToF128UI96( sign, 0x7FFF, 0 );
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! exp ) {
+ if ( ! frac ) {
+ uiZ96 = packToF128UI96( sign, 0, 0 );
+ goto uiZ;
+ }
+ normExpSig = softfloat_normSubnormalF16Sig( frac );
+ exp = normExpSig.exp - 1;
+ frac = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ96 = packToF128UI96( sign, exp + 0x3FF0, (uint32_t) frac<<6 );
+ uiZ:
+ zWPtr[indexWord( 4, 3 )] = uiZ96;
+ zWPtr[indexWord( 4, 2 )] = 0;
+ zWPtr[indexWord( 4, 1 )] = 0;
+ zWPtr[indexWord( 4, 0 )] = 0;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f16_to_f32.c b/src/libs/softfloat-3e/source/f16_to_f32.c
new file mode 100644
index 00000000..da454b0d
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_to_f32.c
@@ -0,0 +1,93 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float32_t f16_to_f32( float16_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ bool sign;
+ int_fast8_t exp;
+ uint_fast16_t frac;
+ struct commonNaN commonNaN;
+ uint_fast32_t uiZ;
+ struct exp8_sig16 normExpSig;
+ union ui32_f32 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF16UI( uiA );
+ exp = expF16UI( uiA );
+ frac = fracF16UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x1F ) {
+ if ( frac ) {
+ softfloat_f16UIToCommonNaN( uiA, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToF32UI( &commonNaN );
+ } else {
+ uiZ = packToF32UI( sign, 0xFF, 0 );
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! exp ) {
+ if ( ! frac ) {
+ uiZ = packToF32UI( sign, 0, 0 );
+ goto uiZ;
+ }
+ normExpSig = softfloat_normSubnormalF16Sig( frac );
+ exp = normExpSig.exp - 1;
+ frac = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ = packToF32UI( sign, exp + 0x70, (uint_fast32_t) frac<<13 );
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_to_f64.c b/src/libs/softfloat-3e/source/f16_to_f64.c
new file mode 100644
index 00000000..11d62fe3
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_to_f64.c
@@ -0,0 +1,93 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float64_t f16_to_f64( float16_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ bool sign;
+ int_fast8_t exp;
+ uint_fast16_t frac;
+ struct commonNaN commonNaN;
+ uint_fast64_t uiZ;
+ struct exp8_sig16 normExpSig;
+ union ui64_f64 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF16UI( uiA );
+ exp = expF16UI( uiA );
+ frac = fracF16UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x1F ) {
+ if ( frac ) {
+ softfloat_f16UIToCommonNaN( uiA, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToF64UI( &commonNaN );
+ } else {
+ uiZ = packToF64UI( sign, 0x7FF, 0 );
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! exp ) {
+ if ( ! frac ) {
+ uiZ = packToF64UI( sign, 0, 0 );
+ goto uiZ;
+ }
+ normExpSig = softfloat_normSubnormalF16Sig( frac );
+ exp = normExpSig.exp - 1;
+ frac = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ = packToF64UI( sign, exp + 0x3F0, (uint_fast64_t) frac<<42 );
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_to_i32.c b/src/libs/softfloat-3e/source/f16_to_i32.c
new file mode 100644
index 00000000..e9cb4d45
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_to_i32.c
@@ -0,0 +1,87 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+int_fast32_t f16_to_i32( float16_t a, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ bool sign;
+ int_fast8_t exp;
+ uint_fast16_t frac;
+ int_fast32_t sig32;
+ int_fast8_t shiftDist;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF16UI( uiA );
+ exp = expF16UI( uiA );
+ frac = fracF16UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x1F ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ frac ? i32_fromNaN
+ : sign ? i32_fromNegOverflow : i32_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sig32 = frac;
+ if ( exp ) {
+ sig32 |= 0x0400;
+ shiftDist = exp - 0x19;
+ if ( 0 <= shiftDist ) {
+ sig32 <<= shiftDist;
+ return sign ? -sig32 : sig32;
+ }
+ shiftDist = exp - 0x0D;
+ if ( 0 < shiftDist ) sig32 <<= shiftDist;
+ }
+ return
+ softfloat_roundToI32(
+ sign, (uint_fast32_t) sig32, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_to_i32_r_minMag.c b/src/libs/softfloat-3e/source/f16_to_i32_r_minMag.c
new file mode 100644
index 00000000..1b096ea3
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_to_i32_r_minMag.c
@@ -0,0 +1,88 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+int_fast32_t f16_to_i32_r_minMag( float16_t a, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ int_fast8_t exp;
+ uint_fast16_t frac;
+ int_fast8_t shiftDist;
+ bool sign;
+ int_fast32_t alignedSig;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ exp = expF16UI( uiA );
+ frac = fracF16UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = exp - 0x0F;
+ if ( shiftDist < 0 ) {
+ if ( exact && (exp | frac) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return 0;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sign = signF16UI( uiA );
+ if ( exp == 0x1F ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x1F) && frac ? i32_fromNaN
+ : sign ? i32_fromNegOverflow : i32_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ alignedSig = (int_fast32_t) (frac | 0x0400)<<shiftDist;
+ if ( exact && (alignedSig & 0x3FF) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ alignedSig >>= 10;
+ return sign ? -alignedSig : alignedSig;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_to_i64.c b/src/libs/softfloat-3e/source/f16_to_i64.c
new file mode 100644
index 00000000..126bde77
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_to_i64.c
@@ -0,0 +1,87 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+int_fast64_t f16_to_i64( float16_t a, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ bool sign;
+ int_fast8_t exp;
+ uint_fast16_t frac;
+ int_fast32_t sig32;
+ int_fast8_t shiftDist;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF16UI( uiA );
+ exp = expF16UI( uiA );
+ frac = fracF16UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x1F ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ frac ? i64_fromNaN
+ : sign ? i64_fromNegOverflow : i64_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sig32 = frac;
+ if ( exp ) {
+ sig32 |= 0x0400;
+ shiftDist = exp - 0x19;
+ if ( 0 <= shiftDist ) {
+ sig32 <<= shiftDist;
+ return sign ? -sig32 : sig32;
+ }
+ shiftDist = exp - 0x0D;
+ if ( 0 < shiftDist ) sig32 <<= shiftDist;
+ }
+ return
+ softfloat_roundToI32(
+ sign, (uint_fast32_t) sig32, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_to_i64_r_minMag.c b/src/libs/softfloat-3e/source/f16_to_i64_r_minMag.c
new file mode 100644
index 00000000..b8fb201a
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_to_i64_r_minMag.c
@@ -0,0 +1,88 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+int_fast64_t f16_to_i64_r_minMag( float16_t a, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ int_fast8_t exp;
+ uint_fast16_t frac;
+ int_fast8_t shiftDist;
+ bool sign;
+ int_fast32_t alignedSig;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ exp = expF16UI( uiA );
+ frac = fracF16UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = exp - 0x0F;
+ if ( shiftDist < 0 ) {
+ if ( exact && (exp | frac) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return 0;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sign = signF16UI( uiA );
+ if ( exp == 0x1F ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x1F) && frac ? i64_fromNaN
+ : sign ? i64_fromNegOverflow : i64_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ alignedSig = (int_fast32_t) (frac | 0x0400)<<shiftDist;
+ if ( exact && (alignedSig & 0x3FF) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ alignedSig >>= 10;
+ return sign ? -alignedSig : alignedSig;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_to_ui32.c b/src/libs/softfloat-3e/source/f16_to_ui32.c
new file mode 100644
index 00000000..18565a83
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_to_ui32.c
@@ -0,0 +1,84 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+uint_fast32_t f16_to_ui32( float16_t a, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ bool sign;
+ int_fast8_t exp;
+ uint_fast16_t frac;
+ uint_fast32_t sig32;
+ int_fast8_t shiftDist;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF16UI( uiA );
+ exp = expF16UI( uiA );
+ frac = fracF16UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x1F ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ frac ? ui32_fromNaN
+ : sign ? ui32_fromNegOverflow : ui32_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sig32 = frac;
+ if ( exp ) {
+ sig32 |= 0x0400;
+ shiftDist = exp - 0x19;
+ if ( (0 <= shiftDist) && ! sign ) {
+ return sig32<<shiftDist;
+ }
+ shiftDist = exp - 0x0D;
+ if ( 0 < shiftDist ) sig32 <<= shiftDist;
+ }
+ return softfloat_roundToUI32( sign, sig32, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_to_ui32_r_minMag.c b/src/libs/softfloat-3e/source/f16_to_ui32_r_minMag.c
new file mode 100644
index 00000000..9ef39a43
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_to_ui32_r_minMag.c
@@ -0,0 +1,87 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+uint_fast32_t f16_to_ui32_r_minMag( float16_t a, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ int_fast8_t exp;
+ uint_fast16_t frac;
+ int_fast8_t shiftDist;
+ bool sign;
+ uint_fast32_t alignedSig;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ exp = expF16UI( uiA );
+ frac = fracF16UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = exp - 0x0F;
+ if ( shiftDist < 0 ) {
+ if ( exact && (exp | frac) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return 0;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sign = signF16UI( uiA );
+ if ( sign || (exp == 0x1F) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x1F) && frac ? ui32_fromNaN
+ : sign ? ui32_fromNegOverflow : ui32_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ alignedSig = (uint_fast32_t) (frac | 0x0400)<<shiftDist;
+ if ( exact && (alignedSig & 0x3FF) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return alignedSig>>10;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_to_ui64.c b/src/libs/softfloat-3e/source/f16_to_ui64.c
new file mode 100644
index 00000000..9b1c545c
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_to_ui64.c
@@ -0,0 +1,96 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+uint_fast64_t f16_to_ui64( float16_t a, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ bool sign;
+ int_fast8_t exp;
+ uint_fast16_t frac;
+ uint_fast32_t sig32;
+ int_fast8_t shiftDist;
+#ifndef SOFTFLOAT_FAST_INT64
+ uint32_t extSig[3];
+#endif
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF16UI( uiA );
+ exp = expF16UI( uiA );
+ frac = fracF16UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x1F ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ frac ? ui64_fromNaN
+ : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sig32 = frac;
+ if ( exp ) {
+ sig32 |= 0x0400;
+ shiftDist = exp - 0x19;
+ if ( (0 <= shiftDist) && ! sign ) {
+ return sig32<<shiftDist;
+ }
+ shiftDist = exp - 0x0D;
+ if ( 0 < shiftDist ) sig32 <<= shiftDist;
+ }
+#ifdef SOFTFLOAT_FAST_INT64
+ return
+ softfloat_roundToUI64(
+ sign, sig32>>12, (uint_fast64_t) sig32<<52, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+#else
+ extSig[indexWord( 3, 2 )] = 0;
+ extSig[indexWord( 3, 1 )] = sig32>>12;
+ extSig[indexWord( 3, 0 )] = sig32<<20;
+ return softfloat_roundMToUI64( sign, extSig, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA);
+#endif
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f16_to_ui64_r_minMag.c b/src/libs/softfloat-3e/source/f16_to_ui64_r_minMag.c
new file mode 100644
index 00000000..adbeca7e
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f16_to_ui64_r_minMag.c
@@ -0,0 +1,87 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+uint_fast64_t f16_to_ui64_r_minMag( float16_t a, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ int_fast8_t exp;
+ uint_fast16_t frac;
+ int_fast8_t shiftDist;
+ bool sign;
+ uint_fast32_t alignedSig;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ exp = expF16UI( uiA );
+ frac = fracF16UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = exp - 0x0F;
+ if ( shiftDist < 0 ) {
+ if ( exact && (exp | frac) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return 0;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sign = signF16UI( uiA );
+ if ( sign || (exp == 0x1F) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x1F) && frac ? ui64_fromNaN
+ : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ alignedSig = (uint_fast32_t) (frac | 0x0400)<<shiftDist;
+ if ( exact && (alignedSig & 0x3FF) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return alignedSig>>10;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_add.c b/src/libs/softfloat-3e/source/f32_add.c
new file mode 100644
index 00000000..4b2834d0
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_add.c
@@ -0,0 +1,70 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float32_t f32_add( float32_t a, float32_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ union ui32_f32 uB;
+ uint_fast32_t uiB;
+#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 1)
+ float32_t (*magsFuncPtr)( uint_fast32_t, uint_fast32_t SOFTFLOAT_STATE_DECL_COMMA );
+#endif
+
+ uA.f = a;
+ uiA = uA.ui;
+ uB.f = b;
+ uiB = uB.ui;
+#if defined INLINE_LEVEL && (1 <= INLINE_LEVEL)
+ if ( signF32UI( uiA ^ uiB ) ) {
+ return softfloat_subMagsF32( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ } else {
+ return softfloat_addMagsF32( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ }
+#else
+ magsFuncPtr =
+ signF32UI( uiA ^ uiB ) ? softfloat_subMagsF32 : softfloat_addMagsF32;
+ return (*magsFuncPtr)( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+#endif
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_div.c b/src/libs/softfloat-3e/source/f32_div.c
new file mode 100644
index 00000000..400f8088
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_div.c
@@ -0,0 +1,180 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float32_t f32_div( float32_t a, float32_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ bool signA;
+ int_fast16_t expA;
+ uint_fast32_t sigA;
+ union ui32_f32 uB;
+ uint_fast32_t uiB;
+ bool signB;
+ int_fast16_t expB;
+ uint_fast32_t sigB;
+ bool signZ;
+ struct exp16_sig32 normExpSig;
+ int_fast16_t expZ;
+#ifdef SOFTFLOAT_FAST_DIV64TO32
+ uint_fast64_t sig64A;
+ uint_fast32_t sigZ;
+#else
+ uint_fast32_t sigZ;
+ uint_fast64_t rem;
+#endif
+ uint_fast32_t uiZ;
+ union ui32_f32 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ signA = signF32UI( uiA );
+ expA = expF32UI( uiA );
+ sigA = fracF32UI( uiA );
+ uB.f = b;
+ uiB = uB.ui;
+ signB = signF32UI( uiB );
+ expB = expF32UI( uiB );
+ sigB = fracF32UI( uiB );
+ signZ = signA ^ signB;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0xFF ) {
+ if ( sigA ) goto propagateNaN;
+ if ( expB == 0xFF ) {
+ if ( sigB ) goto propagateNaN;
+ goto invalid;
+ }
+ goto infinity;
+ }
+ if ( expB == 0xFF ) {
+ if ( sigB ) goto propagateNaN;
+ goto zero;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expB ) {
+ if ( ! sigB ) {
+ if ( ! (expA | sigA) ) goto invalid;
+ softfloat_raiseFlags( softfloat_flag_infinite SOFTFLOAT_STATE_ARG_COMMA );
+ goto infinity;
+ }
+ normExpSig = softfloat_normSubnormalF32Sig( sigB );
+ expB = normExpSig.exp;
+ sigB = normExpSig.sig;
+ }
+ if ( ! expA ) {
+ if ( ! sigA ) goto zero;
+ normExpSig = softfloat_normSubnormalF32Sig( sigA );
+ expA = normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expZ = expA - expB + 0x7E;
+ sigA |= 0x00800000;
+ sigB |= 0x00800000;
+#ifdef SOFTFLOAT_FAST_DIV64TO32
+ if ( sigA < sigB ) {
+ --expZ;
+ sig64A = (uint_fast64_t) sigA<<31;
+ } else {
+ sig64A = (uint_fast64_t) sigA<<30;
+ }
+ sigZ = sig64A / sigB;
+ if ( ! (sigZ & 0x3F) ) sigZ |= ((uint_fast64_t) sigB * sigZ != sig64A);
+#else
+ if ( sigA < sigB ) {
+ --expZ;
+ sigA <<= 8;
+ } else {
+ sigA <<= 7;
+ }
+ sigB <<= 8;
+ sigZ = ((uint_fast64_t) sigA * softfloat_approxRecip32_1( sigB ))>>32;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sigZ += 2;
+ if ( (sigZ & 0x3F) < 2 ) {
+ sigZ &= ~3;
+#ifdef SOFTFLOAT_FAST_INT64
+ rem = ((uint_fast64_t) sigA<<31) - (uint_fast64_t) sigZ * sigB;
+#else
+ rem = ((uint_fast64_t) sigA<<32) - (uint_fast64_t) (sigZ<<1) * sigB;
+#endif
+ if ( rem & UINT64_C( 0x8000000000000000 ) ) {
+ sigZ -= 4;
+ } else {
+ if ( rem ) sigZ |= 1;
+ }
+ }
+#endif
+ return softfloat_roundPackToF32( signZ, expZ, sigZ SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN:
+ uiZ = softfloat_propagateNaNF32UI( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = defaultNaNF32UI;
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ infinity:
+ uiZ = packToF32UI( signZ, 0xFF, 0 );
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zero:
+ uiZ = packToF32UI( signZ, 0, 0 );
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_eq.c b/src/libs/softfloat-3e/source/f32_eq.c
new file mode 100644
index 00000000..ead22881
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_eq.c
@@ -0,0 +1,66 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool f32_eq( float32_t a, float32_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ union ui32_f32 uB;
+ uint_fast32_t uiB;
+
+ uA.f = a;
+ uiA = uA.ui;
+ uB.f = b;
+ uiB = uB.ui;
+ if ( isNaNF32UI( uiA ) || isNaNF32UI( uiB ) ) {
+ if (
+ softfloat_isSigNaNF32UI( uiA ) || softfloat_isSigNaNF32UI( uiB )
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ return false;
+ }
+ return (uiA == uiB) || ! (uint32_t) ((uiA | uiB)<<1);
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_eq_signaling.c b/src/libs/softfloat-3e/source/f32_eq_signaling.c
new file mode 100644
index 00000000..d5920c73
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_eq_signaling.c
@@ -0,0 +1,61 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+bool f32_eq_signaling( float32_t a, float32_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ union ui32_f32 uB;
+ uint_fast32_t uiB;
+
+ uA.f = a;
+ uiA = uA.ui;
+ uB.f = b;
+ uiB = uB.ui;
+ if ( isNaNF32UI( uiA ) || isNaNF32UI( uiB ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return false;
+ }
+ return (uiA == uiB) || ! (uint32_t) ((uiA | uiB)<<1);
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_isSignalingNaN.c b/src/libs/softfloat-3e/source/f32_isSignalingNaN.c
new file mode 100644
index 00000000..d98cc9b2
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_isSignalingNaN.c
@@ -0,0 +1,51 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool f32_isSignalingNaN( float32_t a )
+{
+ union ui32_f32 uA;
+
+ uA.f = a;
+ return softfloat_isSigNaNF32UI( uA.ui );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_le.c b/src/libs/softfloat-3e/source/f32_le.c
new file mode 100644
index 00000000..ffcbd19d
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_le.c
@@ -0,0 +1,66 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+bool f32_le( float32_t a, float32_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ union ui32_f32 uB;
+ uint_fast32_t uiB;
+ bool signA, signB;
+
+ uA.f = a;
+ uiA = uA.ui;
+ uB.f = b;
+ uiB = uB.ui;
+ if ( isNaNF32UI( uiA ) || isNaNF32UI( uiB ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return false;
+ }
+ signA = signF32UI( uiA );
+ signB = signF32UI( uiB );
+ return
+ (signA != signB) ? signA || ! (uint32_t) ((uiA | uiB)<<1)
+ : (uiA == uiB) || (signA ^ (uiA < uiB));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_le_quiet.c b/src/libs/softfloat-3e/source/f32_le_quiet.c
new file mode 100644
index 00000000..d61444a1
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_le_quiet.c
@@ -0,0 +1,71 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool f32_le_quiet( float32_t a, float32_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ union ui32_f32 uB;
+ uint_fast32_t uiB;
+ bool signA, signB;
+
+ uA.f = a;
+ uiA = uA.ui;
+ uB.f = b;
+ uiB = uB.ui;
+ if ( isNaNF32UI( uiA ) || isNaNF32UI( uiB ) ) {
+ if (
+ softfloat_isSigNaNF32UI( uiA ) || softfloat_isSigNaNF32UI( uiB )
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ return false;
+ }
+ signA = signF32UI( uiA );
+ signB = signF32UI( uiB );
+ return
+ (signA != signB) ? signA || ! (uint32_t) ((uiA | uiB)<<1)
+ : (uiA == uiB) || (signA ^ (uiA < uiB));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_lt.c b/src/libs/softfloat-3e/source/f32_lt.c
new file mode 100644
index 00000000..7ea44a9e
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_lt.c
@@ -0,0 +1,66 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+bool f32_lt( float32_t a, float32_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ union ui32_f32 uB;
+ uint_fast32_t uiB;
+ bool signA, signB;
+
+ uA.f = a;
+ uiA = uA.ui;
+ uB.f = b;
+ uiB = uB.ui;
+ if ( isNaNF32UI( uiA ) || isNaNF32UI( uiB ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return false;
+ }
+ signA = signF32UI( uiA );
+ signB = signF32UI( uiB );
+ return
+ (signA != signB) ? signA && ((uint32_t) ((uiA | uiB)<<1) != 0)
+ : (uiA != uiB) && (signA ^ (uiA < uiB));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_lt_quiet.c b/src/libs/softfloat-3e/source/f32_lt_quiet.c
new file mode 100644
index 00000000..21016acb
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_lt_quiet.c
@@ -0,0 +1,71 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool f32_lt_quiet( float32_t a, float32_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ union ui32_f32 uB;
+ uint_fast32_t uiB;
+ bool signA, signB;
+
+ uA.f = a;
+ uiA = uA.ui;
+ uB.f = b;
+ uiB = uB.ui;
+ if ( isNaNF32UI( uiA ) || isNaNF32UI( uiB ) ) {
+ if (
+ softfloat_isSigNaNF32UI( uiA ) || softfloat_isSigNaNF32UI( uiB )
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ return false;
+ }
+ signA = signF32UI( uiA );
+ signB = signF32UI( uiB );
+ return
+ (signA != signB) ? signA && ((uint32_t) ((uiA | uiB)<<1) != 0)
+ : (uiA != uiB) && (signA ^ (uiA < uiB));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_mul.c b/src/libs/softfloat-3e/source/f32_mul.c
new file mode 100644
index 00000000..43565340
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_mul.c
@@ -0,0 +1,137 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float32_t f32_mul( float32_t a, float32_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ bool signA;
+ int_fast16_t expA;
+ uint_fast32_t sigA;
+ union ui32_f32 uB;
+ uint_fast32_t uiB;
+ bool signB;
+ int_fast16_t expB;
+ uint_fast32_t sigB;
+ bool signZ;
+ uint_fast32_t magBits;
+ struct exp16_sig32 normExpSig;
+ int_fast16_t expZ;
+ uint_fast32_t sigZ, uiZ;
+ union ui32_f32 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ signA = signF32UI( uiA );
+ expA = expF32UI( uiA );
+ sigA = fracF32UI( uiA );
+ uB.f = b;
+ uiB = uB.ui;
+ signB = signF32UI( uiB );
+ expB = expF32UI( uiB );
+ sigB = fracF32UI( uiB );
+ signZ = signA ^ signB;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0xFF ) {
+ if ( sigA || ((expB == 0xFF) && sigB) ) goto propagateNaN;
+ magBits = expB | sigB;
+ goto infArg;
+ }
+ if ( expB == 0xFF ) {
+ if ( sigB ) goto propagateNaN;
+ magBits = expA | sigA;
+ goto infArg;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expA ) {
+ if ( ! sigA ) goto zero;
+ normExpSig = softfloat_normSubnormalF32Sig( sigA );
+ expA = normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ if ( ! expB ) {
+ if ( ! sigB ) goto zero;
+ normExpSig = softfloat_normSubnormalF32Sig( sigB );
+ expB = normExpSig.exp;
+ sigB = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expZ = expA + expB - 0x7F;
+ sigA = (sigA | 0x00800000)<<7;
+ sigB = (sigB | 0x00800000)<<8;
+ sigZ = softfloat_shortShiftRightJam64( (uint_fast64_t) sigA * sigB, 32 );
+ if ( sigZ < 0x40000000 ) {
+ --expZ;
+ sigZ <<= 1;
+ }
+ return softfloat_roundPackToF32( signZ, expZ, sigZ SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN:
+ uiZ = softfloat_propagateNaNF32UI( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ infArg:
+ if ( ! magBits ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = defaultNaNF32UI;
+ } else {
+ uiZ = packToF32UI( signZ, 0xFF, 0 );
+ }
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zero:
+ uiZ = packToF32UI( signZ, 0, 0 );
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_mulAdd.c b/src/libs/softfloat-3e/source/f32_mulAdd.c
new file mode 100644
index 00000000..c45f5559
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_mulAdd.c
@@ -0,0 +1,60 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float32_t f32_mulAdd( float32_t a, float32_t b, float32_t c SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ union ui32_f32 uB;
+ uint_fast32_t uiB;
+ union ui32_f32 uC;
+ uint_fast32_t uiC;
+
+ uA.f = a;
+ uiA = uA.ui;
+ uB.f = b;
+ uiB = uB.ui;
+ uC.f = c;
+ uiC = uC.ui;
+ return softfloat_mulAddF32( uiA, uiB, uiC, 0 SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_rem.c b/src/libs/softfloat-3e/source/f32_rem.c
new file mode 100644
index 00000000..2cd8d0d2
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_rem.c
@@ -0,0 +1,168 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float32_t f32_rem( float32_t a, float32_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ bool signA;
+ int_fast16_t expA;
+ uint_fast32_t sigA;
+ union ui32_f32 uB;
+ uint_fast32_t uiB;
+ int_fast16_t expB;
+ uint_fast32_t sigB;
+ struct exp16_sig32 normExpSig;
+ uint32_t rem;
+ int_fast16_t expDiff;
+ uint32_t q, recip32, altRem, meanRem;
+ bool signRem;
+ uint_fast32_t uiZ;
+ union ui32_f32 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ signA = signF32UI( uiA );
+ expA = expF32UI( uiA );
+ sigA = fracF32UI( uiA );
+ uB.f = b;
+ uiB = uB.ui;
+ expB = expF32UI( uiB );
+ sigB = fracF32UI( uiB );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0xFF ) {
+ if ( sigA || ((expB == 0xFF) && sigB) ) goto propagateNaN;
+ goto invalid;
+ }
+ if ( expB == 0xFF ) {
+ if ( sigB ) goto propagateNaN;
+ return a;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expB ) {
+ if ( ! sigB ) goto invalid;
+ normExpSig = softfloat_normSubnormalF32Sig( sigB );
+ expB = normExpSig.exp;
+ sigB = normExpSig.sig;
+ }
+ if ( ! expA ) {
+ if ( ! sigA ) return a;
+ normExpSig = softfloat_normSubnormalF32Sig( sigA );
+ expA = normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ rem = sigA | 0x00800000;
+ sigB |= 0x00800000;
+ expDiff = expA - expB;
+ if ( expDiff < 1 ) {
+ if ( expDiff < -1 ) return a;
+ sigB <<= 6;
+ if ( expDiff ) {
+ rem <<= 5;
+ q = 0;
+ } else {
+ rem <<= 6;
+ q = (sigB <= rem);
+ if ( q ) rem -= sigB;
+ }
+ } else {
+ recip32 = softfloat_approxRecip32_1( sigB<<8 );
+ /*--------------------------------------------------------------------
+ | Changing the shift of `rem' here requires also changing the initial
+ | subtraction from `expDiff'.
+ *--------------------------------------------------------------------*/
+ rem <<= 7;
+ expDiff -= 31;
+ /*--------------------------------------------------------------------
+ | The scale of `sigB' affects how many bits are obtained during each
+ | cycle of the loop. Currently this is 29 bits per loop iteration,
+ | which is believed to be the maximum possible.
+ *--------------------------------------------------------------------*/
+ sigB <<= 6;
+ for (;;) {
+ q = (rem * (uint_fast64_t) recip32)>>32;
+ if ( expDiff < 0 ) break;
+ rem = -(q * (uint32_t) sigB);
+ expDiff -= 29;
+ }
+ /*--------------------------------------------------------------------
+ | (`expDiff' cannot be less than -30 here.)
+ *--------------------------------------------------------------------*/
+ q >>= ~expDiff & 31;
+ rem = (rem<<(expDiff + 30)) - q * (uint32_t) sigB;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ do {
+ altRem = rem;
+ ++q;
+ rem -= sigB;
+ } while ( ! (rem & 0x80000000) );
+ meanRem = rem + altRem;
+ if ( (meanRem & 0x80000000) || (! meanRem && (q & 1)) ) rem = altRem;
+ signRem = signA;
+ if ( 0x80000000 <= rem ) {
+ signRem = ! signRem;
+ rem = -rem;
+ }
+ return softfloat_normRoundPackToF32( signRem, expB, rem SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN:
+ uiZ = softfloat_propagateNaNF32UI( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = defaultNaNF32UI;
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_roundToInt.c b/src/libs/softfloat-3e/source/f32_roundToInt.c
new file mode 100644
index 00000000..70b6d239
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_roundToInt.c
@@ -0,0 +1,122 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+#include <iprt/cdefs.h> /* VBox: for RT_FALL_THROUGH */
+
+float32_t f32_roundToInt( float32_t a, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ int_fast16_t exp;
+ uint_fast32_t uiZ, lastBitMask, roundBitsMask;
+ union ui32_f32 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ exp = expF32UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp <= 0x7E ) {
+ if ( !(uint32_t) (uiA<<1) ) return a;
+ if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+ uiZ = uiA & packToF32UI( 1, 0, 0 );
+ switch ( roundingMode ) {
+ case softfloat_round_near_even:
+ if ( !fracF32UI( uiA ) ) break;
+ RT_FALL_THROUGH(); /* VBox */
+ case softfloat_round_near_maxMag:
+ if ( exp == 0x7E ) uiZ |= packToF32UI( 0, 0x7F, 0 );
+ break;
+ case softfloat_round_min:
+ if ( uiZ ) uiZ = packToF32UI( 1, 0x7F, 0 );
+ break;
+ case softfloat_round_max:
+ if ( !uiZ ) uiZ = packToF32UI( 0, 0x7F, 0 );
+ break;
+#ifdef SOFTFLOAT_ROUND_ODD
+ case softfloat_round_odd:
+ uiZ |= packToF32UI( 0, 0x7F, 0 );
+ break;
+#endif
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( 0x96 <= exp ) {
+ if ( (exp == 0xFF) && fracF32UI( uiA ) ) {
+ uiZ = softfloat_propagateNaNF32UI( uiA, 0 SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ }
+ return a;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ = uiA;
+ lastBitMask = (uint_fast32_t) 1<<(0x96 - exp);
+ roundBitsMask = lastBitMask - 1;
+ if ( roundingMode == softfloat_round_near_maxMag ) {
+ uiZ += lastBitMask>>1;
+ } else if ( roundingMode == softfloat_round_near_even ) {
+ uiZ += lastBitMask>>1;
+ if ( !(uiZ & roundBitsMask) ) uiZ &= ~lastBitMask;
+ } else if (
+ roundingMode
+ == (signF32UI( uiZ ) ? softfloat_round_min : softfloat_round_max)
+ ) {
+ uiZ += roundBitsMask;
+ }
+ uiZ &= ~roundBitsMask;
+ if ( uiZ != uiA ) {
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) uiZ |= lastBitMask;
+#endif
+ if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_sqrt.c b/src/libs/softfloat-3e/source/f32_sqrt.c
new file mode 100644
index 00000000..ff5e169a
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_sqrt.c
@@ -0,0 +1,121 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float32_t f32_sqrt( float32_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ bool signA;
+ int_fast16_t expA;
+ uint_fast32_t sigA, uiZ;
+ struct exp16_sig32 normExpSig;
+ int_fast16_t expZ;
+ uint_fast32_t sigZ, shiftedSigZ;
+ uint32_t negRem;
+ union ui32_f32 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ signA = signF32UI( uiA );
+ expA = expF32UI( uiA );
+ sigA = fracF32UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0xFF ) {
+ if ( sigA ) {
+ uiZ = softfloat_propagateNaNF32UI( uiA, 0 SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ }
+ if ( ! signA ) return a;
+ goto invalid;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( signA ) {
+ if ( ! (expA | sigA) ) return a;
+ goto invalid;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expA ) {
+ if ( ! sigA ) return a;
+ normExpSig = softfloat_normSubnormalF32Sig( sigA );
+ expA = normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expZ = ((expA - 0x7F)>>1) + 0x7E;
+ expA &= 1;
+ sigA = (sigA | 0x00800000)<<8;
+ sigZ =
+ ((uint_fast64_t) sigA * softfloat_approxRecipSqrt32_1( expA, sigA ))
+ >>32;
+ if ( expA ) sigZ >>= 1;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sigZ += 2;
+ if ( (sigZ & 0x3F) < 2 ) {
+ shiftedSigZ = sigZ>>2;
+ negRem = shiftedSigZ * shiftedSigZ;
+ sigZ &= ~3;
+ if ( negRem & 0x80000000 ) {
+ sigZ |= 1;
+ } else {
+ if ( negRem ) --sigZ;
+ }
+ }
+ return softfloat_roundPackToF32( 0, expZ, sigZ SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = defaultNaNF32UI;
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_sub.c b/src/libs/softfloat-3e/source/f32_sub.c
new file mode 100644
index 00000000..cf8374ee
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_sub.c
@@ -0,0 +1,70 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float32_t f32_sub( float32_t a, float32_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ union ui32_f32 uB;
+ uint_fast32_t uiB;
+#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 1)
+ float32_t (*magsFuncPtr)( uint_fast32_t, uint_fast32_t SOFTFLOAT_STATE_DECL_COMMA );
+#endif
+
+ uA.f = a;
+ uiA = uA.ui;
+ uB.f = b;
+ uiB = uB.ui;
+#if defined INLINE_LEVEL && (1 <= INLINE_LEVEL)
+ if ( signF32UI( uiA ^ uiB ) ) {
+ return softfloat_addMagsF32( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ } else {
+ return softfloat_subMagsF32( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ }
+#else
+ magsFuncPtr =
+ signF32UI( uiA ^ uiB ) ? softfloat_addMagsF32 : softfloat_subMagsF32;
+ return (*magsFuncPtr)( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+#endif
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_to_extF80.c b/src/libs/softfloat-3e/source/f32_to_extF80.c
new file mode 100644
index 00000000..1d46e62a
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_to_extF80.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+extFloat80_t f32_to_extF80( float32_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ bool sign;
+ int_fast16_t exp;
+ uint_fast32_t frac;
+ struct commonNaN commonNaN;
+ struct uint128 uiZ;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+ struct exp16_sig32 normExpSig;
+ union { struct extFloat80M s; extFloat80_t f; } uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF32UI( uiA );
+ exp = expF32UI( uiA );
+ frac = fracF32UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0xFF ) {
+ if ( frac ) {
+ softfloat_f32UIToCommonNaN( uiA, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToExtF80UI( &commonNaN );
+ uiZ64 = uiZ.v64;
+ uiZ0 = uiZ.v0;
+ } else {
+ uiZ64 = packToExtF80UI64( sign, 0x7FFF );
+ uiZ0 = UINT64_C( 0x8000000000000000 );
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! exp ) {
+ if ( ! frac ) {
+ uiZ64 = packToExtF80UI64( sign, 0 );
+ uiZ0 = 0;
+ goto uiZ;
+ }
+ normExpSig = softfloat_normSubnormalF32Sig( frac );
+ exp = normExpSig.exp;
+ frac = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ64 = packToExtF80UI64( sign, exp + 0x3F80 );
+ uiZ0 = (uint_fast64_t) (frac | 0x00800000)<<40;
+ uiZ:
+ uZ.s.signExp = uiZ64;
+ uZ.s.signif = uiZ0;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_to_extF80M.c b/src/libs/softfloat-3e/source/f32_to_extF80M.c
new file mode 100644
index 00000000..f7fe426b
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_to_extF80M.c
@@ -0,0 +1,111 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void f32_to_extF80M( float32_t a, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ *zPtr = f32_to_extF80( a SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void f32_to_extF80M( float32_t a, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ struct extFloat80M *zSPtr;
+ union ui32_f32 uA;
+ uint32_t uiA;
+ bool sign;
+ int_fast16_t exp;
+ uint32_t frac;
+ struct commonNaN commonNaN;
+ uint_fast16_t uiZ64;
+ uint32_t uiZ32;
+ struct exp16_sig32 normExpSig;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zSPtr = (struct extFloat80M *) zPtr;
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF32UI( uiA );
+ exp = expF32UI( uiA );
+ frac = fracF32UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0xFF ) {
+ if ( frac ) {
+ softfloat_f32UIToCommonNaN( uiA, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ softfloat_commonNaNToExtF80M( &commonNaN, zSPtr );
+ return;
+ }
+ uiZ64 = packToExtF80UI64( sign, 0x7FFF );
+ uiZ32 = 0x80000000;
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! exp ) {
+ if ( ! frac ) {
+ uiZ64 = packToExtF80UI64( sign, 0 );
+ uiZ32 = 0;
+ goto uiZ;
+ }
+ normExpSig = softfloat_normSubnormalF32Sig( frac );
+ exp = normExpSig.exp;
+ frac = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ64 = packToExtF80UI64( sign, exp + 0x3F80 );
+ uiZ32 = 0x80000000 | (uint32_t) frac<<8;
+ uiZ:
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = (uint64_t) uiZ32<<32;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f32_to_f128.c b/src/libs/softfloat-3e/source/f32_to_f128.c
new file mode 100644
index 00000000..78c37f18
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_to_f128.c
@@ -0,0 +1,96 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float128_t f32_to_f128( float32_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ bool sign;
+ int_fast16_t exp;
+ uint_fast32_t frac;
+ struct commonNaN commonNaN;
+ struct uint128 uiZ;
+ struct exp16_sig32 normExpSig;
+ union ui128_f128 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF32UI( uiA );
+ exp = expF32UI( uiA );
+ frac = fracF32UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0xFF ) {
+ if ( frac ) {
+ softfloat_f32UIToCommonNaN( uiA, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToF128UI( &commonNaN );
+ } else {
+ uiZ.v64 = packToF128UI64( sign, 0x7FFF, 0 );
+ uiZ.v0 = 0;
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! exp ) {
+ if ( ! frac ) {
+ uiZ.v64 = packToF128UI64( sign, 0, 0 );
+ uiZ.v0 = 0;
+ goto uiZ;
+ }
+ normExpSig = softfloat_normSubnormalF32Sig( frac );
+ exp = normExpSig.exp - 1;
+ frac = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ.v64 = packToF128UI64( sign, exp + 0x3F80, (uint_fast64_t) frac<<25 );
+ uiZ.v0 = 0;
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_to_f128M.c b/src/libs/softfloat-3e/source/f32_to_f128M.c
new file mode 100644
index 00000000..1c73ae97
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_to_f128M.c
@@ -0,0 +1,115 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void f32_to_f128M( float32_t a, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ *zPtr = f32_to_f128( a SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void f32_to_f128M( float32_t a, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ uint32_t *zWPtr;
+ union ui32_f32 uA;
+ uint32_t uiA;
+ bool sign;
+ int_fast16_t exp;
+ uint32_t frac, uiZ64;
+ struct commonNaN commonNaN;
+ uint32_t uiZ96;
+ struct exp16_sig32 normExpSig;
+ uint64_t frac64;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zWPtr = (uint32_t *) zPtr;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF32UI( uiA );
+ exp = expF32UI( uiA );
+ frac = fracF32UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ64 = 0;
+ if ( exp == 0xFF ) {
+ if ( frac ) {
+ softfloat_f32UIToCommonNaN( uiA, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ softfloat_commonNaNToF128M( &commonNaN, zWPtr );
+ return;
+ }
+ uiZ96 = packToF128UI96( sign, 0x7FFF, 0 );
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! exp ) {
+ if ( ! frac ) {
+ uiZ96 = packToF128UI96( sign, 0, 0 );
+ goto uiZ;
+ }
+ normExpSig = softfloat_normSubnormalF32Sig( frac );
+ exp = normExpSig.exp - 1;
+ frac = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ frac64 = (uint64_t) frac<<25;
+ uiZ96 = packToF128UI96( sign, exp + 0x3F80, frac64>>32 );
+ uiZ64 = frac64;
+ uiZ:
+ zWPtr[indexWord( 4, 3 )] = uiZ96;
+ zWPtr[indexWord( 4, 2 )] = uiZ64;
+ zWPtr[indexWord( 4, 1 )] = 0;
+ zWPtr[indexWord( 4, 0 )] = 0;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f32_to_f16.c b/src/libs/softfloat-3e/source/f32_to_f16.c
new file mode 100644
index 00000000..b140ed38
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_to_f16.c
@@ -0,0 +1,88 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float16_t f32_to_f16( float32_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ bool sign;
+ int_fast16_t exp;
+ uint_fast32_t frac;
+ struct commonNaN commonNaN;
+ uint_fast16_t uiZ, frac16;
+ union ui16_f16 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF32UI( uiA );
+ exp = expF32UI( uiA );
+ frac = fracF32UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0xFF ) {
+ if ( frac ) {
+ softfloat_f32UIToCommonNaN( uiA, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToF16UI( &commonNaN );
+ } else {
+ uiZ = packToF16UI( sign, 0x1F, 0 );
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ frac16 = frac>>9 | ((frac & 0x1FF) != 0);
+ if ( ! (exp | frac16) ) {
+ uiZ = packToF16UI( sign, 0, 0 );
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ return softfloat_roundPackToF16( sign, exp - 0x71, frac16 | 0x4000 SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_to_f64.c b/src/libs/softfloat-3e/source/f32_to_f64.c
new file mode 100644
index 00000000..0832354f
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_to_f64.c
@@ -0,0 +1,93 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float64_t f32_to_f64( float32_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ bool sign;
+ int_fast16_t exp;
+ uint_fast32_t frac;
+ struct commonNaN commonNaN;
+ uint_fast64_t uiZ;
+ struct exp16_sig32 normExpSig;
+ union ui64_f64 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF32UI( uiA );
+ exp = expF32UI( uiA );
+ frac = fracF32UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0xFF ) {
+ if ( frac ) {
+ softfloat_f32UIToCommonNaN( uiA, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToF64UI( &commonNaN );
+ } else {
+ uiZ = packToF64UI( sign, 0x7FF, 0 );
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! exp ) {
+ if ( ! frac ) {
+ uiZ = packToF64UI( sign, 0, 0 );
+ goto uiZ;
+ }
+ normExpSig = softfloat_normSubnormalF32Sig( frac );
+ exp = normExpSig.exp - 1;
+ frac = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ = packToF64UI( sign, exp + 0x380, (uint_fast64_t) frac<<29 );
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_to_i32.c b/src/libs/softfloat-3e/source/f32_to_i32.c
new file mode 100644
index 00000000..a23ba19e
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_to_i32.c
@@ -0,0 +1,84 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+int_fast32_t f32_to_i32( float32_t a, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ bool sign;
+ int_fast16_t exp;
+ uint_fast32_t sig;
+ uint_fast64_t sig64;
+ int_fast16_t shiftDist;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF32UI( uiA );
+ exp = expF32UI( uiA );
+ sig = fracF32UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#if (i32_fromNaN != i32_fromPosOverflow) || (i32_fromNaN != i32_fromNegOverflow)
+ if ( (exp == 0xFF) && sig ) {
+#if (i32_fromNaN == i32_fromPosOverflow)
+ sign = 0;
+#elif (i32_fromNaN == i32_fromNegOverflow)
+ sign = 1;
+#else
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return i32_fromNaN;
+#endif
+ }
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp ) sig |= 0x00800000;
+ sig64 = (uint_fast64_t) sig<<32;
+ shiftDist = 0xAA - exp;
+ if ( 0 < shiftDist ) sig64 = softfloat_shiftRightJam64( sig64, shiftDist );
+ return softfloat_roundToI32( sign, sig64, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_to_i32_r_minMag.c b/src/libs/softfloat-3e/source/f32_to_i32_r_minMag.c
new file mode 100644
index 00000000..bfdaf2cb
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_to_i32_r_minMag.c
@@ -0,0 +1,89 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+int_fast32_t f32_to_i32_r_minMag( float32_t a, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ int_fast16_t exp;
+ uint_fast32_t sig;
+ int_fast16_t shiftDist;
+ bool sign;
+ int_fast32_t absZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ exp = expF32UI( uiA );
+ sig = fracF32UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x9E - exp;
+ if ( 32 <= shiftDist ) {
+ if ( exact && (exp | sig) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return 0;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sign = signF32UI( uiA );
+ if ( shiftDist <= 0 ) {
+ if ( uiA == packToF32UI( 1, 0x9E, 0 ) ) return -0x7FFFFFFF - 1;
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0xFF) && sig ? i32_fromNaN
+ : sign ? i32_fromNegOverflow : i32_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sig = (sig | 0x00800000)<<8;
+ absZ = sig>>shiftDist;
+ if ( exact && ((uint_fast32_t) absZ<<shiftDist != sig) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return sign ? -absZ : absZ;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_to_i64.c b/src/libs/softfloat-3e/source/f32_to_i64.c
new file mode 100644
index 00000000..bde50c00
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_to_i64.c
@@ -0,0 +1,96 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+int_fast64_t f32_to_i64( float32_t a, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ bool sign;
+ int_fast16_t exp;
+ uint_fast32_t sig;
+ int_fast16_t shiftDist;
+#ifdef SOFTFLOAT_FAST_INT64
+ uint_fast64_t sig64, extra;
+ struct uint64_extra sig64Extra;
+#else
+ uint32_t extSig[3];
+#endif
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF32UI( uiA );
+ exp = expF32UI( uiA );
+ sig = fracF32UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0xBE - exp;
+ if ( shiftDist < 0 ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0xFF) && sig ? i64_fromNaN
+ : sign ? i64_fromNegOverflow : i64_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp ) sig |= 0x00800000;
+#ifdef SOFTFLOAT_FAST_INT64
+ sig64 = (uint_fast64_t) sig<<40;
+ extra = 0;
+ if ( shiftDist ) {
+ sig64Extra = softfloat_shiftRightJam64Extra( sig64, 0, shiftDist );
+ sig64 = sig64Extra.v;
+ extra = sig64Extra.extra;
+ }
+ return softfloat_roundToI64( sign, sig64, extra, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+#else
+ extSig[indexWord( 3, 2 )] = sig<<8;
+ extSig[indexWord( 3, 1 )] = 0;
+ extSig[indexWord( 3, 0 )] = 0;
+ if ( shiftDist ) softfloat_shiftRightJam96M( extSig, shiftDist, extSig );
+ return softfloat_roundMToI64( sign, extSig, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+#endif
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_to_i64_r_minMag.c b/src/libs/softfloat-3e/source/f32_to_i64_r_minMag.c
new file mode 100644
index 00000000..cf3d23f2
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_to_i64_r_minMag.c
@@ -0,0 +1,94 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+int_fast64_t f32_to_i64_r_minMag( float32_t a, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ int_fast16_t exp;
+ uint_fast32_t sig;
+ int_fast16_t shiftDist;
+ bool sign;
+ uint_fast64_t sig64;
+ int_fast64_t absZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ exp = expF32UI( uiA );
+ sig = fracF32UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0xBE - exp;
+ if ( 64 <= shiftDist ) {
+ if ( exact && (exp | sig) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return 0;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sign = signF32UI( uiA );
+ if ( shiftDist <= 0 ) {
+ if ( uiA == packToF32UI( 1, 0xBE, 0 ) ) {
+ return -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1;
+ }
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0xFF) && sig ? i64_fromNaN
+ : sign ? i64_fromNegOverflow : i64_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sig |= 0x00800000;
+ sig64 = (uint_fast64_t) sig<<40;
+ absZ = sig64>>shiftDist;
+ shiftDist = 40 - shiftDist;
+ if ( exact && (shiftDist < 0) && (uint32_t) (sig<<(shiftDist & 31)) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return sign ? -absZ : absZ;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_to_ui32.c b/src/libs/softfloat-3e/source/f32_to_ui32.c
new file mode 100644
index 00000000..6640099e
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_to_ui32.c
@@ -0,0 +1,84 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+uint_fast32_t f32_to_ui32( float32_t a, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ bool sign;
+ int_fast16_t exp;
+ uint_fast32_t sig;
+ uint_fast64_t sig64;
+ int_fast16_t shiftDist;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF32UI( uiA );
+ exp = expF32UI( uiA );
+ sig = fracF32UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#if (ui32_fromNaN != ui32_fromPosOverflow) || (ui32_fromNaN != ui32_fromNegOverflow)
+ if ( (exp == 0xFF) && sig ) {
+#if (ui32_fromNaN == ui32_fromPosOverflow)
+ sign = 0;
+#elif (ui32_fromNaN == ui32_fromNegOverflow)
+ sign = 1;
+#else
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return ui32_fromNaN;
+#endif
+ }
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp ) sig |= 0x00800000;
+ sig64 = (uint_fast64_t) sig<<32;
+ shiftDist = 0xAA - exp;
+ if ( 0 < shiftDist ) sig64 = softfloat_shiftRightJam64( sig64, shiftDist );
+ return softfloat_roundToUI32( sign, sig64, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_to_ui32_r_minMag.c b/src/libs/softfloat-3e/source/f32_to_ui32_r_minMag.c
new file mode 100644
index 00000000..c523a112
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_to_ui32_r_minMag.c
@@ -0,0 +1,88 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+uint_fast32_t f32_to_ui32_r_minMag( float32_t a, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ int_fast16_t exp;
+ uint_fast32_t sig;
+ int_fast16_t shiftDist;
+ bool sign;
+ uint_fast32_t z;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ exp = expF32UI( uiA );
+ sig = fracF32UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x9E - exp;
+ if ( 32 <= shiftDist ) {
+ if ( exact && (exp | sig) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return 0;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sign = signF32UI( uiA );
+ if ( sign || (shiftDist < 0) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0xFF) && sig ? ui32_fromNaN
+ : sign ? ui32_fromNegOverflow : ui32_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sig = (sig | 0x00800000)<<8;
+ z = sig>>shiftDist;
+ if ( exact && (z<<shiftDist != sig) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return z;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_to_ui64.c b/src/libs/softfloat-3e/source/f32_to_ui64.c
new file mode 100644
index 00000000..aa3e458d
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_to_ui64.c
@@ -0,0 +1,96 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+uint_fast64_t f32_to_ui64( float32_t a, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ bool sign;
+ int_fast16_t exp;
+ uint_fast32_t sig;
+ int_fast16_t shiftDist;
+#ifdef SOFTFLOAT_FAST_INT64
+ uint_fast64_t sig64, extra;
+ struct uint64_extra sig64Extra;
+#else
+ uint32_t extSig[3];
+#endif
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF32UI( uiA );
+ exp = expF32UI( uiA );
+ sig = fracF32UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0xBE - exp;
+ if ( shiftDist < 0 ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0xFF) && sig ? ui64_fromNaN
+ : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp ) sig |= 0x00800000;
+#ifdef SOFTFLOAT_FAST_INT64
+ sig64 = (uint_fast64_t) sig<<40;
+ extra = 0;
+ if ( shiftDist ) {
+ sig64Extra = softfloat_shiftRightJam64Extra( sig64, 0, shiftDist );
+ sig64 = sig64Extra.v;
+ extra = sig64Extra.extra;
+ }
+ return softfloat_roundToUI64( sign, sig64, extra, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+#else
+ extSig[indexWord( 3, 2 )] = sig<<8;
+ extSig[indexWord( 3, 1 )] = 0;
+ extSig[indexWord( 3, 0 )] = 0;
+ if ( shiftDist ) softfloat_shiftRightJam96M( extSig, shiftDist, extSig );
+ return softfloat_roundMToUI64( sign, extSig, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA);
+#endif
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f32_to_ui64_r_minMag.c b/src/libs/softfloat-3e/source/f32_to_ui64_r_minMag.c
new file mode 100644
index 00000000..a8096b04
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f32_to_ui64_r_minMag.c
@@ -0,0 +1,90 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+uint_fast64_t f32_to_ui64_r_minMag( float32_t a, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ int_fast16_t exp;
+ uint_fast32_t sig;
+ int_fast16_t shiftDist;
+ bool sign;
+ uint_fast64_t sig64, z;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ exp = expF32UI( uiA );
+ sig = fracF32UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0xBE - exp;
+ if ( 64 <= shiftDist ) {
+ if ( exact && (exp | sig) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return 0;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sign = signF32UI( uiA );
+ if ( sign || (shiftDist < 0) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0xFF) && sig ? ui64_fromNaN
+ : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sig |= 0x00800000;
+ sig64 = (uint_fast64_t) sig<<40;
+ z = sig64>>shiftDist;
+ shiftDist = 40 - shiftDist;
+ if ( exact && (shiftDist < 0) && (uint32_t) (sig<<(shiftDist & 31)) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return z;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_add.c b/src/libs/softfloat-3e/source/f64_add.c
new file mode 100644
index 00000000..e6f78564
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_add.c
@@ -0,0 +1,74 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float64_t f64_add( float64_t a, float64_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ bool signA;
+ union ui64_f64 uB;
+ uint_fast64_t uiB;
+ bool signB;
+#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 2)
+ float64_t (*magsFuncPtr)( uint_fast64_t, uint_fast64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+#endif
+
+ uA.f = a;
+ uiA = uA.ui;
+ signA = signF64UI( uiA );
+ uB.f = b;
+ uiB = uB.ui;
+ signB = signF64UI( uiB );
+#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
+ if ( signA == signB ) {
+ return softfloat_addMagsF64( uiA, uiB, signA SOFTFLOAT_STATE_ARG_COMMA );
+ } else {
+ return softfloat_subMagsF64( uiA, uiB, signA SOFTFLOAT_STATE_ARG_COMMA );
+ }
+#else
+ magsFuncPtr =
+ (signA == signB) ? softfloat_addMagsF64 : softfloat_subMagsF64;
+ return (*magsFuncPtr)( uiA, uiB, signA SOFTFLOAT_STATE_ARG_COMMA );
+#endif
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_div.c b/src/libs/softfloat-3e/source/f64_div.c
new file mode 100644
index 00000000..46533239
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_div.c
@@ -0,0 +1,172 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float64_t f64_div( float64_t a, float64_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ bool signA;
+ int_fast16_t expA;
+ uint_fast64_t sigA;
+ union ui64_f64 uB;
+ uint_fast64_t uiB;
+ bool signB;
+ int_fast16_t expB;
+ uint_fast64_t sigB;
+ bool signZ;
+ struct exp16_sig64 normExpSig;
+ int_fast16_t expZ;
+ uint32_t recip32, sig32Z, doubleTerm;
+ uint_fast64_t rem;
+ uint32_t q;
+ uint_fast64_t sigZ;
+ uint_fast64_t uiZ;
+ union ui64_f64 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ signA = signF64UI( uiA );
+ expA = expF64UI( uiA );
+ sigA = fracF64UI( uiA );
+ uB.f = b;
+ uiB = uB.ui;
+ signB = signF64UI( uiB );
+ expB = expF64UI( uiB );
+ sigB = fracF64UI( uiB );
+ signZ = signA ^ signB;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0x7FF ) {
+ if ( sigA ) goto propagateNaN;
+ if ( expB == 0x7FF ) {
+ if ( sigB ) goto propagateNaN;
+ goto invalid;
+ }
+ goto infinity;
+ }
+ if ( expB == 0x7FF ) {
+ if ( sigB ) goto propagateNaN;
+ goto zero;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expB ) {
+ if ( ! sigB ) {
+ if ( ! (expA | sigA) ) goto invalid;
+ softfloat_raiseFlags( softfloat_flag_infinite SOFTFLOAT_STATE_ARG_COMMA );
+ goto infinity;
+ }
+ normExpSig = softfloat_normSubnormalF64Sig( sigB );
+ expB = normExpSig.exp;
+ sigB = normExpSig.sig;
+ }
+ if ( ! expA ) {
+ if ( ! sigA ) goto zero;
+ normExpSig = softfloat_normSubnormalF64Sig( sigA );
+ expA = normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expZ = expA - expB + 0x3FE;
+ sigA |= UINT64_C( 0x0010000000000000 );
+ sigB |= UINT64_C( 0x0010000000000000 );
+ if ( sigA < sigB ) {
+ --expZ;
+ sigA <<= 11;
+ } else {
+ sigA <<= 10;
+ }
+ sigB <<= 11;
+ recip32 = softfloat_approxRecip32_1( sigB>>32 ) - 2;
+ sig32Z = ((uint32_t) (sigA>>32) * (uint_fast64_t) recip32)>>32;
+ doubleTerm = sig32Z<<1;
+ rem =
+ ((sigA - (uint_fast64_t) doubleTerm * (uint32_t) (sigB>>32))<<28)
+ - (uint_fast64_t) doubleTerm * ((uint32_t) sigB>>4);
+ q = (((uint32_t) (rem>>32) * (uint_fast64_t) recip32)>>32) + 4;
+ sigZ = ((uint_fast64_t) sig32Z<<32) + ((uint_fast64_t) q<<4);
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( (sigZ & 0x1FF) < 4<<4 ) {
+ q &= ~7;
+ sigZ &= ~(uint_fast64_t) 0x7F;
+ doubleTerm = q<<1;
+ rem =
+ ((rem - (uint_fast64_t) doubleTerm * (uint32_t) (sigB>>32))<<28)
+ - (uint_fast64_t) doubleTerm * ((uint32_t) sigB>>4);
+ if ( rem & UINT64_C( 0x8000000000000000 ) ) {
+ sigZ -= 1<<7;
+ } else {
+ if ( rem ) sigZ |= 1;
+ }
+ }
+ return softfloat_roundPackToF64( signZ, expZ, sigZ SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN:
+ uiZ = softfloat_propagateNaNF64UI( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = defaultNaNF64UI;
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ infinity:
+ uiZ = packToF64UI( signZ, 0x7FF, 0 );
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zero:
+ uiZ = packToF64UI( signZ, 0, 0 );
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_eq.c b/src/libs/softfloat-3e/source/f64_eq.c
new file mode 100644
index 00000000..f8416d96
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_eq.c
@@ -0,0 +1,66 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool f64_eq( float64_t a, float64_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ union ui64_f64 uB;
+ uint_fast64_t uiB;
+
+ uA.f = a;
+ uiA = uA.ui;
+ uB.f = b;
+ uiB = uB.ui;
+ if ( isNaNF64UI( uiA ) || isNaNF64UI( uiB ) ) {
+ if (
+ softfloat_isSigNaNF64UI( uiA ) || softfloat_isSigNaNF64UI( uiB )
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ return false;
+ }
+ return (uiA == uiB) || ! ((uiA | uiB) & UINT64_C( 0x7FFFFFFFFFFFFFFF ));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_eq_signaling.c b/src/libs/softfloat-3e/source/f64_eq_signaling.c
new file mode 100644
index 00000000..92389270
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_eq_signaling.c
@@ -0,0 +1,61 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+bool f64_eq_signaling( float64_t a, float64_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ union ui64_f64 uB;
+ uint_fast64_t uiB;
+
+ uA.f = a;
+ uiA = uA.ui;
+ uB.f = b;
+ uiB = uB.ui;
+ if ( isNaNF64UI( uiA ) || isNaNF64UI( uiB ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return false;
+ }
+ return (uiA == uiB) || ! ((uiA | uiB) & UINT64_C( 0x7FFFFFFFFFFFFFFF ));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_isSignalingNaN.c b/src/libs/softfloat-3e/source/f64_isSignalingNaN.c
new file mode 100644
index 00000000..5e1411fc
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_isSignalingNaN.c
@@ -0,0 +1,51 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool f64_isSignalingNaN( float64_t a )
+{
+ union ui64_f64 uA;
+
+ uA.f = a;
+ return softfloat_isSigNaNF64UI( uA.ui );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_le.c b/src/libs/softfloat-3e/source/f64_le.c
new file mode 100644
index 00000000..036587cd
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_le.c
@@ -0,0 +1,67 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+bool f64_le( float64_t a, float64_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ union ui64_f64 uB;
+ uint_fast64_t uiB;
+ bool signA, signB;
+
+ uA.f = a;
+ uiA = uA.ui;
+ uB.f = b;
+ uiB = uB.ui;
+ if ( isNaNF64UI( uiA ) || isNaNF64UI( uiB ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return false;
+ }
+ signA = signF64UI( uiA );
+ signB = signF64UI( uiB );
+ return
+ (signA != signB)
+ ? signA || ! ((uiA | uiB) & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
+ : (uiA == uiB) || (signA ^ (uiA < uiB));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_le_quiet.c b/src/libs/softfloat-3e/source/f64_le_quiet.c
new file mode 100644
index 00000000..c2de6f59
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_le_quiet.c
@@ -0,0 +1,72 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool f64_le_quiet( float64_t a, float64_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ union ui64_f64 uB;
+ uint_fast64_t uiB;
+ bool signA, signB;
+
+ uA.f = a;
+ uiA = uA.ui;
+ uB.f = b;
+ uiB = uB.ui;
+ if ( isNaNF64UI( uiA ) || isNaNF64UI( uiB ) ) {
+ if (
+ softfloat_isSigNaNF64UI( uiA ) || softfloat_isSigNaNF64UI( uiB )
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ return false;
+ }
+ signA = signF64UI( uiA );
+ signB = signF64UI( uiB );
+ return
+ (signA != signB)
+ ? signA || ! ((uiA | uiB) & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
+ : (uiA == uiB) || (signA ^ (uiA < uiB));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_lt.c b/src/libs/softfloat-3e/source/f64_lt.c
new file mode 100644
index 00000000..62dd9008
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_lt.c
@@ -0,0 +1,67 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+bool f64_lt( float64_t a, float64_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ union ui64_f64 uB;
+ uint_fast64_t uiB;
+ bool signA, signB;
+
+ uA.f = a;
+ uiA = uA.ui;
+ uB.f = b;
+ uiB = uB.ui;
+ if ( isNaNF64UI( uiA ) || isNaNF64UI( uiB ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return false;
+ }
+ signA = signF64UI( uiA );
+ signB = signF64UI( uiB );
+ return
+ (signA != signB)
+ ? signA && ((uiA | uiB) & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
+ : (uiA != uiB) && (signA ^ (uiA < uiB));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_lt_quiet.c b/src/libs/softfloat-3e/source/f64_lt_quiet.c
new file mode 100644
index 00000000..ad389734
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_lt_quiet.c
@@ -0,0 +1,72 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool f64_lt_quiet( float64_t a, float64_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ union ui64_f64 uB;
+ uint_fast64_t uiB;
+ bool signA, signB;
+
+ uA.f = a;
+ uiA = uA.ui;
+ uB.f = b;
+ uiB = uB.ui;
+ if ( isNaNF64UI( uiA ) || isNaNF64UI( uiB ) ) {
+ if (
+ softfloat_isSigNaNF64UI( uiA ) || softfloat_isSigNaNF64UI( uiB )
+ ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ return false;
+ }
+ signA = signF64UI( uiA );
+ signB = signF64UI( uiB );
+ return
+ (signA != signB)
+ ? signA && ((uiA | uiB) & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
+ : (uiA != uiB) && (signA ^ (uiA < uiB));
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_mul.c b/src/libs/softfloat-3e/source/f64_mul.c
new file mode 100644
index 00000000..c40346a5
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_mul.c
@@ -0,0 +1,150 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float64_t f64_mul( float64_t a, float64_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ bool signA;
+ int_fast16_t expA;
+ uint_fast64_t sigA;
+ union ui64_f64 uB;
+ uint_fast64_t uiB;
+ bool signB;
+ int_fast16_t expB;
+ uint_fast64_t sigB;
+ bool signZ;
+ uint_fast64_t magBits;
+ struct exp16_sig64 normExpSig;
+ int_fast16_t expZ;
+#ifdef SOFTFLOAT_FAST_INT64
+ struct uint128 sig128Z;
+#else
+ uint32_t sig128Z[4];
+#endif
+ uint_fast64_t sigZ, uiZ;
+ union ui64_f64 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ signA = signF64UI( uiA );
+ expA = expF64UI( uiA );
+ sigA = fracF64UI( uiA );
+ uB.f = b;
+ uiB = uB.ui;
+ signB = signF64UI( uiB );
+ expB = expF64UI( uiB );
+ sigB = fracF64UI( uiB );
+ signZ = signA ^ signB;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0x7FF ) {
+ if ( sigA || ((expB == 0x7FF) && sigB) ) goto propagateNaN;
+ magBits = expB | sigB;
+ goto infArg;
+ }
+ if ( expB == 0x7FF ) {
+ if ( sigB ) goto propagateNaN;
+ magBits = expA | sigA;
+ goto infArg;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expA ) {
+ if ( ! sigA ) goto zero;
+ normExpSig = softfloat_normSubnormalF64Sig( sigA );
+ expA = normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ if ( ! expB ) {
+ if ( ! sigB ) goto zero;
+ normExpSig = softfloat_normSubnormalF64Sig( sigB );
+ expB = normExpSig.exp;
+ sigB = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expZ = expA + expB - 0x3FF;
+ sigA = (sigA | UINT64_C( 0x0010000000000000 ))<<10;
+ sigB = (sigB | UINT64_C( 0x0010000000000000 ))<<11;
+#ifdef SOFTFLOAT_FAST_INT64
+ sig128Z = softfloat_mul64To128( sigA, sigB );
+ sigZ = sig128Z.v64 | (sig128Z.v0 != 0);
+#else
+ softfloat_mul64To128M( sigA, sigB, sig128Z );
+ sigZ =
+ (uint64_t) sig128Z[indexWord( 4, 3 )]<<32 | sig128Z[indexWord( 4, 2 )];
+ if ( sig128Z[indexWord( 4, 1 )] || sig128Z[indexWord( 4, 0 )] ) sigZ |= 1;
+#endif
+ if ( sigZ < UINT64_C( 0x4000000000000000 ) ) {
+ --expZ;
+ sigZ <<= 1;
+ }
+ return softfloat_roundPackToF64( signZ, expZ, sigZ SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN:
+ uiZ = softfloat_propagateNaNF64UI( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ infArg:
+ if ( ! magBits ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = defaultNaNF64UI;
+ } else {
+ uiZ = packToF64UI( signZ, 0x7FF, 0 );
+ }
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zero:
+ uiZ = packToF64UI( signZ, 0, 0 );
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_mulAdd.c b/src/libs/softfloat-3e/source/f64_mulAdd.c
new file mode 100644
index 00000000..fd3d65a2
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_mulAdd.c
@@ -0,0 +1,60 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float64_t f64_mulAdd( float64_t a, float64_t b, float64_t c SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ union ui64_f64 uB;
+ uint_fast64_t uiB;
+ union ui64_f64 uC;
+ uint_fast64_t uiC;
+
+ uA.f = a;
+ uiA = uA.ui;
+ uB.f = b;
+ uiB = uB.ui;
+ uC.f = c;
+ uiC = uC.ui;
+ return softfloat_mulAddF64( uiA, uiB, uiC, 0 SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_rem.c b/src/libs/softfloat-3e/source/f64_rem.c
new file mode 100644
index 00000000..a944a1c5
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_rem.c
@@ -0,0 +1,189 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float64_t f64_rem( float64_t a, float64_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ bool signA;
+ int_fast16_t expA;
+ uint_fast64_t sigA;
+ union ui64_f64 uB;
+ uint_fast64_t uiB;
+ int_fast16_t expB;
+ uint_fast64_t sigB;
+ struct exp16_sig64 normExpSig;
+ uint64_t rem;
+ int_fast16_t expDiff;
+ uint32_t q, recip32;
+ uint_fast64_t q64;
+ uint64_t altRem, meanRem;
+ bool signRem;
+ uint_fast64_t uiZ;
+ union ui64_f64 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ signA = signF64UI( uiA );
+ expA = expF64UI( uiA );
+ sigA = fracF64UI( uiA );
+ uB.f = b;
+ uiB = uB.ui;
+ expB = expF64UI( uiB );
+ sigB = fracF64UI( uiB );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0x7FF ) {
+ if ( sigA || ((expB == 0x7FF) && sigB) ) goto propagateNaN;
+ goto invalid;
+ }
+ if ( expB == 0x7FF ) {
+ if ( sigB ) goto propagateNaN;
+ return a;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA < expB - 1 ) return a;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expB ) {
+ if ( ! sigB ) goto invalid;
+ normExpSig = softfloat_normSubnormalF64Sig( sigB );
+ expB = normExpSig.exp;
+ sigB = normExpSig.sig;
+ }
+ if ( ! expA ) {
+ if ( ! sigA ) return a;
+ normExpSig = softfloat_normSubnormalF64Sig( sigA );
+ expA = normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ rem = sigA | UINT64_C( 0x0010000000000000 );
+ sigB |= UINT64_C( 0x0010000000000000 );
+ expDiff = expA - expB;
+ if ( expDiff < 1 ) {
+ if ( expDiff < -1 ) return a;
+ sigB <<= 9;
+ if ( expDiff ) {
+ rem <<= 8;
+ q = 0;
+ } else {
+ rem <<= 9;
+ q = (sigB <= rem);
+ if ( q ) rem -= sigB;
+ }
+ } else {
+ recip32 = softfloat_approxRecip32_1( sigB>>21 );
+ /*--------------------------------------------------------------------
+ | Changing the shift of `rem' here requires also changing the initial
+ | subtraction from `expDiff'.
+ *--------------------------------------------------------------------*/
+ rem <<= 9;
+ expDiff -= 30;
+ /*--------------------------------------------------------------------
+ | The scale of `sigB' affects how many bits are obtained during each
+ | cycle of the loop. Currently this is 29 bits per loop iteration,
+ | the maximum possible.
+ *--------------------------------------------------------------------*/
+ sigB <<= 9;
+ for (;;) {
+ q64 = (uint32_t) (rem>>32) * (uint_fast64_t) recip32;
+ if ( expDiff < 0 ) break;
+ q = (q64 + 0x80000000)>>32;
+#ifdef SOFTFLOAT_FAST_INT64
+ rem <<= 29;
+#else
+ rem = (uint_fast64_t) (uint32_t) (rem>>3)<<32;
+#endif
+ rem -= q * (uint64_t) sigB;
+ if ( rem & UINT64_C( 0x8000000000000000 ) ) rem += sigB;
+ expDiff -= 29;
+ }
+ /*--------------------------------------------------------------------
+ | (`expDiff' cannot be less than -29 here.)
+ *--------------------------------------------------------------------*/
+ q = (uint32_t) (q64>>32)>>(~expDiff & 31);
+ rem = (rem<<(expDiff + 30)) - q * (uint64_t) sigB;
+ if ( rem & UINT64_C( 0x8000000000000000 ) ) {
+ altRem = rem + sigB;
+ goto selectRem;
+ }
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ do {
+ altRem = rem;
+ ++q;
+ rem -= sigB;
+ } while ( ! (rem & UINT64_C( 0x8000000000000000 )) );
+ selectRem:
+ meanRem = rem + altRem;
+ if (
+ (meanRem & UINT64_C( 0x8000000000000000 )) || (! meanRem && (q & 1))
+ ) {
+ rem = altRem;
+ }
+ signRem = signA;
+ if ( rem & UINT64_C( 0x8000000000000000 ) ) {
+ signRem = ! signRem;
+ rem = -rem;
+ }
+ return softfloat_normRoundPackToF64( signRem, expB, rem SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN:
+ uiZ = softfloat_propagateNaNF64UI( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = defaultNaNF64UI;
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_roundToInt.c b/src/libs/softfloat-3e/source/f64_roundToInt.c
new file mode 100644
index 00000000..2b9ad1de
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_roundToInt.c
@@ -0,0 +1,122 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+#include <iprt/cdefs.h> /* VBox: for RT_FALL_THROUGH */
+
+float64_t f64_roundToInt( float64_t a, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ int_fast16_t exp;
+ uint_fast64_t uiZ, lastBitMask, roundBitsMask;
+ union ui64_f64 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ exp = expF64UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp <= 0x3FE ) {
+ if ( !(uiA & UINT64_C( 0x7FFFFFFFFFFFFFFF )) ) return a;
+ if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+ uiZ = uiA & packToF64UI( 1, 0, 0 );
+ switch ( roundingMode ) {
+ case softfloat_round_near_even:
+ if ( !fracF64UI( uiA ) ) break;
+ RT_FALL_THROUGH(); /* VBox */
+ case softfloat_round_near_maxMag:
+ if ( exp == 0x3FE ) uiZ |= packToF64UI( 0, 0x3FF, 0 );
+ break;
+ case softfloat_round_min:
+ if ( uiZ ) uiZ = packToF64UI( 1, 0x3FF, 0 );
+ break;
+ case softfloat_round_max:
+ if ( !uiZ ) uiZ = packToF64UI( 0, 0x3FF, 0 );
+ break;
+#ifdef SOFTFLOAT_ROUND_ODD
+ case softfloat_round_odd:
+ uiZ |= packToF64UI( 0, 0x3FF, 0 );
+ break;
+#endif
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( 0x433 <= exp ) {
+ if ( (exp == 0x7FF) && fracF64UI( uiA ) ) {
+ uiZ = softfloat_propagateNaNF64UI( uiA, 0 SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ }
+ return a;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ = uiA;
+ lastBitMask = (uint_fast64_t) 1<<(0x433 - exp);
+ roundBitsMask = lastBitMask - 1;
+ if ( roundingMode == softfloat_round_near_maxMag ) {
+ uiZ += lastBitMask>>1;
+ } else if ( roundingMode == softfloat_round_near_even ) {
+ uiZ += lastBitMask>>1;
+ if ( !(uiZ & roundBitsMask) ) uiZ &= ~lastBitMask;
+ } else if (
+ roundingMode
+ == (signF64UI( uiZ ) ? softfloat_round_min : softfloat_round_max)
+ ) {
+ uiZ += roundBitsMask;
+ }
+ uiZ &= ~roundBitsMask;
+ if ( uiZ != uiA ) {
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) uiZ |= lastBitMask;
+#endif
+ if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_sqrt.c b/src/libs/softfloat-3e/source/f64_sqrt.c
new file mode 100644
index 00000000..f37fd919
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_sqrt.c
@@ -0,0 +1,133 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float64_t f64_sqrt( float64_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ bool signA;
+ int_fast16_t expA;
+ uint_fast64_t sigA, uiZ;
+ struct exp16_sig64 normExpSig;
+ int_fast16_t expZ;
+ uint32_t sig32A, recipSqrt32, sig32Z;
+ uint_fast64_t rem;
+ uint32_t q;
+ uint_fast64_t sigZ, shiftedSigZ;
+ union ui64_f64 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ signA = signF64UI( uiA );
+ expA = expF64UI( uiA );
+ sigA = fracF64UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0x7FF ) {
+ if ( sigA ) {
+ uiZ = softfloat_propagateNaNF64UI( uiA, 0 SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ }
+ if ( ! signA ) return a;
+ goto invalid;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( signA ) {
+ if ( ! (expA | sigA) ) return a;
+ goto invalid;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expA ) {
+ if ( ! sigA ) return a;
+ normExpSig = softfloat_normSubnormalF64Sig( sigA );
+ expA = normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ | (`sig32Z' is guaranteed to be a lower bound on the square root of
+ | `sig32A', which makes `sig32Z' also a lower bound on the square root of
+ | `sigA'.)
+ *------------------------------------------------------------------------*/
+ expZ = ((expA - 0x3FF)>>1) + 0x3FE;
+ expA &= 1;
+ sigA |= UINT64_C( 0x0010000000000000 );
+ sig32A = sigA>>21;
+ recipSqrt32 = softfloat_approxRecipSqrt32_1( expA, sig32A );
+ sig32Z = ((uint_fast64_t) sig32A * recipSqrt32)>>32;
+ if ( expA ) {
+ sigA <<= 8;
+ sig32Z >>= 1;
+ } else {
+ sigA <<= 9;
+ }
+ rem = sigA - (uint_fast64_t) sig32Z * sig32Z;
+ q = ((uint32_t) (rem>>2) * (uint_fast64_t) recipSqrt32)>>32;
+ sigZ = ((uint_fast64_t) sig32Z<<32 | 1<<5) + ((uint_fast64_t) q<<3);
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( (sigZ & 0x1FF) < 0x22 ) {
+ sigZ &= ~(uint_fast64_t) 0x3F;
+ shiftedSigZ = sigZ>>6;
+ rem = (sigA<<52) - shiftedSigZ * shiftedSigZ;
+ if ( rem & UINT64_C( 0x8000000000000000 ) ) {
+ --sigZ;
+ } else {
+ if ( rem ) sigZ |= 1;
+ }
+ }
+ return softfloat_roundPackToF64( 0, expZ, sigZ SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = defaultNaNF64UI;
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_sub.c b/src/libs/softfloat-3e/source/f64_sub.c
new file mode 100644
index 00000000..2dde961f
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_sub.c
@@ -0,0 +1,74 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float64_t f64_sub( float64_t a, float64_t b SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ bool signA;
+ union ui64_f64 uB;
+ uint_fast64_t uiB;
+ bool signB;
+#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 2)
+ float64_t (*magsFuncPtr)( uint_fast64_t, uint_fast64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+#endif
+
+ uA.f = a;
+ uiA = uA.ui;
+ signA = signF64UI( uiA );
+ uB.f = b;
+ uiB = uB.ui;
+ signB = signF64UI( uiB );
+#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
+ if ( signA == signB ) {
+ return softfloat_subMagsF64( uiA, uiB, signA SOFTFLOAT_STATE_ARG_COMMA );
+ } else {
+ return softfloat_addMagsF64( uiA, uiB, signA SOFTFLOAT_STATE_ARG_COMMA );
+ }
+#else
+ magsFuncPtr =
+ (signA == signB) ? softfloat_subMagsF64 : softfloat_addMagsF64;
+ return (*magsFuncPtr)( uiA, uiB, signA SOFTFLOAT_STATE_ARG_COMMA );
+#endif
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_to_extF80.c b/src/libs/softfloat-3e/source/f64_to_extF80.c
new file mode 100644
index 00000000..cd0fa062
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_to_extF80.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+extFloat80_t f64_to_extF80( float64_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ bool sign;
+ int_fast16_t exp;
+ uint_fast64_t frac;
+ struct commonNaN commonNaN;
+ struct uint128 uiZ;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+ struct exp16_sig64 normExpSig;
+ union { struct extFloat80M s; extFloat80_t f; } uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF64UI( uiA );
+ exp = expF64UI( uiA );
+ frac = fracF64UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x7FF ) {
+ if ( frac ) {
+ softfloat_f64UIToCommonNaN( uiA, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToExtF80UI( &commonNaN );
+ uiZ64 = uiZ.v64;
+ uiZ0 = uiZ.v0;
+ } else {
+ uiZ64 = packToExtF80UI64( sign, 0x7FFF );
+ uiZ0 = UINT64_C( 0x8000000000000000 );
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! exp ) {
+ if ( ! frac ) {
+ uiZ64 = packToExtF80UI64( sign, 0 );
+ uiZ0 = 0;
+ goto uiZ;
+ }
+ normExpSig = softfloat_normSubnormalF64Sig( frac );
+ exp = normExpSig.exp;
+ frac = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ64 = packToExtF80UI64( sign, exp + 0x3C00 );
+ uiZ0 = (frac | UINT64_C( 0x0010000000000000 ))<<11;
+ uiZ:
+ uZ.s.signExp = uiZ64;
+ uZ.s.signif = uiZ0;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_to_extF80M.c b/src/libs/softfloat-3e/source/f64_to_extF80M.c
new file mode 100644
index 00000000..e1744ef6
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_to_extF80M.c
@@ -0,0 +1,111 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void f64_to_extF80M( float64_t a, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ *zPtr = f64_to_extF80( a SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void f64_to_extF80M( float64_t a, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ struct extFloat80M *zSPtr;
+ union ui64_f64 uA;
+ uint64_t uiA;
+ bool sign;
+ int_fast16_t exp;
+ uint64_t frac;
+ struct commonNaN commonNaN;
+ uint_fast16_t uiZ64;
+ uint64_t uiZ0;
+ struct exp16_sig64 normExpSig;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zSPtr = (struct extFloat80M *) zPtr;
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF64UI( uiA );
+ exp = expF64UI( uiA );
+ frac = fracF64UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x7FF ) {
+ if ( frac ) {
+ softfloat_f64UIToCommonNaN( uiA, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ softfloat_commonNaNToExtF80M( &commonNaN, zSPtr );
+ return;
+ }
+ uiZ64 = packToExtF80UI64( sign, 0x7FFF );
+ uiZ0 = UINT64_C( 0x8000000000000000 );
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! exp ) {
+ if ( ! frac ) {
+ uiZ64 = packToExtF80UI64( sign, 0 );
+ uiZ0 = 0;
+ goto uiZ;
+ }
+ normExpSig = softfloat_normSubnormalF64Sig( frac );
+ exp = normExpSig.exp;
+ frac = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ64 = packToExtF80UI64( sign, exp + 0x3C00 );
+ uiZ0 = UINT64_C( 0x8000000000000000 ) | frac<<11;
+ uiZ:
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = uiZ0;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f64_to_f128.c b/src/libs/softfloat-3e/source/f64_to_f128.c
new file mode 100644
index 00000000..f9f1d8f6
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_to_f128.c
@@ -0,0 +1,98 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float128_t f64_to_f128( float64_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ bool sign;
+ int_fast16_t exp;
+ uint_fast64_t frac;
+ struct commonNaN commonNaN;
+ struct uint128 uiZ;
+ struct exp16_sig64 normExpSig;
+ struct uint128 frac128;
+ union ui128_f128 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF64UI( uiA );
+ exp = expF64UI( uiA );
+ frac = fracF64UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x7FF ) {
+ if ( frac ) {
+ softfloat_f64UIToCommonNaN( uiA, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToF128UI( &commonNaN );
+ } else {
+ uiZ.v64 = packToF128UI64( sign, 0x7FFF, 0 );
+ uiZ.v0 = 0;
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! exp ) {
+ if ( ! frac ) {
+ uiZ.v64 = packToF128UI64( sign, 0, 0 );
+ uiZ.v0 = 0;
+ goto uiZ;
+ }
+ normExpSig = softfloat_normSubnormalF64Sig( frac );
+ exp = normExpSig.exp - 1;
+ frac = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ frac128 = softfloat_shortShiftLeft128( 0, frac, 60 );
+ uiZ.v64 = packToF128UI64( sign, exp + 0x3C00, frac128.v64 );
+ uiZ.v0 = frac128.v0;
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_to_f128M.c b/src/libs/softfloat-3e/source/f64_to_f128M.c
new file mode 100644
index 00000000..2fc92709
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_to_f128M.c
@@ -0,0 +1,117 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void f64_to_f128M( float64_t a, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ *zPtr = f64_to_f128( a SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void f64_to_f128M( float64_t a, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ uint32_t *zWPtr;
+ union ui64_f64 uA;
+ uint64_t uiA;
+ bool sign;
+ int_fast16_t exp;
+ uint64_t frac;
+ struct commonNaN commonNaN;
+ uint32_t uiZ96;
+ struct exp16_sig64 normExpSig;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zWPtr = (uint32_t *) zPtr;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF64UI( uiA );
+ exp = expF64UI( uiA );
+ frac = fracF64UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zWPtr[indexWord( 4, 0 )] = 0;
+ if ( exp == 0x7FF ) {
+ if ( frac ) {
+ softfloat_f64UIToCommonNaN( uiA, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ softfloat_commonNaNToF128M( &commonNaN, zWPtr );
+ return;
+ }
+ uiZ96 = packToF128UI96( sign, 0x7FFF, 0 );
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! exp ) {
+ if ( ! frac ) {
+ uiZ96 = packToF128UI96( sign, 0, 0 );
+ goto uiZ;
+ }
+ normExpSig = softfloat_normSubnormalF64Sig( frac );
+ exp = normExpSig.exp - 1;
+ frac = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zWPtr[indexWord( 4, 1 )] = (uint32_t) frac<<28;
+ frac >>= 4;
+ zWPtr[indexWordHi( 4 )] = packToF128UI96( sign, exp + 0x3C00, frac>>32 );
+ zWPtr[indexWord( 4, 2 )] = frac;
+ return;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiZ:
+ zWPtr[indexWord( 4, 3 )] = uiZ96;
+ zWPtr[indexWord( 4, 2 )] = 0;
+ zWPtr[indexWord( 4, 1 )] = 0;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/f64_to_f16.c b/src/libs/softfloat-3e/source/f64_to_f16.c
new file mode 100644
index 00000000..46dfb965
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_to_f16.c
@@ -0,0 +1,88 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float16_t f64_to_f16( float64_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ bool sign;
+ int_fast16_t exp;
+ uint_fast64_t frac;
+ struct commonNaN commonNaN;
+ uint_fast16_t uiZ, frac16;
+ union ui16_f16 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF64UI( uiA );
+ exp = expF64UI( uiA );
+ frac = fracF64UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x7FF ) {
+ if ( frac ) {
+ softfloat_f64UIToCommonNaN( uiA, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToF16UI( &commonNaN );
+ } else {
+ uiZ = packToF16UI( sign, 0x1F, 0 );
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ frac16 = softfloat_shortShiftRightJam64( frac, 38 );
+ if ( ! (exp | frac16) ) {
+ uiZ = packToF16UI( sign, 0, 0 );
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ return softfloat_roundPackToF16( sign, exp - 0x3F1, frac16 | 0x4000 SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_to_f32.c b/src/libs/softfloat-3e/source/f64_to_f32.c
new file mode 100644
index 00000000..80989609
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_to_f32.c
@@ -0,0 +1,88 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float32_t f64_to_f32( float64_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ bool sign;
+ int_fast16_t exp;
+ uint_fast64_t frac;
+ struct commonNaN commonNaN;
+ uint_fast32_t uiZ, frac32;
+ union ui32_f32 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF64UI( uiA );
+ exp = expF64UI( uiA );
+ frac = fracF64UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp == 0x7FF ) {
+ if ( frac ) {
+ softfloat_f64UIToCommonNaN( uiA, &commonNaN SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = softfloat_commonNaNToF32UI( &commonNaN );
+ } else {
+ uiZ = packToF32UI( sign, 0xFF, 0 );
+ }
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ frac32 = softfloat_shortShiftRightJam64( frac, 22 );
+ if ( ! (exp | frac32) ) {
+ uiZ = packToF32UI( sign, 0, 0 );
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ return softfloat_roundPackToF32( sign, exp - 0x381, frac32 | 0x40000000 SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_to_i32.c b/src/libs/softfloat-3e/source/f64_to_i32.c
new file mode 100644
index 00000000..5772e0a7
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_to_i32.c
@@ -0,0 +1,82 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+int_fast32_t f64_to_i32( float64_t a, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ bool sign;
+ int_fast16_t exp;
+ uint_fast64_t sig;
+ int_fast16_t shiftDist;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF64UI( uiA );
+ exp = expF64UI( uiA );
+ sig = fracF64UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#if (i32_fromNaN != i32_fromPosOverflow) || (i32_fromNaN != i32_fromNegOverflow)
+ if ( (exp == 0x7FF) && sig ) {
+#if (i32_fromNaN == i32_fromPosOverflow)
+ sign = 0;
+#elif (i32_fromNaN == i32_fromNegOverflow)
+ sign = 1;
+#else
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return i32_fromNaN;
+#endif
+ }
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp ) sig |= UINT64_C( 0x0010000000000000 );
+ shiftDist = 0x427 - exp;
+ if ( 0 < shiftDist ) sig = softfloat_shiftRightJam64( sig, shiftDist );
+ return softfloat_roundToI32( sign, sig, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_to_i32_r_minMag.c b/src/libs/softfloat-3e/source/f64_to_i32_r_minMag.c
new file mode 100644
index 00000000..9baf923e
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_to_i32_r_minMag.c
@@ -0,0 +1,96 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+int_fast32_t f64_to_i32_r_minMag( float64_t a, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ int_fast16_t exp;
+ uint_fast64_t sig;
+ int_fast16_t shiftDist;
+ bool sign;
+ int_fast32_t absZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ exp = expF64UI( uiA );
+ sig = fracF64UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x433 - exp;
+ if ( 53 <= shiftDist ) {
+ if ( exact && (exp | sig) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return 0;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sign = signF64UI( uiA );
+ if ( shiftDist < 22 ) {
+ if (
+ sign && (exp == 0x41E) && (sig < UINT64_C( 0x0000000000200000 ))
+ ) {
+ if ( exact && sig ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return -0x7FFFFFFF - 1;
+ }
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FF) && sig ? i32_fromNaN
+ : sign ? i32_fromNegOverflow : i32_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sig |= UINT64_C( 0x0010000000000000 );
+ absZ = sig>>shiftDist;
+ if ( exact && ((uint_fast64_t) (uint_fast32_t) absZ<<shiftDist != sig) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return sign ? -absZ : absZ;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_to_i64.c b/src/libs/softfloat-3e/source/f64_to_i64.c
new file mode 100644
index 00000000..c3f952f6
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_to_i64.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+int_fast64_t f64_to_i64( float64_t a, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ bool sign;
+ int_fast16_t exp;
+ uint_fast64_t sig;
+ int_fast16_t shiftDist;
+#ifdef SOFTFLOAT_FAST_INT64
+ struct uint64_extra sigExtra;
+#else
+ uint32_t extSig[3];
+#endif
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF64UI( uiA );
+ exp = expF64UI( uiA );
+ sig = fracF64UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp ) sig |= UINT64_C( 0x0010000000000000 );
+ shiftDist = 0x433 - exp;
+#ifdef SOFTFLOAT_FAST_INT64
+ if ( shiftDist <= 0 ) {
+ if ( shiftDist < -11 ) goto invalid;
+ sigExtra.v = sig<<-shiftDist;
+ sigExtra.extra = 0;
+ } else {
+ sigExtra = softfloat_shiftRightJam64Extra( sig, 0, shiftDist );
+ }
+ return
+ softfloat_roundToI64(
+ sign, sigExtra.v, sigExtra.extra, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+#else
+ extSig[indexWord( 3, 0 )] = 0;
+ if ( shiftDist <= 0 ) {
+ if ( shiftDist < -11 ) goto invalid;
+ sig <<= -shiftDist;
+ extSig[indexWord( 3, 2 )] = sig>>32;
+ extSig[indexWord( 3, 1 )] = sig;
+ } else {
+ extSig[indexWord( 3, 2 )] = sig>>32;
+ extSig[indexWord( 3, 1 )] = sig;
+ softfloat_shiftRightJam96M( extSig, shiftDist, extSig );
+ }
+ return softfloat_roundMToI64( sign, extSig, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FF) && fracF64UI( uiA ) ? i64_fromNaN
+ : sign ? i64_fromNegOverflow : i64_fromPosOverflow;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_to_i64_r_minMag.c b/src/libs/softfloat-3e/source/f64_to_i64_r_minMag.c
new file mode 100644
index 00000000..3a7fffdd
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_to_i64_r_minMag.c
@@ -0,0 +1,100 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+int_fast64_t f64_to_i64_r_minMag( float64_t a, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ bool sign;
+ int_fast16_t exp;
+ uint_fast64_t sig;
+ int_fast16_t shiftDist;
+ int_fast64_t absZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF64UI( uiA );
+ exp = expF64UI( uiA );
+ sig = fracF64UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x433 - exp;
+ if ( shiftDist <= 0 ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( shiftDist < -10 ) {
+ if ( uiA == packToF64UI( 1, 0x43E, 0 ) ) {
+ return -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1;
+ }
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FF) && sig ? i64_fromNaN
+ : sign ? i64_fromNegOverflow : i64_fromPosOverflow;
+ }
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ sig |= UINT64_C( 0x0010000000000000 );
+ absZ = sig<<-shiftDist;
+ } else {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( 53 <= shiftDist ) {
+ if ( exact && (exp | sig) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return 0;
+ }
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ sig |= UINT64_C( 0x0010000000000000 );
+ absZ = sig>>shiftDist;
+ if ( exact && (absZ<<shiftDist != sig) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ }
+ return sign ? -absZ : absZ;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_to_ui32.c b/src/libs/softfloat-3e/source/f64_to_ui32.c
new file mode 100644
index 00000000..190d0876
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_to_ui32.c
@@ -0,0 +1,82 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+uint_fast32_t f64_to_ui32( float64_t a, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ bool sign;
+ int_fast16_t exp;
+ uint_fast64_t sig;
+ int_fast16_t shiftDist;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF64UI( uiA );
+ exp = expF64UI( uiA );
+ sig = fracF64UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#if (ui32_fromNaN != ui32_fromPosOverflow) || (ui32_fromNaN != ui32_fromNegOverflow)
+ if ( (exp == 0x7FF) && sig ) {
+#if (ui32_fromNaN == ui32_fromPosOverflow)
+ sign = 0;
+#elif (ui32_fromNaN == ui32_fromNegOverflow)
+ sign = 1;
+#else
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return ui32_fromNaN;
+#endif
+ }
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp ) sig |= UINT64_C( 0x0010000000000000 );
+ shiftDist = 0x427 - exp;
+ if ( 0 < shiftDist ) sig = softfloat_shiftRightJam64( sig, shiftDist );
+ return softfloat_roundToUI32( sign, sig, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_to_ui32_r_minMag.c b/src/libs/softfloat-3e/source/f64_to_ui32_r_minMag.c
new file mode 100644
index 00000000..f5637442
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_to_ui32_r_minMag.c
@@ -0,0 +1,88 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+uint_fast32_t f64_to_ui32_r_minMag( float64_t a, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ int_fast16_t exp;
+ uint_fast64_t sig;
+ int_fast16_t shiftDist;
+ bool sign;
+ uint_fast32_t z;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ exp = expF64UI( uiA );
+ sig = fracF64UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x433 - exp;
+ if ( 53 <= shiftDist ) {
+ if ( exact && (exp | sig) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return 0;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sign = signF64UI( uiA );
+ if ( sign || (shiftDist < 21) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FF) && sig ? ui32_fromNaN
+ : sign ? ui32_fromNegOverflow : ui32_fromPosOverflow;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sig |= UINT64_C( 0x0010000000000000 );
+ z = sig>>shiftDist;
+ if ( exact && ((uint_fast64_t) z<<shiftDist != sig) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return z;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_to_ui64.c b/src/libs/softfloat-3e/source/f64_to_ui64.c
new file mode 100644
index 00000000..5670c9b3
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_to_ui64.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+uint_fast64_t f64_to_ui64( float64_t a, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ bool sign;
+ int_fast16_t exp;
+ uint_fast64_t sig;
+ int_fast16_t shiftDist;
+#ifdef SOFTFLOAT_FAST_INT64
+ struct uint64_extra sigExtra;
+#else
+ uint32_t extSig[3];
+#endif
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ sign = signF64UI( uiA );
+ exp = expF64UI( uiA );
+ sig = fracF64UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( exp ) sig |= UINT64_C( 0x0010000000000000 );
+ shiftDist = 0x433 - exp;
+#ifdef SOFTFLOAT_FAST_INT64
+ if ( shiftDist <= 0 ) {
+ if ( shiftDist < -11 ) goto invalid;
+ sigExtra.v = sig<<-shiftDist;
+ sigExtra.extra = 0;
+ } else {
+ sigExtra = softfloat_shiftRightJam64Extra( sig, 0, shiftDist );
+ }
+ return
+ softfloat_roundToUI64(
+ sign, sigExtra.v, sigExtra.extra, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA );
+#else
+ extSig[indexWord( 3, 0 )] = 0;
+ if ( shiftDist <= 0 ) {
+ if ( shiftDist < -11 ) goto invalid;
+ sig <<= -shiftDist;
+ extSig[indexWord( 3, 2 )] = sig>>32;
+ extSig[indexWord( 3, 1 )] = sig;
+ } else {
+ extSig[indexWord( 3, 2 )] = sig>>32;
+ extSig[indexWord( 3, 1 )] = sig;
+ softfloat_shiftRightJam96M( extSig, shiftDist, extSig );
+ }
+ return softfloat_roundMToUI64( sign, extSig, roundingMode, exact SOFTFLOAT_STATE_ARG_COMMA);
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FF) && fracF64UI( uiA ) ? ui64_fromNaN
+ : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/f64_to_ui64_r_minMag.c b/src/libs/softfloat-3e/source/f64_to_ui64_r_minMag.c
new file mode 100644
index 00000000..6cf69037
--- /dev/null
+++ b/src/libs/softfloat-3e/source/f64_to_ui64_r_minMag.c
@@ -0,0 +1,93 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+uint_fast64_t f64_to_ui64_r_minMag( float64_t a, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ int_fast16_t exp;
+ uint_fast64_t sig;
+ int_fast16_t shiftDist;
+ bool sign;
+ uint_fast64_t z;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uA.f = a;
+ uiA = uA.ui;
+ exp = expF64UI( uiA );
+ sig = fracF64UI( uiA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 0x433 - exp;
+ if ( 53 <= shiftDist ) {
+ if ( exact && (exp | sig) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return 0;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sign = signF64UI( uiA );
+ if ( sign ) goto invalid;
+ if ( shiftDist <= 0 ) {
+ if ( shiftDist < -11 ) goto invalid;
+ z = (sig | UINT64_C( 0x0010000000000000 ))<<-shiftDist;
+ } else {
+ sig |= UINT64_C( 0x0010000000000000 );
+ z = sig>>shiftDist;
+ if ( exact && (uint64_t) (sig<<(-shiftDist & 63)) ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ }
+ return z;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return
+ (exp == 0x7FF) && sig ? ui64_fromNaN
+ : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/i32_to_extF80.c b/src/libs/softfloat-3e/source/i32_to_extF80.c
new file mode 100644
index 00000000..afaa588f
--- /dev/null
+++ b/src/libs/softfloat-3e/source/i32_to_extF80.c
@@ -0,0 +1,66 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+extFloat80_t i32_to_extF80( int32_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ uint_fast16_t uiZ64;
+ uint_fast32_t absA;
+ bool sign;
+ int_fast8_t shiftDist;
+ union { struct extFloat80M s; extFloat80_t f; } uZ;
+ SOFTFLOAT_STATE_NOREF();
+
+ uiZ64 = 0;
+ absA = 0;
+ if ( a ) {
+ sign = (a < 0);
+ absA = sign ? -(uint_fast32_t) a : (uint_fast32_t) a;
+ shiftDist = softfloat_countLeadingZeros32( absA );
+ uiZ64 = packToExtF80UI64( sign, 0x401E - shiftDist );
+ absA <<= shiftDist;
+ }
+ uZ.s.signExp = uiZ64;
+ uZ.s.signif = (uint_fast64_t) absA<<32;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/i32_to_extF80M.c b/src/libs/softfloat-3e/source/i32_to_extF80M.c
new file mode 100644
index 00000000..3eb2c85b
--- /dev/null
+++ b/src/libs/softfloat-3e/source/i32_to_extF80M.c
@@ -0,0 +1,79 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void i32_to_extF80M( int32_t a, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ *zPtr = i32_to_extF80( a SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void i32_to_extF80M( int32_t a, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ struct extFloat80M *zSPtr;
+ uint_fast16_t uiZ64;
+ uint64_t sigZ;
+ bool sign;
+ uint32_t absA;
+ int_fast8_t shiftDist;
+ SOFTFLOAT_STATE_NOREF();
+
+ zSPtr = (struct extFloat80M *) zPtr;
+ uiZ64 = 0;
+ sigZ = 0;
+ if ( a ) {
+ sign = (a < 0);
+ absA = sign ? -(uint32_t) a : (uint32_t) a;
+ shiftDist = softfloat_countLeadingZeros32( absA );
+ uiZ64 = packToExtF80UI64( sign, 0x401E - shiftDist );
+ sigZ = (uint64_t) (absA<<shiftDist)<<32;
+ }
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = sigZ;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/i32_to_f128.c b/src/libs/softfloat-3e/source/i32_to_f128.c
new file mode 100644
index 00000000..8200eb19
--- /dev/null
+++ b/src/libs/softfloat-3e/source/i32_to_f128.c
@@ -0,0 +1,65 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float128_t i32_to_f128( int32_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ uint_fast64_t uiZ64;
+ bool sign;
+ uint_fast32_t absA;
+ int_fast8_t shiftDist;
+ union ui128_f128 uZ;
+ SOFTFLOAT_STATE_NOREF();
+
+ uiZ64 = 0;
+ if ( a ) {
+ sign = (a < 0);
+ absA = sign ? -(uint_fast32_t) a : (uint_fast32_t) a;
+ shiftDist = softfloat_countLeadingZeros32( absA ) + 17;
+ uiZ64 =
+ packToF128UI64(
+ sign, 0x402E - shiftDist, (uint_fast64_t) absA<<shiftDist );
+ }
+ uZ.ui.v64 = uiZ64;
+ uZ.ui.v0 = 0;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/i32_to_f128M.c b/src/libs/softfloat-3e/source/i32_to_f128M.c
new file mode 100644
index 00000000..b45c325d
--- /dev/null
+++ b/src/libs/softfloat-3e/source/i32_to_f128M.c
@@ -0,0 +1,82 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void i32_to_f128M( int32_t a, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ *zPtr = i32_to_f128( a SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void i32_to_f128M( int32_t a, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ uint32_t *zWPtr;
+ uint32_t uiZ96, uiZ64;
+ bool sign;
+ uint32_t absA;
+ int_fast8_t shiftDist;
+ uint64_t normAbsA;
+ SOFTFLOAT_STATE_NOREF();
+
+ zWPtr = (uint32_t *) zPtr;
+ uiZ96 = 0;
+ uiZ64 = 0;
+ if ( a ) {
+ sign = (a < 0);
+ absA = sign ? -(uint32_t) a : (uint32_t) a;
+ shiftDist = softfloat_countLeadingZeros32( absA ) + 17;
+ normAbsA = (uint64_t) absA<<shiftDist;
+ uiZ96 = packToF128UI96( sign, 0x402E - shiftDist, normAbsA>>32 );
+ uiZ64 = normAbsA;
+ }
+ zWPtr[indexWord( 4, 3 )] = uiZ96;
+ zWPtr[indexWord( 4, 2 )] = uiZ64;
+ zWPtr[indexWord( 4, 1 )] = 0;
+ zWPtr[indexWord( 4, 0 )] = 0;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/i32_to_f16.c b/src/libs/softfloat-3e/source/i32_to_f16.c
new file mode 100644
index 00000000..3180d4e5
--- /dev/null
+++ b/src/libs/softfloat-3e/source/i32_to_f16.c
@@ -0,0 +1,71 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float16_t i32_to_f16( int32_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ bool sign;
+ uint_fast32_t absA;
+ int_fast8_t shiftDist;
+ union ui16_f16 u;
+ uint_fast16_t sig;
+
+ sign = (a < 0);
+ absA = sign ? -(uint_fast32_t) a : (uint_fast32_t) a;
+ shiftDist = softfloat_countLeadingZeros32( absA ) - 21;
+ if ( 0 <= shiftDist ) {
+ u.ui =
+ a ? packToF16UI(
+ sign, 0x18 - shiftDist, (uint_fast16_t) absA<<shiftDist )
+ : 0;
+ return u.f;
+ } else {
+ shiftDist += 4;
+ sig =
+ (shiftDist < 0)
+ ? absA>>(-shiftDist)
+ | ((uint32_t) (absA<<(shiftDist & 31)) != 0)
+ : (uint_fast16_t) absA<<shiftDist;
+ return softfloat_roundPackToF16( sign, 0x1C - shiftDist, sig SOFTFLOAT_STATE_ARG_COMMA );
+ }
+
+}
+
diff --git a/src/libs/softfloat-3e/source/i32_to_f32.c b/src/libs/softfloat-3e/source/i32_to_f32.c
new file mode 100644
index 00000000..bb139a49
--- /dev/null
+++ b/src/libs/softfloat-3e/source/i32_to_f32.c
@@ -0,0 +1,58 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float32_t i32_to_f32( int32_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ bool sign;
+ union ui32_f32 uZ;
+ uint_fast32_t absA;
+
+ sign = (a < 0);
+ if ( ! (a & 0x7FFFFFFF) ) {
+ uZ.ui = sign ? packToF32UI( 1, 0x9E, 0 ) : 0;
+ return uZ.f;
+ }
+ absA = sign ? -(uint_fast32_t) a : (uint_fast32_t) a;
+ return softfloat_normRoundPackToF32( sign, 0x9C, absA SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/i32_to_f64.c b/src/libs/softfloat-3e/source/i32_to_f64.c
new file mode 100644
index 00000000..29a6f4ed
--- /dev/null
+++ b/src/libs/softfloat-3e/source/i32_to_f64.c
@@ -0,0 +1,66 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float64_t i32_to_f64( int32_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ uint_fast64_t uiZ;
+ bool sign;
+ uint_fast32_t absA;
+ int_fast8_t shiftDist;
+ union ui64_f64 uZ;
+ SOFTFLOAT_STATE_NOREF();
+
+ if ( ! a ) {
+ uiZ = 0;
+ } else {
+ sign = (a < 0);
+ absA = sign ? -(uint_fast32_t) a : (uint_fast32_t) a;
+ shiftDist = softfloat_countLeadingZeros32( absA ) + 21;
+ uiZ =
+ packToF64UI(
+ sign, 0x432 - shiftDist, (uint_fast64_t) absA<<shiftDist );
+ }
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/i64_to_extF80.c b/src/libs/softfloat-3e/source/i64_to_extF80.c
new file mode 100644
index 00000000..b38b6914
--- /dev/null
+++ b/src/libs/softfloat-3e/source/i64_to_extF80.c
@@ -0,0 +1,66 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+extFloat80_t i64_to_extF80( int64_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ uint_fast16_t uiZ64;
+ uint_fast64_t absA;
+ bool sign;
+ int_fast8_t shiftDist;
+ union { struct extFloat80M s; extFloat80_t f; } uZ;
+ SOFTFLOAT_STATE_NOREF();
+
+ uiZ64 = 0;
+ absA = 0;
+ if ( a ) {
+ sign = (a < 0);
+ absA = sign ? -(uint_fast64_t) a : (uint_fast64_t) a;
+ shiftDist = softfloat_countLeadingZeros64( absA );
+ uiZ64 = packToExtF80UI64( sign, 0x403E - shiftDist );
+ absA <<= shiftDist;
+ }
+ uZ.s.signExp = uiZ64;
+ uZ.s.signif = absA;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/i64_to_extF80M.c b/src/libs/softfloat-3e/source/i64_to_extF80M.c
new file mode 100644
index 00000000..4bbe5615
--- /dev/null
+++ b/src/libs/softfloat-3e/source/i64_to_extF80M.c
@@ -0,0 +1,79 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void i64_to_extF80M( int64_t a, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ *zPtr = i64_to_extF80( a SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void i64_to_extF80M( int64_t a, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ struct extFloat80M *zSPtr;
+ uint_fast16_t uiZ64;
+ uint64_t sigZ;
+ bool sign;
+ uint64_t absA;
+ int_fast8_t shiftDist;
+ SOFTFLOAT_STATE_NOREF();
+
+ zSPtr = (struct extFloat80M *) zPtr;
+ uiZ64 = 0;
+ sigZ = 0;
+ if ( a ) {
+ sign = (a < 0);
+ absA = sign ? -(uint64_t) a : (uint64_t) a;
+ shiftDist = softfloat_countLeadingZeros64( absA );
+ uiZ64 = packToExtF80UI64( sign, 0x403E - shiftDist );
+ sigZ = absA<<shiftDist;
+ }
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = sigZ;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/i64_to_f128.c b/src/libs/softfloat-3e/source/i64_to_f128.c
new file mode 100644
index 00000000..0f7c766f
--- /dev/null
+++ b/src/libs/softfloat-3e/source/i64_to_f128.c
@@ -0,0 +1,73 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float128_t i64_to_f128( int64_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ uint_fast64_t uiZ64, uiZ0;
+ bool sign;
+ uint_fast64_t absA;
+ int_fast8_t shiftDist;
+ struct uint128 zSig;
+ union ui128_f128 uZ;
+ SOFTFLOAT_STATE_NOREF();
+
+ if ( ! a ) {
+ uiZ64 = 0;
+ uiZ0 = 0;
+ } else {
+ sign = (a < 0);
+ absA = sign ? -(uint_fast64_t) a : (uint_fast64_t) a;
+ shiftDist = softfloat_countLeadingZeros64( absA ) + 49;
+ if ( 64 <= shiftDist ) {
+ zSig.v64 = absA<<(shiftDist - 64);
+ zSig.v0 = 0;
+ } else {
+ zSig = softfloat_shortShiftLeft128( 0, absA, shiftDist );
+ }
+ uiZ64 = packToF128UI64( sign, 0x406E - shiftDist, zSig.v64 );
+ uiZ0 = zSig.v0;
+ }
+ uZ.ui.v64 = uiZ64;
+ uZ.ui.v0 = uiZ0;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/i64_to_f128M.c b/src/libs/softfloat-3e/source/i64_to_f128M.c
new file mode 100644
index 00000000..77fb56e2
--- /dev/null
+++ b/src/libs/softfloat-3e/source/i64_to_f128M.c
@@ -0,0 +1,93 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void i64_to_f128M( int64_t a, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ *zPtr = i64_to_f128( a SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void i64_to_f128M( int64_t a, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ uint32_t *zWPtr;
+ uint32_t uiZ96, uiZ64;
+ bool sign;
+ uint64_t absA;
+ uint_fast8_t shiftDist;
+ uint32_t *ptr;
+ SOFTFLOAT_STATE_NOREF();
+
+ zWPtr = (uint32_t *) zPtr;
+ uiZ96 = 0;
+ uiZ64 = 0;
+ zWPtr[indexWord( 4, 1 )] = 0;
+ zWPtr[indexWord( 4, 0 )] = 0;
+ if ( a ) {
+ sign = (a < 0);
+ absA = sign ? -(uint64_t) a : (uint64_t) a;
+ shiftDist = softfloat_countLeadingZeros64( absA ) + 17;
+ if ( shiftDist < 32 ) {
+ ptr = zWPtr + indexMultiwordHi( 4, 3 );
+ ptr[indexWord( 3, 2 )] = 0;
+ ptr[indexWord( 3, 1 )] = absA>>32;
+ ptr[indexWord( 3, 0 )] = absA;
+ softfloat_shortShiftLeft96M( ptr, shiftDist, ptr );
+ ptr[indexWordHi( 3 )] =
+ packToF128UI96(
+ sign, 0x404E - shiftDist, ptr[indexWordHi( 3 )] );
+ return;
+ }
+ absA <<= shiftDist - 32;
+ uiZ96 = packToF128UI96( sign, 0x404E - shiftDist, absA>>32 );
+ uiZ64 = absA;
+ }
+ zWPtr[indexWord( 4, 3 )] = uiZ96;
+ zWPtr[indexWord( 4, 2 )] = uiZ64;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/i64_to_f16.c b/src/libs/softfloat-3e/source/i64_to_f16.c
new file mode 100644
index 00000000..1860ed4a
--- /dev/null
+++ b/src/libs/softfloat-3e/source/i64_to_f16.c
@@ -0,0 +1,70 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float16_t i64_to_f16( int64_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ bool sign;
+ uint_fast64_t absA;
+ int_fast8_t shiftDist;
+ union ui16_f16 u;
+ uint_fast16_t sig;
+
+ sign = (a < 0);
+ absA = sign ? -(uint_fast64_t) a : (uint_fast64_t) a;
+ shiftDist = softfloat_countLeadingZeros64( absA ) - 53;
+ if ( 0 <= shiftDist ) {
+ u.ui =
+ a ? packToF16UI(
+ sign, 0x18 - shiftDist, (uint_fast16_t) absA<<shiftDist )
+ : 0;
+ return u.f;
+ } else {
+ shiftDist += 4;
+ sig =
+ (shiftDist < 0)
+ ? softfloat_shortShiftRightJam64( absA, -shiftDist )
+ : (uint_fast16_t) absA<<shiftDist;
+ return softfloat_roundPackToF16( sign, 0x1C - shiftDist, sig SOFTFLOAT_STATE_ARG_COMMA );
+ }
+
+}
+
diff --git a/src/libs/softfloat-3e/source/i64_to_f32.c b/src/libs/softfloat-3e/source/i64_to_f32.c
new file mode 100644
index 00000000..406cb4d2
--- /dev/null
+++ b/src/libs/softfloat-3e/source/i64_to_f32.c
@@ -0,0 +1,70 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float32_t i64_to_f32( int64_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ bool sign;
+ uint_fast64_t absA;
+ int_fast8_t shiftDist;
+ union ui32_f32 u;
+ uint_fast32_t sig;
+
+ sign = (a < 0);
+ absA = sign ? -(uint_fast64_t) a : (uint_fast64_t) a;
+ shiftDist = softfloat_countLeadingZeros64( absA ) - 40;
+ if ( 0 <= shiftDist ) {
+ u.ui =
+ a ? packToF32UI(
+ sign, 0x95 - shiftDist, (uint_fast32_t) absA<<shiftDist )
+ : 0;
+ return u.f;
+ } else {
+ shiftDist += 7;
+ sig =
+ (shiftDist < 0)
+ ? softfloat_shortShiftRightJam64( absA, -shiftDist )
+ : (uint_fast32_t) absA<<shiftDist;
+ return softfloat_roundPackToF32( sign, 0x9C - shiftDist, sig SOFTFLOAT_STATE_ARG_COMMA );
+ }
+
+}
+
diff --git a/src/libs/softfloat-3e/source/i64_to_f64.c b/src/libs/softfloat-3e/source/i64_to_f64.c
new file mode 100644
index 00000000..156f4eb2
--- /dev/null
+++ b/src/libs/softfloat-3e/source/i64_to_f64.c
@@ -0,0 +1,58 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float64_t i64_to_f64( int64_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ bool sign;
+ union ui64_f64 uZ;
+ uint_fast64_t absA;
+
+ sign = (a < 0);
+ if ( ! (a & UINT64_C( 0x7FFFFFFFFFFFFFFF )) ) {
+ uZ.ui = sign ? packToF64UI( 1, 0x43E, 0 ) : 0;
+ return uZ.f;
+ }
+ absA = sign ? -(uint_fast64_t) a : (uint_fast64_t) a;
+ return softfloat_normRoundPackToF64( sign, 0x43C, absA SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/include/internals.h b/src/libs/softfloat-3e/source/include/internals.h
new file mode 100644
index 00000000..2b9ac877
--- /dev/null
+++ b/src/libs/softfloat-3e/source/include/internals.h
@@ -0,0 +1,286 @@
+
+/*============================================================================
+
+This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#ifndef internals_h
+#define internals_h 1
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "primitives.h"
+#include "softfloat_types.h"
+
+union ui16_f16 { uint16_t ui; float16_t f; };
+union ui32_f32 { uint32_t ui; float32_t f; };
+union ui64_f64 { uint64_t ui; float64_t f; };
+
+#ifdef SOFTFLOAT_FAST_INT64
+union extF80M_extF80 { struct extFloat80M fM; extFloat80_t f; };
+# define EXTF80M_EXTF80_INIT( a_signExp, a_signif ) { EXTFLOAT80M_INIT( a_signExp, a_signif ) } /* VBox */
+# define EXTF80M_EXTF80_INIT3( a_sign, a_signif, a_exp ) { EXTFLOAT80M_INIT3( a_sign, a_signif, a_exp ) } /* VBox */
+# define EXTF80M_EXTF80_INIT_C( a_signExp, a_signif ) { EXTFLOAT80M_INIT_C( a_signExp, a_signif ) } /* VBox */
+# define EXTF80M_EXTF80_INIT3_C( a_sign, a_signif, a_exp ) { EXTFLOAT80M_INIT3_C( a_sign, a_signif, a_exp ) } /* VBox */
+union ui128_f128 { struct uint128 ui; float128_t f; };
+#endif
+
+enum {
+ softfloat_mulAdd_subC = 1,
+ softfloat_mulAdd_subProd = 2
+};
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+uint_fast32_t softfloat_roundToUI32( bool, uint_fast64_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+
+#ifdef SOFTFLOAT_FAST_INT64
+uint_fast64_t
+ softfloat_roundToUI64(
+ bool, uint_fast64_t, uint_fast64_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+#else
+uint_fast64_t softfloat_roundMToUI64( bool, uint32_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+#endif
+
+int_fast32_t softfloat_roundToI32( bool, uint_fast64_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+
+#ifdef SOFTFLOAT_FAST_INT64
+int_fast64_t
+ softfloat_roundToI64(
+ bool, uint_fast64_t, uint_fast64_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+#else
+int_fast64_t softfloat_roundMToI64( bool, uint32_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define signF16UI( a ) ((bool) ((uint16_t) (a)>>15))
+#define expF16UI( a ) ((int_fast8_t) ((a)>>10) & 0x1F)
+#define fracF16UI( a ) ((a) & 0x03FF)
+#define packToF16UI( sign, exp, sig ) (((uint16_t) (sign)<<15) + ((uint16_t) (exp)<<10) + (sig))
+
+#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF))
+
+struct exp8_sig16 { int_fast8_t exp; uint_fast16_t sig; };
+struct exp8_sig16 softfloat_normSubnormalF16Sig( uint_fast16_t );
+
+float16_t softfloat_roundPackToF16( bool, int_fast16_t, uint_fast16_t SOFTFLOAT_STATE_DECL_COMMA );
+float16_t softfloat_normRoundPackToF16( bool, int_fast16_t, uint_fast16_t SOFTFLOAT_STATE_DECL_COMMA );
+
+float16_t softfloat_addMagsF16( uint_fast16_t, uint_fast16_t SOFTFLOAT_STATE_DECL_COMMA );
+float16_t softfloat_subMagsF16( uint_fast16_t, uint_fast16_t SOFTFLOAT_STATE_DECL_COMMA );
+float16_t
+ softfloat_mulAddF16(
+ uint_fast16_t, uint_fast16_t, uint_fast16_t, uint_fast8_t SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define signF32UI( a ) ((bool) ((uint32_t) (a)>>31))
+#define expF32UI( a ) ((int_fast16_t) ((a)>>23) & 0xFF)
+#define fracF32UI( a ) ((a) & 0x007FFFFF)
+#define packToF32UI( sign, exp, sig ) (((uint32_t) (sign)<<31) + ((uint32_t) (exp)<<23) + (sig))
+
+#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF))
+
+struct exp16_sig32 { int_fast16_t exp; uint_fast32_t sig; };
+struct exp16_sig32 softfloat_normSubnormalF32Sig( uint_fast32_t );
+
+float32_t softfloat_roundPackToF32( bool, int_fast16_t, uint_fast32_t SOFTFLOAT_STATE_DECL_COMMA );
+float32_t softfloat_normRoundPackToF32( bool, int_fast16_t, uint_fast32_t SOFTFLOAT_STATE_DECL_COMMA );
+
+float32_t softfloat_addMagsF32( uint_fast32_t, uint_fast32_t SOFTFLOAT_STATE_DECL_COMMA );
+float32_t softfloat_subMagsF32( uint_fast32_t, uint_fast32_t SOFTFLOAT_STATE_DECL_COMMA );
+float32_t
+ softfloat_mulAddF32(
+ uint_fast32_t, uint_fast32_t, uint_fast32_t, uint_fast8_t SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define signF64UI( a ) ((bool) ((uint64_t) (a)>>63))
+#define expF64UI( a ) ((int_fast16_t) ((a)>>52) & 0x7FF)
+#define fracF64UI( a ) ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))
+#define packToF64UI( sign, exp, sig ) ((uint64_t) (((uint_fast64_t) (sign)<<63) + ((uint_fast64_t) (exp)<<52) + (sig)))
+
+#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF )))
+
+struct exp16_sig64 { int_fast16_t exp; uint_fast64_t sig; };
+struct exp16_sig64 softfloat_normSubnormalF64Sig( uint_fast64_t );
+
+float64_t softfloat_roundPackToF64( bool, int_fast16_t, uint_fast64_t SOFTFLOAT_STATE_DECL_COMMA );
+float64_t softfloat_normRoundPackToF64( bool, int_fast16_t, uint_fast64_t SOFTFLOAT_STATE_DECL_COMMA );
+
+float64_t softfloat_addMagsF64( uint_fast64_t, uint_fast64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+float64_t softfloat_subMagsF64( uint_fast64_t, uint_fast64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+float64_t
+ softfloat_mulAddF64(
+ uint_fast64_t, uint_fast64_t, uint_fast64_t, uint_fast8_t SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define signExtF80UI64( a64 ) ((bool) ((uint16_t) (a64)>>15))
+#define expExtF80UI64( a64 ) ((a64) & 0x7FFF)
+#define packToExtF80UI64( sign, exp ) ((uint_fast16_t) (sign)<<15 | (exp))
+
+#define isNaNExtF80UI( a64, a0 ) ((((a64) & 0x7FFF) == 0x7FFF) && ((a0) & UINT64_C( 0x7FFFFFFFFFFFFFFF )))
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+struct exp32_sig64 { int_fast32_t exp; uint64_t sig; };
+struct exp32_sig64 softfloat_normSubnormalExtF80Sig( uint_fast64_t );
+
+extFloat80_t
+ softfloat_roundPackToExtF80(
+ bool, int_fast32_t, uint_fast64_t, uint_fast64_t, uint_fast8_t SOFTFLOAT_STATE_DECL_COMMA );
+extFloat80_t
+ softfloat_normRoundPackToExtF80(
+ bool, int_fast32_t, uint_fast64_t, uint_fast64_t, uint_fast8_t SOFTFLOAT_STATE_DECL_COMMA );
+
+extFloat80_t
+ softfloat_addMagsExtF80(
+ uint_fast16_t, uint_fast64_t, uint_fast16_t, uint_fast64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+extFloat80_t
+ softfloat_subMagsExtF80(
+ uint_fast16_t, uint_fast64_t, uint_fast16_t, uint_fast64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define signF128UI64( a64 ) ((bool) ((uint64_t) (a64)>>63))
+#define expF128UI64( a64 ) ((int_fast32_t) ((a64)>>48) & 0x7FFF)
+#define fracF128UI64( a64 ) ((a64) & UINT64_C( 0x0000FFFFFFFFFFFF ))
+#define packToF128UI64( sign, exp, sig64 ) (((uint_fast64_t) (sign)<<63) + ((uint_fast64_t) (exp)<<48) + (sig64))
+
+#define isNaNF128UI( a64, a0 ) (((~(a64) & UINT64_C( 0x7FFF000000000000 )) == 0) && (a0 || ((a64) & UINT64_C( 0x0000FFFFFFFFFFFF ))))
+
+struct exp32_sig128 { int_fast32_t exp; struct uint128 sig; };
+struct exp32_sig128
+ softfloat_normSubnormalF128Sig( uint_fast64_t, uint_fast64_t );
+
+float128_t
+ softfloat_roundPackToF128(
+ bool, int_fast32_t, uint_fast64_t, uint_fast64_t, uint_fast64_t SOFTFLOAT_STATE_DECL_COMMA );
+float128_t
+ softfloat_normRoundPackToF128(
+ bool, int_fast32_t, uint_fast64_t, uint_fast64_t SOFTFLOAT_STATE_DECL_COMMA );
+
+float128_t
+ softfloat_addMagsF128(
+ uint_fast64_t, uint_fast64_t, uint_fast64_t, uint_fast64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+float128_t
+ softfloat_subMagsF128(
+ uint_fast64_t, uint_fast64_t, uint_fast64_t, uint_fast64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+float128_t
+ softfloat_mulAddF128(
+ uint_fast64_t,
+ uint_fast64_t,
+ uint_fast64_t,
+ uint_fast64_t,
+ uint_fast64_t,
+ uint_fast64_t,
+ uint_fast8_t
+ SOFTFLOAT_STATE_DECL_COMMA
+ );
+
+#else
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+bool
+ softfloat_tryPropagateNaNExtF80M(
+ const struct extFloat80M *,
+ const struct extFloat80M *,
+ struct extFloat80M *
+ SOFTFLOAT_STATE_DECL_COMMA
+ );
+void softfloat_invalidExtF80M( struct extFloat80M * SOFTFLOAT_STATE_DECL_COMMA );
+
+int softfloat_normExtF80SigM( uint64_t * );
+
+void
+ softfloat_roundPackMToExtF80M(
+ bool, int32_t, uint32_t *, uint_fast8_t, struct extFloat80M * SOFTFLOAT_STATE_DECL_COMMA );
+void
+ softfloat_normRoundPackMToExtF80M(
+ bool, int32_t, uint32_t *, uint_fast8_t, struct extFloat80M * SOFTFLOAT_STATE_DECL_COMMA );
+
+void
+ softfloat_addExtF80M(
+ const struct extFloat80M *,
+ const struct extFloat80M *,
+ struct extFloat80M *,
+ bool
+ SOFTFLOAT_STATE_DECL_COMMA
+ );
+
+int
+ softfloat_compareNonnormExtF80M(
+ const struct extFloat80M *, const struct extFloat80M * SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define signF128UI96( a96 ) ((bool) ((uint32_t) (a96)>>31))
+#define expF128UI96( a96 ) ((int32_t) ((a96)>>16) & 0x7FFF)
+#define fracF128UI96( a96 ) ((a96) & 0x0000FFFF)
+#define packToF128UI96( sign, exp, sig96 ) (((uint32_t) (sign)<<31) + ((uint32_t) (exp)<<16) + (sig96))
+
+bool softfloat_isNaNF128M( const uint32_t * );
+
+bool
+ softfloat_tryPropagateNaNF128M(
+ const uint32_t *, const uint32_t *, uint32_t * SOFTFLOAT_STATE_DECL_COMMA );
+void softfloat_invalidF128M( uint32_t * SOFTFLOAT_STATE_DECL_COMMA );
+
+int softfloat_shiftNormSigF128M( const uint32_t *, uint_fast8_t, uint32_t * );
+
+void softfloat_roundPackMToF128M( bool, int32_t, uint32_t *, uint32_t * SOFTFLOAT_STATE_DECL_COMMA );
+void softfloat_normRoundPackMToF128M( bool, int32_t, uint32_t *, uint32_t * SOFTFLOAT_STATE_DECL_COMMA );
+
+void
+ softfloat_addF128M( const uint32_t *, const uint32_t *, uint32_t *, bool SOFTFLOAT_STATE_DECL_COMMA );
+void
+ softfloat_mulAddF128M(
+ const uint32_t *,
+ const uint32_t *,
+ const uint32_t *,
+ uint32_t *,
+ uint_fast8_t
+ SOFTFLOAT_STATE_DECL_COMMA
+ );
+
+#endif
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/include/opts-GCC.h b/src/libs/softfloat-3e/source/include/opts-GCC.h
new file mode 100644
index 00000000..1c32a8f2
--- /dev/null
+++ b/src/libs/softfloat-3e/source/include/opts-GCC.h
@@ -0,0 +1,117 @@
+
+/*============================================================================
+
+This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2017 The Regents of the University of California. All rights
+reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#ifndef opts_GCC_h
+#define opts_GCC_h 1
+
+#ifdef INLINE
+
+#include <stdint.h>
+#include "primitiveTypes.h"
+
+#ifdef SOFTFLOAT_BUILTIN_CLZ
+
+INLINE uint_fast8_t softfloat_countLeadingZeros16( uint16_t a )
+ { return a ? __builtin_clz( a ) - 16 : 16; }
+#define softfloat_countLeadingZeros16 softfloat_countLeadingZeros16
+
+INLINE uint_fast8_t softfloat_countLeadingZeros32( uint32_t a )
+ { return a ? __builtin_clz( a ) : 32; }
+#define softfloat_countLeadingZeros32 softfloat_countLeadingZeros32
+
+INLINE uint_fast8_t softfloat_countLeadingZeros64( uint64_t a )
+ { return a ? __builtin_clzll( a ) : 64; }
+#define softfloat_countLeadingZeros64 softfloat_countLeadingZeros64
+
+#endif
+
+#ifdef SOFTFLOAT_INTRINSIC_INT128
+
+#include <iprt/cdefs.h> /* VBox: shut up pedantic warnings */
+RT_GCC_EXTENSION typedef unsigned __int128 softfloat_int128_t;
+
+INLINE struct uint128 softfloat_mul64ByShifted32To128( uint64_t a, uint32_t b )
+{
+ union { softfloat_int128_t ui; struct uint128 s; } uZ;
+ uZ.ui = (softfloat_int128_t) a * ((uint_fast64_t) b<<32);
+ return uZ.s;
+}
+#define softfloat_mul64ByShifted32To128 softfloat_mul64ByShifted32To128
+
+INLINE struct uint128 softfloat_mul64To128( uint64_t a, uint64_t b )
+{
+ union { softfloat_int128_t ui; struct uint128 s; } uZ;
+ uZ.ui = (softfloat_int128_t) a * b;
+ return uZ.s;
+}
+#define softfloat_mul64To128 softfloat_mul64To128
+
+INLINE
+struct uint128 softfloat_mul128By32( uint64_t a64, uint64_t a0, uint32_t b )
+{
+ union { softfloat_int128_t ui; struct uint128 s; } uZ;
+ uZ.ui = ((softfloat_int128_t) a64<<64 | a0) * b;
+ return uZ.s;
+}
+#define softfloat_mul128By32 softfloat_mul128By32
+
+INLINE
+void
+ softfloat_mul128To256M(
+ uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0, uint64_t *zPtr )
+{
+ softfloat_int128_t z0, mid1, mid, z128;
+ z0 = (softfloat_int128_t) a0 * b0;
+ mid1 = (softfloat_int128_t) a64 * b0;
+ mid = mid1 + (softfloat_int128_t) a0 * b64;
+ z128 = (softfloat_int128_t) a64 * b64;
+ z128 += (softfloat_int128_t) (mid < mid1)<<64 | mid>>64;
+ mid <<= 64;
+ z0 += mid;
+ z128 += (z0 < mid);
+ zPtr[indexWord( 4, 0 )] = z0;
+ zPtr[indexWord( 4, 1 )] = z0>>64;
+ zPtr[indexWord( 4, 2 )] = z128;
+ zPtr[indexWord( 4, 3 )] = z128>>64;
+}
+#define softfloat_mul128To256M softfloat_mul128To256M
+
+#endif
+
+#endif
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/include/primitiveTypes.h b/src/libs/softfloat-3e/source/include/primitiveTypes.h
new file mode 100644
index 00000000..e3054006
--- /dev/null
+++ b/src/libs/softfloat-3e/source/include/primitiveTypes.h
@@ -0,0 +1,85 @@
+
+/*============================================================================
+
+This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#ifndef primitiveTypes_h
+#define primitiveTypes_h 1
+
+#include <stdint.h>
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+#ifdef LITTLEENDIAN
+struct uint128 { uint64_t v0, v64; };
+struct uint64_extra { uint64_t extra, v; };
+struct uint128_extra { uint64_t extra; struct uint128 v; };
+#else
+struct uint128 { uint64_t v64, v0; };
+struct uint64_extra { uint64_t v, extra; };
+struct uint128_extra { struct uint128 v; uint64_t extra; };
+#endif
+
+#endif
+
+/*----------------------------------------------------------------------------
+| These macros are used to isolate the differences in word order between big-
+| endian and little-endian platforms.
+*----------------------------------------------------------------------------*/
+#ifdef LITTLEENDIAN
+#define wordIncr 1
+#define indexWord( total, n ) (n)
+#define indexWordHi( total ) ((total) - 1)
+#define indexWordLo( total ) 0
+#define indexMultiword( total, m, n ) (n)
+#define indexMultiwordHi( total, n ) ((total) - (n))
+#define indexMultiwordLo( total, n ) 0
+#define indexMultiwordHiBut( total, n ) (n)
+#define indexMultiwordLoBut( total, n ) 0
+#define INIT_UINTM4( v3, v2, v1, v0 ) { v0, v1, v2, v3 }
+#else
+#define wordIncr -1
+#define indexWord( total, n ) ((total) - 1 - (n))
+#define indexWordHi( total ) 0
+#define indexWordLo( total ) ((total) - 1)
+#define indexMultiword( total, m, n ) ((total) - 1 - (m))
+#define indexMultiwordHi( total, n ) 0
+#define indexMultiwordLo( total, n ) ((total) - (n))
+#define indexMultiwordHiBut( total, n ) 0
+#define indexMultiwordLoBut( total, n ) (n)
+#define INIT_UINTM4( v3, v2, v1, v0 ) { v3, v2, v1, v0 }
+#endif
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/include/primitives.h b/src/libs/softfloat-3e/source/include/primitives.h
new file mode 100644
index 00000000..10847817
--- /dev/null
+++ b/src/libs/softfloat-3e/source/include/primitives.h
@@ -0,0 +1,1160 @@
+
+/*============================================================================
+
+This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#ifndef primitives_h
+#define primitives_h 1
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "primitiveTypes.h"
+
+#ifndef softfloat_shortShiftRightJam64
+/*----------------------------------------------------------------------------
+| Shifts 'a' right by the number of bits given in 'dist', which must be in
+| the range 1 to 63. If any nonzero bits are shifted off, they are "jammed"
+| into the least-significant bit of the shifted value by setting the least-
+| significant bit to 1. This shifted-and-jammed value is returned.
+*----------------------------------------------------------------------------*/
+#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
+INLINE
+uint64_t softfloat_shortShiftRightJam64( uint64_t a, uint_fast8_t dist )
+ { return a>>dist | ((a & (((uint_fast64_t) 1<<dist) - 1)) != 0); }
+#else
+uint64_t softfloat_shortShiftRightJam64( uint64_t a, uint_fast8_t dist );
+#endif
+#endif
+
+#ifndef softfloat_shiftRightJam32
+/*----------------------------------------------------------------------------
+| Shifts 'a' right by the number of bits given in 'dist', which must not
+| be zero. If any nonzero bits are shifted off, they are "jammed" into the
+| least-significant bit of the shifted value by setting the least-significant
+| bit to 1. This shifted-and-jammed value is returned.
+| The value of 'dist' can be arbitrarily large. In particular, if 'dist' is
+| greater than 32, the result will be either 0 or 1, depending on whether 'a'
+| is zero or nonzero.
+*----------------------------------------------------------------------------*/
+#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
+INLINE uint32_t softfloat_shiftRightJam32( uint32_t a, uint_fast16_t dist )
+{
+ return
+ (dist < 31) ? a>>dist | ((uint32_t) (a<<(-dist & 31)) != 0) : (a != 0);
+}
+#else
+uint32_t softfloat_shiftRightJam32( uint32_t a, uint_fast16_t dist );
+#endif
+#endif
+
+#ifndef softfloat_shiftRightJam64
+/*----------------------------------------------------------------------------
+| Shifts 'a' right by the number of bits given in 'dist', which must not
+| be zero. If any nonzero bits are shifted off, they are "jammed" into the
+| least-significant bit of the shifted value by setting the least-significant
+| bit to 1. This shifted-and-jammed value is returned.
+| The value of 'dist' can be arbitrarily large. In particular, if 'dist' is
+| greater than 64, the result will be either 0 or 1, depending on whether 'a'
+| is zero or nonzero.
+*----------------------------------------------------------------------------*/
+#if defined INLINE_LEVEL && (3 <= INLINE_LEVEL)
+INLINE uint64_t softfloat_shiftRightJam64( uint64_t a, uint_fast32_t dist )
+{
+ return
+ (dist < 63) ? a>>dist | ((uint64_t) (a<<(-dist & 63)) != 0) : (a != 0);
+}
+#else
+uint64_t softfloat_shiftRightJam64( uint64_t a, uint_fast32_t dist );
+#endif
+#endif
+
+/*----------------------------------------------------------------------------
+| A constant table that translates an 8-bit unsigned integer (the array index)
+| into the number of leading 0 bits before the most-significant 1 of that
+| integer. For integer zero (index 0), the corresponding table element is 8.
+*----------------------------------------------------------------------------*/
+extern const uint_least8_t softfloat_countLeadingZeros8[256];
+
+#ifndef softfloat_countLeadingZeros16
+/*----------------------------------------------------------------------------
+| Returns the number of leading 0 bits before the most-significant 1 bit of
+| 'a'. If 'a' is zero, 16 is returned.
+*----------------------------------------------------------------------------*/
+#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
+INLINE uint_fast8_t softfloat_countLeadingZeros16( uint16_t a )
+{
+ uint_fast8_t count = 8;
+ if ( 0x100 <= a ) {
+ count = 0;
+ a >>= 8;
+ }
+ count += softfloat_countLeadingZeros8[a];
+ return count;
+}
+#else
+uint_fast8_t softfloat_countLeadingZeros16( uint16_t a );
+#endif
+#endif
+
+#ifndef softfloat_countLeadingZeros32
+/*----------------------------------------------------------------------------
+| Returns the number of leading 0 bits before the most-significant 1 bit of
+| 'a'. If 'a' is zero, 32 is returned.
+*----------------------------------------------------------------------------*/
+#if defined INLINE_LEVEL && (3 <= INLINE_LEVEL)
+INLINE uint_fast8_t softfloat_countLeadingZeros32( uint32_t a )
+{
+ uint_fast8_t count = 0;
+ if ( a < 0x10000 ) {
+ count = 16;
+ a <<= 16;
+ }
+ if ( a < 0x1000000 ) {
+ count += 8;
+ a <<= 8;
+ }
+ count += softfloat_countLeadingZeros8[a>>24];
+ return count;
+}
+#else
+uint_fast8_t softfloat_countLeadingZeros32( uint32_t a );
+#endif
+#endif
+
+#ifndef softfloat_countLeadingZeros64
+/*----------------------------------------------------------------------------
+| Returns the number of leading 0 bits before the most-significant 1 bit of
+| 'a'. If 'a' is zero, 64 is returned.
+*----------------------------------------------------------------------------*/
+uint_fast8_t softfloat_countLeadingZeros64( uint64_t a );
+#endif
+
+extern const uint16_t softfloat_approxRecip_1k0s[16];
+extern const uint16_t softfloat_approxRecip_1k1s[16];
+
+#ifndef softfloat_approxRecip32_1
+/*----------------------------------------------------------------------------
+| Returns an approximation to the reciprocal of the number represented by 'a',
+| where 'a' is interpreted as an unsigned fixed-point number with one integer
+| bit and 31 fraction bits. The 'a' input must be "normalized", meaning that
+| its most-significant bit (bit 31) must be 1. Thus, if A is the value of
+| the fixed-point interpretation of 'a', then 1 <= A < 2. The returned value
+| is interpreted as a pure unsigned fraction, having no integer bits and 32
+| fraction bits. The approximation returned is never greater than the true
+| reciprocal 1/A, and it differs from the true reciprocal by at most 2.006 ulp
+| (units in the last place).
+*----------------------------------------------------------------------------*/
+#ifdef SOFTFLOAT_FAST_DIV64TO32
+#define softfloat_approxRecip32_1( a ) ((uint32_t) (UINT64_C( 0x7FFFFFFFFFFFFFFF ) / (uint32_t) (a)))
+#else
+uint32_t softfloat_approxRecip32_1( uint32_t a );
+#endif
+#endif
+
+extern const uint16_t softfloat_approxRecipSqrt_1k0s[16];
+extern const uint16_t softfloat_approxRecipSqrt_1k1s[16];
+
+#ifndef softfloat_approxRecipSqrt32_1
+/*----------------------------------------------------------------------------
+| Returns an approximation to the reciprocal of the square root of the number
+| represented by 'a', where 'a' is interpreted as an unsigned fixed-point
+| number either with one integer bit and 31 fraction bits or with two integer
+| bits and 30 fraction bits. The format of 'a' is determined by 'oddExpA',
+| which must be either 0 or 1. If 'oddExpA' is 1, 'a' is interpreted as
+| having one integer bit, and if 'oddExpA' is 0, 'a' is interpreted as having
+| two integer bits. The 'a' input must be "normalized", meaning that its
+| most-significant bit (bit 31) must be 1. Thus, if A is the value of the
+| fixed-point interpretation of 'a', it follows that 1 <= A < 2 when 'oddExpA'
+| is 1, and 2 <= A < 4 when 'oddExpA' is 0.
+| The returned value is interpreted as a pure unsigned fraction, having
+| no integer bits and 32 fraction bits. The approximation returned is never
+| greater than the true reciprocal 1/sqrt(A), and it differs from the true
+| reciprocal by at most 2.06 ulp (units in the last place). The approximation
+| returned is also always within the range 0.5 to 1; thus, the most-
+| significant bit of the result is always set.
+*----------------------------------------------------------------------------*/
+uint32_t softfloat_approxRecipSqrt32_1( unsigned int oddExpA, uint32_t a );
+#endif
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+/*----------------------------------------------------------------------------
+| The following functions are needed only when 'SOFTFLOAT_FAST_INT64' is
+| defined.
+*----------------------------------------------------------------------------*/
+
+#ifndef softfloat_eq128
+/*----------------------------------------------------------------------------
+| Returns true if the 128-bit unsigned integer formed by concatenating 'a64'
+| and 'a0' is equal to the 128-bit unsigned integer formed by concatenating
+| 'b64' and 'b0'.
+*----------------------------------------------------------------------------*/
+#if defined INLINE_LEVEL && (1 <= INLINE_LEVEL)
+INLINE
+bool softfloat_eq128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )
+ { return (a64 == b64) && (a0 == b0); }
+#else
+bool softfloat_eq128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 );
+#endif
+#endif
+
+#ifndef softfloat_le128
+/*----------------------------------------------------------------------------
+| Returns true if the 128-bit unsigned integer formed by concatenating 'a64'
+| and 'a0' is less than or equal to the 128-bit unsigned integer formed by
+| concatenating 'b64' and 'b0'.
+*----------------------------------------------------------------------------*/
+#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
+INLINE
+bool softfloat_le128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )
+ { return (a64 < b64) || ((a64 == b64) && (a0 <= b0)); }
+#else
+bool softfloat_le128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 );
+#endif
+#endif
+
+#ifndef softfloat_lt128
+/*----------------------------------------------------------------------------
+| Returns true if the 128-bit unsigned integer formed by concatenating 'a64'
+| and 'a0' is less than the 128-bit unsigned integer formed by concatenating
+| 'b64' and 'b0'.
+*----------------------------------------------------------------------------*/
+#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
+INLINE
+bool softfloat_lt128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )
+ { return (a64 < b64) || ((a64 == b64) && (a0 < b0)); }
+#else
+bool softfloat_lt128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 );
+#endif
+#endif
+
+#ifndef softfloat_shortShiftLeft128
+/*----------------------------------------------------------------------------
+| Shifts the 128 bits formed by concatenating 'a64' and 'a0' left by the
+| number of bits given in 'dist', which must be in the range 1 to 63.
+*----------------------------------------------------------------------------*/
+#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
+INLINE
+struct uint128
+ softfloat_shortShiftLeft128( uint64_t a64, uint64_t a0, uint_fast8_t dist )
+{
+ struct uint128 z;
+ z.v64 = a64<<dist | a0>>(-dist & 63);
+ z.v0 = a0<<dist;
+ return z;
+}
+#else
+struct uint128
+ softfloat_shortShiftLeft128( uint64_t a64, uint64_t a0, uint_fast8_t dist );
+#endif
+#endif
+
+#ifndef softfloat_shortShiftRight128
+/*----------------------------------------------------------------------------
+| Shifts the 128 bits formed by concatenating 'a64' and 'a0' right by the
+| number of bits given in 'dist', which must be in the range 1 to 63.
+*----------------------------------------------------------------------------*/
+#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
+INLINE
+struct uint128
+ softfloat_shortShiftRight128( uint64_t a64, uint64_t a0, uint_fast8_t dist )
+{
+ struct uint128 z;
+ z.v64 = a64>>dist;
+ z.v0 = a64<<(-dist & 63) | a0>>dist;
+ return z;
+}
+#else
+struct uint128
+ softfloat_shortShiftRight128( uint64_t a64, uint64_t a0, uint_fast8_t dist );
+#endif
+#endif
+
+#ifndef softfloat_shortShiftRightJam64Extra
+/*----------------------------------------------------------------------------
+| This function is the same as 'softfloat_shiftRightJam64Extra' (below),
+| except that 'dist' must be in the range 1 to 63.
+*----------------------------------------------------------------------------*/
+#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
+INLINE
+struct uint64_extra
+ softfloat_shortShiftRightJam64Extra(
+ uint64_t a, uint64_t extra, uint_fast8_t dist )
+{
+ struct uint64_extra z;
+ z.v = a>>dist;
+ z.extra = a<<(-dist & 63) | (extra != 0);
+ return z;
+}
+#else
+struct uint64_extra
+ softfloat_shortShiftRightJam64Extra(
+ uint64_t a, uint64_t extra, uint_fast8_t dist );
+#endif
+#endif
+
+#ifndef softfloat_shortShiftRightJam128
+/*----------------------------------------------------------------------------
+| Shifts the 128 bits formed by concatenating 'a64' and 'a0' right by the
+| number of bits given in 'dist', which must be in the range 1 to 63. If any
+| nonzero bits are shifted off, they are "jammed" into the least-significant
+| bit of the shifted value by setting the least-significant bit to 1. This
+| shifted-and-jammed value is returned.
+*----------------------------------------------------------------------------*/
+#if defined INLINE_LEVEL && (3 <= INLINE_LEVEL)
+INLINE
+struct uint128
+ softfloat_shortShiftRightJam128(
+ uint64_t a64, uint64_t a0, uint_fast8_t dist )
+{
+ uint_fast8_t negDist = -dist;
+ struct uint128 z;
+ z.v64 = a64>>dist;
+ z.v0 =
+ a64<<(negDist & 63) | a0>>dist
+ | ((uint64_t) (a0<<(negDist & 63)) != 0);
+ return z;
+}
+#else
+struct uint128
+ softfloat_shortShiftRightJam128(
+ uint64_t a64, uint64_t a0, uint_fast8_t dist );
+#endif
+#endif
+
+#ifndef softfloat_shortShiftRightJam128Extra
+/*----------------------------------------------------------------------------
+| This function is the same as 'softfloat_shiftRightJam128Extra' (below),
+| except that 'dist' must be in the range 1 to 63.
+*----------------------------------------------------------------------------*/
+#if defined INLINE_LEVEL && (3 <= INLINE_LEVEL)
+INLINE
+struct uint128_extra
+ softfloat_shortShiftRightJam128Extra(
+ uint64_t a64, uint64_t a0, uint64_t extra, uint_fast8_t dist )
+{
+ uint_fast8_t negDist = -dist;
+ struct uint128_extra z;
+ z.v.v64 = a64>>dist;
+ z.v.v0 = a64<<(negDist & 63) | a0>>dist;
+ z.extra = a0<<(negDist & 63) | (extra != 0);
+ return z;
+}
+#else
+struct uint128_extra
+ softfloat_shortShiftRightJam128Extra(
+ uint64_t a64, uint64_t a0, uint64_t extra, uint_fast8_t dist );
+#endif
+#endif
+
+#ifndef softfloat_shiftRightJam64Extra
+/*----------------------------------------------------------------------------
+| Shifts the 128 bits formed by concatenating 'a' and 'extra' right by 64
+| _plus_ the number of bits given in 'dist', which must not be zero. This
+| shifted value is at most 64 nonzero bits and is returned in the 'v' field
+| of the 'struct uint64_extra' result. The 64-bit 'extra' field of the result
+| contains a value formed as follows from the bits that were shifted off: The
+| _last_ bit shifted off is the most-significant bit of the 'extra' field, and
+| the other 63 bits of the 'extra' field are all zero if and only if _all_but_
+| _the_last_ bits shifted off were all zero.
+| (This function makes more sense if 'a' and 'extra' are considered to form
+| an unsigned fixed-point number with binary point between 'a' and 'extra'.
+| This fixed-point value is shifted right by the number of bits given in
+| 'dist', and the integer part of this shifted value is returned in the 'v'
+| field of the result. The fractional part of the shifted value is modified
+| as described above and returned in the 'extra' field of the result.)
+*----------------------------------------------------------------------------*/
+#if defined INLINE_LEVEL && (4 <= INLINE_LEVEL)
+INLINE
+struct uint64_extra
+ softfloat_shiftRightJam64Extra(
+ uint64_t a, uint64_t extra, uint_fast32_t dist )
+{
+ struct uint64_extra z;
+ if ( dist < 64 ) {
+ z.v = a>>dist;
+ z.extra = a<<(-dist & 63);
+ } else {
+ z.v = 0;
+ z.extra = (dist == 64) ? a : (a != 0);
+ }
+ z.extra |= (extra != 0);
+ return z;
+}
+#else
+struct uint64_extra
+ softfloat_shiftRightJam64Extra(
+ uint64_t a, uint64_t extra, uint_fast32_t dist );
+#endif
+#endif
+
+#ifndef softfloat_shiftRightJam128
+/*----------------------------------------------------------------------------
+| Shifts the 128 bits formed by concatenating 'a64' and 'a0' right by the
+| number of bits given in 'dist', which must not be zero. If any nonzero bits
+| are shifted off, they are "jammed" into the least-significant bit of the
+| shifted value by setting the least-significant bit to 1. This shifted-and-
+| jammed value is returned.
+| The value of 'dist' can be arbitrarily large. In particular, if 'dist' is
+| greater than 128, the result will be either 0 or 1, depending on whether the
+| original 128 bits are all zeros.
+*----------------------------------------------------------------------------*/
+struct uint128
+ softfloat_shiftRightJam128( uint64_t a64, uint64_t a0, uint_fast32_t dist );
+#endif
+
+#ifndef softfloat_shiftRightJam128Extra
+/*----------------------------------------------------------------------------
+| Shifts the 192 bits formed by concatenating 'a64', 'a0', and 'extra' right
+| by 64 _plus_ the number of bits given in 'dist', which must not be zero.
+| This shifted value is at most 128 nonzero bits and is returned in the 'v'
+| field of the 'struct uint128_extra' result. The 64-bit 'extra' field of the
+| result contains a value formed as follows from the bits that were shifted
+| off: The _last_ bit shifted off is the most-significant bit of the 'extra'
+| field, and the other 63 bits of the 'extra' field are all zero if and only
+| if _all_but_the_last_ bits shifted off were all zero.
+| (This function makes more sense if 'a64', 'a0', and 'extra' are considered
+| to form an unsigned fixed-point number with binary point between 'a0' and
+| 'extra'. This fixed-point value is shifted right by the number of bits
+| given in 'dist', and the integer part of this shifted value is returned
+| in the 'v' field of the result. The fractional part of the shifted value
+| is modified as described above and returned in the 'extra' field of the
+| result.)
+*----------------------------------------------------------------------------*/
+struct uint128_extra
+ softfloat_shiftRightJam128Extra(
+ uint64_t a64, uint64_t a0, uint64_t extra, uint_fast32_t dist );
+#endif
+
+#ifndef softfloat_shiftRightJam256M
+/*----------------------------------------------------------------------------
+| Shifts the 256-bit unsigned integer pointed to by 'aPtr' right by the number
+| of bits given in 'dist', which must not be zero. If any nonzero bits are
+| shifted off, they are "jammed" into the least-significant bit of the shifted
+| value by setting the least-significant bit to 1. This shifted-and-jammed
+| value is stored at the location pointed to by 'zPtr'. Each of 'aPtr' and
+| 'zPtr' points to an array of four 64-bit elements that concatenate in the
+| platform's normal endian order to form a 256-bit integer.
+| The value of 'dist' can be arbitrarily large. In particular, if 'dist'
+| is greater than 256, the stored result will be either 0 or 1, depending on
+| whether the original 256 bits are all zeros.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_shiftRightJam256M(
+ const uint64_t *aPtr, uint_fast32_t dist, uint64_t *zPtr );
+#endif
+
+#ifndef softfloat_add128
+/*----------------------------------------------------------------------------
+| Returns the sum of the 128-bit integer formed by concatenating 'a64' and
+| 'a0' and the 128-bit integer formed by concatenating 'b64' and 'b0'. The
+| addition is modulo 2^128, so any carry out is lost.
+*----------------------------------------------------------------------------*/
+#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
+INLINE
+struct uint128
+ softfloat_add128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )
+{
+ struct uint128 z;
+ z.v0 = a0 + b0;
+ z.v64 = a64 + b64 + (z.v0 < a0);
+ return z;
+}
+#else
+struct uint128
+ softfloat_add128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 );
+#endif
+#endif
+
+#ifndef softfloat_add256M
+/*----------------------------------------------------------------------------
+| Adds the two 256-bit integers pointed to by 'aPtr' and 'bPtr'. The addition
+| is modulo 2^256, so any carry out is lost. The sum is stored at the
+| location pointed to by 'zPtr'. Each of 'aPtr', 'bPtr', and 'zPtr' points to
+| an array of four 64-bit elements that concatenate in the platform's normal
+| endian order to form a 256-bit integer.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_add256M(
+ const uint64_t *aPtr, const uint64_t *bPtr, uint64_t *zPtr );
+#endif
+
+#ifndef softfloat_sub128
+/*----------------------------------------------------------------------------
+| Returns the difference of the 128-bit integer formed by concatenating 'a64'
+| and 'a0' and the 128-bit integer formed by concatenating 'b64' and 'b0'.
+| The subtraction is modulo 2^128, so any borrow out (carry out) is lost.
+*----------------------------------------------------------------------------*/
+#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
+INLINE
+struct uint128
+ softfloat_sub128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )
+{
+ struct uint128 z;
+ z.v0 = a0 - b0;
+ z.v64 = a64 - b64;
+ z.v64 -= (a0 < b0);
+ return z;
+}
+#else
+struct uint128
+ softfloat_sub128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 );
+#endif
+#endif
+
+#ifndef softfloat_sub256M
+/*----------------------------------------------------------------------------
+| Subtracts the 256-bit integer pointed to by 'bPtr' from the 256-bit integer
+| pointed to by 'aPtr'. The addition is modulo 2^256, so any borrow out
+| (carry out) is lost. The difference is stored at the location pointed to
+| by 'zPtr'. Each of 'aPtr', 'bPtr', and 'zPtr' points to an array of four
+| 64-bit elements that concatenate in the platform's normal endian order to
+| form a 256-bit integer.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_sub256M(
+ const uint64_t *aPtr, const uint64_t *bPtr, uint64_t *zPtr );
+#endif
+
+#ifndef softfloat_mul64ByShifted32To128
+/*----------------------------------------------------------------------------
+| Returns the 128-bit product of 'a', 'b', and 2^32.
+*----------------------------------------------------------------------------*/
+#if defined INLINE_LEVEL && (3 <= INLINE_LEVEL)
+INLINE struct uint128 softfloat_mul64ByShifted32To128( uint64_t a, uint32_t b )
+{
+ uint_fast64_t mid;
+ struct uint128 z;
+ mid = (uint_fast64_t) (uint32_t) a * b;
+ z.v0 = mid<<32;
+ z.v64 = (uint_fast64_t) (uint32_t) (a>>32) * b + (mid>>32);
+ return z;
+}
+#else
+struct uint128 softfloat_mul64ByShifted32To128( uint64_t a, uint32_t b );
+#endif
+#endif
+
+#ifndef softfloat_mul64To128
+/*----------------------------------------------------------------------------
+| Returns the 128-bit product of 'a' and 'b'.
+*----------------------------------------------------------------------------*/
+struct uint128 softfloat_mul64To128( uint64_t a, uint64_t b );
+#endif
+
+#ifndef softfloat_mul128By32
+/*----------------------------------------------------------------------------
+| Returns the product of the 128-bit integer formed by concatenating 'a64' and
+| 'a0', multiplied by 'b'. The multiplication is modulo 2^128; any overflow
+| bits are discarded.
+*----------------------------------------------------------------------------*/
+#if defined INLINE_LEVEL && (4 <= INLINE_LEVEL)
+INLINE
+struct uint128 softfloat_mul128By32( uint64_t a64, uint64_t a0, uint32_t b )
+{
+ struct uint128 z;
+ uint_fast64_t mid;
+ uint_fast32_t carry;
+ z.v0 = a0 * b;
+ mid = (uint_fast64_t) (uint32_t) (a0>>32) * b;
+ carry = (uint32_t) ((uint_fast32_t) (z.v0>>32) - (uint_fast32_t) mid);
+ z.v64 = a64 * b + (uint_fast32_t) ((mid + carry)>>32);
+ return z;
+}
+#else
+struct uint128 softfloat_mul128By32( uint64_t a64, uint64_t a0, uint32_t b );
+#endif
+#endif
+
+#ifndef softfloat_mul128To256M
+/*----------------------------------------------------------------------------
+| Multiplies the 128-bit unsigned integer formed by concatenating 'a64' and
+| 'a0' by the 128-bit unsigned integer formed by concatenating 'b64' and
+| 'b0'. The 256-bit product is stored at the location pointed to by 'zPtr'.
+| Argument 'zPtr' points to an array of four 64-bit elements that concatenate
+| in the platform's normal endian order to form a 256-bit integer.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_mul128To256M(
+ uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0, uint64_t *zPtr );
+#endif
+
+#else
+
+/*----------------------------------------------------------------------------
+| The following functions are needed only when 'SOFTFLOAT_FAST_INT64' is not
+| defined.
+*----------------------------------------------------------------------------*/
+
+#ifndef softfloat_compare96M
+/*----------------------------------------------------------------------------
+| Compares the two 96-bit unsigned integers pointed to by 'aPtr' and 'bPtr'.
+| Returns -1 if the first integer (A) is less than the second (B); returns 0
+| if the two integers are equal; and returns +1 if the first integer (A)
+| is greater than the second (B). (The result is thus the signum of A - B.)
+| Each of 'aPtr' and 'bPtr' points to an array of three 32-bit elements that
+| concatenate in the platform's normal endian order to form a 96-bit integer.
+*----------------------------------------------------------------------------*/
+int_fast8_t softfloat_compare96M( const uint32_t *aPtr, const uint32_t *bPtr );
+#endif
+
+#ifndef softfloat_compare128M
+/*----------------------------------------------------------------------------
+| Compares the two 128-bit unsigned integers pointed to by 'aPtr' and 'bPtr'.
+| Returns -1 if the first integer (A) is less than the second (B); returns 0
+| if the two integers are equal; and returns +1 if the first integer (A)
+| is greater than the second (B). (The result is thus the signum of A - B.)
+| Each of 'aPtr' and 'bPtr' points to an array of four 32-bit elements that
+| concatenate in the platform's normal endian order to form a 128-bit integer.
+*----------------------------------------------------------------------------*/
+int_fast8_t
+ softfloat_compare128M( const uint32_t *aPtr, const uint32_t *bPtr );
+#endif
+
+#ifndef softfloat_shortShiftLeft64To96M
+/*----------------------------------------------------------------------------
+| Extends 'a' to 96 bits and shifts the value left by the number of bits given
+| in 'dist', which must be in the range 1 to 31. The result is stored at the
+| location pointed to by 'zPtr'. Argument 'zPtr' points to an array of three
+| 32-bit elements that concatenate in the platform's normal endian order to
+| form a 96-bit integer.
+*----------------------------------------------------------------------------*/
+#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
+INLINE
+void
+ softfloat_shortShiftLeft64To96M(
+ uint64_t a, uint_fast8_t dist, uint32_t *zPtr )
+{
+ zPtr[indexWord( 3, 0 )] = (uint32_t) a<<dist;
+ a >>= 32 - dist;
+ zPtr[indexWord( 3, 2 )] = a>>32;
+ zPtr[indexWord( 3, 1 )] = a;
+}
+#else
+void
+ softfloat_shortShiftLeft64To96M(
+ uint64_t a, uint_fast8_t dist, uint32_t *zPtr );
+#endif
+#endif
+
+#ifndef softfloat_shortShiftLeftM
+/*----------------------------------------------------------------------------
+| Shifts the N-bit unsigned integer pointed to by 'aPtr' left by the number
+| of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist'
+| must be in the range 1 to 31. Any nonzero bits shifted off are lost. The
+| shifted N-bit result is stored at the location pointed to by 'zPtr'. Each
+| of 'aPtr' and 'zPtr' points to a 'size_words'-long array of 32-bit elements
+| that concatenate in the platform's normal endian order to form an N-bit
+| integer.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_shortShiftLeftM(
+ uint_fast8_t size_words,
+ const uint32_t *aPtr,
+ uint_fast8_t dist,
+ uint32_t *zPtr
+ );
+#endif
+
+#ifndef softfloat_shortShiftLeft96M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_shortShiftLeftM' with
+| 'size_words' = 3 (N = 96).
+*----------------------------------------------------------------------------*/
+#define softfloat_shortShiftLeft96M( aPtr, dist, zPtr ) softfloat_shortShiftLeftM( 3, aPtr, dist, zPtr )
+#endif
+
+#ifndef softfloat_shortShiftLeft128M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_shortShiftLeftM' with
+| 'size_words' = 4 (N = 128).
+*----------------------------------------------------------------------------*/
+#define softfloat_shortShiftLeft128M( aPtr, dist, zPtr ) softfloat_shortShiftLeftM( 4, aPtr, dist, zPtr )
+#endif
+
+#ifndef softfloat_shortShiftLeft160M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_shortShiftLeftM' with
+| 'size_words' = 5 (N = 160).
+*----------------------------------------------------------------------------*/
+#define softfloat_shortShiftLeft160M( aPtr, dist, zPtr ) softfloat_shortShiftLeftM( 5, aPtr, dist, zPtr )
+#endif
+
+#ifndef softfloat_shiftLeftM
+/*----------------------------------------------------------------------------
+| Shifts the N-bit unsigned integer pointed to by 'aPtr' left by the number
+| of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist'
+| must not be zero. Any nonzero bits shifted off are lost. The shifted
+| N-bit result is stored at the location pointed to by 'zPtr'. Each of 'aPtr'
+| and 'zPtr' points to a 'size_words'-long array of 32-bit elements that
+| concatenate in the platform's normal endian order to form an N-bit integer.
+| The value of 'dist' can be arbitrarily large. In particular, if 'dist' is
+| greater than N, the stored result will be 0.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_shiftLeftM(
+ uint_fast8_t size_words,
+ const uint32_t *aPtr,
+ uint32_t dist,
+ uint32_t *zPtr
+ );
+#endif
+
+#ifndef softfloat_shiftLeft96M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_shiftLeftM' with
+| 'size_words' = 3 (N = 96).
+*----------------------------------------------------------------------------*/
+#define softfloat_shiftLeft96M( aPtr, dist, zPtr ) softfloat_shiftLeftM( 3, aPtr, dist, zPtr )
+#endif
+
+#ifndef softfloat_shiftLeft128M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_shiftLeftM' with
+| 'size_words' = 4 (N = 128).
+*----------------------------------------------------------------------------*/
+#define softfloat_shiftLeft128M( aPtr, dist, zPtr ) softfloat_shiftLeftM( 4, aPtr, dist, zPtr )
+#endif
+
+#ifndef softfloat_shiftLeft160M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_shiftLeftM' with
+| 'size_words' = 5 (N = 160).
+*----------------------------------------------------------------------------*/
+#define softfloat_shiftLeft160M( aPtr, dist, zPtr ) softfloat_shiftLeftM( 5, aPtr, dist, zPtr )
+#endif
+
+#ifndef softfloat_shortShiftRightM
+/*----------------------------------------------------------------------------
+| Shifts the N-bit unsigned integer pointed to by 'aPtr' right by the number
+| of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist'
+| must be in the range 1 to 31. Any nonzero bits shifted off are lost. The
+| shifted N-bit result is stored at the location pointed to by 'zPtr'. Each
+| of 'aPtr' and 'zPtr' points to a 'size_words'-long array of 32-bit elements
+| that concatenate in the platform's normal endian order to form an N-bit
+| integer.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_shortShiftRightM(
+ uint_fast8_t size_words,
+ const uint32_t *aPtr,
+ uint_fast8_t dist,
+ uint32_t *zPtr
+ );
+#endif
+
+#ifndef softfloat_shortShiftRight128M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_shortShiftRightM' with
+| 'size_words' = 4 (N = 128).
+*----------------------------------------------------------------------------*/
+#define softfloat_shortShiftRight128M( aPtr, dist, zPtr ) softfloat_shortShiftRightM( 4, aPtr, dist, zPtr )
+#endif
+
+#ifndef softfloat_shortShiftRight160M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_shortShiftRightM' with
+| 'size_words' = 5 (N = 160).
+*----------------------------------------------------------------------------*/
+#define softfloat_shortShiftRight160M( aPtr, dist, zPtr ) softfloat_shortShiftRightM( 5, aPtr, dist, zPtr )
+#endif
+
+#ifndef softfloat_shortShiftRightJamM
+/*----------------------------------------------------------------------------
+| Shifts the N-bit unsigned integer pointed to by 'aPtr' right by the number
+| of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist'
+| must be in the range 1 to 31. If any nonzero bits are shifted off, they are
+| "jammed" into the least-significant bit of the shifted value by setting the
+| least-significant bit to 1. This shifted-and-jammed N-bit result is stored
+| at the location pointed to by 'zPtr'. Each of 'aPtr' and 'zPtr' points
+| to a 'size_words'-long array of 32-bit elements that concatenate in the
+| platform's normal endian order to form an N-bit integer.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_shortShiftRightJamM(
+ uint_fast8_t, const uint32_t *, uint_fast8_t, uint32_t * );
+#endif
+
+#ifndef softfloat_shortShiftRightJam160M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_shortShiftRightJamM' with
+| 'size_words' = 5 (N = 160).
+*----------------------------------------------------------------------------*/
+#define softfloat_shortShiftRightJam160M( aPtr, dist, zPtr ) softfloat_shortShiftRightJamM( 5, aPtr, dist, zPtr )
+#endif
+
+#ifndef softfloat_shiftRightM
+/*----------------------------------------------------------------------------
+| Shifts the N-bit unsigned integer pointed to by 'aPtr' right by the number
+| of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist'
+| must not be zero. Any nonzero bits shifted off are lost. The shifted
+| N-bit result is stored at the location pointed to by 'zPtr'. Each of 'aPtr'
+| and 'zPtr' points to a 'size_words'-long array of 32-bit elements that
+| concatenate in the platform's normal endian order to form an N-bit integer.
+| The value of 'dist' can be arbitrarily large. In particular, if 'dist' is
+| greater than N, the stored result will be 0.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_shiftRightM(
+ uint_fast8_t size_words,
+ const uint32_t *aPtr,
+ uint32_t dist,
+ uint32_t *zPtr
+ );
+#endif
+
+#ifndef softfloat_shiftRight96M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_shiftRightM' with
+| 'size_words' = 3 (N = 96).
+*----------------------------------------------------------------------------*/
+#define softfloat_shiftRight96M( aPtr, dist, zPtr ) softfloat_shiftRightM( 3, aPtr, dist, zPtr )
+#endif
+
+#ifndef softfloat_shiftRightJamM
+/*----------------------------------------------------------------------------
+| Shifts the N-bit unsigned integer pointed to by 'aPtr' right by the number
+| of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist'
+| must not be zero. If any nonzero bits are shifted off, they are "jammed"
+| into the least-significant bit of the shifted value by setting the least-
+| significant bit to 1. This shifted-and-jammed N-bit result is stored
+| at the location pointed to by 'zPtr'. Each of 'aPtr' and 'zPtr' points
+| to a 'size_words'-long array of 32-bit elements that concatenate in the
+| platform's normal endian order to form an N-bit integer.
+| The value of 'dist' can be arbitrarily large. In particular, if 'dist'
+| is greater than N, the stored result will be either 0 or 1, depending on
+| whether the original N bits are all zeros.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_shiftRightJamM(
+ uint_fast8_t size_words,
+ const uint32_t *aPtr,
+ uint32_t dist,
+ uint32_t *zPtr
+ );
+#endif
+
+#ifndef softfloat_shiftRightJam96M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_shiftRightJamM' with
+| 'size_words' = 3 (N = 96).
+*----------------------------------------------------------------------------*/
+#define softfloat_shiftRightJam96M( aPtr, dist, zPtr ) softfloat_shiftRightJamM( 3, aPtr, dist, zPtr )
+#endif
+
+#ifndef softfloat_shiftRightJam128M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_shiftRightJamM' with
+| 'size_words' = 4 (N = 128).
+*----------------------------------------------------------------------------*/
+#define softfloat_shiftRightJam128M( aPtr, dist, zPtr ) softfloat_shiftRightJamM( 4, aPtr, dist, zPtr )
+#endif
+
+#ifndef softfloat_shiftRightJam160M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_shiftRightJamM' with
+| 'size_words' = 5 (N = 160).
+*----------------------------------------------------------------------------*/
+#define softfloat_shiftRightJam160M( aPtr, dist, zPtr ) softfloat_shiftRightJamM( 5, aPtr, dist, zPtr )
+#endif
+
+#ifndef softfloat_addM
+/*----------------------------------------------------------------------------
+| Adds the two N-bit integers pointed to by 'aPtr' and 'bPtr', where N =
+| 'size_words' * 32. The addition is modulo 2^N, so any carry out is lost.
+| The N-bit sum is stored at the location pointed to by 'zPtr'. Each of
+| 'aPtr', 'bPtr', and 'zPtr' points to a 'size_words'-long array of 32-bit
+| elements that concatenate in the platform's normal endian order to form an
+| N-bit integer.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_addM(
+ uint_fast8_t size_words,
+ const uint32_t *aPtr,
+ const uint32_t *bPtr,
+ uint32_t *zPtr
+ );
+#endif
+
+#ifndef softfloat_add96M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_addM' with 'size_words'
+| = 3 (N = 96).
+*----------------------------------------------------------------------------*/
+#define softfloat_add96M( aPtr, bPtr, zPtr ) softfloat_addM( 3, aPtr, bPtr, zPtr )
+#endif
+
+#ifndef softfloat_add128M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_addM' with 'size_words'
+| = 4 (N = 128).
+*----------------------------------------------------------------------------*/
+#define softfloat_add128M( aPtr, bPtr, zPtr ) softfloat_addM( 4, aPtr, bPtr, zPtr )
+#endif
+
+#ifndef softfloat_add160M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_addM' with 'size_words'
+| = 5 (N = 160).
+*----------------------------------------------------------------------------*/
+#define softfloat_add160M( aPtr, bPtr, zPtr ) softfloat_addM( 5, aPtr, bPtr, zPtr )
+#endif
+
+#ifndef softfloat_addCarryM
+/*----------------------------------------------------------------------------
+| Adds the two N-bit unsigned integers pointed to by 'aPtr' and 'bPtr', where
+| N = 'size_words' * 32, plus 'carry', which must be either 0 or 1. The N-bit
+| sum (modulo 2^N) is stored at the location pointed to by 'zPtr', and any
+| carry out is returned as the result. Each of 'aPtr', 'bPtr', and 'zPtr'
+| points to a 'size_words'-long array of 32-bit elements that concatenate in
+| the platform's normal endian order to form an N-bit integer.
+*----------------------------------------------------------------------------*/
+uint_fast8_t
+ softfloat_addCarryM(
+ uint_fast8_t size_words,
+ const uint32_t *aPtr,
+ const uint32_t *bPtr,
+ uint_fast8_t carry,
+ uint32_t *zPtr
+ );
+#endif
+
+#ifndef softfloat_addComplCarryM
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_addCarryM', except that
+| the value of the unsigned integer pointed to by 'bPtr' is bit-wise completed
+| before the addition.
+*----------------------------------------------------------------------------*/
+uint_fast8_t
+ softfloat_addComplCarryM(
+ uint_fast8_t size_words,
+ const uint32_t *aPtr,
+ const uint32_t *bPtr,
+ uint_fast8_t carry,
+ uint32_t *zPtr
+ );
+#endif
+
+#ifndef softfloat_addComplCarry96M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_addComplCarryM' with
+| 'size_words' = 3 (N = 96).
+*----------------------------------------------------------------------------*/
+#define softfloat_addComplCarry96M( aPtr, bPtr, carry, zPtr ) softfloat_addComplCarryM( 3, aPtr, bPtr, carry, zPtr )
+#endif
+
+#ifndef softfloat_negXM
+/*----------------------------------------------------------------------------
+| Replaces the N-bit unsigned integer pointed to by 'zPtr' by the
+| 2s-complement of itself, where N = 'size_words' * 32. Argument 'zPtr'
+| points to a 'size_words'-long array of 32-bit elements that concatenate in
+| the platform's normal endian order to form an N-bit integer.
+*----------------------------------------------------------------------------*/
+void softfloat_negXM( uint_fast8_t size_words, uint32_t *zPtr );
+#endif
+
+#ifndef softfloat_negX96M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_negXM' with 'size_words'
+| = 3 (N = 96).
+*----------------------------------------------------------------------------*/
+#define softfloat_negX96M( zPtr ) softfloat_negXM( 3, zPtr )
+#endif
+
+#ifndef softfloat_negX128M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_negXM' with 'size_words'
+| = 4 (N = 128).
+*----------------------------------------------------------------------------*/
+#define softfloat_negX128M( zPtr ) softfloat_negXM( 4, zPtr )
+#endif
+
+#ifndef softfloat_negX160M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_negXM' with 'size_words'
+| = 5 (N = 160).
+*----------------------------------------------------------------------------*/
+#define softfloat_negX160M( zPtr ) softfloat_negXM( 5, zPtr )
+#endif
+
+#ifndef softfloat_negX256M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_negXM' with 'size_words'
+| = 8 (N = 256).
+*----------------------------------------------------------------------------*/
+#define softfloat_negX256M( zPtr ) softfloat_negXM( 8, zPtr )
+#endif
+
+#ifndef softfloat_sub1XM
+/*----------------------------------------------------------------------------
+| Subtracts 1 from the N-bit integer pointed to by 'zPtr', where N =
+| 'size_words' * 32. The subtraction is modulo 2^N, so any borrow out (carry
+| out) is lost. Argument 'zPtr' points to a 'size_words'-long array of 32-bit
+| elements that concatenate in the platform's normal endian order to form an
+| N-bit integer.
+*----------------------------------------------------------------------------*/
+void softfloat_sub1XM( uint_fast8_t size_words, uint32_t *zPtr );
+#endif
+
+#ifndef softfloat_sub1X96M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_sub1XM' with 'size_words'
+| = 3 (N = 96).
+*----------------------------------------------------------------------------*/
+#define softfloat_sub1X96M( zPtr ) softfloat_sub1XM( 3, zPtr )
+#endif
+
+#ifndef softfloat_sub1X160M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_sub1XM' with 'size_words'
+| = 5 (N = 160).
+*----------------------------------------------------------------------------*/
+#define softfloat_sub1X160M( zPtr ) softfloat_sub1XM( 5, zPtr )
+#endif
+
+#ifndef softfloat_subM
+/*----------------------------------------------------------------------------
+| Subtracts the two N-bit integers pointed to by 'aPtr' and 'bPtr', where N =
+| 'size_words' * 32. The subtraction is modulo 2^N, so any borrow out (carry
+| out) is lost. The N-bit difference is stored at the location pointed to by
+| 'zPtr'. Each of 'aPtr', 'bPtr', and 'zPtr' points to a 'size_words'-long
+| array of 32-bit elements that concatenate in the platform's normal endian
+| order to form an N-bit integer.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_subM(
+ uint_fast8_t size_words,
+ const uint32_t *aPtr,
+ const uint32_t *bPtr,
+ uint32_t *zPtr
+ );
+#endif
+
+#ifndef softfloat_sub96M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_subM' with 'size_words'
+| = 3 (N = 96).
+*----------------------------------------------------------------------------*/
+#define softfloat_sub96M( aPtr, bPtr, zPtr ) softfloat_subM( 3, aPtr, bPtr, zPtr )
+#endif
+
+#ifndef softfloat_sub128M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_subM' with 'size_words'
+| = 4 (N = 128).
+*----------------------------------------------------------------------------*/
+#define softfloat_sub128M( aPtr, bPtr, zPtr ) softfloat_subM( 4, aPtr, bPtr, zPtr )
+#endif
+
+#ifndef softfloat_sub160M
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_subM' with 'size_words'
+| = 5 (N = 160).
+*----------------------------------------------------------------------------*/
+#define softfloat_sub160M( aPtr, bPtr, zPtr ) softfloat_subM( 5, aPtr, bPtr, zPtr )
+#endif
+
+#ifndef softfloat_mul64To128M
+/*----------------------------------------------------------------------------
+| Multiplies 'a' and 'b' and stores the 128-bit product at the location
+| pointed to by 'zPtr'. Argument 'zPtr' points to an array of four 32-bit
+| elements that concatenate in the platform's normal endian order to form a
+| 128-bit integer.
+*----------------------------------------------------------------------------*/
+void softfloat_mul64To128M( uint64_t a, uint64_t b, uint32_t *zPtr );
+#endif
+
+#ifndef softfloat_mul128MTo256M
+/*----------------------------------------------------------------------------
+| Multiplies the two 128-bit unsigned integers pointed to by 'aPtr' and
+| 'bPtr', and stores the 256-bit product at the location pointed to by 'zPtr'.
+| Each of 'aPtr' and 'bPtr' points to an array of four 32-bit elements that
+| concatenate in the platform's normal endian order to form a 128-bit integer.
+| Argument 'zPtr' points to an array of eight 32-bit elements that concatenate
+| to form a 256-bit integer.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_mul128MTo256M(
+ const uint32_t *aPtr, const uint32_t *bPtr, uint32_t *zPtr );
+#endif
+
+#ifndef softfloat_remStepMBy32
+/*----------------------------------------------------------------------------
+| Performs a "remainder reduction step" as follows: Arguments 'remPtr' and
+| 'bPtr' both point to N-bit unsigned integers, where N = 'size_words' * 32.
+| Defining R and B as the values of those integers, the expression (R<<'dist')
+| - B * q is computed modulo 2^N, and the N-bit result is stored at the
+| location pointed to by 'zPtr'. Each of 'remPtr', 'bPtr', and 'zPtr' points
+| to a 'size_words'-long array of 32-bit elements that concatenate in the
+| platform's normal endian order to form an N-bit integer.
+*----------------------------------------------------------------------------*/
+void
+ softfloat_remStepMBy32(
+ uint_fast8_t size_words,
+ const uint32_t *remPtr,
+ uint_fast8_t dist,
+ const uint32_t *bPtr,
+ uint32_t q,
+ uint32_t *zPtr
+ );
+#endif
+
+#ifndef softfloat_remStep96MBy32
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_remStepMBy32' with
+| 'size_words' = 3 (N = 96).
+*----------------------------------------------------------------------------*/
+#define softfloat_remStep96MBy32( remPtr, dist, bPtr, q, zPtr ) softfloat_remStepMBy32( 3, remPtr, dist, bPtr, q, zPtr )
+#endif
+
+#ifndef softfloat_remStep128MBy32
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_remStepMBy32' with
+| 'size_words' = 4 (N = 128).
+*----------------------------------------------------------------------------*/
+#define softfloat_remStep128MBy32( remPtr, dist, bPtr, q, zPtr ) softfloat_remStepMBy32( 4, remPtr, dist, bPtr, q, zPtr )
+#endif
+
+#ifndef softfloat_remStep160MBy32
+/*----------------------------------------------------------------------------
+| This function or macro is the same as 'softfloat_remStepMBy32' with
+| 'size_words' = 5 (N = 160).
+*----------------------------------------------------------------------------*/
+#define softfloat_remStep160MBy32( remPtr, dist, bPtr, q, zPtr ) softfloat_remStepMBy32( 5, remPtr, dist, bPtr, q, zPtr )
+#endif
+
+#endif
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/include/softfloat.h b/src/libs/softfloat-3e/source/include/softfloat.h
new file mode 100644
index 00000000..9df6177e
--- /dev/null
+++ b/src/libs/softfloat-3e/source/include/softfloat.h
@@ -0,0 +1,415 @@
+
+/*============================================================================
+
+This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+
+/*============================================================================
+| Note: If SoftFloat is made available as a general library for programs to
+| use, it is strongly recommended that a platform-specific version of this
+| header, "softfloat.h", be created that folds in "softfloat_types.h" and that
+| eliminates all dependencies on compile-time macros.
+*============================================================================*/
+
+
+#ifndef softfloat_h
+#define softfloat_h 1
+
+#include <iprt/cdefs.h>
+#ifndef __cplusplus
+#include <stdbool.h>
+#endif
+#include <stdint.h>
+#include "softfloat_types.h"
+
+#ifndef THREAD_LOCAL
+#define THREAD_LOCAL
+#endif
+
+RT_C_DECLS_BEGIN
+
+/*----------------------------------------------------------------------------
+| Software floating-point underflow tininess-detection mode.
+*----------------------------------------------------------------------------*/
+#ifndef VBOX_WITHOUT_SOFTFLOAT_GLOBALS
+extern THREAD_LOCAL uint_fast8_t softfloat_detectTininess;
+#else
+# define softfloat_detectTininess (pState->detectTininess)
+#endif
+enum {
+ softfloat_tininess_beforeRounding = 0,
+ softfloat_tininess_afterRounding = 1
+};
+
+/*----------------------------------------------------------------------------
+| Software floating-point rounding mode. (Mode "odd" is supported only if
+| SoftFloat is compiled with macro 'SOFTFLOAT_ROUND_ODD' defined.)
+*----------------------------------------------------------------------------*/
+#ifndef VBOX_WITHOUT_SOFTFLOAT_GLOBALS
+extern THREAD_LOCAL uint_fast8_t softfloat_roundingMode;
+#else
+# define softfloat_roundingMode (pState->roundingMode)
+#endif
+enum {
+ softfloat_round_near_even = 0,
+ softfloat_round_minMag = 1,
+ softfloat_round_min = 2,
+ softfloat_round_max = 3,
+ softfloat_round_near_maxMag = 4,
+ softfloat_round_odd = 6
+};
+
+/*----------------------------------------------------------------------------
+| Software floating-point exception flags.
+*----------------------------------------------------------------------------*/
+#ifndef VBOX_WITHOUT_SOFTFLOAT_GLOBALS
+extern THREAD_LOCAL uint_fast8_t softfloat_exceptionFlags;
+#else
+# define softfloat_exceptionFlags (pState->exceptionFlags)
+#endif
+enum {
+#ifndef VBOX
+ softfloat_flag_inexact = 1,
+ softfloat_flag_underflow = 2,
+ softfloat_flag_overflow = 4,
+ softfloat_flag_infinite = 8,
+ softfloat_flag_invalid = 16
+#else /* VBox: Match X86_FSW_?E */
+ softfloat_flag_invalid = 1<<0 /**< X86_FSW_IE */,
+ softfloat_flag_denormal = 1<<1 /**< X86_FSW_DE - only returned by some VBox specific functions */,
+ softfloat_flag_infinite = 1<<2 /**< X86_FSW_ZE */,
+ softfloat_flag_overflow = 1<<3 /**< X86_FSW_OE */,
+ softfloat_flag_underflow = 1<<4 /**< X86_FSW_UE */,
+ softfloat_flag_inexact = 1<<5 /**< X86_FSW_PE */,
+ softfloat_flag_c1 = 1<<7 /**< X86_FSW_C1 - round up indicator. wrong place. */
+#endif
+};
+
+/*----------------------------------------------------------------------------
+| Routine to raise any or all of the software floating-point exception flags.
+*----------------------------------------------------------------------------*/
+void softfloat_raiseFlags( uint_fast8_t SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| Integer-to-floating-point conversion routines.
+*----------------------------------------------------------------------------*/
+float16_t ui32_to_f16( uint32_t SOFTFLOAT_STATE_DECL_COMMA );
+float32_t ui32_to_f32( uint32_t SOFTFLOAT_STATE_DECL_COMMA );
+float64_t ui32_to_f64( uint32_t SOFTFLOAT_STATE_DECL_COMMA );
+#ifdef SOFTFLOAT_FAST_INT64
+extFloat80_t ui32_to_extF80( uint32_t SOFTFLOAT_STATE_DECL_COMMA );
+float128_t ui32_to_f128( uint32_t SOFTFLOAT_STATE_DECL_COMMA );
+#endif
+void ui32_to_extF80M( uint32_t, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
+void ui32_to_f128M( uint32_t, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
+float16_t ui64_to_f16( uint64_t SOFTFLOAT_STATE_DECL_COMMA );
+float32_t ui64_to_f32( uint64_t SOFTFLOAT_STATE_DECL_COMMA );
+float64_t ui64_to_f64( uint64_t SOFTFLOAT_STATE_DECL_COMMA );
+#ifdef SOFTFLOAT_FAST_INT64
+extFloat80_t ui64_to_extF80( uint64_t SOFTFLOAT_STATE_DECL_COMMA );
+float128_t ui64_to_f128( uint64_t SOFTFLOAT_STATE_DECL_COMMA );
+#endif
+void ui64_to_extF80M( uint64_t, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
+void ui64_to_f128M( uint64_t, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
+float16_t i32_to_f16( int32_t SOFTFLOAT_STATE_DECL_COMMA );
+float32_t i32_to_f32( int32_t SOFTFLOAT_STATE_DECL_COMMA );
+float64_t i32_to_f64( int32_t SOFTFLOAT_STATE_DECL_COMMA );
+#ifdef SOFTFLOAT_FAST_INT64
+extFloat80_t i32_to_extF80( int32_t SOFTFLOAT_STATE_DECL_COMMA );
+float128_t i32_to_f128( int32_t SOFTFLOAT_STATE_DECL_COMMA );
+#endif
+void i32_to_extF80M( int32_t, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
+void i32_to_f128M( int32_t, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
+float16_t i64_to_f16( int64_t SOFTFLOAT_STATE_DECL_COMMA );
+float32_t i64_to_f32( int64_t SOFTFLOAT_STATE_DECL_COMMA );
+float64_t i64_to_f64( int64_t SOFTFLOAT_STATE_DECL_COMMA );
+#ifdef SOFTFLOAT_FAST_INT64
+extFloat80_t i64_to_extF80( int64_t SOFTFLOAT_STATE_DECL_COMMA );
+float128_t i64_to_f128( int64_t SOFTFLOAT_STATE_DECL_COMMA );
+#endif
+void i64_to_extF80M( int64_t, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
+void i64_to_f128M( int64_t, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
+
+/*----------------------------------------------------------------------------
+| 16-bit (half-precision) floating-point operations.
+*----------------------------------------------------------------------------*/
+uint_fast32_t f16_to_ui32( float16_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+uint_fast64_t f16_to_ui64( float16_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast32_t f16_to_i32( float16_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast64_t f16_to_i64( float16_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+uint_fast32_t f16_to_ui32_r_minMag( float16_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+uint_fast64_t f16_to_ui64_r_minMag( float16_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast32_t f16_to_i32_r_minMag( float16_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast64_t f16_to_i64_r_minMag( float16_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+float32_t f16_to_f32( float16_t SOFTFLOAT_STATE_DECL_COMMA );
+float64_t f16_to_f64( float16_t SOFTFLOAT_STATE_DECL_COMMA );
+#ifdef SOFTFLOAT_FAST_INT64
+extFloat80_t f16_to_extF80( float16_t SOFTFLOAT_STATE_DECL_COMMA );
+float128_t f16_to_f128( float16_t SOFTFLOAT_STATE_DECL_COMMA );
+#endif
+void f16_to_extF80M( float16_t, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
+void f16_to_f128M( float16_t, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
+float16_t f16_roundToInt( float16_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+float16_t f16_add( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
+float16_t f16_sub( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
+float16_t f16_mul( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
+float16_t f16_mulAdd( float16_t, float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
+float16_t f16_div( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
+float16_t f16_rem( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
+float16_t f16_sqrt( float16_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f16_eq( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f16_le( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f16_lt( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f16_eq_signaling( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f16_le_quiet( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f16_lt_quiet( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f16_isSignalingNaN( float16_t );
+
+/*----------------------------------------------------------------------------
+| 32-bit (single-precision) floating-point operations.
+*----------------------------------------------------------------------------*/
+uint_fast32_t f32_to_ui32( float32_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+uint_fast64_t f32_to_ui64( float32_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast32_t f32_to_i32( float32_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast64_t f32_to_i64( float32_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+uint_fast32_t f32_to_ui32_r_minMag( float32_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+uint_fast64_t f32_to_ui64_r_minMag( float32_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast32_t f32_to_i32_r_minMag( float32_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast64_t f32_to_i64_r_minMag( float32_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+float16_t f32_to_f16( float32_t SOFTFLOAT_STATE_DECL_COMMA );
+float64_t f32_to_f64( float32_t SOFTFLOAT_STATE_DECL_COMMA );
+#ifdef SOFTFLOAT_FAST_INT64
+extFloat80_t f32_to_extF80( float32_t SOFTFLOAT_STATE_DECL_COMMA );
+float128_t f32_to_f128( float32_t SOFTFLOAT_STATE_DECL_COMMA );
+#endif
+void f32_to_extF80M( float32_t, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
+void f32_to_f128M( float32_t, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
+float32_t f32_roundToInt( float32_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+float32_t f32_add( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
+float32_t f32_sub( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
+float32_t f32_mul( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
+float32_t f32_mulAdd( float32_t, float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
+float32_t f32_div( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
+float32_t f32_rem( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
+float32_t f32_sqrt( float32_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f32_eq( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f32_le( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f32_lt( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f32_eq_signaling( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f32_le_quiet( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f32_lt_quiet( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f32_isSignalingNaN( float32_t );
+
+/*----------------------------------------------------------------------------
+| 64-bit (double-precision) floating-point operations.
+*----------------------------------------------------------------------------*/
+uint_fast32_t f64_to_ui32( float64_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+uint_fast64_t f64_to_ui64( float64_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast32_t f64_to_i32( float64_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast64_t f64_to_i64( float64_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+uint_fast32_t f64_to_ui32_r_minMag( float64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+uint_fast64_t f64_to_ui64_r_minMag( float64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast32_t f64_to_i32_r_minMag( float64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast64_t f64_to_i64_r_minMag( float64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+float16_t f64_to_f16( float64_t SOFTFLOAT_STATE_DECL_COMMA );
+float32_t f64_to_f32( float64_t SOFTFLOAT_STATE_DECL_COMMA );
+#ifdef SOFTFLOAT_FAST_INT64
+extFloat80_t f64_to_extF80( float64_t SOFTFLOAT_STATE_DECL_COMMA );
+float128_t f64_to_f128( float64_t SOFTFLOAT_STATE_DECL_COMMA );
+#endif
+void f64_to_extF80M( float64_t, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
+void f64_to_f128M( float64_t, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
+float64_t f64_roundToInt( float64_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+float64_t f64_add( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
+float64_t f64_sub( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
+float64_t f64_mul( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
+float64_t f64_mulAdd( float64_t, float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
+float64_t f64_div( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
+float64_t f64_rem( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
+float64_t f64_sqrt( float64_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f64_eq( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f64_le( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f64_lt( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f64_eq_signaling( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f64_le_quiet( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f64_lt_quiet( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f64_isSignalingNaN( float64_t );
+
+/*----------------------------------------------------------------------------
+| Rounding precision for 80-bit extended double-precision floating-point.
+| Valid values are 32, 64, and 80.
+*----------------------------------------------------------------------------*/
+#ifndef VBOX_WITHOUT_SOFTFLOAT_GLOBALS
+extern THREAD_LOCAL uint_fast8_t extF80_roundingPrecision;
+#else
+# define extF80_roundingPrecision (pState->roundingPrecision)
+#endif
+
+/*----------------------------------------------------------------------------
+| 80-bit extended double-precision floating-point operations.
+*----------------------------------------------------------------------------*/
+#ifdef SOFTFLOAT_FAST_INT64
+uint_fast32_t extF80_to_ui32( extFloat80_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+uint_fast64_t extF80_to_ui64( extFloat80_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast32_t extF80_to_i32( extFloat80_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast64_t extF80_to_i64( extFloat80_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+uint_fast32_t extF80_to_ui32_r_minMag( extFloat80_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+uint_fast64_t extF80_to_ui64_r_minMag( extFloat80_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast32_t extF80_to_i32_r_minMag( extFloat80_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast64_t extF80_to_i64_r_minMag( extFloat80_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+float16_t extF80_to_f16( extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
+float32_t extF80_to_f32( extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
+float64_t extF80_to_f64( extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
+float128_t extF80_to_f128( extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
+extFloat80_t extF80_roundToInt( extFloat80_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+extFloat80_t extF80_add( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
+extFloat80_t extF80_sub( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
+extFloat80_t extF80_mul( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
+extFloat80_t extF80_div( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
+extFloat80_t extF80_rem( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
+extFloat80_t extF80_partialRem( extFloat80_t a, extFloat80_t b, uint8_t roundingMode, /* VBox: FPREM/FPREM1 */
+ uint16_t *pfCxFlags, softfloat_state_t *pState ); /* VBox: FPREM/FPREM1 */
+extFloat80_t extF80_sqrt( extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
+extFloat80_t extF80_sin( extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
+extFloat80_t extF80_cos( extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
+void extF80_sincos( extFloat80_t, extFloat80_t*, extFloat80_t* SOFTFLOAT_STATE_DECL_COMMA );
+extFloat80_t extF80_atan2( extFloat80_t y, extFloat80_t x SOFTFLOAT_STATE_DECL_COMMA );
+extFloat80_t extF80_ylog2x( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
+extFloat80_t extF80_ylog2xp1( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
+extFloat80_t extF80_tan( extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
+extFloat80_t extF80_scale_extF80( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
+bool extF80_eq( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
+bool extF80_le( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
+bool extF80_lt( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
+bool extF80_eq_signaling( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
+bool extF80_le_quiet( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
+bool extF80_lt_quiet( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
+bool extF80_isSignalingNaN( extFloat80_t );
+#endif
+uint_fast32_t extF80M_to_ui32( const extFloat80_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+uint_fast64_t extF80M_to_ui64( const extFloat80_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast32_t extF80M_to_i32( const extFloat80_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast64_t extF80M_to_i64( const extFloat80_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+uint_fast32_t extF80M_to_ui32_r_minMag( const extFloat80_t *, bool SOFTFLOAT_STATE_DECL_COMMA );
+uint_fast64_t extF80M_to_ui64_r_minMag( const extFloat80_t *, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast32_t extF80M_to_i32_r_minMag( const extFloat80_t *, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast64_t extF80M_to_i64_r_minMag( const extFloat80_t *, bool SOFTFLOAT_STATE_DECL_COMMA );
+float16_t extF80M_to_f16( const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
+float32_t extF80M_to_f32( const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
+float64_t extF80M_to_f64( const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
+void extF80M_to_f128M( const extFloat80_t *, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
+void
+ extF80M_roundToInt(
+ const extFloat80_t *, uint_fast8_t, bool, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
+void extF80M_add( const extFloat80_t *, const extFloat80_t *, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
+void extF80M_sub( const extFloat80_t *, const extFloat80_t *, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
+void extF80M_mul( const extFloat80_t *, const extFloat80_t *, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
+void extF80M_div( const extFloat80_t *, const extFloat80_t *, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
+void extF80M_rem( const extFloat80_t *, const extFloat80_t *, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
+void extF80M_sqrt( const extFloat80_t *, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
+bool extF80M_eq( const extFloat80_t *, const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
+bool extF80M_le( const extFloat80_t *, const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
+bool extF80M_lt( const extFloat80_t *, const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
+bool extF80M_eq_signaling( const extFloat80_t *, const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
+bool extF80M_le_quiet( const extFloat80_t *, const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
+bool extF80M_lt_quiet( const extFloat80_t *, const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
+bool extF80M_isSignalingNaN( const extFloat80_t * );
+
+/*----------------------------------------------------------------------------
+| 128-bit (quadruple-precision) floating-point operations.
+*----------------------------------------------------------------------------*/
+#ifdef SOFTFLOAT_FAST_INT64
+uint_fast32_t f128_to_ui32( float128_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+uint_fast64_t f128_to_ui64( float128_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast32_t f128_to_i32( float128_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast64_t f128_to_i64( float128_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+uint_fast32_t f128_to_ui32_r_minMag( float128_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+uint_fast64_t f128_to_ui64_r_minMag( float128_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast32_t f128_to_i32_r_minMag( float128_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast64_t f128_to_i64_r_minMag( float128_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+float16_t f128_to_f16( float128_t SOFTFLOAT_STATE_DECL_COMMA );
+float32_t f128_to_f32( float128_t SOFTFLOAT_STATE_DECL_COMMA );
+float64_t f128_to_f64( float128_t SOFTFLOAT_STATE_DECL_COMMA );
+extFloat80_t f128_to_extF80( float128_t SOFTFLOAT_STATE_DECL_COMMA );
+float128_t f128_roundToInt( float128_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+float128_t f128_add( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
+float128_t f128_sub( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
+float128_t f128_mul( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
+float128_t f128_mulAdd( float128_t, float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
+float128_t f128_div( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
+float128_t f128_rem( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
+float128_t f128_sqrt( float128_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f128_eq( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f128_le( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f128_lt( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f128_eq_signaling( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f128_le_quiet( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f128_lt_quiet( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
+bool f128_isSignalingNaN( float128_t );
+#endif
+uint_fast32_t f128M_to_ui32( const float128_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+uint_fast64_t f128M_to_ui64( const float128_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast32_t f128M_to_i32( const float128_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast64_t f128M_to_i64( const float128_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
+uint_fast32_t f128M_to_ui32_r_minMag( const float128_t *, bool SOFTFLOAT_STATE_DECL_COMMA );
+uint_fast64_t f128M_to_ui64_r_minMag( const float128_t *, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast32_t f128M_to_i32_r_minMag( const float128_t *, bool SOFTFLOAT_STATE_DECL_COMMA );
+int_fast64_t f128M_to_i64_r_minMag( const float128_t *, bool SOFTFLOAT_STATE_DECL_COMMA );
+float16_t f128M_to_f16( const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
+float32_t f128M_to_f32( const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
+float64_t f128M_to_f64( const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
+void f128M_to_extF80M( const float128_t *, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
+void f128M_roundToInt( const float128_t *, uint_fast8_t, bool, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
+void f128M_add( const float128_t *, const float128_t *, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
+void f128M_sub( const float128_t *, const float128_t *, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
+void f128M_mul( const float128_t *, const float128_t *, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
+void
+ f128M_mulAdd(
+ const float128_t *, const float128_t *, const float128_t *, float128_t * SOFTFLOAT_STATE_DECL_COMMA
+ );
+void f128M_div( const float128_t *, const float128_t *, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
+void f128M_rem( const float128_t *, const float128_t *, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
+void f128M_sqrt( const float128_t *, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
+bool f128M_eq( const float128_t *, const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
+bool f128M_le( const float128_t *, const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
+bool f128M_lt( const float128_t *, const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
+bool f128M_eq_signaling( const float128_t *, const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
+bool f128M_le_quiet( const float128_t *, const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
+bool f128M_lt_quiet( const float128_t *, const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
+bool f128M_isSignalingNaN( const float128_t * );
+
+RT_C_DECLS_END
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/include/softfloat_types.h b/src/libs/softfloat-3e/source/include/softfloat_types.h
new file mode 100644
index 00000000..a1219d3a
--- /dev/null
+++ b/src/libs/softfloat-3e/source/include/softfloat_types.h
@@ -0,0 +1,121 @@
+
+/*============================================================================
+
+This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#ifndef softfloat_types_h
+#define softfloat_types_h 1
+
+#include <stdint.h>
+
+/*----------------------------------------------------------------------------
+| Types used to pass 16-bit, 32-bit, 64-bit, and 128-bit floating-point
+| arguments and results to/from functions. These types must be exactly
+| 16 bits, 32 bits, 64 bits, and 128 bits in size, respectively. Where a
+| platform has "native" support for IEEE-Standard floating-point formats,
+| the types below may, if desired, be defined as aliases for the native types
+| (typically 'float' and 'double', and possibly 'long double').
+*----------------------------------------------------------------------------*/
+typedef struct { uint16_t v; } float16_t;
+typedef struct { uint32_t v; } float32_t;
+typedef struct { uint64_t v; } float64_t;
+typedef struct { uint64_t v[2]; } float128_t;
+
+/*----------------------------------------------------------------------------
+| The format of an 80-bit extended floating-point number in memory. This
+| structure must contain a 16-bit field named 'signExp' and a 64-bit field
+| named 'signif'.
+*----------------------------------------------------------------------------*/
+#ifdef LITTLEENDIAN
+struct extFloat80M { uint64_t signif; uint16_t signExp; };
+# define EXTFLOAT80M_INIT( a_signExp, a_signif ) { a_signif, a_signExp } /* VBox */
+#else
+struct extFloat80M { uint16_t signExp; uint64_t signif; };
+# define EXTFLOAT80M_INIT( a_signExp, a_signif ) { a_signExp, a_signif } /* VBox */
+#endif
+#define EXTFLOAT80M_INIT_C( a_signExp, a_signif ) EXTFLOAT80M_INIT( a_signExp, UINT64_C( a_signif ) ) /* VBox */
+#define EXTFLOAT80M_INIT3( a_sign, a_signif, a_exp ) \
+ EXTFLOAT80M_INIT( packToExtF80UI64( a_sign, a_exp ), a_signif) /* VBox */
+#define EXTFLOAT80M_INIT3_C( a_sign, a_signif, a_exp ) \
+ EXTFLOAT80M_INIT3( a_sign, UINT64_C( a_signif ), a_exp ) /* VBox */
+
+/*----------------------------------------------------------------------------
+| The type used to pass 80-bit extended floating-point arguments and
+| results to/from functions. This type must have size identical to
+| 'struct extFloat80M'. Type 'extFloat80_t' can be defined as an alias for
+| 'struct extFloat80M'. Alternatively, if a platform has "native" support
+| for IEEE-Standard 80-bit extended floating-point, it may be possible,
+| if desired, to define 'extFloat80_t' as an alias for the native type
+| (presumably either 'long double' or a nonstandard compiler-intrinsic type).
+| In that case, the 'signif' and 'signExp' fields of 'struct extFloat80M'
+| must align exactly with the locations in memory of the sign, exponent, and
+| significand of the native type.
+*----------------------------------------------------------------------------*/
+typedef struct extFloat80M extFloat80_t;
+
+/*----------------------------------------------------------------------------
+| VBox: The four globals as non-globals.
+*----------------------------------------------------------------------------*/
+#ifndef VBOX_WITH_SOFTFLOAT_GLOBALS
+# define VBOX_WITHOUT_SOFTFLOAT_GLOBALS
+# define SOFTFLOAT_STATE_ARG pState
+# define SOFTFLOAT_STATE_ARG_COMMA , pState
+# define SOFTFLOAT_STATE_DECL softfloat_state_t *pState
+# define SOFTFLOAT_STATE_DECL_COMMA , softfloat_state_t *pState
+# define SOFTFLOAT_STATE_NOREF() (void)pState
+typedef struct softfloat_state
+{
+ /* softfloat_tininess_beforeRounding or softfloat_tininess_afterRounding */
+ uint8_t detectTininess;
+ /* softfloat_round_near_even and friends. */
+ uint8_t roundingMode;
+ /* softfloat_flag_inexact and friends. */
+ uint8_t exceptionFlags;
+ /** Masked exceptions (only underflow is relevant). */
+ uint8_t exceptionMask;
+ /* extF80: rounding precsision: 32, 64 or 80 */
+ uint8_t roundingPrecision;
+} softfloat_state_t;
+# define SOFTFLOAT_STATE_INIT_DEFAULTS() { softfloat_tininess_afterRounding, softfloat_round_near_even, 0, 0x3f, 80 }
+#else
+# undef VBOX_WITHOUT_SOFTFLOAT_GLOBALS
+# define SOFTFLOAT_STATE_ARG
+# define SOFTFLOAT_STATE_ARG_COMMA
+# define SOFTFLOAT_STATE_DECL
+# define SOFTFLOAT_STATE_DECL_COMMA
+# define SOFTFLOAT_STATE_NOREF() (void)0
+#endif
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_add128.c b/src/libs/softfloat-3e/source/s_add128.c
new file mode 100644
index 00000000..bd43b603
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_add128.c
@@ -0,0 +1,57 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_add128
+# undef INLINE_LEVEL /* VBox: Missing prototype */
+# include "primitives.h" /* VBox: Missing prototype */
+
+struct uint128
+ softfloat_add128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )
+{
+ struct uint128 z;
+
+ z.v0 = a0 + b0;
+ z.v64 = a64 + b64 + (z.v0 < a0);
+ return z;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_add256M.c b/src/libs/softfloat-3e/source/s_add256M.c
new file mode 100644
index 00000000..8f00f208
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_add256M.c
@@ -0,0 +1,66 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_add256M
+# include "primitives.h" /* VBox: Missing prototype */
+
+void
+ softfloat_add256M(
+ const uint64_t *aPtr, const uint64_t *bPtr, uint64_t *zPtr )
+{
+ unsigned int index;
+ uint_fast8_t carry;
+ uint64_t wordA, wordZ;
+
+ index = indexWordLo( 4 );
+ carry = 0;
+ for (;;) {
+ wordA = aPtr[index];
+ wordZ = wordA + bPtr[index] + carry;
+ zPtr[index] = wordZ;
+ if ( index == indexWordHi( 4 ) ) break;
+ if ( wordZ != wordA ) carry = (wordZ < wordA);
+ index += wordIncr;
+ }
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_addCarryM.c b/src/libs/softfloat-3e/source/s_addCarryM.c
new file mode 100644
index 00000000..fb84a383
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_addCarryM.c
@@ -0,0 +1,70 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_addCarryM
+
+uint_fast8_t
+ softfloat_addCarryM(
+ uint_fast8_t size_words,
+ const uint32_t *aPtr,
+ const uint32_t *bPtr,
+ uint_fast8_t carry,
+ uint32_t *zPtr
+ )
+{
+ unsigned int index, lastIndex;
+ uint32_t wordA, wordZ;
+
+ index = indexWordLo( size_words );
+ lastIndex = indexWordHi( size_words );
+ for (;;) {
+ wordA = aPtr[index];
+ wordZ = wordA + bPtr[index] + carry;
+ zPtr[index] = wordZ;
+ if ( wordZ != wordA ) carry = (wordZ < wordA);
+ if ( index == lastIndex ) break;
+ index += wordIncr;
+ }
+ return carry;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_addComplCarryM.c b/src/libs/softfloat-3e/source/s_addComplCarryM.c
new file mode 100644
index 00000000..1f8d543e
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_addComplCarryM.c
@@ -0,0 +1,70 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_addComplCarryM
+
+uint_fast8_t
+ softfloat_addComplCarryM(
+ uint_fast8_t size_words,
+ const uint32_t *aPtr,
+ const uint32_t *bPtr,
+ uint_fast8_t carry,
+ uint32_t *zPtr
+ )
+{
+ unsigned int index, lastIndex;
+ uint32_t wordA, wordZ;
+
+ index = indexWordLo( size_words );
+ lastIndex = indexWordHi( size_words );
+ for (;;) {
+ wordA = aPtr[index];
+ wordZ = wordA + ~bPtr[index] + carry;
+ zPtr[index] = wordZ;
+ if ( wordZ != wordA ) carry = (wordZ < wordA);
+ if ( index == lastIndex ) break;
+ index += wordIncr;
+ }
+ return carry;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_addExtF80M.c b/src/libs/softfloat-3e/source/s_addExtF80M.c
new file mode 100644
index 00000000..67861572
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_addExtF80M.c
@@ -0,0 +1,187 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+void
+ softfloat_addExtF80M(
+ const struct extFloat80M *aSPtr,
+ const struct extFloat80M *bSPtr,
+ struct extFloat80M *zSPtr,
+ bool negateB
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ uint32_t uiA64;
+ int32_t expA;
+ uint32_t uiB64;
+ int32_t expB;
+ uint32_t uiZ64;
+ bool signZ, signB;
+ const struct extFloat80M *tempSPtr;
+ uint64_t sigZ, sigB;
+ void
+ (*roundPackRoutinePtr)(
+ bool, int32_t, uint32_t *, uint_fast8_t, struct extFloat80M * SOFTFLOAT_STATE_DECL_COMMA );
+ int32_t expDiff;
+ uint32_t extSigX[3], sigZExtra;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiA64 = aSPtr->signExp;
+ expA = expExtF80UI64( uiA64 );
+ uiB64 = bSPtr->signExp;
+ expB = expExtF80UI64( uiB64 );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( (expA == 0x7FFF) || (expB == 0x7FFF) ) {
+ if ( softfloat_tryPropagateNaNExtF80M( aSPtr, bSPtr, zSPtr SOFTFLOAT_STATE_ARG_COMMA ) ) return;
+ uiZ64 = uiA64;
+ if ( expB == 0x7FFF ) {
+ uiZ64 = uiB64 ^ packToExtF80UI64( negateB, 0 );
+ if ( (expA == 0x7FFF) && (uiZ64 != uiA64) ) {
+ softfloat_invalidExtF80M( zSPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return;
+ }
+ }
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = UINT64_C( 0x8000000000000000 );
+ return;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ signZ = signExtF80UI64( uiA64 );
+ signB = signExtF80UI64( uiB64 ) ^ negateB;
+ negateB = (signZ != signB);
+ if ( expA < expB ) {
+ signZ = signB;
+ expA = expB;
+ expB = expExtF80UI64( uiA64 );
+ tempSPtr = aSPtr;
+ aSPtr = bSPtr;
+ bSPtr = tempSPtr;
+ }
+ if ( ! expB ) {
+ expB = 1;
+ if ( ! expA ) expA = 1;
+ }
+ sigZ = aSPtr->signif;
+ sigB = bSPtr->signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ roundPackRoutinePtr = softfloat_roundPackMToExtF80M;
+ expDiff = expA - expB;
+ if ( expDiff ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ extSigX[indexWord( 3, 2 )] = sigB>>32;
+ extSigX[indexWord( 3, 1 )] = sigB;
+ extSigX[indexWord( 3, 0 )] = 0;
+ softfloat_shiftRightJam96M( extSigX, expDiff, extSigX );
+ sigB =
+ (uint64_t) extSigX[indexWord( 3, 2 )]<<32
+ | extSigX[indexWord( 3, 1 )];
+ if ( negateB ) {
+ sigZ -= sigB;
+ sigZExtra = extSigX[indexWordLo( 3 )];
+ if ( sigZExtra ) {
+ --sigZ;
+ sigZExtra = -sigZExtra;
+ }
+ if ( ! (sigZ & UINT64_C( 0x8000000000000000 )) ) {
+ if ( sigZ & UINT64_C( 0x4000000000000000 ) ) {
+ --expA;
+ sigZ = sigZ<<1 | sigZExtra>>31;
+ sigZExtra <<= 1;
+ } else {
+ roundPackRoutinePtr = softfloat_normRoundPackMToExtF80M;
+ }
+ }
+ } else {
+ sigZ += sigB;
+ if ( sigZ & UINT64_C( 0x8000000000000000 ) ) goto sigZ;
+ sigZExtra = (uint32_t) sigZ<<31 | (extSigX[indexWordLo( 3 )] != 0);
+ goto completeNormAfterAdd;
+ }
+ } else {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ sigZExtra = 0;
+ if ( negateB ) {
+ if ( sigZ < sigB ) {
+ signZ = ! signZ;
+ sigZ = sigB - sigZ;
+ } else {
+ sigZ -= sigB;
+ if ( ! sigZ ) {
+ signZ = (softfloat_roundingMode == softfloat_round_min);
+ zSPtr->signExp = packToExtF80UI64( signZ, 0 );
+ zSPtr->signif = 0;
+ return;
+ }
+ }
+ roundPackRoutinePtr = softfloat_normRoundPackMToExtF80M;
+ } else {
+ sigZ += sigB;
+ if ( sigZ < sigB ) {
+ sigZExtra = (uint32_t) sigZ<<31;
+ completeNormAfterAdd:
+ ++expA;
+ sigZ = UINT64_C( 0x8000000000000000 ) | sigZ>>1;
+ } else {
+ if ( ! (sigZ & UINT64_C( 0x8000000000000000 )) ) {
+ roundPackRoutinePtr = softfloat_normRoundPackMToExtF80M;
+ }
+ }
+ }
+ }
+ extSigX[indexWord( 3, 0 )] = sigZExtra;
+ sigZ:
+ extSigX[indexWord( 3, 2 )] = sigZ>>32;
+ extSigX[indexWord( 3, 1 )] = sigZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ roundPack:
+ (*roundPackRoutinePtr)(
+ signZ, expA, extSigX, extF80_roundingPrecision, zSPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_addF128M.c b/src/libs/softfloat-3e/source/s_addF128M.c
new file mode 100644
index 00000000..cfc86fa0
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_addF128M.c
@@ -0,0 +1,212 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+void
+ softfloat_addF128M(
+ const uint32_t *aWPtr,
+ const uint32_t *bWPtr,
+ uint32_t *zWPtr,
+ bool negateB
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ uint32_t uiA96;
+ int32_t expA;
+ uint32_t uiB96;
+ int32_t expB;
+ uint32_t uiZ96;
+ bool signZ, signB;
+ const uint32_t *tempPtr;
+ uint32_t sig96A, sig96B;
+ int32_t expDiff;
+ uint_fast8_t
+ (*addCarryMRoutinePtr)(
+ uint_fast8_t,
+ const uint32_t *,
+ const uint32_t *,
+ uint_fast8_t,
+ uint32_t *
+ );
+ uint32_t extSigZ[5], wordSigZ;
+ uint_fast8_t carry;
+ void (*roundPackRoutinePtr)( bool, int32_t, uint32_t *, uint32_t * SOFTFLOAT_STATE_DECL_COMMA );
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ expA = expF128UI96( uiA96 );
+ uiB96 = bWPtr[indexWordHi( 4 )];
+ expB = expF128UI96( uiB96 );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( (expA == 0x7FFF) || (expB == 0x7FFF) ) {
+ if ( softfloat_tryPropagateNaNF128M( aWPtr, bWPtr, zWPtr SOFTFLOAT_STATE_ARG_COMMA ) ) return;
+ uiZ96 = uiA96;
+ if ( expB == 0x7FFF ) {
+ uiZ96 = uiB96 ^ packToF128UI96( negateB, 0, 0 );
+ if ( (expA == 0x7FFF) && (uiZ96 != uiA96) ) {
+ softfloat_invalidF128M( zWPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return;
+ }
+ }
+ zWPtr[indexWordHi( 4 )] = uiZ96;
+ zWPtr[indexWord( 4, 2 )] = 0;
+ zWPtr[indexWord( 4, 1 )] = 0;
+ zWPtr[indexWord( 4, 0 )] = 0;
+ return;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ signZ = signF128UI96( uiA96 );
+ signB = signF128UI96( uiB96 ) ^ negateB;
+ negateB = (signZ != signB);
+ if ( (uint32_t) (uiA96<<1) < (uint32_t) (uiB96<<1) ) {
+ signZ = signB;
+ expA = expB;
+ expB = expF128UI96( uiA96 );
+ tempPtr = aWPtr;
+ aWPtr = bWPtr;
+ bWPtr = tempPtr;
+ uiA96 = uiB96;
+ uiB96 = bWPtr[indexWordHi( 4 )];
+ }
+ sig96A = fracF128UI96( uiA96 );
+ sig96B = fracF128UI96( uiB96 );
+ if ( expA ) {
+ --expA;
+ sig96A |= 0x00010000;
+ if ( expB ) {
+ --expB;
+ sig96B |= 0x00010000;
+ }
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ addCarryMRoutinePtr =
+ negateB ? softfloat_addComplCarryM : softfloat_addCarryM;
+ expDiff = expA - expB;
+ if ( expDiff ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ extSigZ[indexWordHi( 5 )] = sig96B;
+ extSigZ[indexWord( 5, 3 )] = bWPtr[indexWord( 4, 2 )];
+ extSigZ[indexWord( 5, 2 )] = bWPtr[indexWord( 4, 1 )];
+ extSigZ[indexWord( 5, 1 )] = bWPtr[indexWord( 4, 0 )];
+ extSigZ[indexWord( 5, 0 )] = 0;
+ softfloat_shiftRightJam160M( extSigZ, expDiff, extSigZ );
+ sig96B = extSigZ[indexWordHi( 5 )];
+ carry = 0;
+ if ( negateB ) {
+ sig96B = ~sig96B;
+ wordSigZ = extSigZ[indexWordLo( 5 )];
+ extSigZ[indexWordLo( 5 )] = -wordSigZ;
+ carry = ! wordSigZ;
+ }
+ carry =
+ (*addCarryMRoutinePtr)(
+ 3,
+ &aWPtr[indexMultiwordLo( 4, 3 )],
+ &extSigZ[indexMultiword( 5, 3, 1 )],
+ carry,
+ &extSigZ[indexMultiword( 5, 3, 1 )]
+ );
+ wordSigZ = sig96A + sig96B + carry;
+ } else {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ extSigZ[indexWordLo( 5 )] = 0;
+ carry =
+ (*addCarryMRoutinePtr)(
+ 3,
+ &aWPtr[indexMultiwordLo( 4, 3 )],
+ &bWPtr[indexMultiwordLo( 4, 3 )],
+ negateB,
+ &extSigZ[indexMultiword( 5, 3, 1 )]
+ );
+ if ( negateB ) {
+ wordSigZ = sig96A + ~sig96B + carry;
+ if ( wordSigZ & 0x80000000 ) {
+ signZ = ! signZ;
+ carry =
+ softfloat_addComplCarry96M(
+ &bWPtr[indexMultiwordLo( 4, 3 )],
+ &aWPtr[indexMultiwordLo( 4, 3 )],
+ 1,
+ &extSigZ[indexMultiword( 5, 3, 1 )]
+ );
+ wordSigZ = sig96B + ~sig96A + carry;
+ } else {
+ if (
+ ! wordSigZ && ! extSigZ[indexWord( 5, 3 )]
+ && ! ( extSigZ[indexWord( 5, 2 )]
+ | extSigZ[indexWord( 5, 1 )]
+ | extSigZ[indexWord( 5, 0 )]
+ )
+ ) {
+ signZ = (softfloat_roundingMode == softfloat_round_min);
+ zWPtr[indexWordHi( 4 )] = packToF128UI96( signZ, 0, 0 );
+ zWPtr[indexWord( 4, 2 )] = 0;
+ zWPtr[indexWord( 4, 1 )] = 0;
+ zWPtr[indexWord( 4, 0 )] = 0;
+ return;
+ }
+ }
+ } else {
+ wordSigZ = sig96A + sig96B + carry;
+ }
+ }
+ extSigZ[indexWordHi( 5 )] = wordSigZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ roundPackRoutinePtr = softfloat_normRoundPackMToF128M;
+ if ( 0x00010000 <= wordSigZ ) {
+ if ( 0x00020000 <= wordSigZ ) {
+ ++expA;
+ softfloat_shortShiftRightJam160M( extSigZ, 1, extSigZ );
+ }
+ roundPackRoutinePtr = softfloat_roundPackMToF128M;
+ }
+ (*roundPackRoutinePtr)( signZ, expA, extSigZ, zWPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_addM.c b/src/libs/softfloat-3e/source/s_addM.c
new file mode 100644
index 00000000..e1cc66bf
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_addM.c
@@ -0,0 +1,70 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_addM
+
+void
+ softfloat_addM(
+ uint_fast8_t size_words,
+ const uint32_t *aPtr,
+ const uint32_t *bPtr,
+ uint32_t *zPtr
+ )
+{
+ unsigned int index, lastIndex;
+ uint_fast8_t carry;
+ uint32_t wordA, wordZ;
+
+ index = indexWordLo( size_words );
+ lastIndex = indexWordHi( size_words );
+ carry = 0;
+ for (;;) {
+ wordA = aPtr[index];
+ wordZ = wordA + bPtr[index] + carry;
+ zPtr[index] = wordZ;
+ if ( index == lastIndex ) break;
+ if ( wordZ != wordA ) carry = (wordZ < wordA);
+ index += wordIncr;
+ }
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_addMagsExtF80.c b/src/libs/softfloat-3e/source/s_addMagsExtF80.c
new file mode 100644
index 00000000..eff342c5
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_addMagsExtF80.c
@@ -0,0 +1,157 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+extFloat80_t
+ softfloat_addMagsExtF80(
+ uint_fast16_t uiA64,
+ uint_fast64_t uiA0,
+ uint_fast16_t uiB64,
+ uint_fast64_t uiB0,
+ bool signZ
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ int_fast32_t expA;
+ uint_fast64_t sigA;
+ int_fast32_t expB;
+ uint_fast64_t sigB;
+ int_fast32_t expDiff;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0, sigZ, sigZExtra;
+ struct exp32_sig64 normExpSig;
+ int_fast32_t expZ;
+ struct uint64_extra sig64Extra;
+ struct uint128 uiZ;
+ union { struct extFloat80M s; extFloat80_t f; } uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expA = expExtF80UI64( uiA64 );
+ sigA = uiA0;
+ expB = expExtF80UI64( uiB64 );
+ sigB = uiB0;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expDiff = expA - expB;
+ if ( ! expDiff ) {
+ if ( expA == 0x7FFF ) {
+ if ( (sigA | sigB) & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) {
+ goto propagateNaN;
+ }
+ uiZ64 = uiA64;
+ uiZ0 = uiA0;
+ goto uiZ;
+ }
+ sigZ = sigA + sigB;
+ sigZExtra = 0;
+ if ( ! expA ) {
+ normExpSig = softfloat_normSubnormalExtF80Sig( sigZ );
+ expZ = normExpSig.exp + 1;
+ sigZ = normExpSig.sig;
+ goto roundAndPack;
+ }
+ expZ = expA;
+ goto shiftRight1;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expDiff < 0 ) {
+ if ( expB == 0x7FFF ) {
+ if ( sigB & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) goto propagateNaN;
+ uiZ64 = packToExtF80UI64( signZ, 0x7FFF );
+ uiZ0 = uiB0;
+ goto uiZ;
+ }
+ expZ = expB;
+ if ( ! expA ) {
+ ++expDiff;
+ sigZExtra = 0;
+ if ( ! expDiff ) goto newlyAligned;
+ }
+ sig64Extra = softfloat_shiftRightJam64Extra( sigA, 0, -expDiff );
+ sigA = sig64Extra.v;
+ sigZExtra = sig64Extra.extra;
+ } else {
+ if ( expA == 0x7FFF ) {
+ if ( sigA & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) goto propagateNaN;
+ uiZ64 = uiA64;
+ uiZ0 = uiA0;
+ goto uiZ;
+ }
+ expZ = expA;
+ if ( ! expB ) {
+ --expDiff;
+ sigZExtra = 0;
+ if ( ! expDiff ) goto newlyAligned;
+ }
+ sig64Extra = softfloat_shiftRightJam64Extra( sigB, 0, expDiff );
+ sigB = sig64Extra.v;
+ sigZExtra = sig64Extra.extra;
+ }
+ newlyAligned:
+ sigZ = sigA + sigB;
+ if ( sigZ & UINT64_C( 0x8000000000000000 ) ) goto roundAndPack;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftRight1:
+ sig64Extra = softfloat_shortShiftRightJam64Extra( sigZ, sigZExtra, 1 );
+ sigZ = sig64Extra.v | UINT64_C( 0x8000000000000000 );
+ sigZExtra = sig64Extra.extra;
+ ++expZ;
+ roundAndPack:
+ return
+ softfloat_roundPackToExtF80(
+ signZ, expZ, sigZ, sigZExtra, extF80_roundingPrecision SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN:
+ uiZ = softfloat_propagateNaNExtF80UI( uiA64, uiA0, uiB64, uiB0 SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ64 = uiZ.v64;
+ uiZ0 = uiZ.v0;
+ uiZ:
+ uZ.s.signExp = uiZ64;
+ uZ.s.signif = uiZ0;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_addMagsF128.c b/src/libs/softfloat-3e/source/s_addMagsF128.c
new file mode 100644
index 00000000..7579af16
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_addMagsF128.c
@@ -0,0 +1,155 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+
+float128_t
+ softfloat_addMagsF128(
+ uint_fast64_t uiA64,
+ uint_fast64_t uiA0,
+ uint_fast64_t uiB64,
+ uint_fast64_t uiB0,
+ bool signZ
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ int_fast32_t expA;
+ struct uint128 sigA;
+ int_fast32_t expB;
+ struct uint128 sigB;
+ int_fast32_t expDiff;
+ struct uint128 uiZ, sigZ;
+ int_fast32_t expZ;
+ uint_fast64_t sigZExtra;
+ struct uint128_extra sig128Extra;
+ union ui128_f128 uZ;
+
+ expA = expF128UI64( uiA64 );
+ sigA.v64 = fracF128UI64( uiA64 );
+ sigA.v0 = uiA0;
+ expB = expF128UI64( uiB64 );
+ sigB.v64 = fracF128UI64( uiB64 );
+ sigB.v0 = uiB0;
+ expDiff = expA - expB;
+ if ( ! expDiff ) {
+ if ( expA == 0x7FFF ) {
+ if ( sigA.v64 | sigA.v0 | sigB.v64 | sigB.v0 ) goto propagateNaN;
+ uiZ.v64 = uiA64;
+ uiZ.v0 = uiA0;
+ goto uiZ;
+ }
+ sigZ = softfloat_add128( sigA.v64, sigA.v0, sigB.v64, sigB.v0 );
+ if ( ! expA ) {
+ uiZ.v64 = packToF128UI64( signZ, 0, sigZ.v64 );
+ uiZ.v0 = sigZ.v0;
+ goto uiZ;
+ }
+ expZ = expA;
+ sigZ.v64 |= UINT64_C( 0x0002000000000000 );
+ sigZExtra = 0;
+ goto shiftRight1;
+ }
+ if ( expDiff < 0 ) {
+ if ( expB == 0x7FFF ) {
+ if ( sigB.v64 | sigB.v0 ) goto propagateNaN;
+ uiZ.v64 = packToF128UI64( signZ, 0x7FFF, 0 );
+ uiZ.v0 = 0;
+ goto uiZ;
+ }
+ expZ = expB;
+ if ( expA ) {
+ sigA.v64 |= UINT64_C( 0x0001000000000000 );
+ } else {
+ ++expDiff;
+ sigZExtra = 0;
+ if ( ! expDiff ) goto newlyAligned;
+ }
+ sig128Extra =
+ softfloat_shiftRightJam128Extra( sigA.v64, sigA.v0, 0, -expDiff );
+ sigA = sig128Extra.v;
+ sigZExtra = sig128Extra.extra;
+ } else {
+ if ( expA == 0x7FFF ) {
+ if ( sigA.v64 | sigA.v0 ) goto propagateNaN;
+ uiZ.v64 = uiA64;
+ uiZ.v0 = uiA0;
+ goto uiZ;
+ }
+ expZ = expA;
+ if ( expB ) {
+ sigB.v64 |= UINT64_C( 0x0001000000000000 );
+ } else {
+ --expDiff;
+ sigZExtra = 0;
+ if ( ! expDiff ) goto newlyAligned;
+ }
+ sig128Extra =
+ softfloat_shiftRightJam128Extra( sigB.v64, sigB.v0, 0, expDiff );
+ sigB = sig128Extra.v;
+ sigZExtra = sig128Extra.extra;
+ }
+ newlyAligned:
+ sigZ =
+ softfloat_add128(
+ sigA.v64 | UINT64_C( 0x0001000000000000 ),
+ sigA.v0,
+ sigB.v64,
+ sigB.v0
+ );
+ --expZ;
+ if ( sigZ.v64 < UINT64_C( 0x0002000000000000 ) ) goto roundAndPack;
+ ++expZ;
+ shiftRight1:
+ sig128Extra =
+ softfloat_shortShiftRightJam128Extra(
+ sigZ.v64, sigZ.v0, sigZExtra, 1 );
+ sigZ = sig128Extra.v;
+ sigZExtra = sig128Extra.extra;
+ roundAndPack:
+ return
+ softfloat_roundPackToF128( signZ, expZ, sigZ.v64, sigZ.v0, sigZExtra SOFTFLOAT_STATE_ARG_COMMA );
+ propagateNaN:
+ uiZ = softfloat_propagateNaNF128UI( uiA64, uiA0, uiB64, uiB0 SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_addMagsF16.c b/src/libs/softfloat-3e/source/s_addMagsF16.c
new file mode 100644
index 00000000..e30379fa
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_addMagsF16.c
@@ -0,0 +1,184 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float16_t softfloat_addMagsF16( uint_fast16_t uiA, uint_fast16_t uiB SOFTFLOAT_STATE_DECL_COMMA )
+{
+ int_fast8_t expA;
+ uint_fast16_t sigA;
+ int_fast8_t expB;
+ uint_fast16_t sigB;
+ int_fast8_t expDiff;
+ uint_fast16_t uiZ;
+ bool signZ;
+ int_fast8_t expZ;
+ uint_fast16_t sigZ;
+ uint_fast16_t sigX, sigY;
+ int_fast8_t shiftDist;
+ uint_fast32_t sig32Z;
+ int_fast8_t roundingMode;
+ union ui16_f16 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expA = expF16UI( uiA );
+ sigA = fracF16UI( uiA );
+ expB = expF16UI( uiB );
+ sigB = fracF16UI( uiB );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expDiff = expA - expB;
+ if ( ! expDiff ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( ! expA ) {
+ uiZ = uiA + sigB;
+ goto uiZ;
+ }
+ if ( expA == 0x1F ) {
+ if ( sigA | sigB ) goto propagateNaN;
+ uiZ = uiA;
+ goto uiZ;
+ }
+ signZ = signF16UI( uiA );
+ expZ = expA;
+ sigZ = 0x0800 + sigA + sigB;
+ if ( ! (sigZ & 1) && (expZ < 0x1E) ) {
+ sigZ >>= 1;
+ goto pack;
+ }
+ sigZ <<= 3;
+ } else {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ signZ = signF16UI( uiA );
+ if ( expDiff < 0 ) {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ if ( expB == 0x1F ) {
+ if ( sigB ) goto propagateNaN;
+ uiZ = packToF16UI( signZ, 0x1F, 0 );
+ goto uiZ;
+ }
+ if ( expDiff <= -13 ) {
+ uiZ = packToF16UI( signZ, expB, sigB );
+ if ( expA | sigA ) goto addEpsilon;
+ goto uiZ;
+ }
+ expZ = expB;
+ sigX = sigB | 0x0400;
+ sigY = sigA + (expA ? 0x0400 : sigA);
+ shiftDist = 19 + expDiff;
+ } else {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ uiZ = uiA;
+ if ( expA == 0x1F ) {
+ if ( sigA ) goto propagateNaN;
+ goto uiZ;
+ }
+ if ( 13 <= expDiff ) {
+ if ( expB | sigB ) goto addEpsilon;
+ goto uiZ;
+ }
+ expZ = expA;
+ sigX = sigA | 0x0400;
+ sigY = sigB + (expB ? 0x0400 : sigB);
+ shiftDist = 19 - expDiff;
+ }
+ sig32Z =
+ ((uint_fast32_t) sigX<<19) + ((uint_fast32_t) sigY<<shiftDist);
+ if ( sig32Z < 0x40000000 ) {
+ --expZ;
+ sig32Z <<= 1;
+ }
+ sigZ = sig32Z>>16;
+ if ( sig32Z & 0xFFFF ) {
+ sigZ |= 1;
+ } else {
+ if ( ! (sigZ & 0xF) && (expZ < 0x1E) ) {
+ sigZ >>= 4;
+ goto pack;
+ }
+ }
+ }
+ return softfloat_roundPackToF16( signZ, expZ, sigZ SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN:
+ uiZ = softfloat_propagateNaNF16UI( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ addEpsilon:
+ roundingMode = softfloat_roundingMode;
+ if ( roundingMode != softfloat_round_near_even ) {
+ if (
+ roundingMode
+ == (signF16UI( uiZ ) ? softfloat_round_min
+ : softfloat_round_max)
+ ) {
+ ++uiZ;
+ if ( (uint16_t) (uiZ<<1) == 0xF800 ) {
+ softfloat_raiseFlags(
+ softfloat_flag_overflow | softfloat_flag_inexact
+ SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ }
+#ifdef SOFTFLOAT_ROUND_ODD
+ else if ( roundingMode == softfloat_round_odd ) {
+ uiZ |= 1;
+ }
+#endif
+ }
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ pack:
+ uiZ = packToF16UI( signZ, expZ, sigZ );
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_addMagsF32.c b/src/libs/softfloat-3e/source/s_addMagsF32.c
new file mode 100644
index 00000000..803df7dc
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_addMagsF32.c
@@ -0,0 +1,126 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+
+float32_t softfloat_addMagsF32( uint_fast32_t uiA, uint_fast32_t uiB SOFTFLOAT_STATE_DECL_COMMA )
+{
+ int_fast16_t expA;
+ uint_fast32_t sigA;
+ int_fast16_t expB;
+ uint_fast32_t sigB;
+ int_fast16_t expDiff;
+ uint_fast32_t uiZ;
+ bool signZ;
+ int_fast16_t expZ;
+ uint_fast32_t sigZ;
+ union ui32_f32 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expA = expF32UI( uiA );
+ sigA = fracF32UI( uiA );
+ expB = expF32UI( uiB );
+ sigB = fracF32UI( uiB );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expDiff = expA - expB;
+ if ( ! expDiff ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( ! expA ) {
+ uiZ = uiA + sigB;
+ goto uiZ;
+ }
+ if ( expA == 0xFF ) {
+ if ( sigA | sigB ) goto propagateNaN;
+ uiZ = uiA;
+ goto uiZ;
+ }
+ signZ = signF32UI( uiA );
+ expZ = expA;
+ sigZ = 0x01000000 + sigA + sigB;
+ if ( ! (sigZ & 1) && (expZ < 0xFE) ) {
+ uiZ = packToF32UI( signZ, expZ, sigZ>>1 );
+ goto uiZ;
+ }
+ sigZ <<= 6;
+ } else {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ signZ = signF32UI( uiA );
+ sigA <<= 6;
+ sigB <<= 6;
+ if ( expDiff < 0 ) {
+ if ( expB == 0xFF ) {
+ if ( sigB ) goto propagateNaN;
+ uiZ = packToF32UI( signZ, 0xFF, 0 );
+ goto uiZ;
+ }
+ expZ = expB;
+ sigA += expA ? 0x20000000 : sigA;
+ sigA = softfloat_shiftRightJam32( sigA, -expDiff );
+ } else {
+ if ( expA == 0xFF ) {
+ if ( sigA ) goto propagateNaN;
+ uiZ = uiA;
+ goto uiZ;
+ }
+ expZ = expA;
+ sigB += expB ? 0x20000000 : sigB;
+ sigB = softfloat_shiftRightJam32( sigB, expDiff );
+ }
+ sigZ = 0x20000000 + sigA + sigB;
+ if ( sigZ < 0x40000000 ) {
+ --expZ;
+ sigZ <<= 1;
+ }
+ }
+ return softfloat_roundPackToF32( signZ, expZ, sigZ SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN:
+ uiZ = softfloat_propagateNaNF32UI( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_addMagsF64.c b/src/libs/softfloat-3e/source/s_addMagsF64.c
new file mode 100644
index 00000000..900b19ff
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_addMagsF64.c
@@ -0,0 +1,128 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+
+float64_t
+ softfloat_addMagsF64( uint_fast64_t uiA, uint_fast64_t uiB, bool signZ SOFTFLOAT_STATE_DECL_COMMA )
+{
+ int_fast16_t expA;
+ uint_fast64_t sigA;
+ int_fast16_t expB;
+ uint_fast64_t sigB;
+ int_fast16_t expDiff;
+ uint_fast64_t uiZ;
+ int_fast16_t expZ;
+ uint_fast64_t sigZ;
+ union ui64_f64 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expA = expF64UI( uiA );
+ sigA = fracF64UI( uiA );
+ expB = expF64UI( uiB );
+ sigB = fracF64UI( uiB );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expDiff = expA - expB;
+ if ( ! expDiff ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( ! expA ) {
+ uiZ = uiA + sigB;
+ goto uiZ;
+ }
+ if ( expA == 0x7FF ) {
+ if ( sigA | sigB ) goto propagateNaN;
+ uiZ = uiA;
+ goto uiZ;
+ }
+ expZ = expA;
+ sigZ = UINT64_C( 0x0020000000000000 ) + sigA + sigB;
+ sigZ <<= 9;
+ } else {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ sigA <<= 9;
+ sigB <<= 9;
+ if ( expDiff < 0 ) {
+ if ( expB == 0x7FF ) {
+ if ( sigB ) goto propagateNaN;
+ uiZ = packToF64UI( signZ, 0x7FF, 0 );
+ goto uiZ;
+ }
+ expZ = expB;
+ if ( expA ) {
+ sigA += UINT64_C( 0x2000000000000000 );
+ } else {
+ sigA <<= 1;
+ }
+ sigA = softfloat_shiftRightJam64( sigA, -expDiff );
+ } else {
+ if ( expA == 0x7FF ) {
+ if ( sigA ) goto propagateNaN;
+ uiZ = uiA;
+ goto uiZ;
+ }
+ expZ = expA;
+ if ( expB ) {
+ sigB += UINT64_C( 0x2000000000000000 );
+ } else {
+ sigB <<= 1;
+ }
+ sigB = softfloat_shiftRightJam64( sigB, expDiff );
+ }
+ sigZ = UINT64_C( 0x2000000000000000 ) + sigA + sigB;
+ if ( sigZ < UINT64_C( 0x4000000000000000 ) ) {
+ --expZ;
+ sigZ <<= 1;
+ }
+ }
+ return softfloat_roundPackToF64( signZ, expZ, sigZ SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN:
+ uiZ = softfloat_propagateNaNF64UI( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_approxRecip32_1.c b/src/libs/softfloat-3e/source/s_approxRecip32_1.c
new file mode 100644
index 00000000..99eff078
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_approxRecip32_1.c
@@ -0,0 +1,67 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+
+#ifndef softfloat_approxRecip32_1
+uint32_t softfloat_approxRecip32_1( uint32_t a ); /* VBox: Missing prototype */
+
+extern const uint16_t softfloat_approxRecip_1k0s[16];
+extern const uint16_t softfloat_approxRecip_1k1s[16];
+
+uint32_t softfloat_approxRecip32_1( uint32_t a )
+{
+ int index;
+ uint16_t eps, r0;
+ uint32_t sigma0;
+ uint_fast32_t r;
+ uint32_t sqrSigma0;
+
+ index = a>>27 & 0xF;
+ eps = (uint16_t) (a>>11);
+ r0 = softfloat_approxRecip_1k0s[index]
+ - ((softfloat_approxRecip_1k1s[index] * (uint_fast32_t) eps)>>20);
+ sigma0 = ~(uint_fast32_t) ((r0 * (uint_fast64_t) a)>>7);
+ r = ((uint_fast32_t) r0<<16) + ((r0 * (uint_fast64_t) sigma0)>>24);
+ sqrSigma0 = ((uint_fast64_t) sigma0 * sigma0)>>32;
+ r += ((uint32_t) r * (uint_fast64_t) sqrSigma0)>>48;
+ return r;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_approxRecipSqrt32_1.c b/src/libs/softfloat-3e/source/s_approxRecipSqrt32_1.c
new file mode 100644
index 00000000..e85e8a56
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_approxRecipSqrt32_1.c
@@ -0,0 +1,75 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+
+#ifndef softfloat_approxRecipSqrt32_1
+# undef INLINE_LEVEL /* VBox: Missing prototype */
+# include "primitives.h" /* VBox: Missing prototype */
+
+extern const uint16_t softfloat_approxRecipSqrt_1k0s[];
+extern const uint16_t softfloat_approxRecipSqrt_1k1s[];
+
+uint32_t softfloat_approxRecipSqrt32_1( unsigned int oddExpA, uint32_t a )
+{
+ int index;
+ uint16_t eps, r0;
+ uint_fast32_t ESqrR0;
+ uint32_t sigma0;
+ uint_fast32_t r;
+ uint32_t sqrSigma0;
+
+ index = (a>>27 & 0xE) + oddExpA;
+ eps = (uint16_t) (a>>12);
+ r0 = softfloat_approxRecipSqrt_1k0s[index]
+ - ((softfloat_approxRecipSqrt_1k1s[index] * (uint_fast32_t) eps)
+ >>20);
+ ESqrR0 = (uint_fast32_t) r0 * r0;
+ if ( ! oddExpA ) ESqrR0 <<= 1;
+ sigma0 = ~(uint_fast32_t) (((uint32_t) ESqrR0 * (uint_fast64_t) a)>>23);
+ r = ((uint_fast32_t) r0<<16) + ((r0 * (uint_fast64_t) sigma0)>>25);
+ sqrSigma0 = ((uint_fast64_t) sigma0 * sigma0)>>32;
+ r += ((uint32_t) ((r>>1) + (r>>3) - ((uint_fast32_t) r0<<14))
+ * (uint_fast64_t) sqrSigma0)
+ >>48;
+ if ( ! (r & 0x80000000) ) r = 0x80000000;
+ return r;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_approxRecipSqrt_1Ks.c b/src/libs/softfloat-3e/source/s_approxRecipSqrt_1Ks.c
new file mode 100644
index 00000000..7a8663b5
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_approxRecipSqrt_1Ks.c
@@ -0,0 +1,49 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+
+const uint16_t softfloat_approxRecipSqrt_1k0s[16] = {
+ 0xB4C9, 0xFFAB, 0xAA7D, 0xF11C, 0xA1C5, 0xE4C7, 0x9A43, 0xDA29,
+ 0x93B5, 0xD0E5, 0x8DED, 0xC8B7, 0x88C6, 0xC16D, 0x8424, 0xBAE1
+};
+const uint16_t softfloat_approxRecipSqrt_1k1s[16] = {
+ 0xA5A5, 0xEA42, 0x8C21, 0xC62D, 0x788F, 0xAA7F, 0x6928, 0x94B6,
+ 0x5CC7, 0x8335, 0x52A6, 0x74E2, 0x4A3E, 0x68FE, 0x432B, 0x5EFD
+};
+
diff --git a/src/libs/softfloat-3e/source/s_approxRecip_1Ks.c b/src/libs/softfloat-3e/source/s_approxRecip_1Ks.c
new file mode 100644
index 00000000..54b1b0fa
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_approxRecip_1Ks.c
@@ -0,0 +1,49 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+
+const uint16_t softfloat_approxRecip_1k0s[16] = {
+ 0xFFC4, 0xF0BE, 0xE363, 0xD76F, 0xCCAD, 0xC2F0, 0xBA16, 0xB201,
+ 0xAA97, 0xA3C6, 0x9D7A, 0x97A6, 0x923C, 0x8D32, 0x887E, 0x8417
+};
+const uint16_t softfloat_approxRecip_1k1s[16] = {
+ 0xF0F1, 0xD62C, 0xBFA1, 0xAC77, 0x9C0A, 0x8DDB, 0x8185, 0x76BA,
+ 0x6D3B, 0x64D4, 0x5D5C, 0x56B1, 0x50B6, 0x4B55, 0x4679, 0x4211
+};
+
diff --git a/src/libs/softfloat-3e/source/s_compare128M.c b/src/libs/softfloat-3e/source/s_compare128M.c
new file mode 100644
index 00000000..8f121820
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_compare128M.c
@@ -0,0 +1,62 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_compare128M
+
+int_fast8_t softfloat_compare128M( const uint32_t *aPtr, const uint32_t *bPtr )
+{
+ unsigned int index, lastIndex;
+ uint32_t wordA, wordB;
+
+ index = indexWordHi( 4 );
+ lastIndex = indexWordLo( 4 );
+ for (;;) {
+ wordA = aPtr[index];
+ wordB = bPtr[index];
+ if ( wordA != wordB ) return (wordA < wordB) ? -1 : 1;
+ if ( index == lastIndex ) break;
+ index -= wordIncr;
+ }
+ return 0;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_compare96M.c b/src/libs/softfloat-3e/source/s_compare96M.c
new file mode 100644
index 00000000..8fdf7186
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_compare96M.c
@@ -0,0 +1,62 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_compare96M
+
+int_fast8_t softfloat_compare96M( const uint32_t *aPtr, const uint32_t *bPtr )
+{
+ unsigned int index, lastIndex;
+ uint32_t wordA, wordB;
+
+ index = indexWordHi( 3 );
+ lastIndex = indexWordLo( 3 );
+ for (;;) {
+ wordA = aPtr[index];
+ wordB = bPtr[index];
+ if ( wordA != wordB ) return (wordA < wordB) ? -1 : 1;
+ if ( index == lastIndex ) break;
+ index -= wordIncr;
+ }
+ return 0;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_compareNonnormExtF80M.c b/src/libs/softfloat-3e/source/s_compareNonnormExtF80M.c
new file mode 100644
index 00000000..6712e576
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_compareNonnormExtF80M.c
@@ -0,0 +1,111 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat_types.h"
+
+int
+ softfloat_compareNonnormExtF80M(
+ const struct extFloat80M *aSPtr, const struct extFloat80M *bSPtr )
+{
+ uint_fast16_t uiA64, uiB64;
+ uint64_t sigA;
+ bool signB;
+ uint64_t sigB;
+ int32_t expA, expB;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiA64 = aSPtr->signExp;
+ uiB64 = bSPtr->signExp;
+ sigA = aSPtr->signif;
+ signB = signExtF80UI64( uiB64 );
+ sigB = bSPtr->signif;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( (uiA64 ^ uiB64) & 0x8000 ) {
+ if ( ! (sigA | sigB) ) return 0;
+ goto resultFromSignB;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expA = expExtF80UI64( uiA64 );
+ expB = expExtF80UI64( uiB64 );
+ if ( expA == 0x7FFF ) {
+ if (expB == 0x7FFF) return 0;
+ signB = ! signB;
+ goto resultFromSignB;
+ }
+ if ( expB == 0x7FFF ) {
+ goto resultFromSignB;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expA ) expA = 1;
+ if ( ! (sigA & UINT64_C( 0x8000000000000000 )) ) {
+ if ( sigA ) {
+ expA += softfloat_normExtF80SigM( &sigA );
+ } else {
+ expA = -128;
+ }
+ }
+ if ( ! expB ) expB = 1;
+ if ( ! (sigB & UINT64_C( 0x8000000000000000 )) ) {
+ if ( sigB ) {
+ expB += softfloat_normExtF80SigM( &sigB );
+ } else {
+ expB = -128;
+ }
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( signB ) {
+ if ( expA < expB ) return 1;
+ if ( (expB < expA) || (sigB < sigA) ) return -1;
+ } else {
+ if ( expB < expA ) return 1;
+ if ( (expA < expB) || (sigA < sigB) ) return -1;
+ }
+ return (sigA != sigB);
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ resultFromSignB:
+ return signB ? 1 : -1;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_countLeadingZeros16.c b/src/libs/softfloat-3e/source/s_countLeadingZeros16.c
new file mode 100644
index 00000000..af2831cc
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_countLeadingZeros16.c
@@ -0,0 +1,60 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+
+#ifndef softfloat_countLeadingZeros16
+
+#define softfloat_countLeadingZeros16 softfloat_countLeadingZeros16
+#include "primitives.h"
+
+uint_fast8_t softfloat_countLeadingZeros16( uint16_t a )
+{
+ uint_fast8_t count;
+
+ count = 8;
+ if ( 0x100 <= a ) {
+ count = 0;
+ a >>= 8;
+ }
+ count += softfloat_countLeadingZeros8[a];
+ return count;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_countLeadingZeros32.c b/src/libs/softfloat-3e/source/s_countLeadingZeros32.c
new file mode 100644
index 00000000..a7c50cd4
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_countLeadingZeros32.c
@@ -0,0 +1,64 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+
+#ifndef softfloat_countLeadingZeros32
+
+#define softfloat_countLeadingZeros32 softfloat_countLeadingZeros32
+#include "primitives.h"
+
+uint_fast8_t softfloat_countLeadingZeros32( uint32_t a )
+{
+ uint_fast8_t count;
+
+ count = 0;
+ if ( a < 0x10000 ) {
+ count = 16;
+ a <<= 16;
+ }
+ if ( a < 0x1000000 ) {
+ count += 8;
+ a <<= 8;
+ }
+ count += softfloat_countLeadingZeros8[a>>24];
+ return count;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_countLeadingZeros64.c b/src/libs/softfloat-3e/source/s_countLeadingZeros64.c
new file mode 100644
index 00000000..34745b12
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_countLeadingZeros64.c
@@ -0,0 +1,73 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+
+#ifndef softfloat_countLeadingZeros64
+
+#define softfloat_countLeadingZeros64 softfloat_countLeadingZeros64
+#include "primitives.h"
+
+uint_fast8_t softfloat_countLeadingZeros64( uint64_t a )
+{
+ uint_fast8_t count;
+ uint32_t a32;
+
+ count = 0;
+ a32 = a>>32;
+ if ( ! a32 ) {
+ count = 32;
+ a32 = a;
+ }
+ /*------------------------------------------------------------------------
+ | From here, result is current count + count leading zeros of `a32'.
+ *------------------------------------------------------------------------*/
+ if ( a32 < 0x10000 ) {
+ count += 16;
+ a32 <<= 16;
+ }
+ if ( a32 < 0x1000000 ) {
+ count += 8;
+ a32 <<= 8;
+ }
+ count += softfloat_countLeadingZeros8[a32>>24];
+ return count;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_countLeadingZeros8.c b/src/libs/softfloat-3e/source/s_countLeadingZeros8.c
new file mode 100644
index 00000000..0cc60a11
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_countLeadingZeros8.c
@@ -0,0 +1,59 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+
+const uint_least8_t softfloat_countLeadingZeros8[256] = {
+ 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
diff --git a/src/libs/softfloat-3e/source/s_eq128.c b/src/libs/softfloat-3e/source/s_eq128.c
new file mode 100644
index 00000000..7b2015dc
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_eq128.c
@@ -0,0 +1,53 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+
+#ifndef softfloat_eq128
+# undef INLINE_LEVEL /* VBox: Missing prototype */
+# include "primitives.h" /* VBox: Missing prototype */
+
+bool softfloat_eq128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )
+{
+
+ return (a64 == b64) && (a0 == b0);
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_invalidExtF80M.c b/src/libs/softfloat-3e/source/s_invalidExtF80M.c
new file mode 100644
index 00000000..bb35066b
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_invalidExtF80M.c
@@ -0,0 +1,49 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include "platform.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+void softfloat_invalidExtF80M( struct extFloat80M *zSPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ zSPtr->signExp = defaultNaNExtF80UI64;
+ zSPtr->signif = defaultNaNExtF80UI0;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_invalidF128M.c b/src/libs/softfloat-3e/source/s_invalidF128M.c
new file mode 100644
index 00000000..c79a6f0b
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_invalidF128M.c
@@ -0,0 +1,53 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+void softfloat_invalidF128M( uint32_t *zWPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ zWPtr[indexWord( 4, 3 )] = defaultNaNF128UI96;
+ zWPtr[indexWord( 4, 2 )] = defaultNaNF128UI64;
+ zWPtr[indexWord( 4, 1 )] = defaultNaNF128UI32;
+ zWPtr[indexWord( 4, 0 )] = defaultNaNF128UI0;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_isNaNF128M.c b/src/libs/softfloat-3e/source/s_isNaNF128M.c
new file mode 100644
index 00000000..c73e49b4
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_isNaNF128M.c
@@ -0,0 +1,57 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+bool softfloat_isNaNF128M( const uint32_t *aWPtr )
+{
+ uint32_t uiA96;
+
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ if ( (~uiA96 & 0x7FFF0000) != 0 ) return false;
+ return
+ ((uiA96 & 0x0000FFFF) != 0)
+ || ((aWPtr[indexWord( 4, 2 )] | aWPtr[indexWord( 4, 1 )]
+ | aWPtr[indexWord( 4, 0 )])
+ != 0);
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_le128.c b/src/libs/softfloat-3e/source/s_le128.c
new file mode 100644
index 00000000..6ce33649
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_le128.c
@@ -0,0 +1,53 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+
+#ifndef softfloat_le128
+# undef INLINE_LEVEL /* VBox: Missing prototype */
+# include "primitives.h" /* VBox: Missing prototype */
+
+bool softfloat_le128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )
+{
+
+ return (a64 < b64) || ((a64 == b64) && (a0 <= b0));
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_lt128.c b/src/libs/softfloat-3e/source/s_lt128.c
new file mode 100644
index 00000000..608b2310
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_lt128.c
@@ -0,0 +1,53 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+
+#ifndef softfloat_lt128
+# undef INLINE_LEVEL /* VBox: Missing prototype */
+# include "primitives.h" /* VBox: Missing prototype */
+
+bool softfloat_lt128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )
+{
+
+ return (a64 < b64) || ((a64 == b64) && (a0 < b0));
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_mul128By32.c b/src/libs/softfloat-3e/source/s_mul128By32.c
new file mode 100644
index 00000000..df32ee73
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_mul128By32.c
@@ -0,0 +1,58 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_mul128By32
+
+struct uint128 softfloat_mul128By32( uint64_t a64, uint64_t a0, uint32_t b )
+{
+ struct uint128 z;
+ uint_fast64_t mid;
+ uint_fast32_t carry;
+
+ z.v0 = a0 * b;
+ mid = (uint_fast64_t) (uint32_t) (a0>>32) * b;
+ carry = (uint32_t) ((uint_fast32_t) (z.v0>>32) - (uint_fast32_t) mid);
+ z.v64 = a64 * b + (uint_fast32_t) ((mid + carry)>>32);
+ return z;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_mul128MTo256M.c b/src/libs/softfloat-3e/source/s_mul128MTo256M.c
new file mode 100644
index 00000000..68d272ea
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_mul128MTo256M.c
@@ -0,0 +1,100 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_mul128MTo256M
+
+void
+ softfloat_mul128MTo256M(
+ const uint32_t *aPtr, const uint32_t *bPtr, uint32_t *zPtr )
+{
+ uint32_t *lastZPtr, wordB;
+ uint64_t dwordProd;
+ uint32_t wordZ;
+ uint_fast8_t carry;
+
+ bPtr += indexWordLo( 4 );
+ lastZPtr = zPtr + indexMultiwordHi( 8, 5 );
+ zPtr += indexMultiwordLo( 8, 5 );
+ wordB = *bPtr;
+ dwordProd = (uint64_t) aPtr[indexWord( 4, 0 )] * wordB;
+ zPtr[indexWord( 5, 0 )] = dwordProd;
+ dwordProd = (uint64_t) aPtr[indexWord( 4, 1 )] * wordB + (dwordProd>>32);
+ zPtr[indexWord( 5, 1 )] = dwordProd;
+ dwordProd = (uint64_t) aPtr[indexWord( 4, 2 )] * wordB + (dwordProd>>32);
+ zPtr[indexWord( 5, 2 )] = dwordProd;
+ dwordProd = (uint64_t) aPtr[indexWord( 4, 3 )] * wordB + (dwordProd>>32);
+ zPtr[indexWord( 5, 3 )] = dwordProd;
+ zPtr[indexWord( 5, 4 )] = dwordProd>>32;
+ do {
+ bPtr += wordIncr;
+ zPtr += wordIncr;
+ wordB = *bPtr;
+ dwordProd = (uint64_t) aPtr[indexWord( 4, 0 )] * wordB;
+ wordZ = zPtr[indexWord( 5, 0 )] + (uint32_t) dwordProd;
+ zPtr[indexWord( 5, 0 )] = wordZ;
+ carry = (wordZ < (uint32_t) dwordProd);
+ dwordProd =
+ (uint64_t) aPtr[indexWord( 4, 1 )] * wordB + (dwordProd>>32);
+ wordZ = zPtr[indexWord( 5, 1 )] + (uint32_t) dwordProd + carry;
+ zPtr[indexWord( 5, 1 )] = wordZ;
+ if ( wordZ != (uint32_t) dwordProd ) {
+ carry = (wordZ < (uint32_t) dwordProd);
+ }
+ dwordProd =
+ (uint64_t) aPtr[indexWord( 4, 2 )] * wordB + (dwordProd>>32);
+ wordZ = zPtr[indexWord( 5, 2 )] + (uint32_t) dwordProd + carry;
+ zPtr[indexWord( 5, 2 )] = wordZ;
+ if ( wordZ != (uint32_t) dwordProd ) {
+ carry = (wordZ < (uint32_t) dwordProd);
+ }
+ dwordProd =
+ (uint64_t) aPtr[indexWord( 4, 3 )] * wordB + (dwordProd>>32);
+ wordZ = zPtr[indexWord( 5, 3 )] + (uint32_t) dwordProd + carry;
+ zPtr[indexWord( 5, 3 )] = wordZ;
+ if ( wordZ != (uint32_t) dwordProd ) {
+ carry = (wordZ < (uint32_t) dwordProd);
+ }
+ zPtr[indexWord( 5, 4 )] = (dwordProd>>32) + carry;
+ } while ( zPtr != lastZPtr );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_mul128To256M.c b/src/libs/softfloat-3e/source/s_mul128To256M.c
new file mode 100644
index 00000000..91df8f22
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_mul128To256M.c
@@ -0,0 +1,71 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+
+#ifndef softfloat_mul128To256M
+
+#define softfloat_mul128To256M softfloat_mul128To256M
+#include "primitives.h"
+
+void
+ softfloat_mul128To256M(
+ uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0, uint64_t *zPtr )
+{
+ struct uint128 p0, p64, p128;
+ uint_fast64_t z64, z128, z192;
+
+ p0 = softfloat_mul64To128( a0, b0 );
+ zPtr[indexWord( 4, 0 )] = p0.v0;
+ p64 = softfloat_mul64To128( a64, b0 );
+ z64 = p64.v0 + p0.v64;
+ z128 = p64.v64 + (z64 < p64.v0);
+ p128 = softfloat_mul64To128( a64, b64 );
+ z128 += p128.v0;
+ z192 = p128.v64 + (z128 < p128.v0);
+ p64 = softfloat_mul64To128( a0, b64 );
+ z64 += p64.v0;
+ zPtr[indexWord( 4, 1 )] = z64;
+ p64.v64 += (z64 < p64.v0);
+ z128 += p64.v64;
+ zPtr[indexWord( 4, 2 )] = z128;
+ zPtr[indexWord( 4, 3 )] = z192 + (z128 < p64.v64);
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_mul64ByShifted32To128.c b/src/libs/softfloat-3e/source/s_mul64ByShifted32To128.c
new file mode 100644
index 00000000..ea8d486a
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_mul64ByShifted32To128.c
@@ -0,0 +1,56 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_mul64ByShifted32To128
+
+struct uint128 softfloat_mul64ByShifted32To128( uint64_t a, uint32_t b )
+{
+ uint_fast64_t mid;
+ struct uint128 z;
+
+ mid = (uint_fast64_t) (uint32_t) a * b;
+ z.v0 = mid<<32;
+ z.v64 = (uint_fast64_t) (uint32_t) (a>>32) * b + (mid>>32);
+ return z;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_mul64To128.c b/src/libs/softfloat-3e/source/s_mul64To128.c
new file mode 100644
index 00000000..0a3c2b99
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_mul64To128.c
@@ -0,0 +1,66 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_mul64To128
+
+struct uint128 softfloat_mul64To128( uint64_t a, uint64_t b )
+{
+ uint32_t a32, a0, b32, b0;
+ struct uint128 z;
+ uint64_t mid1, mid;
+
+ a32 = a>>32;
+ a0 = a;
+ b32 = b>>32;
+ b0 = b;
+ z.v0 = (uint_fast64_t) a0 * b0;
+ mid1 = (uint_fast64_t) a32 * b0;
+ mid = mid1 + (uint_fast64_t) a0 * b32;
+ z.v64 = (uint_fast64_t) a32 * b32;
+ z.v64 += (uint_fast64_t) (mid < mid1)<<32 | mid>>32;
+ mid <<= 32;
+ z.v0 += mid;
+ z.v64 += (z.v0 < mid);
+ return z;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_mul64To128M.c b/src/libs/softfloat-3e/source/s_mul64To128M.c
new file mode 100644
index 00000000..cd152897
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_mul64To128M.c
@@ -0,0 +1,68 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_mul64To128M
+
+void softfloat_mul64To128M( uint64_t a, uint64_t b, uint32_t *zPtr )
+{
+ uint32_t a32, a0, b32, b0;
+ uint64_t z0, mid1, z64, mid;
+
+ a32 = a>>32;
+ a0 = a;
+ b32 = b>>32;
+ b0 = b;
+ z0 = (uint64_t) a0 * b0;
+ mid1 = (uint64_t) a32 * b0;
+ mid = mid1 + (uint64_t) a0 * b32;
+ z64 = (uint64_t) a32 * b32;
+ z64 += (uint64_t) (mid < mid1)<<32 | mid>>32;
+ mid <<= 32;
+ z0 += mid;
+ zPtr[indexWord( 4, 1 )] = z0>>32;
+ zPtr[indexWord( 4, 0 )] = z0;
+ z64 += (z0 < mid);
+ zPtr[indexWord( 4, 3 )] = z64>>32;
+ zPtr[indexWord( 4, 2 )] = z64;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_mulAddF128.c b/src/libs/softfloat-3e/source/s_mulAddF128.c
new file mode 100644
index 00000000..08a301e3
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_mulAddF128.c
@@ -0,0 +1,351 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float128_t
+ softfloat_mulAddF128(
+ uint_fast64_t uiA64,
+ uint_fast64_t uiA0,
+ uint_fast64_t uiB64,
+ uint_fast64_t uiB0,
+ uint_fast64_t uiC64,
+ uint_fast64_t uiC0,
+ uint_fast8_t op
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ bool signA;
+ int_fast32_t expA;
+ struct uint128 sigA;
+ bool signB;
+ int_fast32_t expB;
+ struct uint128 sigB;
+ bool signC;
+ int_fast32_t expC;
+ struct uint128 sigC;
+ bool signZ;
+ uint_fast64_t magBits;
+ struct uint128 uiZ;
+ struct exp32_sig128 normExpSig;
+ int_fast32_t expZ;
+ uint64_t sig256Z[4];
+ struct uint128 sigZ;
+ int_fast32_t shiftDist, expDiff;
+ struct uint128 x128;
+ uint64_t sig256C[4];
+ static uint64_t zero256[4] = INIT_UINTM4( 0, 0, 0, 0 );
+ uint_fast64_t sigZExtra, sig256Z0;
+ union ui128_f128 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ signA = signF128UI64( uiA64 );
+ expA = expF128UI64( uiA64 );
+ sigA.v64 = fracF128UI64( uiA64 );
+ sigA.v0 = uiA0;
+ signB = signF128UI64( uiB64 );
+ expB = expF128UI64( uiB64 );
+ sigB.v64 = fracF128UI64( uiB64 );
+ sigB.v0 = uiB0;
+ signC = signF128UI64( uiC64 ) ^ (op == softfloat_mulAdd_subC);
+ expC = expF128UI64( uiC64 );
+ sigC.v64 = fracF128UI64( uiC64 );
+ sigC.v0 = uiC0;
+ signZ = signA ^ signB ^ (op == softfloat_mulAdd_subProd);
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0x7FFF ) {
+ if (
+ (sigA.v64 | sigA.v0) || ((expB == 0x7FFF) && (sigB.v64 | sigB.v0))
+ ) {
+ goto propagateNaN_ABC;
+ }
+ magBits = expB | sigB.v64 | sigB.v0;
+ goto infProdArg;
+ }
+ if ( expB == 0x7FFF ) {
+ if ( sigB.v64 | sigB.v0 ) goto propagateNaN_ABC;
+ magBits = expA | sigA.v64 | sigA.v0;
+ goto infProdArg;
+ }
+ if ( expC == 0x7FFF ) {
+ if ( sigC.v64 | sigC.v0 ) {
+ uiZ.v64 = 0;
+ uiZ.v0 = 0;
+ goto propagateNaN_ZC;
+ }
+ uiZ.v64 = uiC64;
+ uiZ.v0 = uiC0;
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expA ) {
+ if ( ! (sigA.v64 | sigA.v0) ) goto zeroProd;
+ normExpSig = softfloat_normSubnormalF128Sig( sigA.v64, sigA.v0 );
+ expA = normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ if ( ! expB ) {
+ if ( ! (sigB.v64 | sigB.v0) ) goto zeroProd;
+ normExpSig = softfloat_normSubnormalF128Sig( sigB.v64, sigB.v0 );
+ expB = normExpSig.exp;
+ sigB = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expZ = expA + expB - 0x3FFE;
+ sigA.v64 |= UINT64_C( 0x0001000000000000 );
+ sigB.v64 |= UINT64_C( 0x0001000000000000 );
+ sigA = softfloat_shortShiftLeft128( sigA.v64, sigA.v0, 8 );
+ sigB = softfloat_shortShiftLeft128( sigB.v64, sigB.v0, 15 );
+ softfloat_mul128To256M( sigA.v64, sigA.v0, sigB.v64, sigB.v0, sig256Z );
+ sigZ.v64 = sig256Z[indexWord( 4, 3 )];
+ sigZ.v0 = sig256Z[indexWord( 4, 2 )];
+ shiftDist = 0;
+ if ( ! (sigZ.v64 & UINT64_C( 0x0100000000000000 )) ) {
+ --expZ;
+ shiftDist = -1;
+ }
+ if ( ! expC ) {
+ if ( ! (sigC.v64 | sigC.v0) ) {
+ shiftDist += 8;
+ goto sigZ;
+ }
+ normExpSig = softfloat_normSubnormalF128Sig( sigC.v64, sigC.v0 );
+ expC = normExpSig.exp;
+ sigC = normExpSig.sig;
+ }
+ sigC.v64 |= UINT64_C( 0x0001000000000000 );
+ sigC = softfloat_shortShiftLeft128( sigC.v64, sigC.v0, 8 );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expDiff = expZ - expC;
+ if ( expDiff < 0 ) {
+ expZ = expC;
+ if ( (signZ == signC) || (expDiff < -1) ) {
+ shiftDist -= expDiff;
+ if ( shiftDist ) {
+ sigZ =
+ softfloat_shiftRightJam128( sigZ.v64, sigZ.v0, shiftDist );
+ }
+ } else {
+ if ( ! shiftDist ) {
+ x128 =
+ softfloat_shortShiftRight128(
+ sig256Z[indexWord( 4, 1 )], sig256Z[indexWord( 4, 0 )],
+ 1
+ );
+ sig256Z[indexWord( 4, 1 )] = (sigZ.v0<<63) | x128.v64;
+ sig256Z[indexWord( 4, 0 )] = x128.v0;
+ sigZ = softfloat_shortShiftRight128( sigZ.v64, sigZ.v0, 1 );
+ sig256Z[indexWord( 4, 3 )] = sigZ.v64;
+ sig256Z[indexWord( 4, 2 )] = sigZ.v0;
+ }
+ }
+ } else {
+ if ( shiftDist ) softfloat_add256M( sig256Z, sig256Z, sig256Z );
+ if ( ! expDiff ) {
+ sigZ.v64 = sig256Z[indexWord( 4, 3 )];
+ sigZ.v0 = sig256Z[indexWord( 4, 2 )];
+ } else {
+ sig256C[indexWord( 4, 3 )] = sigC.v64;
+ sig256C[indexWord( 4, 2 )] = sigC.v0;
+ sig256C[indexWord( 4, 1 )] = 0;
+ sig256C[indexWord( 4, 0 )] = 0;
+ softfloat_shiftRightJam256M( sig256C, expDiff, sig256C );
+ }
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ shiftDist = 8;
+ if ( signZ == signC ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( expDiff <= 0 ) {
+ sigZ = softfloat_add128( sigC.v64, sigC.v0, sigZ.v64, sigZ.v0 );
+ } else {
+ softfloat_add256M( sig256Z, sig256C, sig256Z );
+ sigZ.v64 = sig256Z[indexWord( 4, 3 )];
+ sigZ.v0 = sig256Z[indexWord( 4, 2 )];
+ }
+ if ( sigZ.v64 & UINT64_C( 0x0200000000000000 ) ) {
+ ++expZ;
+ shiftDist = 9;
+ }
+ } else {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( expDiff < 0 ) {
+ signZ = signC;
+ if ( expDiff < -1 ) {
+ sigZ =
+ softfloat_sub128( sigC.v64, sigC.v0, sigZ.v64, sigZ.v0 );
+ sigZExtra =
+ sig256Z[indexWord( 4, 1 )] | sig256Z[indexWord( 4, 0 )];
+ if ( sigZExtra ) {
+ sigZ = softfloat_sub128( sigZ.v64, sigZ.v0, 0, 1 );
+ }
+ if ( ! (sigZ.v64 & UINT64_C( 0x0100000000000000 )) ) {
+ --expZ;
+ shiftDist = 7;
+ }
+ goto shiftRightRoundPack;
+ } else {
+ sig256C[indexWord( 4, 3 )] = sigC.v64;
+ sig256C[indexWord( 4, 2 )] = sigC.v0;
+ sig256C[indexWord( 4, 1 )] = 0;
+ sig256C[indexWord( 4, 0 )] = 0;
+ softfloat_sub256M( sig256C, sig256Z, sig256Z );
+ }
+ } else if ( ! expDiff ) {
+ sigZ = softfloat_sub128( sigZ.v64, sigZ.v0, sigC.v64, sigC.v0 );
+ if (
+ ! (sigZ.v64 | sigZ.v0) && ! sig256Z[indexWord( 4, 1 )]
+ && ! sig256Z[indexWord( 4, 0 )]
+ ) {
+ goto completeCancellation;
+ }
+ sig256Z[indexWord( 4, 3 )] = sigZ.v64;
+ sig256Z[indexWord( 4, 2 )] = sigZ.v0;
+ if ( sigZ.v64 & UINT64_C( 0x8000000000000000 ) ) {
+ signZ = ! signZ;
+ softfloat_sub256M( zero256, sig256Z, sig256Z );
+ }
+ } else {
+ softfloat_sub256M( sig256Z, sig256C, sig256Z );
+ if ( 1 < expDiff ) {
+ sigZ.v64 = sig256Z[indexWord( 4, 3 )];
+ sigZ.v0 = sig256Z[indexWord( 4, 2 )];
+ if ( ! (sigZ.v64 & UINT64_C( 0x0100000000000000 )) ) {
+ --expZ;
+ shiftDist = 7;
+ }
+ goto sigZ;
+ }
+ }
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ sigZ.v64 = sig256Z[indexWord( 4, 3 )];
+ sigZ.v0 = sig256Z[indexWord( 4, 2 )];
+ sigZExtra = sig256Z[indexWord( 4, 1 )];
+ sig256Z0 = sig256Z[indexWord( 4, 0 )];
+ if ( sigZ.v64 ) {
+ if ( sig256Z0 ) sigZExtra |= 1;
+ } else {
+ expZ -= 64;
+ sigZ.v64 = sigZ.v0;
+ sigZ.v0 = sigZExtra;
+ sigZExtra = sig256Z0;
+ if ( ! sigZ.v64 ) {
+ expZ -= 64;
+ sigZ.v64 = sigZ.v0;
+ sigZ.v0 = sigZExtra;
+ sigZExtra = 0;
+ if ( ! sigZ.v64 ) {
+ expZ -= 64;
+ sigZ.v64 = sigZ.v0;
+ sigZ.v0 = 0;
+ }
+ }
+ }
+ shiftDist = softfloat_countLeadingZeros64( sigZ.v64 );
+ expZ += 7 - shiftDist;
+ shiftDist = 15 - shiftDist;
+ if ( 0 < shiftDist ) goto shiftRightRoundPack;
+ if ( shiftDist ) {
+ shiftDist = -shiftDist;
+ sigZ = softfloat_shortShiftLeft128( sigZ.v64, sigZ.v0, shiftDist );
+ x128 = softfloat_shortShiftLeft128( 0, sigZExtra, shiftDist );
+ sigZ.v0 |= x128.v64;
+ sigZExtra = x128.v0;
+ }
+ goto roundPack;
+ }
+ sigZ:
+ sigZExtra = sig256Z[indexWord( 4, 1 )] | sig256Z[indexWord( 4, 0 )];
+ shiftRightRoundPack:
+ sigZExtra = (uint64_t) (sigZ.v0<<(64 - shiftDist)) | (sigZExtra != 0);
+ sigZ = softfloat_shortShiftRight128( sigZ.v64, sigZ.v0, shiftDist );
+ roundPack:
+ return
+ softfloat_roundPackToF128(
+ signZ, expZ - 1, sigZ.v64, sigZ.v0, sigZExtra SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN_ABC:
+ uiZ = softfloat_propagateNaNF128UI( uiA64, uiA0, uiB64, uiB0 SOFTFLOAT_STATE_ARG_COMMA );
+ goto propagateNaN_ZC;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ infProdArg:
+ if ( magBits ) {
+ uiZ.v64 = packToF128UI64( signZ, 0x7FFF, 0 );
+ uiZ.v0 = 0;
+ if ( expC != 0x7FFF ) goto uiZ;
+ if ( sigC.v64 | sigC.v0 ) goto propagateNaN_ZC;
+ if ( signZ == signC ) goto uiZ;
+ }
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ.v64 = defaultNaNF128UI64;
+ uiZ.v0 = defaultNaNF128UI0;
+ propagateNaN_ZC:
+ uiZ = softfloat_propagateNaNF128UI( uiZ.v64, uiZ.v0, uiC64, uiC0 SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zeroProd:
+ uiZ.v64 = uiC64;
+ uiZ.v0 = uiC0;
+ if ( ! (expC | sigC.v64 | sigC.v0) && (signZ != signC) ) {
+ completeCancellation:
+ uiZ.v64 =
+ packToF128UI64(
+ (softfloat_roundingMode == softfloat_round_min), 0, 0 );
+ uiZ.v0 = 0;
+ }
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_mulAddF128M.c b/src/libs/softfloat-3e/source/s_mulAddF128M.c
new file mode 100644
index 00000000..3fcb9063
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_mulAddF128M.c
@@ -0,0 +1,383 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+void
+ softfloat_mulAddF128M(
+ const uint32_t *aWPtr,
+ const uint32_t *bWPtr,
+ const uint32_t *cWPtr,
+ uint32_t *zWPtr,
+ uint_fast8_t op
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ uint32_t uiA96;
+ int32_t expA;
+ uint32_t uiB96;
+ int32_t expB;
+ uint32_t uiC96;
+ bool signC;
+ int32_t expC;
+ bool signProd, prodIsInfinite;
+ uint32_t *ptr, uiZ96, sigA[4];
+ uint_fast8_t shiftDist;
+ uint32_t sigX[5];
+ int32_t expProd;
+ uint32_t sigProd[8], wordSig;
+ bool doSub;
+ uint_fast8_t
+ (*addCarryMRoutinePtr)(
+ uint_fast8_t,
+ const uint32_t *,
+ const uint32_t *,
+ uint_fast8_t,
+ uint32_t *
+ );
+ int32_t expDiff;
+ bool signZ;
+ int32_t expZ;
+ uint32_t *extSigPtr;
+ uint_fast8_t carry;
+ void (*roundPackRoutinePtr)( bool, int32_t, uint32_t *, uint32_t * SOFTFLOAT_STATE_DECL_COMMA );
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uiA96 = aWPtr[indexWordHi( 4 )];
+ expA = expF128UI96( uiA96 );
+ uiB96 = bWPtr[indexWordHi( 4 )];
+ expB = expF128UI96( uiB96 );
+ uiC96 = cWPtr[indexWordHi( 4 )];
+ signC = signF128UI96( uiC96 ) ^ (op == softfloat_mulAdd_subC);
+ expC = expF128UI96( uiC96 );
+ signProd =
+ signF128UI96( uiA96 ) ^ signF128UI96( uiB96 )
+ ^ (op == softfloat_mulAdd_subProd);
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ prodIsInfinite = false;
+ if ( (expA == 0x7FFF) || (expB == 0x7FFF) ) {
+ if ( softfloat_tryPropagateNaNF128M( aWPtr, bWPtr, zWPtr SOFTFLOAT_STATE_ARG_COMMA ) ) {
+ goto propagateNaN_ZC;
+ }
+ ptr = (uint32_t *) aWPtr;
+ if ( ! (uint32_t) (uiA96<<1) ) goto possibleInvalidProd;
+ if ( ! (uint32_t) (uiB96<<1) ) {
+ ptr = (uint32_t *) bWPtr;
+ possibleInvalidProd:
+ if (
+ ! (ptr[indexWord( 4, 2 )] | ptr[indexWord( 4, 1 )]
+ | ptr[indexWord( 4, 0 )])
+ ) {
+ goto invalid;
+ }
+ }
+ prodIsInfinite = true;
+ }
+ if ( expC == 0x7FFF ) {
+ if (
+ fracF128UI96( uiC96 )
+ || (cWPtr[indexWord( 4, 2 )] | cWPtr[indexWord( 4, 1 )]
+ | cWPtr[indexWord( 4, 0 )])
+ ) {
+ zWPtr[indexWordHi( 4 )] = 0;
+ goto propagateNaN_ZC;
+ }
+ if ( prodIsInfinite && (signProd != signC) ) goto invalid;
+ goto copyC;
+ }
+ if ( prodIsInfinite ) {
+ uiZ96 = packToF128UI96( signProd, 0x7FFF, 0 );
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA ) {
+ sigA[indexWordHi( 4 )] = fracF128UI96( uiA96 ) | 0x00010000;
+ sigA[indexWord( 4, 2 )] = aWPtr[indexWord( 4, 2 )];
+ sigA[indexWord( 4, 1 )] = aWPtr[indexWord( 4, 1 )];
+ sigA[indexWord( 4, 0 )] = aWPtr[indexWord( 4, 0 )];
+ } else {
+ expA = softfloat_shiftNormSigF128M( aWPtr, 0, sigA );
+ if ( expA == -128 ) goto zeroProd;
+ }
+ if ( expB ) {
+ sigX[indexWordHi( 4 )] = fracF128UI96( uiB96 ) | 0x00010000;
+ sigX[indexWord( 4, 2 )] = bWPtr[indexWord( 4, 2 )];
+ sigX[indexWord( 4, 1 )] = bWPtr[indexWord( 4, 1 )];
+ sigX[indexWord( 4, 0 )] = bWPtr[indexWord( 4, 0 )];
+ } else {
+ expB = softfloat_shiftNormSigF128M( bWPtr, 0, sigX );
+ if ( expB == -128 ) goto zeroProd;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expProd = expA + expB - 0x3FF0;
+ softfloat_mul128MTo256M( sigA, sigX, sigProd );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ wordSig = fracF128UI96( uiC96 );
+ if ( expC ) {
+ --expC;
+ wordSig |= 0x00010000;
+ }
+ sigX[indexWordHi( 5 )] = wordSig;
+ sigX[indexWord( 5, 3 )] = cWPtr[indexWord( 4, 2 )];
+ sigX[indexWord( 5, 2 )] = cWPtr[indexWord( 4, 1 )];
+ sigX[indexWord( 5, 1 )] = cWPtr[indexWord( 4, 0 )];
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ doSub = (signProd != signC);
+ addCarryMRoutinePtr =
+ doSub ? softfloat_addComplCarryM : softfloat_addCarryM;
+ expDiff = expProd - expC;
+ if ( expDiff <= 0 ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ signZ = signC;
+ expZ = expC;
+ if (
+ sigProd[indexWord( 8, 2 )]
+ || (sigProd[indexWord( 8, 1 )] | sigProd[indexWord( 8, 0 )])
+ ) {
+ sigProd[indexWord( 8, 3 )] |= 1;
+ }
+ extSigPtr = &sigProd[indexMultiwordHi( 8, 5 )];
+ if ( expDiff ) {
+ softfloat_shiftRightJam160M( extSigPtr, -expDiff, extSigPtr );
+ }
+ carry = 0;
+ if ( doSub ) {
+ wordSig = extSigPtr[indexWordLo( 5 )];
+ extSigPtr[indexWordLo( 5 )] = -wordSig;
+ carry = ! wordSig;
+ }
+ (*addCarryMRoutinePtr)(
+ 4,
+ &sigX[indexMultiwordHi( 5, 4 )],
+ extSigPtr + indexMultiwordHi( 5, 4 ),
+ carry,
+ extSigPtr + indexMultiwordHi( 5, 4 )
+ );
+ wordSig = extSigPtr[indexWordHi( 5 )];
+ if ( ! expZ ) {
+ if ( wordSig & 0x80000000 ) {
+ signZ = ! signZ;
+ softfloat_negX160M( extSigPtr );
+ wordSig = extSigPtr[indexWordHi( 5 )];
+ }
+ goto checkCancellation;
+ }
+ if ( wordSig < 0x00010000 ) {
+ --expZ;
+ softfloat_add160M( extSigPtr, extSigPtr, extSigPtr );
+ goto roundPack;
+ }
+ goto extSigReady_noCancellation;
+ } else {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ signZ = signProd;
+ expZ = expProd;
+ sigX[indexWordLo( 5 )] = 0;
+ expDiff -= 128;
+ if ( 0 <= expDiff ) {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ if ( expDiff ) softfloat_shiftRightJam160M( sigX, expDiff, sigX );
+ wordSig = sigX[indexWordLo( 5 )];
+ carry = 0;
+ if ( doSub ) {
+ carry = ! wordSig;
+ wordSig = -wordSig;
+ }
+ carry =
+ (*addCarryMRoutinePtr)(
+ 4,
+ &sigProd[indexMultiwordLo( 8, 4 )],
+ &sigX[indexMultiwordHi( 5, 4 )],
+ carry,
+ &sigProd[indexMultiwordLo( 8, 4 )]
+ );
+ sigProd[indexWord( 8, 2 )] |= wordSig;
+ ptr = &sigProd[indexWord( 8, 4 )];
+ } else {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ shiftDist = expDiff & 31;
+ if ( shiftDist ) {
+ softfloat_shortShiftRight160M( sigX, shiftDist, sigX );
+ }
+ expDiff >>= 5;
+ extSigPtr =
+ &sigProd[indexMultiwordLo( 8, 5 )] - wordIncr
+ + expDiff * -wordIncr;
+ carry =
+ (*addCarryMRoutinePtr)( 5, extSigPtr, sigX, doSub, extSigPtr );
+ if ( expDiff == -4 ) {
+ /*------------------------------------------------------------
+ *------------------------------------------------------------*/
+ wordSig = sigProd[indexWordHi( 8 )];
+ if ( wordSig & 0x80000000 ) {
+ signZ = ! signZ;
+ softfloat_negX256M( sigProd );
+ wordSig = sigProd[indexWordHi( 8 )];
+ }
+ /*------------------------------------------------------------
+ *------------------------------------------------------------*/
+ if ( wordSig ) goto expProdBigger_noWordShift;
+ wordSig = sigProd[indexWord( 8, 6 )];
+ if ( 0x00040000 <= wordSig ) goto expProdBigger_noWordShift;
+ expZ -= 32;
+ extSigPtr = &sigProd[indexMultiwordHi( 8, 5 )] - wordIncr;
+ for (;;) {
+ if ( wordSig ) break;
+ wordSig = extSigPtr[indexWord( 5, 3 )];
+ if ( 0x00040000 <= wordSig ) break;
+ expZ -= 32;
+ extSigPtr -= wordIncr;
+ if ( extSigPtr == &sigProd[indexMultiwordLo( 8, 5 )] ) {
+ goto checkCancellation;
+ }
+ }
+ /*------------------------------------------------------------
+ *------------------------------------------------------------*/
+ ptr = extSigPtr + indexWordLo( 5 );
+ do {
+ ptr -= wordIncr;
+ if ( *ptr ) {
+ extSigPtr[indexWordLo( 5 )] |= 1;
+ break;
+ }
+ } while ( ptr != &sigProd[indexWordLo( 8 )] );
+ wordSig = extSigPtr[indexWordHi( 5 )];
+ goto extSigReady;
+ }
+ ptr = extSigPtr + indexWordHi( 5 ) + wordIncr;
+ }
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( carry != doSub ) {
+ if ( doSub ) {
+ do {
+ wordSig = *ptr;
+ *ptr = wordSig - 1;
+ ptr += wordIncr;
+ } while ( ! wordSig );
+ } else {
+ do {
+ wordSig = *ptr + 1;
+ *ptr = wordSig;
+ ptr += wordIncr;
+ } while ( ! wordSig );
+ }
+ }
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ expProdBigger_noWordShift:
+ if (
+ sigProd[indexWord( 8, 2 )]
+ || (sigProd[indexWord( 8, 1 )] | sigProd[indexWord( 8, 0 )])
+ ) {
+ sigProd[indexWord( 8, 3 )] |= 1;
+ }
+ extSigPtr = &sigProd[indexMultiwordHi( 8, 5 )];
+ wordSig = extSigPtr[indexWordHi( 5 )];
+ }
+ extSigReady:
+ roundPackRoutinePtr = softfloat_normRoundPackMToF128M;
+ if ( wordSig < 0x00010000 ) goto doRoundPack;
+ extSigReady_noCancellation:
+ if ( 0x00020000 <= wordSig ) {
+ ++expZ;
+ softfloat_shortShiftRightJam160M( extSigPtr, 1, extSigPtr );
+ }
+ roundPack:
+ roundPackRoutinePtr = softfloat_roundPackMToF128M;
+ doRoundPack:
+ (*roundPackRoutinePtr)( signZ, expZ, extSigPtr, zWPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_invalidF128M( zWPtr SOFTFLOAT_STATE_ARG_COMMA );
+ propagateNaN_ZC:
+ softfloat_propagateNaNF128M( zWPtr, cWPtr, zWPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zeroProd:
+ if (
+ ! (uint32_t) (uiC96<<1) && (signProd != signC)
+ && ! cWPtr[indexWord( 4, 2 )]
+ && ! (cWPtr[indexWord( 4, 1 )] | cWPtr[indexWord( 4, 0 )])
+ ) {
+ goto completeCancellation;
+ }
+ copyC:
+ zWPtr[indexWordHi( 4 )] = uiC96;
+ zWPtr[indexWord( 4, 2 )] = cWPtr[indexWord( 4, 2 )];
+ zWPtr[indexWord( 4, 1 )] = cWPtr[indexWord( 4, 1 )];
+ zWPtr[indexWord( 4, 0 )] = cWPtr[indexWord( 4, 0 )];
+ return;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ checkCancellation:
+ if (
+ wordSig
+ || (extSigPtr[indexWord( 5, 3 )] | extSigPtr[indexWord( 5, 2 )])
+ || (extSigPtr[indexWord( 5, 1 )] | extSigPtr[indexWord( 5, 0 )])
+ ) {
+ goto extSigReady;
+ }
+ completeCancellation:
+ uiZ96 =
+ packToF128UI96(
+ (softfloat_roundingMode == softfloat_round_min), 0, 0 );
+ uiZ:
+ zWPtr[indexWordHi( 4 )] = uiZ96;
+ zWPtr[indexWord( 4, 2 )] = 0;
+ zWPtr[indexWord( 4, 1 )] = 0;
+ zWPtr[indexWord( 4, 0 )] = 0;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_mulAddF16.c b/src/libs/softfloat-3e/source/s_mulAddF16.c
new file mode 100644
index 00000000..4b85eb06
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_mulAddF16.c
@@ -0,0 +1,226 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float16_t
+ softfloat_mulAddF16(
+ uint_fast16_t uiA, uint_fast16_t uiB, uint_fast16_t uiC, uint_fast8_t op SOFTFLOAT_STATE_DECL_COMMA )
+{
+ bool signA;
+ int_fast8_t expA;
+ uint_fast16_t sigA;
+ bool signB;
+ int_fast8_t expB;
+ uint_fast16_t sigB;
+ bool signC;
+ int_fast8_t expC;
+ uint_fast16_t sigC;
+ bool signProd;
+ uint_fast16_t magBits, uiZ;
+ struct exp8_sig16 normExpSig;
+ int_fast8_t expProd;
+ uint_fast32_t sigProd;
+ bool signZ;
+ int_fast8_t expZ;
+ uint_fast16_t sigZ;
+ int_fast8_t expDiff;
+ uint_fast32_t sig32Z, sig32C;
+ int_fast8_t shiftDist;
+ union ui16_f16 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ signA = signF16UI( uiA );
+ expA = expF16UI( uiA );
+ sigA = fracF16UI( uiA );
+ signB = signF16UI( uiB );
+ expB = expF16UI( uiB );
+ sigB = fracF16UI( uiB );
+ signC = signF16UI( uiC ) ^ (op == softfloat_mulAdd_subC);
+ expC = expF16UI( uiC );
+ sigC = fracF16UI( uiC );
+ signProd = signA ^ signB ^ (op == softfloat_mulAdd_subProd);
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0x1F ) {
+ if ( sigA || ((expB == 0x1F) && sigB) ) goto propagateNaN_ABC;
+ magBits = expB | sigB;
+ goto infProdArg;
+ }
+ if ( expB == 0x1F ) {
+ if ( sigB ) goto propagateNaN_ABC;
+ magBits = expA | sigA;
+ goto infProdArg;
+ }
+ if ( expC == 0x1F ) {
+ if ( sigC ) {
+ uiZ = 0;
+ goto propagateNaN_ZC;
+ }
+ uiZ = uiC;
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expA ) {
+ if ( ! sigA ) goto zeroProd;
+ normExpSig = softfloat_normSubnormalF16Sig( sigA );
+ expA = normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ if ( ! expB ) {
+ if ( ! sigB ) goto zeroProd;
+ normExpSig = softfloat_normSubnormalF16Sig( sigB );
+ expB = normExpSig.exp;
+ sigB = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expProd = expA + expB - 0xE;
+ sigA = (sigA | 0x0400)<<4;
+ sigB = (sigB | 0x0400)<<4;
+ sigProd = (uint_fast32_t) sigA * sigB;
+ if ( sigProd < 0x20000000 ) {
+ --expProd;
+ sigProd <<= 1;
+ }
+ signZ = signProd;
+ if ( ! expC ) {
+ if ( ! sigC ) {
+ expZ = expProd - 1;
+ sigZ = sigProd>>15 | ((sigProd & 0x7FFF) != 0);
+ goto roundPack;
+ }
+ normExpSig = softfloat_normSubnormalF16Sig( sigC );
+ expC = normExpSig.exp;
+ sigC = normExpSig.sig;
+ }
+ sigC = (sigC | 0x0400)<<3;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expDiff = expProd - expC;
+ if ( signProd == signC ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( expDiff <= 0 ) {
+ expZ = expC;
+ sigZ = sigC + softfloat_shiftRightJam32( sigProd, 16 - expDiff );
+ } else {
+ expZ = expProd;
+ sig32Z =
+ sigProd
+ + softfloat_shiftRightJam32(
+ (uint_fast32_t) sigC<<16, expDiff );
+ sigZ = sig32Z>>16 | ((sig32Z & 0xFFFF) != 0 );
+ }
+ if ( sigZ < 0x4000 ) {
+ --expZ;
+ sigZ <<= 1;
+ }
+ } else {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ sig32C = (uint_fast32_t) sigC<<16;
+ if ( expDiff < 0 ) {
+ signZ = signC;
+ expZ = expC;
+ sig32Z = sig32C - softfloat_shiftRightJam32( sigProd, -expDiff );
+ } else if ( ! expDiff ) {
+ expZ = expProd;
+ sig32Z = sigProd - sig32C;
+ if ( ! sig32Z ) goto completeCancellation;
+ if ( sig32Z & 0x80000000 ) {
+ signZ = ! signZ;
+ sig32Z = -sig32Z;
+ }
+ } else {
+ expZ = expProd;
+ sig32Z = sigProd - softfloat_shiftRightJam32( sig32C, expDiff );
+ }
+ shiftDist = softfloat_countLeadingZeros32( sig32Z ) - 1;
+ expZ -= shiftDist;
+ shiftDist -= 16;
+ if ( shiftDist < 0 ) {
+ sigZ =
+ sig32Z>>(-shiftDist)
+ | ((uint32_t) (sig32Z<<(shiftDist & 31)) != 0);
+ } else {
+ sigZ = (uint_fast16_t) sig32Z<<shiftDist;
+ }
+ }
+ roundPack:
+ return softfloat_roundPackToF16( signZ, expZ, sigZ SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN_ABC:
+ uiZ = softfloat_propagateNaNF16UI( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ goto propagateNaN_ZC;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ infProdArg:
+ if ( magBits ) {
+ uiZ = packToF16UI( signProd, 0x1F, 0 );
+ if ( expC != 0x1F ) goto uiZ;
+ if ( sigC ) goto propagateNaN_ZC;
+ if ( signProd == signC ) goto uiZ;
+ }
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = defaultNaNF16UI;
+ propagateNaN_ZC:
+ uiZ = softfloat_propagateNaNF16UI( uiZ, uiC SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zeroProd:
+ uiZ = uiC;
+ if ( ! (expC | sigC) && (signProd != signC) ) {
+ completeCancellation:
+ uiZ =
+ packToF16UI(
+ (softfloat_roundingMode == softfloat_round_min), 0, 0 );
+ }
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_mulAddF32.c b/src/libs/softfloat-3e/source/s_mulAddF32.c
new file mode 100644
index 00000000..19a75131
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_mulAddF32.c
@@ -0,0 +1,224 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float32_t
+ softfloat_mulAddF32(
+ uint_fast32_t uiA, uint_fast32_t uiB, uint_fast32_t uiC, uint_fast8_t op SOFTFLOAT_STATE_DECL_COMMA )
+{
+ bool signA;
+ int_fast16_t expA;
+ uint_fast32_t sigA;
+ bool signB;
+ int_fast16_t expB;
+ uint_fast32_t sigB;
+ bool signC;
+ int_fast16_t expC;
+ uint_fast32_t sigC;
+ bool signProd;
+ uint_fast32_t magBits, uiZ;
+ struct exp16_sig32 normExpSig;
+ int_fast16_t expProd;
+ uint_fast64_t sigProd;
+ bool signZ;
+ int_fast16_t expZ;
+ uint_fast32_t sigZ;
+ int_fast16_t expDiff;
+ uint_fast64_t sig64Z, sig64C;
+ int_fast8_t shiftDist;
+ union ui32_f32 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ signA = signF32UI( uiA );
+ expA = expF32UI( uiA );
+ sigA = fracF32UI( uiA );
+ signB = signF32UI( uiB );
+ expB = expF32UI( uiB );
+ sigB = fracF32UI( uiB );
+ signC = signF32UI( uiC ) ^ (op == softfloat_mulAdd_subC);
+ expC = expF32UI( uiC );
+ sigC = fracF32UI( uiC );
+ signProd = signA ^ signB ^ (op == softfloat_mulAdd_subProd);
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0xFF ) {
+ if ( sigA || ((expB == 0xFF) && sigB) ) goto propagateNaN_ABC;
+ magBits = expB | sigB;
+ goto infProdArg;
+ }
+ if ( expB == 0xFF ) {
+ if ( sigB ) goto propagateNaN_ABC;
+ magBits = expA | sigA;
+ goto infProdArg;
+ }
+ if ( expC == 0xFF ) {
+ if ( sigC ) {
+ uiZ = 0;
+ goto propagateNaN_ZC;
+ }
+ uiZ = uiC;
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expA ) {
+ if ( ! sigA ) goto zeroProd;
+ normExpSig = softfloat_normSubnormalF32Sig( sigA );
+ expA = normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ if ( ! expB ) {
+ if ( ! sigB ) goto zeroProd;
+ normExpSig = softfloat_normSubnormalF32Sig( sigB );
+ expB = normExpSig.exp;
+ sigB = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expProd = expA + expB - 0x7E;
+ sigA = (sigA | 0x00800000)<<7;
+ sigB = (sigB | 0x00800000)<<7;
+ sigProd = (uint_fast64_t) sigA * sigB;
+ if ( sigProd < UINT64_C( 0x2000000000000000 ) ) {
+ --expProd;
+ sigProd <<= 1;
+ }
+ signZ = signProd;
+ if ( ! expC ) {
+ if ( ! sigC ) {
+ expZ = expProd - 1;
+ sigZ = softfloat_shortShiftRightJam64( sigProd, 31 );
+ goto roundPack;
+ }
+ normExpSig = softfloat_normSubnormalF32Sig( sigC );
+ expC = normExpSig.exp;
+ sigC = normExpSig.sig;
+ }
+ sigC = (sigC | 0x00800000)<<6;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expDiff = expProd - expC;
+ if ( signProd == signC ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( expDiff <= 0 ) {
+ expZ = expC;
+ sigZ = sigC + softfloat_shiftRightJam64( sigProd, 32 - expDiff );
+ } else {
+ expZ = expProd;
+ sig64Z =
+ sigProd
+ + softfloat_shiftRightJam64(
+ (uint_fast64_t) sigC<<32, expDiff );
+ sigZ = softfloat_shortShiftRightJam64( sig64Z, 32 );
+ }
+ if ( sigZ < 0x40000000 ) {
+ --expZ;
+ sigZ <<= 1;
+ }
+ } else {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ sig64C = (uint_fast64_t) sigC<<32;
+ if ( expDiff < 0 ) {
+ signZ = signC;
+ expZ = expC;
+ sig64Z = sig64C - softfloat_shiftRightJam64( sigProd, -expDiff );
+ } else if ( ! expDiff ) {
+ expZ = expProd;
+ sig64Z = sigProd - sig64C;
+ if ( ! sig64Z ) goto completeCancellation;
+ if ( sig64Z & UINT64_C( 0x8000000000000000 ) ) {
+ signZ = ! signZ;
+ sig64Z = -sig64Z;
+ }
+ } else {
+ expZ = expProd;
+ sig64Z = sigProd - softfloat_shiftRightJam64( sig64C, expDiff );
+ }
+ shiftDist = softfloat_countLeadingZeros64( sig64Z ) - 1;
+ expZ -= shiftDist;
+ shiftDist -= 32;
+ if ( shiftDist < 0 ) {
+ sigZ = softfloat_shortShiftRightJam64( sig64Z, -shiftDist );
+ } else {
+ sigZ = (uint_fast32_t) sig64Z<<shiftDist;
+ }
+ }
+ roundPack:
+ return softfloat_roundPackToF32( signZ, expZ, sigZ SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN_ABC:
+ uiZ = softfloat_propagateNaNF32UI( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ goto propagateNaN_ZC;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ infProdArg:
+ if ( magBits ) {
+ uiZ = packToF32UI( signProd, 0xFF, 0 );
+ if ( expC != 0xFF ) goto uiZ;
+ if ( sigC ) goto propagateNaN_ZC;
+ if ( signProd == signC ) goto uiZ;
+ }
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = defaultNaNF32UI;
+ propagateNaN_ZC:
+ uiZ = softfloat_propagateNaNF32UI( uiZ, uiC SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zeroProd:
+ uiZ = uiC;
+ if ( ! (expC | sigC) && (signProd != signC) ) {
+ completeCancellation:
+ uiZ =
+ packToF32UI(
+ (softfloat_roundingMode == softfloat_round_min), 0, 0 );
+ }
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_mulAddF64.c b/src/libs/softfloat-3e/source/s_mulAddF64.c
new file mode 100644
index 00000000..ae7d6456
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_mulAddF64.c
@@ -0,0 +1,496 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+float64_t
+ softfloat_mulAddF64(
+ uint_fast64_t uiA, uint_fast64_t uiB, uint_fast64_t uiC, uint_fast8_t op SOFTFLOAT_STATE_DECL_COMMA )
+{
+ bool signA;
+ int_fast16_t expA;
+ uint_fast64_t sigA;
+ bool signB;
+ int_fast16_t expB;
+ uint_fast64_t sigB;
+ bool signC;
+ int_fast16_t expC;
+ uint_fast64_t sigC;
+ bool signZ;
+ uint_fast64_t magBits, uiZ;
+ struct exp16_sig64 normExpSig;
+ int_fast16_t expZ;
+ struct uint128 sig128Z;
+ uint_fast64_t sigZ;
+ int_fast16_t expDiff;
+ struct uint128 sig128C = { 0, 0 }; /* vbox: shut up MSC warning*/
+ int_fast8_t shiftDist;
+ union ui64_f64 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ signA = signF64UI( uiA );
+ expA = expF64UI( uiA );
+ sigA = fracF64UI( uiA );
+ signB = signF64UI( uiB );
+ expB = expF64UI( uiB );
+ sigB = fracF64UI( uiB );
+ signC = signF64UI( uiC ) ^ (op == softfloat_mulAdd_subC);
+ expC = expF64UI( uiC );
+ sigC = fracF64UI( uiC );
+ signZ = signA ^ signB ^ (op == softfloat_mulAdd_subProd);
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0x7FF ) {
+ if ( sigA || ((expB == 0x7FF) && sigB) ) goto propagateNaN_ABC;
+ magBits = expB | sigB;
+ goto infProdArg;
+ }
+ if ( expB == 0x7FF ) {
+ if ( sigB ) goto propagateNaN_ABC;
+ magBits = expA | sigA;
+ goto infProdArg;
+ }
+ if ( expC == 0x7FF ) {
+ if ( sigC ) {
+ uiZ = 0;
+ goto propagateNaN_ZC;
+ }
+ uiZ = uiC;
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expA ) {
+ if ( ! sigA ) goto zeroProd;
+ normExpSig = softfloat_normSubnormalF64Sig( sigA );
+ expA = normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ if ( ! expB ) {
+ if ( ! sigB ) goto zeroProd;
+ normExpSig = softfloat_normSubnormalF64Sig( sigB );
+ expB = normExpSig.exp;
+ sigB = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expZ = expA + expB - 0x3FE;
+ sigA = (sigA | UINT64_C( 0x0010000000000000 ))<<10;
+ sigB = (sigB | UINT64_C( 0x0010000000000000 ))<<10;
+ sig128Z = softfloat_mul64To128( sigA, sigB );
+ if ( sig128Z.v64 < UINT64_C( 0x2000000000000000 ) ) {
+ --expZ;
+ sig128Z =
+ softfloat_add128(
+ sig128Z.v64, sig128Z.v0, sig128Z.v64, sig128Z.v0 );
+ }
+ if ( ! expC ) {
+ if ( ! sigC ) {
+ --expZ;
+ sigZ = sig128Z.v64<<1 | (sig128Z.v0 != 0);
+ goto roundPack;
+ }
+ normExpSig = softfloat_normSubnormalF64Sig( sigC );
+ expC = normExpSig.exp;
+ sigC = normExpSig.sig;
+ }
+ sigC = (sigC | UINT64_C( 0x0010000000000000 ))<<9;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expDiff = expZ - expC;
+ if ( expDiff < 0 ) {
+ expZ = expC;
+ if ( (signZ == signC) || (expDiff < -1) ) {
+ sig128Z.v64 = softfloat_shiftRightJam64( sig128Z.v64, -expDiff );
+ } else {
+ sig128Z =
+ softfloat_shortShiftRightJam128( sig128Z.v64, sig128Z.v0, 1 );
+ }
+ } else if ( expDiff ) {
+ sig128C = softfloat_shiftRightJam128( sigC, 0, expDiff );
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( signZ == signC ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( expDiff <= 0 ) {
+ sigZ = (sigC + sig128Z.v64) | (sig128Z.v0 != 0);
+ } else {
+ sig128Z =
+ softfloat_add128(
+ sig128Z.v64, sig128Z.v0, sig128C.v64, sig128C.v0 );
+ sigZ = sig128Z.v64 | (sig128Z.v0 != 0);
+ }
+ if ( sigZ < UINT64_C( 0x4000000000000000 ) ) {
+ --expZ;
+ sigZ <<= 1;
+ }
+ } else {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( expDiff < 0 ) {
+ signZ = signC;
+ sig128Z = softfloat_sub128( sigC, 0, sig128Z.v64, sig128Z.v0 );
+ } else if ( ! expDiff ) {
+ sig128Z.v64 = sig128Z.v64 - sigC;
+ if ( ! (sig128Z.v64 | sig128Z.v0) ) goto completeCancellation;
+ if ( sig128Z.v64 & UINT64_C( 0x8000000000000000 ) ) {
+ signZ = ! signZ;
+ sig128Z = softfloat_sub128( 0, 0, sig128Z.v64, sig128Z.v0 );
+ }
+ } else {
+ sig128Z =
+ softfloat_sub128(
+ sig128Z.v64, sig128Z.v0, sig128C.v64, sig128C.v0 );
+ }
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( ! sig128Z.v64 ) {
+ expZ -= 64;
+ sig128Z.v64 = sig128Z.v0;
+ sig128Z.v0 = 0;
+ }
+ shiftDist = softfloat_countLeadingZeros64( sig128Z.v64 ) - 1;
+ expZ -= shiftDist;
+ if ( shiftDist < 0 ) {
+ sigZ = softfloat_shortShiftRightJam64( sig128Z.v64, -shiftDist );
+ } else {
+ sig128Z =
+ softfloat_shortShiftLeft128(
+ sig128Z.v64, sig128Z.v0, shiftDist );
+ sigZ = sig128Z.v64;
+ }
+ sigZ |= (sig128Z.v0 != 0);
+ }
+ roundPack:
+ return softfloat_roundPackToF64( signZ, expZ, sigZ SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN_ABC:
+ uiZ = softfloat_propagateNaNF64UI( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ goto propagateNaN_ZC;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ infProdArg:
+ if ( magBits ) {
+ uiZ = packToF64UI( signZ, 0x7FF, 0 );
+ if ( expC != 0x7FF ) goto uiZ;
+ if ( sigC ) goto propagateNaN_ZC;
+ if ( signZ == signC ) goto uiZ;
+ }
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = defaultNaNF64UI;
+ propagateNaN_ZC:
+ uiZ = softfloat_propagateNaNF64UI( uiZ, uiC SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zeroProd:
+ uiZ = uiC;
+ if ( ! (expC | sigC) && (signZ != signC) ) {
+ completeCancellation:
+ uiZ =
+ packToF64UI(
+ (softfloat_roundingMode == softfloat_round_min), 0, 0 );
+ }
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
+#else
+
+float64_t
+ softfloat_mulAddF64(
+ uint_fast64_t uiA, uint_fast64_t uiB, uint_fast64_t uiC, uint_fast8_t op SOFTFLOAT_STATE_DECL_COMMA )
+{
+ bool signA;
+ int_fast16_t expA;
+ uint64_t sigA;
+ bool signB;
+ int_fast16_t expB;
+ uint64_t sigB;
+ bool signC;
+ int_fast16_t expC;
+ uint64_t sigC;
+ bool signZ;
+ uint64_t magBits, uiZ;
+ struct exp16_sig64 normExpSig;
+ int_fast16_t expZ;
+ uint32_t sig128Z[4];
+ uint64_t sigZ;
+ int_fast16_t shiftDist, expDiff;
+ uint32_t sig128C[4];
+ union ui64_f64 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ signA = signF64UI( uiA );
+ expA = expF64UI( uiA );
+ sigA = fracF64UI( uiA );
+ signB = signF64UI( uiB );
+ expB = expF64UI( uiB );
+ sigB = fracF64UI( uiB );
+ signC = signF64UI( uiC ) ^ (op == softfloat_mulAdd_subC);
+ expC = expF64UI( uiC );
+ sigC = fracF64UI( uiC );
+ signZ = signA ^ signB ^ (op == softfloat_mulAdd_subProd);
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( expA == 0x7FF ) {
+ if ( sigA || ((expB == 0x7FF) && sigB) ) goto propagateNaN_ABC;
+ magBits = expB | sigB;
+ goto infProdArg;
+ }
+ if ( expB == 0x7FF ) {
+ if ( sigB ) goto propagateNaN_ABC;
+ magBits = expA | sigA;
+ goto infProdArg;
+ }
+ if ( expC == 0x7FF ) {
+ if ( sigC ) {
+ uiZ = 0;
+ goto propagateNaN_ZC;
+ }
+ uiZ = uiC;
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( ! expA ) {
+ if ( ! sigA ) goto zeroProd;
+ normExpSig = softfloat_normSubnormalF64Sig( sigA );
+ expA = normExpSig.exp;
+ sigA = normExpSig.sig;
+ }
+ if ( ! expB ) {
+ if ( ! sigB ) goto zeroProd;
+ normExpSig = softfloat_normSubnormalF64Sig( sigB );
+ expB = normExpSig.exp;
+ sigB = normExpSig.sig;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expZ = expA + expB - 0x3FE;
+ sigA = (sigA | UINT64_C( 0x0010000000000000 ))<<10;
+ sigB = (sigB | UINT64_C( 0x0010000000000000 ))<<11;
+ softfloat_mul64To128M( sigA, sigB, sig128Z );
+ sigZ =
+ (uint64_t) sig128Z[indexWord( 4, 3 )]<<32 | sig128Z[indexWord( 4, 2 )];
+ shiftDist = 0;
+ if ( ! (sigZ & UINT64_C( 0x4000000000000000 )) ) {
+ --expZ;
+ shiftDist = -1;
+ }
+ if ( ! expC ) {
+ if ( ! sigC ) {
+ if ( shiftDist ) sigZ <<= 1;
+ goto sigZ;
+ }
+ normExpSig = softfloat_normSubnormalF64Sig( sigC );
+ expC = normExpSig.exp;
+ sigC = normExpSig.sig;
+ }
+ sigC = (sigC | UINT64_C( 0x0010000000000000 ))<<10;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expDiff = expZ - expC;
+ if ( expDiff < 0 ) {
+ expZ = expC;
+ if ( (signZ == signC) || (expDiff < -1) ) {
+ shiftDist -= expDiff;
+ if ( shiftDist) {
+ sigZ = softfloat_shiftRightJam64( sigZ, shiftDist );
+ }
+ } else {
+ if ( ! shiftDist ) {
+ softfloat_shortShiftRight128M( sig128Z, 1, sig128Z );
+ }
+ }
+ } else {
+ if ( shiftDist ) softfloat_add128M( sig128Z, sig128Z, sig128Z );
+ if ( ! expDiff ) {
+ sigZ =
+ (uint64_t) sig128Z[indexWord( 4, 3 )]<<32
+ | sig128Z[indexWord( 4, 2 )];
+ } else {
+ sig128C[indexWord( 4, 3 )] = sigC>>32;
+ sig128C[indexWord( 4, 2 )] = sigC;
+ sig128C[indexWord( 4, 1 )] = 0;
+ sig128C[indexWord( 4, 0 )] = 0;
+ softfloat_shiftRightJam128M( sig128C, expDiff, sig128C );
+ }
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( signZ == signC ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( expDiff <= 0 ) {
+ sigZ += sigC;
+ } else {
+ softfloat_add128M( sig128Z, sig128C, sig128Z );
+ sigZ =
+ (uint64_t) sig128Z[indexWord( 4, 3 )]<<32
+ | sig128Z[indexWord( 4, 2 )];
+ }
+ if ( sigZ & UINT64_C( 0x8000000000000000 ) ) {
+ ++expZ;
+ sigZ = softfloat_shortShiftRightJam64( sigZ, 1 );
+ }
+ } else {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( expDiff < 0 ) {
+ signZ = signC;
+ if ( expDiff < -1 ) {
+ sigZ = sigC - sigZ;
+ if (
+ sig128Z[indexWord( 4, 1 )] || sig128Z[indexWord( 4, 0 )]
+ ) {
+ sigZ = (sigZ - 1) | 1;
+ }
+ if ( ! (sigZ & UINT64_C( 0x4000000000000000 )) ) {
+ --expZ;
+ sigZ <<= 1;
+ }
+ goto roundPack;
+ } else {
+ sig128C[indexWord( 4, 3 )] = sigC>>32;
+ sig128C[indexWord( 4, 2 )] = sigC;
+ sig128C[indexWord( 4, 1 )] = 0;
+ sig128C[indexWord( 4, 0 )] = 0;
+ softfloat_sub128M( sig128C, sig128Z, sig128Z );
+ }
+ } else if ( ! expDiff ) {
+ sigZ -= sigC;
+ if (
+ ! sigZ && ! sig128Z[indexWord( 4, 1 )]
+ && ! sig128Z[indexWord( 4, 0 )]
+ ) {
+ goto completeCancellation;
+ }
+ sig128Z[indexWord( 4, 3 )] = sigZ>>32;
+ sig128Z[indexWord( 4, 2 )] = sigZ;
+ if ( sigZ & UINT64_C( 0x8000000000000000 ) ) {
+ signZ = ! signZ;
+ softfloat_negX128M( sig128Z );
+ }
+ } else {
+ softfloat_sub128M( sig128Z, sig128C, sig128Z );
+ if ( 1 < expDiff ) {
+ sigZ =
+ (uint64_t) sig128Z[indexWord( 4, 3 )]<<32
+ | sig128Z[indexWord( 4, 2 )];
+ if ( ! (sigZ & UINT64_C( 0x4000000000000000 )) ) {
+ --expZ;
+ sigZ <<= 1;
+ }
+ goto sigZ;
+ }
+ }
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ shiftDist = 0;
+ sigZ =
+ (uint64_t) sig128Z[indexWord( 4, 3 )]<<32
+ | sig128Z[indexWord( 4, 2 )];
+ if ( ! sigZ ) {
+ shiftDist = 64;
+ sigZ =
+ (uint64_t) sig128Z[indexWord( 4, 1 )]<<32
+ | sig128Z[indexWord( 4, 0 )];
+ }
+ shiftDist += softfloat_countLeadingZeros64( sigZ ) - 1;
+ if ( shiftDist ) {
+ expZ -= shiftDist;
+ softfloat_shiftLeft128M( sig128Z, shiftDist, sig128Z );
+ sigZ =
+ (uint64_t) sig128Z[indexWord( 4, 3 )]<<32
+ | sig128Z[indexWord( 4, 2 )];
+ }
+ }
+ sigZ:
+ if ( sig128Z[indexWord( 4, 1 )] || sig128Z[indexWord( 4, 0 )] ) sigZ |= 1;
+ roundPack:
+ return softfloat_roundPackToF64( signZ, expZ - 1, sigZ SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN_ABC:
+ uiZ = softfloat_propagateNaNF64UI( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ goto propagateNaN_ZC;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ infProdArg:
+ if ( magBits ) {
+ uiZ = packToF64UI( signZ, 0x7FF, 0 );
+ if ( expC != 0x7FF ) goto uiZ;
+ if ( sigC ) goto propagateNaN_ZC;
+ if ( signZ == signC ) goto uiZ;
+ }
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = defaultNaNF64UI;
+ propagateNaN_ZC:
+ uiZ = softfloat_propagateNaNF64UI( uiZ, uiC SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ zeroProd:
+ uiZ = uiC;
+ if ( ! (expC | sigC) && (signZ != signC) ) {
+ completeCancellation:
+ uiZ =
+ packToF64UI(
+ (softfloat_roundingMode == softfloat_round_min), 0, 0 );
+ }
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_negXM.c b/src/libs/softfloat-3e/source/s_negXM.c
new file mode 100644
index 00000000..bb1c5a1f
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_negXM.c
@@ -0,0 +1,63 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_negXM
+
+void softfloat_negXM( uint_fast8_t size_words, uint32_t *zPtr )
+{
+ unsigned int index, lastIndex;
+ uint_fast8_t carry;
+ uint32_t word;
+
+ index = indexWordLo( size_words );
+ lastIndex = indexWordHi( size_words );
+ carry = 1;
+ for (;;) {
+ word = ~zPtr[index] + carry;
+ zPtr[index] = word;
+ if ( index == lastIndex ) break;
+ index += wordIncr;
+ if ( word ) carry = 0;
+ }
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_normExtF80SigM.c b/src/libs/softfloat-3e/source/s_normExtF80SigM.c
new file mode 100644
index 00000000..fabe91ca
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_normExtF80SigM.c
@@ -0,0 +1,52 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+
+int softfloat_normExtF80SigM( uint64_t *sigPtr )
+{
+ uint64_t sig;
+ int_fast8_t shiftDist;
+
+ sig = *sigPtr;
+ shiftDist = softfloat_countLeadingZeros64( sig );
+ *sigPtr = sig<<shiftDist;
+ return -shiftDist;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_normRoundPackMToExtF80M.c b/src/libs/softfloat-3e/source/s_normRoundPackMToExtF80M.c
new file mode 100644
index 00000000..ab6a6823
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_normRoundPackMToExtF80M.c
@@ -0,0 +1,79 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+
+void
+ softfloat_normRoundPackMToExtF80M(
+ bool sign,
+ int32_t exp,
+ uint32_t *extSigPtr,
+ uint_fast8_t roundingPrecision,
+ struct extFloat80M *zSPtr
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ int_fast16_t shiftDist;
+ uint32_t wordSig;
+
+ shiftDist = 0;
+ wordSig = extSigPtr[indexWord( 3, 2 )];
+ if ( ! wordSig ) {
+ shiftDist = 32;
+ wordSig = extSigPtr[indexWord( 3, 1 )];
+ if ( ! wordSig ) {
+ shiftDist = 64;
+ wordSig = extSigPtr[indexWord( 3, 0 )];
+ if ( ! wordSig ) {
+ zSPtr->signExp = packToExtF80UI64( sign, 0 );
+ zSPtr->signif = 0;
+ return;
+ }
+ }
+ }
+ shiftDist += softfloat_countLeadingZeros32( wordSig );
+ if ( shiftDist ) {
+ exp -= shiftDist;
+ softfloat_shiftLeft96M( extSigPtr, shiftDist, extSigPtr );
+ }
+ softfloat_roundPackMToExtF80M(
+ sign, exp, extSigPtr, roundingPrecision, zSPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_normRoundPackMToF128M.c b/src/libs/softfloat-3e/source/s_normRoundPackMToF128M.c
new file mode 100644
index 00000000..db3b4c0a
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_normRoundPackMToF128M.c
@@ -0,0 +1,73 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+
+void
+ softfloat_normRoundPackMToF128M(
+ bool sign, int32_t exp, uint32_t *extSigPtr, uint32_t *zWPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ const uint32_t *ptr;
+ int_fast16_t shiftDist;
+ uint32_t wordSig;
+
+ ptr = extSigPtr + indexWordHi( 5 );
+ shiftDist = 0;
+ for (;;) {
+ wordSig = *ptr;
+ if ( wordSig ) break;
+ shiftDist += 32;
+ if ( 160 <= shiftDist ) {
+ zWPtr[indexWordHi( 4 )] = packToF128UI96( sign, 0, 0 );
+ zWPtr[indexWord( 4, 2 )] = 0;
+ zWPtr[indexWord( 4, 1 )] = 0;
+ zWPtr[indexWord( 4, 0 )] = 0;
+ return;
+ }
+ ptr -= wordIncr;
+ }
+ shiftDist += softfloat_countLeadingZeros32( wordSig ) - 15;
+ if ( shiftDist ) {
+ exp -= shiftDist;
+ softfloat_shiftLeft160M( extSigPtr, shiftDist, extSigPtr );
+ }
+ softfloat_roundPackMToF128M( sign, exp, extSigPtr, zWPtr SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_normRoundPackToExtF80.c b/src/libs/softfloat-3e/source/s_normRoundPackToExtF80.c
new file mode 100644
index 00000000..6d98e525
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_normRoundPackToExtF80.c
@@ -0,0 +1,72 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+
+extFloat80_t
+ softfloat_normRoundPackToExtF80(
+ bool sign,
+ int_fast32_t exp,
+ uint_fast64_t sig,
+ uint_fast64_t sigExtra,
+ uint_fast8_t roundingPrecision
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ int_fast8_t shiftDist;
+ struct uint128 sig128;
+
+ if ( ! sig ) {
+ exp -= 64;
+ sig = sigExtra;
+ sigExtra = 0;
+ }
+ shiftDist = softfloat_countLeadingZeros64( sig );
+ exp -= shiftDist;
+ if ( shiftDist ) {
+ sig128 = softfloat_shortShiftLeft128( sig, sigExtra, shiftDist );
+ sig = sig128.v64;
+ sigExtra = sig128.v0;
+ }
+ return
+ softfloat_roundPackToExtF80(
+ sign, exp, sig, sigExtra, roundingPrecision SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_normRoundPackToF128.c b/src/libs/softfloat-3e/source/s_normRoundPackToF128.c
new file mode 100644
index 00000000..6aa094b5
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_normRoundPackToF128.c
@@ -0,0 +1,81 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+
+float128_t
+ softfloat_normRoundPackToF128(
+ bool sign, int_fast32_t exp, uint_fast64_t sig64, uint_fast64_t sig0 SOFTFLOAT_STATE_DECL_COMMA )
+{
+ int_fast8_t shiftDist;
+ struct uint128 sig128;
+ union ui128_f128 uZ;
+ uint_fast64_t sigExtra;
+ struct uint128_extra sig128Extra;
+
+ if ( ! sig64 ) {
+ exp -= 64;
+ sig64 = sig0;
+ sig0 = 0;
+ }
+ shiftDist = softfloat_countLeadingZeros64( sig64 ) - 15;
+ exp -= shiftDist;
+ if ( 0 <= shiftDist ) {
+ if ( shiftDist ) {
+ sig128 = softfloat_shortShiftLeft128( sig64, sig0, shiftDist );
+ sig64 = sig128.v64;
+ sig0 = sig128.v0;
+ }
+ if ( (uint32_t) exp < 0x7FFD ) {
+ uZ.ui.v64 = packToF128UI64( sign, sig64 | sig0 ? exp : 0, sig64 );
+ uZ.ui.v0 = sig0;
+ return uZ.f;
+ }
+ sigExtra = 0;
+ } else {
+ sig128Extra =
+ softfloat_shortShiftRightJam128Extra( sig64, sig0, 0, -shiftDist );
+ sig64 = sig128Extra.v.v64;
+ sig0 = sig128Extra.v.v0;
+ sigExtra = sig128Extra.extra;
+ }
+ return softfloat_roundPackToF128( sign, exp, sig64, sig0, sigExtra SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_normRoundPackToF16.c b/src/libs/softfloat-3e/source/s_normRoundPackToF16.c
new file mode 100644
index 00000000..1a9d72cb
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_normRoundPackToF16.c
@@ -0,0 +1,58 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+
+float16_t
+ softfloat_normRoundPackToF16( bool sign, int_fast16_t exp, uint_fast16_t sig SOFTFLOAT_STATE_DECL_COMMA )
+{
+ int_fast8_t shiftDist;
+ union ui16_f16 uZ;
+
+ shiftDist = softfloat_countLeadingZeros16( sig ) - 1;
+ exp -= shiftDist;
+ if ( (4 <= shiftDist) && ((unsigned int) exp < 0x1D) ) {
+ uZ.ui = packToF16UI( sign, sig ? exp : 0, sig<<(shiftDist - 4) );
+ return uZ.f;
+ } else {
+ return softfloat_roundPackToF16( sign, exp, sig<<shiftDist SOFTFLOAT_STATE_ARG_COMMA );
+ }
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_normRoundPackToF32.c b/src/libs/softfloat-3e/source/s_normRoundPackToF32.c
new file mode 100644
index 00000000..d0247128
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_normRoundPackToF32.c
@@ -0,0 +1,58 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+
+float32_t
+ softfloat_normRoundPackToF32( bool sign, int_fast16_t exp, uint_fast32_t sig SOFTFLOAT_STATE_DECL_COMMA )
+{
+ int_fast8_t shiftDist;
+ union ui32_f32 uZ;
+
+ shiftDist = softfloat_countLeadingZeros32( sig ) - 1;
+ exp -= shiftDist;
+ if ( (7 <= shiftDist) && ((unsigned int) exp < 0xFD) ) {
+ uZ.ui = packToF32UI( sign, sig ? exp : 0, sig<<(shiftDist - 7) );
+ return uZ.f;
+ } else {
+ return softfloat_roundPackToF32( sign, exp, sig<<shiftDist SOFTFLOAT_STATE_ARG_COMMA );
+ }
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_normRoundPackToF64.c b/src/libs/softfloat-3e/source/s_normRoundPackToF64.c
new file mode 100644
index 00000000..0c68fe67
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_normRoundPackToF64.c
@@ -0,0 +1,58 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+
+float64_t
+ softfloat_normRoundPackToF64( bool sign, int_fast16_t exp, uint_fast64_t sig SOFTFLOAT_STATE_DECL_COMMA )
+{
+ int_fast8_t shiftDist;
+ union ui64_f64 uZ;
+
+ shiftDist = softfloat_countLeadingZeros64( sig ) - 1;
+ exp -= shiftDist;
+ if ( (10 <= shiftDist) && ((unsigned int) exp < 0x7FD) ) {
+ uZ.ui = packToF64UI( sign, sig ? exp : 0, sig<<(shiftDist - 10) );
+ return uZ.f;
+ } else {
+ return softfloat_roundPackToF64( sign, exp, sig<<shiftDist SOFTFLOAT_STATE_ARG_COMMA );
+ }
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_normSubnormalExtF80Sig.c b/src/libs/softfloat-3e/source/s_normSubnormalExtF80Sig.c
new file mode 100644
index 00000000..e6f2e4b6
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_normSubnormalExtF80Sig.c
@@ -0,0 +1,52 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+
+struct exp32_sig64 softfloat_normSubnormalExtF80Sig( uint_fast64_t sig )
+{
+ int_fast8_t shiftDist;
+ struct exp32_sig64 z;
+
+ shiftDist = softfloat_countLeadingZeros64( sig );
+ z.exp = -shiftDist;
+ z.sig = sig<<shiftDist;
+ return z;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_normSubnormalF128Sig.c b/src/libs/softfloat-3e/source/s_normSubnormalF128Sig.c
new file mode 100644
index 00000000..a67763f6
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_normSubnormalF128Sig.c
@@ -0,0 +1,65 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+
+struct exp32_sig128
+ softfloat_normSubnormalF128Sig( uint_fast64_t sig64, uint_fast64_t sig0 )
+{
+ int_fast8_t shiftDist;
+ struct exp32_sig128 z;
+
+ if ( ! sig64 ) {
+ shiftDist = softfloat_countLeadingZeros64( sig0 ) - 15;
+ z.exp = -63 - shiftDist;
+ if ( shiftDist < 0 ) {
+ z.sig.v64 = sig0>>-shiftDist;
+ z.sig.v0 = sig0<<(shiftDist & 63);
+ } else {
+ z.sig.v64 = sig0<<shiftDist;
+ z.sig.v0 = 0;
+ }
+ } else {
+ shiftDist = softfloat_countLeadingZeros64( sig64 ) - 15;
+ z.exp = 1 - shiftDist;
+ z.sig = softfloat_shortShiftLeft128( sig64, sig0, shiftDist );
+ }
+ return z;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_normSubnormalF128SigM.c b/src/libs/softfloat-3e/source/s_normSubnormalF128SigM.c
new file mode 100644
index 00000000..f2745dec
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_normSubnormalF128SigM.c
@@ -0,0 +1,61 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+
+int softfloat_normSubnormalF128SigM( uint32_t *sigPtr )
+{
+ const uint32_t *ptr;
+ int_fast16_t shiftDist;
+ uint32_t wordSig;
+
+ ptr = sigPtr + indexWordHi( 4 );
+ shiftDist = 0;
+ for (;;) {
+ wordSig = *ptr;
+ if ( wordSig ) break;
+ shiftDist += 32;
+ if ( 128 <= shiftDist ) return 1;
+ ptr -= wordIncr;
+ }
+ shiftDist += softfloat_countLeadingZeros32( wordSig ) - 15;
+ if ( shiftDist ) softfloat_shiftLeft128M( sigPtr, shiftDist, sigPtr );
+ return 1 - shiftDist;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_normSubnormalF16Sig.c b/src/libs/softfloat-3e/source/s_normSubnormalF16Sig.c
new file mode 100644
index 00000000..94541c91
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_normSubnormalF16Sig.c
@@ -0,0 +1,52 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+
+struct exp8_sig16 softfloat_normSubnormalF16Sig( uint_fast16_t sig )
+{
+ int_fast8_t shiftDist;
+ struct exp8_sig16 z;
+
+ shiftDist = softfloat_countLeadingZeros16( sig ) - 5;
+ z.exp = 1 - shiftDist;
+ z.sig = sig<<shiftDist;
+ return z;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_normSubnormalF32Sig.c b/src/libs/softfloat-3e/source/s_normSubnormalF32Sig.c
new file mode 100644
index 00000000..b48e10d7
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_normSubnormalF32Sig.c
@@ -0,0 +1,52 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+
+struct exp16_sig32 softfloat_normSubnormalF32Sig( uint_fast32_t sig )
+{
+ int_fast8_t shiftDist;
+ struct exp16_sig32 z;
+
+ shiftDist = softfloat_countLeadingZeros32( sig ) - 8;
+ z.exp = 1 - shiftDist;
+ z.sig = sig<<shiftDist;
+ return z;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_normSubnormalF64Sig.c b/src/libs/softfloat-3e/source/s_normSubnormalF64Sig.c
new file mode 100644
index 00000000..f7861598
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_normSubnormalF64Sig.c
@@ -0,0 +1,52 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+
+struct exp16_sig64 softfloat_normSubnormalF64Sig( uint_fast64_t sig )
+{
+ int_fast8_t shiftDist;
+ struct exp16_sig64 z;
+
+ shiftDist = softfloat_countLeadingZeros64( sig ) - 11;
+ z.exp = 1 - shiftDist;
+ z.sig = sig<<shiftDist;
+ return z;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_remStepMBy32.c b/src/libs/softfloat-3e/source/s_remStepMBy32.c
new file mode 100644
index 00000000..0f249b90
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_remStepMBy32.c
@@ -0,0 +1,86 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_remStepMBy32
+
+void
+ softfloat_remStepMBy32(
+ uint_fast8_t size_words,
+ const uint32_t *remPtr,
+ uint_fast8_t dist,
+ const uint32_t *bPtr,
+ uint32_t q,
+ uint32_t *zPtr
+ )
+{
+ unsigned int index, lastIndex;
+ uint64_t dwordProd;
+ uint32_t wordRem, wordShiftedRem, wordProd;
+ uint_fast8_t uNegDist, borrow;
+
+ index = indexWordLo( size_words );
+ lastIndex = indexWordHi( size_words );
+ dwordProd = (uint64_t) bPtr[index] * q;
+ wordRem = remPtr[index];
+ wordShiftedRem = wordRem<<dist;
+ wordProd = dwordProd;
+ zPtr[index] = wordShiftedRem - wordProd;
+ if ( index != lastIndex ) {
+ uNegDist = -dist;
+ borrow = (wordShiftedRem < wordProd);
+ for (;;) {
+ wordShiftedRem = wordRem>>(uNegDist & 31);
+ index += wordIncr;
+ dwordProd = (uint64_t) bPtr[index] * q + (dwordProd>>32);
+ wordRem = remPtr[index];
+ wordShiftedRem |= wordRem<<dist;
+ wordProd = dwordProd;
+ zPtr[index] = wordShiftedRem - wordProd - borrow;
+ if ( index == lastIndex ) break;
+ borrow =
+ borrow ? (wordShiftedRem <= wordProd)
+ : (wordShiftedRem < wordProd);
+ }
+ }
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_roundMToI64.c b/src/libs/softfloat-3e/source/s_roundMToI64.c
new file mode 100644
index 00000000..198915a9
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_roundMToI64.c
@@ -0,0 +1,102 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+int_fast64_t
+ softfloat_roundMToI64(
+ bool sign, uint32_t *extSigPtr, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ uint64_t sig;
+ uint32_t sigExtra;
+ union { uint64_t ui; int64_t i; } uZ;
+ int64_t z;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sig =
+ (uint64_t) extSigPtr[indexWord( 3, 2 )]<<32
+ | extSigPtr[indexWord( 3, 1 )];
+ sigExtra = extSigPtr[indexWordLo( 3 )];
+ if (
+ (roundingMode == softfloat_round_near_maxMag)
+ || (roundingMode == softfloat_round_near_even)
+ ) {
+ if ( 0x80000000 <= sigExtra ) goto increment;
+ } else {
+ if (
+ sigExtra
+ && (sign
+ ? (roundingMode == softfloat_round_min)
+#ifdef SOFTFLOAT_ROUND_ODD
+ || (roundingMode == softfloat_round_odd)
+#endif
+ : (roundingMode == softfloat_round_max))
+ ) {
+ increment:
+ ++sig;
+ if ( !sig ) goto invalid;
+ if (
+ (sigExtra == 0x80000000)
+ && (roundingMode == softfloat_round_near_even)
+ ) {
+ sig &= ~(uint_fast64_t) 1;
+ }
+ }
+ }
+ uZ.ui = sign ? -sig : sig;
+ z = uZ.i;
+ if ( z && ((z < 0) ^ sign) ) goto invalid;
+ if ( sigExtra ) {
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) z |= 1;
+#endif
+ if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return z;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return sign ? i64_fromNegOverflow : i64_fromPosOverflow;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_roundMToUI64.c b/src/libs/softfloat-3e/source/s_roundMToUI64.c
new file mode 100644
index 00000000..20d434cd
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_roundMToUI64.c
@@ -0,0 +1,98 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+uint_fast64_t
+ softfloat_roundMToUI64(
+ bool sign, uint32_t *extSigPtr, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA)
+{
+ uint64_t sig;
+ uint32_t sigExtra;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sig =
+ (uint64_t) extSigPtr[indexWord( 3, 2 )]<<32
+ | extSigPtr[indexWord( 3, 1 )];
+ sigExtra = extSigPtr[indexWordLo( 3 )];
+ if (
+ (roundingMode == softfloat_round_near_maxMag)
+ || (roundingMode == softfloat_round_near_even)
+ ) {
+ if ( 0x80000000 <= sigExtra ) goto increment;
+ } else {
+ if ( sign ) {
+ if ( !(sig | sigExtra) ) return 0;
+ if ( roundingMode == softfloat_round_min ) goto invalid;
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) goto invalid;
+#endif
+ } else {
+ if ( (roundingMode == softfloat_round_max) && sigExtra ) {
+ increment:
+ ++sig;
+ if ( !sig ) goto invalid;
+ if (
+ (sigExtra == 0x80000000)
+ && (roundingMode == softfloat_round_near_even)
+ ) {
+ sig &= ~(uint_fast64_t) 1;
+ }
+ }
+ }
+ }
+ if ( sign && sig ) goto invalid;
+ if ( sigExtra ) {
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) sig |= 1;
+#endif
+ if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return sig;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return sign ? ui64_fromNegOverflow : ui64_fromPosOverflow;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_roundPackMToExtF80M.c b/src/libs/softfloat-3e/source/s_roundPackMToExtF80M.c
new file mode 100644
index 00000000..6f49d76c
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_roundPackMToExtF80M.c
@@ -0,0 +1,258 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+void
+ softfloat_roundPackMToExtF80M(
+ bool sign,
+ int32_t exp,
+ uint32_t *extSigPtr,
+ uint_fast8_t roundingPrecision,
+ struct extFloat80M *zSPtr
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ uint_fast8_t roundingMode;
+ bool roundNearEven;
+ uint64_t sig, roundIncrement, roundMask, roundBits;
+ bool isTiny;
+ uint32_t sigExtra;
+ bool doIncrement;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ roundingMode = softfloat_roundingMode;
+ roundNearEven = (roundingMode == softfloat_round_near_even);
+ sig =
+ (uint64_t) extSigPtr[indexWord( 3, 2 )]<<32
+ | extSigPtr[indexWord( 3, 1 )];
+ if ( roundingPrecision == 80 ) goto precision80;
+ if ( roundingPrecision == 64 ) {
+ roundIncrement = UINT64_C( 0x0000000000000400 );
+ roundMask = UINT64_C( 0x00000000000007FF );
+ } else if ( roundingPrecision == 32 ) {
+ roundIncrement = UINT64_C( 0x0000008000000000 );
+ roundMask = UINT64_C( 0x000000FFFFFFFFFF );
+ } else {
+ goto precision80;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( extSigPtr[indexWordLo( 3 )] ) sig |= 1;
+ if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) {
+ roundIncrement =
+ (roundingMode
+ == (sign ? softfloat_round_min : softfloat_round_max))
+ ? roundMask
+ : 0;
+ }
+ roundBits = sig & roundMask;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( 0x7FFD <= (uint32_t) (exp - 1) ) {
+ if ( exp <= 0 ) {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ isTiny =
+ (softfloat_detectTininess
+ == softfloat_tininess_beforeRounding)
+ || (exp < 0)
+ || (sig <= (uint64_t) (sig + roundIncrement));
+ sig = softfloat_shiftRightJam64( sig, 1 - exp );
+ roundBits = sig & roundMask;
+ if ( roundBits ) {
+ if ( isTiny ) softfloat_raiseFlags( softfloat_flag_underflow SOFTFLOAT_STATE_ARG_COMMA );
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) {
+ sig |= roundMask + 1;
+ }
+#endif
+ }
+ sig += roundIncrement;
+ exp = ((sig & UINT64_C( 0x8000000000000000 )) != 0);
+ roundIncrement = roundMask + 1;
+ if ( roundNearEven && (roundBits<<1 == roundIncrement) ) {
+ roundMask |= roundIncrement;
+ }
+ sig &= ~roundMask;
+ goto packReturn;
+ }
+ if (
+ (0x7FFE < exp)
+ || ((exp == 0x7FFE) && ((uint64_t) (sig + roundIncrement) < sig))
+ ) {
+ goto overflow;
+ }
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( roundBits ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) {
+ sig = (sig & ~roundMask) | (roundMask + 1);
+ goto packReturn;
+ }
+#endif
+ }
+ sig += roundIncrement;
+ if ( sig < roundIncrement ) {
+ ++exp;
+ sig = UINT64_C( 0x8000000000000000 );
+ }
+ roundIncrement = roundMask + 1;
+ if ( roundNearEven && (roundBits<<1 == roundIncrement) ) {
+ roundMask |= roundIncrement;
+ }
+ sig &= ~roundMask;
+ goto packReturn;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ precision80:
+ sigExtra = extSigPtr[indexWordLo( 3 )];
+ doIncrement = (0x80000000 <= sigExtra);
+ if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) {
+ doIncrement =
+ (roundingMode
+ == (sign ? softfloat_round_min : softfloat_round_max))
+ && sigExtra;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( 0x7FFD <= (uint32_t) (exp - 1) ) {
+ if ( exp <= 0 ) {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ isTiny =
+ (softfloat_detectTininess
+ == softfloat_tininess_beforeRounding)
+ || (exp < 0)
+ || ! doIncrement
+ || (sig < UINT64_C( 0xFFFFFFFFFFFFFFFF ));
+ softfloat_shiftRightJam96M( extSigPtr, 1 - exp, extSigPtr );
+ exp = 0;
+ sig =
+ (uint64_t) extSigPtr[indexWord( 3, 2 )]<<32
+ | extSigPtr[indexWord( 3, 1 )];
+ sigExtra = extSigPtr[indexWordLo( 3 )];
+ if ( sigExtra ) {
+ if ( isTiny ) softfloat_raiseFlags( softfloat_flag_underflow SOFTFLOAT_STATE_ARG_COMMA );
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) {
+ sig |= 1;
+ goto packReturn;
+ }
+#endif
+ }
+ doIncrement = (0x80000000 <= sigExtra);
+ if (
+ ! roundNearEven
+ && (roundingMode != softfloat_round_near_maxMag)
+ ) {
+ doIncrement =
+ (roundingMode
+ == (sign ? softfloat_round_min : softfloat_round_max))
+ && sigExtra;
+ }
+ if ( doIncrement ) {
+ ++sig;
+ sig &= ~(uint64_t) (! (sigExtra & 0x7FFFFFFF) & roundNearEven);
+ exp = ((sig & UINT64_C( 0x8000000000000000 )) != 0);
+ }
+ goto packReturn;
+ }
+ if (
+ (0x7FFE < exp)
+ || ((exp == 0x7FFE) && (sig == UINT64_C( 0xFFFFFFFFFFFFFFFF ))
+ && doIncrement)
+ ) {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ roundMask = 0;
+ overflow:
+ softfloat_raiseFlags(
+ softfloat_flag_overflow | softfloat_flag_inexact
+ SOFTFLOAT_STATE_ARG_COMMA );
+ if (
+ roundNearEven
+ || (roundingMode == softfloat_round_near_maxMag)
+ || (roundingMode
+ == (sign ? softfloat_round_min : softfloat_round_max))
+ ) {
+ exp = 0x7FFF;
+ sig = UINT64_C( 0x8000000000000000 );
+ } else {
+ exp = 0x7FFE;
+ sig = ~roundMask;
+ }
+ goto packReturn;
+ }
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( sigExtra ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) {
+ sig |= 1;
+ goto packReturn;
+ }
+#endif
+ }
+ if ( doIncrement ) {
+ ++sig;
+ if ( ! sig ) {
+ ++exp;
+ sig = UINT64_C( 0x8000000000000000 );
+ } else {
+ sig &= ~(uint64_t) (! (sigExtra & 0x7FFFFFFF) & roundNearEven);
+ }
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ packReturn:
+ zSPtr->signExp = packToExtF80UI64( sign, exp );
+ zSPtr->signif = sig;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_roundPackMToF128M.c b/src/libs/softfloat-3e/source/s_roundPackMToF128M.c
new file mode 100644
index 00000000..adb169c0
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_roundPackMToF128M.c
@@ -0,0 +1,179 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+void
+ softfloat_roundPackMToF128M(
+ bool sign, int32_t exp, uint32_t *extSigPtr, uint32_t *zWPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ uint_fast8_t roundingMode;
+ bool roundNearEven;
+ uint32_t sigExtra;
+ bool doIncrement, isTiny;
+ static const uint32_t maxSig[4] =
+ INIT_UINTM4( 0x0001FFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF );
+ uint32_t ui, uj;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ roundingMode = softfloat_roundingMode;
+ roundNearEven = (roundingMode == softfloat_round_near_even);
+ sigExtra = extSigPtr[indexWordLo( 5 )];
+ doIncrement = (0x80000000 <= sigExtra);
+ if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) {
+ doIncrement =
+ (roundingMode
+ == (sign ? softfloat_round_min : softfloat_round_max))
+ && sigExtra;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( 0x7FFD <= (uint32_t) exp ) {
+ if ( exp < 0 ) {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ isTiny =
+ (softfloat_detectTininess
+ == softfloat_tininess_beforeRounding)
+ || (exp < -1)
+ || ! doIncrement
+ || (softfloat_compare128M(
+ extSigPtr + indexMultiwordHi( 5, 4 ), maxSig )
+ < 0);
+ softfloat_shiftRightJam160M( extSigPtr, -exp, extSigPtr );
+ exp = 0;
+ sigExtra = extSigPtr[indexWordLo( 5 )];
+ if ( isTiny && sigExtra ) {
+ softfloat_raiseFlags( softfloat_flag_underflow SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ doIncrement = (0x80000000 <= sigExtra);
+ if (
+ ! roundNearEven
+ && (roundingMode != softfloat_round_near_maxMag)
+ ) {
+ doIncrement =
+ (roundingMode
+ == (sign ? softfloat_round_min : softfloat_round_max))
+ && sigExtra;
+ }
+ } else if (
+ (0x7FFD < exp)
+ || ((exp == 0x7FFD) && doIncrement
+ && (softfloat_compare128M(
+ extSigPtr + indexMultiwordHi( 5, 4 ), maxSig )
+ == 0))
+ ) {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ softfloat_raiseFlags(
+ softfloat_flag_overflow | softfloat_flag_inexact
+ SOFTFLOAT_STATE_ARG_COMMA );
+ if (
+ roundNearEven
+ || (roundingMode == softfloat_round_near_maxMag)
+ || (roundingMode
+ == (sign ? softfloat_round_min : softfloat_round_max))
+ ) {
+ ui = packToF128UI96( sign, 0x7FFF, 0 );
+ uj = 0;
+ } else {
+ ui = packToF128UI96( sign, 0x7FFE, 0x0000FFFF );
+ uj = 0xFFFFFFFF;
+ }
+ zWPtr[indexWordHi( 4 )] = ui;
+ zWPtr[indexWord( 4, 2 )] = uj;
+ zWPtr[indexWord( 4, 1 )] = uj;
+ zWPtr[indexWord( 4, 0 )] = uj;
+ return;
+ }
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ uj = extSigPtr[indexWord( 5, 1 )];
+ if ( sigExtra ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) {
+ uj |= 1;
+ goto noIncrementPackReturn;
+ }
+#endif
+ }
+ if ( doIncrement ) {
+ ++uj;
+ if ( uj ) {
+ if ( ! (sigExtra & 0x7FFFFFFF) && roundNearEven ) uj &= ~1;
+ zWPtr[indexWord( 4, 2 )] = extSigPtr[indexWord( 5, 3 )];
+ zWPtr[indexWord( 4, 1 )] = extSigPtr[indexWord( 5, 2 )];
+ zWPtr[indexWord( 4, 0 )] = uj;
+ ui = extSigPtr[indexWordHi( 5 )];
+ } else {
+ zWPtr[indexWord( 4, 0 )] = uj;
+ ui = extSigPtr[indexWord( 5, 2 )] + 1;
+ zWPtr[indexWord( 4, 1 )] = ui;
+ uj = extSigPtr[indexWord( 5, 3 )];
+ if ( ui ) {
+ zWPtr[indexWord( 4, 2 )] = uj;
+ ui = extSigPtr[indexWordHi( 5 )];
+ } else {
+ ++uj;
+ zWPtr[indexWord( 4, 2 )] = uj;
+ ui = extSigPtr[indexWordHi( 5 )];
+ if ( ! uj ) ++ui;
+ }
+ }
+ } else {
+ noIncrementPackReturn:
+ zWPtr[indexWord( 4, 0 )] = uj;
+ ui = extSigPtr[indexWord( 5, 2 )];
+ zWPtr[indexWord( 4, 1 )] = ui;
+ uj |= ui;
+ ui = extSigPtr[indexWord( 5, 3 )];
+ zWPtr[indexWord( 4, 2 )] = ui;
+ uj |= ui;
+ ui = extSigPtr[indexWordHi( 5 )];
+ uj |= ui;
+ if ( ! uj ) exp = 0;
+ }
+ zWPtr[indexWordHi( 4 )] = packToF128UI96( sign, exp, ui );
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_roundPackToExtF80.c b/src/libs/softfloat-3e/source/s_roundPackToExtF80.c
new file mode 100644
index 00000000..77d004ab
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_roundPackToExtF80.c
@@ -0,0 +1,370 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+#include <iprt/types.h> /* VBox: RTFLOAT80U_EXP_BIAS_ADJUST */
+#include <iprt/assert.h>
+
+static extFloat80_t
+ softfloat_roundPackToExtF80Inner(
+ bool sign,
+ int_fast32_t exp,
+ uint_fast64_t sig,
+ uint_fast64_t sigExtra,
+ uint_fast8_t roundingPrecision
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ uint_fast8_t roundingMode;
+ bool roundNearEven;
+ uint_fast64_t roundIncrement, roundMask, roundBits;
+ bool isTiny, doIncrement = 0;
+ struct uint64_extra sig64Extra;
+ union { struct extFloat80M s; extFloat80_t f; } uZ;
+ //RTAssertMsg2("softfloat_roundPackToExtF80: exp=%d sig=%RX64 sigExtra=%RX64 rp=%d\n", exp, sig, sigExtra, roundingPrecision);
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ roundingMode = softfloat_roundingMode;
+ roundNearEven = (roundingMode == softfloat_round_near_even);
+ if ( roundingPrecision == 80 ) goto precision80;
+ if ( roundingPrecision == 64 ) {
+ roundIncrement = UINT64_C( 0x0000000000000400 );
+ roundMask = UINT64_C( 0x00000000000007FF );
+ } else if ( roundingPrecision == 32 ) {
+ roundIncrement = UINT64_C( 0x0000008000000000 );
+ roundMask = UINT64_C( 0x000000FFFFFFFFFF );
+ } else {
+ goto precision80;
+ }
+ sig |= (sigExtra != 0);
+ if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) {
+ roundIncrement =
+ (roundingMode
+ == (sign ? softfloat_round_min : softfloat_round_max))
+ ? roundMask
+ : 0;
+ }
+ roundBits = sig & roundMask;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( 0x7FFD <= (uint32_t) (exp - 1) ) {
+ if ( exp <= 0 ) {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ isTiny =
+ (softfloat_detectTininess
+ == softfloat_tininess_beforeRounding)
+ || (exp < 0)
+ || (sig <= (uint64_t) (sig + roundIncrement));
+ sig = softfloat_shiftRightJam64(sig, 1 - exp);
+ uint64_t const uOldSig = sig; /* VBox: C1 */
+ roundBits = sig & roundMask;
+ if ( roundBits ) {
+ if ( isTiny ) softfloat_raiseFlags( softfloat_flag_underflow SOFTFLOAT_STATE_ARG_COMMA );
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) {
+ sig |= roundMask + 1;
+ }
+#endif
+ }
+ sig += roundIncrement;
+ exp = ((sig & UINT64_C( 0x8000000000000000 )) != 0);
+ roundIncrement = roundMask + 1;
+ if ( roundNearEven && (roundBits<<1 == roundIncrement) ) {
+ roundMask |= roundIncrement;
+ }
+ sig &= ~roundMask;
+ if ( sig > uOldSig ) { /* VBox: C1 */
+ softfloat_exceptionFlags |= softfloat_flag_c1; /* VBox: C1 */
+ //RTAssertMsg2("softfloat_roundPackToExtF80: C1 #1\n"); /* VBox: C1 */
+ } /* VBox: C1 */
+ goto packReturn;
+ }
+ if (
+ (0x7FFE < exp)
+ || ((exp == 0x7FFE) && ((uint64_t) (sig + roundIncrement) < sig))
+ ) {
+ goto overflow;
+ }
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ { /* VBox: C1 */
+ uint64_t const uOldSig = sig; /* VBox: C1 */
+ if ( roundBits ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) {
+ sig = (sig & ~roundMask) | (roundMask + 1);
+ if ( sig > uOldSig ) { /* VBox: C1 */
+ softfloat_exceptionFlags |= softfloat_flag_c1; /* VBox: C1 */
+ //RTAssertMsg2("softfloat_roundPackToExtF80: C1 #2\n"); /* VBox: C1 */
+ } /* VBox: C1 */
+ goto packReturn;
+ }
+#endif
+ }
+ sig = (uint64_t) (sig + roundIncrement);
+ if ( sig < roundIncrement ) {
+ ++exp;
+ sig = UINT64_C( 0x8000000000000000 );
+ softfloat_exceptionFlags |= softfloat_flag_c1; /* VBox: C1 */
+ //RTAssertMsg2("softfloat_roundPackToExtF80: C1 #3\n"); /* VBox: C1 */
+ }
+ roundIncrement = roundMask + 1;
+ if ( roundNearEven && (roundBits<<1 == roundIncrement) ) {
+ roundMask |= roundIncrement;
+ }
+ sig &= ~roundMask;
+ if ( sig > uOldSig ) { /* VBox: C1 */
+ softfloat_exceptionFlags |= softfloat_flag_c1; /* VBox: C1 */
+ //RTAssertMsg2("softfloat_roundPackToExtF80: C1 #4\n"); /* VBox: C1 */
+ } /* VBox: C1 */
+ goto packReturn;
+ } /* VBox: C1 */
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ precision80:
+ doIncrement = (UINT64_C( 0x8000000000000000 ) <= sigExtra);
+ if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) {
+ doIncrement =
+ (roundingMode
+ == (sign ? softfloat_round_min : softfloat_round_max))
+ && sigExtra;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( 0x7FFD <= (uint32_t) (exp - 1) ) {
+ if ( exp <= 0 ) {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ isTiny =
+ (softfloat_detectTininess
+ == softfloat_tininess_beforeRounding)
+ || (exp < 0)
+ || ! doIncrement
+ || (sig < UINT64_C( 0xFFFFFFFFFFFFFFFF ));
+//RTAssertMsg2("softfloat_roundPackToExtF80: #2: sig=%#RX64 sigExtra=%#RX64 isTiny=%d exp=%d 1-exp=%d\n", sig, sigExtra, isTiny, exp, 1-exp);
+ sig64Extra =
+ softfloat_shiftRightJam64Extra( sig, sigExtra, 1 - exp );
+ if ( (exp < -63 || sig64Extra.extra != 0) /* VBox: Missing inexact result flag */
+ && ( sig != 0 || sigExtra != 0 ) /*!zero*/ ) { /* VBox: Missing inexact result flag */
+ softfloat_exceptionFlags |= softfloat_flag_inexact; /* VBox: Missing inexact result flag */
+ } /* VBox: Missing inexact result flag */
+ exp = 0;
+ sig = sig64Extra.v;
+ sigExtra = sig64Extra.extra;
+//RTAssertMsg2("softfloat_roundPackToExtF80: #3: sig=%#RX64 sigExtra=%#RX64 isTiny=%d\n", sig, sigExtra, isTiny);
+ if ( sigExtra
+ || ( !(pState->exceptionMask & softfloat_flag_underflow) /* VBox: Unmasked underflow conditions differ */
+ && (sig != 0 || sigExtra != 0) /*zero*/ ) ) { /* VBox: Unmasked underflow conditions differ */
+ if ( isTiny ) softfloat_raiseFlags( softfloat_flag_underflow SOFTFLOAT_STATE_ARG_COMMA );
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) {
+ sig |= 1;
+ goto packReturn;
+ }
+#endif
+ }
+ doIncrement = (UINT64_C( 0x8000000000000000 ) <= sigExtra);
+ if (
+ ! roundNearEven
+ && (roundingMode != softfloat_round_near_maxMag)
+ ) {
+ doIncrement =
+ (roundingMode
+ == (sign ? softfloat_round_min : softfloat_round_max))
+ && sigExtra;
+ }
+ if ( doIncrement ) {
+ uint64_t const uOldSig = sig; /* VBox: C1 */
+ ++sig;
+ sig &=
+ ~(uint_fast64_t)
+ (! (sigExtra & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
+ & roundNearEven);
+ if (sig > uOldSig) { /* VBox: C1 */
+ softfloat_exceptionFlags |= softfloat_flag_c1; /* VBox: C1 */
+ //RTAssertMsg2("softfloat_roundPackToExtF80: C1 #5\n"); /* VBox: C1 */
+ } /* VBox: C1 */
+ exp = ((sig & UINT64_C( 0x8000000000000000 )) != 0);
+ }
+ goto packReturn;
+ }
+ if (
+ (0x7FFE < exp)
+ || ((exp == 0x7FFE) && (sig == UINT64_C( 0xFFFFFFFFFFFFFFFF ))
+ && doIncrement)
+ ) {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ roundMask = 0;
+ overflow:
+ softfloat_raiseFlags(
+ softfloat_flag_overflow | softfloat_flag_inexact
+ SOFTFLOAT_STATE_ARG_COMMA );
+ if (
+ roundNearEven
+ || (roundingMode == softfloat_round_near_maxMag)
+ || (roundingMode
+ == (sign ? softfloat_round_min : softfloat_round_max))
+ ) {
+ exp = 0x7FFF;
+ sig = UINT64_C( 0x8000000000000000 );
+ softfloat_exceptionFlags |= softfloat_flag_c1; /* Inf means rounding up */ /* VBox: C1 */
+ //RTAssertMsg2("softfloat_roundPackToExtF80: C1 #6\n"); /* VBox: C1 */
+ } else {
+ exp = 0x7FFE;
+ sig = ~roundMask;
+ }
+ goto packReturn;
+ }
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( sigExtra ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) {
+ sig |= 1;
+ goto packReturn;
+ }
+#endif
+ }
+ if ( doIncrement ) {
+ uint64_t const uOldSig = sig; /* VBox */
+ ++sig;
+ if ( ! sig ) {
+ ++exp;
+ sig = UINT64_C( 0x8000000000000000 );
+ softfloat_exceptionFlags |= softfloat_flag_c1; /* VBox: C1 */
+ //RTAssertMsg2("softfloat_roundPackToExtF80: C1 #7\n"); /* VBox: C1 */
+ } else {
+ sig &=
+ ~(uint_fast64_t)
+ (! (sigExtra & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
+ & roundNearEven);
+ if ( sig > uOldSig ) { /* VBox: C1 */
+ softfloat_exceptionFlags |= softfloat_flag_c1; /* VBox: C1 */
+ //RTAssertMsg2("softfloat_roundPackToExtF80: C1 #8\n"); /* VBox: C1 */
+ }
+ }
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ packReturn:
+ uZ.s.signExp = packToExtF80UI64( sign, exp );
+ uZ.s.signif = sig;
+ return uZ.f;
+
+}
+
+/**
+ * VBox: Wrapper for implementing underflow and overflow bias adjustment.
+ */
+extFloat80_t
+ softfloat_roundPackToExtF80(
+ bool sign,
+ int_fast32_t exp,
+ uint_fast64_t sig,
+ uint_fast64_t sigExtra,
+ uint_fast8_t roundingPrecision
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ static union extF80M_extF80 const s_aExtF80Zero[2] =
+ {
+ EXTF80M_EXTF80_INIT3_C( 0, 0, 0 ), EXTF80M_EXTF80_INIT3_C( 1, 0, 0 ),
+ };
+ static union extF80M_extF80 const s_aExtF80Infinity[2] =
+ {
+ EXTF80M_EXTF80_INIT3( 0, RT_BIT_64( 63 ), RTFLOAT80U_EXP_MAX ),
+ EXTF80M_EXTF80_INIT3( 1, RT_BIT_64( 63 ), RTFLOAT80U_EXP_MAX ),
+ };
+
+ uint8_t const exceptionFlagsSaved = softfloat_exceptionFlags;
+ softfloat_exceptionFlags = 0;
+ extFloat80_t r80Result = softfloat_roundPackToExtF80Inner( sign, exp, sig, sigExtra, roundingPrecision, pState );
+ if ( !(softfloat_exceptionFlags & ~pState->exceptionMask & (softfloat_flag_underflow | softfloat_flag_overflow)) ) {
+ /* Denormals are fun, because they don't cause #U when masked, and the inner
+ code here assume it's always masked. So, detect denormals and check if it
+ was masked or not, in the latter case do bias adjust. */
+ if ( (r80Result.signif & RT_BIT_64( 63 ))
+ || !r80Result.signif
+ || (pState->exceptionMask & softfloat_flag_underflow) ) {
+ softfloat_exceptionFlags |= exceptionFlagsSaved;
+ return r80Result;
+ }
+
+ /* Denormal and underflow not masked, need to adjust the exponent bias
+ to match 387 behaviour. */
+ Assert( expExtF80UI64( r80Result.signExp ) == 0 );
+ softfloat_exceptionFlags |= softfloat_flag_underflow;
+ }
+
+ /* On Intel 10980XE the FSCALE instruction can cause really large exponents
+ and the rounding changes when we exceed the bias adjust. */
+ if (exp >= RTFLOAT80U_EXP_BIAS_ADJUST + RTFLOAT80U_EXP_MAX) {
+ Assert( softfloat_exceptionFlags & softfloat_flag_overflow );
+ softfloat_exceptionFlags |= softfloat_flag_inexact | softfloat_flag_c1;
+ r80Result = s_aExtF80Infinity[sign].f;
+ } else if (exp <= -RTFLOAT80U_EXP_BIAS_ADJUST) {
+ Assert( softfloat_exceptionFlags & softfloat_flag_underflow );
+ softfloat_exceptionFlags &= ~softfloat_flag_c1;
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ r80Result = s_aExtF80Zero[sign].f;
+ } else {
+ /* Redo the conversion with the bias applied. */
+ softfloat_exceptionFlags &= softfloat_flag_underflow | softfloat_flag_overflow;
+ if ( softfloat_exceptionFlags & softfloat_flag_underflow ) {
+ exp += RTFLOAT80U_EXP_BIAS_ADJUST;
+ Assert( exp > 0 );
+ } else {
+ exp -= RTFLOAT80U_EXP_BIAS_ADJUST;
+ Assert( exp < RTFLOAT80U_EXP_MAX );
+ }
+ r80Result = softfloat_roundPackToExtF80Inner( sign, exp, sig, sigExtra, roundingPrecision, pState );
+ }
+ softfloat_exceptionFlags |= exceptionFlagsSaved;
+ return r80Result;
+}
+
diff --git a/src/libs/softfloat-3e/source/s_roundPackToF128.c b/src/libs/softfloat-3e/source/s_roundPackToF128.c
new file mode 100644
index 00000000..a999abea
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_roundPackToF128.c
@@ -0,0 +1,173 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float128_t
+ softfloat_roundPackToF128(
+ bool sign,
+ int_fast32_t exp,
+ uint_fast64_t sig64,
+ uint_fast64_t sig0,
+ uint_fast64_t sigExtra
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ uint_fast8_t roundingMode;
+ bool roundNearEven, doIncrement, isTiny;
+ struct uint128_extra sig128Extra;
+ uint_fast64_t uiZ64, uiZ0;
+ struct uint128 sig128;
+ union ui128_f128 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ roundingMode = softfloat_roundingMode;
+ roundNearEven = (roundingMode == softfloat_round_near_even);
+ doIncrement = (UINT64_C( 0x8000000000000000 ) <= sigExtra);
+ if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) {
+ doIncrement =
+ (roundingMode
+ == (sign ? softfloat_round_min : softfloat_round_max))
+ && sigExtra;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( 0x7FFD <= (uint32_t) exp ) {
+ if ( exp < 0 ) {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ isTiny =
+ (softfloat_detectTininess
+ == softfloat_tininess_beforeRounding)
+ || (exp < -1)
+ || ! doIncrement
+ || softfloat_lt128(
+ sig64,
+ sig0,
+ UINT64_C( 0x0001FFFFFFFFFFFF ),
+ UINT64_C( 0xFFFFFFFFFFFFFFFF )
+ );
+ sig128Extra =
+ softfloat_shiftRightJam128Extra( sig64, sig0, sigExtra, -exp );
+ sig64 = sig128Extra.v.v64;
+ sig0 = sig128Extra.v.v0;
+ sigExtra = sig128Extra.extra;
+ exp = 0;
+ if ( isTiny && sigExtra ) {
+ softfloat_raiseFlags( softfloat_flag_underflow SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ doIncrement = (UINT64_C( 0x8000000000000000 ) <= sigExtra);
+ if (
+ ! roundNearEven
+ && (roundingMode != softfloat_round_near_maxMag)
+ ) {
+ doIncrement =
+ (roundingMode
+ == (sign ? softfloat_round_min : softfloat_round_max))
+ && sigExtra;
+ }
+ } else if (
+ (0x7FFD < exp)
+ || ((exp == 0x7FFD)
+ && softfloat_eq128(
+ sig64,
+ sig0,
+ UINT64_C( 0x0001FFFFFFFFFFFF ),
+ UINT64_C( 0xFFFFFFFFFFFFFFFF )
+ )
+ && doIncrement)
+ ) {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ softfloat_raiseFlags(
+ softfloat_flag_overflow | softfloat_flag_inexact
+ SOFTFLOAT_STATE_ARG_COMMA );
+ if (
+ roundNearEven
+ || (roundingMode == softfloat_round_near_maxMag)
+ || (roundingMode
+ == (sign ? softfloat_round_min : softfloat_round_max))
+ ) {
+ uiZ64 = packToF128UI64( sign, 0x7FFF, 0 );
+ uiZ0 = 0;
+ } else {
+ uiZ64 =
+ packToF128UI64(
+ sign, 0x7FFE, UINT64_C( 0x0000FFFFFFFFFFFF ) );
+ uiZ0 = UINT64_C( 0xFFFFFFFFFFFFFFFF );
+ }
+ goto uiZ;
+ }
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( sigExtra ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) {
+ sig0 |= 1;
+ goto packReturn;
+ }
+#endif
+ }
+ if ( doIncrement ) {
+ sig128 = softfloat_add128( sig64, sig0, 0, 1 );
+ sig64 = sig128.v64;
+ sig0 =
+ sig128.v0
+ & ~(uint64_t)
+ (! (sigExtra & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
+ & roundNearEven);
+ } else {
+ if ( ! (sig64 | sig0) ) exp = 0;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ packReturn:
+ uiZ64 = packToF128UI64( sign, exp, sig64 );
+ uiZ0 = sig0;
+ uiZ:
+ uZ.ui.v64 = uiZ64;
+ uZ.ui.v0 = uiZ0;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_roundPackToF16.c b/src/libs/softfloat-3e/source/s_roundPackToF16.c
new file mode 100644
index 00000000..45877c48
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_roundPackToF16.c
@@ -0,0 +1,114 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float16_t
+ softfloat_roundPackToF16( bool sign, int_fast16_t exp, uint_fast16_t sig SOFTFLOAT_STATE_DECL_COMMA )
+{
+ uint_fast8_t roundingMode;
+ bool roundNearEven;
+ uint_fast8_t roundIncrement, roundBits;
+ bool isTiny;
+ uint_fast16_t uiZ;
+ union ui16_f16 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ roundingMode = softfloat_roundingMode;
+ roundNearEven = (roundingMode == softfloat_round_near_even);
+ roundIncrement = 0x8;
+ if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) {
+ roundIncrement =
+ (roundingMode
+ == (sign ? softfloat_round_min : softfloat_round_max))
+ ? 0xF
+ : 0;
+ }
+ roundBits = sig & 0xF;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( 0x1D <= (unsigned int) exp ) {
+ if ( exp < 0 ) {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ isTiny =
+ (softfloat_detectTininess == softfloat_tininess_beforeRounding)
+ || (exp < -1) || (sig + roundIncrement < 0x8000);
+ sig = softfloat_shiftRightJam32( sig, -exp );
+ exp = 0;
+ roundBits = sig & 0xF;
+ if ( isTiny && roundBits ) {
+ softfloat_raiseFlags( softfloat_flag_underflow SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ } else if ( (0x1D < exp) || (0x8000 <= sig + roundIncrement) ) {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ softfloat_raiseFlags(
+ softfloat_flag_overflow | softfloat_flag_inexact
+ SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = packToF16UI( sign, 0x1F, 0 ) - ! roundIncrement;
+ goto uiZ;
+ }
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sig = (sig + roundIncrement)>>4;
+ if ( roundBits ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) {
+ sig |= 1;
+ goto packReturn;
+ }
+#endif
+ }
+ sig &= ~(uint_fast16_t) (! (roundBits ^ 8) & roundNearEven);
+ if ( ! sig ) exp = 0;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ packReturn:
+ uiZ = packToF16UI( sign, exp, sig );
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_roundPackToF32.c b/src/libs/softfloat-3e/source/s_roundPackToF32.c
new file mode 100644
index 00000000..3732bff9
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_roundPackToF32.c
@@ -0,0 +1,114 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float32_t
+ softfloat_roundPackToF32( bool sign, int_fast16_t exp, uint_fast32_t sig SOFTFLOAT_STATE_DECL_COMMA )
+{
+ uint_fast8_t roundingMode;
+ bool roundNearEven;
+ uint_fast8_t roundIncrement, roundBits;
+ bool isTiny;
+ uint_fast32_t uiZ;
+ union ui32_f32 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ roundingMode = softfloat_roundingMode;
+ roundNearEven = (roundingMode == softfloat_round_near_even);
+ roundIncrement = 0x40;
+ if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) {
+ roundIncrement =
+ (roundingMode
+ == (sign ? softfloat_round_min : softfloat_round_max))
+ ? 0x7F
+ : 0;
+ }
+ roundBits = sig & 0x7F;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( 0xFD <= (unsigned int) exp ) {
+ if ( exp < 0 ) {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ isTiny =
+ (softfloat_detectTininess == softfloat_tininess_beforeRounding)
+ || (exp < -1) || (sig + roundIncrement < 0x80000000);
+ sig = softfloat_shiftRightJam32( sig, -exp );
+ exp = 0;
+ roundBits = sig & 0x7F;
+ if ( isTiny && roundBits ) {
+ softfloat_raiseFlags( softfloat_flag_underflow SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ } else if ( (0xFD < exp) || (0x80000000 <= sig + roundIncrement) ) {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ softfloat_raiseFlags(
+ softfloat_flag_overflow | softfloat_flag_inexact
+ SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = packToF32UI( sign, 0xFF, 0 ) - ! roundIncrement;
+ goto uiZ;
+ }
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sig = (sig + roundIncrement)>>7;
+ if ( roundBits ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) {
+ sig |= 1;
+ goto packReturn;
+ }
+#endif
+ }
+ sig &= ~(uint_fast32_t) (! (roundBits ^ 0x40) & roundNearEven);
+ if ( ! sig ) exp = 0;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ packReturn:
+ uiZ = packToF32UI( sign, exp, sig );
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_roundPackToF64.c b/src/libs/softfloat-3e/source/s_roundPackToF64.c
new file mode 100644
index 00000000..f44c9840
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_roundPackToF64.c
@@ -0,0 +1,118 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float64_t
+ softfloat_roundPackToF64( bool sign, int_fast16_t exp, uint_fast64_t sig SOFTFLOAT_STATE_DECL_COMMA )
+{
+ uint_fast8_t roundingMode;
+ bool roundNearEven;
+ uint_fast16_t roundIncrement, roundBits;
+ bool isTiny;
+ uint_fast64_t uiZ;
+ union ui64_f64 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ roundingMode = softfloat_roundingMode;
+ roundNearEven = (roundingMode == softfloat_round_near_even);
+ roundIncrement = 0x200;
+ if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) {
+ roundIncrement =
+ (roundingMode
+ == (sign ? softfloat_round_min : softfloat_round_max))
+ ? 0x3FF
+ : 0;
+ }
+ roundBits = sig & 0x3FF;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( 0x7FD <= (uint16_t) exp ) {
+ if ( exp < 0 ) {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ isTiny =
+ (softfloat_detectTininess == softfloat_tininess_beforeRounding)
+ || (exp < -1)
+ || (sig + roundIncrement < UINT64_C( 0x8000000000000000 ));
+ sig = softfloat_shiftRightJam64( sig, -exp );
+ exp = 0;
+ roundBits = sig & 0x3FF;
+ if ( isTiny && roundBits ) {
+ softfloat_raiseFlags( softfloat_flag_underflow SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ } else if (
+ (0x7FD < exp)
+ || (UINT64_C( 0x8000000000000000 ) <= sig + roundIncrement)
+ ) {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ softfloat_raiseFlags(
+ softfloat_flag_overflow | softfloat_flag_inexact
+ SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = packToF64UI( sign, 0x7FF, 0 ) - ! roundIncrement;
+ goto uiZ;
+ }
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ sig = (sig + roundIncrement)>>10;
+ if ( roundBits ) {
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) {
+ sig |= 1;
+ goto packReturn;
+ }
+#endif
+ }
+ sig &= ~(uint_fast64_t) (! (roundBits ^ 0x200) & roundNearEven);
+ if ( ! sig ) exp = 0;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ packReturn:
+ uiZ = packToF64UI( sign, exp, sig );
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_roundToI32.c b/src/libs/softfloat-3e/source/s_roundToI32.c
new file mode 100644
index 00000000..d68242f8
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_roundToI32.c
@@ -0,0 +1,98 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+int_fast32_t
+ softfloat_roundToI32(
+ bool sign, uint_fast64_t sig, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA )
+{
+ uint_fast16_t roundIncrement, roundBits;
+ uint_fast32_t sig32;
+ union { uint32_t ui; int32_t i; } uZ;
+ int_fast32_t z;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ roundIncrement = 0x800;
+ if (
+ (roundingMode != softfloat_round_near_maxMag)
+ && (roundingMode != softfloat_round_near_even)
+ ) {
+ roundIncrement = 0;
+ if (
+ sign
+ ? (roundingMode == softfloat_round_min)
+#ifdef SOFTFLOAT_ROUND_ODD
+ || (roundingMode == softfloat_round_odd)
+#endif
+ : (roundingMode == softfloat_round_max)
+ ) {
+ roundIncrement = 0xFFF;
+ }
+ }
+ roundBits = sig & 0xFFF;
+ sig += roundIncrement;
+ if ( sig & UINT64_C( 0xFFFFF00000000000 ) ) goto invalid;
+ sig32 = sig>>12;
+ if (
+ (roundBits == 0x800) && (roundingMode == softfloat_round_near_even)
+ ) {
+ sig32 &= ~(uint_fast32_t) 1;
+ }
+ uZ.ui = sign ? -sig32 : sig32;
+ z = uZ.i;
+ if ( z && ((z < 0) ^ sign) ) goto invalid;
+ if ( roundBits ) {
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) z |= 1;
+#endif
+ if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return z;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return sign ? i32_fromNegOverflow : i32_fromPosOverflow;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_roundToI64.c b/src/libs/softfloat-3e/source/s_roundToI64.c
new file mode 100644
index 00000000..87704e28
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_roundToI64.c
@@ -0,0 +1,102 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+int_fast64_t
+ softfloat_roundToI64(
+ bool sign,
+ uint_fast64_t sig,
+ uint_fast64_t sigExtra,
+ uint_fast8_t roundingMode,
+ bool exact
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ union { uint64_t ui; int64_t i; } uZ;
+ int_fast64_t z;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if (
+ (roundingMode == softfloat_round_near_maxMag)
+ || (roundingMode == softfloat_round_near_even)
+ ) {
+ if ( UINT64_C( 0x8000000000000000 ) <= sigExtra ) goto increment;
+ } else {
+ if (
+ sigExtra
+ && (sign
+ ? (roundingMode == softfloat_round_min)
+#ifdef SOFTFLOAT_ROUND_ODD
+ || (roundingMode == softfloat_round_odd)
+#endif
+ : (roundingMode == softfloat_round_max))
+ ) {
+ increment:
+ ++sig;
+ if ( !sig ) goto invalid;
+ if (
+ (sigExtra == UINT64_C( 0x8000000000000000 ))
+ && (roundingMode == softfloat_round_near_even)
+ ) {
+ sig &= ~(uint_fast64_t) 1;
+ }
+ }
+ }
+ uZ.ui = sign ? -sig : sig;
+ z = uZ.i;
+ if ( z && ((z < 0) ^ sign) ) goto invalid;
+ if ( sigExtra ) {
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) z |= 1;
+#endif
+ if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return z;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return sign ? i64_fromNegOverflow : i64_fromPosOverflow;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_roundToUI32.c b/src/libs/softfloat-3e/source/s_roundToUI32.c
new file mode 100644
index 00000000..98726975
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_roundToUI32.c
@@ -0,0 +1,93 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+uint_fast32_t
+ softfloat_roundToUI32(
+ bool sign, uint_fast64_t sig, uint_fast8_t roundingMode, bool exact SOFTFLOAT_STATE_DECL_COMMA)
+{
+ uint_fast16_t roundIncrement, roundBits;
+ uint_fast32_t z;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ roundIncrement = 0x800;
+ if (
+ (roundingMode != softfloat_round_near_maxMag)
+ && (roundingMode != softfloat_round_near_even)
+ ) {
+ roundIncrement = 0;
+ if ( sign ) {
+ if ( !sig ) return 0;
+ if ( roundingMode == softfloat_round_min ) goto invalid;
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) goto invalid;
+#endif
+ } else {
+ if ( roundingMode == softfloat_round_max ) roundIncrement = 0xFFF;
+ }
+ }
+ roundBits = sig & 0xFFF;
+ sig += roundIncrement;
+ if ( sig & UINT64_C( 0xFFFFF00000000000 ) ) goto invalid;
+ z = sig>>12;
+ if (
+ (roundBits == 0x800) && (roundingMode == softfloat_round_near_even)
+ ) {
+ z &= ~(uint_fast32_t) 1;
+ }
+ if ( sign && z ) goto invalid;
+ if ( roundBits ) {
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) z |= 1;
+#endif
+ if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return z;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return sign ? ui32_fromNegOverflow : ui32_fromPosOverflow;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_roundToUI64.c b/src/libs/softfloat-3e/source/s_roundToUI64.c
new file mode 100644
index 00000000..5c296d1e
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_roundToUI64.c
@@ -0,0 +1,98 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+uint_fast64_t
+ softfloat_roundToUI64(
+ bool sign,
+ uint_fast64_t sig,
+ uint_fast64_t sigExtra,
+ uint_fast8_t roundingMode,
+ bool exact
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if (
+ (roundingMode == softfloat_round_near_maxMag)
+ || (roundingMode == softfloat_round_near_even)
+ ) {
+ if ( UINT64_C( 0x8000000000000000 ) <= sigExtra ) goto increment;
+ } else {
+ if ( sign ) {
+ if ( !(sig | sigExtra) ) return 0;
+ if ( roundingMode == softfloat_round_min ) goto invalid;
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) goto invalid;
+#endif
+ } else {
+ if ( (roundingMode == softfloat_round_max) && sigExtra ) {
+ increment:
+ ++sig;
+ if ( !sig ) goto invalid;
+ if (
+ (sigExtra == UINT64_C( 0x8000000000000000 ))
+ && (roundingMode == softfloat_round_near_even)
+ ) {
+ sig &= ~(uint_fast64_t) 1;
+ }
+ }
+ }
+ }
+ if ( sign && sig ) goto invalid;
+ if ( sigExtra ) {
+#ifdef SOFTFLOAT_ROUND_ODD
+ if ( roundingMode == softfloat_round_odd ) sig |= 1;
+#endif
+ if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+ }
+ return sig;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ invalid:
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ return sign ? ui64_fromNegOverflow : ui64_fromPosOverflow;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_shiftLeftM.c b/src/libs/softfloat-3e/source/s_shiftLeftM.c
new file mode 100644
index 00000000..feafc67b
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_shiftLeftM.c
@@ -0,0 +1,91 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+
+#ifndef softfloat_shiftLeftM
+
+#define softfloat_shiftLeftM softfloat_shiftLeftM
+#include "primitives.h"
+
+void
+ softfloat_shiftLeftM(
+ uint_fast8_t size_words,
+ const uint32_t *aPtr,
+ uint32_t dist,
+ uint32_t *zPtr
+ )
+{
+ uint32_t wordDist;
+ uint_fast8_t innerDist;
+ uint32_t *destPtr;
+ uint_fast8_t i;
+
+ wordDist = dist>>5;
+ if ( wordDist < size_words ) {
+ aPtr += indexMultiwordLoBut( size_words, wordDist );
+ innerDist = dist & 31;
+ if ( innerDist ) {
+ softfloat_shortShiftLeftM(
+ size_words - wordDist,
+ aPtr,
+ innerDist,
+ zPtr + indexMultiwordHiBut( size_words, wordDist )
+ );
+ if ( ! wordDist ) return;
+ } else {
+ aPtr += indexWordHi( size_words - wordDist );
+ destPtr = zPtr + indexWordHi( size_words );
+ for ( i = size_words - wordDist; i; --i ) {
+ *destPtr = *aPtr;
+ aPtr -= wordIncr;
+ destPtr -= wordIncr;
+ }
+ }
+ zPtr += indexMultiwordLo( size_words, wordDist );
+ } else {
+ wordDist = size_words;
+ }
+ do {
+ *zPtr++ = 0;
+ --wordDist;
+ } while ( wordDist );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_shiftNormSigF128M.c b/src/libs/softfloat-3e/source/s_shiftNormSigF128M.c
new file mode 100644
index 00000000..4820f390
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_shiftNormSigF128M.c
@@ -0,0 +1,78 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+
+int
+ softfloat_shiftNormSigF128M(
+ const uint32_t *wPtr, uint_fast8_t shiftDist, uint32_t *sigPtr )
+{
+ uint32_t wordSig;
+ int32_t exp;
+ uint32_t leadingBit;
+
+ wordSig = wPtr[indexWordHi( 4 )];
+ exp = expF128UI96( wordSig );
+ if ( exp ) {
+ softfloat_shortShiftLeft128M( wPtr, shiftDist, sigPtr );
+ leadingBit = 0x00010000<<shiftDist;
+ sigPtr[indexWordHi( 4 )] =
+ (sigPtr[indexWordHi( 4 )] & (leadingBit - 1)) | leadingBit;
+ } else {
+ exp = 16;
+ wordSig &= 0x7FFFFFFF;
+ if ( ! wordSig ) {
+ exp = -16;
+ wordSig = wPtr[indexWord( 4, 2 )];
+ if ( ! wordSig ) {
+ exp = -48;
+ wordSig = wPtr[indexWord( 4, 1 )];
+ if ( ! wordSig ) {
+ wordSig = wPtr[indexWord( 4, 0 )];
+ if ( ! wordSig ) return -128;
+ exp = -80;
+ }
+ }
+ }
+ exp -= softfloat_countLeadingZeros32( wordSig );
+ softfloat_shiftLeft128M( wPtr, 1 - exp + shiftDist, sigPtr );
+ }
+ return exp;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_shiftRightJam128.c b/src/libs/softfloat-3e/source/s_shiftRightJam128.c
new file mode 100644
index 00000000..c16b3e6e
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_shiftRightJam128.c
@@ -0,0 +1,71 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_shiftRightJam128
+# undef INLINE_LEVEL /* VBox: Missing prototype */
+# include "primitives.h" /* VBox: Missing prototype */
+
+struct uint128
+ softfloat_shiftRightJam128( uint64_t a64, uint64_t a0, uint_fast32_t dist )
+{
+ uint_fast8_t u8NegDist;
+ struct uint128 z;
+
+ if ( dist < 64 ) {
+ u8NegDist = -dist;
+ z.v64 = a64>>dist;
+ z.v0 =
+ a64<<(u8NegDist & 63) | a0>>dist
+ | ((uint64_t) (a0<<(u8NegDist & 63)) != 0);
+ } else {
+ z.v64 = 0;
+ z.v0 =
+ (dist < 127)
+ ? a64>>(dist & 63)
+ | (((a64 & (((uint_fast64_t) 1<<(dist & 63)) - 1)) | a0)
+ != 0)
+ : ((a64 | a0) != 0);
+ }
+ return z;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_shiftRightJam128Extra.c b/src/libs/softfloat-3e/source/s_shiftRightJam128Extra.c
new file mode 100644
index 00000000..77523db3
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_shiftRightJam128Extra.c
@@ -0,0 +1,79 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_shiftRightJam128Extra
+# undef INLINE_LEVEL /* VBox: Missing prototype */
+# include "primitives.h" /* VBox: Missing prototype */
+
+struct uint128_extra
+ softfloat_shiftRightJam128Extra(
+ uint64_t a64, uint64_t a0, uint64_t extra, uint_fast32_t dist )
+{
+ uint_fast8_t u8NegDist;
+ struct uint128_extra z;
+
+ u8NegDist = -dist;
+ if ( dist < 64 ) {
+ z.v.v64 = a64>>dist;
+ z.v.v0 = a64<<(u8NegDist & 63) | a0>>dist;
+ z.extra = a0<<(u8NegDist & 63);
+ } else {
+ z.v.v64 = 0;
+ if ( dist == 64 ) {
+ z.v.v0 = a64;
+ z.extra = a0;
+ } else {
+ extra |= a0;
+ if ( dist < 128 ) {
+ z.v.v0 = a64>>(dist & 63);
+ z.extra = a64<<(u8NegDist & 63);
+ } else {
+ z.v.v0 = 0;
+ z.extra = (dist == 128) ? a64 : (a64 != 0);
+ }
+ }
+ }
+ z.extra |= (extra != 0);
+ return z;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_shiftRightJam256M.c b/src/libs/softfloat-3e/source/s_shiftRightJam256M.c
new file mode 100644
index 00000000..39e44b02
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_shiftRightJam256M.c
@@ -0,0 +1,127 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_shiftRightJam256M
+# include "primitives.h" /* VBox: Missing prototype */
+
+static
+ void
+ softfloat_shortShiftRightJamM(
+ uint_fast8_t size_words,
+ const uint64_t *aPtr,
+ uint_fast8_t dist,
+ uint64_t *zPtr
+ )
+{
+ uint_fast8_t uNegDist;
+ unsigned int index, lastIndex;
+ uint64_t partWordZ, wordA;
+
+ uNegDist = -dist;
+ index = indexWordLo( size_words );
+ lastIndex = indexWordHi( size_words );
+ wordA = aPtr[index];
+ partWordZ = wordA>>dist;
+ if ( partWordZ<<dist != wordA ) partWordZ |= 1;
+ while ( index != lastIndex ) {
+ wordA = aPtr[index + wordIncr];
+ zPtr[index] = wordA<<(uNegDist & 63) | partWordZ;
+ index += wordIncr;
+ partWordZ = wordA>>dist;
+ }
+ zPtr[index] = partWordZ;
+
+}
+
+void
+ softfloat_shiftRightJam256M(
+ const uint64_t *aPtr, uint_fast32_t dist, uint64_t *zPtr )
+{
+ uint64_t wordJam;
+ uint_fast32_t wordDist;
+ uint64_t *ptr = (uint64_t *)0; /* vbox: shut up MSC warning */
+ uint_fast8_t i, innerDist;
+
+ wordJam = 0;
+ wordDist = dist>>6;
+ if ( wordDist ) {
+ if ( 4 < wordDist ) wordDist = 4;
+ ptr = (uint64_t *) (aPtr + indexMultiwordLo( 4, wordDist ));
+ i = wordDist;
+ do {
+ wordJam = *ptr++;
+ if ( wordJam ) break;
+ --i;
+ } while ( i );
+ ptr = zPtr;
+ }
+ if ( wordDist < 4 ) {
+ aPtr += indexMultiwordHiBut( 4, wordDist );
+ innerDist = dist & 63;
+ if ( innerDist ) {
+ softfloat_shortShiftRightJamM(
+ 4 - wordDist,
+ aPtr,
+ innerDist,
+ zPtr + indexMultiwordLoBut( 4, wordDist )
+ );
+ if ( ! wordDist ) goto wordJam;
+ } else {
+ aPtr += indexWordLo( 4 - wordDist );
+ ptr = zPtr + indexWordLo( 4 );
+ for ( i = 4 - wordDist; i; --i ) {
+ *ptr = *aPtr;
+ aPtr += wordIncr;
+ ptr += wordIncr;
+ }
+ }
+ ptr = zPtr + indexMultiwordHi( 4, wordDist );
+ }
+ do {
+ *ptr++ = 0;
+ --wordDist;
+ } while ( wordDist );
+ wordJam:
+ if ( wordJam ) zPtr[indexWordLo( 4 )] |= 1;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_shiftRightJam32.c b/src/libs/softfloat-3e/source/s_shiftRightJam32.c
new file mode 100644
index 00000000..5bf9499f
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_shiftRightJam32.c
@@ -0,0 +1,53 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+
+#ifndef softfloat_shiftRightJam32
+# undef INLINE_LEVEL /* VBox: Missing prototype */
+# include "primitives.h" /* VBox: Missing prototype */
+
+uint32_t softfloat_shiftRightJam32( uint32_t a, uint_fast16_t dist )
+{
+
+ return
+ (dist < 31) ? a>>dist | ((uint32_t) (a<<(-dist & 31)) != 0) : (a != 0);
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_shiftRightJam64.c b/src/libs/softfloat-3e/source/s_shiftRightJam64.c
new file mode 100644
index 00000000..4de097e8
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_shiftRightJam64.c
@@ -0,0 +1,53 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+
+#ifndef softfloat_shiftRightJam64
+# undef INLINE_LEVEL /* VBox: Missing prototype */
+# include "primitives.h" /* VBox: Missing prototype */
+
+uint64_t softfloat_shiftRightJam64( uint64_t a, uint_fast32_t dist )
+{
+
+ return
+ (dist < 63) ? a>>dist | ((uint64_t) (a<<(-dist & 63)) != 0) : (a != 0);
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_shiftRightJam64Extra.c b/src/libs/softfloat-3e/source/s_shiftRightJam64Extra.c
new file mode 100644
index 00000000..4c856172
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_shiftRightJam64Extra.c
@@ -0,0 +1,64 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_shiftRightJam64Extra
+# undef INLINE_LEVEL /* VBox: Missing prototype */
+# include "primitives.h" /* VBox: Missing prototype */
+
+struct uint64_extra
+ softfloat_shiftRightJam64Extra(
+ uint64_t a, uint64_t extra, uint_fast32_t dist )
+{
+ struct uint64_extra z;
+
+ if ( dist < 64 ) {
+ z.v = a>>dist;
+ z.extra = a<<(-dist & 63);
+ } else {
+ z.v = 0;
+ z.extra = (dist == 64) ? a : (a != 0);
+ }
+ z.extra |= (extra != 0);
+ return z;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_shiftRightJamM.c b/src/libs/softfloat-3e/source/s_shiftRightJamM.c
new file mode 100644
index 00000000..0a0dd7d7
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_shiftRightJamM.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+
+#ifndef softfloat_shiftRightJamM
+
+#define softfloat_shiftRightJamM softfloat_shiftRightJamM
+#include "primitives.h"
+
+void
+ softfloat_shiftRightJamM(
+ uint_fast8_t size_words,
+ const uint32_t *aPtr,
+ uint32_t dist,
+ uint32_t *zPtr
+ )
+{
+ uint32_t wordJam, wordDist, *ptr;
+ uint_fast8_t i, innerDist;
+
+ wordJam = 0;
+ wordDist = dist>>5;
+ if ( wordDist ) {
+ if ( size_words < wordDist ) wordDist = size_words;
+ ptr = (uint32_t *) (aPtr + indexMultiwordLo( size_words, wordDist ));
+ i = wordDist;
+ do {
+ wordJam = *ptr++;
+ if ( wordJam ) break;
+ --i;
+ } while ( i );
+ ptr = zPtr;
+ }
+ if ( wordDist < size_words ) {
+ aPtr += indexMultiwordHiBut( size_words, wordDist );
+ innerDist = dist & 31;
+ if ( innerDist ) {
+ softfloat_shortShiftRightJamM(
+ size_words - wordDist,
+ aPtr,
+ innerDist,
+ zPtr + indexMultiwordLoBut( size_words, wordDist )
+ );
+ if ( ! wordDist ) goto wordJam;
+ } else {
+ aPtr += indexWordLo( size_words - wordDist );
+ ptr = zPtr + indexWordLo( size_words );
+ for ( i = size_words - wordDist; i; --i ) {
+ *ptr = *aPtr;
+ aPtr += wordIncr;
+ ptr += wordIncr;
+ }
+ }
+ ptr = zPtr + indexMultiwordHi( size_words, wordDist );
+ }
+ do {
+ *ptr++ = 0;
+ --wordDist;
+ } while ( wordDist );
+ wordJam:
+ if ( wordJam ) zPtr[indexWordLo( size_words )] |= 1;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_shiftRightM.c b/src/libs/softfloat-3e/source/s_shiftRightM.c
new file mode 100644
index 00000000..6ac383f0
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_shiftRightM.c
@@ -0,0 +1,91 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+
+#ifndef softfloat_shiftRightM
+
+#define softfloat_shiftRightM softfloat_shiftRightM
+#include "primitives.h"
+
+void
+ softfloat_shiftRightM(
+ uint_fast8_t size_words,
+ const uint32_t *aPtr,
+ uint32_t dist,
+ uint32_t *zPtr
+ )
+{
+ uint32_t wordDist;
+ uint_fast8_t innerDist;
+ uint32_t *destPtr;
+ uint_fast8_t i;
+
+ wordDist = dist>>5;
+ if ( wordDist < size_words ) {
+ aPtr += indexMultiwordHiBut( size_words, wordDist );
+ innerDist = dist & 31;
+ if ( innerDist ) {
+ softfloat_shortShiftRightM(
+ size_words - wordDist,
+ aPtr,
+ innerDist,
+ zPtr + indexMultiwordLoBut( size_words, wordDist )
+ );
+ if ( ! wordDist ) return;
+ } else {
+ aPtr += indexWordLo( size_words - wordDist );
+ destPtr = zPtr + indexWordLo( size_words );
+ for ( i = size_words - wordDist; i; --i ) {
+ *destPtr = *aPtr;
+ aPtr += wordIncr;
+ destPtr += wordIncr;
+ }
+ }
+ zPtr += indexMultiwordHi( size_words, wordDist );
+ } else {
+ wordDist = size_words;
+ }
+ do {
+ *zPtr++ = 0;
+ --wordDist;
+ } while ( wordDist );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_shortShiftLeft128.c b/src/libs/softfloat-3e/source/s_shortShiftLeft128.c
new file mode 100644
index 00000000..1538d39a
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_shortShiftLeft128.c
@@ -0,0 +1,57 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_shortShiftLeft128
+# undef INLINE_LEVEL /* VBox: Missing prototype */
+# include "primitives.h" /* VBox: Missing prototype */
+
+struct uint128
+ softfloat_shortShiftLeft128( uint64_t a64, uint64_t a0, uint_fast8_t dist )
+{
+ struct uint128 z;
+
+ z.v64 = a64<<dist | a0>>(-dist & 63);
+ z.v0 = a0<<dist;
+ return z;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_shortShiftLeft64To96M.c b/src/libs/softfloat-3e/source/s_shortShiftLeft64To96M.c
new file mode 100644
index 00000000..2f442ecc
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_shortShiftLeft64To96M.c
@@ -0,0 +1,56 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_shortShiftLeft64To96M
+
+void
+ softfloat_shortShiftLeft64To96M(
+ uint64_t a, uint_fast8_t dist, uint32_t *zPtr )
+{
+
+ zPtr[indexWord( 3, 0 )] = (uint32_t) a<<dist;
+ a >>= 32 - dist;
+ zPtr[indexWord( 3, 2 )] = a>>32;
+ zPtr[indexWord( 3, 1 )] = a;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_shortShiftLeftM.c b/src/libs/softfloat-3e/source/s_shortShiftLeftM.c
new file mode 100644
index 00000000..b947c63c
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_shortShiftLeftM.c
@@ -0,0 +1,70 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_shortShiftLeftM
+
+void
+ softfloat_shortShiftLeftM(
+ uint_fast8_t size_words,
+ const uint32_t *aPtr,
+ uint_fast8_t dist,
+ uint32_t *zPtr
+ )
+{
+ uint_fast8_t uNegDist;
+ unsigned int index, lastIndex;
+ uint32_t partWordZ, wordA;
+
+ uNegDist = -dist;
+ index = indexWordHi( size_words );
+ lastIndex = indexWordLo( size_words );
+ partWordZ = aPtr[index]<<dist;
+ while ( index != lastIndex ) {
+ wordA = aPtr[index - wordIncr];
+ zPtr[index] = partWordZ | wordA>>(uNegDist & 31);
+ index -= wordIncr;
+ partWordZ = wordA<<dist;
+ }
+ zPtr[index] = partWordZ;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_shortShiftRight128.c b/src/libs/softfloat-3e/source/s_shortShiftRight128.c
new file mode 100644
index 00000000..7cea48ac
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_shortShiftRight128.c
@@ -0,0 +1,57 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_shortShiftRight128
+# undef INLINE_LEVEL /* VBox: Missing prototype */
+# include "primitives.h" /* VBox: Missing prototype */
+
+struct uint128
+ softfloat_shortShiftRight128( uint64_t a64, uint64_t a0, uint_fast8_t dist )
+{
+ struct uint128 z;
+
+ z.v64 = a64>>dist;
+ z.v0 = a64<<(-dist & 63) | a0>>dist;
+ return z;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_shortShiftRightExtendM.c b/src/libs/softfloat-3e/source/s_shortShiftRightExtendM.c
new file mode 100644
index 00000000..92c786af
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_shortShiftRightExtendM.c
@@ -0,0 +1,73 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_shortShiftRightExtendM
+
+void
+ softfloat_shortShiftRightExtendM(
+ uint_fast8_t size_words,
+ const uint32_t *aPtr,
+ uint_fast8_t dist,
+ uint32_t *zPtr
+ )
+{
+ uint_fast8_t uNegDist;
+ unsigned int indexA, lastIndexA;
+ uint32_t partWordZ, wordA;
+
+ uNegDist = -dist;
+ indexA = indexWordLo( size_words );
+ lastIndexA = indexWordHi( size_words );
+ zPtr += indexWordLo( size_words + 1 );
+ partWordZ = 0;
+ for (;;) {
+ wordA = aPtr[indexA];
+ *zPtr = wordA<<(uNegDist & 31) | partWordZ;
+ zPtr += wordIncr;
+ partWordZ = wordA>>dist;
+ if ( indexA == lastIndexA ) break;
+ indexA += wordIncr;
+ }
+ *zPtr = partWordZ;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_shortShiftRightJam128.c b/src/libs/softfloat-3e/source/s_shortShiftRightJam128.c
new file mode 100644
index 00000000..a27beb3b
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_shortShiftRightJam128.c
@@ -0,0 +1,62 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_shortShiftRightJam128
+# undef INLINE_LEVEL /* VBox: Missing prototype */
+# include "primitives.h" /* VBox: Missing prototype */
+
+struct uint128
+ softfloat_shortShiftRightJam128(
+ uint64_t a64, uint64_t a0, uint_fast8_t dist )
+{
+ uint_fast8_t uNegDist;
+ struct uint128 z;
+
+ uNegDist = -dist;
+ z.v64 = a64>>dist;
+ z.v0 =
+ a64<<(uNegDist & 63) | a0>>dist
+ | ((uint64_t) (a0<<(uNegDist & 63)) != 0);
+ return z;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_shortShiftRightJam128Extra.c b/src/libs/softfloat-3e/source/s_shortShiftRightJam128Extra.c
new file mode 100644
index 00000000..abe83166
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_shortShiftRightJam128Extra.c
@@ -0,0 +1,61 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_shortShiftRightJam128Extra
+# undef INLINE_LEVEL /* VBox: Missing prototype */
+# include "primitives.h" /* VBox: Missing prototype */
+
+struct uint128_extra
+ softfloat_shortShiftRightJam128Extra(
+ uint64_t a64, uint64_t a0, uint64_t extra, uint_fast8_t dist )
+{
+ uint_fast8_t uNegDist;
+ struct uint128_extra z;
+
+ uNegDist = -dist;
+ z.v.v64 = a64>>dist;
+ z.v.v0 = a64<<(uNegDist & 63) | a0>>dist;
+ z.extra = a0<<(uNegDist & 63) | (extra != 0);
+ return z;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_shortShiftRightJam64.c b/src/libs/softfloat-3e/source/s_shortShiftRightJam64.c
new file mode 100644
index 00000000..06ccbf0a
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_shortShiftRightJam64.c
@@ -0,0 +1,52 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+
+#ifndef softfloat_shortShiftRightJam64
+# undef INLINE_LEVEL /* VBox: Missing prototype */
+# include "primitives.h" /* VBox: Missing prototype */
+
+uint64_t softfloat_shortShiftRightJam64( uint64_t a, uint_fast8_t dist )
+{
+
+ return a>>dist | ((a & (((uint_fast64_t) 1<<dist) - 1)) != 0);
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_shortShiftRightJam64Extra.c b/src/libs/softfloat-3e/source/s_shortShiftRightJam64Extra.c
new file mode 100644
index 00000000..eb997b4d
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_shortShiftRightJam64Extra.c
@@ -0,0 +1,58 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_shortShiftRightJam64Extra
+# undef INLINE_LEVEL /* VBox: Missing prototype */
+# include "primitives.h" /* VBox: Missing prototype */
+
+struct uint64_extra
+ softfloat_shortShiftRightJam64Extra(
+ uint64_t a, uint64_t extra, uint_fast8_t dist )
+{
+ struct uint64_extra z;
+
+ z.v = a>>dist;
+ z.extra = a<<(-dist & 63) | (extra != 0);
+ return z;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_shortShiftRightJamM.c b/src/libs/softfloat-3e/source/s_shortShiftRightJamM.c
new file mode 100644
index 00000000..60f698b9
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_shortShiftRightJamM.c
@@ -0,0 +1,72 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_shortShiftRightJamM
+
+void
+ softfloat_shortShiftRightJamM(
+ uint_fast8_t size_words,
+ const uint32_t *aPtr,
+ uint_fast8_t dist,
+ uint32_t *zPtr
+ )
+{
+ uint_fast8_t uNegDist;
+ unsigned int index, lastIndex;
+ uint32_t partWordZ, wordA;
+
+ uNegDist = -dist;
+ index = indexWordLo( size_words );
+ lastIndex = indexWordHi( size_words );
+ wordA = aPtr[index];
+ partWordZ = wordA>>dist;
+ if ( partWordZ<<dist != wordA ) partWordZ |= 1;
+ while ( index != lastIndex ) {
+ wordA = aPtr[index + wordIncr];
+ zPtr[index] = wordA<<(uNegDist & 31) | partWordZ;
+ index += wordIncr;
+ partWordZ = wordA>>dist;
+ }
+ zPtr[index] = partWordZ;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_shortShiftRightM.c b/src/libs/softfloat-3e/source/s_shortShiftRightM.c
new file mode 100644
index 00000000..8a165fe4
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_shortShiftRightM.c
@@ -0,0 +1,70 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_shortShiftRightM
+
+void
+ softfloat_shortShiftRightM(
+ uint_fast8_t size_words,
+ const uint32_t *aPtr,
+ uint_fast8_t dist,
+ uint32_t *zPtr
+ )
+{
+ uint_fast8_t uNegDist;
+ unsigned int index, lastIndex;
+ uint32_t partWordZ, wordA;
+
+ uNegDist = -dist;
+ index = indexWordLo( size_words );
+ lastIndex = indexWordHi( size_words );
+ partWordZ = aPtr[index]>>dist;
+ while ( index != lastIndex ) {
+ wordA = aPtr[index + wordIncr];
+ zPtr[index] = wordA<<(uNegDist & 31) | partWordZ;
+ index += wordIncr;
+ partWordZ = wordA>>dist;
+ }
+ zPtr[index] = partWordZ;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_sub128.c b/src/libs/softfloat-3e/source/s_sub128.c
new file mode 100644
index 00000000..7bbb8fa7
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_sub128.c
@@ -0,0 +1,57 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_sub128
+# undef INLINE_LEVEL /* VBox: Missing prototype */
+# include "primitives.h" /* VBox: Missing prototype */
+
+struct uint128
+ softfloat_sub128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )
+{
+ struct uint128 z;
+
+ z.v0 = a0 - b0;
+ z.v64 = a64 - b64 - (a0 < b0);
+ return z;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_sub1XM.c b/src/libs/softfloat-3e/source/s_sub1XM.c
new file mode 100644
index 00000000..6c79a8b2
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_sub1XM.c
@@ -0,0 +1,60 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_sub1XM
+
+void softfloat_sub1XM( uint_fast8_t size_words, uint32_t *zPtr )
+{
+ unsigned int index, lastIndex;
+ uint32_t wordA;
+
+ index = indexWordLo( size_words );
+ lastIndex = indexWordHi( size_words );
+ for (;;) {
+ wordA = zPtr[index];
+ zPtr[index] = wordA - 1;
+ if ( wordA || (index == lastIndex) ) break;
+ index += wordIncr;
+ }
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_sub256M.c b/src/libs/softfloat-3e/source/s_sub256M.c
new file mode 100644
index 00000000..59ea1137
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_sub256M.c
@@ -0,0 +1,66 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_sub256M
+# include "primitives.h" /* VBox: Missing prototype */
+
+void
+ softfloat_sub256M(
+ const uint64_t *aPtr, const uint64_t *bPtr, uint64_t *zPtr )
+{
+ unsigned int index;
+ uint_fast8_t borrow;
+ uint64_t wordA, wordB;
+
+ index = indexWordLo( 4 );
+ borrow = 0;
+ for (;;) {
+ wordA = aPtr[index];
+ wordB = bPtr[index];
+ zPtr[index] = wordA - wordB - borrow;
+ if ( index == indexWordHi( 4 ) ) break;
+ borrow = borrow ? (wordA <= wordB) : (wordA < wordB);
+ index += wordIncr;
+ }
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_subM.c b/src/libs/softfloat-3e/source/s_subM.c
new file mode 100644
index 00000000..213b0bf6
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_subM.c
@@ -0,0 +1,70 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitiveTypes.h"
+
+#ifndef softfloat_subM
+
+void
+ softfloat_subM(
+ uint_fast8_t size_words,
+ const uint32_t *aPtr,
+ const uint32_t *bPtr,
+ uint32_t *zPtr
+ )
+{
+ unsigned int index, lastIndex;
+ uint_fast8_t borrow;
+ uint32_t wordA, wordB;
+
+ index = indexWordLo( size_words );
+ lastIndex = indexWordHi( size_words );
+ borrow = 0;
+ for (;;) {
+ wordA = aPtr[index];
+ wordB = bPtr[index];
+ zPtr[index] = wordA - wordB - borrow;
+ if ( index == lastIndex ) break;
+ borrow = borrow ? (wordA <= wordB) : (wordA < wordB);
+ index += wordIncr;
+ }
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/s_subMagsExtF80.c b/src/libs/softfloat-3e/source/s_subMagsExtF80.c
new file mode 100644
index 00000000..22a8269b
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_subMagsExtF80.c
@@ -0,0 +1,159 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+extFloat80_t
+ softfloat_subMagsExtF80(
+ uint_fast16_t uiA64,
+ uint_fast64_t uiA0,
+ uint_fast16_t uiB64,
+ uint_fast64_t uiB0,
+ bool signZ
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ int_fast32_t expA;
+ uint_fast64_t sigA;
+ int_fast32_t expB;
+ uint_fast64_t sigB;
+ int_fast32_t expDiff;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+ int_fast32_t expZ;
+ uint_fast64_t sigExtra;
+ struct uint128 sig128, uiZ;
+ union { struct extFloat80M s; extFloat80_t f; } uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expA = expExtF80UI64( uiA64 );
+ sigA = uiA0;
+ expB = expExtF80UI64( uiB64 );
+ sigB = uiB0;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expDiff = expA - expB;
+ if ( 0 < expDiff ) goto expABigger;
+ if ( expDiff < 0 ) goto expBBigger;
+ if ( expA == 0x7FFF ) {
+ if ( (sigA | sigB) & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) {
+ goto propagateNaN;
+ }
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ64 = defaultNaNExtF80UI64;
+ uiZ0 = defaultNaNExtF80UI0;
+ goto uiZ;
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expZ = expA;
+ if ( ! expZ ) expZ = 1;
+ sigExtra = 0;
+ if ( sigB < sigA ) goto aBigger;
+ if ( sigA < sigB ) goto bBigger;
+ uiZ64 =
+ packToExtF80UI64( (softfloat_roundingMode == softfloat_round_min), 0 );
+ uiZ0 = 0;
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expBBigger:
+ if ( expB == 0x7FFF ) {
+ if ( sigB & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) goto propagateNaN;
+ uiZ64 = packToExtF80UI64( signZ ^ 1, 0x7FFF );
+ uiZ0 = UINT64_C( 0x8000000000000000 );
+ goto uiZ;
+ }
+ if ( ! expA ) {
+ ++expDiff;
+ sigExtra = 0;
+ if ( ! expDiff ) goto newlyAlignedBBigger;
+ }
+ sig128 = softfloat_shiftRightJam128( sigA, 0, -expDiff );
+ sigA = sig128.v64;
+ sigExtra = sig128.v0;
+ newlyAlignedBBigger:
+ expZ = expB;
+ bBigger:
+ signZ = ! signZ;
+ sig128 = softfloat_sub128( sigB, 0, sigA, sigExtra );
+ goto normRoundPack;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expABigger:
+ if ( expA == 0x7FFF ) {
+ if ( sigA & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) goto propagateNaN;
+ uiZ64 = uiA64;
+ uiZ0 = uiA0;
+ goto uiZ;
+ }
+ if ( ! expB ) {
+ --expDiff;
+ sigExtra = 0;
+ if ( ! expDiff ) goto newlyAlignedABigger;
+ }
+ sig128 = softfloat_shiftRightJam128( sigB, 0, expDiff );
+ sigB = sig128.v64;
+ sigExtra = sig128.v0;
+ newlyAlignedABigger:
+ expZ = expA;
+ aBigger:
+ sig128 = softfloat_sub128( sigA, 0, sigB, sigExtra );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ normRoundPack:
+ return
+ softfloat_normRoundPackToExtF80(
+ signZ, expZ, sig128.v64, sig128.v0, extF80_roundingPrecision SOFTFLOAT_STATE_ARG_COMMA );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN:
+ uiZ = softfloat_propagateNaNExtF80UI( uiA64, uiA0, uiB64, uiB0 SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ64 = uiZ.v64;
+ uiZ0 = uiZ.v0;
+ uiZ:
+ uZ.s.signExp = uiZ64;
+ uZ.s.signif = uiZ0;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_subMagsF128.c b/src/libs/softfloat-3e/source/s_subMagsF128.c
new file mode 100644
index 00000000..5382d0fa
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_subMagsF128.c
@@ -0,0 +1,140 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float128_t
+ softfloat_subMagsF128(
+ uint_fast64_t uiA64,
+ uint_fast64_t uiA0,
+ uint_fast64_t uiB64,
+ uint_fast64_t uiB0,
+ bool signZ
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ int_fast32_t expA;
+ struct uint128 sigA;
+ int_fast32_t expB;
+ struct uint128 sigB, sigZ;
+ int_fast32_t expDiff, expZ;
+ struct uint128 uiZ;
+ union ui128_f128 uZ;
+
+ expA = expF128UI64( uiA64 );
+ sigA.v64 = fracF128UI64( uiA64 );
+ sigA.v0 = uiA0;
+ expB = expF128UI64( uiB64 );
+ sigB.v64 = fracF128UI64( uiB64 );
+ sigB.v0 = uiB0;
+ sigA = softfloat_shortShiftLeft128( sigA.v64, sigA.v0, 4 );
+ sigB = softfloat_shortShiftLeft128( sigB.v64, sigB.v0, 4 );
+ expDiff = expA - expB;
+ if ( 0 < expDiff ) goto expABigger;
+ if ( expDiff < 0 ) goto expBBigger;
+ if ( expA == 0x7FFF ) {
+ if ( sigA.v64 | sigA.v0 | sigB.v64 | sigB.v0 ) goto propagateNaN;
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ.v64 = defaultNaNF128UI64;
+ uiZ.v0 = defaultNaNF128UI0;
+ goto uiZ;
+ }
+ expZ = expA;
+ if ( ! expZ ) expZ = 1;
+ if ( sigB.v64 < sigA.v64 ) goto aBigger;
+ if ( sigA.v64 < sigB.v64 ) goto bBigger;
+ if ( sigB.v0 < sigA.v0 ) goto aBigger;
+ if ( sigA.v0 < sigB.v0 ) goto bBigger;
+ uiZ.v64 =
+ packToF128UI64(
+ (softfloat_roundingMode == softfloat_round_min), 0, 0 );
+ uiZ.v0 = 0;
+ goto uiZ;
+ expBBigger:
+ if ( expB == 0x7FFF ) {
+ if ( sigB.v64 | sigB.v0 ) goto propagateNaN;
+ uiZ.v64 = packToF128UI64( signZ ^ 1, 0x7FFF, 0 );
+ uiZ.v0 = 0;
+ goto uiZ;
+ }
+ if ( expA ) {
+ sigA.v64 |= UINT64_C( 0x0010000000000000 );
+ } else {
+ ++expDiff;
+ if ( ! expDiff ) goto newlyAlignedBBigger;
+ }
+ sigA = softfloat_shiftRightJam128( sigA.v64, sigA.v0, -expDiff );
+ newlyAlignedBBigger:
+ expZ = expB;
+ sigB.v64 |= UINT64_C( 0x0010000000000000 );
+ bBigger:
+ signZ = ! signZ;
+ sigZ = softfloat_sub128( sigB.v64, sigB.v0, sigA.v64, sigA.v0 );
+ goto normRoundPack;
+ expABigger:
+ if ( expA == 0x7FFF ) {
+ if ( sigA.v64 | sigA.v0 ) goto propagateNaN;
+ uiZ.v64 = uiA64;
+ uiZ.v0 = uiA0;
+ goto uiZ;
+ }
+ if ( expB ) {
+ sigB.v64 |= UINT64_C( 0x0010000000000000 );
+ } else {
+ --expDiff;
+ if ( ! expDiff ) goto newlyAlignedABigger;
+ }
+ sigB = softfloat_shiftRightJam128( sigB.v64, sigB.v0, expDiff );
+ newlyAlignedABigger:
+ expZ = expA;
+ sigA.v64 |= UINT64_C( 0x0010000000000000 );
+ aBigger:
+ sigZ = softfloat_sub128( sigA.v64, sigA.v0, sigB.v64, sigB.v0 );
+ normRoundPack:
+ return softfloat_normRoundPackToF128( signZ, expZ - 5, sigZ.v64, sigZ.v0 SOFTFLOAT_STATE_ARG_COMMA );
+ propagateNaN:
+ uiZ = softfloat_propagateNaNF128UI( uiA64, uiA0, uiB64, uiB0 SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_subMagsF16.c b/src/libs/softfloat-3e/source/s_subMagsF16.c
new file mode 100644
index 00000000..3a21efec
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_subMagsF16.c
@@ -0,0 +1,187 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float16_t softfloat_subMagsF16( uint_fast16_t uiA, uint_fast16_t uiB SOFTFLOAT_STATE_DECL_COMMA )
+{
+ int_fast8_t expA;
+ uint_fast16_t sigA;
+ int_fast8_t expB;
+ uint_fast16_t sigB;
+ int_fast8_t expDiff;
+ uint_fast16_t uiZ;
+ int_fast16_t sigDiff;
+ bool signZ;
+ int_fast8_t shiftDist, expZ;
+ uint_fast16_t sigZ, sigX, sigY;
+ uint_fast32_t sig32Z;
+ int_fast8_t roundingMode;
+ union ui16_f16 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expA = expF16UI( uiA );
+ sigA = fracF16UI( uiA );
+ expB = expF16UI( uiB );
+ sigB = fracF16UI( uiB );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expDiff = expA - expB;
+ if ( ! expDiff ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( expA == 0x1F ) {
+ if ( sigA | sigB ) goto propagateNaN;
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = defaultNaNF16UI;
+ goto uiZ;
+ }
+ sigDiff = sigA - sigB;
+ if ( ! sigDiff ) {
+ uiZ =
+ packToF16UI(
+ (softfloat_roundingMode == softfloat_round_min), 0, 0 );
+ goto uiZ;
+ }
+ if ( expA ) --expA;
+ signZ = signF16UI( uiA );
+ if ( sigDiff < 0 ) {
+ signZ = ! signZ;
+ sigDiff = -sigDiff;
+ }
+ shiftDist = softfloat_countLeadingZeros16( sigDiff ) - 5;
+ expZ = expA - shiftDist;
+ if ( expZ < 0 ) {
+ shiftDist = expA;
+ expZ = 0;
+ }
+ sigZ = sigDiff<<shiftDist;
+ goto pack;
+ } else {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ signZ = signF16UI( uiA );
+ if ( expDiff < 0 ) {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ signZ = ! signZ;
+ if ( expB == 0x1F ) {
+ if ( sigB ) goto propagateNaN;
+ uiZ = packToF16UI( signZ, 0x1F, 0 );
+ goto uiZ;
+ }
+ if ( expDiff <= -13 ) {
+ uiZ = packToF16UI( signZ, expB, sigB );
+ if ( expA | sigA ) goto subEpsilon;
+ goto uiZ;
+ }
+ expZ = expA + 19;
+ sigX = sigB | 0x0400;
+ sigY = sigA + (expA ? 0x0400 : sigA);
+ expDiff = -expDiff;
+ } else {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ uiZ = uiA;
+ if ( expA == 0x1F ) {
+ if ( sigA ) goto propagateNaN;
+ goto uiZ;
+ }
+ if ( 13 <= expDiff ) {
+ if ( expB | sigB ) goto subEpsilon;
+ goto uiZ;
+ }
+ expZ = expB + 19;
+ sigX = sigA | 0x0400;
+ sigY = sigB + (expB ? 0x0400 : sigB);
+ }
+ sig32Z = ((uint_fast32_t) sigX<<expDiff) - sigY;
+ shiftDist = softfloat_countLeadingZeros32( sig32Z ) - 1;
+ sig32Z <<= shiftDist;
+ expZ -= shiftDist;
+ sigZ = sig32Z>>16;
+ if ( sig32Z & 0xFFFF ) {
+ sigZ |= 1;
+ } else {
+ if ( ! (sigZ & 0xF) && ((unsigned int) expZ < 0x1E) ) {
+ sigZ >>= 4;
+ goto pack;
+ }
+ }
+ return softfloat_roundPackToF16( signZ, expZ, sigZ SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN:
+ uiZ = softfloat_propagateNaNF16UI( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ subEpsilon:
+ roundingMode = softfloat_roundingMode;
+ if ( roundingMode != softfloat_round_near_even ) {
+ if (
+ (roundingMode == softfloat_round_minMag)
+ || (roundingMode
+ == (signF16UI( uiZ ) ? softfloat_round_max
+ : softfloat_round_min))
+ ) {
+ --uiZ;
+ }
+#ifdef SOFTFLOAT_ROUND_ODD
+ else if ( roundingMode == softfloat_round_odd ) {
+ uiZ = (uiZ - 1) | 1;
+ }
+#endif
+ }
+ softfloat_exceptionFlags |= softfloat_flag_inexact;
+ goto uiZ;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ pack:
+ uiZ = packToF16UI( signZ, expZ, sigZ );
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_subMagsF32.c b/src/libs/softfloat-3e/source/s_subMagsF32.c
new file mode 100644
index 00000000..fc8eb0c7
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_subMagsF32.c
@@ -0,0 +1,143 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float32_t softfloat_subMagsF32( uint_fast32_t uiA, uint_fast32_t uiB SOFTFLOAT_STATE_DECL_COMMA )
+{
+ int_fast16_t expA;
+ uint_fast32_t sigA;
+ int_fast16_t expB;
+ uint_fast32_t sigB;
+ int_fast16_t expDiff;
+ uint_fast32_t uiZ;
+ int_fast32_t sigDiff;
+ bool signZ;
+ int_fast8_t shiftDist;
+ int_fast16_t expZ;
+ uint_fast32_t sigX, sigY;
+ union ui32_f32 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expA = expF32UI( uiA );
+ sigA = fracF32UI( uiA );
+ expB = expF32UI( uiB );
+ sigB = fracF32UI( uiB );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expDiff = expA - expB;
+ if ( ! expDiff ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( expA == 0xFF ) {
+ if ( sigA | sigB ) goto propagateNaN;
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = defaultNaNF32UI;
+ goto uiZ;
+ }
+ sigDiff = sigA - sigB;
+ if ( ! sigDiff ) {
+ uiZ =
+ packToF32UI(
+ (softfloat_roundingMode == softfloat_round_min), 0, 0 );
+ goto uiZ;
+ }
+ if ( expA ) --expA;
+ signZ = signF32UI( uiA );
+ if ( sigDiff < 0 ) {
+ signZ = ! signZ;
+ sigDiff = -sigDiff;
+ }
+ shiftDist = softfloat_countLeadingZeros32( sigDiff ) - 8;
+ expZ = expA - shiftDist;
+ if ( expZ < 0 ) {
+ shiftDist = expA;
+ expZ = 0;
+ }
+ uiZ = packToF32UI( signZ, expZ, sigDiff<<shiftDist );
+ goto uiZ;
+ } else {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ signZ = signF32UI( uiA );
+ sigA <<= 7;
+ sigB <<= 7;
+ if ( expDiff < 0 ) {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ signZ = ! signZ;
+ if ( expB == 0xFF ) {
+ if ( sigB ) goto propagateNaN;
+ uiZ = packToF32UI( signZ, 0xFF, 0 );
+ goto uiZ;
+ }
+ expZ = expB - 1;
+ sigX = sigB | 0x40000000;
+ sigY = sigA + (expA ? 0x40000000 : sigA);
+ expDiff = -expDiff;
+ } else {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ if ( expA == 0xFF ) {
+ if ( sigA ) goto propagateNaN;
+ uiZ = uiA;
+ goto uiZ;
+ }
+ expZ = expA - 1;
+ sigX = sigA | 0x40000000;
+ sigY = sigB + (expB ? 0x40000000 : sigB);
+ }
+ return
+ softfloat_normRoundPackToF32(
+ signZ, expZ, sigX - softfloat_shiftRightJam32( sigY, expDiff ) SOFTFLOAT_STATE_ARG_COMMA
+ );
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN:
+ uiZ = softfloat_propagateNaNF32UI( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_subMagsF64.c b/src/libs/softfloat-3e/source/s_subMagsF64.c
new file mode 100644
index 00000000..172ace00
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_subMagsF64.c
@@ -0,0 +1,141 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float64_t
+ softfloat_subMagsF64( uint_fast64_t uiA, uint_fast64_t uiB, bool signZ SOFTFLOAT_STATE_DECL_COMMA )
+{
+ int_fast16_t expA;
+ uint_fast64_t sigA;
+ int_fast16_t expB;
+ uint_fast64_t sigB;
+ int_fast16_t expDiff;
+ uint_fast64_t uiZ;
+ int_fast64_t sigDiff;
+ int_fast8_t shiftDist;
+ int_fast16_t expZ;
+ uint_fast64_t sigZ;
+ union ui64_f64 uZ;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expA = expF64UI( uiA );
+ sigA = fracF64UI( uiA );
+ expB = expF64UI( uiB );
+ sigB = fracF64UI( uiB );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ expDiff = expA - expB;
+ if ( ! expDiff ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ if ( expA == 0x7FF ) {
+ if ( sigA | sigB ) goto propagateNaN;
+ softfloat_raiseFlags( softfloat_flag_invalid SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ = defaultNaNF64UI;
+ goto uiZ;
+ }
+ sigDiff = sigA - sigB;
+ if ( ! sigDiff ) {
+ uiZ =
+ packToF64UI(
+ (softfloat_roundingMode == softfloat_round_min), 0, 0 );
+ goto uiZ;
+ }
+ if ( expA ) --expA;
+ if ( sigDiff < 0 ) {
+ signZ = ! signZ;
+ sigDiff = -sigDiff;
+ }
+ shiftDist = softfloat_countLeadingZeros64( sigDiff ) - 11;
+ expZ = expA - shiftDist;
+ if ( expZ < 0 ) {
+ shiftDist = expA;
+ expZ = 0;
+ }
+ uiZ = packToF64UI( signZ, expZ, sigDiff<<shiftDist );
+ goto uiZ;
+ } else {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ sigA <<= 10;
+ sigB <<= 10;
+ if ( expDiff < 0 ) {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ signZ = ! signZ;
+ if ( expB == 0x7FF ) {
+ if ( sigB ) goto propagateNaN;
+ uiZ = packToF64UI( signZ, 0x7FF, 0 );
+ goto uiZ;
+ }
+ sigA += expA ? UINT64_C( 0x4000000000000000 ) : sigA;
+ sigA = softfloat_shiftRightJam64( sigA, -expDiff );
+ sigB |= UINT64_C( 0x4000000000000000 );
+ expZ = expB;
+ sigZ = sigB - sigA;
+ } else {
+ /*----------------------------------------------------------------
+ *----------------------------------------------------------------*/
+ if ( expA == 0x7FF ) {
+ if ( sigA ) goto propagateNaN;
+ uiZ = uiA;
+ goto uiZ;
+ }
+ sigB += expB ? UINT64_C( 0x4000000000000000 ) : sigB;
+ sigB = softfloat_shiftRightJam64( sigB, expDiff );
+ sigA |= UINT64_C( 0x4000000000000000 );
+ expZ = expA;
+ sigZ = sigA - sigB;
+ }
+ return softfloat_normRoundPackToF64( signZ, expZ - 1, sigZ SOFTFLOAT_STATE_ARG_COMMA );
+ }
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ propagateNaN:
+ uiZ = softfloat_propagateNaNF64UI( uiA, uiB SOFTFLOAT_STATE_ARG_COMMA );
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_tryPropagateNaNExtF80M.c b/src/libs/softfloat-3e/source/s_tryPropagateNaNExtF80M.c
new file mode 100644
index 00000000..6a3fb2f5
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_tryPropagateNaNExtF80M.c
@@ -0,0 +1,65 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+
+bool
+ softfloat_tryPropagateNaNExtF80M(
+ const struct extFloat80M *aSPtr,
+ const struct extFloat80M *bSPtr,
+ struct extFloat80M *zSPtr
+ SOFTFLOAT_STATE_DECL_COMMA
+ )
+{
+ uint_fast16_t ui64;
+ uint64_t ui0;
+
+ ui64 = aSPtr->signExp;
+ ui0 = aSPtr->signif;
+ if ( isNaNExtF80UI( ui64, ui0 ) ) goto propagateNaN;
+ ui64 = bSPtr->signExp;
+ ui0 = bSPtr->signif;
+ if ( isNaNExtF80UI( ui64, ui0 ) ) goto propagateNaN;
+ return false;
+ propagateNaN:
+ softfloat_propagateNaNExtF80M( aSPtr, bSPtr, zSPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return true;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/s_tryPropagateNaNF128M.c b/src/libs/softfloat-3e/source/s_tryPropagateNaNF128M.c
new file mode 100644
index 00000000..801e771a
--- /dev/null
+++ b/src/libs/softfloat-3e/source/s_tryPropagateNaNF128M.c
@@ -0,0 +1,55 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+
+bool
+ softfloat_tryPropagateNaNF128M(
+ const uint32_t *aWPtr, const uint32_t *bWPtr, uint32_t *zWPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ if ( softfloat_isNaNF128M( aWPtr ) || softfloat_isNaNF128M( bWPtr ) ) {
+ softfloat_propagateNaNF128M( aWPtr, bWPtr, zWPtr SOFTFLOAT_STATE_ARG_COMMA );
+ return true;
+ }
+ return false;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/softfloat_state.c b/src/libs/softfloat-3e/source/softfloat_state.c
new file mode 100644
index 00000000..1d72ca61
--- /dev/null
+++ b/src/libs/softfloat-3e/source/softfloat_state.c
@@ -0,0 +1,53 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All Rights Reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+#ifndef THREAD_LOCAL
+#define THREAD_LOCAL
+#endif
+
+#ifndef VBOX_WITHOUT_SOFTFLOAT_GLOBALS
+THREAD_LOCAL uint_fast8_t softfloat_roundingMode = softfloat_round_near_even;
+THREAD_LOCAL uint_fast8_t softfloat_detectTininess = init_detectTininess;
+THREAD_LOCAL uint_fast8_t softfloat_exceptionFlags = 0;
+
+THREAD_LOCAL uint_fast8_t extF80_roundingPrecision = 80;
+#endif
diff --git a/src/libs/softfloat-3e/source/ui32_to_extF80.c b/src/libs/softfloat-3e/source/ui32_to_extF80.c
new file mode 100644
index 00000000..6dd5b7df
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ui32_to_extF80.c
@@ -0,0 +1,60 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All Rights Reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+extFloat80_t ui32_to_extF80( uint32_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ uint_fast16_t uiZ64;
+ int_fast8_t shiftDist;
+ union { struct extFloat80M s; extFloat80_t f; } uZ;
+ SOFTFLOAT_STATE_NOREF();
+
+ uiZ64 = 0;
+ if ( a ) {
+ shiftDist = softfloat_countLeadingZeros32( a );
+ uiZ64 = 0x401E - shiftDist;
+ a <<= shiftDist;
+ }
+ uZ.s.signExp = uiZ64;
+ uZ.s.signif = (uint_fast64_t) a<<32;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ui32_to_extF80M.c b/src/libs/softfloat-3e/source/ui32_to_extF80M.c
new file mode 100644
index 00000000..9670760f
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ui32_to_extF80M.c
@@ -0,0 +1,75 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All Rights Reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void ui32_to_extF80M( uint32_t a, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ *zPtr = ui32_to_extF80( a SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void ui32_to_extF80M( uint32_t a, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ struct extFloat80M *zSPtr;
+ uint_fast16_t uiZ64;
+ uint64_t sigZ;
+ int_fast8_t shiftDist;
+ SOFTFLOAT_STATE_NOREF();
+
+ zSPtr = (struct extFloat80M *) zPtr;
+ uiZ64 = 0;
+ sigZ = 0;
+ if ( a ) {
+ shiftDist = softfloat_countLeadingZeros32( a );
+ uiZ64 = packToExtF80UI64( 0, 0x401E - shiftDist );
+ sigZ = (uint64_t) (a<<shiftDist)<<32;
+ }
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = sigZ;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/ui32_to_f128.c b/src/libs/softfloat-3e/source/ui32_to_f128.c
new file mode 100644
index 00000000..a3dbe326
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ui32_to_f128.c
@@ -0,0 +1,61 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All Rights Reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float128_t ui32_to_f128( uint32_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ uint_fast64_t uiZ64;
+ int_fast8_t shiftDist;
+ union ui128_f128 uZ;
+ SOFTFLOAT_STATE_NOREF();
+
+ uiZ64 = 0;
+ if ( a ) {
+ shiftDist = softfloat_countLeadingZeros32( a ) + 17;
+ uiZ64 =
+ packToF128UI64(
+ 0, 0x402E - shiftDist, (uint_fast64_t) a<<shiftDist );
+ }
+ uZ.ui.v64 = uiZ64;
+ uZ.ui.v0 = 0;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ui32_to_f128M.c b/src/libs/softfloat-3e/source/ui32_to_f128M.c
new file mode 100644
index 00000000..ff3368d9
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ui32_to_f128M.c
@@ -0,0 +1,77 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All Rights Reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void ui32_to_f128M( uint32_t a, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ *zPtr = ui32_to_f128( a SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void ui32_to_f128M( uint32_t a, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ uint32_t *zWPtr, uiZ96, uiZ64;
+ int_fast8_t shiftDist;
+ uint64_t normA;
+ SOFTFLOAT_STATE_NOREF();
+
+ zWPtr = (uint32_t *) zPtr;
+ uiZ96 = 0;
+ uiZ64 = 0;
+ if ( a ) {
+ shiftDist = softfloat_countLeadingZeros32( a ) + 17;
+ normA = (uint64_t) a<<shiftDist;
+ uiZ96 = packToF128UI96( 0, 0x402E - shiftDist, normA>>32 );
+ uiZ64 = normA;
+ }
+ zWPtr[indexWord( 4, 3 )] = uiZ96;
+ zWPtr[indexWord( 4, 2 )] = uiZ64;
+ zWPtr[indexWord( 4, 1 )] = 0;
+ zWPtr[indexWord( 4, 0 )] = 0;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/ui32_to_f16.c b/src/libs/softfloat-3e/source/ui32_to_f16.c
new file mode 100644
index 00000000..6aa69f61
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ui32_to_f16.c
@@ -0,0 +1,65 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All Rights Reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float16_t ui32_to_f16( uint32_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ int_fast8_t shiftDist;
+ union ui16_f16 u;
+ uint_fast16_t sig;
+
+ shiftDist = softfloat_countLeadingZeros32( a ) - 21;
+ if ( 0 <= shiftDist ) {
+ u.ui =
+ a ? packToF16UI(
+ 0, 0x18 - shiftDist, (uint_fast16_t) a<<shiftDist )
+ : 0;
+ return u.f;
+ } else {
+ shiftDist += 4;
+ sig =
+ (shiftDist < 0)
+ ? a>>(-shiftDist) | ((uint32_t) (a<<(shiftDist & 31)) != 0)
+ : (uint_fast16_t) a<<shiftDist;
+ return softfloat_roundPackToF16( 0, 0x1C - shiftDist, sig SOFTFLOAT_STATE_ARG_COMMA );
+ }
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ui32_to_f32.c b/src/libs/softfloat-3e/source/ui32_to_f32.c
new file mode 100644
index 00000000..d92a2cdf
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ui32_to_f32.c
@@ -0,0 +1,57 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All Rights Reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float32_t ui32_to_f32( uint32_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui32_f32 uZ;
+
+ if ( ! a ) {
+ uZ.ui = 0;
+ return uZ.f;
+ }
+ if ( a & 0x80000000 ) {
+ return softfloat_roundPackToF32( 0, 0x9D, a>>1 | (a & 1) SOFTFLOAT_STATE_ARG_COMMA );
+ } else {
+ return softfloat_normRoundPackToF32( 0, 0x9C, a SOFTFLOAT_STATE_ARG_COMMA );
+ }
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ui32_to_f64.c b/src/libs/softfloat-3e/source/ui32_to_f64.c
new file mode 100644
index 00000000..463ccb05
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ui32_to_f64.c
@@ -0,0 +1,60 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All Rights Reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float64_t ui32_to_f64( uint32_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ uint_fast64_t uiZ;
+ int_fast8_t shiftDist;
+ union ui64_f64 uZ;
+ SOFTFLOAT_STATE_NOREF();
+
+ if ( ! a ) {
+ uiZ = 0;
+ } else {
+ shiftDist = softfloat_countLeadingZeros32( a ) + 21;
+ uiZ =
+ packToF64UI( 0, 0x432 - shiftDist, (uint_fast64_t) a<<shiftDist );
+ }
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ui64_to_extF80.c b/src/libs/softfloat-3e/source/ui64_to_extF80.c
new file mode 100644
index 00000000..e6479d78
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ui64_to_extF80.c
@@ -0,0 +1,60 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All Rights Reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+extFloat80_t ui64_to_extF80( uint64_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ uint_fast16_t uiZ64;
+ int_fast8_t shiftDist;
+ union { struct extFloat80M s; extFloat80_t f; } uZ;
+ SOFTFLOAT_STATE_NOREF();
+
+ uiZ64 = 0;
+ if ( a ) {
+ shiftDist = softfloat_countLeadingZeros64( a );
+ uiZ64 = 0x403E - shiftDist;
+ a <<= shiftDist;
+ }
+ uZ.s.signExp = uiZ64;
+ uZ.s.signif = a;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ui64_to_extF80M.c b/src/libs/softfloat-3e/source/ui64_to_extF80M.c
new file mode 100644
index 00000000..07478677
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ui64_to_extF80M.c
@@ -0,0 +1,75 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All Rights Reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void ui64_to_extF80M( uint64_t a, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ *zPtr = ui64_to_extF80( a SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void ui64_to_extF80M( uint64_t a, extFloat80_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ struct extFloat80M *zSPtr;
+ uint_fast16_t uiZ64;
+ uint64_t sigZ;
+ int_fast8_t shiftDist;
+ SOFTFLOAT_STATE_NOREF();
+
+ zSPtr = (struct extFloat80M *) zPtr;
+ uiZ64 = 0;
+ sigZ = 0;
+ if ( a ) {
+ shiftDist = softfloat_countLeadingZeros64( a );
+ uiZ64 = packToExtF80UI64( 0, 0x403E - shiftDist );
+ sigZ = a<<shiftDist;
+ }
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = sigZ;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/ui64_to_f128.c b/src/libs/softfloat-3e/source/ui64_to_f128.c
new file mode 100644
index 00000000..79d3654b
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ui64_to_f128.c
@@ -0,0 +1,69 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All Rights Reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float128_t ui64_to_f128( uint64_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ uint_fast64_t uiZ64, uiZ0;
+ int_fast8_t shiftDist;
+ struct uint128 zSig;
+ union ui128_f128 uZ;
+ SOFTFLOAT_STATE_NOREF();
+
+ if ( ! a ) {
+ uiZ64 = 0;
+ uiZ0 = 0;
+ } else {
+ shiftDist = softfloat_countLeadingZeros64( a ) + 49;
+ if ( 64 <= shiftDist ) {
+ zSig.v64 = a<<(shiftDist - 64);
+ zSig.v0 = 0;
+ } else {
+ zSig = softfloat_shortShiftLeft128( 0, a, shiftDist );
+ }
+ uiZ64 = packToF128UI64( 0, 0x406E - shiftDist, zSig.v64 );
+ uiZ0 = zSig.v0;
+ }
+ uZ.ui.v64 = uiZ64;
+ uZ.ui.v0 = uiZ0;
+ return uZ.f;
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ui64_to_f128M.c b/src/libs/softfloat-3e/source/ui64_to_f128M.c
new file mode 100644
index 00000000..9afac5fb
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ui64_to_f128M.c
@@ -0,0 +1,87 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All Rights Reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+#ifdef SOFTFLOAT_FAST_INT64
+
+void ui64_to_f128M( uint64_t a, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+
+ *zPtr = ui64_to_f128( a SOFTFLOAT_STATE_ARG_COMMA );
+
+}
+
+#else
+
+void ui64_to_f128M( uint64_t a, float128_t *zPtr SOFTFLOAT_STATE_DECL_COMMA )
+{
+ uint32_t *zWPtr, uiZ96, uiZ64;
+ uint_fast8_t shiftDist;
+ uint32_t *ptr;
+ SOFTFLOAT_STATE_NOREF();
+
+ zWPtr = (uint32_t *) zPtr;
+ uiZ96 = 0;
+ uiZ64 = 0;
+ zWPtr[indexWord( 4, 1 )] = 0;
+ zWPtr[indexWord( 4, 0 )] = 0;
+ if ( a ) {
+ shiftDist = softfloat_countLeadingZeros64( a ) + 17;
+ if ( shiftDist < 32 ) {
+ ptr = zWPtr + indexMultiwordHi( 4, 3 );
+ ptr[indexWord( 3, 2 )] = 0;
+ ptr[indexWord( 3, 1 )] = a>>32;
+ ptr[indexWord( 3, 0 )] = a;
+ softfloat_shortShiftLeft96M( ptr, shiftDist, ptr );
+ ptr[indexWordHi( 3 )] =
+ packToF128UI96( 0, 0x404E - shiftDist, ptr[indexWordHi( 3 )] );
+ return;
+ }
+ a <<= shiftDist - 32;
+ uiZ96 = packToF128UI96( 0, 0x404E - shiftDist, a>>32 );
+ uiZ64 = a;
+ }
+ zWPtr[indexWord( 4, 3 )] = uiZ96;
+ zWPtr[indexWord( 4, 2 )] = uiZ64;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/source/ui64_to_f16.c b/src/libs/softfloat-3e/source/ui64_to_f16.c
new file mode 100644
index 00000000..9c0849e0
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ui64_to_f16.c
@@ -0,0 +1,64 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All Rights Reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float16_t ui64_to_f16( uint64_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ int_fast8_t shiftDist;
+ union ui16_f16 u;
+ uint_fast16_t sig;
+
+ shiftDist = softfloat_countLeadingZeros64( a ) - 53;
+ if ( 0 <= shiftDist ) {
+ u.ui =
+ a ? packToF16UI(
+ 0, 0x18 - shiftDist, (uint_fast16_t) a<<shiftDist )
+ : 0;
+ return u.f;
+ } else {
+ shiftDist += 4;
+ sig =
+ (shiftDist < 0) ? softfloat_shortShiftRightJam64( a, -shiftDist )
+ : (uint_fast16_t) a<<shiftDist;
+ return softfloat_roundPackToF16( 0, 0x1C - shiftDist, sig SOFTFLOAT_STATE_ARG_COMMA );
+ }
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ui64_to_f32.c b/src/libs/softfloat-3e/source/ui64_to_f32.c
new file mode 100644
index 00000000..d3f76df0
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ui64_to_f32.c
@@ -0,0 +1,64 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All Rights Reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float32_t ui64_to_f32( uint64_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ int_fast8_t shiftDist;
+ union ui32_f32 u;
+ uint_fast32_t sig;
+
+ shiftDist = softfloat_countLeadingZeros64( a ) - 40;
+ if ( 0 <= shiftDist ) {
+ u.ui =
+ a ? packToF32UI(
+ 0, 0x95 - shiftDist, (uint_fast32_t) a<<shiftDist )
+ : 0;
+ return u.f;
+ } else {
+ shiftDist += 7;
+ sig =
+ (shiftDist < 0) ? softfloat_shortShiftRightJam64( a, -shiftDist )
+ : (uint_fast32_t) a<<shiftDist;
+ return softfloat_roundPackToF32( 0, 0x9C - shiftDist, sig SOFTFLOAT_STATE_ARG_COMMA );
+ }
+
+}
+
diff --git a/src/libs/softfloat-3e/source/ui64_to_f64.c b/src/libs/softfloat-3e/source/ui64_to_f64.c
new file mode 100644
index 00000000..4d003e77
--- /dev/null
+++ b/src/libs/softfloat-3e/source/ui64_to_f64.c
@@ -0,0 +1,59 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All Rights Reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float64_t ui64_to_f64( uint64_t a SOFTFLOAT_STATE_DECL_COMMA )
+{
+ union ui64_f64 uZ;
+
+ if ( ! a ) {
+ uZ.ui = 0;
+ return uZ.f;
+ }
+ if ( a & UINT64_C( 0x8000000000000000 ) ) {
+ return
+ softfloat_roundPackToF64(
+ 0, 0x43D, softfloat_shortShiftRightJam64( a, 1 ) SOFTFLOAT_STATE_ARG_COMMA );
+ } else {
+ return softfloat_normRoundPackToF64( 0, 0x43C, a SOFTFLOAT_STATE_ARG_COMMA );
+ }
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/COPYING.txt b/src/libs/softfloat-3e/testfloat/COPYING.txt
new file mode 100644
index 00000000..196f34d8
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/COPYING.txt
@@ -0,0 +1,37 @@
+
+License for Berkeley TestFloat Release 3e
+
+John R. Hauser
+2018 January 20
+
+The following applies to the whole of TestFloat Release 3e as well as to
+each source file individually.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions, and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
diff --git a/src/libs/softfloat-3e/testfloat/Makefile.kmk b/src/libs/softfloat-3e/testfloat/Makefile.kmk
new file mode 100644
index 00000000..c1282be0
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/Makefile.kmk
@@ -0,0 +1,271 @@
+# $Id: Makefile.kmk $
+## @file
+# Sub-Makefile for TestFloat-3e.
+#
+
+#
+# Copyright (C) 2022 Oracle and/or its affiliates.
+#
+# This file is part of VirtualBox base platform packages, as
+# available from https://www.virtualbox.org.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation, in version 3 of the
+# License.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses>.
+#
+# SPDX-License-Identifier: GPL-3.0-only
+#
+
+SUB_DEPTH = ../../../..
+include $(KBUILD_PATH)/subheader.kmk
+
+#
+# Basis template for building test stuff.
+#
+TEMPLATE_VBoxTestFloat = Template for building SoftFloat-3e
+TEMPLATE_VBoxTestFloat_EXTENDS = VBoxR3DllNonPedantic
+TEMPLATE_VBoxTestFloat_SDKS = $(TEMPLATE_VBoxR3DllNonPedantic_SDKS) VBOX_SOFTFLOAT
+TEMPLATE_VBoxTestFloat_DEFS = $(TEMPLATE_VBoxR3DllNonPedantic_DEFS) \
+ FLOAT16 \
+ FLOAT64 \
+ EXTFLOAT80 \
+ FLOAT128 \
+ FLOAT_ROUND_ODD
+ifn1of ($(KBUILD_TARGET), win)
+TEMPLATE_VBoxTestFloat_DEFS.amd64 = $(TEMPLATE_VBoxR3DllNonPedantic_DEFS.amd64) LONG_DOUBLE_IS_EXTFLOAT80
+endif
+if1of ($(KBUILD_TARGET), win)
+ TEMPLATE_VBoxTestFloat_INCS.amd64 = ../build/Win-amd64-VCC $(TEMPLATE_VBoxR3DllNonPedantic_INCS.amd64)
+else
+ TEMPLATE_VBoxTestFloat_INCS.amd64 = build/Linux-x86_64-GCC $(TEMPLATE_VBoxR3DllNonPedantic_INCS.amd64)
+endif
+TEMPLATE_VBoxTestFloat_INCS = $(TEMPLATE_VBoxR3DllNonPedantic_INCS) \
+ source/subj-C \
+ source
+
+# -wd4068: test_a_ui32_z_f16.c(48): warning C4068: unknown pragma 'STDC'
+# -wd4146: primitives.h(74): warning C4146: unary minus operator applied to unsigned type, result still unsigned
+# -wd4715: genCases_f16.c(336) : warning C4715: 'f16Random': not all control paths return a value
+TEMPLATE_VBoxTestFloat_CFLAGS.win = $(TEMPLATE_VBoxR3DllNonPedantic_CFLAGS) -wd4068 -wd4146 -wd4715
+
+#
+# For linking test executables.
+#
+TEMPLATE_VBoxTestFloatExe = Template for building SoftFloat-3e programs.
+TEMPLATE_VBoxTestFloatExe_EXTENDS = VBoxTestFloat
+TEMPLATE_VBoxTestFloatExe_INST = $(INST_TESTCASE)
+TEMPLATE_VBoxTestFloatExe_LIBS = \
+ $(VBox-TestFloat_1_TARGET) \
+ $(TEMPLATE_VBoxTestFloat_LIBS)
+
+# -wd4098: testfloat.c(438): warning C4098: 'subjFunction_az_extF80_rx': 'void' function returning a value
+# -wd4102: testfloat.c(767): warning C4102: 'test_abz_f16': unreferenced label
+# -wd4701: testfloat.c(1410) : warning C4701: potentially uninitialized local variable 'roundingMode' used
+TEMPLATE_VBoxTestFloatExe_CFLAGS.win = $(TEMPLATE_VBoxTestFloat_CFLAGS.win) -wd4098 -wd4102 -wd4701
+
+
+#
+# Library.
+#
+LIBRARIES += VBox-TestFloat
+VBox-TestFloat_TEMPLATE := VBoxTestFloat
+VBox-TestFloat_INSTTYPE := none
+VBox-TestFloat_SOURCES := \
+ source/uint128_inline.c \
+ source/uint128.c \
+ source/fail.c \
+ source/functions_common.c \
+ source/functionInfos.c \
+ source/standardFunctionInfos.c \
+ source/random.c \
+ source/genCases_common.c \
+ source/genCases_writeTestsTotal.c \
+ source/verCases_inline.c \
+ source/verCases_common.c \
+ source/verCases_writeFunctionName.c \
+ source/readHex.c \
+ source/writeHex.c \
+ source/writeCase_a_ui32.c \
+ source/writeCase_a_ui64.c \
+ source/writeCase_a_f16.c \
+ source/writeCase_ab_f16.c \
+ source/writeCase_abc_f16.c \
+ source/writeCase_a_f32.c \
+ source/writeCase_ab_f32.c \
+ source/writeCase_abc_f32.c \
+ source/writeCase_a_f64.c \
+ source/writeCase_ab_f64.c \
+ source/writeCase_abc_f64.c \
+ source/writeCase_a_extF80M.c \
+ source/writeCase_ab_extF80M.c \
+ source/writeCase_a_f128M.c \
+ source/writeCase_ab_f128M.c \
+ source/writeCase_abc_f128M.c \
+ source/writeCase_z_bool.c \
+ source/writeCase_z_ui32.c \
+ source/writeCase_z_ui64.c \
+ source/writeCase_z_f16.c \
+ source/writeCase_z_f32.c \
+ source/writeCase_z_f64.c \
+ source/writeCase_z_extF80M.c \
+ source/writeCase_z_f128M.c \
+ source/testLoops_common.c \
+ \
+ source/test_a_ui32_z_f16.c \
+ source/test_a_ui32_z_f32.c \
+ source/test_a_ui32_z_f64.c \
+ source/test_a_ui32_z_extF80.c \
+ source/test_a_ui32_z_f128.c \
+ source/test_a_ui64_z_f16.c \
+ source/test_a_ui64_z_f32.c \
+ source/test_a_ui64_z_f64.c \
+ source/test_a_ui64_z_extF80.c \
+ source/test_a_ui64_z_f128.c \
+ source/test_a_i32_z_f16.c \
+ source/test_a_i32_z_f32.c \
+ source/test_a_i32_z_f64.c \
+ source/test_a_i32_z_extF80.c \
+ source/test_a_i32_z_f128.c \
+ source/test_a_i64_z_f16.c \
+ source/test_a_i64_z_f32.c \
+ source/test_a_i64_z_f64.c \
+ source/test_a_i64_z_extF80.c \
+ source/test_a_i64_z_f128.c \
+ source/test_a_f16_z_ui32_rx.c \
+ source/test_a_f16_z_ui64_rx.c \
+ source/test_a_f16_z_i32_rx.c \
+ source/test_a_f16_z_i64_rx.c \
+ source/test_a_f16_z_ui32_x.c \
+ source/test_a_f16_z_ui64_x.c \
+ source/test_a_f16_z_i32_x.c \
+ source/test_a_f16_z_i64_x.c \
+ source/test_a_f16_z_f32.c \
+ source/test_a_f16_z_f64.c \
+ source/test_a_f16_z_extF80.c \
+ source/test_a_f16_z_f128.c \
+ source/test_az_f16.c \
+ source/test_az_f16_rx.c \
+ source/test_abz_f16.c \
+ source/test_abcz_f16.c \
+ source/test_ab_f16_z_bool.c \
+ source/test_a_f32_z_ui32_rx.c \
+ source/test_a_f32_z_ui64_rx.c \
+ source/test_a_f32_z_i32_rx.c \
+ source/test_a_f32_z_i64_rx.c \
+ source/test_a_f32_z_ui32_x.c \
+ source/test_a_f32_z_ui64_x.c \
+ source/test_a_f32_z_i32_x.c \
+ source/test_a_f32_z_i64_x.c \
+ source/test_a_f32_z_f16.c \
+ source/test_a_f32_z_f64.c \
+ source/test_a_f32_z_extF80.c \
+ source/test_a_f32_z_f128.c \
+ source/test_az_f32.c \
+ source/test_az_f32_rx.c \
+ source/test_abz_f32.c \
+ source/test_abcz_f32.c \
+ source/test_ab_f32_z_bool.c \
+ source/test_a_f64_z_ui32_rx.c \
+ source/test_a_f64_z_ui64_rx.c \
+ source/test_a_f64_z_i32_rx.c \
+ source/test_a_f64_z_i64_rx.c \
+ source/test_a_f64_z_ui32_x.c \
+ source/test_a_f64_z_ui64_x.c \
+ source/test_a_f64_z_i32_x.c \
+ source/test_a_f64_z_i64_x.c \
+ source/test_a_f64_z_f16.c \
+ source/test_a_f64_z_f32.c \
+ source/test_a_f64_z_extF80.c \
+ source/test_a_f64_z_f128.c \
+ source/test_az_f64.c \
+ source/test_az_f64_rx.c \
+ source/test_abz_f64.c \
+ source/test_abcz_f64.c \
+ source/test_ab_f64_z_bool.c \
+ source/test_a_extF80_z_ui32_rx.c \
+ source/test_a_extF80_z_ui64_rx.c \
+ source/test_a_extF80_z_i32_rx.c \
+ source/test_a_extF80_z_i64_rx.c \
+ source/test_a_extF80_z_ui32_x.c \
+ source/test_a_extF80_z_ui64_x.c \
+ source/test_a_extF80_z_i32_x.c \
+ source/test_a_extF80_z_i64_x.c \
+ source/test_a_extF80_z_f16.c \
+ source/test_a_extF80_z_f32.c \
+ source/test_a_extF80_z_f64.c \
+ source/test_a_extF80_z_f128.c \
+ source/test_az_extF80.c \
+ source/test_az_extF80_rx.c \
+ source/test_abz_extF80.c \
+ source/test_ab_extF80_z_bool.c \
+ source/test_a_f128_z_ui32_rx.c \
+ source/test_a_f128_z_ui64_rx.c \
+ source/test_a_f128_z_i32_rx.c \
+ source/test_a_f128_z_i64_rx.c \
+ source/test_a_f128_z_ui32_x.c \
+ source/test_a_f128_z_ui64_x.c \
+ source/test_a_f128_z_i32_x.c \
+ source/test_a_f128_z_i64_x.c \
+ source/test_a_f128_z_f16.c \
+ source/test_a_f128_z_f32.c \
+ source/test_a_f128_z_f64.c \
+ source/test_a_f128_z_extF80.c \
+ source/test_az_f128.c \
+ source/test_az_f128_rx.c \
+ source/test_abz_f128.c \
+ source/test_abcz_f128.c \
+ source/test_ab_f128_z_bool.c \
+ \
+ source/genCases_ui32.c \
+ source/genCases_ui64.c \
+ source/genCases_i32.c \
+ source/genCases_i64.c \
+ source/genCases_f16.c \
+ source/genCases_f32.c \
+ source/genCases_f64.c \
+ source/genCases_extF80.c \
+ source/genCases_f128.c
+
+
+PROGRAMS += tstTestFloat
+tstTestFloat_TEMPLATE = VBoxTestFloatExe
+tstTestFloat_SOURCES = \
+ source/testfloat.c \
+ source/subjfloat_functions.c \
+ source/subj-C/subjfloat.c
+
+PROGRAMS += tstTestFloatVer
+tstTestFloatVer_TEMPLATE = VBoxTestFloatExe
+tstTestFloatVer_SOURCES = \
+ source/testfloat_ver.c \
+ source/verLoops.c
+
+PROGRAMS += tstTestFloatGen
+tstTestFloatGen_TEMPLATE = VBoxTestFloatExe
+tstTestFloatGen_SOURCES = \
+ source/testfloat_gen.c \
+ source/genLoops.c
+
+PROGRAMS += tstTestFloatTime
+tstTestFloatTime_TEMPLATE = VBoxTestFloatExe
+tstTestFloatTime_SOURCES = \
+ source/timesoftfloat.c
+tstTestFloatTime_CFLAGS.win = -wd4459 # timesoftfloat.c(4201): warning C4459: declaration of 'exact' hides global declaration
+
+PROGRAMS += tstTestFloat2
+tstTestFloat2_TEMPLATE = VBoxTestFloatExe
+tstTestFloat2_SOURCES = \
+ source/testsoftfloat.c \
+ source/slowfloat.c
+
+include $(FILE_KBUILD_SUB_FOOTER)
+
diff --git a/src/libs/softfloat-3e/testfloat/README.html b/src/libs/softfloat-3e/testfloat/README.html
new file mode 100644
index 00000000..131968e0
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/README.html
@@ -0,0 +1,82 @@
+
+<HTML>
+
+<HEAD>
+<TITLE>Berkeley TestFloat Package Overview</TITLE>
+</HEAD>
+
+<BODY>
+
+<H1>Package Overview for Berkeley TestFloat Release 3e</H1>
+
+<P>
+John R. Hauser<BR>
+2018 January 20<BR>
+</P>
+
+<P>
+Berkeley TestFloat is a small collection of programs for testing that an
+implementation of binary floating-point conforms to the IEEE Standard for
+Floating-Point Arithmetic.
+TestFloat is distributed in the form of C source code.
+</P>
+
+<P>
+The TestFloat package is documented in the following files in the
+<CODE>doc</CODE> subdirectory:
+<BLOCKQUOTE>
+<TABLE>
+<TR>
+<TD><A HREF="doc/TestFloat-general.html"><NOBR><CODE>TestFloat-general.html</CODE></NOBR></A></TD>
+<TD>
+General documentation for understanding and using the TestFloat programs.
+</TD>
+</TR>
+<TD><A HREF="doc/testfloat_gen.html"><NOBR><CODE>testfloat_gen.html</CODE></NOBR></A></TD>
+<TD>
+Specific documentation for the <CODE>testfloat_gen</CODE> program.
+</TD>
+</TR>
+<TR>
+<TD><A HREF="doc/testfloat_ver.html"><NOBR><CODE>testfloat_ver.html</CODE></NOBR></A></TD>
+<TD>
+Specific documentation for the <CODE>testfloat_ver</CODE> program.
+</TD>
+</TR>
+<TR>
+<TD><A HREF="doc/testfloat.html"><NOBR><CODE>testfloat.html</CODE></NOBR></A></TD>
+<TD>
+Specific documentation for the all-in-one <CODE>testfloat</CODE> program.
+</TD>
+</TR>
+<TR>
+<TD><A HREF="doc/testsoftfloat.html"><NOBR><CODE>testsoftfloat.html</CODE></NOBR></A></TD>
+<TD>
+Specific documentation for the <CODE>testsoftfloat</CODE> program.
+</TD>
+</TR>
+<TR>
+<TD><A HREF="doc/timesoftfloat.html"><NOBR><CODE>timesoftfloat.html</CODE></NOBR></A></TD>
+<TD>
+Specific documentation for the <CODE>timesoftfloat</CODE> program.
+</TD>
+</TR>
+<TR>
+<TD><A HREF="doc/TestFloat-source.html"><NOBR><CODE>TestFloat-source.html</CODE></NOBR></A></TD>
+<TD>
+Documentation for building TestFloat.
+</TD>
+</TR>
+<TR>
+<TD><A HREF="doc/TestFloat-history.html"><NOBR><CODE>TestFloat-history.html</CODE></NOBR></A><CODE>&nbsp;&nbsp;&nbsp;</CODE></TD>
+<TD>
+History of the major changes to TestFloat.
+</TD>
+</TR>
+</TABLE>
+</BLOCKQUOTE>
+Other files in the package comprise the source code for TestFloat.
+</P>
+
+</BODY>
+
diff --git a/src/libs/softfloat-3e/testfloat/README.txt b/src/libs/softfloat-3e/testfloat/README.txt
new file mode 100644
index 00000000..9bbda571
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/README.txt
@@ -0,0 +1,26 @@
+
+Package Overview for Berkeley TestFloat Release 3e
+
+John R. Hauser
+2018 January 20
+
+Berkeley TestFloat is a small collection of programs for testing that an
+implementation of binary floating-point conforms to the IEEE Standard for
+Floating-Point Arithmetic. TestFloat is distributed in the form of C source
+code.
+
+The TestFloat package is documented in the following files in the "doc"
+subdirectory:
+
+ TestFloat-general.html General documentation for understanding and using
+ the TestFloat programs.
+ testfloat_gen.html \
+ testfloat_ver.html | Specific documentation for each TestFloat
+ testfloat.html | program.
+ testsoftfloat.html |
+ timesoftfloat.html /
+ TestFloat-source.html Documentation for building TestFloat.
+ TestFloat-history.html History of the major changes to TestFloat.
+
+Other files in the package comprise the source code for TestFloat.
+
diff --git a/src/libs/softfloat-3e/testfloat/build/Linux-386-GCC/Makefile b/src/libs/softfloat-3e/testfloat/build/Linux-386-GCC/Makefile
new file mode 100644
index 00000000..8f36554a
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Linux-386-GCC/Makefile
@@ -0,0 +1,355 @@
+
+#=============================================================================
+#
+# This Makefile is part of TestFloat, Release 3e, a package of programs for
+# testing the correctness of floating-point arithmetic complying with the IEEE
+# Standard for Floating-Point, by John R. Hauser.
+#
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+# University of California. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions, and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions, and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# 3. Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#=============================================================================
+
+SOURCE_DIR ?= ../../source
+SOFTFLOAT_DIR ?= ../../../SoftFloat-3e
+PLATFORM ?= Linux-386-GCC
+
+SUBJ_SOURCE_DIR = $(SOURCE_DIR)/subj-C
+SOFTFLOAT_INCLUDE_DIR = $(SOFTFLOAT_DIR)/source/include
+
+SOFTFLOAT_H = \
+ $(SOFTFLOAT_INCLUDE_DIR)/softfloat_types.h \
+ $(SOFTFLOAT_INCLUDE_DIR)/softfloat.h
+SOFTFLOAT_LIB = $(SOFTFLOAT_DIR)/build/$(PLATFORM)/softfloat$(LIB)
+
+TESTFLOAT_OPTS ?= \
+ -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD \
+ -DLONG_DOUBLE_IS_EXTFLOAT80
+
+DELETE = rm -f
+C_INCLUDES = \
+ -I. -I$(SUBJ_SOURCE_DIR) -I$(SOURCE_DIR) -I$(SOFTFLOAT_INCLUDE_DIR)
+COMPILE_C = \
+ gcc -c -Werror-implicit-function-declaration $(TESTFLOAT_OPTS) \
+ $(C_INCLUDES) -O2 -o $@
+COMPILE_SLOWFLOAT_C = \
+ gcc -c -Werror-implicit-function-declaration $(TESTFLOAT_OPTS) \
+ $(C_INCLUDES) -O3 -o $@
+MAKELIB = ar crs $@
+LINK = gcc -o $@
+OTHER_LIBS = -lm
+
+OBJ = .o
+LIB = .a
+EXE =
+
+.PHONY: all
+all: \
+ testsoftfloat$(EXE) \
+ timesoftfloat$(EXE) \
+ testfloat_gen$(EXE) \
+ testfloat_ver$(EXE) \
+ testfloat$(EXE) \
+
+OBJS_GENCASES = \
+ genCases_ui32$(OBJ) \
+ genCases_ui64$(OBJ) \
+ genCases_i32$(OBJ) \
+ genCases_i64$(OBJ) \
+ genCases_f16$(OBJ) \
+ genCases_f32$(OBJ) \
+ genCases_f64$(OBJ) \
+ genCases_extF80$(OBJ) \
+ genCases_f128$(OBJ) \
+
+OBJS_WRITECASE = \
+ writeCase_a_ui32$(OBJ) \
+ writeCase_a_ui64$(OBJ) \
+ writeCase_a_f16$(OBJ) \
+ writeCase_ab_f16$(OBJ) \
+ writeCase_abc_f16$(OBJ) \
+ writeCase_a_f32$(OBJ) \
+ writeCase_ab_f32$(OBJ) \
+ writeCase_abc_f32$(OBJ) \
+ writeCase_a_f64$(OBJ) \
+ writeCase_ab_f64$(OBJ) \
+ writeCase_abc_f64$(OBJ) \
+ writeCase_a_extF80M$(OBJ) \
+ writeCase_ab_extF80M$(OBJ) \
+ writeCase_a_f128M$(OBJ) \
+ writeCase_ab_f128M$(OBJ) \
+ writeCase_abc_f128M$(OBJ) \
+ writeCase_z_bool$(OBJ) \
+ writeCase_z_ui32$(OBJ) \
+ writeCase_z_ui64$(OBJ) \
+ writeCase_z_f16$(OBJ) \
+ writeCase_z_f32$(OBJ) \
+ writeCase_z_f64$(OBJ) \
+ writeCase_z_extF80M$(OBJ) \
+ writeCase_z_f128M$(OBJ) \
+
+OBJS_TEST = \
+ test_a_ui32_z_f16$(OBJ) \
+ test_a_ui32_z_f32$(OBJ) \
+ test_a_ui32_z_f64$(OBJ) \
+ test_a_ui32_z_extF80$(OBJ) \
+ test_a_ui32_z_f128$(OBJ) \
+ test_a_ui64_z_f16$(OBJ) \
+ test_a_ui64_z_f32$(OBJ) \
+ test_a_ui64_z_f64$(OBJ) \
+ test_a_ui64_z_extF80$(OBJ) \
+ test_a_ui64_z_f128$(OBJ) \
+ test_a_i32_z_f16$(OBJ) \
+ test_a_i32_z_f32$(OBJ) \
+ test_a_i32_z_f64$(OBJ) \
+ test_a_i32_z_extF80$(OBJ) \
+ test_a_i32_z_f128$(OBJ) \
+ test_a_i64_z_f16$(OBJ) \
+ test_a_i64_z_f32$(OBJ) \
+ test_a_i64_z_f64$(OBJ) \
+ test_a_i64_z_extF80$(OBJ) \
+ test_a_i64_z_f128$(OBJ) \
+ test_a_f16_z_ui32_rx$(OBJ) \
+ test_a_f16_z_ui64_rx$(OBJ) \
+ test_a_f16_z_i32_rx$(OBJ) \
+ test_a_f16_z_i64_rx$(OBJ) \
+ test_a_f16_z_ui32_x$(OBJ) \
+ test_a_f16_z_ui64_x$(OBJ) \
+ test_a_f16_z_i32_x$(OBJ) \
+ test_a_f16_z_i64_x$(OBJ) \
+ test_a_f16_z_f32$(OBJ) \
+ test_a_f16_z_f64$(OBJ) \
+ test_a_f16_z_extF80$(OBJ) \
+ test_a_f16_z_f128$(OBJ) \
+ test_az_f16$(OBJ) \
+ test_az_f16_rx$(OBJ) \
+ test_abz_f16$(OBJ) \
+ test_abcz_f16$(OBJ) \
+ test_ab_f16_z_bool$(OBJ) \
+ test_a_f32_z_ui32_rx$(OBJ) \
+ test_a_f32_z_ui64_rx$(OBJ) \
+ test_a_f32_z_i32_rx$(OBJ) \
+ test_a_f32_z_i64_rx$(OBJ) \
+ test_a_f32_z_ui32_x$(OBJ) \
+ test_a_f32_z_ui64_x$(OBJ) \
+ test_a_f32_z_i32_x$(OBJ) \
+ test_a_f32_z_i64_x$(OBJ) \
+ test_a_f32_z_f16$(OBJ) \
+ test_a_f32_z_f64$(OBJ) \
+ test_a_f32_z_extF80$(OBJ) \
+ test_a_f32_z_f128$(OBJ) \
+ test_az_f32$(OBJ) \
+ test_az_f32_rx$(OBJ) \
+ test_abz_f32$(OBJ) \
+ test_abcz_f32$(OBJ) \
+ test_ab_f32_z_bool$(OBJ) \
+ test_a_f64_z_ui32_rx$(OBJ) \
+ test_a_f64_z_ui64_rx$(OBJ) \
+ test_a_f64_z_i32_rx$(OBJ) \
+ test_a_f64_z_i64_rx$(OBJ) \
+ test_a_f64_z_ui32_x$(OBJ) \
+ test_a_f64_z_ui64_x$(OBJ) \
+ test_a_f64_z_i32_x$(OBJ) \
+ test_a_f64_z_i64_x$(OBJ) \
+ test_a_f64_z_f16$(OBJ) \
+ test_a_f64_z_f32$(OBJ) \
+ test_a_f64_z_extF80$(OBJ) \
+ test_a_f64_z_f128$(OBJ) \
+ test_az_f64$(OBJ) \
+ test_az_f64_rx$(OBJ) \
+ test_abz_f64$(OBJ) \
+ test_abcz_f64$(OBJ) \
+ test_ab_f64_z_bool$(OBJ) \
+ test_a_extF80_z_ui32_rx$(OBJ) \
+ test_a_extF80_z_ui64_rx$(OBJ) \
+ test_a_extF80_z_i32_rx$(OBJ) \
+ test_a_extF80_z_i64_rx$(OBJ) \
+ test_a_extF80_z_ui32_x$(OBJ) \
+ test_a_extF80_z_ui64_x$(OBJ) \
+ test_a_extF80_z_i32_x$(OBJ) \
+ test_a_extF80_z_i64_x$(OBJ) \
+ test_a_extF80_z_f16$(OBJ) \
+ test_a_extF80_z_f32$(OBJ) \
+ test_a_extF80_z_f64$(OBJ) \
+ test_a_extF80_z_f128$(OBJ) \
+ test_az_extF80$(OBJ) \
+ test_az_extF80_rx$(OBJ) \
+ test_abz_extF80$(OBJ) \
+ test_ab_extF80_z_bool$(OBJ) \
+ test_a_f128_z_ui32_rx$(OBJ) \
+ test_a_f128_z_ui64_rx$(OBJ) \
+ test_a_f128_z_i32_rx$(OBJ) \
+ test_a_f128_z_i64_rx$(OBJ) \
+ test_a_f128_z_ui32_x$(OBJ) \
+ test_a_f128_z_ui64_x$(OBJ) \
+ test_a_f128_z_i32_x$(OBJ) \
+ test_a_f128_z_i64_x$(OBJ) \
+ test_a_f128_z_f16$(OBJ) \
+ test_a_f128_z_f32$(OBJ) \
+ test_a_f128_z_f64$(OBJ) \
+ test_a_f128_z_extF80$(OBJ) \
+ test_az_f128$(OBJ) \
+ test_az_f128_rx$(OBJ) \
+ test_abz_f128$(OBJ) \
+ test_abcz_f128$(OBJ) \
+ test_ab_f128_z_bool$(OBJ) \
+
+OBJS_LIB = \
+ uint128_inline$(OBJ) \
+ uint128$(OBJ) \
+ fail$(OBJ) \
+ functions_common$(OBJ) \
+ functionInfos$(OBJ) \
+ standardFunctionInfos$(OBJ) \
+ random$(OBJ) \
+ genCases_common$(OBJ) \
+ $(OBJS_GENCASES) \
+ genCases_writeTestsTotal$(OBJ) \
+ verCases_inline$(OBJ) \
+ verCases_common$(OBJ) \
+ verCases_writeFunctionName$(OBJ) \
+ readHex$(OBJ) \
+ writeHex$(OBJ) \
+ $(OBJS_WRITECASE) \
+ testLoops_common$(OBJ) \
+ $(OBJS_TEST) \
+
+uint128$(OBJ): $(SOURCE_DIR)/uint128.h
+fail$(OBJ): $(SOURCE_DIR)/fail.h
+functions_common$(OBJ): $(SOFTFLOAT_H) $(SOURCE_DIR)/functions.h
+functionInfos$(OBJ): $(SOURCE_DIR)/functions.h
+standardFunctionInfos$(OBJ): $(SOURCE_DIR)/functions.h
+random$(OBJ): $(SOURCE_DIR)/random.h
+genCases_common$(OBJ): $(SOURCE_DIR)/fail.h $(SOURCE_DIR)/genCases.h
+$(OBJS_GENCASES): \
+ $(SOURCE_DIR)/random.h $(SOFTFLOAT_H) $(SOURCE_DIR)/genCases.h
+genCases_f128$(OBJ): $(SOURCE_DIR)/uint128.h
+genCases_writeTestsTotal$(OBJ): $(SOURCE_DIR)/genCases.h
+verCases_common$(OBJ): $(SOURCE_DIR)/verCases.h
+verCases_writeFunctionName$(OBJ): $(SOURCE_DIR)/verCases.h
+readHex$(OBJ): $(SOURCE_DIR)/readHex.h
+writeHex$(OBJ): $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/writeHex.h
+$(OBJS_WRITECASE): \
+ $(SOFTFLOAT_H) $(SOURCE_DIR)/writeHex.h $(SOURCE_DIR)/writeCase.h
+testLoops_common$(OBJ): $(SOURCE_DIR)/testLoops.h
+$(OBJS_TEST): \
+ $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/genCases.h \
+ $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h $(SOURCE_DIR)/testLoops.h
+$(OBJS_LIB): %$(OBJ): platform.h $(SOURCE_DIR)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$*.c
+testfloat$(LIB): $(OBJS_LIB)
+ $(MAKELIB) $^
+
+OBJS_TESTSOFTFLOAT = slowfloat$(OBJ) testsoftfloat$(OBJ)
+
+slowfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/slowfloat.h $(SOURCE_DIR)/slowfloat.c
+ $(COMPILE_SLOWFLOAT_C) $(SOURCE_DIR)/slowfloat.c
+testsoftfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/slowfloat.h $(SOURCE_DIR)/functions.h \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h \
+ $(SOURCE_DIR)/testLoops.h $(SOURCE_DIR)/testsoftfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/testsoftfloat.c
+
+testsoftfloat$(EXE): $(OBJS_TESTSOFTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TIMESOFTFLOAT = timesoftfloat$(OBJ)
+
+timesoftfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/timesoftfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/timesoftfloat.c
+
+timesoftfloat$(EXE): $(OBJS_TIMESOFTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TESTFLOAT_GEN = genLoops$(OBJ) testfloat_gen$(OBJ)
+
+genLoops$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/writeHex.h $(SOURCE_DIR)/genLoops.h \
+ $(SOURCE_DIR)/genLoops.c
+ $(COMPILE_C) $(SOURCE_DIR)/genLoops.c
+testfloat_gen$(OBJ): \
+ $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) $(SOURCE_DIR)/functions.h \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/genLoops.h \
+ $(SOURCE_DIR)/testfloat_gen.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat_gen.c
+
+testfloat_gen$(EXE): $(OBJS_TESTFLOAT_GEN) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TESTFLOAT_VER = verLoops$(OBJ) testfloat_ver$(OBJ)
+
+verLoops$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/readHex.h $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h \
+ $(SOURCE_DIR)/verLoops.h $(SOURCE_DIR)/verLoops.c
+ $(COMPILE_C) $(SOURCE_DIR)/verLoops.c
+testfloat_ver$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/verCases.h \
+ $(SOURCE_DIR)/writeCase.h $(SOURCE_DIR)/verLoops.h \
+ $(SOURCE_DIR)/testfloat_ver.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat_ver.c
+
+testfloat_ver$(EXE): $(OBJS_TESTFLOAT_VER) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TESTFLOAT = subjfloat$(OBJ) subjfloat_functions$(OBJ) testfloat$(OBJ)
+
+subjfloat$(OBJ): \
+ platform.h $(SOFTFLOAT_H) $(SUBJ_SOURCE_DIR)/subjfloat_config.h \
+ $(SOURCE_DIR)/subjfloat.h $(SUBJ_SOURCE_DIR)/subjfloat.c
+ $(COMPILE_C) $(SUBJ_SOURCE_DIR)/subjfloat.c
+subjfloat_functions$(OBJ): \
+ platform.h $(SUBJ_SOURCE_DIR)/subjfloat_config.h $(SOURCE_DIR)/subjfloat.h \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/subjfloat_functions.c
+ $(COMPILE_C) $(SOURCE_DIR)/subjfloat_functions.c
+testfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SUBJ_SOURCE_DIR)/subjfloat_config.h $(SOURCE_DIR)/subjfloat.h \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/verCases.h \
+ $(SOURCE_DIR)/testLoops.h $(SOURCE_DIR)/testfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat.c
+
+testfloat$(EXE): $(OBJS_TESTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+.PHONY: clean
+clean:
+ $(DELETE) $(OBJS_LIB) testfloat$(LIB)
+ $(DELETE) $(OBJS_TESTSOFTFLOAT) testsoftfloat$(EXE)
+ $(DELETE) $(OBJS_TIMESOFTFLOAT) timesoftfloat$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT_GEN) testfloat_gen$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT_VER) testfloat_ver$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT) testfloat$(EXE)
+
diff --git a/src/libs/softfloat-3e/testfloat/build/Linux-386-GCC/platform.h b/src/libs/softfloat-3e/testfloat/build/Linux-386-GCC/platform.h
new file mode 100644
index 00000000..8b0de318
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Linux-386-GCC/platform.h
@@ -0,0 +1,49 @@
+
+/*============================================================================
+
+This C header file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define LITTLEENDIAN 1
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef __GNUC_STDC_INLINE__
+#define INLINE inline
+#else
+#define INLINE extern inline
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/build/Linux-386-SSE2-GCC/Makefile b/src/libs/softfloat-3e/testfloat/build/Linux-386-SSE2-GCC/Makefile
new file mode 100644
index 00000000..f9ae0689
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Linux-386-SSE2-GCC/Makefile
@@ -0,0 +1,355 @@
+
+#=============================================================================
+#
+# This Makefile is part of TestFloat, Release 3e, a package of programs for
+# testing the correctness of floating-point arithmetic complying with the IEEE
+# Standard for Floating-Point, by John R. Hauser.
+#
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+# University of California. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions, and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions, and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# 3. Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#=============================================================================
+
+SOURCE_DIR ?= ../../source
+SOFTFLOAT_DIR ?= ../../../SoftFloat-3e
+PLATFORM ?= Linux-386-SSE2-GCC
+
+SUBJ_SOURCE_DIR = $(SOURCE_DIR)/subj-C
+SOFTFLOAT_INCLUDE_DIR = $(SOFTFLOAT_DIR)/source/include
+
+SOFTFLOAT_H = \
+ $(SOFTFLOAT_INCLUDE_DIR)/softfloat_types.h \
+ $(SOFTFLOAT_INCLUDE_DIR)/softfloat.h
+SOFTFLOAT_LIB = $(SOFTFLOAT_DIR)/build/$(PLATFORM)/softfloat$(LIB)
+
+TESTFLOAT_OPTS ?= \
+ -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD \
+ -DLONG_DOUBLE_IS_EXTFLOAT80
+
+DELETE = rm -f
+C_INCLUDES = \
+ -I. -I$(SUBJ_SOURCE_DIR) -I$(SOURCE_DIR) -I$(SOFTFLOAT_INCLUDE_DIR)
+COMPILE_C = \
+ gcc -c -Werror-implicit-function-declaration -msse2 -mfpmath=sse \
+ $(TESTFLOAT_OPTS) $(C_INCLUDES) -O2 -o $@
+COMPILE_SLOWFLOAT_C = \
+ gcc -c -Werror-implicit-function-declaration $(TESTFLOAT_OPTS) \
+ $(C_INCLUDES) -O3 -o $@
+MAKELIB = ar crs $@
+LINK = gcc -o $@
+OTHER_LIBS = -lm
+
+OBJ = .o
+LIB = .a
+EXE =
+
+.PHONY: all
+all: \
+ testsoftfloat$(EXE) \
+ timesoftfloat$(EXE) \
+ testfloat_gen$(EXE) \
+ testfloat_ver$(EXE) \
+ testfloat$(EXE) \
+
+OBJS_GENCASES = \
+ genCases_ui32$(OBJ) \
+ genCases_ui64$(OBJ) \
+ genCases_i32$(OBJ) \
+ genCases_i64$(OBJ) \
+ genCases_f16$(OBJ) \
+ genCases_f32$(OBJ) \
+ genCases_f64$(OBJ) \
+ genCases_extF80$(OBJ) \
+ genCases_f128$(OBJ) \
+
+OBJS_WRITECASE = \
+ writeCase_a_ui32$(OBJ) \
+ writeCase_a_ui64$(OBJ) \
+ writeCase_a_f16$(OBJ) \
+ writeCase_ab_f16$(OBJ) \
+ writeCase_abc_f16$(OBJ) \
+ writeCase_a_f32$(OBJ) \
+ writeCase_ab_f32$(OBJ) \
+ writeCase_abc_f32$(OBJ) \
+ writeCase_a_f64$(OBJ) \
+ writeCase_ab_f64$(OBJ) \
+ writeCase_abc_f64$(OBJ) \
+ writeCase_a_extF80M$(OBJ) \
+ writeCase_ab_extF80M$(OBJ) \
+ writeCase_a_f128M$(OBJ) \
+ writeCase_ab_f128M$(OBJ) \
+ writeCase_abc_f128M$(OBJ) \
+ writeCase_z_bool$(OBJ) \
+ writeCase_z_ui32$(OBJ) \
+ writeCase_z_ui64$(OBJ) \
+ writeCase_z_f16$(OBJ) \
+ writeCase_z_f32$(OBJ) \
+ writeCase_z_f64$(OBJ) \
+ writeCase_z_extF80M$(OBJ) \
+ writeCase_z_f128M$(OBJ) \
+
+OBJS_TEST = \
+ test_a_ui32_z_f16$(OBJ) \
+ test_a_ui32_z_f32$(OBJ) \
+ test_a_ui32_z_f64$(OBJ) \
+ test_a_ui32_z_extF80$(OBJ) \
+ test_a_ui32_z_f128$(OBJ) \
+ test_a_ui64_z_f16$(OBJ) \
+ test_a_ui64_z_f32$(OBJ) \
+ test_a_ui64_z_f64$(OBJ) \
+ test_a_ui64_z_extF80$(OBJ) \
+ test_a_ui64_z_f128$(OBJ) \
+ test_a_i32_z_f16$(OBJ) \
+ test_a_i32_z_f32$(OBJ) \
+ test_a_i32_z_f64$(OBJ) \
+ test_a_i32_z_extF80$(OBJ) \
+ test_a_i32_z_f128$(OBJ) \
+ test_a_i64_z_f16$(OBJ) \
+ test_a_i64_z_f32$(OBJ) \
+ test_a_i64_z_f64$(OBJ) \
+ test_a_i64_z_extF80$(OBJ) \
+ test_a_i64_z_f128$(OBJ) \
+ test_a_f16_z_ui32_rx$(OBJ) \
+ test_a_f16_z_ui64_rx$(OBJ) \
+ test_a_f16_z_i32_rx$(OBJ) \
+ test_a_f16_z_i64_rx$(OBJ) \
+ test_a_f16_z_ui32_x$(OBJ) \
+ test_a_f16_z_ui64_x$(OBJ) \
+ test_a_f16_z_i32_x$(OBJ) \
+ test_a_f16_z_i64_x$(OBJ) \
+ test_a_f16_z_f32$(OBJ) \
+ test_a_f16_z_f64$(OBJ) \
+ test_a_f16_z_extF80$(OBJ) \
+ test_a_f16_z_f128$(OBJ) \
+ test_az_f16$(OBJ) \
+ test_az_f16_rx$(OBJ) \
+ test_abz_f16$(OBJ) \
+ test_abcz_f16$(OBJ) \
+ test_ab_f16_z_bool$(OBJ) \
+ test_a_f32_z_ui32_rx$(OBJ) \
+ test_a_f32_z_ui64_rx$(OBJ) \
+ test_a_f32_z_i32_rx$(OBJ) \
+ test_a_f32_z_i64_rx$(OBJ) \
+ test_a_f32_z_ui32_x$(OBJ) \
+ test_a_f32_z_ui64_x$(OBJ) \
+ test_a_f32_z_i32_x$(OBJ) \
+ test_a_f32_z_i64_x$(OBJ) \
+ test_a_f32_z_f16$(OBJ) \
+ test_a_f32_z_f64$(OBJ) \
+ test_a_f32_z_extF80$(OBJ) \
+ test_a_f32_z_f128$(OBJ) \
+ test_az_f32$(OBJ) \
+ test_az_f32_rx$(OBJ) \
+ test_abz_f32$(OBJ) \
+ test_abcz_f32$(OBJ) \
+ test_ab_f32_z_bool$(OBJ) \
+ test_a_f64_z_ui32_rx$(OBJ) \
+ test_a_f64_z_ui64_rx$(OBJ) \
+ test_a_f64_z_i32_rx$(OBJ) \
+ test_a_f64_z_i64_rx$(OBJ) \
+ test_a_f64_z_ui32_x$(OBJ) \
+ test_a_f64_z_ui64_x$(OBJ) \
+ test_a_f64_z_i32_x$(OBJ) \
+ test_a_f64_z_i64_x$(OBJ) \
+ test_a_f64_z_f16$(OBJ) \
+ test_a_f64_z_f32$(OBJ) \
+ test_a_f64_z_extF80$(OBJ) \
+ test_a_f64_z_f128$(OBJ) \
+ test_az_f64$(OBJ) \
+ test_az_f64_rx$(OBJ) \
+ test_abz_f64$(OBJ) \
+ test_abcz_f64$(OBJ) \
+ test_ab_f64_z_bool$(OBJ) \
+ test_a_extF80_z_ui32_rx$(OBJ) \
+ test_a_extF80_z_ui64_rx$(OBJ) \
+ test_a_extF80_z_i32_rx$(OBJ) \
+ test_a_extF80_z_i64_rx$(OBJ) \
+ test_a_extF80_z_ui32_x$(OBJ) \
+ test_a_extF80_z_ui64_x$(OBJ) \
+ test_a_extF80_z_i32_x$(OBJ) \
+ test_a_extF80_z_i64_x$(OBJ) \
+ test_a_extF80_z_f16$(OBJ) \
+ test_a_extF80_z_f32$(OBJ) \
+ test_a_extF80_z_f64$(OBJ) \
+ test_a_extF80_z_f128$(OBJ) \
+ test_az_extF80$(OBJ) \
+ test_az_extF80_rx$(OBJ) \
+ test_abz_extF80$(OBJ) \
+ test_ab_extF80_z_bool$(OBJ) \
+ test_a_f128_z_ui32_rx$(OBJ) \
+ test_a_f128_z_ui64_rx$(OBJ) \
+ test_a_f128_z_i32_rx$(OBJ) \
+ test_a_f128_z_i64_rx$(OBJ) \
+ test_a_f128_z_ui32_x$(OBJ) \
+ test_a_f128_z_ui64_x$(OBJ) \
+ test_a_f128_z_i32_x$(OBJ) \
+ test_a_f128_z_i64_x$(OBJ) \
+ test_a_f128_z_f16$(OBJ) \
+ test_a_f128_z_f32$(OBJ) \
+ test_a_f128_z_f64$(OBJ) \
+ test_a_f128_z_extF80$(OBJ) \
+ test_az_f128$(OBJ) \
+ test_az_f128_rx$(OBJ) \
+ test_abz_f128$(OBJ) \
+ test_abcz_f128$(OBJ) \
+ test_ab_f128_z_bool$(OBJ) \
+
+OBJS_LIB = \
+ uint128_inline$(OBJ) \
+ uint128$(OBJ) \
+ fail$(OBJ) \
+ functions_common$(OBJ) \
+ functionInfos$(OBJ) \
+ standardFunctionInfos$(OBJ) \
+ random$(OBJ) \
+ genCases_common$(OBJ) \
+ $(OBJS_GENCASES) \
+ genCases_writeTestsTotal$(OBJ) \
+ verCases_inline$(OBJ) \
+ verCases_common$(OBJ) \
+ verCases_writeFunctionName$(OBJ) \
+ readHex$(OBJ) \
+ writeHex$(OBJ) \
+ $(OBJS_WRITECASE) \
+ testLoops_common$(OBJ) \
+ $(OBJS_TEST) \
+
+uint128$(OBJ): $(SOURCE_DIR)/uint128.h
+fail$(OBJ): $(SOURCE_DIR)/fail.h
+functions_common$(OBJ): $(SOFTFLOAT_H) $(SOURCE_DIR)/functions.h
+functionInfos$(OBJ): $(SOURCE_DIR)/functions.h
+standardFunctionInfos$(OBJ): $(SOURCE_DIR)/functions.h
+random$(OBJ): $(SOURCE_DIR)/random.h
+genCases_common$(OBJ): $(SOURCE_DIR)/fail.h $(SOURCE_DIR)/genCases.h
+$(OBJS_GENCASES): \
+ $(SOURCE_DIR)/random.h $(SOFTFLOAT_H) $(SOURCE_DIR)/genCases.h
+genCases_f128$(OBJ): $(SOURCE_DIR)/uint128.h
+genCases_writeTestsTotal$(OBJ): $(SOURCE_DIR)/genCases.h
+verCases_common$(OBJ): $(SOURCE_DIR)/verCases.h
+verCases_writeFunctionName$(OBJ): $(SOURCE_DIR)/verCases.h
+readHex$(OBJ): $(SOURCE_DIR)/readHex.h
+writeHex$(OBJ): $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/writeHex.h
+$(OBJS_WRITECASE): \
+ $(SOFTFLOAT_H) $(SOURCE_DIR)/writeHex.h $(SOURCE_DIR)/writeCase.h
+testLoops_common$(OBJ): $(SOURCE_DIR)/testLoops.h
+$(OBJS_TEST): \
+ $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/genCases.h \
+ $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h $(SOURCE_DIR)/testLoops.h
+$(OBJS_LIB): %$(OBJ): platform.h $(SOURCE_DIR)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$*.c
+testfloat$(LIB): $(OBJS_LIB)
+ $(MAKELIB) $^
+
+OBJS_TESTSOFTFLOAT = slowfloat$(OBJ) testsoftfloat$(OBJ)
+
+slowfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/slowfloat.h $(SOURCE_DIR)/slowfloat.c
+ $(COMPILE_SLOWFLOAT_C) $(SOURCE_DIR)/slowfloat.c
+testsoftfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/slowfloat.h $(SOURCE_DIR)/functions.h \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h \
+ $(SOURCE_DIR)/testLoops.h $(SOURCE_DIR)/testsoftfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/testsoftfloat.c
+
+testsoftfloat$(EXE): $(OBJS_TESTSOFTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TIMESOFTFLOAT = timesoftfloat$(OBJ)
+
+timesoftfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/timesoftfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/timesoftfloat.c
+
+timesoftfloat$(EXE): $(OBJS_TIMESOFTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TESTFLOAT_GEN = genLoops$(OBJ) testfloat_gen$(OBJ)
+
+genLoops$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/writeHex.h $(SOURCE_DIR)/genLoops.h \
+ $(SOURCE_DIR)/genLoops.c
+ $(COMPILE_C) $(SOURCE_DIR)/genLoops.c
+testfloat_gen$(OBJ): \
+ $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) $(SOURCE_DIR)/functions.h \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/genLoops.h \
+ $(SOURCE_DIR)/testfloat_gen.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat_gen.c
+
+testfloat_gen$(EXE): $(OBJS_TESTFLOAT_GEN) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TESTFLOAT_VER = verLoops$(OBJ) testfloat_ver$(OBJ)
+
+verLoops$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/readHex.h $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h \
+ $(SOURCE_DIR)/verLoops.h $(SOURCE_DIR)/verLoops.c
+ $(COMPILE_C) $(SOURCE_DIR)/verLoops.c
+testfloat_ver$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/verCases.h \
+ $(SOURCE_DIR)/writeCase.h $(SOURCE_DIR)/verLoops.h \
+ $(SOURCE_DIR)/testfloat_ver.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat_ver.c
+
+testfloat_ver$(EXE): $(OBJS_TESTFLOAT_VER) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TESTFLOAT = subjfloat$(OBJ) subjfloat_functions$(OBJ) testfloat$(OBJ)
+
+subjfloat$(OBJ): \
+ platform.h $(SOFTFLOAT_H) $(SUBJ_SOURCE_DIR)/subjfloat_config.h \
+ $(SOURCE_DIR)/subjfloat.h $(SUBJ_SOURCE_DIR)/subjfloat.c
+ $(COMPILE_C) $(SUBJ_SOURCE_DIR)/subjfloat.c
+subjfloat_functions$(OBJ): \
+ platform.h $(SUBJ_SOURCE_DIR)/subjfloat_config.h $(SOURCE_DIR)/subjfloat.h \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/subjfloat_functions.c
+ $(COMPILE_C) $(SOURCE_DIR)/subjfloat_functions.c
+testfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SUBJ_SOURCE_DIR)/subjfloat_config.h $(SOURCE_DIR)/subjfloat.h \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/verCases.h \
+ $(SOURCE_DIR)/testLoops.h $(SOURCE_DIR)/testfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat.c
+
+testfloat$(EXE): $(OBJS_TESTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+.PHONY: clean
+clean:
+ $(DELETE) $(OBJS_LIB) testfloat$(LIB)
+ $(DELETE) $(OBJS_TESTSOFTFLOAT) testsoftfloat$(EXE)
+ $(DELETE) $(OBJS_TIMESOFTFLOAT) timesoftfloat$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT_GEN) testfloat_gen$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT_VER) testfloat_ver$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT) testfloat$(EXE)
+
diff --git a/src/libs/softfloat-3e/testfloat/build/Linux-386-SSE2-GCC/platform.h b/src/libs/softfloat-3e/testfloat/build/Linux-386-SSE2-GCC/platform.h
new file mode 100644
index 00000000..8b0de318
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Linux-386-SSE2-GCC/platform.h
@@ -0,0 +1,49 @@
+
+/*============================================================================
+
+This C header file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define LITTLEENDIAN 1
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef __GNUC_STDC_INLINE__
+#define INLINE inline
+#else
+#define INLINE extern inline
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/build/Linux-ARM-VFPv2-GCC/Makefile b/src/libs/softfloat-3e/testfloat/build/Linux-ARM-VFPv2-GCC/Makefile
new file mode 100644
index 00000000..2f0698d7
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Linux-ARM-VFPv2-GCC/Makefile
@@ -0,0 +1,353 @@
+
+#=============================================================================
+#
+# This Makefile is part of TestFloat, Release 3e, a package of programs for
+# testing the correctness of floating-point arithmetic complying with the IEEE
+# Standard for Floating-Point, by John R. Hauser.
+#
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+# University of California. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions, and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions, and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# 3. Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#=============================================================================
+
+SOURCE_DIR ?= ../../source
+SOFTFLOAT_DIR ?= ../../../SoftFloat-3e
+PLATFORM ?= Linux-ARM-VFPv2-GCC
+
+SUBJ_SOURCE_DIR = $(SOURCE_DIR)/subj-C
+SOFTFLOAT_INCLUDE_DIR = $(SOFTFLOAT_DIR)/source/include
+
+SOFTFLOAT_H = \
+ $(SOFTFLOAT_INCLUDE_DIR)/softfloat_types.h \
+ $(SOFTFLOAT_INCLUDE_DIR)/softfloat.h
+SOFTFLOAT_LIB = $(SOFTFLOAT_DIR)/build/$(PLATFORM)/softfloat$(LIB)
+
+TESTFLOAT_OPTS ?= -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD
+
+DELETE = rm -f
+C_INCLUDES = \
+ -I. -I$(SUBJ_SOURCE_DIR) -I$(SOURCE_DIR) -I$(SOFTFLOAT_INCLUDE_DIR)
+COMPILE_C = \
+ gcc -std=c99 -c -Werror-implicit-function-declaration $(TESTFLOAT_OPTS) \
+ $(C_INCLUDES) -O2 -o $@
+COMPILE_SLOWFLOAT_C = \
+ gcc -std=c99 -c -Werror-implicit-function-declaration $(TESTFLOAT_OPTS) \
+ $(C_INCLUDES) -O3 -o $@
+MAKELIB = ar crs $@
+LINK = gcc -o $@
+OTHER_LIBS = -lm
+
+OBJ = .o
+LIB = .a
+EXE =
+
+.PHONY: all
+all: \
+ testsoftfloat$(EXE) \
+ timesoftfloat$(EXE) \
+ testfloat_gen$(EXE) \
+ testfloat_ver$(EXE) \
+ testfloat$(EXE) \
+
+OBJS_GENCASES = \
+ genCases_ui32$(OBJ) \
+ genCases_ui64$(OBJ) \
+ genCases_i32$(OBJ) \
+ genCases_i64$(OBJ) \
+ genCases_f16$(OBJ) \
+ genCases_f32$(OBJ) \
+ genCases_f64$(OBJ) \
+ genCases_extF80$(OBJ) \
+ genCases_f128$(OBJ) \
+
+OBJS_WRITECASE = \
+ writeCase_a_ui32$(OBJ) \
+ writeCase_a_ui64$(OBJ) \
+ writeCase_a_f16$(OBJ) \
+ writeCase_ab_f16$(OBJ) \
+ writeCase_abc_f16$(OBJ) \
+ writeCase_a_f32$(OBJ) \
+ writeCase_ab_f32$(OBJ) \
+ writeCase_abc_f32$(OBJ) \
+ writeCase_a_f64$(OBJ) \
+ writeCase_ab_f64$(OBJ) \
+ writeCase_abc_f64$(OBJ) \
+ writeCase_a_extF80M$(OBJ) \
+ writeCase_ab_extF80M$(OBJ) \
+ writeCase_a_f128M$(OBJ) \
+ writeCase_ab_f128M$(OBJ) \
+ writeCase_abc_f128M$(OBJ) \
+ writeCase_z_bool$(OBJ) \
+ writeCase_z_ui32$(OBJ) \
+ writeCase_z_ui64$(OBJ) \
+ writeCase_z_f16$(OBJ) \
+ writeCase_z_f32$(OBJ) \
+ writeCase_z_f64$(OBJ) \
+ writeCase_z_extF80M$(OBJ) \
+ writeCase_z_f128M$(OBJ) \
+
+OBJS_TEST = \
+ test_a_ui32_z_f16$(OBJ) \
+ test_a_ui32_z_f32$(OBJ) \
+ test_a_ui32_z_f64$(OBJ) \
+ test_a_ui32_z_extF80$(OBJ) \
+ test_a_ui32_z_f128$(OBJ) \
+ test_a_ui64_z_f16$(OBJ) \
+ test_a_ui64_z_f32$(OBJ) \
+ test_a_ui64_z_f64$(OBJ) \
+ test_a_ui64_z_extF80$(OBJ) \
+ test_a_ui64_z_f128$(OBJ) \
+ test_a_i32_z_f16$(OBJ) \
+ test_a_i32_z_f32$(OBJ) \
+ test_a_i32_z_f64$(OBJ) \
+ test_a_i32_z_extF80$(OBJ) \
+ test_a_i32_z_f128$(OBJ) \
+ test_a_i64_z_f16$(OBJ) \
+ test_a_i64_z_f32$(OBJ) \
+ test_a_i64_z_f64$(OBJ) \
+ test_a_i64_z_extF80$(OBJ) \
+ test_a_i64_z_f128$(OBJ) \
+ test_a_f16_z_ui32_rx$(OBJ) \
+ test_a_f16_z_ui64_rx$(OBJ) \
+ test_a_f16_z_i32_rx$(OBJ) \
+ test_a_f16_z_i64_rx$(OBJ) \
+ test_a_f16_z_ui32_x$(OBJ) \
+ test_a_f16_z_ui64_x$(OBJ) \
+ test_a_f16_z_i32_x$(OBJ) \
+ test_a_f16_z_i64_x$(OBJ) \
+ test_a_f16_z_f32$(OBJ) \
+ test_a_f16_z_f64$(OBJ) \
+ test_a_f16_z_extF80$(OBJ) \
+ test_a_f16_z_f128$(OBJ) \
+ test_az_f16$(OBJ) \
+ test_az_f16_rx$(OBJ) \
+ test_abz_f16$(OBJ) \
+ test_abcz_f16$(OBJ) \
+ test_ab_f16_z_bool$(OBJ) \
+ test_a_f32_z_ui32_rx$(OBJ) \
+ test_a_f32_z_ui64_rx$(OBJ) \
+ test_a_f32_z_i32_rx$(OBJ) \
+ test_a_f32_z_i64_rx$(OBJ) \
+ test_a_f32_z_ui32_x$(OBJ) \
+ test_a_f32_z_ui64_x$(OBJ) \
+ test_a_f32_z_i32_x$(OBJ) \
+ test_a_f32_z_i64_x$(OBJ) \
+ test_a_f32_z_f16$(OBJ) \
+ test_a_f32_z_f64$(OBJ) \
+ test_a_f32_z_extF80$(OBJ) \
+ test_a_f32_z_f128$(OBJ) \
+ test_az_f32$(OBJ) \
+ test_az_f32_rx$(OBJ) \
+ test_abz_f32$(OBJ) \
+ test_abcz_f32$(OBJ) \
+ test_ab_f32_z_bool$(OBJ) \
+ test_a_f64_z_ui32_rx$(OBJ) \
+ test_a_f64_z_ui64_rx$(OBJ) \
+ test_a_f64_z_i32_rx$(OBJ) \
+ test_a_f64_z_i64_rx$(OBJ) \
+ test_a_f64_z_ui32_x$(OBJ) \
+ test_a_f64_z_ui64_x$(OBJ) \
+ test_a_f64_z_i32_x$(OBJ) \
+ test_a_f64_z_i64_x$(OBJ) \
+ test_a_f64_z_f16$(OBJ) \
+ test_a_f64_z_f32$(OBJ) \
+ test_a_f64_z_extF80$(OBJ) \
+ test_a_f64_z_f128$(OBJ) \
+ test_az_f64$(OBJ) \
+ test_az_f64_rx$(OBJ) \
+ test_abz_f64$(OBJ) \
+ test_abcz_f64$(OBJ) \
+ test_ab_f64_z_bool$(OBJ) \
+ test_a_extF80_z_ui32_rx$(OBJ) \
+ test_a_extF80_z_ui64_rx$(OBJ) \
+ test_a_extF80_z_i32_rx$(OBJ) \
+ test_a_extF80_z_i64_rx$(OBJ) \
+ test_a_extF80_z_ui32_x$(OBJ) \
+ test_a_extF80_z_ui64_x$(OBJ) \
+ test_a_extF80_z_i32_x$(OBJ) \
+ test_a_extF80_z_i64_x$(OBJ) \
+ test_a_extF80_z_f16$(OBJ) \
+ test_a_extF80_z_f32$(OBJ) \
+ test_a_extF80_z_f64$(OBJ) \
+ test_a_extF80_z_f128$(OBJ) \
+ test_az_extF80$(OBJ) \
+ test_az_extF80_rx$(OBJ) \
+ test_abz_extF80$(OBJ) \
+ test_ab_extF80_z_bool$(OBJ) \
+ test_a_f128_z_ui32_rx$(OBJ) \
+ test_a_f128_z_ui64_rx$(OBJ) \
+ test_a_f128_z_i32_rx$(OBJ) \
+ test_a_f128_z_i64_rx$(OBJ) \
+ test_a_f128_z_ui32_x$(OBJ) \
+ test_a_f128_z_ui64_x$(OBJ) \
+ test_a_f128_z_i32_x$(OBJ) \
+ test_a_f128_z_i64_x$(OBJ) \
+ test_a_f128_z_f16$(OBJ) \
+ test_a_f128_z_f32$(OBJ) \
+ test_a_f128_z_f64$(OBJ) \
+ test_a_f128_z_extF80$(OBJ) \
+ test_az_f128$(OBJ) \
+ test_az_f128_rx$(OBJ) \
+ test_abz_f128$(OBJ) \
+ test_abcz_f128$(OBJ) \
+ test_ab_f128_z_bool$(OBJ) \
+
+OBJS_LIB = \
+ uint128_inline$(OBJ) \
+ uint128$(OBJ) \
+ fail$(OBJ) \
+ functions_common$(OBJ) \
+ functionInfos$(OBJ) \
+ standardFunctionInfos$(OBJ) \
+ random$(OBJ) \
+ genCases_common$(OBJ) \
+ $(OBJS_GENCASES) \
+ genCases_writeTestsTotal$(OBJ) \
+ verCases_inline$(OBJ) \
+ verCases_common$(OBJ) \
+ verCases_writeFunctionName$(OBJ) \
+ readHex$(OBJ) \
+ writeHex$(OBJ) \
+ $(OBJS_WRITECASE) \
+ testLoops_common$(OBJ) \
+ $(OBJS_TEST) \
+
+uint128$(OBJ): $(SOURCE_DIR)/uint128.h
+fail$(OBJ): $(SOURCE_DIR)/fail.h
+functions_common$(OBJ): $(SOFTFLOAT_H) $(SOURCE_DIR)/functions.h
+functionInfos$(OBJ): $(SOURCE_DIR)/functions.h
+standardFunctionInfos$(OBJ): $(SOURCE_DIR)/functions.h
+random$(OBJ): $(SOURCE_DIR)/random.h
+genCases_common$(OBJ): $(SOURCE_DIR)/fail.h $(SOURCE_DIR)/genCases.h
+$(OBJS_GENCASES): \
+ $(SOURCE_DIR)/random.h $(SOFTFLOAT_H) $(SOURCE_DIR)/genCases.h
+genCases_f128$(OBJ): $(SOURCE_DIR)/uint128.h
+genCases_writeTestsTotal$(OBJ): $(SOURCE_DIR)/genCases.h
+verCases_common$(OBJ): $(SOURCE_DIR)/verCases.h
+verCases_writeFunctionName$(OBJ): $(SOURCE_DIR)/verCases.h
+readHex$(OBJ): $(SOURCE_DIR)/readHex.h
+writeHex$(OBJ): $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/writeHex.h
+$(OBJS_WRITECASE): \
+ $(SOFTFLOAT_H) $(SOURCE_DIR)/writeHex.h $(SOURCE_DIR)/writeCase.h
+testLoops_common$(OBJ): $(SOURCE_DIR)/testLoops.h
+$(OBJS_TEST): \
+ $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/genCases.h \
+ $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h $(SOURCE_DIR)/testLoops.h
+$(OBJS_LIB): %$(OBJ): platform.h $(SOURCE_DIR)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$*.c
+testfloat$(LIB): $(OBJS_LIB)
+ $(MAKELIB) $^
+
+OBJS_TESTSOFTFLOAT = slowfloat$(OBJ) testsoftfloat$(OBJ)
+
+slowfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/slowfloat.h $(SOURCE_DIR)/slowfloat.c
+ $(COMPILE_SLOWFLOAT_C) $(SOURCE_DIR)/slowfloat.c
+testsoftfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/slowfloat.h $(SOURCE_DIR)/functions.h \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h \
+ $(SOURCE_DIR)/testLoops.h $(SOURCE_DIR)/testsoftfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/testsoftfloat.c
+
+testsoftfloat$(EXE): $(OBJS_TESTSOFTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TIMESOFTFLOAT = timesoftfloat$(OBJ)
+
+timesoftfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/timesoftfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/timesoftfloat.c
+
+timesoftfloat$(EXE): $(OBJS_TIMESOFTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TESTFLOAT_GEN = genLoops$(OBJ) testfloat_gen$(OBJ)
+
+genLoops$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/writeHex.h $(SOURCE_DIR)/genLoops.h \
+ $(SOURCE_DIR)/genLoops.c
+ $(COMPILE_C) $(SOURCE_DIR)/genLoops.c
+testfloat_gen$(OBJ): \
+ $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) $(SOURCE_DIR)/functions.h \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/genLoops.h \
+ $(SOURCE_DIR)/testfloat_gen.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat_gen.c
+
+testfloat_gen$(EXE): $(OBJS_TESTFLOAT_GEN) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TESTFLOAT_VER = verLoops$(OBJ) testfloat_ver$(OBJ)
+
+verLoops$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/readHex.h $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h \
+ $(SOURCE_DIR)/verLoops.h $(SOURCE_DIR)/verLoops.c
+ $(COMPILE_C) $(SOURCE_DIR)/verLoops.c
+testfloat_ver$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/verCases.h \
+ $(SOURCE_DIR)/writeCase.h $(SOURCE_DIR)/verLoops.h \
+ $(SOURCE_DIR)/testfloat_ver.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat_ver.c
+
+testfloat_ver$(EXE): $(OBJS_TESTFLOAT_VER) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TESTFLOAT = subjfloat$(OBJ) subjfloat_functions$(OBJ) testfloat$(OBJ)
+
+subjfloat$(OBJ): \
+ platform.h $(SOFTFLOAT_H) $(SUBJ_SOURCE_DIR)/subjfloat_config.h \
+ $(SOURCE_DIR)/subjfloat.h $(SUBJ_SOURCE_DIR)/subjfloat.c
+ $(COMPILE_C) $(SUBJ_SOURCE_DIR)/subjfloat.c
+subjfloat_functions$(OBJ): \
+ platform.h $(SUBJ_SOURCE_DIR)/subjfloat_config.h $(SOURCE_DIR)/subjfloat.h \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/subjfloat_functions.c
+ $(COMPILE_C) $(SOURCE_DIR)/subjfloat_functions.c
+testfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SUBJ_SOURCE_DIR)/subjfloat_config.h $(SOURCE_DIR)/subjfloat.h \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/verCases.h \
+ $(SOURCE_DIR)/testLoops.h $(SOURCE_DIR)/testfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat.c
+
+testfloat$(EXE): $(OBJS_TESTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+.PHONY: clean
+clean:
+ $(DELETE) $(OBJS_LIB) testfloat$(LIB)
+ $(DELETE) $(OBJS_TESTSOFTFLOAT) testsoftfloat$(EXE)
+ $(DELETE) $(OBJS_TIMESOFTFLOAT) timesoftfloat$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT_GEN) testfloat_gen$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT_VER) testfloat_ver$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT) testfloat$(EXE)
+
diff --git a/src/libs/softfloat-3e/testfloat/build/Linux-ARM-VFPv2-GCC/platform.h b/src/libs/softfloat-3e/testfloat/build/Linux-ARM-VFPv2-GCC/platform.h
new file mode 100644
index 00000000..8b0de318
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Linux-ARM-VFPv2-GCC/platform.h
@@ -0,0 +1,49 @@
+
+/*============================================================================
+
+This C header file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define LITTLEENDIAN 1
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef __GNUC_STDC_INLINE__
+#define INLINE inline
+#else
+#define INLINE extern inline
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/build/Linux-x86_64-GCC/Makefile b/src/libs/softfloat-3e/testfloat/build/Linux-x86_64-GCC/Makefile
new file mode 100644
index 00000000..73eca95b
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Linux-x86_64-GCC/Makefile
@@ -0,0 +1,355 @@
+
+#=============================================================================
+#
+# This Makefile is part of TestFloat, Release 3e, a package of programs for
+# testing the correctness of floating-point arithmetic complying with the IEEE
+# Standard for Floating-Point, by John R. Hauser.
+#
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+# University of California. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions, and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions, and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# 3. Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#=============================================================================
+
+SOURCE_DIR ?= ../../source
+SOFTFLOAT_DIR ?= ../../../SoftFloat-3e
+PLATFORM ?= Linux-x86_64-GCC
+
+SUBJ_SOURCE_DIR = $(SOURCE_DIR)/subj-C
+SOFTFLOAT_INCLUDE_DIR = $(SOFTFLOAT_DIR)/source/include
+
+SOFTFLOAT_H = \
+ $(SOFTFLOAT_INCLUDE_DIR)/softfloat_types.h \
+ $(SOFTFLOAT_INCLUDE_DIR)/softfloat.h
+SOFTFLOAT_LIB = $(SOFTFLOAT_DIR)/build/$(PLATFORM)/softfloat$(LIB)
+
+TESTFLOAT_OPTS ?= \
+ -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD \
+ -DLONG_DOUBLE_IS_EXTFLOAT80
+
+DELETE = rm -f
+C_INCLUDES = \
+ -I. -I$(SUBJ_SOURCE_DIR) -I$(SOURCE_DIR) -I$(SOFTFLOAT_INCLUDE_DIR)
+COMPILE_C = \
+ gcc -c -Werror-implicit-function-declaration $(TESTFLOAT_OPTS) \
+ $(C_INCLUDES) -O2 -o $@
+COMPILE_SLOWFLOAT_C = \
+ gcc -c -Werror-implicit-function-declaration $(TESTFLOAT_OPTS) \
+ $(C_INCLUDES) -O3 -o $@
+MAKELIB = ar crs $@
+LINK = gcc -o $@
+OTHER_LIBS = -lm
+
+OBJ = .o
+LIB = .a
+EXE =
+
+.PHONY: all
+all: \
+ testsoftfloat$(EXE) \
+ timesoftfloat$(EXE) \
+ testfloat_gen$(EXE) \
+ testfloat_ver$(EXE) \
+ testfloat$(EXE) \
+
+OBJS_GENCASES = \
+ genCases_ui32$(OBJ) \
+ genCases_ui64$(OBJ) \
+ genCases_i32$(OBJ) \
+ genCases_i64$(OBJ) \
+ genCases_f16$(OBJ) \
+ genCases_f32$(OBJ) \
+ genCases_f64$(OBJ) \
+ genCases_extF80$(OBJ) \
+ genCases_f128$(OBJ) \
+
+OBJS_WRITECASE = \
+ writeCase_a_ui32$(OBJ) \
+ writeCase_a_ui64$(OBJ) \
+ writeCase_a_f16$(OBJ) \
+ writeCase_ab_f16$(OBJ) \
+ writeCase_abc_f16$(OBJ) \
+ writeCase_a_f32$(OBJ) \
+ writeCase_ab_f32$(OBJ) \
+ writeCase_abc_f32$(OBJ) \
+ writeCase_a_f64$(OBJ) \
+ writeCase_ab_f64$(OBJ) \
+ writeCase_abc_f64$(OBJ) \
+ writeCase_a_extF80M$(OBJ) \
+ writeCase_ab_extF80M$(OBJ) \
+ writeCase_a_f128M$(OBJ) \
+ writeCase_ab_f128M$(OBJ) \
+ writeCase_abc_f128M$(OBJ) \
+ writeCase_z_bool$(OBJ) \
+ writeCase_z_ui32$(OBJ) \
+ writeCase_z_ui64$(OBJ) \
+ writeCase_z_f16$(OBJ) \
+ writeCase_z_f32$(OBJ) \
+ writeCase_z_f64$(OBJ) \
+ writeCase_z_extF80M$(OBJ) \
+ writeCase_z_f128M$(OBJ) \
+
+OBJS_TEST = \
+ test_a_ui32_z_f16$(OBJ) \
+ test_a_ui32_z_f32$(OBJ) \
+ test_a_ui32_z_f64$(OBJ) \
+ test_a_ui32_z_extF80$(OBJ) \
+ test_a_ui32_z_f128$(OBJ) \
+ test_a_ui64_z_f16$(OBJ) \
+ test_a_ui64_z_f32$(OBJ) \
+ test_a_ui64_z_f64$(OBJ) \
+ test_a_ui64_z_extF80$(OBJ) \
+ test_a_ui64_z_f128$(OBJ) \
+ test_a_i32_z_f16$(OBJ) \
+ test_a_i32_z_f32$(OBJ) \
+ test_a_i32_z_f64$(OBJ) \
+ test_a_i32_z_extF80$(OBJ) \
+ test_a_i32_z_f128$(OBJ) \
+ test_a_i64_z_f16$(OBJ) \
+ test_a_i64_z_f32$(OBJ) \
+ test_a_i64_z_f64$(OBJ) \
+ test_a_i64_z_extF80$(OBJ) \
+ test_a_i64_z_f128$(OBJ) \
+ test_a_f16_z_ui32_rx$(OBJ) \
+ test_a_f16_z_ui64_rx$(OBJ) \
+ test_a_f16_z_i32_rx$(OBJ) \
+ test_a_f16_z_i64_rx$(OBJ) \
+ test_a_f16_z_ui32_x$(OBJ) \
+ test_a_f16_z_ui64_x$(OBJ) \
+ test_a_f16_z_i32_x$(OBJ) \
+ test_a_f16_z_i64_x$(OBJ) \
+ test_a_f16_z_f32$(OBJ) \
+ test_a_f16_z_f64$(OBJ) \
+ test_a_f16_z_extF80$(OBJ) \
+ test_a_f16_z_f128$(OBJ) \
+ test_az_f16$(OBJ) \
+ test_az_f16_rx$(OBJ) \
+ test_abz_f16$(OBJ) \
+ test_abcz_f16$(OBJ) \
+ test_ab_f16_z_bool$(OBJ) \
+ test_a_f32_z_ui32_rx$(OBJ) \
+ test_a_f32_z_ui64_rx$(OBJ) \
+ test_a_f32_z_i32_rx$(OBJ) \
+ test_a_f32_z_i64_rx$(OBJ) \
+ test_a_f32_z_ui32_x$(OBJ) \
+ test_a_f32_z_ui64_x$(OBJ) \
+ test_a_f32_z_i32_x$(OBJ) \
+ test_a_f32_z_i64_x$(OBJ) \
+ test_a_f32_z_f16$(OBJ) \
+ test_a_f32_z_f64$(OBJ) \
+ test_a_f32_z_extF80$(OBJ) \
+ test_a_f32_z_f128$(OBJ) \
+ test_az_f32$(OBJ) \
+ test_az_f32_rx$(OBJ) \
+ test_abz_f32$(OBJ) \
+ test_abcz_f32$(OBJ) \
+ test_ab_f32_z_bool$(OBJ) \
+ test_a_f64_z_ui32_rx$(OBJ) \
+ test_a_f64_z_ui64_rx$(OBJ) \
+ test_a_f64_z_i32_rx$(OBJ) \
+ test_a_f64_z_i64_rx$(OBJ) \
+ test_a_f64_z_ui32_x$(OBJ) \
+ test_a_f64_z_ui64_x$(OBJ) \
+ test_a_f64_z_i32_x$(OBJ) \
+ test_a_f64_z_i64_x$(OBJ) \
+ test_a_f64_z_f16$(OBJ) \
+ test_a_f64_z_f32$(OBJ) \
+ test_a_f64_z_extF80$(OBJ) \
+ test_a_f64_z_f128$(OBJ) \
+ test_az_f64$(OBJ) \
+ test_az_f64_rx$(OBJ) \
+ test_abz_f64$(OBJ) \
+ test_abcz_f64$(OBJ) \
+ test_ab_f64_z_bool$(OBJ) \
+ test_a_extF80_z_ui32_rx$(OBJ) \
+ test_a_extF80_z_ui64_rx$(OBJ) \
+ test_a_extF80_z_i32_rx$(OBJ) \
+ test_a_extF80_z_i64_rx$(OBJ) \
+ test_a_extF80_z_ui32_x$(OBJ) \
+ test_a_extF80_z_ui64_x$(OBJ) \
+ test_a_extF80_z_i32_x$(OBJ) \
+ test_a_extF80_z_i64_x$(OBJ) \
+ test_a_extF80_z_f16$(OBJ) \
+ test_a_extF80_z_f32$(OBJ) \
+ test_a_extF80_z_f64$(OBJ) \
+ test_a_extF80_z_f128$(OBJ) \
+ test_az_extF80$(OBJ) \
+ test_az_extF80_rx$(OBJ) \
+ test_abz_extF80$(OBJ) \
+ test_ab_extF80_z_bool$(OBJ) \
+ test_a_f128_z_ui32_rx$(OBJ) \
+ test_a_f128_z_ui64_rx$(OBJ) \
+ test_a_f128_z_i32_rx$(OBJ) \
+ test_a_f128_z_i64_rx$(OBJ) \
+ test_a_f128_z_ui32_x$(OBJ) \
+ test_a_f128_z_ui64_x$(OBJ) \
+ test_a_f128_z_i32_x$(OBJ) \
+ test_a_f128_z_i64_x$(OBJ) \
+ test_a_f128_z_f16$(OBJ) \
+ test_a_f128_z_f32$(OBJ) \
+ test_a_f128_z_f64$(OBJ) \
+ test_a_f128_z_extF80$(OBJ) \
+ test_az_f128$(OBJ) \
+ test_az_f128_rx$(OBJ) \
+ test_abz_f128$(OBJ) \
+ test_abcz_f128$(OBJ) \
+ test_ab_f128_z_bool$(OBJ) \
+
+OBJS_LIB = \
+ uint128_inline$(OBJ) \
+ uint128$(OBJ) \
+ fail$(OBJ) \
+ functions_common$(OBJ) \
+ functionInfos$(OBJ) \
+ standardFunctionInfos$(OBJ) \
+ random$(OBJ) \
+ genCases_common$(OBJ) \
+ $(OBJS_GENCASES) \
+ genCases_writeTestsTotal$(OBJ) \
+ verCases_inline$(OBJ) \
+ verCases_common$(OBJ) \
+ verCases_writeFunctionName$(OBJ) \
+ readHex$(OBJ) \
+ writeHex$(OBJ) \
+ $(OBJS_WRITECASE) \
+ testLoops_common$(OBJ) \
+ $(OBJS_TEST) \
+
+uint128$(OBJ): $(SOURCE_DIR)/uint128.h
+fail$(OBJ): $(SOURCE_DIR)/fail.h
+functions_common$(OBJ): $(SOFTFLOAT_H) $(SOURCE_DIR)/functions.h
+functionInfos$(OBJ): $(SOURCE_DIR)/functions.h
+standardFunctionInfos$(OBJ): $(SOURCE_DIR)/functions.h
+random$(OBJ): $(SOURCE_DIR)/random.h
+genCases_common$(OBJ): $(SOURCE_DIR)/fail.h $(SOURCE_DIR)/genCases.h
+$(OBJS_GENCASES): \
+ $(SOURCE_DIR)/random.h $(SOFTFLOAT_H) $(SOURCE_DIR)/genCases.h
+genCases_f128$(OBJ): $(SOURCE_DIR)/uint128.h
+genCases_writeTestsTotal$(OBJ): $(SOURCE_DIR)/genCases.h
+verCases_common$(OBJ): $(SOURCE_DIR)/verCases.h
+verCases_writeFunctionName$(OBJ): $(SOURCE_DIR)/verCases.h
+readHex$(OBJ): $(SOURCE_DIR)/readHex.h
+writeHex$(OBJ): $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/writeHex.h
+$(OBJS_WRITECASE): \
+ $(SOFTFLOAT_H) $(SOURCE_DIR)/writeHex.h $(SOURCE_DIR)/writeCase.h
+testLoops_common$(OBJ): $(SOURCE_DIR)/testLoops.h
+$(OBJS_TEST): \
+ $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/genCases.h \
+ $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h $(SOURCE_DIR)/testLoops.h
+$(OBJS_LIB): %$(OBJ): platform.h $(SOURCE_DIR)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$*.c
+testfloat$(LIB): $(OBJS_LIB)
+ $(MAKELIB) $^
+
+OBJS_TESTSOFTFLOAT = slowfloat$(OBJ) testsoftfloat$(OBJ)
+
+slowfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/slowfloat.h $(SOURCE_DIR)/slowfloat.c
+ $(COMPILE_SLOWFLOAT_C) $(SOURCE_DIR)/slowfloat.c
+testsoftfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/slowfloat.h $(SOURCE_DIR)/functions.h \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h \
+ $(SOURCE_DIR)/testLoops.h $(SOURCE_DIR)/testsoftfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/testsoftfloat.c
+
+testsoftfloat$(EXE): $(OBJS_TESTSOFTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TIMESOFTFLOAT = timesoftfloat$(OBJ)
+
+timesoftfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/timesoftfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/timesoftfloat.c
+
+timesoftfloat$(EXE): $(OBJS_TIMESOFTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TESTFLOAT_GEN = genLoops$(OBJ) testfloat_gen$(OBJ)
+
+genLoops$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/writeHex.h $(SOURCE_DIR)/genLoops.h \
+ $(SOURCE_DIR)/genLoops.c
+ $(COMPILE_C) $(SOURCE_DIR)/genLoops.c
+testfloat_gen$(OBJ): \
+ $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) $(SOURCE_DIR)/functions.h \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/genLoops.h \
+ $(SOURCE_DIR)/testfloat_gen.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat_gen.c
+
+testfloat_gen$(EXE): $(OBJS_TESTFLOAT_GEN) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TESTFLOAT_VER = verLoops$(OBJ) testfloat_ver$(OBJ)
+
+verLoops$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/readHex.h $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h \
+ $(SOURCE_DIR)/verLoops.h $(SOURCE_DIR)/verLoops.c
+ $(COMPILE_C) $(SOURCE_DIR)/verLoops.c
+testfloat_ver$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/verCases.h \
+ $(SOURCE_DIR)/writeCase.h $(SOURCE_DIR)/verLoops.h \
+ $(SOURCE_DIR)/testfloat_ver.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat_ver.c
+
+testfloat_ver$(EXE): $(OBJS_TESTFLOAT_VER) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TESTFLOAT = subjfloat$(OBJ) subjfloat_functions$(OBJ) testfloat$(OBJ)
+
+subjfloat$(OBJ): \
+ platform.h $(SOFTFLOAT_H) $(SUBJ_SOURCE_DIR)/subjfloat_config.h \
+ $(SOURCE_DIR)/subjfloat.h $(SUBJ_SOURCE_DIR)/subjfloat.c
+ $(COMPILE_C) $(SUBJ_SOURCE_DIR)/subjfloat.c
+subjfloat_functions$(OBJ): \
+ platform.h $(SUBJ_SOURCE_DIR)/subjfloat_config.h $(SOURCE_DIR)/subjfloat.h \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/subjfloat_functions.c
+ $(COMPILE_C) $(SOURCE_DIR)/subjfloat_functions.c
+testfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SUBJ_SOURCE_DIR)/subjfloat_config.h $(SOURCE_DIR)/subjfloat.h \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/verCases.h \
+ $(SOURCE_DIR)/testLoops.h $(SOURCE_DIR)/testfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat.c
+
+testfloat$(EXE): $(OBJS_TESTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+.PHONY: clean
+clean:
+ $(DELETE) $(OBJS_LIB) testfloat$(LIB)
+ $(DELETE) $(OBJS_TESTSOFTFLOAT) testsoftfloat$(EXE)
+ $(DELETE) $(OBJS_TIMESOFTFLOAT) timesoftfloat$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT_GEN) testfloat_gen$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT_VER) testfloat_ver$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT) testfloat$(EXE)
+
diff --git a/src/libs/softfloat-3e/testfloat/build/Linux-x86_64-GCC/platform.h b/src/libs/softfloat-3e/testfloat/build/Linux-x86_64-GCC/platform.h
new file mode 100644
index 00000000..8b0de318
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Linux-x86_64-GCC/platform.h
@@ -0,0 +1,49 @@
+
+/*============================================================================
+
+This C header file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define LITTLEENDIAN 1
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef __GNUC_STDC_INLINE__
+#define INLINE inline
+#else
+#define INLINE extern inline
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/build/Win32-MinGW/Makefile b/src/libs/softfloat-3e/testfloat/build/Win32-MinGW/Makefile
new file mode 100644
index 00000000..ca6e9625
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Win32-MinGW/Makefile
@@ -0,0 +1,355 @@
+
+#=============================================================================
+#
+# This Makefile is part of TestFloat, Release 3e, a package of programs for
+# testing the correctness of floating-point arithmetic complying with the IEEE
+# Standard for Floating-Point, by John R. Hauser.
+#
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+# University of California. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions, and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions, and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# 3. Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#=============================================================================
+
+SOURCE_DIR ?= ../../source
+SOFTFLOAT_DIR ?= ../../../SoftFloat-3e
+PLATFORM ?= Win32-MinGW
+
+SUBJ_SOURCE_DIR = $(SOURCE_DIR)/subj-C
+SOFTFLOAT_INCLUDE_DIR = $(SOFTFLOAT_DIR)/source/include
+
+SOFTFLOAT_H = \
+ $(SOFTFLOAT_INCLUDE_DIR)/softfloat_types.h \
+ $(SOFTFLOAT_INCLUDE_DIR)/softfloat.h
+SOFTFLOAT_LIB = $(SOFTFLOAT_DIR)/build/$(PLATFORM)/softfloat$(LIB)
+
+TESTFLOAT_OPTS ?= \
+ -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD \
+ -DLONG_DOUBLE_IS_EXTFLOAT80
+
+DELETE = rm -f
+C_INCLUDES = \
+ -I. -I$(SUBJ_SOURCE_DIR) -I$(SOURCE_DIR) -I$(SOFTFLOAT_INCLUDE_DIR)
+COMPILE_C = \
+ gcc -std=c99 -c -Werror-implicit-function-declaration $(TESTFLOAT_OPTS) \
+ $(C_INCLUDES) -O2 -o $@
+COMPILE_SLOWFLOAT_C = \
+ gcc -std=c99 -c -Werror-implicit-function-declaration $(TESTFLOAT_OPTS) \
+ $(C_INCLUDES) -O3 -o $@
+MAKELIB = ar crs $@
+LINK = gcc -o $@
+OTHER_LIBS = -lm
+
+OBJ = .o
+LIB = .a
+EXE = .exe
+
+.PHONY: all
+all: \
+ testsoftfloat$(EXE) \
+ timesoftfloat$(EXE) \
+ testfloat_gen$(EXE) \
+ testfloat_ver$(EXE) \
+ testfloat$(EXE) \
+
+OBJS_GENCASES = \
+ genCases_ui32$(OBJ) \
+ genCases_ui64$(OBJ) \
+ genCases_i32$(OBJ) \
+ genCases_i64$(OBJ) \
+ genCases_f16$(OBJ) \
+ genCases_f32$(OBJ) \
+ genCases_f64$(OBJ) \
+ genCases_extF80$(OBJ) \
+ genCases_f128$(OBJ) \
+
+OBJS_WRITECASE = \
+ writeCase_a_ui32$(OBJ) \
+ writeCase_a_ui64$(OBJ) \
+ writeCase_a_f16$(OBJ) \
+ writeCase_ab_f16$(OBJ) \
+ writeCase_abc_f16$(OBJ) \
+ writeCase_a_f32$(OBJ) \
+ writeCase_ab_f32$(OBJ) \
+ writeCase_abc_f32$(OBJ) \
+ writeCase_a_f64$(OBJ) \
+ writeCase_ab_f64$(OBJ) \
+ writeCase_abc_f64$(OBJ) \
+ writeCase_a_extF80M$(OBJ) \
+ writeCase_ab_extF80M$(OBJ) \
+ writeCase_a_f128M$(OBJ) \
+ writeCase_ab_f128M$(OBJ) \
+ writeCase_abc_f128M$(OBJ) \
+ writeCase_z_bool$(OBJ) \
+ writeCase_z_ui32$(OBJ) \
+ writeCase_z_ui64$(OBJ) \
+ writeCase_z_f16$(OBJ) \
+ writeCase_z_f32$(OBJ) \
+ writeCase_z_f64$(OBJ) \
+ writeCase_z_extF80M$(OBJ) \
+ writeCase_z_f128M$(OBJ) \
+
+OBJS_TEST = \
+ test_a_ui32_z_f16$(OBJ) \
+ test_a_ui32_z_f32$(OBJ) \
+ test_a_ui32_z_f64$(OBJ) \
+ test_a_ui32_z_extF80$(OBJ) \
+ test_a_ui32_z_f128$(OBJ) \
+ test_a_ui64_z_f16$(OBJ) \
+ test_a_ui64_z_f32$(OBJ) \
+ test_a_ui64_z_f64$(OBJ) \
+ test_a_ui64_z_extF80$(OBJ) \
+ test_a_ui64_z_f128$(OBJ) \
+ test_a_i32_z_f16$(OBJ) \
+ test_a_i32_z_f32$(OBJ) \
+ test_a_i32_z_f64$(OBJ) \
+ test_a_i32_z_extF80$(OBJ) \
+ test_a_i32_z_f128$(OBJ) \
+ test_a_i64_z_f16$(OBJ) \
+ test_a_i64_z_f32$(OBJ) \
+ test_a_i64_z_f64$(OBJ) \
+ test_a_i64_z_extF80$(OBJ) \
+ test_a_i64_z_f128$(OBJ) \
+ test_a_f16_z_ui32_rx$(OBJ) \
+ test_a_f16_z_ui64_rx$(OBJ) \
+ test_a_f16_z_i32_rx$(OBJ) \
+ test_a_f16_z_i64_rx$(OBJ) \
+ test_a_f16_z_ui32_x$(OBJ) \
+ test_a_f16_z_ui64_x$(OBJ) \
+ test_a_f16_z_i32_x$(OBJ) \
+ test_a_f16_z_i64_x$(OBJ) \
+ test_a_f16_z_f32$(OBJ) \
+ test_a_f16_z_f64$(OBJ) \
+ test_a_f16_z_extF80$(OBJ) \
+ test_a_f16_z_f128$(OBJ) \
+ test_az_f16$(OBJ) \
+ test_az_f16_rx$(OBJ) \
+ test_abz_f16$(OBJ) \
+ test_abcz_f16$(OBJ) \
+ test_ab_f16_z_bool$(OBJ) \
+ test_a_f32_z_ui32_rx$(OBJ) \
+ test_a_f32_z_ui64_rx$(OBJ) \
+ test_a_f32_z_i32_rx$(OBJ) \
+ test_a_f32_z_i64_rx$(OBJ) \
+ test_a_f32_z_ui32_x$(OBJ) \
+ test_a_f32_z_ui64_x$(OBJ) \
+ test_a_f32_z_i32_x$(OBJ) \
+ test_a_f32_z_i64_x$(OBJ) \
+ test_a_f32_z_f16$(OBJ) \
+ test_a_f32_z_f64$(OBJ) \
+ test_a_f32_z_extF80$(OBJ) \
+ test_a_f32_z_f128$(OBJ) \
+ test_az_f32$(OBJ) \
+ test_az_f32_rx$(OBJ) \
+ test_abz_f32$(OBJ) \
+ test_abcz_f32$(OBJ) \
+ test_ab_f32_z_bool$(OBJ) \
+ test_a_f64_z_ui32_rx$(OBJ) \
+ test_a_f64_z_ui64_rx$(OBJ) \
+ test_a_f64_z_i32_rx$(OBJ) \
+ test_a_f64_z_i64_rx$(OBJ) \
+ test_a_f64_z_ui32_x$(OBJ) \
+ test_a_f64_z_ui64_x$(OBJ) \
+ test_a_f64_z_i32_x$(OBJ) \
+ test_a_f64_z_i64_x$(OBJ) \
+ test_a_f64_z_f16$(OBJ) \
+ test_a_f64_z_f32$(OBJ) \
+ test_a_f64_z_extF80$(OBJ) \
+ test_a_f64_z_f128$(OBJ) \
+ test_az_f64$(OBJ) \
+ test_az_f64_rx$(OBJ) \
+ test_abz_f64$(OBJ) \
+ test_abcz_f64$(OBJ) \
+ test_ab_f64_z_bool$(OBJ) \
+ test_a_extF80_z_ui32_rx$(OBJ) \
+ test_a_extF80_z_ui64_rx$(OBJ) \
+ test_a_extF80_z_i32_rx$(OBJ) \
+ test_a_extF80_z_i64_rx$(OBJ) \
+ test_a_extF80_z_ui32_x$(OBJ) \
+ test_a_extF80_z_ui64_x$(OBJ) \
+ test_a_extF80_z_i32_x$(OBJ) \
+ test_a_extF80_z_i64_x$(OBJ) \
+ test_a_extF80_z_f16$(OBJ) \
+ test_a_extF80_z_f32$(OBJ) \
+ test_a_extF80_z_f64$(OBJ) \
+ test_a_extF80_z_f128$(OBJ) \
+ test_az_extF80$(OBJ) \
+ test_az_extF80_rx$(OBJ) \
+ test_abz_extF80$(OBJ) \
+ test_ab_extF80_z_bool$(OBJ) \
+ test_a_f128_z_ui32_rx$(OBJ) \
+ test_a_f128_z_ui64_rx$(OBJ) \
+ test_a_f128_z_i32_rx$(OBJ) \
+ test_a_f128_z_i64_rx$(OBJ) \
+ test_a_f128_z_ui32_x$(OBJ) \
+ test_a_f128_z_ui64_x$(OBJ) \
+ test_a_f128_z_i32_x$(OBJ) \
+ test_a_f128_z_i64_x$(OBJ) \
+ test_a_f128_z_f16$(OBJ) \
+ test_a_f128_z_f32$(OBJ) \
+ test_a_f128_z_f64$(OBJ) \
+ test_a_f128_z_extF80$(OBJ) \
+ test_az_f128$(OBJ) \
+ test_az_f128_rx$(OBJ) \
+ test_abz_f128$(OBJ) \
+ test_abcz_f128$(OBJ) \
+ test_ab_f128_z_bool$(OBJ) \
+
+OBJS_LIB = \
+ uint128_inline$(OBJ) \
+ uint128$(OBJ) \
+ fail$(OBJ) \
+ functions_common$(OBJ) \
+ functionInfos$(OBJ) \
+ standardFunctionInfos$(OBJ) \
+ random$(OBJ) \
+ genCases_common$(OBJ) \
+ $(OBJS_GENCASES) \
+ genCases_writeTestsTotal$(OBJ) \
+ verCases_inline$(OBJ) \
+ verCases_common$(OBJ) \
+ verCases_writeFunctionName$(OBJ) \
+ readHex$(OBJ) \
+ writeHex$(OBJ) \
+ $(OBJS_WRITECASE) \
+ testLoops_common$(OBJ) \
+ $(OBJS_TEST) \
+
+uint128$(OBJ): $(SOURCE_DIR)/uint128.h
+fail$(OBJ): $(SOURCE_DIR)/fail.h
+functions_common$(OBJ): $(SOFTFLOAT_H) $(SOURCE_DIR)/functions.h
+functionInfos$(OBJ): $(SOURCE_DIR)/functions.h
+standardFunctionInfos$(OBJ): $(SOURCE_DIR)/functions.h
+random$(OBJ): $(SOURCE_DIR)/random.h
+genCases_common$(OBJ): $(SOURCE_DIR)/fail.h $(SOURCE_DIR)/genCases.h
+$(OBJS_GENCASES): \
+ $(SOURCE_DIR)/random.h $(SOFTFLOAT_H) $(SOURCE_DIR)/genCases.h
+genCases_f128$(OBJ): $(SOURCE_DIR)/uint128.h
+genCases_writeTestsTotal$(OBJ): $(SOURCE_DIR)/genCases.h
+verCases_common$(OBJ): $(SOURCE_DIR)/verCases.h
+verCases_writeFunctionName$(OBJ): $(SOURCE_DIR)/verCases.h
+readHex$(OBJ): $(SOURCE_DIR)/readHex.h
+writeHex$(OBJ): $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/writeHex.h
+$(OBJS_WRITECASE): \
+ $(SOFTFLOAT_H) $(SOURCE_DIR)/writeHex.h $(SOURCE_DIR)/writeCase.h
+testLoops_common$(OBJ): $(SOURCE_DIR)/testLoops.h
+$(OBJS_TEST): \
+ $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/genCases.h \
+ $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h $(SOURCE_DIR)/testLoops.h
+$(OBJS_LIB): %$(OBJ): platform.h $(SOURCE_DIR)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$*.c
+testfloat$(LIB): $(OBJS_LIB)
+ $(MAKELIB) $^
+
+OBJS_TESTSOFTFLOAT = slowfloat$(OBJ) testsoftfloat$(OBJ)
+
+slowfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/slowfloat.h $(SOURCE_DIR)/slowfloat.c
+ $(COMPILE_SLOWFLOAT_C) $(SOURCE_DIR)/slowfloat.c
+testsoftfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/slowfloat.h $(SOURCE_DIR)/functions.h \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h \
+ $(SOURCE_DIR)/testLoops.h $(SOURCE_DIR)/testsoftfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/testsoftfloat.c
+
+testsoftfloat$(EXE): $(OBJS_TESTSOFTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TIMESOFTFLOAT = timesoftfloat$(OBJ)
+
+timesoftfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/timesoftfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/timesoftfloat.c
+
+timesoftfloat$(EXE): $(OBJS_TIMESOFTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TESTFLOAT_GEN = genLoops$(OBJ) testfloat_gen$(OBJ)
+
+genLoops$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/writeHex.h $(SOURCE_DIR)/genLoops.h \
+ $(SOURCE_DIR)/genLoops.c
+ $(COMPILE_C) $(SOURCE_DIR)/genLoops.c
+testfloat_gen$(OBJ): \
+ $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) $(SOURCE_DIR)/functions.h \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/genLoops.h \
+ $(SOURCE_DIR)/testfloat_gen.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat_gen.c
+
+testfloat_gen$(EXE): $(OBJS_TESTFLOAT_GEN) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TESTFLOAT_VER = verLoops$(OBJ) testfloat_ver$(OBJ)
+
+verLoops$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/readHex.h $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h \
+ $(SOURCE_DIR)/verLoops.h $(SOURCE_DIR)/verLoops.c
+ $(COMPILE_C) $(SOURCE_DIR)/verLoops.c
+testfloat_ver$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/verCases.h \
+ $(SOURCE_DIR)/writeCase.h $(SOURCE_DIR)/verLoops.h \
+ $(SOURCE_DIR)/testfloat_ver.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat_ver.c
+
+testfloat_ver$(EXE): $(OBJS_TESTFLOAT_VER) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TESTFLOAT = subjfloat$(OBJ) subjfloat_functions$(OBJ) testfloat$(OBJ)
+
+subjfloat$(OBJ): \
+ platform.h $(SOFTFLOAT_H) $(SUBJ_SOURCE_DIR)/subjfloat_config.h \
+ $(SOURCE_DIR)/subjfloat.h $(SUBJ_SOURCE_DIR)/subjfloat.c
+ $(COMPILE_C) $(SUBJ_SOURCE_DIR)/subjfloat.c
+subjfloat_functions$(OBJ): \
+ platform.h $(SUBJ_SOURCE_DIR)/subjfloat_config.h $(SOURCE_DIR)/subjfloat.h \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/subjfloat_functions.c
+ $(COMPILE_C) $(SOURCE_DIR)/subjfloat_functions.c
+testfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SUBJ_SOURCE_DIR)/subjfloat_config.h $(SOURCE_DIR)/subjfloat.h \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/verCases.h \
+ $(SOURCE_DIR)/testLoops.h $(SOURCE_DIR)/testfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat.c
+
+testfloat$(EXE): $(OBJS_TESTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+.PHONY: clean
+clean:
+ $(DELETE) $(OBJS_LIB) testfloat$(LIB)
+ $(DELETE) $(OBJS_TESTSOFTFLOAT) testsoftfloat$(EXE)
+ $(DELETE) $(OBJS_TIMESOFTFLOAT) timesoftfloat$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT_GEN) testfloat_gen$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT_VER) testfloat_ver$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT) testfloat$(EXE)
+
diff --git a/src/libs/softfloat-3e/testfloat/build/Win32-MinGW/platform.h b/src/libs/softfloat-3e/testfloat/build/Win32-MinGW/platform.h
new file mode 100644
index 00000000..8b0de318
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Win32-MinGW/platform.h
@@ -0,0 +1,49 @@
+
+/*============================================================================
+
+This C header file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define LITTLEENDIAN 1
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef __GNUC_STDC_INLINE__
+#define INLINE inline
+#else
+#define INLINE extern inline
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/build/Win32-SSE2-MinGW/Makefile b/src/libs/softfloat-3e/testfloat/build/Win32-SSE2-MinGW/Makefile
new file mode 100644
index 00000000..a8a2894b
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Win32-SSE2-MinGW/Makefile
@@ -0,0 +1,355 @@
+
+#=============================================================================
+#
+# This Makefile is part of TestFloat, Release 3e, a package of programs for
+# testing the correctness of floating-point arithmetic complying with the IEEE
+# Standard for Floating-Point, by John R. Hauser.
+#
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+# University of California. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions, and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions, and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# 3. Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#=============================================================================
+
+SOURCE_DIR ?= ../../source
+SOFTFLOAT_DIR ?= ../../../SoftFloat-3e
+PLATFORM ?= Win32-SSE2-MinGW
+
+SUBJ_SOURCE_DIR = $(SOURCE_DIR)/subj-C
+SOFTFLOAT_INCLUDE_DIR = $(SOFTFLOAT_DIR)/source/include
+
+SOFTFLOAT_H = \
+ $(SOFTFLOAT_INCLUDE_DIR)/softfloat_types.h \
+ $(SOFTFLOAT_INCLUDE_DIR)/softfloat.h
+SOFTFLOAT_LIB = $(SOFTFLOAT_DIR)/build/$(PLATFORM)/softfloat$(LIB)
+
+TESTFLOAT_OPTS ?= \
+ -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD \
+ -DLONG_DOUBLE_IS_EXTFLOAT80
+
+DELETE = rm -f
+C_INCLUDES = \
+ -I. -I$(SUBJ_SOURCE_DIR) -I$(SOURCE_DIR) -I$(SOFTFLOAT_INCLUDE_DIR)
+COMPILE_C = \
+ gcc -std=c99 -c -Werror-implicit-function-declaration -msse2 -mfpmath=sse \
+ $(TESTFLOAT_OPTS) $(C_INCLUDES) -O2 -o $@
+COMPILE_SLOWFLOAT_C = \
+ gcc -std=c99 -c -Werror-implicit-function-declaration $(TESTFLOAT_OPTS) \
+ $(C_INCLUDES) -O3 -o $@
+MAKELIB = ar crs $@
+LINK = gcc -o $@
+OTHER_LIBS = -lm
+
+OBJ = .o
+LIB = .a
+EXE = .exe
+
+.PHONY: all
+all: \
+ testsoftfloat$(EXE) \
+ timesoftfloat$(EXE) \
+ testfloat_gen$(EXE) \
+ testfloat_ver$(EXE) \
+ testfloat$(EXE) \
+
+OBJS_GENCASES = \
+ genCases_ui32$(OBJ) \
+ genCases_ui64$(OBJ) \
+ genCases_i32$(OBJ) \
+ genCases_i64$(OBJ) \
+ genCases_f16$(OBJ) \
+ genCases_f32$(OBJ) \
+ genCases_f64$(OBJ) \
+ genCases_extF80$(OBJ) \
+ genCases_f128$(OBJ) \
+
+OBJS_WRITECASE = \
+ writeCase_a_ui32$(OBJ) \
+ writeCase_a_ui64$(OBJ) \
+ writeCase_a_f16$(OBJ) \
+ writeCase_ab_f16$(OBJ) \
+ writeCase_abc_f16$(OBJ) \
+ writeCase_a_f32$(OBJ) \
+ writeCase_ab_f32$(OBJ) \
+ writeCase_abc_f32$(OBJ) \
+ writeCase_a_f64$(OBJ) \
+ writeCase_ab_f64$(OBJ) \
+ writeCase_abc_f64$(OBJ) \
+ writeCase_a_extF80M$(OBJ) \
+ writeCase_ab_extF80M$(OBJ) \
+ writeCase_a_f128M$(OBJ) \
+ writeCase_ab_f128M$(OBJ) \
+ writeCase_abc_f128M$(OBJ) \
+ writeCase_z_bool$(OBJ) \
+ writeCase_z_ui32$(OBJ) \
+ writeCase_z_ui64$(OBJ) \
+ writeCase_z_f16$(OBJ) \
+ writeCase_z_f32$(OBJ) \
+ writeCase_z_f64$(OBJ) \
+ writeCase_z_extF80M$(OBJ) \
+ writeCase_z_f128M$(OBJ) \
+
+OBJS_TEST = \
+ test_a_ui32_z_f16$(OBJ) \
+ test_a_ui32_z_f32$(OBJ) \
+ test_a_ui32_z_f64$(OBJ) \
+ test_a_ui32_z_extF80$(OBJ) \
+ test_a_ui32_z_f128$(OBJ) \
+ test_a_ui64_z_f16$(OBJ) \
+ test_a_ui64_z_f32$(OBJ) \
+ test_a_ui64_z_f64$(OBJ) \
+ test_a_ui64_z_extF80$(OBJ) \
+ test_a_ui64_z_f128$(OBJ) \
+ test_a_i32_z_f16$(OBJ) \
+ test_a_i32_z_f32$(OBJ) \
+ test_a_i32_z_f64$(OBJ) \
+ test_a_i32_z_extF80$(OBJ) \
+ test_a_i32_z_f128$(OBJ) \
+ test_a_i64_z_f16$(OBJ) \
+ test_a_i64_z_f32$(OBJ) \
+ test_a_i64_z_f64$(OBJ) \
+ test_a_i64_z_extF80$(OBJ) \
+ test_a_i64_z_f128$(OBJ) \
+ test_a_f16_z_ui32_rx$(OBJ) \
+ test_a_f16_z_ui64_rx$(OBJ) \
+ test_a_f16_z_i32_rx$(OBJ) \
+ test_a_f16_z_i64_rx$(OBJ) \
+ test_a_f16_z_ui32_x$(OBJ) \
+ test_a_f16_z_ui64_x$(OBJ) \
+ test_a_f16_z_i32_x$(OBJ) \
+ test_a_f16_z_i64_x$(OBJ) \
+ test_a_f16_z_f32$(OBJ) \
+ test_a_f16_z_f64$(OBJ) \
+ test_a_f16_z_extF80$(OBJ) \
+ test_a_f16_z_f128$(OBJ) \
+ test_az_f16$(OBJ) \
+ test_az_f16_rx$(OBJ) \
+ test_abz_f16$(OBJ) \
+ test_abcz_f16$(OBJ) \
+ test_ab_f16_z_bool$(OBJ) \
+ test_a_f32_z_ui32_rx$(OBJ) \
+ test_a_f32_z_ui64_rx$(OBJ) \
+ test_a_f32_z_i32_rx$(OBJ) \
+ test_a_f32_z_i64_rx$(OBJ) \
+ test_a_f32_z_ui32_x$(OBJ) \
+ test_a_f32_z_ui64_x$(OBJ) \
+ test_a_f32_z_i32_x$(OBJ) \
+ test_a_f32_z_i64_x$(OBJ) \
+ test_a_f32_z_f16$(OBJ) \
+ test_a_f32_z_f64$(OBJ) \
+ test_a_f32_z_extF80$(OBJ) \
+ test_a_f32_z_f128$(OBJ) \
+ test_az_f32$(OBJ) \
+ test_az_f32_rx$(OBJ) \
+ test_abz_f32$(OBJ) \
+ test_abcz_f32$(OBJ) \
+ test_ab_f32_z_bool$(OBJ) \
+ test_a_f64_z_ui32_rx$(OBJ) \
+ test_a_f64_z_ui64_rx$(OBJ) \
+ test_a_f64_z_i32_rx$(OBJ) \
+ test_a_f64_z_i64_rx$(OBJ) \
+ test_a_f64_z_ui32_x$(OBJ) \
+ test_a_f64_z_ui64_x$(OBJ) \
+ test_a_f64_z_i32_x$(OBJ) \
+ test_a_f64_z_i64_x$(OBJ) \
+ test_a_f64_z_f16$(OBJ) \
+ test_a_f64_z_f32$(OBJ) \
+ test_a_f64_z_extF80$(OBJ) \
+ test_a_f64_z_f128$(OBJ) \
+ test_az_f64$(OBJ) \
+ test_az_f64_rx$(OBJ) \
+ test_abz_f64$(OBJ) \
+ test_abcz_f64$(OBJ) \
+ test_ab_f64_z_bool$(OBJ) \
+ test_a_extF80_z_ui32_rx$(OBJ) \
+ test_a_extF80_z_ui64_rx$(OBJ) \
+ test_a_extF80_z_i32_rx$(OBJ) \
+ test_a_extF80_z_i64_rx$(OBJ) \
+ test_a_extF80_z_ui32_x$(OBJ) \
+ test_a_extF80_z_ui64_x$(OBJ) \
+ test_a_extF80_z_i32_x$(OBJ) \
+ test_a_extF80_z_i64_x$(OBJ) \
+ test_a_extF80_z_f16$(OBJ) \
+ test_a_extF80_z_f32$(OBJ) \
+ test_a_extF80_z_f64$(OBJ) \
+ test_a_extF80_z_f128$(OBJ) \
+ test_az_extF80$(OBJ) \
+ test_az_extF80_rx$(OBJ) \
+ test_abz_extF80$(OBJ) \
+ test_ab_extF80_z_bool$(OBJ) \
+ test_a_f128_z_ui32_rx$(OBJ) \
+ test_a_f128_z_ui64_rx$(OBJ) \
+ test_a_f128_z_i32_rx$(OBJ) \
+ test_a_f128_z_i64_rx$(OBJ) \
+ test_a_f128_z_ui32_x$(OBJ) \
+ test_a_f128_z_ui64_x$(OBJ) \
+ test_a_f128_z_i32_x$(OBJ) \
+ test_a_f128_z_i64_x$(OBJ) \
+ test_a_f128_z_f16$(OBJ) \
+ test_a_f128_z_f32$(OBJ) \
+ test_a_f128_z_f64$(OBJ) \
+ test_a_f128_z_extF80$(OBJ) \
+ test_az_f128$(OBJ) \
+ test_az_f128_rx$(OBJ) \
+ test_abz_f128$(OBJ) \
+ test_abcz_f128$(OBJ) \
+ test_ab_f128_z_bool$(OBJ) \
+
+OBJS_LIB = \
+ uint128_inline$(OBJ) \
+ uint128$(OBJ) \
+ fail$(OBJ) \
+ functions_common$(OBJ) \
+ functionInfos$(OBJ) \
+ standardFunctionInfos$(OBJ) \
+ random$(OBJ) \
+ genCases_common$(OBJ) \
+ $(OBJS_GENCASES) \
+ genCases_writeTestsTotal$(OBJ) \
+ verCases_inline$(OBJ) \
+ verCases_common$(OBJ) \
+ verCases_writeFunctionName$(OBJ) \
+ readHex$(OBJ) \
+ writeHex$(OBJ) \
+ $(OBJS_WRITECASE) \
+ testLoops_common$(OBJ) \
+ $(OBJS_TEST) \
+
+uint128$(OBJ): $(SOURCE_DIR)/uint128.h
+fail$(OBJ): $(SOURCE_DIR)/fail.h
+functions_common$(OBJ): $(SOFTFLOAT_H) $(SOURCE_DIR)/functions.h
+functionInfos$(OBJ): $(SOURCE_DIR)/functions.h
+standardFunctionInfos$(OBJ): $(SOURCE_DIR)/functions.h
+random$(OBJ): $(SOURCE_DIR)/random.h
+genCases_common$(OBJ): $(SOURCE_DIR)/fail.h $(SOURCE_DIR)/genCases.h
+$(OBJS_GENCASES): \
+ $(SOURCE_DIR)/random.h $(SOFTFLOAT_H) $(SOURCE_DIR)/genCases.h
+genCases_f128$(OBJ): $(SOURCE_DIR)/uint128.h
+genCases_writeTestsTotal$(OBJ): $(SOURCE_DIR)/genCases.h
+verCases_common$(OBJ): $(SOURCE_DIR)/verCases.h
+verCases_writeFunctionName$(OBJ): $(SOURCE_DIR)/verCases.h
+readHex$(OBJ): $(SOURCE_DIR)/readHex.h
+writeHex$(OBJ): $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/writeHex.h
+$(OBJS_WRITECASE): \
+ $(SOFTFLOAT_H) $(SOURCE_DIR)/writeHex.h $(SOURCE_DIR)/writeCase.h
+testLoops_common$(OBJ): $(SOURCE_DIR)/testLoops.h
+$(OBJS_TEST): \
+ $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/genCases.h \
+ $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h $(SOURCE_DIR)/testLoops.h
+$(OBJS_LIB): %$(OBJ): platform.h $(SOURCE_DIR)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$*.c
+testfloat$(LIB): $(OBJS_LIB)
+ $(MAKELIB) $^
+
+OBJS_TESTSOFTFLOAT = slowfloat$(OBJ) testsoftfloat$(OBJ)
+
+slowfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/slowfloat.h $(SOURCE_DIR)/slowfloat.c
+ $(COMPILE_SLOWFLOAT_C) $(SOURCE_DIR)/slowfloat.c
+testsoftfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/slowfloat.h $(SOURCE_DIR)/functions.h \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h \
+ $(SOURCE_DIR)/testLoops.h $(SOURCE_DIR)/testsoftfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/testsoftfloat.c
+
+testsoftfloat$(EXE): $(OBJS_TESTSOFTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TIMESOFTFLOAT = timesoftfloat$(OBJ)
+
+timesoftfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/timesoftfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/timesoftfloat.c
+
+timesoftfloat$(EXE): $(OBJS_TIMESOFTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TESTFLOAT_GEN = genLoops$(OBJ) testfloat_gen$(OBJ)
+
+genLoops$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/writeHex.h $(SOURCE_DIR)/genLoops.h \
+ $(SOURCE_DIR)/genLoops.c
+ $(COMPILE_C) $(SOURCE_DIR)/genLoops.c
+testfloat_gen$(OBJ): \
+ $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) $(SOURCE_DIR)/functions.h \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/genLoops.h \
+ $(SOURCE_DIR)/testfloat_gen.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat_gen.c
+
+testfloat_gen$(EXE): $(OBJS_TESTFLOAT_GEN) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TESTFLOAT_VER = verLoops$(OBJ) testfloat_ver$(OBJ)
+
+verLoops$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/readHex.h $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h \
+ $(SOURCE_DIR)/verLoops.h $(SOURCE_DIR)/verLoops.c
+ $(COMPILE_C) $(SOURCE_DIR)/verLoops.c
+testfloat_ver$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/verCases.h \
+ $(SOURCE_DIR)/writeCase.h $(SOURCE_DIR)/verLoops.h \
+ $(SOURCE_DIR)/testfloat_ver.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat_ver.c
+
+testfloat_ver$(EXE): $(OBJS_TESTFLOAT_VER) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TESTFLOAT = subjfloat$(OBJ) subjfloat_functions$(OBJ) testfloat$(OBJ)
+
+subjfloat$(OBJ): \
+ platform.h $(SOFTFLOAT_H) $(SUBJ_SOURCE_DIR)/subjfloat_config.h \
+ $(SOURCE_DIR)/subjfloat.h $(SUBJ_SOURCE_DIR)/subjfloat.c
+ $(COMPILE_C) $(SUBJ_SOURCE_DIR)/subjfloat.c
+subjfloat_functions$(OBJ): \
+ platform.h $(SUBJ_SOURCE_DIR)/subjfloat_config.h $(SOURCE_DIR)/subjfloat.h \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/subjfloat_functions.c
+ $(COMPILE_C) $(SOURCE_DIR)/subjfloat_functions.c
+testfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SUBJ_SOURCE_DIR)/subjfloat_config.h $(SOURCE_DIR)/subjfloat.h \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/verCases.h \
+ $(SOURCE_DIR)/testLoops.h $(SOURCE_DIR)/testfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat.c
+
+testfloat$(EXE): $(OBJS_TESTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+.PHONY: clean
+clean:
+ $(DELETE) $(OBJS_LIB) testfloat$(LIB)
+ $(DELETE) $(OBJS_TESTSOFTFLOAT) testsoftfloat$(EXE)
+ $(DELETE) $(OBJS_TIMESOFTFLOAT) timesoftfloat$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT_GEN) testfloat_gen$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT_VER) testfloat_ver$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT) testfloat$(EXE)
+
diff --git a/src/libs/softfloat-3e/testfloat/build/Win32-SSE2-MinGW/platform.h b/src/libs/softfloat-3e/testfloat/build/Win32-SSE2-MinGW/platform.h
new file mode 100644
index 00000000..8b0de318
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Win32-SSE2-MinGW/platform.h
@@ -0,0 +1,49 @@
+
+/*============================================================================
+
+This C header file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define LITTLEENDIAN 1
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef __GNUC_STDC_INLINE__
+#define INLINE inline
+#else
+#define INLINE extern inline
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/build/Win64-MinGW-w64/Makefile b/src/libs/softfloat-3e/testfloat/build/Win64-MinGW-w64/Makefile
new file mode 100644
index 00000000..5c46a71e
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Win64-MinGW-w64/Makefile
@@ -0,0 +1,355 @@
+
+#=============================================================================
+#
+# This Makefile is part of TestFloat, Release 3e, a package of programs for
+# testing the correctness of floating-point arithmetic complying with the IEEE
+# Standard for Floating-Point, by John R. Hauser.
+#
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+# University of California. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions, and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions, and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# 3. Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#=============================================================================
+
+SOURCE_DIR ?= ../../source
+SOFTFLOAT_DIR ?= ../../../SoftFloat-3e
+PLATFORM ?= Win64-MinGW-w64
+
+SUBJ_SOURCE_DIR = $(SOURCE_DIR)/subj-C
+SOFTFLOAT_INCLUDE_DIR = $(SOFTFLOAT_DIR)/source/include
+
+SOFTFLOAT_H = \
+ $(SOFTFLOAT_INCLUDE_DIR)/softfloat_types.h \
+ $(SOFTFLOAT_INCLUDE_DIR)/softfloat.h
+SOFTFLOAT_LIB = $(SOFTFLOAT_DIR)/build/$(PLATFORM)/softfloat$(LIB)
+
+TESTFLOAT_OPTS ?= \
+ -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD \
+ -DLONG_DOUBLE_IS_EXTFLOAT80
+
+DELETE = rm -f
+C_INCLUDES = \
+ -I. -I$(SUBJ_SOURCE_DIR) -I$(SOURCE_DIR) -I$(SOFTFLOAT_INCLUDE_DIR)
+COMPILE_C = \
+ x86_64-w64-mingw32-gcc -std=c99 -c -Werror-implicit-function-declaration \
+ $(TESTFLOAT_OPTS) $(C_INCLUDES) -O2 -o $@
+COMPILE_SLOWFLOAT_C = \
+ x86_64-w64-mingw32-gcc -std=c99 -c -Werror-implicit-function-declaration \
+ $(TESTFLOAT_OPTS) $(C_INCLUDES) -O3 -o $@
+MAKELIB = x86_64-w64-mingw32-ar crs $@
+LINK = x86_64-w64-mingw32-gcc -o $@
+OTHER_LIBS = -lm
+
+OBJ = .o
+LIB = .a
+EXE = .exe
+
+.PHONY: all
+all: \
+ testsoftfloat$(EXE) \
+ timesoftfloat$(EXE) \
+ testfloat_gen$(EXE) \
+ testfloat_ver$(EXE) \
+ testfloat$(EXE) \
+
+OBJS_GENCASES = \
+ genCases_ui32$(OBJ) \
+ genCases_ui64$(OBJ) \
+ genCases_i32$(OBJ) \
+ genCases_i64$(OBJ) \
+ genCases_f16$(OBJ) \
+ genCases_f32$(OBJ) \
+ genCases_f64$(OBJ) \
+ genCases_extF80$(OBJ) \
+ genCases_f128$(OBJ) \
+
+OBJS_WRITECASE = \
+ writeCase_a_ui32$(OBJ) \
+ writeCase_a_ui64$(OBJ) \
+ writeCase_a_f16$(OBJ) \
+ writeCase_ab_f16$(OBJ) \
+ writeCase_abc_f16$(OBJ) \
+ writeCase_a_f32$(OBJ) \
+ writeCase_ab_f32$(OBJ) \
+ writeCase_abc_f32$(OBJ) \
+ writeCase_a_f64$(OBJ) \
+ writeCase_ab_f64$(OBJ) \
+ writeCase_abc_f64$(OBJ) \
+ writeCase_a_extF80M$(OBJ) \
+ writeCase_ab_extF80M$(OBJ) \
+ writeCase_a_f128M$(OBJ) \
+ writeCase_ab_f128M$(OBJ) \
+ writeCase_abc_f128M$(OBJ) \
+ writeCase_z_bool$(OBJ) \
+ writeCase_z_ui32$(OBJ) \
+ writeCase_z_ui64$(OBJ) \
+ writeCase_z_f16$(OBJ) \
+ writeCase_z_f32$(OBJ) \
+ writeCase_z_f64$(OBJ) \
+ writeCase_z_extF80M$(OBJ) \
+ writeCase_z_f128M$(OBJ) \
+
+OBJS_TEST = \
+ test_a_ui32_z_f16$(OBJ) \
+ test_a_ui32_z_f32$(OBJ) \
+ test_a_ui32_z_f64$(OBJ) \
+ test_a_ui32_z_extF80$(OBJ) \
+ test_a_ui32_z_f128$(OBJ) \
+ test_a_ui64_z_f16$(OBJ) \
+ test_a_ui64_z_f32$(OBJ) \
+ test_a_ui64_z_f64$(OBJ) \
+ test_a_ui64_z_extF80$(OBJ) \
+ test_a_ui64_z_f128$(OBJ) \
+ test_a_i32_z_f16$(OBJ) \
+ test_a_i32_z_f32$(OBJ) \
+ test_a_i32_z_f64$(OBJ) \
+ test_a_i32_z_extF80$(OBJ) \
+ test_a_i32_z_f128$(OBJ) \
+ test_a_i64_z_f16$(OBJ) \
+ test_a_i64_z_f32$(OBJ) \
+ test_a_i64_z_f64$(OBJ) \
+ test_a_i64_z_extF80$(OBJ) \
+ test_a_i64_z_f128$(OBJ) \
+ test_a_f16_z_ui32_rx$(OBJ) \
+ test_a_f16_z_ui64_rx$(OBJ) \
+ test_a_f16_z_i32_rx$(OBJ) \
+ test_a_f16_z_i64_rx$(OBJ) \
+ test_a_f16_z_ui32_x$(OBJ) \
+ test_a_f16_z_ui64_x$(OBJ) \
+ test_a_f16_z_i32_x$(OBJ) \
+ test_a_f16_z_i64_x$(OBJ) \
+ test_a_f16_z_f32$(OBJ) \
+ test_a_f16_z_f64$(OBJ) \
+ test_a_f16_z_extF80$(OBJ) \
+ test_a_f16_z_f128$(OBJ) \
+ test_az_f16$(OBJ) \
+ test_az_f16_rx$(OBJ) \
+ test_abz_f16$(OBJ) \
+ test_abcz_f16$(OBJ) \
+ test_ab_f16_z_bool$(OBJ) \
+ test_a_f32_z_ui32_rx$(OBJ) \
+ test_a_f32_z_ui64_rx$(OBJ) \
+ test_a_f32_z_i32_rx$(OBJ) \
+ test_a_f32_z_i64_rx$(OBJ) \
+ test_a_f32_z_ui32_x$(OBJ) \
+ test_a_f32_z_ui64_x$(OBJ) \
+ test_a_f32_z_i32_x$(OBJ) \
+ test_a_f32_z_i64_x$(OBJ) \
+ test_a_f32_z_f16$(OBJ) \
+ test_a_f32_z_f64$(OBJ) \
+ test_a_f32_z_extF80$(OBJ) \
+ test_a_f32_z_f128$(OBJ) \
+ test_az_f32$(OBJ) \
+ test_az_f32_rx$(OBJ) \
+ test_abz_f32$(OBJ) \
+ test_abcz_f32$(OBJ) \
+ test_ab_f32_z_bool$(OBJ) \
+ test_a_f64_z_ui32_rx$(OBJ) \
+ test_a_f64_z_ui64_rx$(OBJ) \
+ test_a_f64_z_i32_rx$(OBJ) \
+ test_a_f64_z_i64_rx$(OBJ) \
+ test_a_f64_z_ui32_x$(OBJ) \
+ test_a_f64_z_ui64_x$(OBJ) \
+ test_a_f64_z_i32_x$(OBJ) \
+ test_a_f64_z_i64_x$(OBJ) \
+ test_a_f64_z_f16$(OBJ) \
+ test_a_f64_z_f32$(OBJ) \
+ test_a_f64_z_extF80$(OBJ) \
+ test_a_f64_z_f128$(OBJ) \
+ test_az_f64$(OBJ) \
+ test_az_f64_rx$(OBJ) \
+ test_abz_f64$(OBJ) \
+ test_abcz_f64$(OBJ) \
+ test_ab_f64_z_bool$(OBJ) \
+ test_a_extF80_z_ui32_rx$(OBJ) \
+ test_a_extF80_z_ui64_rx$(OBJ) \
+ test_a_extF80_z_i32_rx$(OBJ) \
+ test_a_extF80_z_i64_rx$(OBJ) \
+ test_a_extF80_z_ui32_x$(OBJ) \
+ test_a_extF80_z_ui64_x$(OBJ) \
+ test_a_extF80_z_i32_x$(OBJ) \
+ test_a_extF80_z_i64_x$(OBJ) \
+ test_a_extF80_z_f16$(OBJ) \
+ test_a_extF80_z_f32$(OBJ) \
+ test_a_extF80_z_f64$(OBJ) \
+ test_a_extF80_z_f128$(OBJ) \
+ test_az_extF80$(OBJ) \
+ test_az_extF80_rx$(OBJ) \
+ test_abz_extF80$(OBJ) \
+ test_ab_extF80_z_bool$(OBJ) \
+ test_a_f128_z_ui32_rx$(OBJ) \
+ test_a_f128_z_ui64_rx$(OBJ) \
+ test_a_f128_z_i32_rx$(OBJ) \
+ test_a_f128_z_i64_rx$(OBJ) \
+ test_a_f128_z_ui32_x$(OBJ) \
+ test_a_f128_z_ui64_x$(OBJ) \
+ test_a_f128_z_i32_x$(OBJ) \
+ test_a_f128_z_i64_x$(OBJ) \
+ test_a_f128_z_f16$(OBJ) \
+ test_a_f128_z_f32$(OBJ) \
+ test_a_f128_z_f64$(OBJ) \
+ test_a_f128_z_extF80$(OBJ) \
+ test_az_f128$(OBJ) \
+ test_az_f128_rx$(OBJ) \
+ test_abz_f128$(OBJ) \
+ test_abcz_f128$(OBJ) \
+ test_ab_f128_z_bool$(OBJ) \
+
+OBJS_LIB = \
+ uint128_inline$(OBJ) \
+ uint128$(OBJ) \
+ fail$(OBJ) \
+ functions_common$(OBJ) \
+ functionInfos$(OBJ) \
+ standardFunctionInfos$(OBJ) \
+ random$(OBJ) \
+ genCases_common$(OBJ) \
+ $(OBJS_GENCASES) \
+ genCases_writeTestsTotal$(OBJ) \
+ verCases_inline$(OBJ) \
+ verCases_common$(OBJ) \
+ verCases_writeFunctionName$(OBJ) \
+ readHex$(OBJ) \
+ writeHex$(OBJ) \
+ $(OBJS_WRITECASE) \
+ testLoops_common$(OBJ) \
+ $(OBJS_TEST) \
+
+uint128$(OBJ): $(SOURCE_DIR)/uint128.h
+fail$(OBJ): $(SOURCE_DIR)/fail.h
+functions_common$(OBJ): $(SOFTFLOAT_H) $(SOURCE_DIR)/functions.h
+functionInfos$(OBJ): $(SOURCE_DIR)/functions.h
+standardFunctionInfos$(OBJ): $(SOURCE_DIR)/functions.h
+random$(OBJ): $(SOURCE_DIR)/random.h
+genCases_common$(OBJ): $(SOURCE_DIR)/fail.h $(SOURCE_DIR)/genCases.h
+$(OBJS_GENCASES): \
+ $(SOURCE_DIR)/random.h $(SOFTFLOAT_H) $(SOURCE_DIR)/genCases.h
+genCases_f128$(OBJ): $(SOURCE_DIR)/uint128.h
+genCases_writeTestsTotal$(OBJ): $(SOURCE_DIR)/genCases.h
+verCases_common$(OBJ): $(SOURCE_DIR)/verCases.h
+verCases_writeFunctionName$(OBJ): $(SOURCE_DIR)/verCases.h
+readHex$(OBJ): $(SOURCE_DIR)/readHex.h
+writeHex$(OBJ): $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/writeHex.h
+$(OBJS_WRITECASE): \
+ $(SOFTFLOAT_H) $(SOURCE_DIR)/writeHex.h $(SOURCE_DIR)/writeCase.h
+testLoops_common$(OBJ): $(SOURCE_DIR)/testLoops.h
+$(OBJS_TEST): \
+ $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/genCases.h \
+ $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h $(SOURCE_DIR)/testLoops.h
+$(OBJS_LIB): %$(OBJ): platform.h $(SOURCE_DIR)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$*.c
+testfloat$(LIB): $(OBJS_LIB)
+ $(MAKELIB) $^
+
+OBJS_TESTSOFTFLOAT = slowfloat$(OBJ) testsoftfloat$(OBJ)
+
+slowfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/slowfloat.h $(SOURCE_DIR)/slowfloat.c
+ $(COMPILE_SLOWFLOAT_C) $(SOURCE_DIR)/slowfloat.c
+testsoftfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/slowfloat.h $(SOURCE_DIR)/functions.h \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h \
+ $(SOURCE_DIR)/testLoops.h $(SOURCE_DIR)/testsoftfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/testsoftfloat.c
+
+testsoftfloat$(EXE): $(OBJS_TESTSOFTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TIMESOFTFLOAT = timesoftfloat$(OBJ)
+
+timesoftfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/timesoftfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/timesoftfloat.c
+
+timesoftfloat$(EXE): $(OBJS_TIMESOFTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TESTFLOAT_GEN = genLoops$(OBJ) testfloat_gen$(OBJ)
+
+genLoops$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/writeHex.h $(SOURCE_DIR)/genLoops.h \
+ $(SOURCE_DIR)/genLoops.c
+ $(COMPILE_C) $(SOURCE_DIR)/genLoops.c
+testfloat_gen$(OBJ): \
+ $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) $(SOURCE_DIR)/functions.h \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/genLoops.h \
+ $(SOURCE_DIR)/testfloat_gen.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat_gen.c
+
+testfloat_gen$(EXE): $(OBJS_TESTFLOAT_GEN) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TESTFLOAT_VER = verLoops$(OBJ) testfloat_ver$(OBJ)
+
+verLoops$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/readHex.h $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h \
+ $(SOURCE_DIR)/verLoops.h $(SOURCE_DIR)/verLoops.c
+ $(COMPILE_C) $(SOURCE_DIR)/verLoops.c
+testfloat_ver$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/verCases.h \
+ $(SOURCE_DIR)/writeCase.h $(SOURCE_DIR)/verLoops.h \
+ $(SOURCE_DIR)/testfloat_ver.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat_ver.c
+
+testfloat_ver$(EXE): $(OBJS_TESTFLOAT_VER) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TESTFLOAT = subjfloat$(OBJ) subjfloat_functions$(OBJ) testfloat$(OBJ)
+
+subjfloat$(OBJ): \
+ platform.h $(SOFTFLOAT_H) $(SUBJ_SOURCE_DIR)/subjfloat_config.h \
+ $(SOURCE_DIR)/subjfloat.h $(SUBJ_SOURCE_DIR)/subjfloat.c
+ $(COMPILE_C) $(SUBJ_SOURCE_DIR)/subjfloat.c
+subjfloat_functions$(OBJ): \
+ platform.h $(SUBJ_SOURCE_DIR)/subjfloat_config.h $(SOURCE_DIR)/subjfloat.h \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/subjfloat_functions.c
+ $(COMPILE_C) $(SOURCE_DIR)/subjfloat_functions.c
+testfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SUBJ_SOURCE_DIR)/subjfloat_config.h $(SOURCE_DIR)/subjfloat.h \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/verCases.h \
+ $(SOURCE_DIR)/testLoops.h $(SOURCE_DIR)/testfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat.c
+
+testfloat$(EXE): $(OBJS_TESTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+.PHONY: clean
+clean:
+ $(DELETE) $(OBJS_LIB) testfloat$(LIB)
+ $(DELETE) $(OBJS_TESTSOFTFLOAT) testsoftfloat$(EXE)
+ $(DELETE) $(OBJS_TIMESOFTFLOAT) timesoftfloat$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT_GEN) testfloat_gen$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT_VER) testfloat_ver$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT) testfloat$(EXE)
+
diff --git a/src/libs/softfloat-3e/testfloat/build/Win64-MinGW-w64/platform.h b/src/libs/softfloat-3e/testfloat/build/Win64-MinGW-w64/platform.h
new file mode 100644
index 00000000..8b0de318
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Win64-MinGW-w64/platform.h
@@ -0,0 +1,49 @@
+
+/*============================================================================
+
+This C header file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define LITTLEENDIAN 1
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef __GNUC_STDC_INLINE__
+#define INLINE inline
+#else
+#define INLINE extern inline
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/build/template/Makefile b/src/libs/softfloat-3e/testfloat/build/template/Makefile
new file mode 100644
index 00000000..5ec8f849
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/template/Makefile
@@ -0,0 +1,353 @@
+
+#=============================================================================
+#
+# This Makefile template is part of TestFloat, Release 3e, a package of
+# programs for testing the correctness of floating-point arithmetic complying
+# with the IEEE Standard for Floating-Point, by John R. Hauser.
+#
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+# University of California. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions, and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions, and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# 3. Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#=============================================================================
+
+# Edit lines marked with `==>'. See "TestFloat-source.html".
+
+==> SOURCE_DIR ?= ../../source
+==> SOFTFLOAT_DIR ?= ../../../SoftFloat-3e
+==> PLATFORM ?= Win32-MinGW
+
+==> SUBJ_SOURCE_DIR = $(SOURCE_DIR)/subj-C
+==> SOFTFLOAT_INCLUDE_DIR = $(SOFTFLOAT_DIR)/source/include
+
+==> SOFTFLOAT_H = \
+==> $(SOFTFLOAT_INCLUDE_DIR)/softfloat_types.h \
+==> $(SOFTFLOAT_INCLUDE_DIR)/softfloat.h
+==> SOFTFLOAT_LIB = $(SOFTFLOAT_DIR)/build/$(PLATFORM)/softfloat$(LIB)
+
+==> TESTFLOAT_OPTS ?= \
+==> -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD \
+==> -DLONG_DOUBLE_IS_EXTFLOAT80
+
+==> DELETE = rm -f
+==> C_INCLUDES = \
+==> -I. -I$(SUBJ_SOURCE_DIR) -I$(SOURCE_DIR) -I$(SOFTFLOAT_INCLUDE_DIR)
+==> COMPILE_C = cc -c $(TESTFLOAT_OPTS) $(C_INCLUDES) -O2 -o $@
+==> COMPILE_SLOWFLOAT_C = cc -c $(TESTFLOAT_OPTS) $(C_INCLUDES) -O3 -o $@
+==> MAKELIB = ar crs $@
+==> LINK = ld -o $@
+==> OTHER_LIBS = -lm
+
+==> OBJ = .o
+==> LIB = .a
+==> EXE = .exe
+
+.PHONY: all
+all: \
+ testsoftfloat$(EXE) \
+ timesoftfloat$(EXE) \
+ testfloat_gen$(EXE) \
+ testfloat_ver$(EXE) \
+ testfloat$(EXE) \
+
+OBJS_GENCASES = \
+ genCases_ui32$(OBJ) \
+ genCases_ui64$(OBJ) \
+ genCases_i32$(OBJ) \
+ genCases_i64$(OBJ) \
+ genCases_f16$(OBJ) \
+ genCases_f32$(OBJ) \
+ genCases_f64$(OBJ) \
+ genCases_extF80$(OBJ) \
+ genCases_f128$(OBJ) \
+
+OBJS_WRITECASE = \
+ writeCase_a_ui32$(OBJ) \
+ writeCase_a_ui64$(OBJ) \
+ writeCase_a_f16$(OBJ) \
+ writeCase_ab_f16$(OBJ) \
+ writeCase_abc_f16$(OBJ) \
+ writeCase_a_f32$(OBJ) \
+ writeCase_ab_f32$(OBJ) \
+ writeCase_abc_f32$(OBJ) \
+ writeCase_a_f64$(OBJ) \
+ writeCase_ab_f64$(OBJ) \
+ writeCase_abc_f64$(OBJ) \
+ writeCase_a_extF80M$(OBJ) \
+ writeCase_ab_extF80M$(OBJ) \
+ writeCase_a_f128M$(OBJ) \
+ writeCase_ab_f128M$(OBJ) \
+ writeCase_abc_f128M$(OBJ) \
+ writeCase_z_bool$(OBJ) \
+ writeCase_z_ui32$(OBJ) \
+ writeCase_z_ui64$(OBJ) \
+ writeCase_z_f16$(OBJ) \
+ writeCase_z_f32$(OBJ) \
+ writeCase_z_f64$(OBJ) \
+ writeCase_z_extF80M$(OBJ) \
+ writeCase_z_f128M$(OBJ) \
+
+OBJS_TEST = \
+ test_a_ui32_z_f16$(OBJ) \
+ test_a_ui32_z_f32$(OBJ) \
+ test_a_ui32_z_f64$(OBJ) \
+ test_a_ui32_z_extF80$(OBJ) \
+ test_a_ui32_z_f128$(OBJ) \
+ test_a_ui64_z_f16$(OBJ) \
+ test_a_ui64_z_f32$(OBJ) \
+ test_a_ui64_z_f64$(OBJ) \
+ test_a_ui64_z_extF80$(OBJ) \
+ test_a_ui64_z_f128$(OBJ) \
+ test_a_i32_z_f16$(OBJ) \
+ test_a_i32_z_f32$(OBJ) \
+ test_a_i32_z_f64$(OBJ) \
+ test_a_i32_z_extF80$(OBJ) \
+ test_a_i32_z_f128$(OBJ) \
+ test_a_i64_z_f16$(OBJ) \
+ test_a_i64_z_f32$(OBJ) \
+ test_a_i64_z_f64$(OBJ) \
+ test_a_i64_z_extF80$(OBJ) \
+ test_a_i64_z_f128$(OBJ) \
+ test_a_f16_z_ui32_rx$(OBJ) \
+ test_a_f16_z_ui64_rx$(OBJ) \
+ test_a_f16_z_i32_rx$(OBJ) \
+ test_a_f16_z_i64_rx$(OBJ) \
+ test_a_f16_z_ui32_x$(OBJ) \
+ test_a_f16_z_ui64_x$(OBJ) \
+ test_a_f16_z_i32_x$(OBJ) \
+ test_a_f16_z_i64_x$(OBJ) \
+ test_a_f16_z_f32$(OBJ) \
+ test_a_f16_z_f64$(OBJ) \
+ test_a_f16_z_extF80$(OBJ) \
+ test_a_f16_z_f128$(OBJ) \
+ test_az_f16$(OBJ) \
+ test_az_f16_rx$(OBJ) \
+ test_abz_f16$(OBJ) \
+ test_abcz_f16$(OBJ) \
+ test_ab_f16_z_bool$(OBJ) \
+ test_a_f32_z_ui32_rx$(OBJ) \
+ test_a_f32_z_ui64_rx$(OBJ) \
+ test_a_f32_z_i32_rx$(OBJ) \
+ test_a_f32_z_i64_rx$(OBJ) \
+ test_a_f32_z_ui32_x$(OBJ) \
+ test_a_f32_z_ui64_x$(OBJ) \
+ test_a_f32_z_i32_x$(OBJ) \
+ test_a_f32_z_i64_x$(OBJ) \
+ test_a_f32_z_f16$(OBJ) \
+ test_a_f32_z_f64$(OBJ) \
+ test_a_f32_z_extF80$(OBJ) \
+ test_a_f32_z_f128$(OBJ) \
+ test_az_f32$(OBJ) \
+ test_az_f32_rx$(OBJ) \
+ test_abz_f32$(OBJ) \
+ test_abcz_f32$(OBJ) \
+ test_ab_f32_z_bool$(OBJ) \
+ test_a_f64_z_ui32_rx$(OBJ) \
+ test_a_f64_z_ui64_rx$(OBJ) \
+ test_a_f64_z_i32_rx$(OBJ) \
+ test_a_f64_z_i64_rx$(OBJ) \
+ test_a_f64_z_ui32_x$(OBJ) \
+ test_a_f64_z_ui64_x$(OBJ) \
+ test_a_f64_z_i32_x$(OBJ) \
+ test_a_f64_z_i64_x$(OBJ) \
+ test_a_f64_z_f16$(OBJ) \
+ test_a_f64_z_f32$(OBJ) \
+ test_a_f64_z_extF80$(OBJ) \
+ test_a_f64_z_f128$(OBJ) \
+ test_az_f64$(OBJ) \
+ test_az_f64_rx$(OBJ) \
+ test_abz_f64$(OBJ) \
+ test_abcz_f64$(OBJ) \
+ test_ab_f64_z_bool$(OBJ) \
+ test_a_extF80_z_ui32_rx$(OBJ) \
+ test_a_extF80_z_ui64_rx$(OBJ) \
+ test_a_extF80_z_i32_rx$(OBJ) \
+ test_a_extF80_z_i64_rx$(OBJ) \
+ test_a_extF80_z_ui32_x$(OBJ) \
+ test_a_extF80_z_ui64_x$(OBJ) \
+ test_a_extF80_z_i32_x$(OBJ) \
+ test_a_extF80_z_i64_x$(OBJ) \
+ test_a_extF80_z_f16$(OBJ) \
+ test_a_extF80_z_f32$(OBJ) \
+ test_a_extF80_z_f64$(OBJ) \
+ test_a_extF80_z_f128$(OBJ) \
+ test_az_extF80$(OBJ) \
+ test_az_extF80_rx$(OBJ) \
+ test_abz_extF80$(OBJ) \
+ test_ab_extF80_z_bool$(OBJ) \
+ test_a_f128_z_ui32_rx$(OBJ) \
+ test_a_f128_z_ui64_rx$(OBJ) \
+ test_a_f128_z_i32_rx$(OBJ) \
+ test_a_f128_z_i64_rx$(OBJ) \
+ test_a_f128_z_ui32_x$(OBJ) \
+ test_a_f128_z_ui64_x$(OBJ) \
+ test_a_f128_z_i32_x$(OBJ) \
+ test_a_f128_z_i64_x$(OBJ) \
+ test_a_f128_z_f16$(OBJ) \
+ test_a_f128_z_f32$(OBJ) \
+ test_a_f128_z_f64$(OBJ) \
+ test_a_f128_z_extF80$(OBJ) \
+ test_az_f128$(OBJ) \
+ test_az_f128_rx$(OBJ) \
+ test_abz_f128$(OBJ) \
+ test_abcz_f128$(OBJ) \
+ test_ab_f128_z_bool$(OBJ) \
+
+OBJS_LIB = \
+ uint128_inline$(OBJ) \
+ uint128$(OBJ) \
+ fail$(OBJ) \
+ functions_common$(OBJ) \
+ functionInfos$(OBJ) \
+ standardFunctionInfos$(OBJ) \
+ random$(OBJ) \
+ genCases_common$(OBJ) \
+ $(OBJS_GENCASES) \
+ genCases_writeTestsTotal$(OBJ) \
+ verCases_inline$(OBJ) \
+ verCases_common$(OBJ) \
+ verCases_writeFunctionName$(OBJ) \
+ readHex$(OBJ) \
+ writeHex$(OBJ) \
+ $(OBJS_WRITECASE) \
+ testLoops_common$(OBJ) \
+ $(OBJS_TEST) \
+
+uint128$(OBJ): $(SOURCE_DIR)/uint128.h
+fail$(OBJ): $(SOURCE_DIR)/fail.h
+functions_common$(OBJ): $(SOFTFLOAT_H) $(SOURCE_DIR)/functions.h
+functionInfos$(OBJ): $(SOURCE_DIR)/functions.h
+standardFunctionInfos$(OBJ): $(SOURCE_DIR)/functions.h
+random$(OBJ): $(SOURCE_DIR)/random.h
+genCases_common$(OBJ): $(SOURCE_DIR)/fail.h $(SOURCE_DIR)/genCases.h
+$(OBJS_GENCASES): \
+ $(SOURCE_DIR)/random.h $(SOFTFLOAT_H) $(SOURCE_DIR)/genCases.h
+genCases_f128$(OBJ): $(SOURCE_DIR)/uint128.h
+genCases_writeTestsTotal$(OBJ): $(SOURCE_DIR)/genCases.h
+verCases_common$(OBJ): $(SOURCE_DIR)/verCases.h
+verCases_writeFunctionName$(OBJ): $(SOURCE_DIR)/verCases.h
+readHex$(OBJ): $(SOURCE_DIR)/readHex.h
+writeHex$(OBJ): $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/writeHex.h
+$(OBJS_WRITECASE): \
+ $(SOFTFLOAT_H) $(SOURCE_DIR)/writeHex.h $(SOURCE_DIR)/writeCase.h
+testLoops_common$(OBJ): $(SOURCE_DIR)/testLoops.h
+$(OBJS_TEST): \
+ $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/genCases.h \
+ $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h $(SOURCE_DIR)/testLoops.h
+$(OBJS_LIB): %$(OBJ): platform.h $(SOURCE_DIR)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$*.c
+testfloat$(LIB): $(OBJS_LIB)
+ $(MAKELIB) $^
+
+OBJS_TESTSOFTFLOAT = slowfloat$(OBJ) testsoftfloat$(OBJ)
+
+slowfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/slowfloat.h $(SOURCE_DIR)/slowfloat.c
+ $(COMPILE_SLOWFLOAT_C) $(SOURCE_DIR)/slowfloat.c
+testsoftfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/slowfloat.h $(SOURCE_DIR)/functions.h \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h \
+ $(SOURCE_DIR)/testLoops.h $(SOURCE_DIR)/testsoftfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/testsoftfloat.c
+
+testsoftfloat$(EXE): $(OBJS_TESTSOFTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TIMESOFTFLOAT = timesoftfloat$(OBJ)
+
+timesoftfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/timesoftfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/timesoftfloat.c
+
+timesoftfloat$(EXE): $(OBJS_TIMESOFTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TESTFLOAT_GEN = genLoops$(OBJ) testfloat_gen$(OBJ)
+
+genLoops$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/writeHex.h $(SOURCE_DIR)/genLoops.h \
+ $(SOURCE_DIR)/genLoops.c
+ $(COMPILE_C) $(SOURCE_DIR)/genLoops.c
+testfloat_gen$(OBJ): \
+ $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) $(SOURCE_DIR)/functions.h \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/genLoops.h \
+ $(SOURCE_DIR)/testfloat_gen.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat_gen.c
+
+testfloat_gen$(EXE): $(OBJS_TESTFLOAT_GEN) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TESTFLOAT_VER = verLoops$(OBJ) testfloat_ver$(OBJ)
+
+verLoops$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/readHex.h $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h \
+ $(SOURCE_DIR)/verLoops.h $(SOURCE_DIR)/verLoops.c
+ $(COMPILE_C) $(SOURCE_DIR)/verLoops.c
+testfloat_ver$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/verCases.h \
+ $(SOURCE_DIR)/writeCase.h $(SOURCE_DIR)/verLoops.h \
+ $(SOURCE_DIR)/testfloat_ver.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat_ver.c
+
+testfloat_ver$(EXE): $(OBJS_TESTFLOAT_VER) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+OBJS_TESTFLOAT = subjfloat$(OBJ) subjfloat_functions$(OBJ) testfloat$(OBJ)
+
+subjfloat$(OBJ): \
+ platform.h $(SOFTFLOAT_H) $(SUBJ_SOURCE_DIR)/subjfloat_config.h \
+ $(SOURCE_DIR)/subjfloat.h $(SUBJ_SOURCE_DIR)/subjfloat.c
+ $(COMPILE_C) $(SUBJ_SOURCE_DIR)/subjfloat.c
+subjfloat_functions$(OBJ): \
+ platform.h $(SUBJ_SOURCE_DIR)/subjfloat_config.h $(SOURCE_DIR)/subjfloat.h \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/subjfloat_functions.c
+ $(COMPILE_C) $(SOURCE_DIR)/subjfloat_functions.c
+testfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SUBJ_SOURCE_DIR)/subjfloat_config.h $(SOURCE_DIR)/subjfloat.h \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/verCases.h \
+ $(SOURCE_DIR)/testLoops.h $(SOURCE_DIR)/testfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat.c
+
+testfloat$(EXE): $(OBJS_TESTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ $(OTHER_LIBS)
+
+.PHONY: clean
+clean:
+ $(DELETE) $(OBJS_LIB) testfloat$(LIB)
+ $(DELETE) $(OBJS_TESTSOFTFLOAT) testsoftfloat$(EXE)
+ $(DELETE) $(OBJS_TIMESOFTFLOAT) timesoftfloat$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT_GEN) testfloat_gen$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT_VER) testfloat_ver$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT) testfloat$(EXE)
+
diff --git a/src/libs/softfloat-3e/testfloat/build/template/platform.h b/src/libs/softfloat-3e/testfloat/build/template/platform.h
new file mode 100644
index 00000000..45042e64
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/template/platform.h
@@ -0,0 +1,51 @@
+
+/*============================================================================
+
+This C header template is part of TestFloat, Release 3e, a package of programs
+for testing the correctness of floating-point arithmetic complying with the
+IEEE Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+// Edit lines marked with `==>'. See "TestFloat-source.html".
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+==> #define LITTLEENDIAN 1
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+==> #define INLINE inline
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+==> #define THREAD_LOCAL _Thread_local
+
diff --git a/src/libs/softfloat-3e/testfloat/doc/TestFloat-general.html b/src/libs/softfloat-3e/testfloat/doc/TestFloat-general.html
new file mode 100644
index 00000000..55f67d71
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/doc/TestFloat-general.html
@@ -0,0 +1,1148 @@
+
+<HTML>
+
+<HEAD>
+<TITLE>Berkeley TestFloat General Documentation</TITLE>
+</HEAD>
+
+<BODY>
+
+<H1>Berkeley TestFloat Release 3e: General Documentation</H1>
+
+<P>
+John R. Hauser<BR>
+2018 January 20<BR>
+</P>
+
+
+<H2>Contents</H2>
+
+<BLOCKQUOTE>
+<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
+<COL WIDTH=25>
+<COL WIDTH=*>
+<TR><TD COLSPAN=2>1. Introduction</TD></TR>
+<TR><TD COLSPAN=2>2. Limitations</TD></TR>
+<TR><TD COLSPAN=2>3. Acknowledgments and License</TD></TR>
+<TR><TD COLSPAN=2>4. What TestFloat Does</TD></TR>
+<TR><TD COLSPAN=2>5. Executing TestFloat</TD></TR>
+<TR><TD COLSPAN=2>6. Operations Tested by TestFloat</TD></TR>
+<TR><TD></TD><TD>6.1. Conversion Operations</TD></TR>
+<TR><TD></TD><TD>6.2. Basic Arithmetic Operations</TD></TR>
+<TR><TD></TD><TD>6.3. Fused Multiply-Add Operations</TD></TR>
+<TR><TD></TD><TD>6.4. Remainder Operations</TD></TR>
+<TR><TD></TD><TD>6.5. Round-to-Integer Operations</TD></TR>
+<TR><TD></TD><TD>6.6. Comparison Operations</TD></TR>
+<TR><TD COLSPAN=2>7. Interpreting TestFloat Output</TD></TR>
+<TR>
+ <TD COLSPAN=2>8. Variations Allowed by the IEEE Floating-Point Standard</TD>
+</TR>
+<TR><TD></TD><TD>8.1. Underflow</TD></TR>
+<TR><TD></TD><TD>8.2. NaNs</TD></TR>
+<TR><TD></TD><TD>8.3. Conversions to Integer</TD></TR>
+<TR><TD COLSPAN=2>9. Contact Information</TD></TR>
+</TABLE>
+</BLOCKQUOTE>
+
+
+<H2>1. Introduction</H2>
+
+<P>
+Berkeley TestFloat is a small collection of programs for testing that an
+implementation of binary floating-point conforms to the IEEE Standard for
+Floating-Point Arithmetic.
+All operations required by the original 1985 version of the IEEE Floating-Point
+Standard can be tested, except for conversions to and from decimal.
+With the current release, the following binary formats can be tested:
+<NOBR>16-bit</NOBR> half-precision, <NOBR>32-bit</NOBR> single-precision,
+<NOBR>64-bit</NOBR> double-precision, <NOBR>80-bit</NOBR>
+double-extended-precision, and/or <NOBR>128-bit</NOBR> quadruple-precision.
+TestFloat cannot test decimal floating-point.
+</P>
+
+<P>
+Included in the TestFloat package are the <CODE>testsoftfloat</CODE> and
+<CODE>timesoftfloat</CODE> programs for testing the Berkeley SoftFloat software
+implementation of floating-point and for measuring its speed.
+Information about SoftFloat can be found at the SoftFloat Web page,
+<A HREF="http://www.jhauser.us/arithmetic/SoftFloat.html"><NOBR><CODE>http://www.jhauser.us/arithmetic/SoftFloat.html</CODE></NOBR></A>.
+The <CODE>testsoftfloat</CODE> and <CODE>timesoftfloat</CODE> programs are
+expected to be of interest only to people compiling the SoftFloat sources.
+</P>
+
+<P>
+This document explains how to use the TestFloat programs.
+It does not attempt to define or explain much of the IEEE Floating-Point
+Standard.
+Details about the standard are available elsewhere.
+</P>
+
+<P>
+The current version of TestFloat is <NOBR>Release 3e</NOBR>.
+This version differs from earlier releases 3b through 3d in only minor ways.
+Compared to the original <NOBR>Release 3</NOBR>:
+<UL>
+<LI>
+<NOBR>Release 3b</NOBR> added the ability to test the <NOBR>16-bit</NOBR>
+half-precision format.
+<LI>
+<NOBR>Release 3c</NOBR> added the ability to test a rarely used rounding mode,
+<I>round to odd</I>, also known as <I>jamming</I>.
+<LI>
+<NOBR>Release 3d</NOBR> modified the code for testing C arithmetic to
+potentially include testing newer library functions <CODE>sqrtf</CODE>,
+<CODE>sqrtl</CODE>, <CODE>fmaf</CODE>, <CODE>fma</CODE>, and <CODE>fmal</CODE>.
+</UL>
+This release adds a few more small improvements, including modifying the
+expected behavior of rounding mode <CODE>odd</CODE> and fixing a minor bug in
+the all-in-one <CODE>testfloat</CODE> program.
+</P>
+
+<P>
+Compared to Release 2c and earlier, the set of TestFloat programs, as well as
+the programs&rsquo; arguments and behavior, changed some with
+<NOBR>Release 3</NOBR>.
+For more about the evolution of TestFloat releases, see
+<A HREF="TestFloat-history.html"><NOBR><CODE>TestFloat-history.html</CODE></NOBR></A>.
+</P>
+
+
+<H2>2. Limitations</H2>
+
+<P>
+TestFloat output is not always easily interpreted.
+Detailed knowledge of the IEEE Floating-Point Standard and its vagaries is
+needed to use TestFloat responsibly.
+</P>
+
+<P>
+TestFloat performs relatively simple tests designed to check the fundamental
+soundness of the floating-point under test.
+TestFloat may also at times manage to find rarer and more subtle bugs, but it
+will probably only find such bugs by chance.
+Software that purposefully seeks out various kinds of subtle floating-point
+bugs can be found through links posted on the TestFloat Web page,
+<A HREF="http://www.jhauser.us/arithmetic/TestFloat.html"><NOBR><CODE>http://www.jhauser.us/arithmetic/TestFloat.html</CODE></NOBR></A>.
+</P>
+
+
+<H2>3. Acknowledgments and License</H2>
+
+<P>
+The TestFloat package was written by me, <NOBR>John R.</NOBR> Hauser.
+<NOBR>Release 3</NOBR> of TestFloat was a completely new implementation
+supplanting earlier releases.
+The project to create <NOBR>Release 3</NOBR> (now <NOBR>through 3e</NOBR>) was
+done in the employ of the University of California, Berkeley, within the
+Department of Electrical Engineering and Computer Sciences, first for the
+Parallel Computing Laboratory (Par Lab) and then for the ASPIRE Lab.
+The work was officially overseen by Prof. Krste Asanovic, with funding provided
+by these sources:
+<BLOCKQUOTE>
+<TABLE>
+<COL>
+<COL WIDTH=10>
+<COL>
+<TR>
+<TD VALIGN=TOP><NOBR>Par Lab:</NOBR></TD>
+<TD></TD>
+<TD>
+Microsoft (Award #024263), Intel (Award #024894), and U.C. Discovery
+(Award #DIG07-10227), with additional support from Par Lab affiliates Nokia,
+NVIDIA, Oracle, and Samsung.
+</TD>
+</TR>
+<TR>
+<TD VALIGN=TOP><NOBR>ASPIRE Lab:</NOBR></TD>
+<TD></TD>
+<TD>
+DARPA PERFECT program (Award #HR0011-12-2-0016), with additional support from
+ASPIRE industrial sponsor Intel and ASPIRE affiliates Google, Nokia, NVIDIA,
+Oracle, and Samsung.
+</TD>
+</TR>
+</TABLE>
+</BLOCKQUOTE>
+</P>
+
+<P>
+The following applies to the whole of TestFloat <NOBR>Release 3e</NOBR> as well
+as to each source file individually.
+</P>
+
+<P>
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
+University of California.
+All rights reserved.
+</P>
+
+<P>
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+<OL>
+
+<LI>
+<P>
+Redistributions of source code must retain the above copyright notice, this
+list of conditions, and the following disclaimer.
+</P>
+
+<LI>
+<P>
+Redistributions in binary form must reproduce the above copyright notice, this
+list of conditions, and the following disclaimer in the documentation and/or
+other materials provided with the distribution.
+</P>
+
+<LI>
+<P>
+Neither the name of the University nor the names of its contributors may be
+used to endorse or promote products derived from this software without specific
+prior written permission.
+</P>
+
+</OL>
+</P>
+
+<P>
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS &ldquo;AS IS&rdquo;,
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED.
+IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</P>
+
+
+<H2>4. What TestFloat Does</H2>
+
+<P>
+TestFloat is designed to test a floating-point implementation by comparing its
+behavior with that of TestFloat&rsquo;s own internal floating-point implemented
+in software.
+For each operation to be tested, the TestFloat programs can generate a large
+number of test cases, made up of simple pattern tests intermixed with weighted
+random inputs.
+The cases generated should be adequate for testing carry chain propagations,
+and the rounding of addition, subtraction, multiplication, and simple
+operations like conversions.
+TestFloat makes a point of checking all boundary cases of the arithmetic,
+including underflows, overflows, invalid operations, subnormal inputs, zeros
+(positive and negative), infinities, and NaNs.
+For the interesting operations like addition and multiplication, millions of
+test cases may be checked.
+</P>
+
+<P>
+TestFloat is not remarkably good at testing difficult rounding cases for
+division and square root.
+It also makes no attempt to find bugs specific to SRT division and the like
+(such as the infamous Pentium division bug).
+Software that tests for such failures can be found through links on the
+TestFloat Web page,
+<A HREF="http://www.jhauser.us/arithmetic/TestFloat.html"><NOBR><CODE>http://www.jhauser.us/arithmetic/TestFloat.html</CODE></NOBR></A>.
+</P>
+
+<P>
+NOTE!<BR>
+It is the responsibility of the user to verify that the discrepancies TestFloat
+finds actually represent faults in the implementation being tested.
+Advice to help with this task is provided later in this document.
+Furthermore, even if TestFloat finds no fault with a floating-point
+implementation, that in no way guarantees that the implementation is bug-free.
+</P>
+
+<P>
+For each operation, TestFloat can test all five rounding modes defined by the
+IEEE Floating-Point Standard, plus possibly a sixth mode, <I>round to odd</I>
+(depending on the options selected when TestFloat was built).
+TestFloat verifies not only that the numeric results of an operation are
+correct, but also that the proper floating-point exception flags are raised.
+All five exception flags are tested, including the <I>inexact</I> flag.
+TestFloat does not attempt to verify that the floating-point exception flags
+are actually implemented as sticky flags.
+</P>
+
+<P>
+For the <NOBR>80-bit</NOBR> double-extended-precision format, TestFloat can
+test the addition, subtraction, multiplication, division, and square root
+operations at all three of the standard rounding precisions.
+The rounding precision can be set to <NOBR>32 bits</NOBR>, equivalent to
+single-precision, to <NOBR>64 bits</NOBR>, equivalent to double-precision, or
+to the full <NOBR>80 bits</NOBR> of the double-extended-precision.
+Rounding precision control can be applied only to the double-extended-precision
+format and only for the five basic arithmetic operations: addition,
+subtraction, multiplication, division, and square root.
+Other operations can be tested only at full precision.
+</P>
+
+<P>
+As a rule, TestFloat is not particular about the bit patterns of NaNs that
+appear as operation results.
+Any NaN is considered as good a result as another.
+This laxness can be overridden so that TestFloat checks for particular bit
+patterns within NaN results.
+See <NOBR>section 8</NOBR> below, <I>Variations Allowed by the IEEE
+Floating-Point Standard</I>, plus the <CODE>-checkNaNs</CODE> and
+<CODE>-checkInvInts</CODE> options documented for programs
+<CODE>testfloat_ver</CODE> and <CODE>testfloat</CODE>.
+</P>
+
+<P>
+TestFloat normally compares an implementation of floating-point against the
+Berkeley SoftFloat software implementation of floating-point, also created by
+me.
+The SoftFloat functions are linked into each TestFloat program&rsquo;s
+executable.
+Information about SoftFloat can be found at the Web page
+<A HREF="http://www.jhauser.us/arithmetic/SoftFloat.html"><NOBR><CODE>http://www.jhauser.us/arithmetic/SoftFloat.html</CODE></NOBR></A>.
+</P>
+
+<P>
+For testing SoftFloat itself, the TestFloat package includes a
+<CODE>testsoftfloat</CODE> program that compares SoftFloat&rsquo;s
+floating-point against <EM>another</EM> software floating-point implementation.
+The second software floating-point is simpler and slower than SoftFloat, and is
+completely independent of SoftFloat.
+Although the second software floating-point cannot be guaranteed to be
+bug-free, the chance that it would mimic any of SoftFloat&rsquo;s bugs is low.
+Consequently, an error in one or the other floating-point version should appear
+as an unexpected difference between the two implementations.
+Note that testing SoftFloat should be necessary only when compiling a new
+TestFloat executable or when compiling SoftFloat for some other reason.
+</P>
+
+
+<H2>5. Executing TestFloat</H2>
+
+<P>
+The TestFloat package consists of five programs, all intended to be executed
+from a command-line interpreter:
+<BLOCKQUOTE>
+<TABLE>
+<TR>
+<TD>
+<A HREF="testfloat_gen.html"><CODE>testfloat_gen</CODE></A><CODE>&nbsp;&nbsp;&nbsp;</CODE>
+</TD>
+<TD>
+Generates test cases for a specific floating-point operation.
+</TD>
+</TR>
+<TR>
+<TD>
+<A HREF="testfloat_ver.html"><CODE>testfloat_ver</CODE></A>
+</TD>
+<TD>
+Verifies whether the results from executing a floating-point operation are as
+expected.
+</TD>
+</TR>
+<TR>
+<TD>
+<A HREF="testfloat.html"><CODE>testfloat</CODE></A>
+</TD>
+<TD>
+An all-in-one program that generates test cases, executes floating-point
+operations, and verifies whether the results match expectations.
+</TD>
+</TR>
+<TR>
+<TD>
+<A HREF="testsoftfloat.html"><CODE>testsoftfloat</CODE></A><CODE>&nbsp;&nbsp;&nbsp;</CODE>
+</TD>
+<TD>
+Like <CODE>testfloat</CODE>, but for testing SoftFloat.
+</TD>
+</TR>
+<TR>
+<TD>
+<A HREF="timesoftfloat.html"><CODE>timesoftfloat</CODE></A><CODE>&nbsp;&nbsp;&nbsp;</CODE>
+</TD>
+<TD>
+A program for measuring the speed of SoftFloat (included in the TestFloat
+package for convenience).
+</TD>
+</TR>
+</TABLE>
+</BLOCKQUOTE>
+Each program has its own page of documentation that can be opened through the
+links in the table above.
+</P>
+
+<P>
+To test a floating-point implementation other than SoftFloat, one of three
+different methods can be used.
+The first method pipes output from <CODE>testfloat_gen</CODE> to a program
+that:
+<NOBR>(a) reads</NOBR> the incoming test cases, <NOBR>(b) invokes</NOBR> the
+floating-point operation being tested, and <NOBR>(c) writes</NOBR> the
+operation results to output.
+These results can then be piped to <CODE>testfloat_ver</CODE> to be checked for
+correctness.
+Assuming a vertical bar (<CODE>|</CODE>) indicates a pipe between programs, the
+complete process could be written as a single command like so:
+<BLOCKQUOTE>
+<PRE>
+testfloat_gen ... &lt;<I>type</I>&gt; | &lt;<I>program-that-invokes-op</I>&gt; | testfloat_ver ... &lt;<I>function</I>&gt;
+</PRE>
+</BLOCKQUOTE>
+The program in the middle is not supplied by TestFloat but must be created
+independently.
+If for some reason this program cannot take command-line arguments, the
+<CODE>-prefix</CODE> option of <CODE>testfloat_gen</CODE> can communicate
+parameters through the pipe.
+</P>
+
+<P>
+A second method for running TestFloat is similar but has
+<CODE>testfloat_gen</CODE> supply not only the test inputs but also the
+expected results for each case.
+With this additional information, the job done by <CODE>testfloat_ver</CODE>
+can be folded into the invoking program to give the following command:
+<BLOCKQUOTE>
+<PRE>
+testfloat_gen ... &lt;<I>function</I>&gt; | &lt;<I>program-that-invokes-op-and-compares-results</I>&gt;
+</PRE>
+</BLOCKQUOTE>
+Again, the program that actually invokes the floating-point operation is not
+supplied by TestFloat but must be created independently.
+Depending on circumstance, it may be preferable either to let
+<CODE>testfloat_ver</CODE> check and report suspected errors (first method) or
+to include this step in the invoking program (second method).
+</P>
+
+<P>
+The third way to use TestFloat is the all-in-one <CODE>testfloat</CODE>
+program.
+This program can perform all the steps of creating test cases, invoking the
+floating-point operation, checking the results, and reporting suspected errors.
+However, for this to be possible, <CODE>testfloat</CODE> must be compiled to
+contain the method for invoking the floating-point operations to test.
+Each build of <CODE>testfloat</CODE> is therefore capable of testing
+<EM>only</EM> the floating-point implementation it was built to invoke.
+To test a new implementation of floating-point, a new <CODE>testfloat</CODE>
+must be created, linked to that specific implementation.
+By comparison, the <CODE>testfloat_gen</CODE> and <CODE>testfloat_ver</CODE>
+programs are entirely generic;
+one instance is usable for testing any floating-point implementation, because
+implementation-specific details are segregated in the custom program that
+follows <CODE>testfloat_gen</CODE>.
+</P>
+
+<P>
+Program <CODE>testsoftfloat</CODE> is another all-in-one program specifically
+for testing SoftFloat.
+</P>
+
+<P>
+Programs <CODE>testfloat_ver</CODE>, <CODE>testfloat</CODE>, and
+<CODE>testsoftfloat</CODE> all report status and error information in a common
+way.
+As it executes, each of these programs writes status information to the
+standard error output, which should be the screen by default.
+In order for this status to be displayed properly, the standard error stream
+should not be redirected to a file.
+Any discrepancies that are found are written to the standard output stream,
+which is easily redirected to a file if desired.
+Unless redirected, reported errors will appear intermixed with the ongoing
+status information in the output.
+</P>
+
+
+<H2>6. Operations Tested by TestFloat</H2>
+
+<P>
+TestFloat can test all operations required by the original 1985 IEEE
+Floating-Point Standard except for conversions to and from decimal.
+These operations are:
+<UL>
+<LI>
+conversions among the supported floating-point formats, and also between
+integers (<NOBR>32-bit</NOBR> and <NOBR>64-bit</NOBR>, signed and unsigned) and
+any of the floating-point formats;
+<LI>
+for each floating-point format, the usual addition, subtraction,
+multiplication, division, and square root operations;
+<LI>
+for each format, the floating-point remainder operation defined by the IEEE
+Standard;
+<LI>
+for each format, a &ldquo;round to integer&rdquo; operation that rounds to the
+nearest integer value in the same format; and
+<LI>
+comparisons between two values in the same floating-point format.
+</UL>
+In addition, TestFloat can also test
+<UL>
+<LI>
+for each floating-point format except <NOBR>80-bit</NOBR>
+double-extended-precision, the fused multiply-add operation defined by the 2008
+IEEE Standard.
+</UL>
+</P>
+
+<P>
+More information about all these operations is given below.
+In the operation names used by TestFloat, <NOBR>16-bit</NOBR> half-precision is
+called <CODE>f16</CODE>, <NOBR>32-bit</NOBR> single-precision is
+<CODE>f32</CODE>, <NOBR>64-bit</NOBR> double-precision is <CODE>f64</CODE>,
+<NOBR>80-bit</NOBR> double-extended-precision is <CODE>extF80</CODE>, and
+<NOBR>128-bit</NOBR> quadruple-precision is <CODE>f128</CODE>.
+TestFloat generally uses the same names for operations as Berkeley SoftFloat,
+except that TestFloat&rsquo;s names never include the <CODE>M</CODE> that
+SoftFloat uses to indicate that values are passed through pointers.
+</P>
+
+<H3>6.1. Conversion Operations</H3>
+
+<P>
+All conversions among the floating-point formats and all conversions between a
+floating-point format and <NOBR>32-bit</NOBR> and <NOBR>64-bit</NOBR> integers
+can be tested.
+The conversion operations are:
+<BLOCKQUOTE>
+<PRE>
+ui32_to_f16 ui64_to_f16 i32_to_f16 i64_to_f16
+ui32_to_f32 ui64_to_f32 i32_to_f32 i64_to_f32
+ui32_to_f64 ui64_to_f64 i32_to_f64 i64_to_f64
+ui32_to_extF80 ui64_to_extF80 i32_to_extF80 i64_to_extF80
+ui32_to_f128 ui64_to_f128 i32_to_f128 i64_to_f128
+
+f16_to_ui32 f32_to_ui32 f64_to_ui32 extF80_to_ui32 f128_to_ui32
+f16_to_ui64 f32_to_ui64 f64_to_ui64 extF80_to_ui64 f128_to_ui64
+f16_to_i32 f32_to_i32 f64_to_i32 extF80_to_i32 f128_to_i32
+f16_to_i64 f32_to_i64 f64_to_i64 extF80_to_i64 f128_to_i64
+
+f16_to_f32 f32_to_f16 f64_to_f16 extF80_to_f16 f128_to_f16
+f16_to_f64 f32_to_f64 f64_to_f32 extF80_to_f32 f128_to_f32
+f16_to_extF80 f32_to_extF80 f64_to_extF80 extF80_to_f64 f128_to_f64
+f16_to_f128 f32_to_f128 f64_to_f128 extF80_to_f128 f128_to_extF80
+</PRE>
+</BLOCKQUOTE>
+Abbreviations <CODE>ui32</CODE> and <CODE>ui64</CODE> indicate
+<NOBR>32-bit</NOBR> and <NOBR>64-bit</NOBR> unsigned integer types, while
+<CODE>i32</CODE> and <CODE>i64</CODE> indicate their signed counterparts.
+These conversions all round according to the current rounding mode as relevant.
+Conversions from a smaller to a larger floating-point format are always exact
+and so require no rounding.
+Likewise, conversions from <NOBR>32-bit</NOBR> integers to <NOBR>64-bit</NOBR>
+double-precision or to any larger floating-point format are also exact, as are
+conversions from <NOBR>64-bit</NOBR> integers to <NOBR>80-bit</NOBR>
+double-extended-precision and <NOBR>128-bit</NOBR> quadruple-precision.
+</P>
+
+<P>
+For the all-in-one <CODE>testfloat</CODE> program, this list of conversion
+operations requires amendment.
+For <CODE>testfloat</CODE> only, conversions to an integer type have names that
+explicitly specify the rounding mode and treatment of inexactness.
+Thus, instead of
+<BLOCKQUOTE>
+<PRE>
+&lt;<I>float</I>&gt;_to_&lt;<I>int</I>&gt;
+</PRE>
+</BLOCKQUOTE>
+as listed above, operations converting to integer type have names of these
+forms:
+<BLOCKQUOTE>
+<PRE>
+&lt;<I>float</I>&gt;_to_&lt;<I>int</I>&gt;_r_&lt;<I>round</I>&gt;
+&lt;<I>float</I>&gt;_to_&lt;<I>int</I>&gt;_rx_&lt;<I>round</I>&gt;
+</PRE>
+</BLOCKQUOTE>
+The <CODE>&lt;<I>round</I>&gt;</CODE> component is one of
+&lsquo;<CODE>near_even</CODE>&rsquo;, &lsquo;<CODE>near_maxMag</CODE>&rsquo;,
+&lsquo;<CODE>minMag</CODE>&rsquo;, &lsquo;<CODE>min</CODE>&rsquo;, or
+&lsquo;<CODE>max</CODE>&rsquo;, choosing the rounding mode.
+Any other indication of rounding mode is ignored.
+The operations with &lsquo;<CODE>_r_</CODE>&rsquo; in their names never raise
+the <I>inexact</I> exception, while those with &lsquo;<CODE>_rx_</CODE>&rsquo;
+raise the <I>inexact</I> exception whenever the result is not exact.
+</P>
+
+<P>
+TestFloat assumes that conversions from floating-point to an integer type
+should raise the <I>invalid</I> exception if the input cannot be rounded to an
+integer representable in the result format.
+In such a circumstance:
+<UL>
+
+<LI>
+<P>
+If the result type is an unsigned integer, TestFloat normally expects the
+result of the operation to be the type&rsquo;s largest integer value.
+In the case that the input is a negative number (not a NaN), a zero result may
+also be accepted.
+</P>
+
+<LI>
+<P>
+If the result type is a signed integer and the input is a number (not a NaN),
+TestFloat expects the result to be the largest-magnitude integer with the same
+sign as the input.
+When a NaN is converted to a signed integer type, TestFloat allows either the
+largest postive or largest-magnitude negative integer to be returned.
+</P>
+
+</UL>
+Conversions to integer types are expected never to raise the <I>overflow</I>
+exception.
+</P>
+
+<H3>6.2. Basic Arithmetic Operations</H3>
+
+<P>
+The following standard arithmetic operations can be tested:
+<BLOCKQUOTE>
+<PRE>
+f16_add f16_sub f16_mul f16_div f16_sqrt
+f32_add f32_sub f32_mul f32_div f32_sqrt
+f64_add f64_sub f64_mul f64_div f64_sqrt
+extF80_add extF80_sub extF80_mul extF80_div extF80_sqrt
+f128_add f128_sub f128_mul f128_div f128_sqrt
+</PRE>
+</BLOCKQUOTE>
+The double-extended-precision (<CODE>extF80</CODE>) operations can be rounded
+to reduced precision under rounding precision control.
+</P>
+
+<H3>6.3. Fused Multiply-Add Operations</H3>
+
+<P>
+For all floating-point formats except <NOBR>80-bit</NOBR>
+double-extended-precision, TestFloat can test the fused multiply-add operation
+defined by the 2008 IEEE Floating-Point Standard.
+The fused multiply-add operations are:
+<BLOCKQUOTE>
+<PRE>
+f16_mulAdd
+f32_mulAdd
+f64_mulAdd
+f128_mulAdd
+</PRE>
+</BLOCKQUOTE>
+</P>
+
+<P>
+If one of the multiplication operands is infinite and the other is zero,
+TestFloat expects the fused multiply-add operation to raise the <I>invalid</I>
+exception even if the third operand is a quiet NaN.
+</P>
+
+<H3>6.4. Remainder Operations</H3>
+
+<P>
+For each format, TestFloat can test the IEEE Standard&rsquo;s remainder
+operation.
+These operations are:
+<BLOCKQUOTE>
+<PRE>
+f16_rem
+f32_rem
+f64_rem
+extF80_rem
+f128_rem
+</PRE>
+</BLOCKQUOTE>
+The remainder operations are always exact and so require no rounding.
+</P>
+
+<H3>6.5. Round-to-Integer Operations</H3>
+
+<P>
+For each format, TestFloat can test the IEEE Standard&rsquo;s round-to-integer
+operation.
+For most TestFloat programs, these operations are:
+<BLOCKQUOTE>
+<PRE>
+f16_roundToInt
+f32_roundToInt
+f64_roundToInt
+extF80_roundToInt
+f128_roundToInt
+</PRE>
+</BLOCKQUOTE>
+</P>
+
+<P>
+Just as for conversions to integer types (<NOBR>section 6.1</NOBR> above), the
+all-in-one <CODE>testfloat</CODE> program is again an exception.
+For <CODE>testfloat</CODE> only, the round-to-integer operations have names of
+these forms:
+<BLOCKQUOTE>
+<PRE>
+&lt;<I>float</I>&gt;_roundToInt_r_&lt;<I>round</I>&gt;
+&lt;<I>float</I>&gt;_roundToInt_x
+</PRE>
+</BLOCKQUOTE>
+For the &lsquo;<CODE>_r_</CODE>&rsquo; versions, the <I>inexact</I> exception
+is never raised, and the <CODE>&lt;<I>round</I>&gt;</CODE> component specifies
+the rounding mode as one of &lsquo;<CODE>near_even</CODE>&rsquo;,
+&lsquo;<CODE>near_maxMag</CODE>&rsquo;, &lsquo;<CODE>minMag</CODE>&rsquo;,
+&lsquo;<CODE>min</CODE>&rsquo;, or &lsquo;<CODE>max</CODE>&rsquo;.
+The usual indication of rounding mode is ignored.
+In contrast, the &lsquo;<CODE>_x</CODE>&rsquo; versions accept the usual
+indication of rounding mode and raise the <I>inexact</I> exception whenever the
+result is not exact.
+This irregular system follows the IEEE Standard&rsquo;s particular
+specification for the round-to-integer operations.
+</P>
+
+<H3>6.6. Comparison Operations</H3>
+
+<P>
+The following floating-point comparison operations can be tested:
+<BLOCKQUOTE>
+<PRE>
+f16_eq f16_le f16_lt
+f32_eq f32_le f32_lt
+f64_eq f64_le f64_lt
+extF80_eq extF80_le extF80_lt
+f128_eq f128_le f128_lt
+</PRE>
+</BLOCKQUOTE>
+The abbreviation <CODE>eq</CODE> stands for &ldquo;equal&rdquo; (=),
+<CODE>le</CODE> stands for &ldquo;less than or equal&rdquo; (&le;), and
+<CODE>lt</CODE> stands for &ldquo;less than&rdquo; (&lt;).
+</P>
+
+<P>
+The IEEE Standard specifies that, by default, the less-than-or-equal and
+less-than comparisons raise the <I>invalid</I> exception if either input is any
+kind of NaN.
+The equality comparisons, on the other hand, are defined by default to raise
+the <I>invalid</I> exception only for signaling NaNs, not for quiet NaNs.
+For completeness, the following additional operations can be tested if
+supported:
+<BLOCKQUOTE>
+<PRE>
+f16_eq_signaling f16_le_quiet f16_lt_quiet
+f32_eq_signaling f32_le_quiet f32_lt_quiet
+f64_eq_signaling f64_le_quiet f64_lt_quiet
+extF80_eq_signaling extF80_le_quiet extF80_lt_quiet
+f128_eq_signaling f128_le_quiet f128_lt_quiet
+</PRE>
+</BLOCKQUOTE>
+The <CODE>signaling</CODE> equality comparisons are identical to the standard
+operations except that the <I>invalid</I> exception should be raised for any
+NaN input.
+Similarly, the <CODE>quiet</CODE> comparison operations should be identical to
+their counterparts except that the <I>invalid</I> exception is not raised for
+quiet NaNs.
+</P>
+
+<P>
+Obviously, no comparison operations ever require rounding.
+Any rounding mode is ignored.
+</P>
+
+
+<H2>7. Interpreting TestFloat Output</H2>
+
+<P>
+The &ldquo;errors&rdquo; reported by TestFloat programs may or may not really
+represent errors in the system being tested.
+For each test case tried, the results from the floating-point implementation
+being tested could differ from the expected results for several reasons:
+<UL>
+<LI>
+The IEEE Floating-Point Standard allows for some variation in how conforming
+floating-point behaves.
+Two implementations can sometimes give different results without either being
+incorrect.
+<LI>
+The trusted floating-point emulation could be faulty.
+This could be because there is a bug in the way the emulation is coded, or
+because a mistake was made when the code was compiled for the current system.
+<LI>
+The TestFloat program may not work properly, reporting differences that do not
+exist.
+<LI>
+Lastly, the floating-point being tested could actually be faulty.
+</UL>
+It is the responsibility of the user to determine the causes for the
+discrepancies that are reported.
+Making this determination can require detailed knowledge about the IEEE
+Standard.
+Assuming TestFloat is working properly, any differences found will be due to
+either the first or last of the reasons above.
+Variations in the IEEE Standard that could lead to false error reports are
+discussed in <NOBR>section 8</NOBR>, <I>Variations Allowed by the IEEE
+Floating-Point Standard</I>.
+</P>
+
+<P>
+For each reported error (or apparent error), a line of text is written to the
+default output.
+If a line would be longer than 79 characters, it is divided.
+The first part of each error line begins in the leftmost column, and any
+subsequent &ldquo;continuation&rdquo; lines are indented with a tab.
+</P>
+
+<P>
+Each error reported is of the form:
+<BLOCKQUOTE>
+<PRE>
+&lt;<I>inputs</I>&gt; => &lt;<I>observed-output</I>&gt; expected: &lt;<I>expected-output</I>&gt;
+</PRE>
+</BLOCKQUOTE>
+The <CODE>&lt;<I>inputs</I>&gt;</CODE> are the inputs to the operation.
+Each output (observed or expected) is shown as a pair: the result value first,
+followed by the exception flags.
+</P>
+
+<P>
+For example, two typical error lines could be
+<BLOCKQUOTE>
+<PRE>
+-00.7FFF00 -7F.000100 => +01.000000 ...ux expected: +01.000000 ....x
++81.000004 +00.1FFFFF => +01.000000 ...ux expected: +01.000000 ....x
+</PRE>
+</BLOCKQUOTE>
+In the first line, the inputs are <CODE>-00.7FFF00</CODE> and
+<CODE>-7F.000100</CODE>, and the observed result is <CODE>+01.000000</CODE>
+with flags <CODE>...ux</CODE>.
+The trusted emulation result is the same but with different flags,
+<CODE>....x</CODE>.
+Items such as <CODE>-00.7FFF00</CODE> composed of a sign character
+<NOBR>(<CODE>+</CODE>/<CODE>-</CODE>)</NOBR>, hexadecimal digits, and a single
+period represent floating-point values (here <NOBR>32-bit</NOBR>
+single-precision).
+The two instances above were reported as errors because the exception flag
+results differ.
+</P>
+
+<P>
+Aside from the exception flags, there are ten data types that may be
+represented.
+Five are floating-point types: <NOBR>16-bit</NOBR> half-precision,
+<NOBR>32-bit</NOBR> single-precision, <NOBR>64-bit</NOBR> double-precision,
+<NOBR>80-bit</NOBR> double-extended-precision, and <NOBR>128-bit</NOBR>
+quadruple-precision.
+The remaining five types are <NOBR>32-bit</NOBR> and <NOBR>64-bit</NOBR>
+unsigned integers, <NOBR>32-bit</NOBR> and <NOBR>64-bit</NOBR>
+two&rsquo;s-complement signed integers, and Boolean values (the results of
+comparison operations).
+Boolean values are represented as a single character, either a <CODE>0</CODE>
+(false) or a <CODE>1</CODE> (true).
+A <NOBR>32-bit</NOBR> integer is represented as 8 hexadecimal digits.
+Thus, for a signed <NOBR>32-bit</NOBR> integer, <CODE>FFFFFFFF</CODE> is
+&minus;1, and <CODE>7FFFFFFF</CODE> is the largest positive value.
+<NOBR>64-bit</NOBR> integers are the same except with 16 hexadecimal digits.
+</P>
+
+<P>
+Floating-point values are written decomposed into their sign, encoded exponent,
+and encoded significand.
+First is the sign character <NOBR>(<CODE>+</CODE> or <CODE>-</CODE>),</NOBR>
+followed by the encoded exponent in hexadecimal, then a period
+(<CODE>.</CODE>), and lastly the encoded significand in hexadecimal.
+</P>
+
+<P>
+For <NOBR>16-bit</NOBR> half-precision, notable values include:
+<BLOCKQUOTE>
+<TABLE CELLSPACING=0 CELLPADDING=0>
+<TR><TD><CODE>+00.000&nbsp;&nbsp;&nbsp;&nbsp;</CODE></TD><TD>+0</TD></TR>
+<TR><TD><CODE>+0F.000</CODE></TD><TD>&nbsp;1</TD></TR>
+<TR><TD><CODE>+10.000</CODE></TD><TD>&nbsp;2</TD></TR>
+<TR><TD><CODE>+1E.3FF</CODE></TD><TD>maximum finite value</TD></TR>
+<TR><TD><CODE>+1F.000</CODE></TD><TD>+infinity</TD></TR>
+<TR><TD>&nbsp;</TD></TR>
+<TR><TD><CODE>-00.000</CODE></TD><TD>&minus;0</TD></TR>
+<TR><TD><CODE>-0F.000</CODE></TD><TD>&minus;1</TD></TR>
+<TR><TD><CODE>-10.000</CODE></TD><TD>&minus;2</TD></TR>
+<TR>
+ <TD><CODE>-1E.3FF</CODE></TD>
+ <TD>minimum finite value (largest magnitude, but negative)</TD>
+</TR>
+<TR><TD><CODE>-1F.000</CODE></TD><TD>&minus;infinity</TD></TR>
+</TABLE>
+</BLOCKQUOTE>
+Certain categories are easily distinguished (assuming the <CODE>x</CODE>s are
+not all 0):
+<BLOCKQUOTE>
+<TABLE CELLSPACING=0 CELLPADDING=0>
+<TR>
+ <TD><CODE>+00.xxx&nbsp;&nbsp;&nbsp;&nbsp;</CODE></TD>
+ <TD>positive subnormal numbers</TD>
+</TR>
+<TR><TD><CODE>+1F.xxx</CODE></TD><TD>positive NaNs</TD></TR>
+<TR><TD><CODE>-00.xxx</CODE></TD><TD>negative subnormal numbers</TD></TR>
+<TR><TD><CODE>-1F.xxx</CODE></TD><TD>negative NaNs</TD></TR>
+</TABLE>
+</BLOCKQUOTE>
+</P>
+
+<P>
+Likewise for other formats:
+<BLOCKQUOTE>
+<TABLE CELLSPACING=0 CELLPADDING=0>
+<TR><TD>32-bit single</TD><TD>64-bit double</TD><TD>128-bit quadruple</TD></TR>
+<TR><TD>&nbsp;</TD></TR>
+<TR>
+<TD><CODE>+00.000000&nbsp;&nbsp;&nbsp;&nbsp;</CODE></TD>
+<TD><CODE>+000.0000000000000&nbsp;&nbsp;&nbsp;&nbsp;</CODE></TD>
+<TD><CODE>+0000.0000000000000000000000000000&nbsp;&nbsp;&nbsp;&nbsp;</CODE></TD>
+<TD>+0</TD>
+</TR>
+<TR>
+<TD><CODE>+7F.000000</CODE></TD>
+<TD><CODE>+3FF.0000000000000</CODE></TD>
+<TD><CODE>+3FFF.0000000000000000000000000000</CODE></TD>
+<TD>&nbsp;1</TD>
+</TR>
+<TR>
+<TD><CODE>+80.000000</CODE></TD>
+<TD><CODE>+400.0000000000000</CODE></TD>
+<TD><CODE>+4000.0000000000000000000000000000</CODE></TD>
+<TD>&nbsp;2</TD>
+</TR>
+<TR>
+<TD><CODE>+FE.7FFFFF</CODE></TD>
+<TD><CODE>+7FE.FFFFFFFFFFFFF</CODE></TD>
+<TD><CODE>+7FFE.FFFFFFFFFFFFFFFFFFFFFFFFFFFF</CODE></TD>
+<TD>maximum finite value</TD>
+</TR>
+<TR>
+<TD><CODE>+FF.000000</CODE></TD>
+<TD><CODE>+7FF.0000000000000</CODE></TD>
+<TD><CODE>+7FFF.0000000000000000000000000000</CODE></TD>
+<TD>+infinity</TD>
+</TR>
+<TR><TD>&nbsp;</TD></TR>
+<TR>
+<TD><CODE>-00.000000&nbsp;&nbsp;&nbsp;&nbsp;</CODE></TD>
+<TD><CODE>-000.0000000000000&nbsp;&nbsp;&nbsp;&nbsp;</CODE></TD>
+<TD><CODE>-0000.0000000000000000000000000000&nbsp;&nbsp;&nbsp;&nbsp;</CODE></TD>
+<TD>&minus;0</TD>
+</TR>
+<TR>
+<TD><CODE>-7F.000000</CODE></TD>
+<TD><CODE>-3FF.0000000000000</CODE></TD>
+<TD><CODE>-3FFF.0000000000000000000000000000</CODE></TD>
+<TD>&minus;1</TD>
+</TR>
+<TR>
+<TD><CODE>-80.000000</CODE></TD>
+<TD><CODE>-400.0000000000000</CODE></TD>
+<TD><CODE>-4000.0000000000000000000000000000</CODE></TD>
+<TD>&minus;2</TD>
+</TR>
+<TR>
+<TD><CODE>-FE.7FFFFF</CODE></TD>
+<TD><CODE>-7FE.FFFFFFFFFFFFF</CODE></TD>
+<TD><CODE>-7FFE.FFFFFFFFFFFFFFFFFFFFFFFFFFFF</CODE></TD>
+<TD>minimum finite value</TD>
+</TR>
+<TR>
+<TD><CODE>-FF.000000</CODE></TD>
+<TD><CODE>-7FF.0000000000000</CODE></TD>
+<TD><CODE>-7FFF.0000000000000000000000000000</CODE></TD>
+<TD>&minus;infinity</TD>
+</TR>
+<TR><TD>&nbsp;</TD></TR>
+<TR>
+<TD><CODE>+00.xxxxxx</CODE></TD>
+<TD><CODE>+000.xxxxxxxxxxxxx</CODE></TD>
+<TD><CODE>+0000.xxxxxxxxxxxxxxxxxxxxxxxxxxxx</CODE></TD>
+<TD>positive subnormals</TD>
+</TR>
+<TR>
+<TD><CODE>+FF.xxxxxx</CODE></TD>
+<TD><CODE>+7FF.xxxxxxxxxxxxx</CODE></TD>
+<TD><CODE>+7FFF.xxxxxxxxxxxxxxxxxxxxxxxxxxxx</CODE></TD>
+<TD>positive NaNs</TD>
+</TR>
+<TR>
+<TD><CODE>-00.xxxxxx</CODE></TD>
+<TD><CODE>-000.xxxxxxxxxxxxx</CODE></TD>
+<TD><CODE>-0000.xxxxxxxxxxxxxxxxxxxxxxxxxxxx</CODE></TD>
+<TD>negative subnormals</TD>
+</TR>
+<TR>
+<TD><CODE>-FF.xxxxxx</CODE></TD>
+<TD><CODE>-7FF.xxxxxxxxxxxxx</CODE></TD>
+<TD><CODE>-7FFF.xxxxxxxxxxxxxxxxxxxxxxxxxxxx</CODE></TD>
+<TD>negative NaNs</TD>
+</TR>
+</TABLE>
+</BLOCKQUOTE>
+</P>
+
+<P>
+The <NOBR>80-bit</NOBR> double-extended-precision values are a little unusual
+in that the leading bit of precision is not hidden as with other formats.
+When canonically encoded, the leading significand bit of an <NOBR>80-bit</NOBR>
+double-extended-precision value will be 0 if the value is zero or subnormal,
+and will be 1 otherwise.
+Hence, the same values listed above appear in <NOBR>80-bit</NOBR>
+double-extended-precision as follows (note the leading <CODE>8</CODE> digit in
+the significands):
+<BLOCKQUOTE>
+<TABLE CELLSPACING=0 CELLPADDING=0>
+<TR>
+ <TD><CODE>+0000.0000000000000000&nbsp;&nbsp;&nbsp;&nbsp;</CODE></TD>
+ <TD>+0</TD>
+</TR>
+<TR><TD><CODE>+3FFF.8000000000000000</CODE></TD><TD>&nbsp;1</TD></TR>
+<TR><TD><CODE>+4000.8000000000000000</CODE></TD><TD>&nbsp;2</TD></TR>
+<TR>
+ <TD><CODE>+7FFE.FFFFFFFFFFFFFFFF</CODE></TD>
+ <TD>maximum finite value</TD>
+</TR>
+<TR><TD><CODE>+7FFF.8000000000000000</CODE></TD><TD>+infinity</TD></TR>
+<TR><TD>&nbsp;</TD></TR>
+<TR><TD><CODE>-0000.0000000000000000</CODE></TD><TD>&minus;0</TD></TR>
+<TR><TD><CODE>-3FFF.8000000000000000</CODE></TD><TD>&minus;1</TD></TR>
+<TR><TD><CODE>-4000.8000000000000000</CODE></TD><TD>&minus;2</TD></TR>
+<TR>
+ <TD><CODE>-7FFE.FFFFFFFFFFFFFFFF</CODE></TD>
+ <TD>minimum finite value</TD>
+</TR>
+<TR><TD><CODE>-7FFF.8000000000000000</CODE></TD><TD>&minus;infinity</TD></TR>
+</TABLE>
+</BLOCKQUOTE>
+</P>
+
+<P>
+Lastly, exception flag values are represented by five characters, one character
+per flag.
+Each flag is written as either a letter or a period (<CODE>.</CODE>) according
+to whether the flag was set or not by the operation.
+A period indicates the flag was not set.
+The letter used to indicate a set flag depends on the flag:
+<BLOCKQUOTE>
+<TABLE CELLSPACING=0 CELLPADDING=0>
+<TR>
+ <TD><CODE>v&nbsp;&nbsp;&nbsp;&nbsp;</CODE></TD>
+ <TD><I>invalid</I> exception</TD>
+</TR>
+<TR>
+ <TD><CODE>i</CODE></TD>
+ <TD><I>infinite</I> exception (&ldquo;divide by zero&rdquo;)</TD>
+</TR>
+<TR><TD><CODE>o</CODE></TD><TD><I>overflow</I> exception</TD></TR>
+<TR><TD><CODE>u</CODE></TD><TD><I>underflow</I> exception</TD></TR>
+<TR><TD><CODE>x</CODE></TD><TD><I>inexact</I> exception</TD></TR>
+</TABLE>
+</BLOCKQUOTE>
+For example, the notation <CODE>...ux</CODE> indicates that the
+<I>underflow</I> and <I>inexact</I> exception flags were set and that the other
+three flags (<I>invalid</I>, <I>infinite</I>, and <I>overflow</I>) were not
+set.
+The exception flags are always written following the value returned as the
+result of the operation.
+</P>
+
+
+<H2>8. Variations Allowed by the IEEE Floating-Point Standard</H2>
+
+<P>
+The IEEE Floating-Point Standard admits some variation among conforming
+implementations.
+Because TestFloat expects the two implementations being compared to deliver
+bit-for-bit identical results under most circumstances, this leeway in the
+standard can result in false errors being reported if the two implementations
+do not make the same choices everywhere the standard provides an option.
+</P>
+
+<H3>8.1. Underflow</H3>
+
+<P>
+The standard specifies that the <I>underflow</I> exception flag is to be raised
+when two conditions are met simultaneously:
+<NOBR>(1) <I>tininess</I></NOBR> and <NOBR>(2) <I>loss of accuracy</I></NOBR>.
+</P>
+
+<P>
+A result is tiny when its magnitude is nonzero yet smaller than any normalized
+floating-point number.
+The standard allows tininess to be determined either before or after a result
+is rounded to the destination precision.
+If tininess is detected before rounding, some borderline cases will be flagged
+as underflows even though the result after rounding actually lies within the
+normal floating-point range.
+By detecting tininess after rounding, a system can avoid some unnecessary
+signaling of underflow.
+All the TestFloat programs support options <CODE>-tininessbefore</CODE> and
+<CODE>-tininessafter</CODE> to control whether TestFloat expects tininess on
+underflow to be detected before or after rounding.
+One or the other is selected as the default when TestFloat is compiled, but
+these command options allow the default to be overridden.
+</P>
+
+<P>
+Loss of accuracy occurs when the subnormal format is not sufficient to
+represent an underflowed result accurately.
+The original 1985 version of the IEEE Standard allowed loss of accuracy to be
+detected either as an <I>inexact result</I> or as a
+<I>denormalization loss</I>;
+however, few if any systems ever chose the latter.
+The latest standard requires that loss of accuracy be detected as an inexact
+result, and TestFloat can test only for this case.
+</P>
+
+<H3>8.2. NaNs</H3>
+
+<P>
+The IEEE Standard gives the floating-point formats a large number of NaN
+encodings and specifies that NaNs are to be returned as results under certain
+conditions.
+However, the standard allows an implementation almost complete freedom over
+<EM>which</EM> NaN to return in each situation.
+</P>
+
+<P>
+By default, TestFloat does not check the bit patterns of NaN results.
+When the result of an operation should be a NaN, any NaN is considered as good
+as another.
+This laxness can be overridden with the <CODE>-checkNaNs</CODE> option of
+programs <CODE>testfloat_ver</CODE> and <CODE>testfloat</CODE>.
+In order for this option to be sensible, TestFloat must have been compiled so
+that its internal floating-point implementation (SoftFloat) generates the
+proper NaN results for the system being tested.
+</P>
+
+<H3>8.3. Conversions to Integer</H3>
+
+<P>
+Conversion of a floating-point value to an integer format will fail if the
+source value is a NaN or if it is too large.
+The IEEE Standard does not specify what value should be returned as the integer
+result in these cases.
+Moreover, according to the standard, the <I>invalid</I> exception can be raised
+or an unspecified alternative mechanism may be used to signal such cases.
+</P>
+
+<P>
+TestFloat assumes that conversions to integer will raise the <I>invalid</I>
+exception if the source value cannot be rounded to a representable integer.
+In such cases, TestFloat expects the result value to be the largest-magnitude
+positive or negative integer or zero, as detailed earlier in
+<NOBR>section 6.1</NOBR>, <I>Conversion Operations</I>.
+If option <CODE>-checkInvInts</CODE> is selected with programs
+<CODE>testfloat_ver</CODE> and <CODE>testfloat</CODE>, integer results of
+invalid operations are checked for an exact match.
+In order for this option to be sensible, TestFloat must have been compiled so
+that its internal floating-point implementation (SoftFloat) generates the
+proper integer results for the system being tested.
+</P>
+
+
+<H2>9. Contact Information</H2>
+
+<P>
+At the time of this writing, the most up-to-date information about TestFloat
+and the latest release can be found at the Web page
+<A HREF="http://www.jhauser.us/arithmetic/TestFloat.html"><NOBR><CODE>http://www.jhauser.us/arithmetic/TestFloat.html</CODE></NOBR></A>.
+</P>
+
+
+</BODY>
+
diff --git a/src/libs/softfloat-3e/testfloat/doc/TestFloat-history.html b/src/libs/softfloat-3e/testfloat/doc/TestFloat-history.html
new file mode 100644
index 00000000..1c247de0
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/doc/TestFloat-history.html
@@ -0,0 +1,272 @@
+
+<HTML>
+
+<HEAD>
+<TITLE>Berkeley TestFloat History</TITLE>
+</HEAD>
+
+<BODY>
+
+<H1>History of Berkeley TestFloat, to Release 3e</H1>
+
+<P>
+John R. Hauser<BR>
+2018 January 20<BR>
+</P>
+
+
+<P>
+Releases of Berkeley TestFloat normally parallel those of Berkeley SoftFloat,
+on which TestFloat is based.
+Each TestFloat release necessarily incorporates all bug fixes from the
+corresponding release of SoftFloat.
+</P>
+
+
+<H3>Release 3e (2018 January)</H3>
+
+<UL>
+
+<LI>
+Fixed a problem with the all-in-one <CODE>testfloat</CODE> program whereby
+function set <CODE>-all1</CODE> incorrectly also tested the three-operand fused
+multiply-add operations.
+
+<LI>
+Modified the expected behavior of rounding mode <CODE>odd</CODE> (jamming) when
+rounding to an integer value (either conversion to an integer format or a
+&lsquo;<CODE>roundToInt</CODE>&rsquo; function).
+Previously, for those cases only, rounding mode <CODE>odd</CODE> was expected
+to act the same as rounding to minimum magnitude.
+Now, when rounding to an integer value, the nearest odd integer is expected,
+consistent with the round-to-odd result of other operations.
+
+<LI>
+Added options <CODE>-checkInvInts</CODE> and <CODE>-checkAll</CODE> to programs
+<CODE>testfloat_ver</CODE> and <CODE>testfloat</CODE>.
+
+<LI>
+Improved the checking of integer results of invalid operations.
+
+</UL>
+
+
+<H3>Release 3d (2017 August)</H3>
+
+<UL>
+
+<LI>
+When the all-in-one <CODE>testfloat</CODE> program is compiled to test the C
+language&rsquo;s arithmetic, added the ability to test library functions
+<CODE>sqrtf</CODE>, <CODE>sqrtl</CODE>, <CODE>fmaf</CODE>, <CODE>fma</CODE>,
+and <CODE>fmal</CODE>, which were added to the <NOBR>C Standard</NOBR> in 1999.
+
+</UL>
+
+
+<H3>Release 3c (2017 February)</H3>
+
+<UL>
+
+<LI>
+Added support for testing rounding mode <CODE>odd</CODE> (jamming).
+
+<LI>
+Made support for testing <NOBR>64-bit</NOBR> double-precistion floating-point
+be subject to macro <CODE>FLOAT64</CODE> (akin to macros <CODE>FLOAT16</CODE>,
+<CODE>EXTFLOAT80</CODE>, and <CODE>FLOAT128</CODE> from before).
+
+<LI>
+Fixed some bugs that caused compilation to fail with certain combinations of
+option macro settings.
+
+<LI>
+Corrected the types of two internal variables to be <CODE>sig_atomic_t</CODE>
+instead of <CODE>bool</CODE>.
+
+<LI>
+Improved the formatting of some error reports (concerning where lines are
+broken when they exceed 79 characters in length).
+
+</UL>
+
+
+<H3>Release 3b (2016 July)</H3>
+
+<UL>
+
+<LI>
+Added the ability to test the common <NOBR>16-bit</NOBR>
+&ldquo;half-precision&rdquo; floating-point format.
+
+<LI>
+Added a <CODE>-seed</CODE> option to programs <CODE>testfloat_gen</CODE>,
+<CODE>testfloat</CODE>, and <CODE>testsoftfloat</CODE> for setting the seed for
+the pseudo-random number generator used to generate test cases.
+
+<LI>
+Where a specific choice is needed for how tininess is detected on underflow,
+changed the default to be the detection of tininess after rounding
+(<CODE>-tininessafter</CODE>) instead of before rounding
+(<CODE>-tininessbefore</CODE>).
+
+<LI>
+Modified the format of reported discrepancies to show the signs of
+floating-point values using <CODE>+</CODE> and <CODE>-</CODE> characters.
+
+<LI>
+Documented the use of the <CODE>INLINE</CODE> macro, and fixed the sources for
+the case that function inlining is not supported by the C compiler.
+
+<LI>
+Documented the possible need to define macro <CODE>THREAD_LOCAL</CODE> to match
+how the SoftFloat library was built.
+
+<LI>
+Modified the provided Makefiles to allow some options to be overridden from the
+<CODE>make</CODE> command.
+
+</UL>
+
+
+<H3>Release 3a (2015 October)</H3>
+
+<UL>
+
+<LI>
+Replaced the license text supplied by the University of California, Berkeley,
+and fixed some minor build problems.
+
+</UL>
+
+
+<H3>Release 3 (2015 February)</H3>
+
+<UL>
+
+<LI>
+Complete rewrite, funded by the University of California, Berkeley, and
+consequently having a different use license than earlier releases.
+Visible changes included different names for testable functions and command
+options.
+
+<LI>
+Reinstated separate programs for generating test cases
+(<CODE>testfloat_ver</CODE>) and verifying test results
+(<CODE>testfloat_gen</CODE>), as alternatives to the all-in-one
+<CODE>testfloat</CODE> program (which remained supported).
+
+<LI>
+Added support for testing conversions between floating-point and unsigned
+integers, both <NOBR>32-bit</NOBR> and <NOBR>64-bit</NOBR>.
+
+<LI>
+Added support for testing a fused multiply-add operation, for all testable
+floating-point formats except <NOBR>80-bit</NOBR> double-extended-precision.
+
+<LI>
+Added support for testing a fifth rounding mode, <CODE>near_maxMag</CODE>
+(round to nearest, with ties to maximum magnitude, away from zero).
+
+<LI>
+Added <CODE>timesoftfloat</CODE> (previously found in the Berkeley SoftFloat
+package).
+
+</UL>
+
+
+<H3>Release 2c (2015 January)</H3>
+
+<UL>
+
+<LI>
+Fixed mistakes affecting some <NOBR>64-bit</NOBR> processors.
+
+<LI>
+Made minor updates to the documentation, including improved wording for the
+legal restrictions on using TestFloat releases <NOBR>through 2c</NOBR> (not
+applicable to <NOBR>Release 3</NOBR> or later).
+
+</UL>
+
+
+<P>
+There was never a <NOBR>Release 2b</NOBR>.
+</P>
+
+
+<H3>Release 2a (1998 December)</H3>
+
+<UL>
+
+<LI>
+Added support for testing conversions between floating-point and
+<NOBR>64-bit</NOBR> signed integers.
+
+<LI>
+Improved the Makefiles.
+
+</UL>
+
+
+<H3>Release 2 (1997 June)</H3>
+
+<UL>
+
+<LI>
+Integrated the generation of test cases and the checking of system results into
+a single program.
+(Before they were separate programs, normally joined by explicit command-line
+pipes.)
+
+<LI>
+Improved the sequence of test cases.
+
+<LI>
+Added support for testing <NOBR>80-bit</NOBR> double-extended-precision and
+<NOBR>128-bit</NOBR> quadruple precision.
+
+<LI>
+Made program output more readable, and added new command arguments.
+
+<LI>
+Reduced dependence on the quality of the standard <CODE>rand</CODE> function
+for generating test cases.
+(Previously naively expected <CODE>rand</CODE> to be able to generate good
+random bits for the entire machine word width.)
+
+<LI>
+Created <CODE>testsoftfloat</CODE>, with its own simpler complete software
+floating-point (&ldquo;slowfloat&rdquo;) for comparison purposes.
+
+<LI>
+Made some changes to the source file structure, including renaming
+<CODE>environment.h</CODE> to <CODE>milieu.h</CODE> (to avoid confusion with
+environment variables).
+
+</UL>
+
+
+<H3>Release 1a (1996 July)</H3>
+
+<UL>
+
+<LI>
+Added the <CODE>-tininessbefore</CODE> and <CODE>-tininessafter</CODE> options
+to control whether tininess should be detected before or after rounding.
+
+</UL>
+
+
+<H3>Release 1 (1996 July)</H3>
+
+<UL>
+
+<LI>
+Original release.
+
+</UL>
+
+
+</BODY>
+
diff --git a/src/libs/softfloat-3e/testfloat/doc/TestFloat-source.html b/src/libs/softfloat-3e/testfloat/doc/TestFloat-source.html
new file mode 100644
index 00000000..24fb5946
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/doc/TestFloat-source.html
@@ -0,0 +1,639 @@
+
+<HTML>
+
+<HEAD>
+<TITLE>Berkeley TestFloat Source Documentation</TITLE>
+</HEAD>
+
+<BODY>
+
+<H1>Berkeley TestFloat Release 3e: Source Documentation</H1>
+
+<P>
+John R. Hauser<BR>
+2018 January 20<BR>
+</P>
+
+
+<H2>Contents</H2>
+
+<BLOCKQUOTE>
+<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
+<COL WIDTH=25>
+<COL WIDTH=*>
+<TR><TD COLSPAN=2>1. Introduction</TD></TR>
+<TR><TD COLSPAN=2>2. Limitations</TD></TR>
+<TR><TD COLSPAN=2>3. Acknowledgments and License</TD></TR>
+<TR><TD COLSPAN=2>4. TestFloat Package Directory Structure</TD></TR>
+<TR><TD COLSPAN=2>5. Dependence on Berkeley SoftFloat</TD></TR>
+<TR><TD COLSPAN=2>6. Issues for Porting TestFloat to a New Target</TD></TR>
+<TR>
+ <TD></TD>
+ <TD>6.1. Standard Headers <CODE>&lt;stdbool.h&gt;</CODE> and
+ <CODE>&lt;stdint.h&gt;</CODE></TD>
+</TR>
+<TR><TD></TD><TD>6.2. Standard Header <CODE>&lt;fenv.h&gt;</CODE></TD></TR>
+<TR><TD></TD><TD>6.3. Macros for Build Options</TD></TR>
+<TR><TD></TD><TD>6.4. Specializing the <CODE>testfloat</CODE> Program</TD></TR>
+<TR><TD></TD><TD>6.5. Improving the Random Number Functions</TD></TR>
+<TR><TD COLSPAN=2>7. Contact Information</TD></TR>
+</TABLE>
+</BLOCKQUOTE>
+
+
+<H2>1. Introduction</H2>
+
+<P>
+This document gives information needed for compiling and/or porting Berkeley
+TestFloat, a small collection of programs for testing that an implementation of
+binary floating-point conforms to the IEEE Standard for Floating-Point
+Arithmetic.
+For basic documentation about TestFloat refer to
+<A HREF="TestFloat-general.html"><NOBR><CODE>TestFloat-general.html</CODE></NOBR></A>.
+</P>
+
+<P>
+The source code for TestFloat is intended to be relatively machine-independent.
+Most programs in the TestFloat package should be compilable with any
+ISO-Standard C compiler that also supports <NOBR>64-bit</NOBR> integers.
+If the all-in-one <CODE>testfloat</CODE> program will be used to test a new
+floating-point implementation, additional effort will likely be required to
+retarget that program to invoke the new floating-point operations.
+TestFloat has been successfully compiled with the GNU C Compiler
+(<CODE>gcc</CODE>) for several platforms.
+</P>
+
+<P>
+<NOBR>Release 3</NOBR> of TestFloat was a complete rewrite relative to
+<NOBR>Release 2c</NOBR> or earlier.
+The current version of TestFloat is <NOBR>Release 3e</NOBR>.
+</P>
+
+<P>
+TestFloat depends on Berkeley SoftFloat, which is a software implementation of
+binary floating-point that conforms to the IEEE Standard for Floating-Point
+Arithmetic.
+SoftFloat is not included with the TestFloat sources.
+It can be obtained from the Web page
+<A HREF="http://www.jhauser.us/arithmetic/SoftFloat.html"><NOBR><CODE>http://www.jhauser.us/arithmetic/SoftFloat.html</CODE></NOBR></A>.
+</P>
+
+
+<H2>2. Limitations</H2>
+
+<P>
+TestFloat assumes the computer has an addressable byte size of either 8 or
+<NOBR>16 bits</NOBR>.
+(Nearly all computers in use today have <NOBR>8-bit</NOBR> bytes.)
+</P>
+
+<P>
+TestFloat is written entirely <NOBR>in C</NOBR>.
+The C compiler used must conform at a minimum to the 1989 ANSI standard for the
+C language (same as the 1990 ISO standard) and must in addition support basic
+arithmetic on <NOBR>64-bit</NOBR> integers.
+Earlier releases of TestFloat were capable of testing <NOBR>32-bit</NOBR>
+single-precision and <NOBR>64-bit</NOBR> double-precision floating-point
+without requiring compiler support for <NOBR>64-bit</NOBR> integers, but this
+option is not supported starting with <NOBR>Release 3</NOBR>.
+Since 1999, ISO standards for C have mandated compiler support for
+<NOBR>64-bit</NOBR> integers.
+A compiler conforming to the 1999 C Standard or later is recommended but not
+strictly required.
+</P>
+
+<P>
+<NOBR>C Standard</NOBR> header files <CODE>&lt;stdbool.h&gt;</CODE> and
+<CODE>&lt;stdint.h&gt;</CODE> are required for defining standard Boolean and
+integer types.
+If these headers are not supplied with the C compiler, minimal substitutes must
+be provided.
+TestFloat&rsquo;s dependence on these headers is detailed later in
+<NOBR>section 6.1</NOBR>, <I>Standard Headers <CODE>&lt;stdbool.h&gt;</CODE>
+and <CODE>&lt;stdint.h&gt;</CODE></I>.
+</P>
+
+
+<H2>3. Acknowledgments and License</H2>
+
+<P>
+The TestFloat package was written by me, <NOBR>John R.</NOBR> Hauser.
+<NOBR>Release 3</NOBR> of TestFloat was a completely new implementation
+supplanting earlier releases.
+The project to create <NOBR>Release 3</NOBR> (now <NOBR>through 3e</NOBR>) was
+done in the employ of the University of California, Berkeley, within the
+Department of Electrical Engineering and Computer Sciences, first for the
+Parallel Computing Laboratory (Par Lab) and then for the ASPIRE Lab.
+The work was officially overseen by Prof. Krste Asanovic, with funding provided
+by these sources:
+<BLOCKQUOTE>
+<TABLE>
+<COL>
+<COL WIDTH=10>
+<COL>
+<TR>
+<TD VALIGN=TOP><NOBR>Par Lab:</NOBR></TD>
+<TD></TD>
+<TD>
+Microsoft (Award #024263), Intel (Award #024894), and U.C. Discovery
+(Award #DIG07-10227), with additional support from Par Lab affiliates Nokia,
+NVIDIA, Oracle, and Samsung.
+</TD>
+</TR>
+<TR>
+<TD VALIGN=TOP><NOBR>ASPIRE Lab:</NOBR></TD>
+<TD></TD>
+<TD>
+DARPA PERFECT program (Award #HR0011-12-2-0016), with additional support from
+ASPIRE industrial sponsor Intel and ASPIRE affiliates Google, Nokia, NVIDIA,
+Oracle, and Samsung.
+</TD>
+</TR>
+</TABLE>
+</BLOCKQUOTE>
+</P>
+
+<P>
+The following applies to the whole of TestFloat <NOBR>Release 3e</NOBR> as well
+as to each source file individually.
+</P>
+
+<P>
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
+University of California.
+All rights reserved.
+</P>
+
+<P>
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+<OL>
+
+<LI>
+<P>
+Redistributions of source code must retain the above copyright notice, this
+list of conditions, and the following disclaimer.
+</P>
+
+<LI>
+<P>
+Redistributions in binary form must reproduce the above copyright notice, this
+list of conditions, and the following disclaimer in the documentation and/or
+other materials provided with the distribution.
+</P>
+
+<LI>
+<P>
+Neither the name of the University nor the names of its contributors may be
+used to endorse or promote products derived from this software without specific
+prior written permission.
+</P>
+
+</OL>
+</P>
+
+<P>
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS &ldquo;AS IS&rdquo;,
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED.
+IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</P>
+
+
+<H2>4. TestFloat Package Directory Structure</H2>
+
+<P>
+Because TestFloat is targeted to multiple platforms, its source code is
+slightly scattered between target-specific and target-independent directories
+and files.
+The supplied directory structure is as follows:
+<BLOCKQUOTE>
+<PRE>
+doc
+source
+ subj-C
+build
+ template
+ Linux-386-GCC
+ Linux-386-SSE2-GCC
+ Linux-x86_64-GCC
+ Linux-ARM-VFPv2-GCC
+ Win32-MinGW
+ Win32-SSE2-MinGW
+ Win64-MinGW-w64
+</PRE>
+</BLOCKQUOTE>
+The majority of the TestFloat sources are provided in the <CODE>source</CODE>
+directory.
+The <NOBR><CODE>subj-C</CODE></NOBR> subdirectory contains the sources that
+configure the all-in-one <CODE>testfloat</CODE> program to test the C
+compiler&rsquo;s implementation of the standard C types <CODE>float</CODE>,
+<CODE>double</CODE>, and possibly <CODE>long</CODE> <CODE>double</CODE>.
+The &lsquo;<CODE>subj</CODE>&rsquo; in <NOBR><CODE>subj-C</CODE></NOBR> is an
+abbreviation of <I>subject</I>, referring to the floating-point that is the
+subject of the test.
+If <CODE>testfloat</CODE> is retargeted to test other floating-point
+implementations, the corresponding source files would be expected to be in
+other subdirectories alongside <NOBR><CODE>subj-C</CODE></NOBR>, with names of
+the form <NOBR><CODE>subj-&lt;<I>target</I>&gt;</CODE></NOBR>.
+More about retargeting <CODE>testfloat</CODE> is found in
+<NOBR>section 6.4</NOBR>, <I>Specializing the <CODE>testfloat</CODE>
+Program</I>.
+</P>
+
+<P>
+The <CODE>build</CODE> directory is intended to contain a subdirectory for each
+target platform for which builds of the TestFloat programs may be created.
+For each build target, the target&rsquo;s subdirectory is where all derived
+object files and the completed TestFloat executables are created.
+The <CODE>template</CODE> subdirectory is not an actual build target but
+contains sample files for creating new target directories.
+</P>
+
+<P>
+Ignoring the <CODE>template</CODE> directory, the supplied target directories
+are intended to follow a naming system of
+<NOBR><CODE>&lt;<I>execution-environment</I>&gt;-&lt;<I>compiler</I>&gt;</CODE></NOBR>.
+For the example targets,
+<NOBR><CODE>&lt;<I>execution-environment</I>&gt;</CODE></NOBR> is
+<NOBR><CODE>Linux-386</CODE></NOBR>, <NOBR><CODE>Linux-386-SSE2</CODE></NOBR>,
+<NOBR><CODE>Linux-x86_64</CODE></NOBR>,
+<NOBR><CODE>Linux-ARM-VFPv2</CODE></NOBR>, <CODE>Win32</CODE>,
+<NOBR><CODE>Win32-SSE2</CODE></NOBR>, or <CODE>Win64</CODE>, and
+<NOBR><CODE>&lt;<I>compiler</I>&gt;</CODE></NOBR> is <CODE>GCC</CODE>,
+<CODE>MinGW</CODE>, or <NOBR><CODE>MinGW-w64</CODE></NOBR>.
+</P>
+
+<P>
+All of the supplied target directories are merely examples that may or may not
+be correct for compiling on any particular system.
+There are currently no plans to include and maintain in the TestFloat package
+the build files needed for a great many users&rsquo; compilation environments,
+which can span a huge range of operating systems, compilers, and other tools.
+</P>
+
+<P>
+As supplied, each target directory contains two files:
+<BLOCKQUOTE>
+<PRE>
+Makefile
+platform.h
+</PRE>
+</BLOCKQUOTE>
+The provided <CODE>Makefile</CODE> is written for GNU <CODE>make</CODE>.
+A build of TestFloat for the specific target is begun by executing the
+<CODE>make</CODE> command with the target directory as the current directory.
+A completely different build tool can be used if an appropriate
+<CODE>Makefile</CODE> equivalent is created.
+</P>
+
+<P>
+The <CODE>platform.h</CODE> header file exists to provide a location for
+additional C declarations specific to the build target.
+Every C source file of TestFloat contains a <CODE>#include</CODE> for
+<CODE>platform.h</CODE>.
+In many cases, the contents of <CODE>platform.h</CODE> can be as simple as one
+or two lines of code.
+If the target&rsquo;s compiler or library has bugs or other shortcomings,
+workarounds for these issues may be possible with target-specific declarations
+in <CODE>platform.h</CODE>, without the need to modify the main TestFloat
+sources.
+</P>
+
+<P>
+It may not be necessary to build all of the TestFloat programs.
+For testing a floating-point implementation, typically
+<CODE>testfloat_gen</CODE> and <CODE>testfloat</CODE> will not both be used,
+and <CODE>testfloat_ver</CODE> may not be needed either.
+The Makefile (or equivalent) can be modified not to create unneeded programs.
+This may be especially relevant for the all-in-one test program
+<CODE>testfloat</CODE>, which might not build without special attention.
+</P>
+
+
+<H2>5. Dependence on Berkeley SoftFloat</H2>
+
+<P>
+In addition to the distributed sources, TestFloat depends on the existence of a
+compatible Berkeley SoftFloat library and the corresponding header file
+<CODE>softfloat.h</CODE>.
+As mentioned earlier, SoftFloat is a separate package available at Web page
+<A HREF="http://www.jhauser.us/arithmetic/SoftFloat.html"><NOBR><CODE>http://www.jhauser.us/arithmetic/SoftFloat.html</CODE></NOBR></A>.
+The SoftFloat library must be compiled before the TestFloat programs can be
+built.
+In the example Makefiles, the locations of the SoftFloat header files and
+pre-compiled library are specified by these macros:
+<BLOCKQUOTE>
+<DL>
+<DT><CODE>SOFTFLOAT_INCLUDE_DIR</CODE>
+<DD>
+The path of the directory containing <CODE>softfloat.h</CODE>, as well as other
+nonstandard header files referenced by <CODE>softfloat.h</CODE>, if any.
+<DT><CODE>SOFTFLOAT_H</CODE>
+<DD>
+A list of the full paths of all SoftFloat header files needed by SoftFloat
+clients. This list must include <CODE>softfloat.h</CODE> and may also include
+other header files referenced by <CODE>softfloat.h</CODE>, such as
+<CODE>softfloat_types.h</CODE>.
+This macro is used only to establish build dependencies between the SoftFloat
+header files and TestFloat&rsquo;s source files, in case the SoftFloat header
+files are changed.
+<DT><CODE>SOFTFLOAT_LIB</CODE>
+<DD>
+The full path of the compiled SoftFloat library (usually
+<CODE>softfloat.a</CODE> or <CODE>libsoftfloat.a</CODE>).
+</DL>
+</BLOCKQUOTE>
+</P>
+
+
+<H2>6. Issues for Porting TestFloat to a New Target</H2>
+
+<H3>6.1. Standard Headers <CODE>&lt;stdbool.h&gt;</CODE> and <CODE>&lt;stdint.h&gt;</CODE></H3>
+
+<P>
+The TestFloat sources make use of standard headers
+<CODE>&lt;stdbool.h&gt;</CODE> and <CODE>&lt;stdint.h&gt;</CODE>, which have
+been part of the ISO C Standard Library since 1999.
+With any recent compiler, these standard headers are likely to be supported,
+even if the compiler does not claim complete conformance to the latest ISO C
+Standard.
+For older or nonstandard compilers, substitutes for
+<CODE>&lt;stdbool.h&gt;</CODE> and <CODE>&lt;stdint.h&gt;</CODE> may need to be
+created.
+TestFloat depends on these names from <CODE>&lt;stdbool.h&gt;</CODE>:
+<BLOCKQUOTE>
+<PRE>
+bool
+true
+false
+</PRE>
+</BLOCKQUOTE>
+and on these names from <CODE>&lt;stdint.h&gt;</CODE>:
+<BLOCKQUOTE>
+<PRE>
+uint16_t
+uint32_t
+uint64_t
+int32_t
+int64_t
+UINT64_C
+INT64_C
+uint_least8_t
+uint_fast8_t
+uint_fast16_t
+uint_fast32_t
+uint_fast64_t
+int_fast8_t
+int_fast16_t
+int_fast32_t
+int_fast64_t
+</PRE>
+</BLOCKQUOTE>
+</P>
+
+
+<H3>6.2. Standard Header <CODE>&lt;fenv.h&gt;</CODE></H3>
+
+<P>
+Because the supplied all-in-one <CODE>testfloat</CODE> program tests the
+floating-point operations of the C language, it uses the facilities provided by
+standard C header <CODE>&lt;fenv.h&gt;</CODE> to access the floating-point
+environment of C, in particular to set the rounding mode and to access the
+floating-point exception flags.
+Like <CODE>&lt;stdbool.h&gt;</CODE> and <CODE>&lt;stdint.h&gt;</CODE>,
+<CODE>&lt;fenv.h&gt;</CODE> has been part of the ISO C Standard Library since
+1999, but older or nonstandard C compilers may not support it.
+</P>
+
+<P>
+Some form of standard header <CODE>&lt;fenv.h&gt;</CODE> is needed only if the
+<CODE>testfloat</CODE> program is wanted <EM>and</EM> the program will not be
+retargeted to invoke a floating-point implementation in a way that bypasses the
+standard C environment.
+Typically, if <CODE>testfloat</CODE> is wanted, it will be retargeted to invoke
+a new floating-point implementation directly, making
+<CODE>&lt;fenv.h&gt;</CODE> irrelevant.
+For more about retargeting <CODE>testfloat</CODE>, see <NOBR>section 6.4</NOBR>
+below, <I>Specializing the <CODE>testfloat</CODE> Program</I>.
+</P>
+
+
+<H3>6.3. Macros for Build Options</H3>
+
+<P>
+The TestFloat source files are affected by several C preprocessor macros:
+<BLOCKQUOTE>
+<DL>
+<DT><CODE>LITTLEENDIAN</CODE>
+<DD>
+Must be defined for little-endian machines;
+must not be defined for big-endian machines.
+<DT><CODE>INLINE</CODE>
+<DD>
+Can be defined to a sequence of tokens used to indicate that a C function
+should be inlined.
+If the compiler does not support the inlining of functions, this macro must not
+be defined.
+For compilers that conform to the C Standard&rsquo;s rules for inline
+functions, this macro can be defined as the single keyword <CODE>inline</CODE>.
+For other compilers that follow a convention pre-dating the standardization of
+<CODE>inline</CODE>, this macro may need to be defined to <CODE>extern</CODE>
+<CODE>inline</CODE>.
+<DT><CODE>THREAD_LOCAL</CODE>
+<DD>
+Can be defined to a sequence of tokens that, when appearing at the start of a
+variable declaration, indicates to the C compiler that the variable is
+<I>per-thread</I>, meaning that each execution thread gets its own separate
+instance of the variable.
+This macro is used in the supplied version of Berkeley SoftFloat&rsquo;s header
+<CODE>softfloat.h</CODE>, in the declarations of variables
+<CODE>softfloat_roundingMode</CODE>, <CODE>softfloat_detectTininess</CODE>,
+<CODE>extF80_roundingPrecision</CODE>, and
+<CODE>softfloat_exceptionFlags</CODE>.
+To use the supplied, unmodified header <CODE>softfloat.h</CODE>, this macro
+must be defined (or not defined) the same as when the SoftFloat library was
+built.
+</DL>
+<DL>
+<DT><CODE>FLOAT16</CODE>
+<DD>
+Must be defined if the TestFloat programs are to support the
+<NOBR>16-bit</NOBR> half-precision floating-point format.
+<DT><CODE>FLOAT64</CODE>
+<DD>
+Must be defined if the TestFloat programs are to support the
+<NOBR>64-bit</NOBR> double-precision floating-point format.
+<DT><CODE>EXTFLOAT80</CODE>
+<DD>
+Must be defined if the TestFloat programs are to support the
+<NOBR>80-bit</NOBR> double-extended-precision floating-point format.
+<DT><CODE>FLOAT128</CODE>
+<DD>
+Must be defined if the TestFloat programs are to support the
+<NOBR>128-bit</NOBR> quadruple-precision floating-point format.
+<DT><CODE>FLOAT_ROUND_ODD</CODE>
+<DD>
+Must be defined if the TestFloat programs are to support rounding to odd
+(jamming).
+To be useful, this option also requires that the Berkeley SoftFloat library was
+compiled with macro <CODE>SOFTFLOAT_ROUND_ODD</CODE> defined.
+</DL>
+</BLOCKQUOTE>
+Following the usual custom <NOBR>for C</NOBR>, for all the macros except
+<CODE>INLINE</CODE> and <CODE>THREAD_LOCAL</CODE>, the content of a
+macro&rsquo;s definition is irrelevant;
+what matters is a macro&rsquo;s effect on <CODE>#ifdef</CODE> directives.
+</P>
+
+<P>
+It is recommended that any definition of macros <CODE>LITTLEENDIAN</CODE>,
+<CODE>INLINE</CODE>, and <CODE>THREAD_LOCAL</CODE> be made in a build
+target&rsquo;s <CODE>platform.h</CODE> header file, because these macros are
+expected to be determined inflexibly by the target machine and compiler.
+The other five macros select build options, and hence might be better located
+in the target&rsquo;s Makefile (or its equivalent).
+</P>
+
+
+<H3>6.4. Specializing the <CODE>testfloat</CODE> Program</H3>
+
+<P>
+The supplied sources for the all-in-one <CODE>testfloat</CODE> program cause
+<CODE>testfloat</CODE> to test the C compiler&rsquo;s <CODE>float</CODE> and
+<CODE>double</CODE> types for C operations <CODE>+</CODE>, <CODE>-</CODE>,
+<CODE>*</CODE>, <CODE>/</CODE>, etc.
+The supplied version is also capable of testing C type <CODE>long</CODE>
+<CODE>double</CODE> if the sources are compiled with one of these macros
+defined:
+<BLOCKQUOTE>
+<DL>
+<DT><CODE>LONG_DOUBLE_IS_EXTFLOAT80</CODE>
+<DD>
+Indicates that type <CODE>long</CODE> <CODE>double</CODE> is
+<NOBR>80-bit</NOBR> double-extended-precision floating-point.
+<DT><CODE>LONG_DOUBLE_IS_FLOAT128</CODE>
+<DD>
+Indicates that type <CODE>long</CODE> <CODE>double</CODE> is
+<NOBR>128-bit</NOBR> quadruple-precision floating-point.
+</DL>
+</BLOCKQUOTE>
+By default, <CODE>testfloat</CODE> assumes that only the IEEE Standard&rsquo;s
+original four rounding modes (<CODE>near_even</CODE>, <CODE>minMag</CODE>,
+<CODE>min</CODE>, and <CODE>max</CODE>) are supported by the floating-point
+being tested.
+For other rounding modes, additional macro can be defined:
+<BLOCKQUOTE>
+<DL>
+<DT><CODE>SUBJFLOAT_ROUND_NEAR_MAXMAG</CODE>
+<DD>
+Indicates that the subject floating-point supports rounding mode
+<CODE>near_maxMag</CODE> (nearest/away).
+<DT><CODE>SUBJFLOAT_ROUND_ODD</CODE>
+<DD>
+Indicates that the subject floating-point supports rounding mode
+<CODE>odd</CODE> (jamming).
+</DL>
+</BLOCKQUOTE>
+</P>
+
+<P>
+To test a new and/or different implementation of floating-point,
+<CODE>testfloat</CODE> must normally be retargeted to invoke this other
+floating-point instead of C&rsquo;s floating-point.
+Two source files define the functions that <CODE>testfloat</CODE> uses to
+invoke floating-point operations for testing:
+<BLOCKQUOTE>
+<PRE>
+subjfloat_config.h
+subjfloat.c
+</PRE>
+</BLOCKQUOTE>
+For the default target of testing C&rsquo;s floating-point, these files are
+contained in directory <NOBR><CODE>source/subj-C</CODE></NOBR> as discussed
+earlier.
+For a different subject floating-point, it is recommended that appropriate
+versions of <CODE>subjfloat_config.h</CODE> and <CODE>subjfloat.c</CODE> be
+stored in a sibling <NOBR><CODE>subj-&lt;<I>target</I>&gt;</CODE></NOBR>
+directory, where <CODE>&lt;<I>target</I>&gt;</CODE> names the particular
+target.
+</P>
+
+<P>
+Header file <CODE>subjfloat_config.h</CODE> defines a macro of the form
+<CODE>SUBJ_*</CODE> for each subject function supported.
+For example, if function <CODE>subj_f32_add</CODE> exists to perform
+<NOBR>32-bit</NOBR> floating-point addition, then
+<CODE>subjfloat_config.h</CODE> should have a definition for macro
+<CODE>SUBJ_F32_ADD</CODE>.
+The actual function <CODE>subj_f32_add</CODE> is expected to be defined in
+<CODE>subjfloat.c</CODE>, along with all other subject functions.
+A common header file, <CODE>subjfloat.h</CODE>, (not target-specific) provides
+prototype declarations for all possible subject functions that
+<CODE>testfloat</CODE> may be compiled to test, whether actually existing or
+not.
+(There is no penalty for the header to declare prototypes of nonexistent
+functions that are never called.)
+For a specific build of <CODE>testfloat</CODE>, the <CODE>-list</CODE> option
+will list all subject functions that the <CODE>testfloat</CODE> program is able
+to invoke and thus test.
+</P>
+
+<P>
+In the source code as supplied, macros <CODE>LONG_DOUBLE_IS_EXTFLOAT80</CODE>
+and <CODE>LONG_DOUBLE_IS_FLOAT128</CODE> affect only the target-specific source
+files in <NOBR><CODE>source/subj-C</CODE></NOBR>, so these macros can be
+ignored for any other subject floating-point that does not depend on them.
+On the other hand, macros <CODE>SUBJFLOAT_ROUND_NEAR_MAXMAG</CODE> and
+<CODE>SUBJFLOAT_ROUND_ODD</CODE> always determine whether the
+<CODE>testfloat</CODE> program attempts to test rounding modes
+<CODE>near_maxMag</CODE> and <CODE>odd</CODE>, regardless of the subject
+floating-point.
+</P>
+
+
+<H3>6.5. Improving the Random Number Functions</H3>
+
+<P>
+If you are serious about using TestFloat for testing floating-point, you should
+consider replacing the random number functions in <CODE>random.c</CODE>.
+The supplied random number functions are built on top of the standard C
+<CODE>rand</CODE> function.
+Because function <CODE>rand</CODE> is rather poor on some systems, the
+functions in <CODE>random.c</CODE> assume very little about the quality of
+<CODE>rand</CODE>.
+As a result, <CODE>rand</CODE> is called more frequently than it might need to
+be, shortening the time before random number sequences repeat, and possibly
+wasting time as well.
+If <CODE>rand</CODE> is better on a given target platform, or if another,
+better random number generator is available (such as <CODE>rand48</CODE> on
+UNIX-derived systems), TestFloat can be improved by overriding the given
+<CODE>random.c</CODE> with a target-specific one.
+</P>
+
+<P>
+Rather than modifying the supplied file <CODE>random.c</CODE>, it is
+recommended instead that a new, alternate file be created and the
+target&rsquo;s Makefile be modified to refer to that alternate file in place of
+<CODE>random.c</CODE>.
+</P>
+
+
+<H2>7. Contact Information</H2>
+
+<P>
+At the time of this writing, the most up-to-date information about TestFloat
+and the latest release can be found at the Web page
+<A HREF="http://www.jhauser.us/arithmetic/TestFloat.html"><NOBR><CODE>http://www.jhauser.us/arithmetic/TestFloat.html</CODE></NOBR></A>.
+</P>
+
+
+</BODY>
+
diff --git a/src/libs/softfloat-3e/testfloat/doc/testfloat.html b/src/libs/softfloat-3e/testfloat/doc/testfloat.html
new file mode 100644
index 00000000..f9404e04
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/doc/testfloat.html
@@ -0,0 +1,286 @@
+
+<HTML>
+
+<HEAD>
+<TITLE>testfloat</TITLE>
+</HEAD>
+
+<BODY>
+
+<H1>Berkeley TestFloat Release 3e: <CODE>testfloat</CODE></H1>
+
+<P>
+John R. Hauser<BR>
+2018 January 20<BR>
+</P>
+
+
+<H2>Overview</H2>
+
+<P>
+The <CODE>testfloat</CODE> program tests an implementation of floating-point
+arithmetic for conformity to the IEEE Standard for Binary Floating-Point
+Arithmetic.
+<CODE>testfloat</CODE> is part of the Berkeley TestFloat package, a small
+collection of programs for performing such tests.
+For general information about TestFloat, see file
+<A HREF="TestFloat-general.html"><NOBR><CODE>TestFloat-general.html</CODE></NOBR></A>.
+</P>
+
+<P>
+The <CODE>testfloat</CODE> program is an all-in-one tool for testing
+floating-point arithmetic.
+It generates test operand values, invokes a floating-point operation with the
+generated operands, and examines the corresponding computed results, reporting
+unexpected results as likely errors.
+While the processes of generating inputs and examining results are generic, a
+particular build of <CODE>testfloat</CODE> is limited to testing only the one
+implementation of floating-point it has been compiled to invoke.
+For example, while one instance of <CODE>testfloat</CODE> might be compiled to
+execute a computer&rsquo;s hardware instruction for floating-point addition, a
+different version might be compiled to call a subroutine called
+<CODE>myAddFloat</CODE> that is linked into the <CODE>testfloat</CODE> program.
+To test a new implementation of floating-point (a new set of machine
+instructions or a new set of subroutines), a new <CODE>testfloat</CODE> must be
+compiled containing the code needed to invoke the new floating-point.
+</P>
+
+<P>
+The default build of <CODE>testfloat</CODE> assumes that C types
+<CODE>float</CODE> and <CODE>double</CODE> are <NOBR>32-bit</NOBR> and
+<NOBR>64-bit</NOBR> binary floating-point types conforming to the IEEE
+Standard, and tests the C operations of <CODE>+</CODE>, <CODE>-</CODE>,
+<CODE>*</CODE>, <CODE>/</CODE>, type conversions, etc.
+This tests the floating-point arithmetic seen by C programs.
+Depending on the compiler and the options selected during compilation, this may
+or may not be the same as the computer&rsquo;s floating-point hardware, if any.
+</P>
+
+<P>
+The <CODE>testfloat</CODE> program will ordinarily test an operation for all
+five rounding modes defined by the IEEE Floating-Point Standard, one after the
+other, plus possibly a sixth mode, <I>round to odd</I> (depending on the
+options selected when <CODE>testfloat</CODE> was compiled).
+If the rounding mode is not supposed to have any affect on the
+results&mdash;for instance, some operations do not require rounding&mdash;only
+the nearest/even rounding mode is checked.
+For double-extended-precision operations affected by rounding precision
+control, <CODE>testfloat</CODE> also tests all three rounding precision modes,
+one after the other.
+Testing can be limited to a single rounding mode and/or rounding precision with
+appropriate command-line options.
+</P>
+
+<P>
+For more about the operation of <CODE>testfloat</CODE> and how to interpret its
+output, refer to
+<A HREF="TestFloat-general.html"><NOBR><CODE>TestFloat-general.html</CODE></NOBR></A>.
+</P>
+
+
+<H2>Command Syntax</H2>
+
+<P>
+The <CODE>testfloat</CODE> program is executed as a command with this syntax:
+<BLOCKQUOTE>
+<PRE>
+testfloat [&lt;<I>option</I>&gt;...] &lt;<I>function</I>&gt;
+</PRE>
+</BLOCKQUOTE>
+Square brackets (<CODE>[ ]</CODE>) denote optional arguments,
+<CODE>&lt;<I>option</I>&gt;</CODE> is a supported option, and
+<CODE>&lt;<I>function</I>&gt;</CODE> is the name of either a testable operation
+or a function set.
+The available options and function sets are documented below.
+The <CODE>-list</CODE> option can be used to obtain a list of all testable
+operations for a given build of <CODE>testfloat</CODE>.
+If <CODE>testfloat</CODE> is executed without any arguments, a summary of usage
+is written.
+</P>
+
+
+<H2>Options</H2>
+
+<P>
+The <CODE>testfloat</CODE> program accepts several command options.
+If mutually contradictory options are given, the last one has priority.
+</P>
+
+<H3><CODE>-help</CODE></H3>
+
+<P>
+The <CODE>-help</CODE> option causes a summary of program usage to be written,
+after which the program exits.
+</P>
+
+<H3><CODE>-list</CODE></H3>
+
+<P>
+The <CODE>-list</CODE> option causes a list of testable operations to be
+written, after which the program exits.
+An operation is testable by <CODE>testfloat</CODE> if the program knows some
+way to invoke the operation.
+</P>
+
+<H3><CODE>-seed &lt;<I>num</I>&gt;</CODE></H3>
+
+<P>
+The <CODE>-seed</CODE> option sets the seed for the pseudo-random number
+generator used for generating test cases.
+The argument to <CODE>-seed</CODE> is a nonnegative integer.
+Executing the same compiled <CODE>testfloat</CODE> program with the same
+arguments (including the same pseudo-random number seed) should always perform
+the same sequence of tests, whereas changing the pseudo-random number seed
+should result in a different sequence of tests.
+The default seed number <NOBR>is 1</NOBR>.
+</P>
+
+<H3><CODE>-level &lt;<I>num</I>&gt;</CODE></H3>
+
+<P>
+The <CODE>-level</CODE> option sets the level of testing.
+The argument to <CODE>-level</CODE> can be either 1 <NOBR>or 2</NOBR>.
+The default is <NOBR>level 1</NOBR>.
+Level 2 performs many more tests than <NOBR>level 1</NOBR> and thus can reveal
+bugs not found by <NOBR>level 1</NOBR>.
+</P>
+
+<H3><CODE>-errors &lt;<I>num</I>&gt;</CODE></H3>
+
+<P>
+The <CODE>-errors</CODE> option instructs <CODE>testfloat</CODE> to report no
+more than the specified number of errors for any combination of operation,
+rounding mode, etc.
+The argument to <CODE>-errors</CODE> must be a nonnegative decimal integer.
+Once the specified number of error reports has been generated,
+<CODE>testfloat</CODE> ends the current test and begins the next one, if any.
+The default is <NOBR><CODE>-errors</CODE> <CODE>20</CODE></NOBR>.
+</P>
+
+<P>
+Against intuition, <NOBR><CODE>-errors</CODE> <CODE>0</CODE></NOBR> causes
+<CODE>testfloat</CODE> to report every error it finds.
+</P>
+
+<H3><CODE>-errorstop</CODE></H3>
+
+<P>
+The <CODE>-errorstop</CODE> option causes the program to exit after the first
+operation for which any errors are reported.
+</P>
+
+<H3><CODE>-forever</CODE></H3>
+
+<P>
+The <CODE>-forever</CODE> option causes a single operation to be repeatedly
+tested.
+Only one rounding mode and/or rounding precision can be tested in a single
+execution.
+If not specified, the rounding mode defaults to nearest/even.
+For <NOBR>80-bit</NOBR> double-extended-precision operations, the rounding
+precision defaults to full double-extended precision.
+The testing level is set to 2 by this option.
+</P>
+
+<H3><CODE>-checkNaNs</CODE></H3>
+
+<P>
+The <CODE>-checkNaNs</CODE> option causes <CODE>testfloat</CODE> to verify the
+bitwise correctness of NaN results.
+In order for this option to be sensible, <CODE>testfloat</CODE> must have been
+compiled so that its internal reference implementation of floating-point
+(Berkeley SoftFloat) generates the proper NaN results for the system being
+tested.
+</P>
+
+<H3><CODE>-checkInvInts</CODE></H3>
+
+<P>
+The <CODE>-checkInvInts</CODE> option causes <CODE>testfloat</CODE> to verify
+the bitwise correctness of integer results of invalid operations.
+In order for this option to be sensible, <CODE>testfloat</CODE> must have been
+compiled so that its internal reference implementation of floating-point
+(Berkeley SoftFloat) generates the proper integer results for the system being
+tested.
+</P>
+
+<H3><CODE>-checkAll</CODE></H3>
+
+<P>
+Enables both <CODE>-checkNaNs</CODE> and <CODE>-checkInvInts</CODE>.
+</P>
+
+<H3><CODE>-precision32, -precision64, -precision80</CODE></H3>
+
+<P>
+For <NOBR>80-bit</NOBR> double-extended-precision operations affected by
+rounding precision control, the <CODE>-precision32</CODE> option restricts
+testing to only the cases in which the rounding precision is
+<NOBR>32 bits</NOBR>, equivalent to <NOBR>32-bit</NOBR> single-precision.
+The other rounding precision choices are not tested.
+Likewise, <CODE>-precision64</CODE> fixes the rounding precision to
+<NOBR>64 bits</NOBR>, equivalent to <NOBR>64-bit</NOBR> double-precision, and
+<CODE>-precision80</CODE> fixes the rounding precision to the full
+<NOBR>80 bits</NOBR> of the double-extended-precision format.
+All these options are ignored for operations not affected by rounding precision
+control.
+</P>
+
+<P>
+The precision-control options may not be supported at all if no
+double-extended-precision operations are testable.
+</P>
+
+<H3><CODE>-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax, -rodd</CODE></H3>
+
+<P>
+The <CODE>-rnear_even</CODE> option restricts testing to only the cases in
+which the rounding mode is nearest/even.
+The other rounding mode choices are not tested.
+Likewise, <CODE>-rnear_maxMag</CODE> forces rounding to nearest/maximum
+magnitude (nearest-away), <CODE>-rminMag</CODE> forces rounding to minimum
+magnitude (toward zero), <CODE>-rmin</CODE> forces rounding to minimum (down,
+toward negative infinity), <CODE>-rmax</CODE> forces rounding to maximum (up,
+toward positive infinity), and <CODE>-rodd</CODE>, if supported, forces
+rounding to odd.
+These options are ignored for operations that are exact and thus do not round,
+or that have the rounding mode included in the function name (such as
+<CODE>f32_to_i32_r_near_maxMag</CODE>).
+</P>
+
+<H3><CODE>-tininessbefore, -tininessafter</CODE></H3>
+
+<P>
+The <CODE>-tininessbefore</CODE> option indicates that the floating-point
+implementation being tested detects tininess on underflow before rounding.
+The <CODE>-tininessafter</CODE> option indicates that tininess is detected
+after rounding.
+The <CODE>testfloat</CODE> program alters its expectations accordingly.
+These options override the default selected when <CODE>testfloat</CODE> was
+compiled.
+Choosing the wrong one of these two options should cause error reports for some
+(but not all) operations.
+</P>
+
+
+<H2>Function Sets</H2>
+
+<P>
+Just as <CODE>testfloat</CODE> can test an operation for all five or six
+rounding modes in sequence, multiple operations can be tested with a single
+execution of <CODE>testfloat</CODE>.
+Two sets are recognized: <CODE>-all1</CODE> and <CODE>-all2</CODE>.
+The set <CODE>-all1</CODE> is all one-operand operations, while
+<CODE>-all2</CODE> is all two-operand operations.
+A function set is used in place of an operation name in the
+<CODE>testfloat</CODE> command line, such as
+<BLOCKQUOTE>
+<PRE>
+testfloat [&lt;<I>option</I>&gt;...] -all1
+</PRE>
+</BLOCKQUOTE>
+</P>
+
+
+</BODY>
+
diff --git a/src/libs/softfloat-3e/testfloat/doc/testfloat_gen.html b/src/libs/softfloat-3e/testfloat/doc/testfloat_gen.html
new file mode 100644
index 00000000..5190567c
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/doc/testfloat_gen.html
@@ -0,0 +1,367 @@
+
+<HTML>
+
+<HEAD>
+<TITLE>testfloat_gen</TITLE>
+</HEAD>
+
+<BODY>
+
+<H1>Berkeley TestFloat Release 3e: <CODE>testfloat_gen</CODE></H1>
+
+<P>
+John R. Hauser<BR>
+2018 January 20<BR>
+</P>
+
+
+<H2>Overview</H2>
+
+<P>
+The <CODE>testfloat_gen</CODE> program generates test cases for testing that an
+implementation of floating-point arithmetic conforms to the IEEE Standard for
+Binary Floating-Point Arithmetic.
+<CODE>testfloat_gen</CODE> is part of the Berkeley TestFloat package, a small
+collection of programs for performing such tests.
+For general information about TestFloat, see file
+<A HREF="TestFloat-general.html"><NOBR><CODE>TestFloat-general.html</CODE></NOBR></A>.
+</P>
+
+<P>
+A single execution of <CODE>testfloat_gen</CODE> generates test cases for only
+a single floating-point operation and associated options.
+The <CODE>testfloat_gen</CODE> program must be repeatedly executed to generate
+test cases for each operation to be tested.
+</P>
+
+<P>
+The <CODE>testfloat_gen</CODE> program writes the test cases it generates to
+standard output.
+This output can either be captured in a file through redirection, or be piped
+to another program that exercises a floating-point operation using the test
+cases as they are supplied.
+Depending on use, the total output from <CODE>testfloat_gen</CODE> can be
+large, so piping to another program may be the best choice to avoid using
+inordinate file space.
+The format of <CODE>testfloat_gen</CODE>&rsquo;s output is raw hexadecimal
+text, described in the section below titled <I>Output Format</I>.
+</P>
+
+
+<H2>Command Syntax</H2>
+
+<P>
+The <CODE>testfloat_gen</CODE> program is executed as a command in one of these
+forms:
+<BLOCKQUOTE>
+<PRE>
+testfloat_gen [&lt;<I>option</I>&gt;...] &lt;<I>type</I>&gt;
+testfloat_gen [&lt;<I>option</I>&gt;...] &lt;<I>function</I>&gt;
+</PRE>
+</BLOCKQUOTE>
+Square brackets (<CODE>[ ]</CODE>) denote optional arguments, and
+<CODE>&lt;<I>option</I>&gt;</CODE> is a supported option, documented below.
+A <CODE>testfloat_gen</CODE> command expects either a
+<CODE>&lt;<I>type</I>&gt;</CODE> specifying the type and number of outputs or a
+<CODE>&lt;<I>function</I>&gt;</CODE> naming a floating-point operation.
+If <CODE>testfloat_gen</CODE> is executed without any arguments, a summary of
+usage is written.
+</P>
+
+<P>
+A <CODE>&lt;<I>type</I>&gt;</CODE> can be one of the following:
+<BLOCKQUOTE>
+<TABLE CELLSPACING=0 CELLPADDING=0>
+<TR>
+<TD><CODE>ui32</CODE></TD>
+<TD>unsigned <NOBR>32-bit</NOBR> integers</TD>
+</TR>
+<TR>
+<TD><CODE>ui64</CODE></TD>
+<TD>unsigned <NOBR>64-bit</NOBR> integers</TD>
+</TR>
+<TR>
+<TD><CODE>i32</CODE></TD>
+<TD>signed <NOBR>32-bit</NOBR> integers</TD>
+</TR>
+<TR>
+<TD><CODE>i64</CODE></TD>
+<TD>signed <NOBR>64-bit</NOBR> integers</TD>
+</TR>
+<TR>
+<TD><CODE>f16 [&lt;<I>num</I>&gt;]</CODE></TD>
+<TD>one or more <NOBR>16-bit</NOBR> half-precision floating-point values</TD>
+</TR>
+<TR>
+<TD><CODE>f32 [&lt;<I>num</I>&gt;]</CODE></TD>
+<TD>one or more <NOBR>32-bit</NOBR> single-precision floating-point values</TD>
+</TR>
+<TR>
+<TD><CODE>f64 [&lt;<I>num</I>&gt;]</CODE></TD>
+<TD>one or more <NOBR>64-bit</NOBR> double-precision floating-point values</TD>
+</TR>
+<TR>
+<TD><CODE>extF80 [&lt;<I>num</I>&gt;]&nbsp;&nbsp;&nbsp;</CODE></TD>
+<TD>one or more <NOBR>80-bit</NOBR> double-extended-precision floating-point
+values</TD>
+</TR>
+<TR>
+<TD><CODE>f128 [&lt;<I>num</I>&gt;]</CODE></TD>
+<TD>one or more <NOBR>128-bit</NOBR> quadruple-precision floating-point
+values</TD>
+</TR>
+</TABLE>
+</BLOCKQUOTE>
+Optional <CODE>&lt;<I>num</I>&gt;</CODE> is one of 1, 2, <NOBR>or 3</NOBR>.
+If a <CODE>&lt;<I>type</I>&gt;</CODE> is given without
+<CODE>&lt;<I>num</I>&gt;</CODE> (such as <CODE>ui32</CODE> or
+<CODE>f64</CODE>), <CODE>testfloat_gen</CODE> outputs a list of values of the
+specified type, one value per line, appropriate for testing a floating-point
+operation with exactly one operand of the given type.
+If a floating-point type and number are given (such as
+<NOBR><CODE>f32</CODE> <CODE>2</CODE></NOBR> or
+<NOBR><CODE>extF80</CODE> <CODE>1</CODE></NOBR>), <CODE>testfloat_gen</CODE>
+outputs the specified number of values per line, appropriate for testing a
+floating-point operation with that number of operands.
+Although the exact operation being tested is not specified, the test cases
+output by <CODE>testfloat_gen</CODE> cover all standard floating-point
+operations, to the degree explained in
+<A HREF="TestFloat-general.html"><NOBR><CODE>TestFloat-general.html</CODE></NOBR></A>.
+</P>
+
+<P>
+If a <CODE>&lt;<I>function</I>&gt;</CODE> operation name is given, then each
+line of output from <CODE>testfloat_gen</CODE> contains not only the operands
+for that operation (as would be generated by an appropriate
+<CODE>&lt;<I>type</I>&gt;</CODE> argument) but also the expected results as
+determined by <CODE>testfloat_gen</CODE>&rsquo;s internal floating-point
+emulation (Berkeley SoftFloat).
+The available operation names are listed in
+<A HREF="TestFloat-general.html"><NOBR><CODE>TestFloat-general.html</CODE></NOBR></A>.
+In all cases, floating-point operations have two results:
+first, a value, which may be floating-point, integer, or Boolean, and, second,
+the floating-point exception flags raised by the operation.
+If the output from a tested floating-point operation does not match the
+expected output specified by <CODE>testfloat_gen</CODE>, this may or may not
+indicate an error in the floating-point operation.
+For further explanation, see
+<A HREF="TestFloat-general.html"><NOBR><CODE>TestFloat-general.html</CODE></NOBR></A>,
+especially the section titled <I>Variations Allowed by the IEEE Floating-Point
+Standard</I>.
+</P>
+
+
+<H2>Options</H2>
+
+<P>
+The <CODE>testfloat_gen</CODE> program accepts several command options.
+If mutually contradictory options are given, the last one has priority.
+</P>
+
+<H3><CODE>-help</CODE></H3>
+
+<P>
+The <CODE>-help</CODE> option causes a summary of program usage to be written,
+after which the program exits.
+</P>
+
+<H3><CODE>-prefix &lt;<I>text</I>&gt;</CODE></H3>
+
+<P>
+The <CODE>-prefix</CODE> option causes <CODE>testfloat_gen</CODE> to write the
+supplied text argument verbatim as the first line of output before any test
+cases.
+This can be used, for example, to indicate to a downstream program what kind of
+test to perform for the test cases that follow.
+</P>
+
+<H3><CODE>-seed &lt;<I>num</I>&gt;</CODE></H3>
+
+<P>
+The <CODE>-seed</CODE> option sets the seed for the pseudo-random number
+generator used for generating test cases.
+The argument to <CODE>-seed</CODE> is a nonnegative integer.
+Executing the same <CODE>testfloat_gen</CODE> program with the same arguments
+(including the same pseudo-random number seed) should always generate the same
+sequence of test cases, whereas changing the pseudo-random number seed should
+result in a different sequence of test cases.
+The default seed number <NOBR>is 1</NOBR>.
+</P>
+
+<H3><CODE>-level &lt;<I>num</I>&gt;</CODE></H3>
+
+<P>
+The <CODE>-level</CODE> option sets the level of testing.
+The argument to <CODE>-level</CODE> can be either 1 <NOBR>or 2</NOBR>.
+The default is <NOBR>level 1</NOBR>.
+<NOBR>Level 2</NOBR> causes many more test cases to be generated, with better
+coverage, than <NOBR>level 1</NOBR>.
+</P>
+
+<H3><CODE>-n &lt;<I>num</I>&gt;</CODE></H3>
+
+<P>
+Option <CODE>-n</CODE> specifies the number of test cases to generate.
+For each <CODE>&lt;<I>type</I>&gt;</CODE> or
+<CODE>&lt;<I>function</I>&gt;</CODE> and each testing level (set by
+<CODE>-level</CODE>), there is a minimum value that <CODE>testfloat_gen</CODE>
+will accept for <CODE>&lt;<I>num</I>&gt;</CODE>.
+If no <CODE>-n</CODE> option is given, the number of test cases generated by
+<CODE>testfloat_gen</CODE> equals the minimum value acceptable for the
+<CODE>-n</CODE> argument.
+Option <CODE>-n</CODE> cannot be used to reduce this number, but can increase
+it, without changing the testing level.
+</P>
+
+<H3><CODE>-forever</CODE></H3>
+
+<P>
+The <CODE>-forever</CODE> option causes test cases to be generated
+indefinitely, without limit (until the program is terminated by some external
+cause).
+The testing level is set to 2 by this option.
+</P>
+
+<H3><CODE>-precision32, -precision64, -precision80</CODE></H3>
+
+<P>
+When a <CODE>&lt;<I>function</I>&gt;</CODE> is specified that is an
+<NOBR>80-bit</NOBR> double-extended-precision operation affected by rounding
+precision control, the <CODE>-precision32</CODE> option sets the rounding
+precision to <NOBR>32 bits</NOBR>, equivalent to <NOBR>32-bit</NOBR>
+single-precision.
+Likewise, <CODE>-precision64</CODE> sets the rounding precision to
+<NOBR>64 bits</NOBR>, equivalent to <NOBR>64-bit</NOBR> double-precision, and
+<CODE>-precision80</CODE> sets the rounding precision to the full
+<NOBR>80 bits</NOBR> of the double-extended-precision format.
+All these options are ignored for operations not affected by rounding precision
+control.
+When rounding precision is applicable but not specified, the default is the
+full <NOBR>80 bits</NOBR>, same as <CODE>-precision80</CODE>.
+</P>
+
+<H3><CODE>-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax, -rodd</CODE></H3>
+
+<P>
+When a <CODE>&lt;<I>function</I>&gt;</CODE> is specified that requires
+rounding, the <CODE>-rnear_even</CODE> option sets the rounding mode to
+nearest/even;
+<CODE>-rnear_maxMag</CODE> sets rounding to nearest/maximum magnitude
+(nearest-away);
+<CODE>-rminMag</CODE> sets rounding to minimum magnitude (toward zero);
+<CODE>-rmin</CODE> sets rounding to minimum (down, toward negative infinity);
+<CODE>-rmax</CODE> sets rounding to maximum (up, toward positive infinity);
+and <CODE>-rodd</CODE>, if supported, sets rounding to odd.
+These options are ignored for operations that are exact and thus do not round.
+When rounding mode is relevant but not specified, the default is to round to
+nearest/even, same as <CODE>-rnear_even</CODE>.
+</P>
+
+<H3><CODE>-tininessbefore, -tininessafter</CODE></H3>
+
+<P>
+When a <CODE>&lt;<I>function</I>&gt;</CODE> is specified that requires
+rounding, the <CODE>-tininessbefore</CODE> option indicates that tininess on
+underflow will be detected before rounding, while <CODE>-tininessafter</CODE>
+indicates that tininess on underflow will be detected after rounding.
+These options are ignored for operations that are exact and thus do not round.
+When the method of tininess detection matters but is not specified, the default
+is to detect tininess on underflow after rounding, same as
+<CODE>-tininessafter</CODE>.
+</P>
+
+<H3><CODE>-notexact, -exact</CODE></H3>
+
+<P>
+When a <CODE>&lt;<I>function</I>&gt;</CODE> is specified that rounds to an
+integer (either conversion to an integer type or a <CODE>roundToInt</CODE>
+operation), the <CODE>-notexact</CODE> option indicates that the <I>inexact</I>
+exception flag is never raised, while <CODE>-exact</CODE> indicates that the
+<I>inexact</I> exception flag is to be raised if the result is inexact.
+For other operations, these options are ignored.
+If neither option is specified, the default is not to raise the <I>inexact</I>
+exception flag when rounding to an integer, same as <CODE>-notexact</CODE>.
+</P>
+
+
+<H2>Output Format</H2>
+
+<P>
+For each test case generated, <CODE>testfloat_gen</CODE> writes a single line
+of text to standard output.
+When the <CODE>testfloat_gen</CODE> command is given a
+<CODE>&lt;<I>type</I>&gt;</CODE> argument, each test case consists of either
+one integer value or one, two, or three floating-point values.
+Each value is written to output as a raw hexadecimal number.
+When there is more than one value per line, they are separated by spaces.
+For example, output from executing
+<BLOCKQUOTE>
+<PRE>
+testfloat_gen f64 2
+</PRE>
+</BLOCKQUOTE>
+might look like this:
+<BLOCKQUOTE>
+<PRE>
+3F90EB5825D6851E C3E0080080000000
+41E3C00000000000 C182024F8AE474A8
+7FD80FFFFFFFFFFF 7FEFFFFFFFFFFF80
+3FFFED6A25C534BE 3CA1000000020000
+...
+</PRE>
+</BLOCKQUOTE>
+with each hexadecimal number being one <NOBR>64-bit</NOBR> floating-point
+value.
+Note that, for floating-point values, the sign and exponent are at the
+most-significant end of the number.
+Thus, for the first number on the first line above, the leading hexadecimal
+digits <CODE>3F9</CODE> are the sign and encoded exponent of the
+<NOBR>64-bit</NOBR> floating-point value, and the remaining digits are the
+encoded significand.
+</P>
+
+<P>
+When <CODE>testfloat_gen</CODE> is given a <CODE>&lt;<I>function</I>&gt;</CODE>
+operation name, each line of output has not only the operands for the operation
+but also the expected output, consisting of a result value and the exception
+flags that are raised.
+For example, the output from
+<BLOCKQUOTE>
+<PRE>
+testfloat_gen f64_add
+</PRE>
+</BLOCKQUOTE>
+could include these lines:
+<BLOCKQUOTE>
+<PRE>
+3F90EB5825D6851E C3E0080080000000 C3E0080080000000 01
+41E3C00000000000 C182024F8AE474A8 41E377F6C1D46E2D 01
+7FD80FFFFFFFFFFF 7FEFFFFFFFFFFF80 7FF0000000000000 05
+3FFFED6A25C534BE 3CA1000000020000 3FFFED6A25C534BF 01
+...
+</PRE>
+</BLOCKQUOTE>
+On each line, the first two numbers are the operands for the floating-point
+addition, and the third and fourth numbers are the expected floating-point
+result (the sum) and the exception flags raised.
+Exception flags are encoded with one bit per flag as follows:
+<BLOCKQUOTE>
+<TABLE CELLSPACING=0 CELLPADDING=0>
+<TR>
+ <TD>bit 0<CODE>&nbsp;&nbsp;&nbsp;</CODE></TD>
+ <TD><I>inexact</I> exception</TD>
+</TR>
+<TR><TD>bit 1</TD><TD><I>underflow</I> exception</TD></TR>
+<TR><TD>bit 2</TD><TD><I>overflow</I> exception</TD></TR>
+<TR>
+ <TD>bit 3</TD>
+ <TD><I>infinite</I> exception (&ldquo;divide by zero&rdquo;)</TD>
+</TR>
+<TR><TD>bit 4</TD><TD><I>invalid</I> exception</TD></TR>
+</TABLE>
+</BLOCKQUOTE>
+</P>
+
+
+</BODY>
+
diff --git a/src/libs/softfloat-3e/testfloat/doc/testfloat_ver.html b/src/libs/softfloat-3e/testfloat/doc/testfloat_ver.html
new file mode 100644
index 00000000..0790896b
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/doc/testfloat_ver.html
@@ -0,0 +1,270 @@
+
+<HTML>
+
+<HEAD>
+<TITLE>testfloat_ver</TITLE>
+</HEAD>
+
+<BODY>
+
+<H1>Berkeley TestFloat Release 3e: <CODE>testfloat_ver</CODE></H1>
+
+<P>
+John R. Hauser<BR>
+2018 January 20<BR>
+</P>
+
+
+<H2>Overview</H2>
+
+<P>
+The <CODE>testfloat_ver</CODE> program accepts test-case results obtained from
+exercising an implementation of floating-point arithmetic and verifies that
+those results conform to the IEEE Standard for Binary Floating-Point
+Arithmetic.
+<CODE>testfloat_ver</CODE> is part of the Berkeley TestFloat package, a small
+collection of programs for performing such tests.
+For general information about TestFloat, see file
+<A HREF="TestFloat-general.html"><NOBR><CODE>TestFloat-general.html</CODE></NOBR></A>.
+</P>
+
+<P>
+A single execution of <CODE>testfloat_ver</CODE> verifies results for only a
+single floating-point operation and associated options.
+The <CODE>testfloat_ver</CODE> program must be repeatedly executed to verify
+results for each operation to be tested.
+</P>
+
+<P>
+The test cases to be verified are read by <CODE>testfloat_ver</CODE> from
+standard input.
+This input will typically be piped from another program that, for each test
+case, invokes the floating-point operation and writes out the results.
+The format of <CODE>testfloat_ver</CODE>&rsquo;s input is raw hexadecimal text,
+described in the section below titled <I>Input Format</I>.
+</P>
+
+<P>
+For each test case given to it, <CODE>testfloat_ver</CODE> examines the
+computed results and reports any unexpected results as likely errors.
+
+For more about the operation of <CODE>testfloat_ver</CODE> and how to interpret
+its output, refer to
+<A HREF="TestFloat-general.html"><NOBR><CODE>TestFloat-general.html</CODE></NOBR></A>.
+</P>
+
+
+<H2>Command Syntax</H2>
+
+<P>
+The <CODE>testfloat_ver</CODE> program is executed as a command with this
+syntax:
+<BLOCKQUOTE>
+<PRE>
+testfloat_ver [&lt;<I>option</I>&gt;...] &lt;<I>function</I>&gt;
+</PRE>
+</BLOCKQUOTE>
+Square brackets (<CODE>[ ]</CODE>) denote optional arguments,
+<CODE>&lt;<I>option</I>&gt;</CODE> is a supported option, and
+<CODE>&lt;<I>function</I>&gt;</CODE> is the name of a testable operation.
+The available options are documented below.
+The testable operation names are listed in
+<A HREF="TestFloat-general.html"><NOBR><CODE>TestFloat-general.html</CODE></NOBR></A>.
+If <CODE>testfloat_ver</CODE> is executed without any arguments, a summary of
+usage is written.
+</P>
+
+
+<H2>Options</H2>
+
+<P>
+The <CODE>testfloat_ver</CODE> program accepts several command options.
+If mutually contradictory options are given, the last one has priority.
+</P>
+
+<H3><CODE>-help</CODE></H3>
+
+<P>
+The <CODE>-help</CODE> option causes a summary of program usage to be written,
+after which the program exits.
+</P>
+
+<H3><CODE>-errors &lt;<I>num</I>&gt;</CODE></H3>
+
+<P>
+The <CODE>-errors</CODE> option instructs <CODE>testfloat_ver</CODE> to report
+no more than the specified number of errors.
+The argument to <CODE>-errors</CODE> must be a nonnegative decimal integer.
+Once the specified number of error reports has been generated, the program
+exits.
+The default is <NOBR><CODE>-errors</CODE> <CODE>20</CODE></NOBR>.
+</P>
+
+<P>
+Against intuition, <NOBR><CODE>-errors</CODE> <CODE>0</CODE></NOBR> causes
+<CODE>testfloat_ver</CODE> to continue for any number of errors.
+</P>
+
+<H3><CODE>-checkNaNs</CODE></H3>
+
+<P>
+The <CODE>-checkNaNs</CODE> option causes <CODE>testfloat_ver</CODE> to verify
+the bitwise correctness of NaN results.
+In order for this option to be sensible, <CODE>testfloat_ver</CODE> must have
+been compiled so that its internal reference implementation of floating-point
+(Berkeley SoftFloat) generates the proper NaN results for the system being
+tested.
+</P>
+
+<H3><CODE>-checkInvInts</CODE></H3>
+
+<P>
+The <CODE>-checkInvInts</CODE> option causes <CODE>testfloat_ver</CODE> to
+verify the bitwise correctness of integer results of invalid operations.
+In order for this option to be sensible, <CODE>testfloat_ver</CODE> must have
+been compiled so that its internal reference implementation of floating-point
+(Berkeley SoftFloat) generates the proper integer results for the system being
+tested.
+</P>
+
+<H3><CODE>-checkAll</CODE></H3>
+
+<P>
+Enables both <CODE>-checkNaNs</CODE> and <CODE>-checkInvInts</CODE>.
+</P>
+
+<H3><CODE>-precision32, -precision64, -precision80</CODE></H3>
+
+<P>
+When <CODE>&lt;<I>function</I>&gt;</CODE> is an <NOBR>80-bit</NOBR>
+double-extended-precision operation affected by rounding precision control, the
+<CODE>-precision32</CODE> option indicates that the rounding precision should
+be <NOBR>32 bits</NOBR>, equivalent to <NOBR>32-bit</NOBR> single-precision.
+Likewise, <CODE>-precision64</CODE> indicates that the rounding precision
+should be <NOBR>64 bits</NOBR>, equivalent to <NOBR>64-bit</NOBR>
+double-precision, and <CODE>-precision80</CODE> indicates that the rounding
+precision should be the full <NOBR>80 bits</NOBR> of the
+double-extended-precision format.
+All these options are ignored for operations not affected by rounding precision
+control.
+When rounding precision is applicable but not specified, the default assumption
+is the full <NOBR>80 bits</NOBR>, same as <CODE>-precision80</CODE>.
+</P>
+
+<H3><CODE>-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax, -rodd</CODE></H3>
+
+<P>
+When <CODE>&lt;<I>function</I>&gt;</CODE> is an operation that requires
+rounding, the <CODE>-rnear_even</CODE> option indicates that rounding should be
+to nearest/even, <CODE>-rnear_maxMag</CODE> indicates rounding to
+nearest/maximum magnitude (nearest-away), <CODE>-rminMag</CODE> indicates
+rounding to minimum magnitude (toward zero), <CODE>-rmin</CODE> indicates
+rounding to minimum (down, toward negative infinity), <CODE>-rmax</CODE>
+indicates rounding to maximum (up, toward positive infinity), and
+<CODE>-rodd</CODE>, if supported, indicates rounding to odd.
+These options are ignored for operations that are exact and thus do not round.
+When rounding mode is relevant but not specified, the default assumption is
+rounding to nearest/even, same as <CODE>-rnear_even</CODE>.
+</P>
+
+<H3><CODE>-tininessbefore, -tininessafter</CODE></H3>
+
+<P>
+When <CODE>&lt;<I>function</I>&gt;</CODE> is an operation that requires
+rounding, the <CODE>-tininessbefore</CODE> option indicates that tininess on
+underflow should be detected before rounding, while <CODE>-tininessafter</CODE>
+indicates that tininess on underflow should be detected after rounding.
+These options are ignored for operations that are exact and thus do not round.
+When the method of tininess detection matters but is not specified, the default
+assumption is that tininess should be detected after rounding, same as
+<CODE>-tininessafter</CODE>.
+</P>
+
+<H3><CODE>-notexact, -exact</CODE></H3>
+
+<P>
+When <CODE>&lt;<I>function</I>&gt;</CODE> is an operation that rounds to an
+integer (either conversion to an integer type or a <CODE>roundToInt</CODE>
+operation), the <CODE>-notexact</CODE> option indicates that the <I>inexact</I>
+exception flag should never be raised, while <CODE>-exact</CODE> indicates that
+the <I>inexact</I> exception flag should be raised when the result is inexact.
+For other operations, these options are ignored.
+If neither option is specified, the default assumption is that the
+<I>inexact</I> exception flag should not be raised when rounding to an integer,
+same as <CODE>-notexact</CODE>.
+</P>
+
+
+<H2>Input Format</H2>
+
+<P>
+For a given <CODE>&lt;<I>function</I>&gt;</CODE> argument, the input format
+expected by <CODE>testfloat_ver</CODE> is the same as the output generated by
+program
+<A HREF="testfloat_gen.html"><NOBR><CODE>testfloat_gen</CODE></NOBR></A> for
+the same argument.
+</P>
+
+<P>
+Input to <CODE>testfloat_ver</CODE> is expected to be text, with each line
+containing the data for one test case.
+The number of input lines thus equals the number of test cases.
+A single test case is organized as follows: first are the operands for the
+operation, next is the result value obtained, and last is a number indicating
+the exception flags that were raised.
+These values are all expected to be provided as raw hexadecimal numbers
+separated on the line by spaces.
+For example, for the command
+<BLOCKQUOTE>
+<PRE>
+testfloat_ver f64_add
+</PRE>
+</BLOCKQUOTE>
+valid input could include these lines:
+<BLOCKQUOTE>
+<PRE>
+3F90EB5825D6851E C3E0080080000000 C3E0080080000000 01
+41E3C00000000000 C182024F8AE474A8 41E377F6C1D46E2D 01
+7FD80FFFFFFFFFFF 7FEFFFFFFFFFFF80 7FF0000000000000 05
+3FFFED6A25C534BE 3CA1000000020000 3FFFED6A25C534BF 01
+...
+</PRE>
+</BLOCKQUOTE>
+On each line above, the first two hexadecimal numbers represent the
+<NOBR>64-bit</NOBR> floating-point operands, the third hexadecimal number is
+the <NOBR>64-bit</NOBR> floating-point result of the operation (the sum), and
+the last hexadecimal number gives the exception flags that were raised by the
+operation.
+</P>
+
+<P>
+Note that, for floating-point values, the sign and exponent are at the
+most-significant end of the number.
+Thus, for the first number on the first line above, the leading hexadecimal
+digits <CODE>3F9</CODE> are the sign and encoded exponent of the
+<NOBR>64-bit</NOBR> floating-point value, and the remaining digits are the
+encoded significand.
+</P>
+
+<P>
+Exception flags are encoded with one bit per flag as follows:
+<BLOCKQUOTE>
+<TABLE CELLSPACING=0 CELLPADDING=0>
+<TR>
+ <TD>bit 0<CODE>&nbsp;&nbsp;&nbsp;</CODE></TD>
+ <TD><I>inexact</I> exception</TD>
+</TR>
+<TR><TD>bit 1</TD><TD><I>underflow</I> exception</TD></TR>
+<TR><TD>bit 2</TD><TD><I>overflow</I> exception</TD></TR>
+<TR>
+ <TD>bit 3</TD>
+ <TD><I>infinite</I> exception (&ldquo;divide by zero&rdquo;)</TD>
+</TR>
+<TR><TD>bit 4</TD><TD><I>invalid</I> exception</TD></TR>
+</TABLE>
+</BLOCKQUOTE>
+</P>
+
+
+</BODY>
+
diff --git a/src/libs/softfloat-3e/testfloat/doc/testsoftfloat.html b/src/libs/softfloat-3e/testfloat/doc/testsoftfloat.html
new file mode 100644
index 00000000..09e488b1
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/doc/testsoftfloat.html
@@ -0,0 +1,236 @@
+
+<HTML>
+
+<HEAD>
+<TITLE>testsoftfloat</TITLE>
+</HEAD>
+
+<BODY>
+
+<H1>Berkeley TestFloat Release 3e: <CODE>testsoftfloat</CODE></H1>
+
+<P>
+John R. Hauser<BR>
+2018 January 20<BR>
+</P>
+
+
+<H2>Overview</H2>
+
+<P>
+The <CODE>testsoftfloat</CODE> program tests that a build of the Berkeley
+SoftFloat library conforms to the IEEE Standard for Binary Floating-Point
+Arithmetic as expected.
+Program <CODE>testsoftfloat</CODE> is part of the Berkeley TestFloat package, a
+small collection of programs for performing such tests.
+For general information about TestFloat, as well as for basics about the
+operation of <CODE>testsoftfloat</CODE> and how to interpret its output, see
+file
+<A HREF="TestFloat-general.html"><NOBR><CODE>TestFloat-general.html</CODE></NOBR></A>.
+</P>
+
+<P>
+Note that, even if there are no bugs in the source code for SoftFloat (not
+guaranteed), a build of SoftFloat might still fail due to an issue with the
+build process, such as an incompatible compiler option or a compiler bug.
+</P>
+
+<P>
+The <CODE>testsoftfloat</CODE> program will ordinarily test a function for all
+five rounding modes defined by the IEEE Floating-Point Standard, one after the
+other, plus possibly a sixth mode, <I>round to odd</I> (depending on the
+options selected when <CODE>testsoftfloat</CODE> was compiled).
+If an operation is not supposed to require rounding, it will by default be
+tested only with the rounding mode set to <CODE>near_even</CODE>
+(nearest/even).
+In the same way, if an operation is affected by the way in which underflow
+tininess is detected, <CODE>testsoftfloat</CODE> tests the function with
+tininess detected both before rounding and after rounding.
+For <NOBR>80-bit</NOBR> double-extended-precision operations affected by
+rounding precision control, <CODE>testsoftfloat</CODE> also tests the function
+for all three rounding precision modes, one after the other.
+Testing can be limited to a single rounding mode, a single tininess mode,
+and/or a single rounding precision with appropriate command-line options.
+</P>
+
+
+<H2>Command Syntax</H2>
+
+<P>
+The <CODE>testsoftfloat</CODE> program is executed as a command with this
+syntax:
+<BLOCKQUOTE>
+<PRE>
+testsoftfloat [&lt;<I>option</I>&gt;...] &lt;<I>function</I>&gt;
+</PRE>
+</BLOCKQUOTE>
+Square brackets (<CODE>[ ]</CODE>) denote optional arguments,
+<CODE>&lt;<I>option</I>&gt;</CODE> is a supported option, and
+<CODE>&lt;<I>function</I>&gt;</CODE> is the name of either a testable function
+or a function set.
+The available options and function sets are documented below.
+If <CODE>testsoftfloat</CODE> is executed without any arguments, a summary of
+usage is written.
+</P>
+
+
+<H2>Options</H2>
+
+<P>
+The <CODE>testsoftfloat</CODE> program accepts several command options.
+If mutually contradictory options are given, the last one has priority.
+</P>
+
+<H3><CODE>-help</CODE></H3>
+
+<P>
+The <CODE>-help</CODE> option causes a summary of program usage to be written,
+after which the program exits.
+</P>
+
+<H3><CODE>-seed &lt;<I>num</I>&gt;</CODE></H3>
+
+<P>
+The <CODE>-seed</CODE> option sets the seed for the pseudo-random number
+generator used for generating test cases.
+The argument to <CODE>-seed</CODE> is a nonnegative integer.
+Executing the same <CODE>testsoftfloat</CODE> program with the same arguments
+(including the same pseudo-random number seed) should always perform the same
+sequence of tests, whereas changing the pseudo-random number seed should result
+in a different sequence of tests.
+The default seed number <NOBR>is 1</NOBR>.
+</P>
+
+<H3><CODE>-level &lt;<I>num</I>&gt;</CODE></H3>
+
+<P>
+The <CODE>-level</CODE> option sets the level of testing.
+The argument to <CODE>-level</CODE> can be either 1 <NOBR>or 2</NOBR>.
+The default is <NOBR>level 1</NOBR>.
+Level 2 performs many more tests than <NOBR>level 1</NOBR> and thus can reveal
+bugs not found by <NOBR>level 1</NOBR>.
+</P>
+
+<H3><CODE>-errors &lt;<I>num</I>&gt;</CODE></H3>
+
+<P>
+The <CODE>-errors</CODE> option instructs <CODE>testsoftfloat</CODE> to report
+no more than the specified number of errors for any combination of function,
+rounding mode, etc.
+The argument to <CODE>-errors</CODE> must be a nonnegative decimal integer.
+Once the specified number of error reports has been generated,
+<CODE>testsoftfloat</CODE> ends the current test and begins the next one, if
+any.
+The default is <NOBR><CODE>-errors</CODE> <CODE>20</CODE></NOBR>.
+</P>
+
+<P>
+Against intuition, <NOBR><CODE>-errors</CODE> <CODE>0</CODE></NOBR> causes
+<CODE>testsoftfloat</CODE> to report every error it finds.
+</P>
+
+<H3><CODE>-errorstop</CODE></H3>
+
+<P>
+The <CODE>-errorstop</CODE> option causes the program to exit after the first
+function for which any errors are reported.
+</P>
+
+<H3><CODE>-forever</CODE></H3>
+
+<P>
+The <CODE>-forever</CODE> option causes a single function to be repeatedly
+tested.
+Only one rounding mode and/or rounding precision can be tested in a single
+execution.
+If not specified, the rounding mode defaults to nearest/even.
+For <NOBR>80-bit</NOBR> double-extended-precision functions, the rounding
+precision defaults to full double-extended precision.
+The testing level is set to 2 by this option.
+</P>
+
+<H3><CODE>-precision32, -precision64, -precision80</CODE></H3>
+
+<P>
+For <NOBR>80-bit</NOBR> double-extended-precision funcions affected by
+rounding precision control, the <CODE>-precision32</CODE> option restricts
+testing to only the cases in which the rounding precision is
+<NOBR>32 bits</NOBR>, equivalent to <NOBR>32-bit</NOBR> single-precision.
+The other rounding precision choices are not tested.
+Likewise, <CODE>-precision64</CODE> fixes the rounding precision to
+<NOBR>64 bits</NOBR>, equivalent to <NOBR>64-bit</NOBR> double-precision;
+and <CODE>-precision80</CODE> fixes the rounding precision to the full
+<NOBR>80 bits</NOBR> of the double-extended-precision format.
+All these options are ignored for operations not affected by rounding precision
+control.
+</P>
+
+<H3><CODE>-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax, -rodd</CODE></H3>
+
+<P>
+The <CODE>-rnear_even</CODE> option restricts testing to only the cases in
+which the rounding mode is nearest/even.
+The other rounding mode choices are not tested.
+Likewise, <CODE>-rnear_maxMag</CODE> forces rounding to nearest/maximum
+magnitude (nearest-away), <CODE>-rminMag</CODE> forces rounding to minimum
+magnitude (toward zero), <CODE>-rmin</CODE> forces rounding to minimum (down,
+toward negative infinity), <CODE>-rmax</CODE> forces rounding to maximum (up,
+toward positive infinity), and <CODE>-rodd</CODE>, if supported, forces
+rounding to odd.
+These options are ignored for operations that are exact and thus do not round.
+</P>
+
+<H3><CODE>-tininessbefore, -tininessafter</CODE></H3>
+
+<P>
+The <CODE>-tininessbefore</CODE> option restricts testing to only the cases in
+which tininess on underflow is detected before rounding.
+Likewise, <CODE>-tininessafter</CODE> restricts testing to only the cases in
+which tininess on underflow is detected after rounding.
+</P>
+
+<H3><CODE>-notexact, -exact</CODE></H3>
+
+<P>
+For functions that round to an integer (conversions to integer types and the
+<CODE>roundToInt</CODE> functions), the <CODE>-notexact</CODE> option restricts
+testing to only the cases for which the <CODE><I>exact</I></CODE> operand
+(specifying whether the <I>inexact</I> exception flag may be raised) is
+<CODE>false</CODE>.
+Likewise, the <CODE>-exact</CODE> option restricts testing to only the cases
+for which the <CODE><I>exact</I></CODE> operand is <CODE>true</CODE>.
+</P>
+
+
+<H2>Function Sets</H2>
+
+<P>
+Just as <CODE>testsoftfloat</CODE> can test a function for all five or six
+rounding modes in sequence, multiple functions can be tested with a single
+execution of <CODE>testsoftfloat</CODE>.
+Two sets are recognized: <CODE>-all1</CODE> and <CODE>-all2</CODE>.
+The set <CODE>-all1</CODE> is all one-operand operations, while
+<CODE>-all2</CODE> is all two-operand operations.
+A function set is used in place of a function name in the
+<CODE>testsoftfloat</CODE> command line, such as
+<BLOCKQUOTE>
+<PRE>
+testsoftfloat [&lt;<I>option</I>&gt;...] -all1
+</PRE>
+</BLOCKQUOTE>
+</P>
+
+<P>
+For the purpose of deciding the number of operands of an operation, any
+<CODE><I>roundingMode</I></CODE> and <CODE><I>exact</I></CODE> arguments are
+ignored.
+(Such arguments specify the rounding mode and whether the <I>inexact</I>
+exception flag may be raised, respectively.)
+Thus, functions that convert to integer type and the <CODE>roundToInt</CODE>
+functions are included in the set of one-operand operations tested by
+<CODE>-all1</CODE>.
+</P>
+
+
+</BODY>
+
diff --git a/src/libs/softfloat-3e/testfloat/doc/timesoftfloat.html b/src/libs/softfloat-3e/testfloat/doc/timesoftfloat.html
new file mode 100644
index 00000000..8808fe61
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/doc/timesoftfloat.html
@@ -0,0 +1,196 @@
+
+<HTML>
+
+<HEAD>
+<TITLE>timesoftfloat</TITLE>
+</HEAD>
+
+<BODY>
+
+<H1>Berkeley TestFloat Release 3e: <CODE>timesoftfloat</CODE></H1>
+
+<P>
+John R. Hauser<BR>
+2018 January 20<BR>
+</P>
+
+
+<H2>Overview</H2>
+
+<P>
+The <CODE>timesoftfloat</CODE> program provides a simple way to evaluate the
+speed of the floating-point operations of the Berkeley SoftFloat library.
+Program <CODE>timesoftfloat</CODE> is included with the Berkeley TestFloat
+package, a small collection of programs for testing that an implementation of
+floating-point conforms to the IEEE Standard for Binary Floating-Point
+Arithmetic.
+Although <CODE>timesoftfloat</CODE> does not test floating-point correctness
+like the other TestFloat programs, nevertheless <CODE>timesoftfloat</CODE> is a
+partner to TestFloat&rsquo;s <CODE>testsoftfloat</CODE> program.
+For more about TestFloat generally and <CODE>testsoftfloat</CODE> specifically,
+see file
+<A HREF="TestFloat-general.html"><NOBR><CODE>TestFloat-general.html</CODE></NOBR></A>.
+</P>
+
+<P>
+Ordinarily, <CODE>timesoftfloat</CODE> will measure a function&rsquo;s speed
+separately for each of the five rounding modes defined by the IEEE
+Floating-Point Standard, one after the other, plus possibly a sixth mode,
+<I>round to odd</I> (depending on the options selected when
+<CODE>timesoftfloat</CODE> was compiled).
+If an operation is not supposed to require rounding, it will by default be
+timed only with the rounding mode set to <CODE>near_even</CODE> (nearest/even).
+In the same way, if an operation is affected by the way in which underflow
+tininess is detected, <CODE>timesoftfloat</CODE> times the function with
+tininess detected both before rounding and after rounding.
+For <NOBR>80-bit</NOBR> double-extended-precision operations affected by
+rounding precision control, <CODE>timesoftfloat</CODE> also times the function
+for each of the three rounding precision modes, one after the other.
+Evaluation of a function can be limited to a single rounding mode, a single
+tininess mode, and/or a single rounding precision with appropriate command-line
+options.
+</P>
+
+<P>
+For each function and mode evaluated, <CODE>timesoftfloat</CODE> reports the
+measured speed of the function in Mop/s, or &ldquo;millions of operations per
+second&rdquo;.
+The speeds reported by <CODE>timesoftfloat</CODE> may be affected somewhat by
+other software executing at the same time as <CODE>timesoftfloat</CODE>.
+Be aware also that the exact execution time of any SoftFloat function depends
+partly on the values of arguments and the state of the processor&rsquo;s caches
+at the time the function is called.
+Your actual experience with SoftFloat may differ from the speeds reported by
+<CODE>timesoftfloat</CODE> for all these reasons.
+</P>
+
+<P>
+Note that the remainder operations for larger formats (<CODE>f64_rem</CODE>,
+<CODE>extF80_rem</CODE>, and <CODE>f128_rem</CODE>) can be markedly slower than
+other operations, particularly for double-extended-precision
+(<CODE>extF80_rem</CODE>) and quadruple precision (<CODE>f128_rem</CODE>).
+This is inherent to the remainder operation itself and is not a failing of the
+SoftFloat implementation.
+</P>
+
+
+<H2>Command Syntax</H2>
+
+<P>
+The <CODE>timesoftfloat</CODE> program is executed as a command with this
+syntax:
+<BLOCKQUOTE>
+<PRE>
+timesoftfloat [&lt;<I>option</I>&gt;...] &lt;<I>function</I>&gt;
+</PRE>
+</BLOCKQUOTE>
+Square brackets (<CODE>[ ]</CODE>) denote optional arguments,
+<CODE>&lt;<I>option</I>&gt;</CODE> is a supported option, and
+<CODE>&lt;<I>function</I>&gt;</CODE> is the name of either a testable function
+or a function set.
+The available options and function sets are documented below.
+If <CODE>timesoftfloat</CODE> is executed without any arguments, a summary of
+usage is written.
+</P>
+
+
+<H2>Options</H2>
+
+<P>
+The <CODE>timesoftfloat</CODE> program accepts several command options.
+If mutually contradictory options are given, the last one has priority.
+</P>
+
+<H3><CODE>-help</CODE></H3>
+
+<P>
+The <CODE>-help</CODE> option causes a summary of program usage to be written,
+after which the program exits.
+</P>
+
+<H3><CODE>-precision32, -precision64, -precision80</CODE></H3>
+
+<P>
+For <NOBR>80-bit</NOBR> double-extended-precision funcions affected by
+rounding precision control, the <CODE>-precision32</CODE> option restricts
+timing of an operation to only the cases in which the rounding precision is
+<NOBR>32 bits</NOBR>, equivalent to <NOBR>32-bit</NOBR> single-precision.
+Other rounding precision choices are not timed.
+Likewise, <CODE>-precision64</CODE> fixes the rounding precision to
+<NOBR>64 bits</NOBR>, equivalent to <NOBR>64-bit</NOBR> double-precision;
+and <CODE>-precision80</CODE> fixes the rounding precision to the full
+<NOBR>80 bits</NOBR> of the double-extended-precision format.
+All these options are ignored for operations not affected by rounding precision
+control.
+</P>
+
+<H3><CODE>-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax, -rodd</CODE></H3>
+
+<P>
+The <CODE>-rnear_even</CODE> option restricts timing of an operation to only
+the cases in which the rounding mode is nearest/even.
+Other rounding mode choices are not timed.
+Likewise, <CODE>-rnear_maxMag</CODE> forces rounding to nearest/maximum
+magnitude (nearest-away), <CODE>-rminMag</CODE> forces rounding to minimum
+magnitude (toward zero), <CODE>-rmin</CODE> forces rounding to minimum (down,
+toward negative infinity), <CODE>-rmax</CODE> forces rounding to maximum (up,
+toward positive infinity), and <CODE>-rodd</CODE>, if supported, forces
+rounding to odd.
+These options are ignored for operations that are exact and thus do not round.
+</P>
+
+<H3><CODE>-tininessbefore, -tininessafter</CODE></H3>
+
+<P>
+The <CODE>-tininessbefore</CODE> option restricts timing of an operation to
+only the cases in which tininess on underflow is detected before rounding.
+Likewise, <CODE>-tininessafter</CODE> restricts measurement to only the cases
+in which tininess on underflow is detected after rounding.
+</P>
+
+<H3><CODE>-notexact, -exact</CODE></H3>
+
+<P>
+For functions that round to an integer (conversions to integer types and the
+<CODE>roundToInt</CODE> functions), the <CODE>-notexact</CODE> option restricts
+timing of an operation to only the cases for which the
+<CODE><I>exact</I></CODE> operand (specifying whether the <I>inexact</I>
+exception flag may be raised) is <CODE>false</CODE>.
+Likewise, the <CODE>-exact</CODE> option restricts measurement to only the
+cases for which the <CODE><I>exact</I></CODE> operand is <CODE>true</CODE>.
+</P>
+
+
+<H2>Function Sets</H2>
+
+<P>
+Just as <CODE>timesoftfloat</CODE> can time a function for all five or six
+rounding modes in sequence, multiple functions can be timed with a single
+execution of <CODE>timesoftfloat</CODE>.
+Three sets are recognized:
+<CODE>-all1</CODE>, <CODE>-all2</CODE>, and <CODE>-all</CODE>.
+The set <CODE>-all1</CODE> is all one-operand operations, <CODE>-all2</CODE> is
+all two-operand operations, and <CODE>-all</CODE> is obviously all operations.
+A function set is used in place of a function name in the
+<CODE>timesoftfloat</CODE> command line, such as
+<BLOCKQUOTE>
+<PRE>
+timesoftfloat [&lt;<I>option</I>&gt;...] -all1
+</PRE>
+</BLOCKQUOTE>
+</P>
+
+<P>
+For the purpose of deciding the number of operands of an operation, any
+<CODE><I>roundingMode</I></CODE> and <CODE><I>exact</I></CODE> arguments are
+ignored.
+(Such arguments specify the rounding mode and whether the <I>inexact</I>
+exception flag may be raised, respectively.)
+Thus, functions that convert to integer type and the <CODE>roundToInt</CODE>
+functions are included in the set of one-operand operations timed by
+<CODE>-all1</CODE>.
+</P>
+
+
+</BODY>
+
diff --git a/src/libs/softfloat-3e/testfloat/source/fail.c b/src/libs/softfloat-3e/testfloat/source/fail.c
new file mode 100644
index 00000000..f68e941f
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/fail.c
@@ -0,0 +1,59 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdarg.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include "platform.h"
+#include "fail.h"
+
+char *fail_programName = "";
+
+void fail( const char *messagePtr, ... )
+{
+ va_list varArgs;
+
+ fflush( 0 );
+ fprintf( stderr, "%s: ", fail_programName );
+ va_start( varArgs, messagePtr );
+ vfprintf( stderr, messagePtr, varArgs );
+ va_end( varArgs );
+ fputs( ".\n", stderr );
+ exit( EXIT_FAILURE );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/fail.h b/src/libs/softfloat-3e/testfloat/source/fail.h
new file mode 100644
index 00000000..e981473c
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/fail.h
@@ -0,0 +1,41 @@
+
+/*============================================================================
+
+This C header file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+extern char *fail_programName;
+
+void fail( const char *, ... );
+
diff --git a/src/libs/softfloat-3e/testfloat/source/functionInfos.c b/src/libs/softfloat-3e/testfloat/source/functionInfos.c
new file mode 100644
index 00000000..8e401068
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/functionInfos.c
@@ -0,0 +1,290 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include "platform.h"
+#include "functions.h"
+
+#define ARG_1 FUNC_ARG_UNARY
+#define ARG_2 FUNC_ARG_BINARY
+#define ARG_R FUNC_ARG_ROUNDINGMODE
+#define ARG_E FUNC_ARG_EXACT
+#define EFF_P FUNC_EFF_ROUNDINGPRECISION
+#define EFF_R FUNC_EFF_ROUNDINGMODE
+#define EFF_T FUNC_EFF_TININESSMODE
+#define EFF_T_REDP FUNC_EFF_TININESSMODE_REDUCEDPREC
+
+/*----------------------------------------------------------------------------
+| Warning: This array must match the list of macros defined in "functions.h".
+*----------------------------------------------------------------------------*/
+const struct functionInfo functionInfos[NUM_FUNCTIONS] = {
+ { 0, 0 },
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT16
+ { "ui32_to_f16", ARG_1 | EFF_R },
+#endif
+ { "ui32_to_f32", ARG_1 | EFF_R },
+#ifdef FLOAT64
+ { "ui32_to_f64", ARG_1 },
+#endif
+#ifdef EXTFLOAT80
+ { "ui32_to_extF80", ARG_1 },
+#endif
+#ifdef FLOAT128
+ { "ui32_to_f128", ARG_1 },
+#endif
+#ifdef FLOAT16
+ { "ui64_to_f16", ARG_1 | EFF_R },
+#endif
+ { "ui64_to_f32", ARG_1 | EFF_R },
+#ifdef FLOAT64
+ { "ui64_to_f64", ARG_1 | EFF_R },
+#endif
+#ifdef EXTFLOAT80
+ { "ui64_to_extF80", ARG_1 },
+#endif
+#ifdef FLOAT128
+ { "ui64_to_f128", ARG_1 },
+#endif
+#ifdef FLOAT16
+ { "i32_to_f16", ARG_1 | EFF_R },
+#endif
+ { "i32_to_f32", ARG_1 | EFF_R },
+#ifdef FLOAT64
+ { "i32_to_f64", ARG_1 },
+#endif
+#ifdef EXTFLOAT80
+ { "i32_to_extF80", ARG_1 },
+#endif
+#ifdef FLOAT128
+ { "i32_to_f128", ARG_1 },
+#endif
+#ifdef FLOAT16
+ { "i64_to_f16", ARG_1 | EFF_R },
+#endif
+ { "i64_to_f32", ARG_1 | EFF_R },
+#ifdef FLOAT64
+ { "i64_to_f64", ARG_1 | EFF_R },
+#endif
+#ifdef EXTFLOAT80
+ { "i64_to_extF80", ARG_1 },
+#endif
+#ifdef FLOAT128
+ { "i64_to_f128", ARG_1 },
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT16
+ { "f16_to_ui32", ARG_1 | ARG_R | ARG_E },
+ { "f16_to_ui64", ARG_1 | ARG_R | ARG_E },
+ { "f16_to_i32", ARG_1 | ARG_R | ARG_E },
+ { "f16_to_i64", ARG_1 | ARG_R | ARG_E },
+ { "f16_to_ui32_r_minMag", ARG_1 | ARG_E },
+ { "f16_to_ui64_r_minMag", ARG_1 | ARG_E },
+ { "f16_to_i32_r_minMag", ARG_1 | ARG_E },
+ { "f16_to_i64_r_minMag", ARG_1 | ARG_E },
+ { "f16_to_f32", ARG_1 },
+#ifdef FLOAT64
+ { "f16_to_f64", ARG_1 },
+#endif
+#ifdef EXTFLOAT80
+ { "f16_to_extF80", ARG_1 },
+#endif
+#ifdef FLOAT128
+ { "f16_to_f128", ARG_1 },
+#endif
+ { "f16_roundToInt", ARG_1 | ARG_R | ARG_E },
+ { "f16_add", ARG_2 | EFF_R },
+ { "f16_sub", ARG_2 | EFF_R },
+ { "f16_mul", ARG_2 | EFF_R | EFF_T },
+ { "f16_mulAdd", EFF_R | EFF_T },
+ { "f16_div", ARG_2 | EFF_R },
+ { "f16_rem", ARG_2 },
+ { "f16_sqrt", ARG_1 | EFF_R },
+ { "f16_eq", ARG_2 },
+ { "f16_le", ARG_2 },
+ { "f16_lt", ARG_2 },
+ { "f16_eq_signaling", ARG_2 },
+ { "f16_le_quiet", ARG_2 },
+ { "f16_lt_quiet", ARG_2 },
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ { "f32_to_ui32", ARG_1 | ARG_R | ARG_E },
+ { "f32_to_ui64", ARG_1 | ARG_R | ARG_E },
+ { "f32_to_i32", ARG_1 | ARG_R | ARG_E },
+ { "f32_to_i64", ARG_1 | ARG_R | ARG_E },
+ { "f32_to_ui32_r_minMag", ARG_1 | ARG_E },
+ { "f32_to_ui64_r_minMag", ARG_1 | ARG_E },
+ { "f32_to_i32_r_minMag", ARG_1 | ARG_E },
+ { "f32_to_i64_r_minMag", ARG_1 | ARG_E },
+#ifdef FLOAT16
+ { "f32_to_f16", ARG_1 | EFF_R | EFF_T },
+#endif
+#ifdef FLOAT64
+ { "f32_to_f64", ARG_1 },
+#endif
+#ifdef EXTFLOAT80
+ { "f32_to_extF80", ARG_1 },
+#endif
+#ifdef FLOAT128
+ { "f32_to_f128", ARG_1 },
+#endif
+ { "f32_roundToInt", ARG_1 | ARG_R | ARG_E },
+ { "f32_add", ARG_2 | EFF_R },
+ { "f32_sub", ARG_2 | EFF_R },
+ { "f32_mul", ARG_2 | EFF_R | EFF_T },
+ { "f32_mulAdd", EFF_R | EFF_T },
+ { "f32_div", ARG_2 | EFF_R },
+ { "f32_rem", ARG_2 },
+ { "f32_sqrt", ARG_1 | EFF_R },
+ { "f32_eq", ARG_2 },
+ { "f32_le", ARG_2 },
+ { "f32_lt", ARG_2 },
+ { "f32_eq_signaling", ARG_2 },
+ { "f32_le_quiet", ARG_2 },
+ { "f32_lt_quiet", ARG_2 },
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT64
+ { "f64_to_ui32", ARG_1 | ARG_R | ARG_E },
+ { "f64_to_ui64", ARG_1 | ARG_R | ARG_E },
+ { "f64_to_i32", ARG_1 | ARG_R | ARG_E },
+ { "f64_to_i64", ARG_1 | ARG_R | ARG_E },
+ { "f64_to_ui32_r_minMag", ARG_1 | ARG_E },
+ { "f64_to_ui64_r_minMag", ARG_1 | ARG_E },
+ { "f64_to_i32_r_minMag", ARG_1 | ARG_E },
+ { "f64_to_i64_r_minMag", ARG_1 | ARG_E },
+#ifdef FLOAT16
+ { "f64_to_f16", ARG_1 | EFF_R | EFF_T },
+#endif
+ { "f64_to_f32", ARG_1 | EFF_R | EFF_T },
+#ifdef EXTFLOAT80
+ { "f64_to_extF80", ARG_1 },
+#endif
+#ifdef FLOAT128
+ { "f64_to_f128", ARG_1 },
+#endif
+ { "f64_roundToInt", ARG_1 | ARG_R | ARG_E },
+ { "f64_add", ARG_2 | EFF_R },
+ { "f64_sub", ARG_2 | EFF_R },
+ { "f64_mul", ARG_2 | EFF_R | EFF_T },
+ { "f64_mulAdd", EFF_R | EFF_T },
+ { "f64_div", ARG_2 | EFF_R },
+ { "f64_rem", ARG_2 },
+ { "f64_sqrt", ARG_1 | EFF_R },
+ { "f64_eq", ARG_2 },
+ { "f64_le", ARG_2 },
+ { "f64_lt", ARG_2 },
+ { "f64_eq_signaling", ARG_2 },
+ { "f64_le_quiet", ARG_2 },
+ { "f64_lt_quiet", ARG_2 },
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef EXTFLOAT80
+ { "extF80_to_ui32", ARG_1 | ARG_R | ARG_E },
+ { "extF80_to_ui64", ARG_1 | ARG_R | ARG_E },
+ { "extF80_to_i32", ARG_1 | ARG_R | ARG_E },
+ { "extF80_to_i64", ARG_1 | ARG_R | ARG_E },
+ { "extF80_to_ui32_r_minMag", ARG_1 | ARG_E },
+ { "extF80_to_ui64_r_minMag", ARG_1 | ARG_E },
+ { "extF80_to_i32_r_minMag", ARG_1 | ARG_E },
+ { "extF80_to_i64_r_minMag", ARG_1 | ARG_E },
+#ifdef FLOAT16
+ { "extF80_to_f16", ARG_1 | EFF_R | EFF_T },
+#endif
+ { "extF80_to_f32", ARG_1 | EFF_R | EFF_T },
+#ifdef FLOAT64
+ { "extF80_to_f64", ARG_1 | EFF_R | EFF_T },
+#endif
+#ifdef FLOAT128
+ { "extF80_to_f128", ARG_1 },
+#endif
+ { "extF80_roundToInt", ARG_1 | ARG_R | ARG_E },
+ { "extF80_add", ARG_2 | EFF_P | EFF_R | EFF_T_REDP },
+ { "extF80_sub", ARG_2 | EFF_P | EFF_R | EFF_T_REDP },
+ { "extF80_mul", ARG_2 | EFF_P | EFF_R | EFF_T | EFF_T_REDP },
+ { "extF80_div", ARG_2 | EFF_P | EFF_R | EFF_T_REDP },
+ { "extF80_rem", ARG_2 },
+ { "extF80_sqrt", ARG_1 | EFF_P | EFF_R },
+ { "extF80_eq", ARG_2 },
+ { "extF80_le", ARG_2 },
+ { "extF80_lt", ARG_2 },
+ { "extF80_eq_signaling", ARG_2 },
+ { "extF80_le_quiet", ARG_2 },
+ { "extF80_lt_quiet", ARG_2 },
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT128
+ { "f128_to_ui32", ARG_1 | ARG_R | ARG_E },
+ { "f128_to_ui64", ARG_1 | ARG_R | ARG_E },
+ { "f128_to_i32", ARG_1 | ARG_R | ARG_E },
+ { "f128_to_i64", ARG_1 | ARG_R | ARG_E },
+ { "f128_to_ui32_r_minMag", ARG_1 | ARG_E },
+ { "f128_to_ui64_r_minMag", ARG_1 | ARG_E },
+ { "f128_to_i32_r_minMag", ARG_1 | ARG_E },
+ { "f128_to_i64_r_minMag", ARG_1 | ARG_E },
+#ifdef FLOAT16
+ { "f128_to_f16", ARG_1 | EFF_R | EFF_T },
+#endif
+ { "f128_to_f32", ARG_1 | EFF_R | EFF_T },
+#ifdef FLOAT64
+ { "f128_to_f64", ARG_1 | EFF_R | EFF_T },
+#endif
+#ifdef EXTFLOAT80
+ { "f128_to_extF80", ARG_1 | EFF_R | EFF_T },
+#endif
+ { "f128_roundToInt", ARG_1 | ARG_R | ARG_E },
+ { "f128_add", ARG_2 | EFF_R },
+ { "f128_sub", ARG_2 | EFF_R },
+ { "f128_mul", ARG_2 | EFF_R | EFF_T },
+ { "f128_mulAdd", EFF_R | EFF_T },
+ { "f128_div", ARG_2 | EFF_R },
+ { "f128_rem", ARG_2 },
+ { "f128_sqrt", ARG_1 | EFF_R },
+ { "f128_eq", ARG_2 },
+ { "f128_le", ARG_2 },
+ { "f128_lt", ARG_2 },
+ { "f128_eq_signaling", ARG_2 },
+ { "f128_le_quiet", ARG_2 },
+ { "f128_lt_quiet", ARG_2 },
+#endif
+};
+
diff --git a/src/libs/softfloat-3e/testfloat/source/functions.h b/src/libs/softfloat-3e/testfloat/source/functions.h
new file mode 100644
index 00000000..ee66bbd2
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/functions.h
@@ -0,0 +1,324 @@
+
+/*============================================================================
+
+This C header file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+
+/*----------------------------------------------------------------------------
+| Warning: This list must match the contents of "functionInfos.c".
+*----------------------------------------------------------------------------*/
+enum {
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT16
+ UI32_TO_F16 = 1,
+ UI32_TO_F32,
+#else
+ UI32_TO_F32 = 1,
+#endif
+#ifdef FLOAT64
+ UI32_TO_F64,
+#endif
+#ifdef EXTFLOAT80
+ UI32_TO_EXTF80,
+#endif
+#ifdef FLOAT128
+ UI32_TO_F128,
+#endif
+#ifdef FLOAT16
+ UI64_TO_F16,
+#endif
+ UI64_TO_F32,
+#ifdef FLOAT64
+ UI64_TO_F64,
+#endif
+#ifdef EXTFLOAT80
+ UI64_TO_EXTF80,
+#endif
+#ifdef FLOAT128
+ UI64_TO_F128,
+#endif
+#ifdef FLOAT16
+ I32_TO_F16,
+#endif
+ I32_TO_F32,
+#ifdef FLOAT64
+ I32_TO_F64,
+#endif
+#ifdef EXTFLOAT80
+ I32_TO_EXTF80,
+#endif
+#ifdef FLOAT128
+ I32_TO_F128,
+#endif
+#ifdef FLOAT16
+ I64_TO_F16,
+#endif
+ I64_TO_F32,
+#ifdef FLOAT64
+ I64_TO_F64,
+#endif
+#ifdef EXTFLOAT80
+ I64_TO_EXTF80,
+#endif
+#ifdef FLOAT128
+ I64_TO_F128,
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT16
+ F16_TO_UI32,
+ F16_TO_UI64,
+ F16_TO_I32,
+ F16_TO_I64,
+ F16_TO_UI32_R_MINMAG,
+ F16_TO_UI64_R_MINMAG,
+ F16_TO_I32_R_MINMAG,
+ F16_TO_I64_R_MINMAG,
+ F16_TO_F32,
+#ifdef FLOAT64
+ F16_TO_F64,
+#endif
+#ifdef EXTFLOAT80
+ F16_TO_EXTF80,
+#endif
+#ifdef FLOAT128
+ F16_TO_F128,
+#endif
+ F16_ROUNDTOINT,
+ F16_ADD,
+ F16_SUB,
+ F16_MUL,
+ F16_MULADD,
+ F16_DIV,
+ F16_REM,
+ F16_SQRT,
+ F16_EQ,
+ F16_LE,
+ F16_LT,
+ F16_EQ_SIGNALING,
+ F16_LE_QUIET,
+ F16_LT_QUIET,
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ F32_TO_UI32,
+ F32_TO_UI64,
+ F32_TO_I32,
+ F32_TO_I64,
+ F32_TO_UI32_R_MINMAG,
+ F32_TO_UI64_R_MINMAG,
+ F32_TO_I32_R_MINMAG,
+ F32_TO_I64_R_MINMAG,
+#ifdef FLOAT16
+ F32_TO_F16,
+#endif
+#ifdef FLOAT64
+ F32_TO_F64,
+#endif
+#ifdef EXTFLOAT80
+ F32_TO_EXTF80,
+#endif
+#ifdef FLOAT128
+ F32_TO_F128,
+#endif
+ F32_ROUNDTOINT,
+ F32_ADD,
+ F32_SUB,
+ F32_MUL,
+ F32_MULADD,
+ F32_DIV,
+ F32_REM,
+ F32_SQRT,
+ F32_EQ,
+ F32_LE,
+ F32_LT,
+ F32_EQ_SIGNALING,
+ F32_LE_QUIET,
+ F32_LT_QUIET,
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT64
+ F64_TO_UI32,
+ F64_TO_UI64,
+ F64_TO_I32,
+ F64_TO_I64,
+ F64_TO_UI32_R_MINMAG,
+ F64_TO_UI64_R_MINMAG,
+ F64_TO_I32_R_MINMAG,
+ F64_TO_I64_R_MINMAG,
+#ifdef FLOAT16
+ F64_TO_F16,
+#endif
+ F64_TO_F32,
+#ifdef EXTFLOAT80
+ F64_TO_EXTF80,
+#endif
+#ifdef FLOAT128
+ F64_TO_F128,
+#endif
+ F64_ROUNDTOINT,
+ F64_ADD,
+ F64_SUB,
+ F64_MUL,
+ F64_MULADD,
+ F64_DIV,
+ F64_REM,
+ F64_SQRT,
+ F64_EQ,
+ F64_LE,
+ F64_LT,
+ F64_EQ_SIGNALING,
+ F64_LE_QUIET,
+ F64_LT_QUIET,
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef EXTFLOAT80
+ EXTF80_TO_UI32,
+ EXTF80_TO_UI64,
+ EXTF80_TO_I32,
+ EXTF80_TO_I64,
+ EXTF80_TO_UI32_R_MINMAG,
+ EXTF80_TO_UI64_R_MINMAG,
+ EXTF80_TO_I32_R_MINMAG,
+ EXTF80_TO_I64_R_MINMAG,
+#ifdef FLOAT16
+ EXTF80_TO_F16,
+#endif
+ EXTF80_TO_F32,
+#ifdef FLOAT64
+ EXTF80_TO_F64,
+#endif
+#ifdef FLOAT128
+ EXTF80_TO_F128,
+#endif
+ EXTF80_ROUNDTOINT,
+ EXTF80_ADD,
+ EXTF80_SUB,
+ EXTF80_MUL,
+ EXTF80_DIV,
+ EXTF80_REM,
+ EXTF80_SQRT,
+ EXTF80_EQ,
+ EXTF80_LE,
+ EXTF80_LT,
+ EXTF80_EQ_SIGNALING,
+ EXTF80_LE_QUIET,
+ EXTF80_LT_QUIET,
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT128
+ F128_TO_UI32,
+ F128_TO_UI64,
+ F128_TO_I32,
+ F128_TO_I64,
+ F128_TO_UI32_R_MINMAG,
+ F128_TO_UI64_R_MINMAG,
+ F128_TO_I32_R_MINMAG,
+ F128_TO_I64_R_MINMAG,
+#ifdef FLOAT16
+ F128_TO_F16,
+#endif
+ F128_TO_F32,
+#ifdef FLOAT64
+ F128_TO_F64,
+#endif
+#ifdef EXTFLOAT80
+ F128_TO_EXTF80,
+#endif
+ F128_ROUNDTOINT,
+ F128_ADD,
+ F128_SUB,
+ F128_MUL,
+ F128_MULADD,
+ F128_DIV,
+ F128_REM,
+ F128_SQRT,
+ F128_EQ,
+ F128_LE,
+ F128_LT,
+ F128_EQ_SIGNALING,
+ F128_LE_QUIET,
+ F128_LT_QUIET,
+#endif
+ NUM_FUNCTIONS
+};
+
+enum {
+ ROUND_NEAR_EVEN = 1,
+ ROUND_MINMAG,
+ ROUND_MIN,
+ ROUND_MAX,
+ ROUND_NEAR_MAXMAG,
+#ifdef FLOAT_ROUND_ODD
+ ROUND_ODD,
+#endif
+ NUM_ROUNDINGMODES
+};
+enum {
+ TININESS_BEFORE_ROUNDING = 1,
+ TININESS_AFTER_ROUNDING,
+ NUM_TININESSMODES
+};
+
+extern const uint_fast8_t roundingModes[NUM_ROUNDINGMODES];
+extern const uint_fast8_t tininessModes[NUM_TININESSMODES];
+
+enum {
+ FUNC_ARG_UNARY = 0x01,
+ FUNC_ARG_BINARY = 0x02,
+ FUNC_ARG_ROUNDINGMODE = 0x04,
+ FUNC_ARG_EXACT = 0x08,
+ FUNC_EFF_ROUNDINGPRECISION = 0x10,
+ FUNC_EFF_ROUNDINGMODE = 0x20,
+ FUNC_EFF_TININESSMODE = 0x40,
+ FUNC_EFF_TININESSMODE_REDUCEDPREC = 0x80
+};
+struct functionInfo {
+ const char *namePtr;
+ unsigned char attribs;
+};
+extern const struct functionInfo functionInfos[NUM_FUNCTIONS];
+
+struct standardFunctionInfo {
+ const char *namePtr;
+ unsigned char functionCode;
+ char roundingCode, exact;
+};
+extern const struct standardFunctionInfo standardFunctionInfos[];
+
diff --git a/src/libs/softfloat-3e/testfloat/source/functions_common.c b/src/libs/softfloat-3e/testfloat/source/functions_common.c
new file mode 100644
index 00000000..71bcde3a
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/functions_common.c
@@ -0,0 +1,60 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "functions.h"
+
+const uint_fast8_t roundingModes[NUM_ROUNDINGMODES] = {
+ 0,
+ softfloat_round_near_even,
+ softfloat_round_minMag,
+ softfloat_round_min,
+ softfloat_round_max,
+ softfloat_round_near_maxMag,
+#ifdef FLOAT_ROUND_ODD
+ softfloat_round_odd
+#endif
+};
+
+const uint_fast8_t tininessModes[NUM_TININESSMODES] = {
+ 0,
+ softfloat_tininess_beforeRounding,
+ softfloat_tininess_afterRounding
+};
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genCases.h b/src/libs/softfloat-3e/testfloat/source/genCases.h
new file mode 100644
index 00000000..e7100918
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genCases.h
@@ -0,0 +1,114 @@
+
+/*============================================================================
+
+This C header file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "softfloat.h"
+
+extern int genCases_level;
+
+void genCases_setLevel( int );
+
+extern uint_fast64_t genCases_total;
+extern bool genCases_done;
+
+void genCases_ui32_a_init( void );
+void genCases_ui32_a_next( void );
+extern uint32_t genCases_ui32_a;
+
+void genCases_ui64_a_init( void );
+void genCases_ui64_a_next( void );
+extern uint64_t genCases_ui64_a;
+
+void genCases_i32_a_init( void );
+void genCases_i32_a_next( void );
+extern int32_t genCases_i32_a;
+
+void genCases_i64_a_init( void );
+void genCases_i64_a_next( void );
+extern int64_t genCases_i64_a;
+
+#ifdef FLOAT16
+void genCases_f16_a_init( void );
+void genCases_f16_a_next( void );
+void genCases_f16_ab_init( void );
+void genCases_f16_ab_next( void );
+void genCases_f16_abc_init( void );
+void genCases_f16_abc_next( void );
+extern float16_t genCases_f16_a, genCases_f16_b, genCases_f16_c;
+#endif
+
+void genCases_f32_a_init( void );
+void genCases_f32_a_next( void );
+void genCases_f32_ab_init( void );
+void genCases_f32_ab_next( void );
+void genCases_f32_abc_init( void );
+void genCases_f32_abc_next( void );
+extern float32_t genCases_f32_a, genCases_f32_b, genCases_f32_c;
+
+#ifdef FLOAT64
+void genCases_f64_a_init( void );
+void genCases_f64_a_next( void );
+void genCases_f64_ab_init( void );
+void genCases_f64_ab_next( void );
+void genCases_f64_abc_init( void );
+void genCases_f64_abc_next( void );
+extern float64_t genCases_f64_a, genCases_f64_b, genCases_f64_c;
+#endif
+
+#ifdef EXTFLOAT80
+void genCases_extF80_a_init( void );
+void genCases_extF80_a_next( void );
+void genCases_extF80_ab_init( void );
+void genCases_extF80_ab_next( void );
+void genCases_extF80_abc_init( void );
+void genCases_extF80_abc_next( void );
+extern extFloat80_t genCases_extF80_a, genCases_extF80_b, genCases_extF80_c;
+#endif
+
+#ifdef FLOAT128
+void genCases_f128_a_init( void );
+void genCases_f128_a_next( void );
+void genCases_f128_ab_init( void );
+void genCases_f128_ab_next( void );
+void genCases_f128_abc_init( void );
+void genCases_f128_abc_next( void );
+extern float128_t genCases_f128_a, genCases_f128_b, genCases_f128_c;
+#endif
+
+void genCases_writeTestsTotal( bool );
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genCases_common.c b/src/libs/softfloat-3e/testfloat/source/genCases_common.c
new file mode 100644
index 00000000..b358b498
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genCases_common.c
@@ -0,0 +1,58 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "fail.h"
+#include "genCases.h"
+
+int genCases_level = 0;
+
+void genCases_setLevel( int newLevel )
+{
+
+ if ( (newLevel < 1) || (2 < newLevel) ) {
+ fail( "Invalid testing level %d", newLevel );
+ }
+ genCases_level = newLevel;
+
+}
+
+uint_fast64_t genCases_total;
+bool genCases_done;
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genCases_extF80.c b/src/libs/softfloat-3e/testfloat/source/genCases_extF80.c
new file mode 100644
index 00000000..0e0109d1
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genCases_extF80.c
@@ -0,0 +1,920 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "random.h"
+#include "softfloat.h"
+#include "genCases.h"
+
+#ifdef EXTFLOAT80
+
+struct sequence {
+ int expNum, term1Num, term2Num;
+ bool done;
+};
+
+enum {
+ extF80NumQIn = 22,
+ extF80NumQOut = 76,
+ extF80NumP1 = 4,
+ extF80NumP2 = 248
+};
+static const uint16_t extF80QIn[extF80NumQIn] = {
+ 0x0000, /* positive, subnormal */
+ 0x0001, /* positive, -16382 */
+ 0x3FBF, /* positive, -64 */
+ 0x3FFD, /* positive, -2 */
+ 0x3FFE, /* positive, -1 */
+ 0x3FFF, /* positive, 0 */
+ 0x4000, /* positive, 1 */
+ 0x4001, /* positive, 2 */
+ 0x403F, /* positive, 64 */
+ 0x7FFE, /* positive, 16383 */
+ 0x7FFF, /* positive, infinity or NaN */
+ 0x8000, /* negative, subnormal */
+ 0x8001, /* negative, -16382 */
+ 0xBFBF, /* negative, -64 */
+ 0xBFFD, /* negative, -2 */
+ 0xBFFE, /* negative, -1 */
+ 0xBFFF, /* negative, 0 */
+ 0xC000, /* negative, 1 */
+ 0xC001, /* negative, 2 */
+ 0xC03F, /* negative, 64 */
+ 0xFFFE, /* negative, 16383 */
+ 0xFFFF /* negative, infinity or NaN */
+};
+static const uint16_t extF80QOut[extF80NumQOut] = {
+ 0x0000, /* positive, subnormal */
+ 0x0001, /* positive, -16382 */
+ 0x0002, /* positive, -16381 */
+ 0x3BFE, /* positive, -1025 */
+ 0x3BFF, /* positive, -1024 */
+ 0x3C00, /* positive, -1023 */
+ 0x3C01, /* positive, -1022 */
+ 0x3F7E, /* positive, -129 */
+ 0x3F7F, /* positive, -128 */
+ 0x3F80, /* positive, -127 */
+ 0x3F81, /* positive, -126 */
+ 0x3FBF, /* positive, -64 */
+ 0x3FFB, /* positive, -4 */
+ 0x3FFC, /* positive, -3 */
+ 0x3FFD, /* positive, -2 */
+ 0x3FFE, /* positive, -1 */
+ 0x3FFF, /* positive, 0 */
+ 0x4000, /* positive, 1 */
+ 0x4001, /* positive, 2 */
+ 0x4002, /* positive, 3 */
+ 0x4003, /* positive, 4 */
+ 0x401C, /* positive, 29 */
+ 0x401D, /* positive, 30 */
+ 0x401E, /* positive, 31 */
+ 0x401F, /* positive, 32 */
+ 0x403C, /* positive, 61 */
+ 0x403D, /* positive, 62 */
+ 0x403E, /* positive, 63 */
+ 0x403F, /* positive, 64 */
+ 0x407E, /* positive, 127 */
+ 0x407F, /* positive, 128 */
+ 0x4080, /* positive, 129 */
+ 0x43FE, /* positive, 1023 */
+ 0x43FF, /* positive, 1024 */
+ 0x4400, /* positive, 1025 */
+ 0x7FFD, /* positive, 16382 */
+ 0x7FFE, /* positive, 16383 */
+ 0x7FFF, /* positive, infinity or NaN */
+ 0x8000, /* negative, subnormal */
+ 0x8001, /* negative, -16382 */
+ 0x8002, /* negative, -16381 */
+ 0xBBFE, /* negative, -1025 */
+ 0xBBFF, /* negative, -1024 */
+ 0xBC00, /* negative, -1023 */
+ 0xBC01, /* negative, -1022 */
+ 0xBF7E, /* negative, -129 */
+ 0xBF7F, /* negative, -128 */
+ 0xBF80, /* negative, -127 */
+ 0xBF81, /* negative, -126 */
+ 0xBFBF, /* negative, -64 */
+ 0xBFFB, /* negative, -4 */
+ 0xBFFC, /* negative, -3 */
+ 0xBFFD, /* negative, -2 */
+ 0xBFFE, /* negative, -1 */
+ 0xBFFF, /* negative, 0 */
+ 0xC000, /* negative, 1 */
+ 0xC001, /* negative, 2 */
+ 0xC002, /* negative, 3 */
+ 0xC003, /* negative, 4 */
+ 0xC01C, /* negative, 29 */
+ 0xC01D, /* negative, 30 */
+ 0xC01E, /* negative, 31 */
+ 0xC01F, /* negative, 32 */
+ 0xC03C, /* negative, 61 */
+ 0xC03D, /* negative, 62 */
+ 0xC03E, /* negative, 63 */
+ 0xC03F, /* negative, 64 */
+ 0xC07E, /* negative, 127 */
+ 0xC07F, /* negative, 128 */
+ 0xC080, /* negative, 129 */
+ 0xC3FE, /* negative, 1023 */
+ 0xC3FF, /* negative, 1024 */
+ 0xC400, /* negative, 1025 */
+ 0xFFFD, /* negative, 16382 */
+ 0xFFFE, /* negative, 16383 */
+ 0xFFFF /* negative, infinity or NaN */
+};
+static const uint64_t extF80P1[extF80NumP1] = {
+ UINT64_C( 0x0000000000000000 ),
+ UINT64_C( 0x0000000000000001 ),
+ UINT64_C( 0x7FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x7FFFFFFFFFFFFFFE )
+};
+static const uint64_t extF80P2[extF80NumP2] = {
+ UINT64_C( 0x0000000000000000 ),
+ UINT64_C( 0x0000000000000001 ),
+ UINT64_C( 0x0000000000000002 ),
+ UINT64_C( 0x0000000000000004 ),
+ UINT64_C( 0x0000000000000008 ),
+ UINT64_C( 0x0000000000000010 ),
+ UINT64_C( 0x0000000000000020 ),
+ UINT64_C( 0x0000000000000040 ),
+ UINT64_C( 0x0000000000000080 ),
+ UINT64_C( 0x0000000000000100 ),
+ UINT64_C( 0x0000000000000200 ),
+ UINT64_C( 0x0000000000000400 ),
+ UINT64_C( 0x0000000000000800 ),
+ UINT64_C( 0x0000000000001000 ),
+ UINT64_C( 0x0000000000002000 ),
+ UINT64_C( 0x0000000000004000 ),
+ UINT64_C( 0x0000000000008000 ),
+ UINT64_C( 0x0000000000010000 ),
+ UINT64_C( 0x0000000000020000 ),
+ UINT64_C( 0x0000000000040000 ),
+ UINT64_C( 0x0000000000080000 ),
+ UINT64_C( 0x0000000000100000 ),
+ UINT64_C( 0x0000000000200000 ),
+ UINT64_C( 0x0000000000400000 ),
+ UINT64_C( 0x0000000000800000 ),
+ UINT64_C( 0x0000000001000000 ),
+ UINT64_C( 0x0000000002000000 ),
+ UINT64_C( 0x0000000004000000 ),
+ UINT64_C( 0x0000000008000000 ),
+ UINT64_C( 0x0000000010000000 ),
+ UINT64_C( 0x0000000020000000 ),
+ UINT64_C( 0x0000000040000000 ),
+ UINT64_C( 0x0000000080000000 ),
+ UINT64_C( 0x0000000100000000 ),
+ UINT64_C( 0x0000000200000000 ),
+ UINT64_C( 0x0000000400000000 ),
+ UINT64_C( 0x0000000800000000 ),
+ UINT64_C( 0x0000001000000000 ),
+ UINT64_C( 0x0000002000000000 ),
+ UINT64_C( 0x0000004000000000 ),
+ UINT64_C( 0x0000008000000000 ),
+ UINT64_C( 0x0000010000000000 ),
+ UINT64_C( 0x0000020000000000 ),
+ UINT64_C( 0x0000040000000000 ),
+ UINT64_C( 0x0000080000000000 ),
+ UINT64_C( 0x0000100000000000 ),
+ UINT64_C( 0x0000200000000000 ),
+ UINT64_C( 0x0000400000000000 ),
+ UINT64_C( 0x0000800000000000 ),
+ UINT64_C( 0x0001000000000000 ),
+ UINT64_C( 0x0002000000000000 ),
+ UINT64_C( 0x0004000000000000 ),
+ UINT64_C( 0x0008000000000000 ),
+ UINT64_C( 0x0010000000000000 ),
+ UINT64_C( 0x0020000000000000 ),
+ UINT64_C( 0x0040000000000000 ),
+ UINT64_C( 0x0080000000000000 ),
+ UINT64_C( 0x0100000000000000 ),
+ UINT64_C( 0x0200000000000000 ),
+ UINT64_C( 0x0400000000000000 ),
+ UINT64_C( 0x0800000000000000 ),
+ UINT64_C( 0x1000000000000000 ),
+ UINT64_C( 0x2000000000000000 ),
+ UINT64_C( 0x4000000000000000 ),
+ UINT64_C( 0x6000000000000000 ),
+ UINT64_C( 0x7000000000000000 ),
+ UINT64_C( 0x7800000000000000 ),
+ UINT64_C( 0x7C00000000000000 ),
+ UINT64_C( 0x7E00000000000000 ),
+ UINT64_C( 0x7F00000000000000 ),
+ UINT64_C( 0x7F80000000000000 ),
+ UINT64_C( 0x7FC0000000000000 ),
+ UINT64_C( 0x7FE0000000000000 ),
+ UINT64_C( 0x7FF0000000000000 ),
+ UINT64_C( 0x7FF8000000000000 ),
+ UINT64_C( 0x7FFC000000000000 ),
+ UINT64_C( 0x7FFE000000000000 ),
+ UINT64_C( 0x7FFF000000000000 ),
+ UINT64_C( 0x7FFF800000000000 ),
+ UINT64_C( 0x7FFFC00000000000 ),
+ UINT64_C( 0x7FFFE00000000000 ),
+ UINT64_C( 0x7FFFF00000000000 ),
+ UINT64_C( 0x7FFFF80000000000 ),
+ UINT64_C( 0x7FFFFC0000000000 ),
+ UINT64_C( 0x7FFFFE0000000000 ),
+ UINT64_C( 0x7FFFFF0000000000 ),
+ UINT64_C( 0x7FFFFF8000000000 ),
+ UINT64_C( 0x7FFFFFC000000000 ),
+ UINT64_C( 0x7FFFFFE000000000 ),
+ UINT64_C( 0x7FFFFFF000000000 ),
+ UINT64_C( 0x7FFFFFF800000000 ),
+ UINT64_C( 0x7FFFFFFC00000000 ),
+ UINT64_C( 0x7FFFFFFE00000000 ),
+ UINT64_C( 0x7FFFFFFF00000000 ),
+ UINT64_C( 0x7FFFFFFF80000000 ),
+ UINT64_C( 0x7FFFFFFFC0000000 ),
+ UINT64_C( 0x7FFFFFFFE0000000 ),
+ UINT64_C( 0x7FFFFFFFF0000000 ),
+ UINT64_C( 0x7FFFFFFFF8000000 ),
+ UINT64_C( 0x7FFFFFFFFC000000 ),
+ UINT64_C( 0x7FFFFFFFFE000000 ),
+ UINT64_C( 0x7FFFFFFFFF000000 ),
+ UINT64_C( 0x7FFFFFFFFF800000 ),
+ UINT64_C( 0x7FFFFFFFFFC00000 ),
+ UINT64_C( 0x7FFFFFFFFFE00000 ),
+ UINT64_C( 0x7FFFFFFFFFF00000 ),
+ UINT64_C( 0x7FFFFFFFFFF80000 ),
+ UINT64_C( 0x7FFFFFFFFFFC0000 ),
+ UINT64_C( 0x7FFFFFFFFFFE0000 ),
+ UINT64_C( 0x7FFFFFFFFFFF0000 ),
+ UINT64_C( 0x7FFFFFFFFFFF8000 ),
+ UINT64_C( 0x7FFFFFFFFFFFC000 ),
+ UINT64_C( 0x7FFFFFFFFFFFE000 ),
+ UINT64_C( 0x7FFFFFFFFFFFF000 ),
+ UINT64_C( 0x7FFFFFFFFFFFF800 ),
+ UINT64_C( 0x7FFFFFFFFFFFFC00 ),
+ UINT64_C( 0x7FFFFFFFFFFFFE00 ),
+ UINT64_C( 0x7FFFFFFFFFFFFF00 ),
+ UINT64_C( 0x7FFFFFFFFFFFFF80 ),
+ UINT64_C( 0x7FFFFFFFFFFFFFC0 ),
+ UINT64_C( 0x7FFFFFFFFFFFFFE0 ),
+ UINT64_C( 0x7FFFFFFFFFFFFFF0 ),
+ UINT64_C( 0x7FFFFFFFFFFFFFF8 ),
+ UINT64_C( 0x7FFFFFFFFFFFFFFC ),
+ UINT64_C( 0x7FFFFFFFFFFFFFFE ),
+ UINT64_C( 0x7FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x7FFFFFFFFFFFFFFD ),
+ UINT64_C( 0x7FFFFFFFFFFFFFFB ),
+ UINT64_C( 0x7FFFFFFFFFFFFFF7 ),
+ UINT64_C( 0x7FFFFFFFFFFFFFEF ),
+ UINT64_C( 0x7FFFFFFFFFFFFFDF ),
+ UINT64_C( 0x7FFFFFFFFFFFFFBF ),
+ UINT64_C( 0x7FFFFFFFFFFFFF7F ),
+ UINT64_C( 0x7FFFFFFFFFFFFEFF ),
+ UINT64_C( 0x7FFFFFFFFFFFFDFF ),
+ UINT64_C( 0x7FFFFFFFFFFFFBFF ),
+ UINT64_C( 0x7FFFFFFFFFFFF7FF ),
+ UINT64_C( 0x7FFFFFFFFFFFEFFF ),
+ UINT64_C( 0x7FFFFFFFFFFFDFFF ),
+ UINT64_C( 0x7FFFFFFFFFFFBFFF ),
+ UINT64_C( 0x7FFFFFFFFFFF7FFF ),
+ UINT64_C( 0x7FFFFFFFFFFEFFFF ),
+ UINT64_C( 0x7FFFFFFFFFFDFFFF ),
+ UINT64_C( 0x7FFFFFFFFFFBFFFF ),
+ UINT64_C( 0x7FFFFFFFFFF7FFFF ),
+ UINT64_C( 0x7FFFFFFFFFEFFFFF ),
+ UINT64_C( 0x7FFFFFFFFFDFFFFF ),
+ UINT64_C( 0x7FFFFFFFFFBFFFFF ),
+ UINT64_C( 0x7FFFFFFFFF7FFFFF ),
+ UINT64_C( 0x7FFFFFFFFEFFFFFF ),
+ UINT64_C( 0x7FFFFFFFFDFFFFFF ),
+ UINT64_C( 0x7FFFFFFFFBFFFFFF ),
+ UINT64_C( 0x7FFFFFFFF7FFFFFF ),
+ UINT64_C( 0x7FFFFFFFEFFFFFFF ),
+ UINT64_C( 0x7FFFFFFFDFFFFFFF ),
+ UINT64_C( 0x7FFFFFFFBFFFFFFF ),
+ UINT64_C( 0x7FFFFFFF7FFFFFFF ),
+ UINT64_C( 0x7FFFFFFEFFFFFFFF ),
+ UINT64_C( 0x7FFFFFFDFFFFFFFF ),
+ UINT64_C( 0x7FFFFFFBFFFFFFFF ),
+ UINT64_C( 0x7FFFFFF7FFFFFFFF ),
+ UINT64_C( 0x7FFFFFEFFFFFFFFF ),
+ UINT64_C( 0x7FFFFFDFFFFFFFFF ),
+ UINT64_C( 0x7FFFFFBFFFFFFFFF ),
+ UINT64_C( 0x7FFFFF7FFFFFFFFF ),
+ UINT64_C( 0x7FFFFEFFFFFFFFFF ),
+ UINT64_C( 0x7FFFFDFFFFFFFFFF ),
+ UINT64_C( 0x7FFFFBFFFFFFFFFF ),
+ UINT64_C( 0x7FFFF7FFFFFFFFFF ),
+ UINT64_C( 0x7FFFEFFFFFFFFFFF ),
+ UINT64_C( 0x7FFFDFFFFFFFFFFF ),
+ UINT64_C( 0x7FFFBFFFFFFFFFFF ),
+ UINT64_C( 0x7FFF7FFFFFFFFFFF ),
+ UINT64_C( 0x7FFEFFFFFFFFFFFF ),
+ UINT64_C( 0x7FFDFFFFFFFFFFFF ),
+ UINT64_C( 0x7FFBFFFFFFFFFFFF ),
+ UINT64_C( 0x7FF7FFFFFFFFFFFF ),
+ UINT64_C( 0x7FEFFFFFFFFFFFFF ),
+ UINT64_C( 0x7FDFFFFFFFFFFFFF ),
+ UINT64_C( 0x7FBFFFFFFFFFFFFF ),
+ UINT64_C( 0x7F7FFFFFFFFFFFFF ),
+ UINT64_C( 0x7EFFFFFFFFFFFFFF ),
+ UINT64_C( 0x7DFFFFFFFFFFFFFF ),
+ UINT64_C( 0x7BFFFFFFFFFFFFFF ),
+ UINT64_C( 0x77FFFFFFFFFFFFFF ),
+ UINT64_C( 0x6FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x5FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x3FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x1FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x0FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x07FFFFFFFFFFFFFF ),
+ UINT64_C( 0x03FFFFFFFFFFFFFF ),
+ UINT64_C( 0x01FFFFFFFFFFFFFF ),
+ UINT64_C( 0x00FFFFFFFFFFFFFF ),
+ UINT64_C( 0x007FFFFFFFFFFFFF ),
+ UINT64_C( 0x003FFFFFFFFFFFFF ),
+ UINT64_C( 0x001FFFFFFFFFFFFF ),
+ UINT64_C( 0x000FFFFFFFFFFFFF ),
+ UINT64_C( 0x0007FFFFFFFFFFFF ),
+ UINT64_C( 0x0003FFFFFFFFFFFF ),
+ UINT64_C( 0x0001FFFFFFFFFFFF ),
+ UINT64_C( 0x0000FFFFFFFFFFFF ),
+ UINT64_C( 0x00007FFFFFFFFFFF ),
+ UINT64_C( 0x00003FFFFFFFFFFF ),
+ UINT64_C( 0x00001FFFFFFFFFFF ),
+ UINT64_C( 0x00000FFFFFFFFFFF ),
+ UINT64_C( 0x000007FFFFFFFFFF ),
+ UINT64_C( 0x000003FFFFFFFFFF ),
+ UINT64_C( 0x000001FFFFFFFFFF ),
+ UINT64_C( 0x000000FFFFFFFFFF ),
+ UINT64_C( 0x0000007FFFFFFFFF ),
+ UINT64_C( 0x0000003FFFFFFFFF ),
+ UINT64_C( 0x0000001FFFFFFFFF ),
+ UINT64_C( 0x0000000FFFFFFFFF ),
+ UINT64_C( 0x00000007FFFFFFFF ),
+ UINT64_C( 0x00000003FFFFFFFF ),
+ UINT64_C( 0x00000001FFFFFFFF ),
+ UINT64_C( 0x00000000FFFFFFFF ),
+ UINT64_C( 0x000000007FFFFFFF ),
+ UINT64_C( 0x000000003FFFFFFF ),
+ UINT64_C( 0x000000001FFFFFFF ),
+ UINT64_C( 0x000000000FFFFFFF ),
+ UINT64_C( 0x0000000007FFFFFF ),
+ UINT64_C( 0x0000000003FFFFFF ),
+ UINT64_C( 0x0000000001FFFFFF ),
+ UINT64_C( 0x0000000000FFFFFF ),
+ UINT64_C( 0x00000000007FFFFF ),
+ UINT64_C( 0x00000000003FFFFF ),
+ UINT64_C( 0x00000000001FFFFF ),
+ UINT64_C( 0x00000000000FFFFF ),
+ UINT64_C( 0x000000000007FFFF ),
+ UINT64_C( 0x000000000003FFFF ),
+ UINT64_C( 0x000000000001FFFF ),
+ UINT64_C( 0x000000000000FFFF ),
+ UINT64_C( 0x0000000000007FFF ),
+ UINT64_C( 0x0000000000003FFF ),
+ UINT64_C( 0x0000000000001FFF ),
+ UINT64_C( 0x0000000000000FFF ),
+ UINT64_C( 0x00000000000007FF ),
+ UINT64_C( 0x00000000000003FF ),
+ UINT64_C( 0x00000000000001FF ),
+ UINT64_C( 0x00000000000000FF ),
+ UINT64_C( 0x000000000000007F ),
+ UINT64_C( 0x000000000000003F ),
+ UINT64_C( 0x000000000000001F ),
+ UINT64_C( 0x000000000000000F ),
+ UINT64_C( 0x0000000000000007 ),
+ UINT64_C( 0x0000000000000003 )
+};
+
+static const uint_fast32_t extF80NumQInP1 = extF80NumQIn * extF80NumP1;
+static const uint_fast32_t extF80NumQOutP1 = extF80NumQOut * extF80NumP1;
+
+static void extF80NextQInP1( struct sequence *sequencePtr, extFloat80_t *zPtr )
+{
+ struct extFloat80M *zSPtr;
+ int expNum, sigNum;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+
+ zSPtr = (struct extFloat80M *) zPtr;
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uiZ64 = extF80QIn[expNum];
+ uiZ0 = extF80P1[sigNum];
+ if ( uiZ64 & 0x7FFF ) uiZ0 |= UINT64_C( 0x8000000000000000 );
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = uiZ0;
+ ++sigNum;
+ if ( extF80NumP1 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( extF80NumQIn <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+
+}
+
+static
+ void extF80NextQOutP1( struct sequence *sequencePtr, extFloat80_t *zPtr )
+{
+ struct extFloat80M *zSPtr;
+ int expNum, sigNum;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+
+ zSPtr = (struct extFloat80M *) zPtr;
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uiZ64 = extF80QOut[expNum];
+ uiZ0 = extF80P1[sigNum];
+ if ( uiZ64 & 0x7FFF ) uiZ0 |= UINT64_C( 0x8000000000000000 );
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = uiZ0;
+ ++sigNum;
+ if ( extF80NumP1 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( extF80NumQOut <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+
+}
+
+static const uint_fast32_t extF80NumQInP2 = extF80NumQIn * extF80NumP2;
+static const uint_fast32_t extF80NumQOutP2 = extF80NumQOut * extF80NumP2;
+
+static void extF80NextQInP2( struct sequence *sequencePtr, extFloat80_t *zPtr )
+{
+ struct extFloat80M *zSPtr;
+ int expNum, sigNum;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+
+ zSPtr = (struct extFloat80M *) zPtr;
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uiZ64 = extF80QIn[expNum];
+ uiZ0 = extF80P2[sigNum];
+ if ( uiZ64 & 0x7FFF ) uiZ0 |= UINT64_C( 0x8000000000000000 );
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = uiZ0;
+ ++sigNum;
+ if ( extF80NumP2 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( extF80NumQIn <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+
+}
+
+static
+ void extF80NextQOutP2( struct sequence *sequencePtr, extFloat80_t *zPtr )
+{
+ struct extFloat80M *zSPtr;
+ int expNum, sigNum;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+
+ zSPtr = (struct extFloat80M *) zPtr;
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uiZ64 = extF80QOut[expNum];
+ uiZ0 = extF80P2[sigNum];
+ if ( uiZ64 & 0x7FFF ) uiZ0 |= UINT64_C( 0x8000000000000000 );
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = uiZ0;
+ ++sigNum;
+ if ( extF80NumP2 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( extF80NumQOut <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+
+}
+
+static void extF80RandomQOutP3( extFloat80_t *zPtr )
+{
+ struct extFloat80M *zSPtr;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+
+ zSPtr = (struct extFloat80M *) zPtr;
+ uiZ64 = extF80QOut[randomN_ui8( extF80NumQOut )];
+ uiZ0 =
+ (extF80P2[randomN_ui8( extF80NumP2 )]
+ + extF80P2[randomN_ui8( extF80NumP2 )])
+ & UINT64_C( 0x7FFFFFFFFFFFFFFF );
+ if ( uiZ64 & 0x7FFF ) uiZ0 |= UINT64_C( 0x8000000000000000 );
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = uiZ0;
+
+}
+
+static void extF80RandomQOutPInf( extFloat80_t *zPtr )
+{
+ struct extFloat80M *zSPtr;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+
+ zSPtr = (struct extFloat80M *) zPtr;
+ uiZ64 = extF80QOut[randomN_ui8( extF80NumQOut )];
+ uiZ0 = random_ui64() & UINT64_C( 0x7FFFFFFFFFFFFFFF );
+ if ( uiZ64 & 0x7FFF ) uiZ0 |= UINT64_C( 0x8000000000000000 );
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = uiZ0;
+
+}
+
+enum { extF80NumQInfWeightMasks = 14 };
+static const uint16_t extF80QInfWeightMasks[extF80NumQInfWeightMasks] = {
+ 0xFFFF,
+ 0xFFFF,
+ 0xBFFF,
+ 0x9FFF,
+ 0x87FF,
+ 0x87FF,
+ 0x83FF,
+ 0x81FF,
+ 0x80FF,
+ 0x807F,
+ 0x803F,
+ 0x801F,
+ 0x800F,
+ 0x8007
+};
+static const uint16_t extF80QInfWeightOffsets[extF80NumQInfWeightMasks] = {
+ 0x0000,
+ 0x0000,
+ 0x2000,
+ 0x3000,
+ 0x3800,
+ 0x3C00,
+ 0x3E00,
+ 0x3F00,
+ 0x3F80,
+ 0x3FC0,
+ 0x3FE0,
+ 0x3FF0,
+ 0x3FF8,
+ 0x3FFC
+};
+
+static void extF80RandomQInfP3( extFloat80_t *zPtr )
+{
+ struct extFloat80M *zSPtr;
+ int weightMaskNum;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+
+ zSPtr = (struct extFloat80M *) zPtr;
+ weightMaskNum = randomN_ui8( extF80NumQInfWeightMasks );
+ uiZ64 =
+ (random_ui16() & extF80QInfWeightMasks[weightMaskNum])
+ + extF80QInfWeightOffsets[weightMaskNum];
+ uiZ0 =
+ (extF80P2[randomN_ui8( extF80NumP2 )]
+ + extF80P2[randomN_ui8( extF80NumP2 )])
+ & UINT64_C( 0x7FFFFFFFFFFFFFFF );
+ if ( uiZ64 & 0x7FFF ) uiZ0 |= UINT64_C( 0x8000000000000000 );
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = uiZ0;
+
+}
+
+static void extF80RandomQInfPInf( extFloat80_t *zPtr )
+{
+ struct extFloat80M *zSPtr;
+ int weightMaskNum;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+
+ zSPtr = (struct extFloat80M *) zPtr;
+ weightMaskNum = randomN_ui8( extF80NumQInfWeightMasks );
+ uiZ64 =
+ (random_ui16() & extF80QInfWeightMasks[weightMaskNum])
+ + extF80QInfWeightOffsets[weightMaskNum];
+ uiZ0 = random_ui64() & UINT64_C( 0x7FFFFFFFFFFFFFFF );
+ if ( uiZ64 & 0x7FFF ) uiZ0 |= UINT64_C( 0x8000000000000000 );
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = uiZ0;
+
+}
+
+static void extF80Random( extFloat80_t *zPtr )
+{
+
+ switch ( random_ui8() & 7 ) {
+ case 0:
+ case 1:
+ case 2:
+ extF80RandomQOutP3( zPtr );
+ break;
+ case 3:
+ extF80RandomQOutPInf( zPtr );
+ break;
+ case 4:
+ case 5:
+ case 6:
+ extF80RandomQInfP3( zPtr );
+ break;
+ case 7:
+ extF80RandomQInfPInf( zPtr );
+ break;
+ }
+
+}
+
+static struct sequence sequenceA, sequenceB, sequenceC;
+static extFloat80_t currentA, currentB, currentC;
+static int subcase;
+
+extFloat80_t genCases_extF80_a, genCases_extF80_b, genCases_extF80_c;
+
+void genCases_extF80_a_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ subcase = 0;
+ genCases_total =
+ (genCases_level == 1) ? 3 * extF80NumQOutP1 : 2 * extF80NumQOutP2;
+ genCases_done = false;
+
+}
+
+void genCases_extF80_a_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ case 1:
+ extF80Random( &genCases_extF80_a );
+ break;
+ case 2:
+ extF80NextQOutP1( &sequenceA, &genCases_extF80_a );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ extF80Random( &genCases_extF80_a );
+ break;
+ case 1:
+ extF80NextQOutP2( &sequenceA, &genCases_extF80_a );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+void genCases_extF80_ab_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ sequenceB.expNum = 0;
+ sequenceB.term1Num = 0;
+ sequenceB.term2Num = 0;
+ sequenceB.done = false;
+ subcase = 0;
+ if ( genCases_level == 1 ) {
+ genCases_total = 6 * extF80NumQInP1 * extF80NumQInP1;
+ extF80NextQInP1( &sequenceA, &currentA );
+ } else {
+ genCases_total = 2 * extF80NumQInP2 * extF80NumQInP2;
+ extF80NextQInP2( &sequenceA, &currentA );
+ }
+ genCases_done = false;
+
+}
+
+void genCases_extF80_ab_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ extF80NextQInP1( &sequenceA, &currentA );
+ }
+ extF80NextQInP1( &sequenceB, &currentB );
+ case 2:
+ case 4:
+ extF80Random( &genCases_extF80_a );
+ extF80Random( &genCases_extF80_b );
+ break;
+ case 1:
+ genCases_extF80_a = currentA;
+ extF80Random( &genCases_extF80_b );
+ break;
+ case 3:
+ extF80Random( &genCases_extF80_a );
+ genCases_extF80_b = currentB;
+ break;
+ case 5:
+ genCases_extF80_a = currentA;
+ genCases_extF80_b = currentB;
+ genCases_done = sequenceA.done & sequenceB.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ extF80Random( &genCases_extF80_a );
+ extF80Random( &genCases_extF80_b );
+ break;
+ case 1:
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ extF80NextQInP2( &sequenceA, &currentA );
+ }
+ genCases_extF80_a = currentA;
+ extF80NextQInP2( &sequenceB, &genCases_extF80_b );
+ genCases_done = sequenceA.done & sequenceB.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+void genCases_extF80_abc_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ sequenceB.expNum = 0;
+ sequenceB.term1Num = 0;
+ sequenceB.term2Num = 0;
+ sequenceB.done = false;
+ sequenceC.expNum = 0;
+ sequenceC.term1Num = 0;
+ sequenceC.term2Num = 0;
+ sequenceC.done = false;
+ subcase = 0;
+ if ( genCases_level == 1 ) {
+ genCases_total = 9 * extF80NumQInP1 * extF80NumQInP1 * extF80NumQInP1;
+ extF80NextQInP1( &sequenceA, &currentA );
+ extF80NextQInP1( &sequenceB, &currentB );
+ } else {
+ genCases_total = 2 * extF80NumQInP2 * extF80NumQInP2 * extF80NumQInP2;
+ extF80NextQInP2( &sequenceA, &currentA );
+ extF80NextQInP2( &sequenceB, &currentB );
+ }
+ genCases_done = false;
+
+}
+
+void genCases_extF80_abc_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ if ( sequenceC.done ) {
+ sequenceC.done = false;
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ extF80NextQInP1( &sequenceA, &currentA );
+ }
+ extF80NextQInP1( &sequenceB, &currentB );
+ }
+ extF80NextQInP1( &sequenceC, &currentC );
+ extF80Random( &genCases_extF80_a );
+ extF80Random( &genCases_extF80_b );
+ genCases_extF80_c = currentC;
+ break;
+ case 1:
+ genCases_extF80_a = currentA;
+ genCases_extF80_b = currentB;
+ extF80Random( &genCases_extF80_c );
+ break;
+ case 2:
+ extF80Random( &genCases_extF80_a );
+ extF80Random( &genCases_extF80_b );
+ extF80Random( &genCases_extF80_c );
+ break;
+ case 3:
+ extF80Random( &genCases_extF80_a );
+ genCases_extF80_b = currentB;
+ genCases_extF80_c = currentC;
+ break;
+ case 4:
+ genCases_extF80_a = currentA;
+ extF80Random( &genCases_extF80_b );
+ extF80Random( &genCases_extF80_c );
+ break;
+ case 5:
+ extF80Random( &genCases_extF80_a );
+ genCases_extF80_b = currentB;
+ extF80Random( &genCases_extF80_c );
+ break;
+ case 6:
+ genCases_extF80_a = currentA;
+ extF80Random( &genCases_extF80_b );
+ genCases_extF80_c = currentC;
+ break;
+ case 7:
+ extF80Random( &genCases_extF80_a );
+ extF80Random( &genCases_extF80_b );
+ extF80Random( &genCases_extF80_c );
+ break;
+ case 8:
+ genCases_extF80_a = currentA;
+ genCases_extF80_b = currentB;
+ genCases_extF80_c = currentC;
+ genCases_done = sequenceA.done & sequenceB.done & sequenceC.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ extF80Random( &genCases_extF80_a );
+ extF80Random( &genCases_extF80_b );
+ extF80Random( &genCases_extF80_c );
+ break;
+ case 1:
+ if ( sequenceC.done ) {
+ sequenceC.done = false;
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ extF80NextQInP2( &sequenceA, &currentA );
+ }
+ extF80NextQInP2( &sequenceB, &currentB );
+ }
+ genCases_extF80_a = currentA;
+ genCases_extF80_b = currentB;
+ extF80NextQInP2( &sequenceC, &genCases_extF80_c );
+ genCases_done = sequenceA.done & sequenceB.done & sequenceC.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genCases_f128.c b/src/libs/softfloat-3e/testfloat/source/genCases_f128.c
new file mode 100644
index 00000000..839da228
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genCases_f128.c
@@ -0,0 +1,1090 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "uint128.h"
+#include "random.h"
+#include "softfloat.h"
+#include "genCases.h"
+
+#ifdef FLOAT128
+
+struct sequence {
+ int expNum, term1Num, term2Num;
+ bool done;
+};
+
+enum {
+ f128NumQIn = 22,
+ f128NumQOut = 78,
+ f128NumP1 = 4,
+ f128NumP2 = 443
+};
+static const uint64_t f128QIn[f128NumQIn] = {
+ UINT64_C( 0x0000000000000000 ), /* positive, subnormal */
+ UINT64_C( 0x0001000000000000 ), /* positive, -16382 */
+ UINT64_C( 0x3F8E000000000000 ), /* positive, -113 */
+ UINT64_C( 0x3FFD000000000000 ), /* positive, -2 */
+ UINT64_C( 0x3FFE000000000000 ), /* positive, -1 */
+ UINT64_C( 0x3FFF000000000000 ), /* positive, 0 */
+ UINT64_C( 0x4000000000000000 ), /* positive, 1 */
+ UINT64_C( 0x4001000000000000 ), /* positive, 2 */
+ UINT64_C( 0x4070000000000000 ), /* positive, 113 */
+ UINT64_C( 0x7FFE000000000000 ), /* positive, 16383 */
+ UINT64_C( 0x7FFF000000000000 ), /* positive, infinity or NaN */
+ UINT64_C( 0x8000000000000000 ), /* negative, subnormal */
+ UINT64_C( 0x8001000000000000 ), /* negative, -16382 */
+ UINT64_C( 0xBF8E000000000000 ), /* negative, -113 */
+ UINT64_C( 0xBFFD000000000000 ), /* negative, -2 */
+ UINT64_C( 0xBFFE000000000000 ), /* negative, -1 */
+ UINT64_C( 0xBFFF000000000000 ), /* negative, 0 */
+ UINT64_C( 0xC000000000000000 ), /* negative, 1 */
+ UINT64_C( 0xC001000000000000 ), /* negative, 2 */
+ UINT64_C( 0xC070000000000000 ), /* negative, 113 */
+ UINT64_C( 0xFFFE000000000000 ), /* negative, 16383 */
+ UINT64_C( 0xFFFF000000000000 ) /* negative, infinity or NaN */
+};
+static const uint64_t f128QOut[f128NumQOut] = {
+ UINT64_C( 0x0000000000000000 ), /* positive, subnormal */
+ UINT64_C( 0x0001000000000000 ), /* positive, -16382 */
+ UINT64_C( 0x0002000000000000 ), /* positive, -16381 */
+ UINT64_C( 0x3BFE000000000000 ), /* positive, -1025 */
+ UINT64_C( 0x3BFF000000000000 ), /* positive, -1024 */
+ UINT64_C( 0x3C00000000000000 ), /* positive, -1023 */
+ UINT64_C( 0x3C01000000000000 ), /* positive, -1022 */
+ UINT64_C( 0x3F7E000000000000 ), /* positive, -129 */
+ UINT64_C( 0x3F7F000000000000 ), /* positive, -128 */
+ UINT64_C( 0x3F80000000000000 ), /* positive, -127 */
+ UINT64_C( 0x3F81000000000000 ), /* positive, -126 */
+ UINT64_C( 0x3F8E000000000000 ), /* positive, -113 */
+ UINT64_C( 0x3FFB000000000000 ), /* positive, -4 */
+ UINT64_C( 0x3FFC000000000000 ), /* positive, -3 */
+ UINT64_C( 0x3FFD000000000000 ), /* positive, -2 */
+ UINT64_C( 0x3FFE000000000000 ), /* positive, -1 */
+ UINT64_C( 0x3FFF000000000000 ), /* positive, 0 */
+ UINT64_C( 0x4000000000000000 ), /* positive, 1 */
+ UINT64_C( 0x4001000000000000 ), /* positive, 2 */
+ UINT64_C( 0x4002000000000000 ), /* positive, 3 */
+ UINT64_C( 0x4003000000000000 ), /* positive, 4 */
+ UINT64_C( 0x401C000000000000 ), /* positive, 29 */
+ UINT64_C( 0x401D000000000000 ), /* positive, 30 */
+ UINT64_C( 0x401E000000000000 ), /* positive, 31 */
+ UINT64_C( 0x401F000000000000 ), /* positive, 32 */
+ UINT64_C( 0x403C000000000000 ), /* positive, 61 */
+ UINT64_C( 0x403D000000000000 ), /* positive, 62 */
+ UINT64_C( 0x403E000000000000 ), /* positive, 63 */
+ UINT64_C( 0x403F000000000000 ), /* positive, 64 */
+ UINT64_C( 0x4070000000000000 ), /* positive, 113 */
+ UINT64_C( 0x407E000000000000 ), /* positive, 127 */
+ UINT64_C( 0x407F000000000000 ), /* positive, 128 */
+ UINT64_C( 0x4080000000000000 ), /* positive, 129 */
+ UINT64_C( 0x43FE000000000000 ), /* positive, 1023 */
+ UINT64_C( 0x43FF000000000000 ), /* positive, 1024 */
+ UINT64_C( 0x4400000000000000 ), /* positive, 1025 */
+ UINT64_C( 0x7FFD000000000000 ), /* positive, 16382 */
+ UINT64_C( 0x7FFE000000000000 ), /* positive, 16383 */
+ UINT64_C( 0x7FFF000000000000 ), /* positive, infinity or NaN */
+ UINT64_C( 0x8000000000000000 ), /* negative, subnormal */
+ UINT64_C( 0x8001000000000000 ), /* negative, -16382 */
+ UINT64_C( 0x8002000000000000 ), /* negative, -16381 */
+ UINT64_C( 0xBBFE000000000000 ), /* negative, -1025 */
+ UINT64_C( 0xBBFF000000000000 ), /* negative, -1024 */
+ UINT64_C( 0xBC00000000000000 ), /* negative, -1023 */
+ UINT64_C( 0xBC01000000000000 ), /* negative, -1022 */
+ UINT64_C( 0xBF7E000000000000 ), /* negative, -129 */
+ UINT64_C( 0xBF7F000000000000 ), /* negative, -128 */
+ UINT64_C( 0xBF80000000000000 ), /* negative, -127 */
+ UINT64_C( 0xBF81000000000000 ), /* negative, -126 */
+ UINT64_C( 0xBF8E000000000000 ), /* negative, -113 */
+ UINT64_C( 0xBFFB000000000000 ), /* negative, -4 */
+ UINT64_C( 0xBFFC000000000000 ), /* negative, -3 */
+ UINT64_C( 0xBFFD000000000000 ), /* negative, -2 */
+ UINT64_C( 0xBFFE000000000000 ), /* negative, -1 */
+ UINT64_C( 0xBFFF000000000000 ), /* negative, 0 */
+ UINT64_C( 0xC000000000000000 ), /* negative, 1 */
+ UINT64_C( 0xC001000000000000 ), /* negative, 2 */
+ UINT64_C( 0xC002000000000000 ), /* negative, 3 */
+ UINT64_C( 0xC003000000000000 ), /* negative, 4 */
+ UINT64_C( 0xC01C000000000000 ), /* negative, 29 */
+ UINT64_C( 0xC01D000000000000 ), /* negative, 30 */
+ UINT64_C( 0xC01E000000000000 ), /* negative, 31 */
+ UINT64_C( 0xC01F000000000000 ), /* negative, 32 */
+ UINT64_C( 0xC03C000000000000 ), /* negative, 61 */
+ UINT64_C( 0xC03D000000000000 ), /* negative, 62 */
+ UINT64_C( 0xC03E000000000000 ), /* negative, 63 */
+ UINT64_C( 0xC03F000000000000 ), /* negative, 64 */
+ UINT64_C( 0xC070000000000000 ), /* negative, 113 */
+ UINT64_C( 0xC07E000000000000 ), /* negative, 127 */
+ UINT64_C( 0xC07F000000000000 ), /* negative, 128 */
+ UINT64_C( 0xC080000000000000 ), /* negative, 129 */
+ UINT64_C( 0xC3FE000000000000 ), /* negative, 1023 */
+ UINT64_C( 0xC3FF000000000000 ), /* negative, 1024 */
+ UINT64_C( 0xC400000000000000 ), /* negative, 1025 */
+ UINT64_C( 0xFFFD000000000000 ), /* negative, 16382 */
+ UINT64_C( 0xFFFE000000000000 ), /* negative, 16383 */
+ UINT64_C( 0xFFFF000000000000 ) /* negative, infinity or NaN */
+};
+static const struct { uint64_t v64, v0; } f128P1[f128NumP1] = {
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000001 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFE ) }
+};
+static const struct { uint64_t v64, v0; } f128P2[f128NumP2] = {
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000001 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000002 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000004 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000008 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000010 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000020 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000040 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000080 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000100 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000200 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000400 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000800 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000001000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000002000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000004000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000008000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000010000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000020000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000040000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000080000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000100000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000200000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000400000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000800000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000001000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000002000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000004000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000008000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000010000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000020000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000040000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000080000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000100000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000200000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000400000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000800000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000001000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000002000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000004000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000008000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000010000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000020000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000040000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000080000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000100000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000200000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000400000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000800000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0001000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0002000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0004000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0008000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0010000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0020000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0040000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0080000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0100000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0200000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0400000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0800000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x1000000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x2000000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x4000000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x8000000000000000 ) },
+ { UINT64_C( 0x0000000000000001 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000002 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000004 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000008 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000010 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000020 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000040 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000080 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000100 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000200 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000400 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000800 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000001000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000002000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000004000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000008000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000010000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000020000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000040000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000080000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000100000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000200000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000400000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000800000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000001000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000002000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000004000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000008000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000010000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000020000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000040000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000080000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000100000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000200000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000400000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000800000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000001000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000002000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000004000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000008000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000010000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000020000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000040000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000080000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000100000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000200000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000400000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000800000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000C00000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000E00000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000F00000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000F80000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FC0000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FE0000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FF0000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FF8000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFC000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFE000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFF000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFF800000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFC00000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFE00000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFF00000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFF80000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFC0000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFE0000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFF0000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFF8000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFC000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFE000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFF000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFF800000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFC00000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFE00000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFF00000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFF80000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFC0000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFE0000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFF0000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFF8000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFC000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFE000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFF000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFF800 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFC00 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFE00 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFF00 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFF80 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFC0 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFE0 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFF0 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFF8 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFC ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFE ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0x8000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xC000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xE000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xF000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xF800000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFC00000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFE00000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFF00000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFF80000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFC0000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFE0000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFF0000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFF8000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFC000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFE000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFF000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFF800000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFC00000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFE00000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFF00000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFF80000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFC0000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFE0000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFF0000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFF8000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFC000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFE000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFF000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFF800000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFC00000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFE00000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFF00000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFF80000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFC0000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFE0000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFF0000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFF8000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFC000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFE000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFF000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFF800000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFC00000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFE00000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFF00000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFF80000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFC0000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFE0000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFF0000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFF8000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFC000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFE000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFF000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFF800 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFC00 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFE00 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFF00 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFF80 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFC0 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFE0 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFF0 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFF8 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFC ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFE ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFD ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFB ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFF7 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFEF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFDF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFBF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFF7F ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFEFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFDFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFBFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFF7FF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFEFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFDFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFBFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFF7FFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFEFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFDFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFBFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFF7FFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFEFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFDFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFBFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFF7FFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFEFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFDFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFBFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFF7FFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFEFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFDFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFBFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFF7FFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFEFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFDFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFBFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFF7FFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFEFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFDFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFBFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFF7FFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFEFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFDFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFBFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFF7FFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFEFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFDFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFBFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFF7FFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFEFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFDFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFBFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFF7FFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFEFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFDFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFBFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFF7FFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFEFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFDFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFBFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xF7FFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xEFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xDFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xBFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0x7FFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFD ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFB ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFF7 ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFEF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFDF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFBF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFF7F ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFEFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFDFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFBFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFF7FF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFEFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFDFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFBFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFF7FFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFEFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFDFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFBFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFF7FFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFEFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFDFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFBFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFF7FFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFEFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFDFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFBFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFF7FFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFEFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFDFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFBFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFF7FFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFEFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFDFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFBFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFF7FFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFEFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFDFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFBFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FF7FFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FEFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FDFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FBFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000F7FFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000EFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000DFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000BFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00007FFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00003FFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00001FFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000FFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000007FFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000003FFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000001FFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000FFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000007FFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000003FFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000001FFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000FFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000007FFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000003FFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000001FFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000000FFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000007FFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000003FFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000001FFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000000FFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000007FFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000003FFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000001FFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000FFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000000007FFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000000003FFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000000001FFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000000000FFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000000007FFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000000003FFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000000001FFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000000000FFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000007FFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000003FFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000001FFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000FFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000000000007FF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000000000003FF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000000000001FF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000000000000FF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000000000007F ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000000000003F ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000000000001F ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000000000000F ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000007 ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000003 ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000001 ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x7FFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x3FFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x1FFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0FFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x07FFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x03FFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x01FFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00FFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x007FFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x003FFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x001FFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000FFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0007FFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0003FFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0001FFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000FFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00007FFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00003FFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00001FFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000FFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000007FFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000003FFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000001FFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000FFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000007FFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000003FFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000001FFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000FFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000007FFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000003FFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000001FFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000000FFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000007FFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000003FFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000001FFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000000FFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000007FFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000003FFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000001FFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000FFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000000007FFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000000003FFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000000001FFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000000000FFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000000007FFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000000003FFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000000001FFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000000000FFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000007FFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000003FFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000001FFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000FFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000000000007FF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000000000003FF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000000000001FF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000000000000FF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000000000007F ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000000000003F ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000000000001F ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000000000000F ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000007 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000003 ) }
+};
+
+static const uint_fast64_t f128NumQInP1 = f128NumQIn * f128NumP1;
+static const uint_fast64_t f128NumQOutP1 = f128NumQOut * f128NumP1;
+
+static void f128NextQInP1( struct sequence *sequencePtr, float128_t *zPtr )
+{
+ struct uint128 *uiZPtr;
+ int expNum, sigNum;
+
+ uiZPtr = (struct uint128 *) zPtr;
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uiZPtr->v64 = f128QIn[expNum] | f128P1[sigNum].v64;
+ uiZPtr->v0 = f128P1[sigNum].v0;
+ ++sigNum;
+ if ( f128NumP1 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f128NumQIn <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+
+}
+
+static void f128NextQOutP1( struct sequence *sequencePtr, float128_t *zPtr )
+{
+ struct uint128 *uiZPtr;
+ int expNum, sigNum;
+
+ uiZPtr = (struct uint128 *) zPtr;
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uiZPtr->v64 = f128QOut[expNum] | f128P1[sigNum].v64;
+ uiZPtr->v0 = f128P1[sigNum].v0;
+ ++sigNum;
+ if ( f128NumP1 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f128NumQOut <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+
+}
+
+static const uint_fast64_t f128NumQInP2 = f128NumQIn * f128NumP2;
+static const uint_fast64_t f128NumQOutP2 = f128NumQOut * f128NumP2;
+
+static void f128NextQInP2( struct sequence *sequencePtr, float128_t *zPtr )
+{
+ struct uint128 *uiZPtr;
+ int expNum, sigNum;
+
+ uiZPtr = (struct uint128 *) zPtr;
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uiZPtr->v64 = f128QIn[expNum] | f128P2[sigNum].v64;
+ uiZPtr->v0 = f128P2[sigNum].v0;
+ ++sigNum;
+ if ( f128NumP2 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f128NumQIn <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+
+}
+
+static void f128NextQOutP2( struct sequence *sequencePtr, float128_t *zPtr )
+{
+ struct uint128 *uiZPtr;
+ int expNum, sigNum;
+
+ uiZPtr = (struct uint128 *) zPtr;
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uiZPtr->v64 = f128QOut[expNum] | f128P2[sigNum].v64;
+ uiZPtr->v0 = f128P2[sigNum].v0;
+ ++sigNum;
+ if ( f128NumP2 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f128NumQOut <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+
+}
+
+static void f128RandomQOutP3( float128_t *zPtr )
+{
+ struct uint128 *uiZPtr;
+ int sigNum1, sigNum2;
+ uint_fast64_t sig1_0;
+
+ uiZPtr = (struct uint128 *) zPtr;
+ sigNum1 = randomN_ui16( f128NumP2 );
+ sigNum2 = randomN_ui16( f128NumP2 );
+ sig1_0 = f128P2[sigNum1].v0;
+ uiZPtr->v0 = sig1_0 + f128P2[sigNum2].v0;
+ uiZPtr->v64 =
+ f128QOut[randomN_ui8( f128NumQOut )]
+ | ((f128P2[sigNum1].v64 + f128P2[sigNum2].v64 + (uiZPtr->v0 < sig1_0))
+ & UINT64_C( 0x0000FFFFFFFFFFFF ));
+
+}
+
+static void f128RandomQOutPInf( float128_t *zPtr )
+{
+ struct uint128 *uiZPtr;
+
+ uiZPtr = (struct uint128 *) zPtr;
+ uiZPtr->v64 =
+ f128QOut[randomN_ui8( f128NumQOut )]
+ | (random_ui64() & UINT64_C( 0x0000FFFFFFFFFFFF ));
+ uiZPtr->v0 = random_ui64();
+
+}
+
+enum { f128NumQInfWeightMasks = 14 };
+static const uint64_t f128QInfWeightMasks[f128NumQInfWeightMasks] = {
+ UINT64_C( 0xFFFF000000000000 ),
+ UINT64_C( 0xFFFF000000000000 ),
+ UINT64_C( 0xBFFF000000000000 ),
+ UINT64_C( 0x9FFF000000000000 ),
+ UINT64_C( 0x87FF000000000000 ),
+ UINT64_C( 0x87FF000000000000 ),
+ UINT64_C( 0x83FF000000000000 ),
+ UINT64_C( 0x81FF000000000000 ),
+ UINT64_C( 0x80FF000000000000 ),
+ UINT64_C( 0x807F000000000000 ),
+ UINT64_C( 0x803F000000000000 ),
+ UINT64_C( 0x801F000000000000 ),
+ UINT64_C( 0x800F000000000000 ),
+ UINT64_C( 0x8007000000000000 )
+};
+static const uint64_t f128QInfWeightOffsets[f128NumQInfWeightMasks] = {
+ UINT64_C( 0x0000000000000000 ),
+ UINT64_C( 0x0000000000000000 ),
+ UINT64_C( 0x2000000000000000 ),
+ UINT64_C( 0x3000000000000000 ),
+ UINT64_C( 0x3800000000000000 ),
+ UINT64_C( 0x3C00000000000000 ),
+ UINT64_C( 0x3E00000000000000 ),
+ UINT64_C( 0x3F00000000000000 ),
+ UINT64_C( 0x3F80000000000000 ),
+ UINT64_C( 0x3FC0000000000000 ),
+ UINT64_C( 0x3FE0000000000000 ),
+ UINT64_C( 0x3FF0000000000000 ),
+ UINT64_C( 0x3FF8000000000000 ),
+ UINT64_C( 0x3FFC000000000000 )
+};
+
+static void f128RandomQInfP3( float128_t *zPtr )
+{
+ struct uint128 *uiZPtr;
+ int sigNum1, sigNum2;
+ uint_fast64_t sig1_0;
+ int weightMaskNum;
+
+ uiZPtr = (struct uint128 *) zPtr;
+ sigNum1 = randomN_ui16( f128NumP2 );
+ sigNum2 = randomN_ui16( f128NumP2 );
+ sig1_0 = f128P2[sigNum1].v0;
+ uiZPtr->v0 = sig1_0 + f128P2[sigNum2].v0;
+ weightMaskNum = randomN_ui8( f128NumQInfWeightMasks );
+ uiZPtr->v64 =
+ (((uint_fast64_t) random_ui16()<<48
+ & f128QInfWeightMasks[weightMaskNum])
+ + f128QInfWeightOffsets[weightMaskNum])
+ | ((f128P2[sigNum1].v64 + f128P2[sigNum2].v64 + (uiZPtr->v0 < sig1_0))
+ & UINT64_C( 0x0000FFFFFFFFFFFF ));
+
+}
+
+static void f128RandomQInfPInf( float128_t *zPtr )
+{
+ struct uint128 *uiZPtr;
+ int weightMaskNum;
+
+ uiZPtr = (struct uint128 *) zPtr;
+ weightMaskNum = randomN_ui8( f128NumQInfWeightMasks );
+ uiZPtr->v64 =
+ (random_ui64()
+ & (f128QInfWeightMasks[weightMaskNum]
+ | UINT64_C( 0x0000FFFFFFFFFFFF )))
+ + f128QInfWeightOffsets[weightMaskNum];
+ uiZPtr->v0 = random_ui64();
+
+}
+
+static void f128Random( float128_t *zPtr )
+{
+
+ switch ( random_ui8() & 7 ) {
+ case 0:
+ case 1:
+ case 2:
+ f128RandomQOutP3( zPtr );
+ break;
+ case 3:
+ f128RandomQOutPInf( zPtr );
+ break;
+ case 4:
+ case 5:
+ case 6:
+ f128RandomQInfP3( zPtr );
+ break;
+ case 7:
+ f128RandomQInfPInf( zPtr );
+ break;
+ }
+
+}
+
+static struct sequence sequenceA, sequenceB, sequenceC;
+static float128_t currentA, currentB, currentC;
+static int subcase;
+
+float128_t genCases_f128_a, genCases_f128_b, genCases_f128_c;
+
+void genCases_f128_a_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ subcase = 0;
+ genCases_total =
+ (genCases_level == 1) ? 3 * f128NumQOutP1 : 2 * f128NumQOutP2;
+ genCases_done = false;
+
+}
+
+void genCases_f128_a_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ case 1:
+ f128Random( &genCases_f128_a );
+ break;
+ case 2:
+ f128NextQOutP1( &sequenceA, &genCases_f128_a );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ f128Random( &genCases_f128_a );
+ break;
+ case 1:
+ f128NextQOutP2( &sequenceA, &genCases_f128_a );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+void genCases_f128_ab_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ sequenceB.expNum = 0;
+ sequenceB.term1Num = 0;
+ sequenceB.term2Num = 0;
+ sequenceB.done = false;
+ subcase = 0;
+ if ( genCases_level == 1 ) {
+ genCases_total = 6 * f128NumQInP1 * f128NumQInP1;
+ f128NextQInP1( &sequenceA, &currentA );
+ } else {
+ genCases_total = 2 * f128NumQInP2 * f128NumQInP2;
+ f128NextQInP2( &sequenceA, &currentA );
+ }
+ genCases_done = false;
+
+}
+
+void genCases_f128_ab_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ f128NextQInP1( &sequenceA, &currentA );
+ }
+ f128NextQInP1( &sequenceB, &currentB );
+ case 2:
+ case 4:
+ f128Random( &genCases_f128_a );
+ f128Random( &genCases_f128_b );
+ break;
+ case 1:
+ genCases_f128_a = currentA;
+ f128Random( &genCases_f128_b );
+ break;
+ case 3:
+ f128Random( &genCases_f128_a );
+ genCases_f128_b = currentB;
+ break;
+ case 5:
+ genCases_f128_a = currentA;
+ genCases_f128_b = currentB;
+ genCases_done = sequenceA.done & sequenceB.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ f128Random( &genCases_f128_a );
+ f128Random( &genCases_f128_b );
+ break;
+ case 1:
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ f128NextQInP2( &sequenceA, &currentA );
+ }
+ genCases_f128_a = currentA;
+ f128NextQInP2( &sequenceB, &genCases_f128_b );
+ genCases_done = sequenceA.done & sequenceB.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+void genCases_f128_abc_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ sequenceB.expNum = 0;
+ sequenceB.term1Num = 0;
+ sequenceB.term2Num = 0;
+ sequenceB.done = false;
+ sequenceC.expNum = 0;
+ sequenceC.term1Num = 0;
+ sequenceC.term2Num = 0;
+ sequenceC.done = false;
+ subcase = 0;
+ if ( genCases_level == 1 ) {
+ genCases_total = 9 * f128NumQInP1 * f128NumQInP1 * f128NumQInP1;
+ f128NextQInP1( &sequenceA, &currentA );
+ f128NextQInP1( &sequenceB, &currentB );
+ } else {
+ genCases_total = 2 * f128NumQInP2 * f128NumQInP2 * f128NumQInP2;
+ f128NextQInP2( &sequenceA, &currentA );
+ f128NextQInP2( &sequenceB, &currentB );
+ }
+ genCases_done = false;
+
+}
+
+void genCases_f128_abc_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ if ( sequenceC.done ) {
+ sequenceC.done = false;
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ f128NextQInP1( &sequenceA, &currentA );
+ }
+ f128NextQInP1( &sequenceB, &currentB );
+ }
+ f128NextQInP1( &sequenceC, &currentC );
+ f128Random( &genCases_f128_a );
+ f128Random( &genCases_f128_b );
+ genCases_f128_c = currentC;
+ break;
+ case 1:
+ genCases_f128_a = currentA;
+ genCases_f128_b = currentB;
+ f128Random( &genCases_f128_c );
+ break;
+ case 2:
+ f128Random( &genCases_f128_a );
+ f128Random( &genCases_f128_b );
+ f128Random( &genCases_f128_c );
+ break;
+ case 3:
+ f128Random( &genCases_f128_a );
+ genCases_f128_b = currentB;
+ genCases_f128_c = currentC;
+ break;
+ case 4:
+ genCases_f128_a = currentA;
+ f128Random( &genCases_f128_b );
+ f128Random( &genCases_f128_c );
+ break;
+ case 5:
+ f128Random( &genCases_f128_a );
+ genCases_f128_b = currentB;
+ f128Random( &genCases_f128_c );
+ break;
+ case 6:
+ genCases_f128_a = currentA;
+ f128Random( &genCases_f128_b );
+ genCases_f128_c = currentC;
+ break;
+ case 7:
+ f128Random( &genCases_f128_a );
+ f128Random( &genCases_f128_b );
+ f128Random( &genCases_f128_c );
+ break;
+ case 8:
+ genCases_f128_a = currentA;
+ genCases_f128_b = currentB;
+ genCases_f128_c = currentC;
+ genCases_done = sequenceA.done & sequenceB.done & sequenceC.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ f128Random( &genCases_f128_a );
+ f128Random( &genCases_f128_b );
+ f128Random( &genCases_f128_c );
+ break;
+ case 1:
+ if ( sequenceC.done ) {
+ sequenceC.done = false;
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ f128NextQInP2( &sequenceA, &currentA );
+ }
+ f128NextQInP2( &sequenceB, &currentB );
+ }
+ genCases_f128_a = currentA;
+ genCases_f128_b = currentB;
+ f128NextQInP2( &sequenceC, &genCases_f128_c );
+ genCases_done = sequenceA.done & sequenceB.done & sequenceC.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genCases_f16.c b/src/libs/softfloat-3e/testfloat/source/genCases_f16.c
new file mode 100644
index 00000000..ea4c0253
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genCases_f16.c
@@ -0,0 +1,585 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "random.h"
+#include "softfloat.h"
+#include "genCases.h"
+
+#ifdef FLOAT16
+
+struct sequence {
+ int expNum, term1Num, term2Num;
+ bool done;
+};
+
+union ui16_f16 { uint16_t ui; float16_t f; };
+
+enum {
+ f16NumQIn = 22,
+ f16NumQOut = 34,
+ f16NumP1 = 4,
+ f16NumP2 = 36
+};
+static const uint16_t f16QIn[f16NumQIn] = {
+ 0x0000, /* positive, subnormal */
+ 0x0400, /* positive, -14 */
+ 0x1000, /* positive, -11 */
+ 0x3400, /* positive, -2 */
+ 0x3800, /* positive, -1 */
+ 0x3C00, /* positive, 0 */
+ 0x4000, /* positive, 1 */
+ 0x4400, /* positive, 2 */
+ 0x6800, /* positive, 11 */
+ 0x7800, /* positive, 15 */
+ 0x7C00, /* positive, infinity or NaN */
+ 0x8000, /* negative, subnormal */
+ 0x8400, /* negative, -14 */
+ 0x9000, /* negative, -11 */
+ 0xB400, /* negative, -2 */
+ 0xB800, /* negative, -1 */
+ 0xBC00, /* negative, 0 */
+ 0xC000, /* negative, 1 */
+ 0xC400, /* negative, 2 */
+ 0xE800, /* negative, 11 */
+ 0xF800, /* negative, 15 */
+ 0xFC00 /* negative, infinity or NaN */
+};
+static const uint16_t f16QOut[f16NumQOut] = {
+ 0x0000, /* positive, subnormal */
+ 0x0400, /* positive, -14 */
+ 0x0800, /* positive, -13 */
+ 0x1000, /* positive, -11 */
+ 0x2C00, /* positive, -4 */
+ 0x3000, /* positive, -3 */
+ 0x3400, /* positive, -2 */
+ 0x3800, /* positive, -1 */
+ 0x3C00, /* positive, 0 */
+ 0x4000, /* positive, 1 */
+ 0x4400, /* positive, 2 */
+ 0x4800, /* positive, 3 */
+ 0x4C00, /* positive, 4 */
+ 0x6800, /* positive, 11 */
+ 0x7400, /* positive, 14 */
+ 0x7800, /* positive, 15 */
+ 0x7C00, /* positive, infinity or NaN */
+ 0x8000, /* negative, subnormal */
+ 0x8400, /* negative, -14 */
+ 0x8800, /* negative, -13 */
+ 0x9000, /* negative, -11 */
+ 0xAC00, /* negative, -4 */
+ 0xB000, /* negative, -3 */
+ 0xB400, /* negative, -2 */
+ 0xB800, /* negative, -1 */
+ 0xBC00, /* negative, 0 */
+ 0xC000, /* negative, 1 */
+ 0xC400, /* negative, 2 */
+ 0xC800, /* negative, 3 */
+ 0xCC00, /* negative, 4 */
+ 0xE800, /* negative, 11 */
+ 0xF400, /* negative, 14 */
+ 0xF800, /* negative, 15 */
+ 0xFC00 /* negative, infinity or NaN */
+};
+static const uint16_t f16P1[f16NumP1] = {
+ 0x0000,
+ 0x0001,
+ 0x03FF,
+ 0x03FE
+};
+static const uint16_t f16P2[f16NumP2] = {
+ 0x0000,
+ 0x0001,
+ 0x0002,
+ 0x0004,
+ 0x0008,
+ 0x0010,
+ 0x0020,
+ 0x0040,
+ 0x0080,
+ 0x0100,
+ 0x0200,
+ 0x0300,
+ 0x0380,
+ 0x03C0,
+ 0x03E0,
+ 0x03F0,
+ 0x03F8,
+ 0x03FC,
+ 0x03FE,
+ 0x03FF,
+ 0x03FD,
+ 0x03FB,
+ 0x03F7,
+ 0x03EF,
+ 0x03DF,
+ 0x03BF,
+ 0x037F,
+ 0x02FF,
+ 0x01FF,
+ 0x00FF,
+ 0x007F,
+ 0x003F,
+ 0x001F,
+ 0x000F,
+ 0x0007,
+ 0x0003
+};
+
+static const uint_fast64_t f16NumQInP1 = f16NumQIn * f16NumP1;
+static const uint_fast64_t f16NumQOutP1 = f16NumQOut * f16NumP1;
+
+static float16_t f16NextQInP1( struct sequence *sequencePtr )
+{
+ int expNum, sigNum;
+ union ui16_f16 uZ;
+
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uZ.ui = f16QIn[expNum] | f16P1[sigNum];
+ ++sigNum;
+ if ( f16NumP1 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f16NumQIn <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+ return uZ.f;
+
+}
+
+static float16_t f16NextQOutP1( struct sequence *sequencePtr )
+{
+ int expNum, sigNum;
+ union ui16_f16 uZ;
+
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uZ.ui = f16QOut[expNum] | f16P1[sigNum];
+ ++sigNum;
+ if ( f16NumP1 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f16NumQOut <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+ return uZ.f;
+
+}
+
+static const uint_fast64_t f16NumQInP2 = f16NumQIn * f16NumP2;
+static const uint_fast64_t f16NumQOutP2 = f16NumQOut * f16NumP2;
+
+static float16_t f16NextQInP2( struct sequence *sequencePtr )
+{
+ int expNum, sigNum;
+ union ui16_f16 uZ;
+
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uZ.ui = f16QIn[expNum] | f16P2[sigNum];
+ ++sigNum;
+ if ( f16NumP2 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f16NumQIn <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+ return uZ.f;
+
+}
+
+static float16_t f16NextQOutP2( struct sequence *sequencePtr )
+{
+ int expNum, sigNum;
+ union ui16_f16 uZ;
+
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uZ.ui = f16QOut[expNum] | f16P2[sigNum];
+ ++sigNum;
+ if ( f16NumP2 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f16NumQOut <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+ return uZ.f;
+
+}
+
+static float16_t f16RandomQOutP3( void )
+{
+ union ui16_f16 uZ;
+
+ uZ.ui =
+ f16QOut[randomN_ui8( f16NumQOut )]
+ | ((f16P2[randomN_ui8( f16NumP2 )] + f16P2[randomN_ui8( f16NumP2 )])
+ & 0x03FF);
+ return uZ.f;
+
+}
+
+static float16_t f16RandomQOutPInf( void )
+{
+ union ui16_f16 uZ;
+
+ uZ.ui = f16QOut[randomN_ui8( f16NumQOut )] | (random_ui16() & 0x03FF);
+ return uZ.f;
+
+}
+
+enum { f16NumQInfWeightMasks = 4 };
+static const uint16_t f16QInfWeightMasks[f16NumQInfWeightMasks] =
+ { 0xFC00, 0xFC00, 0xBC00, 0x9C00 };
+static const uint16_t f16QInfWeightOffsets[f16NumQInfWeightMasks] =
+ { 0x0000, 0x0000, 0x2000, 0x3000 };
+
+static float16_t f16RandomQInfP3( void )
+{
+ int weightMaskNum;
+ union ui16_f16 uZ;
+
+ weightMaskNum = randomN_ui8( f16NumQInfWeightMasks );
+ uZ.ui =
+ ((random_ui16() & f16QInfWeightMasks[weightMaskNum])
+ + f16QInfWeightOffsets[weightMaskNum])
+ | ((f16P2[randomN_ui8( f16NumP2 )] + f16P2[randomN_ui8( f16NumP2 )])
+ & 0x03FF);
+ return uZ.f;
+
+}
+
+static float16_t f16RandomQInfPInf( void )
+{
+ int weightMaskNum;
+ union ui16_f16 uZ;
+
+ weightMaskNum = randomN_ui8( f16NumQInfWeightMasks );
+ uZ.ui =
+ (random_ui16() & (f16QInfWeightMasks[weightMaskNum] | 0x03FF))
+ + f16QInfWeightOffsets[weightMaskNum];
+ return uZ.f;
+
+}
+
+static float16_t f16Random( void )
+{
+
+ switch ( random_ui8() & 7 ) {
+ case 0:
+ case 1:
+ case 2:
+ return f16RandomQOutP3();
+ case 3:
+ return f16RandomQOutPInf();
+ case 4:
+ case 5:
+ case 6:
+ return f16RandomQInfP3();
+ case 7:
+ return f16RandomQInfPInf();
+ }
+
+}
+
+static struct sequence sequenceA, sequenceB, sequenceC;
+static float16_t currentA, currentB, currentC;
+static int subcase;
+
+float16_t genCases_f16_a, genCases_f16_b, genCases_f16_c;
+
+void genCases_f16_a_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ subcase = 0;
+ genCases_total =
+ (genCases_level == 1) ? 3 * f16NumQOutP1 : 2 * f16NumQOutP2;
+ genCases_done = false;
+
+}
+
+void genCases_f16_a_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ case 1:
+ genCases_f16_a = f16Random();
+ break;
+ case 2:
+ genCases_f16_a = f16NextQOutP1( &sequenceA );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_f16_a = f16Random();
+ break;
+ case 1:
+ genCases_f16_a = f16NextQOutP2( &sequenceA );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+void genCases_f16_ab_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ sequenceB.expNum = 0;
+ sequenceB.term1Num = 0;
+ sequenceB.term2Num = 0;
+ sequenceB.done = false;
+ subcase = 0;
+ if ( genCases_level == 1 ) {
+ genCases_total = 6 * f16NumQInP1 * f16NumQInP1;
+ currentA = f16NextQInP1( &sequenceA );
+ } else {
+ genCases_total = 2 * f16NumQInP2 * f16NumQInP2;
+ currentA = f16NextQInP2( &sequenceA );
+ }
+ genCases_done = false;
+
+}
+
+void genCases_f16_ab_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ currentA = f16NextQInP1( &sequenceA );
+ }
+ currentB = f16NextQInP1( &sequenceB );
+ case 2:
+ case 4:
+ genCases_f16_a = f16Random();
+ genCases_f16_b = f16Random();
+ break;
+ case 1:
+ genCases_f16_a = currentA;
+ genCases_f16_b = f16Random();
+ break;
+ case 3:
+ genCases_f16_a = f16Random();
+ genCases_f16_b = currentB;
+ break;
+ case 5:
+ genCases_f16_a = currentA;
+ genCases_f16_b = currentB;
+ genCases_done = sequenceA.done & sequenceB.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_f16_a = f16Random();
+ genCases_f16_b = f16Random();
+ break;
+ case 1:
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ currentA = f16NextQInP2( &sequenceA );
+ }
+ genCases_f16_a = currentA;
+ genCases_f16_b = f16NextQInP2( &sequenceB );
+ genCases_done = sequenceA.done & sequenceB.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+void genCases_f16_abc_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ sequenceB.expNum = 0;
+ sequenceB.term1Num = 0;
+ sequenceB.term2Num = 0;
+ sequenceB.done = false;
+ sequenceC.expNum = 0;
+ sequenceC.term1Num = 0;
+ sequenceC.term2Num = 0;
+ sequenceC.done = false;
+ subcase = 0;
+ if ( genCases_level == 1 ) {
+ genCases_total = 9 * f16NumQInP1 * f16NumQInP1 * f16NumQInP1;
+ currentA = f16NextQInP1( &sequenceA );
+ currentB = f16NextQInP1( &sequenceB );
+ } else {
+ genCases_total = 2 * f16NumQInP2 * f16NumQInP2 * f16NumQInP2;
+ currentA = f16NextQInP2( &sequenceA );
+ currentB = f16NextQInP2( &sequenceB );
+ }
+ genCases_done = false;
+
+}
+
+void genCases_f16_abc_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ if ( sequenceC.done ) {
+ sequenceC.done = false;
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ currentA = f16NextQInP1( &sequenceA );
+ }
+ currentB = f16NextQInP1( &sequenceB );
+ }
+ currentC = f16NextQInP1( &sequenceC );
+ genCases_f16_a = f16Random();
+ genCases_f16_b = f16Random();
+ genCases_f16_c = currentC;
+ break;
+ case 1:
+ genCases_f16_a = currentA;
+ genCases_f16_b = currentB;
+ genCases_f16_c = f16Random();
+ break;
+ case 2:
+ genCases_f16_a = f16Random();
+ genCases_f16_b = f16Random();
+ genCases_f16_c = f16Random();
+ break;
+ case 3:
+ genCases_f16_a = f16Random();
+ genCases_f16_b = currentB;
+ genCases_f16_c = currentC;
+ break;
+ case 4:
+ genCases_f16_a = currentA;
+ genCases_f16_b = f16Random();
+ genCases_f16_c = f16Random();
+ break;
+ case 5:
+ genCases_f16_a = f16Random();
+ genCases_f16_b = currentB;
+ genCases_f16_c = f16Random();
+ break;
+ case 6:
+ genCases_f16_a = currentA;
+ genCases_f16_b = f16Random();
+ genCases_f16_c = currentC;
+ break;
+ case 7:
+ genCases_f16_a = f16Random();
+ genCases_f16_b = f16Random();
+ genCases_f16_c = f16Random();
+ break;
+ case 8:
+ genCases_f16_a = currentA;
+ genCases_f16_b = currentB;
+ genCases_f16_c = currentC;
+ genCases_done = sequenceA.done & sequenceB.done & sequenceC.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_f16_a = f16Random();
+ genCases_f16_b = f16Random();
+ genCases_f16_c = f16Random();
+ break;
+ case 1:
+ if ( sequenceC.done ) {
+ sequenceC.done = false;
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ currentA = f16NextQInP2( &sequenceA );
+ }
+ currentB = f16NextQInP2( &sequenceB );
+ }
+ genCases_f16_a = currentA;
+ genCases_f16_b = currentB;
+ genCases_f16_c = f16NextQInP2( &sequenceC );
+ genCases_done = sequenceA.done & sequenceB.done & sequenceC.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genCases_f32.c b/src/libs/softfloat-3e/testfloat/source/genCases_f32.c
new file mode 100644
index 00000000..3da3a298
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genCases_f32.c
@@ -0,0 +1,664 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "random.h"
+#include "softfloat.h"
+#include "genCases.h"
+
+struct sequence {
+ int expNum, term1Num, term2Num;
+ bool done;
+};
+
+union ui32_f32 { uint32_t ui; float32_t f; };
+
+enum {
+ f32NumQIn = 22,
+ f32NumQOut = 50,
+ f32NumP1 = 4,
+ f32NumP2 = 88
+};
+static const uint32_t f32QIn[f32NumQIn] = {
+ 0x00000000, /* positive, subnormal */
+ 0x00800000, /* positive, -126 */
+ 0x33800000, /* positive, -24 */
+ 0x3E800000, /* positive, -2 */
+ 0x3F000000, /* positive, -1 */
+ 0x3F800000, /* positive, 0 */
+ 0x40000000, /* positive, 1 */
+ 0x40800000, /* positive, 2 */
+ 0x4B800000, /* positive, 24 */
+ 0x7F000000, /* positive, 127 */
+ 0x7F800000, /* positive, infinity or NaN */
+ 0x80000000, /* negative, subnormal */
+ 0x80800000, /* negative, -126 */
+ 0xB3800000, /* negative, -24 */
+ 0xBE800000, /* negative, -2 */
+ 0xBF000000, /* negative, -1 */
+ 0xBF800000, /* negative, 0 */
+ 0xC0000000, /* negative, 1 */
+ 0xC0800000, /* negative, 2 */
+ 0xCB800000, /* negative, 24 */
+ 0xFE800000, /* negative, 126 */
+ 0xFF800000 /* negative, infinity or NaN */
+};
+static const uint32_t f32QOut[f32NumQOut] = {
+ 0x00000000, /* positive, subnormal */
+ 0x00800000, /* positive, -126 */
+ 0x01000000, /* positive, -125 */
+ 0x33800000, /* positive, -24 */
+ 0x3D800000, /* positive, -4 */
+ 0x3E000000, /* positive, -3 */
+ 0x3E800000, /* positive, -2 */
+ 0x3F000000, /* positive, -1 */
+ 0x3F800000, /* positive, 0 */
+ 0x40000000, /* positive, 1 */
+ 0x40800000, /* positive, 2 */
+ 0x41000000, /* positive, 3 */
+ 0x41800000, /* positive, 4 */
+ 0x4B800000, /* positive, 24 */
+ 0x4E000000, /* positive, 29 */
+ 0x4E800000, /* positive, 30 */
+ 0x4F000000, /* positive, 31 */
+ 0x4F800000, /* positive, 32 */
+ 0x5E000000, /* positive, 61 */
+ 0x5E800000, /* positive, 62 */
+ 0x5F000000, /* positive, 63 */
+ 0x5F800000, /* positive, 64 */
+ 0x7E800000, /* positive, 126 */
+ 0x7F000000, /* positive, 127 */
+ 0x7F800000, /* positive, infinity or NaN */
+ 0x80000000, /* negative, subnormal */
+ 0x80800000, /* negative, -126 */
+ 0x81000000, /* negative, -125 */
+ 0xB3800000, /* negative, -24 */
+ 0xBD800000, /* negative, -4 */
+ 0xBE000000, /* negative, -3 */
+ 0xBE800000, /* negative, -2 */
+ 0xBF000000, /* negative, -1 */
+ 0xBF800000, /* negative, 0 */
+ 0xC0000000, /* negative, 1 */
+ 0xC0800000, /* negative, 2 */
+ 0xC1000000, /* negative, 3 */
+ 0xC1800000, /* negative, 4 */
+ 0xCB800000, /* negative, 24 */
+ 0xCE000000, /* negative, 29 */
+ 0xCE800000, /* negative, 30 */
+ 0xCF000000, /* negative, 31 */
+ 0xCF800000, /* negative, 32 */
+ 0xDE000000, /* negative, 61 */
+ 0xDE800000, /* negative, 62 */
+ 0xDF000000, /* negative, 63 */
+ 0xDF800000, /* negative, 64 */
+ 0xFE800000, /* negative, 126 */
+ 0xFF000000, /* negative, 127 */
+ 0xFF800000 /* negative, infinity or NaN */
+};
+static const uint32_t f32P1[f32NumP1] = {
+ 0x00000000,
+ 0x00000001,
+ 0x007FFFFF,
+ 0x007FFFFE
+};
+static const uint32_t f32P2[f32NumP2] = {
+ 0x00000000,
+ 0x00000001,
+ 0x00000002,
+ 0x00000004,
+ 0x00000008,
+ 0x00000010,
+ 0x00000020,
+ 0x00000040,
+ 0x00000080,
+ 0x00000100,
+ 0x00000200,
+ 0x00000400,
+ 0x00000800,
+ 0x00001000,
+ 0x00002000,
+ 0x00004000,
+ 0x00008000,
+ 0x00010000,
+ 0x00020000,
+ 0x00040000,
+ 0x00080000,
+ 0x00100000,
+ 0x00200000,
+ 0x00400000,
+ 0x00600000,
+ 0x00700000,
+ 0x00780000,
+ 0x007C0000,
+ 0x007E0000,
+ 0x007F0000,
+ 0x007F8000,
+ 0x007FC000,
+ 0x007FE000,
+ 0x007FF000,
+ 0x007FF800,
+ 0x007FFC00,
+ 0x007FFE00,
+ 0x007FFF00,
+ 0x007FFF80,
+ 0x007FFFC0,
+ 0x007FFFE0,
+ 0x007FFFF0,
+ 0x007FFFF8,
+ 0x007FFFFC,
+ 0x007FFFFE,
+ 0x007FFFFF,
+ 0x007FFFFD,
+ 0x007FFFFB,
+ 0x007FFFF7,
+ 0x007FFFEF,
+ 0x007FFFDF,
+ 0x007FFFBF,
+ 0x007FFF7F,
+ 0x007FFEFF,
+ 0x007FFDFF,
+ 0x007FFBFF,
+ 0x007FF7FF,
+ 0x007FEFFF,
+ 0x007FDFFF,
+ 0x007FBFFF,
+ 0x007F7FFF,
+ 0x007EFFFF,
+ 0x007DFFFF,
+ 0x007BFFFF,
+ 0x0077FFFF,
+ 0x006FFFFF,
+ 0x005FFFFF,
+ 0x003FFFFF,
+ 0x001FFFFF,
+ 0x000FFFFF,
+ 0x0007FFFF,
+ 0x0003FFFF,
+ 0x0001FFFF,
+ 0x0000FFFF,
+ 0x00007FFF,
+ 0x00003FFF,
+ 0x00001FFF,
+ 0x00000FFF,
+ 0x000007FF,
+ 0x000003FF,
+ 0x000001FF,
+ 0x000000FF,
+ 0x0000007F,
+ 0x0000003F,
+ 0x0000001F,
+ 0x0000000F,
+ 0x00000007,
+ 0x00000003
+};
+
+static const uint_fast64_t f32NumQInP1 = f32NumQIn * f32NumP1;
+static const uint_fast64_t f32NumQOutP1 = f32NumQOut * f32NumP1;
+
+static float32_t f32NextQInP1( struct sequence *sequencePtr )
+{
+ int expNum, sigNum;
+ union ui32_f32 uZ;
+
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uZ.ui = f32QIn[expNum] | f32P1[sigNum];
+ ++sigNum;
+ if ( f32NumP1 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f32NumQIn <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+ return uZ.f;
+
+}
+
+static float32_t f32NextQOutP1( struct sequence *sequencePtr )
+{
+ int expNum, sigNum;
+ union ui32_f32 uZ;
+
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uZ.ui = f32QOut[expNum] | f32P1[sigNum];
+ ++sigNum;
+ if ( f32NumP1 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f32NumQOut <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+ return uZ.f;
+
+}
+
+static const uint_fast64_t f32NumQInP2 = f32NumQIn * f32NumP2;
+static const uint_fast64_t f32NumQOutP2 = f32NumQOut * f32NumP2;
+
+static float32_t f32NextQInP2( struct sequence *sequencePtr )
+{
+ int expNum, sigNum;
+ union ui32_f32 uZ;
+
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uZ.ui = f32QIn[expNum] | f32P2[sigNum];
+ ++sigNum;
+ if ( f32NumP2 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f32NumQIn <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+ return uZ.f;
+
+}
+
+static float32_t f32NextQOutP2( struct sequence *sequencePtr )
+{
+ int expNum, sigNum;
+ union ui32_f32 uZ;
+
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uZ.ui = f32QOut[expNum] | f32P2[sigNum];
+ ++sigNum;
+ if ( f32NumP2 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f32NumQOut <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+ return uZ.f;
+
+}
+
+static float32_t f32RandomQOutP3( void )
+{
+ union ui32_f32 uZ;
+
+ uZ.ui =
+ f32QOut[randomN_ui8( f32NumQOut )]
+ | ((f32P2[randomN_ui8( f32NumP2 )] + f32P2[randomN_ui8( f32NumP2 )])
+ & 0x007FFFFF);
+ return uZ.f;
+
+}
+
+static float32_t f32RandomQOutPInf( void )
+{
+ union ui32_f32 uZ;
+
+ uZ.ui = f32QOut[randomN_ui8( f32NumQOut )] | (random_ui32() & 0x007FFFFF);
+ return uZ.f;
+
+}
+
+enum { f32NumQInfWeightMasks = 7 };
+static const uint32_t f32QInfWeightMasks[f32NumQInfWeightMasks] = {
+ 0xFF800000,
+ 0xFF800000,
+ 0xBF800000,
+ 0x9F800000,
+ 0x8F800000,
+ 0x87800000,
+ 0x83800000
+};
+static const uint32_t f32QInfWeightOffsets[f32NumQInfWeightMasks] = {
+ 0x00000000,
+ 0x00000000,
+ 0x20000000,
+ 0x30000000,
+ 0x38000000,
+ 0x3C000000,
+ 0x3E000000
+};
+
+static float32_t f32RandomQInfP3( void )
+{
+ int weightMaskNum;
+ union ui32_f32 uZ;
+
+ weightMaskNum = randomN_ui8( f32NumQInfWeightMasks );
+ uZ.ui =
+ (((uint_fast32_t) random_ui16()<<16
+ & f32QInfWeightMasks[weightMaskNum])
+ + f32QInfWeightOffsets[weightMaskNum])
+ | ((f32P2[randomN_ui8( f32NumP2 )] + f32P2[randomN_ui8( f32NumP2 )])
+ & 0x007FFFFF);
+ return uZ.f;
+
+}
+
+static float32_t f32RandomQInfPInf( void )
+{
+ int weightMaskNum;
+ union ui32_f32 uZ;
+
+ weightMaskNum = randomN_ui8( f32NumQInfWeightMasks );
+ uZ.ui =
+ (random_ui32() & (f32QInfWeightMasks[weightMaskNum] | 0x007FFFFF))
+ + f32QInfWeightOffsets[weightMaskNum];
+ return uZ.f;
+
+}
+
+static float32_t f32Random( void )
+{
+
+ switch ( random_ui8() & 7 ) {
+ case 0:
+ case 1:
+ case 2:
+ return f32RandomQOutP3();
+ case 3:
+ return f32RandomQOutPInf();
+ case 4:
+ case 5:
+ case 6:
+ return f32RandomQInfP3();
+ case 7:
+ return f32RandomQInfPInf();
+ }
+
+}
+
+static struct sequence sequenceA, sequenceB, sequenceC;
+static float32_t currentA, currentB, currentC;
+static int subcase;
+
+float32_t genCases_f32_a, genCases_f32_b, genCases_f32_c;
+
+void genCases_f32_a_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ subcase = 0;
+ genCases_total =
+ (genCases_level == 1) ? 3 * f32NumQOutP1 : 2 * f32NumQOutP2;
+ genCases_done = false;
+
+}
+
+void genCases_f32_a_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ case 1:
+ genCases_f32_a = f32Random();
+ break;
+ case 2:
+ genCases_f32_a = f32NextQOutP1( &sequenceA );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_f32_a = f32Random();
+ break;
+ case 1:
+ genCases_f32_a = f32NextQOutP2( &sequenceA );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+void genCases_f32_ab_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ sequenceB.expNum = 0;
+ sequenceB.term1Num = 0;
+ sequenceB.term2Num = 0;
+ sequenceB.done = false;
+ subcase = 0;
+ if ( genCases_level == 1 ) {
+ genCases_total = 6 * f32NumQInP1 * f32NumQInP1;
+ currentA = f32NextQInP1( &sequenceA );
+ } else {
+ genCases_total = 2 * f32NumQInP2 * f32NumQInP2;
+ currentA = f32NextQInP2( &sequenceA );
+ }
+ genCases_done = false;
+
+}
+
+void genCases_f32_ab_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ currentA = f32NextQInP1( &sequenceA );
+ }
+ currentB = f32NextQInP1( &sequenceB );
+ case 2:
+ case 4:
+ genCases_f32_a = f32Random();
+ genCases_f32_b = f32Random();
+ break;
+ case 1:
+ genCases_f32_a = currentA;
+ genCases_f32_b = f32Random();
+ break;
+ case 3:
+ genCases_f32_a = f32Random();
+ genCases_f32_b = currentB;
+ break;
+ case 5:
+ genCases_f32_a = currentA;
+ genCases_f32_b = currentB;
+ genCases_done = sequenceA.done & sequenceB.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_f32_a = f32Random();
+ genCases_f32_b = f32Random();
+ break;
+ case 1:
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ currentA = f32NextQInP2( &sequenceA );
+ }
+ genCases_f32_a = currentA;
+ genCases_f32_b = f32NextQInP2( &sequenceB );
+ genCases_done = sequenceA.done & sequenceB.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+void genCases_f32_abc_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ sequenceB.expNum = 0;
+ sequenceB.term1Num = 0;
+ sequenceB.term2Num = 0;
+ sequenceB.done = false;
+ sequenceC.expNum = 0;
+ sequenceC.term1Num = 0;
+ sequenceC.term2Num = 0;
+ sequenceC.done = false;
+ subcase = 0;
+ if ( genCases_level == 1 ) {
+ genCases_total = 9 * f32NumQInP1 * f32NumQInP1 * f32NumQInP1;
+ currentA = f32NextQInP1( &sequenceA );
+ currentB = f32NextQInP1( &sequenceB );
+ } else {
+ genCases_total = 2 * f32NumQInP2 * f32NumQInP2 * f32NumQInP2;
+ currentA = f32NextQInP2( &sequenceA );
+ currentB = f32NextQInP2( &sequenceB );
+ }
+ genCases_done = false;
+
+}
+
+void genCases_f32_abc_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ if ( sequenceC.done ) {
+ sequenceC.done = false;
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ currentA = f32NextQInP1( &sequenceA );
+ }
+ currentB = f32NextQInP1( &sequenceB );
+ }
+ currentC = f32NextQInP1( &sequenceC );
+ genCases_f32_a = f32Random();
+ genCases_f32_b = f32Random();
+ genCases_f32_c = currentC;
+ break;
+ case 1:
+ genCases_f32_a = currentA;
+ genCases_f32_b = currentB;
+ genCases_f32_c = f32Random();
+ break;
+ case 2:
+ genCases_f32_a = f32Random();
+ genCases_f32_b = f32Random();
+ genCases_f32_c = f32Random();
+ break;
+ case 3:
+ genCases_f32_a = f32Random();
+ genCases_f32_b = currentB;
+ genCases_f32_c = currentC;
+ break;
+ case 4:
+ genCases_f32_a = currentA;
+ genCases_f32_b = f32Random();
+ genCases_f32_c = f32Random();
+ break;
+ case 5:
+ genCases_f32_a = f32Random();
+ genCases_f32_b = currentB;
+ genCases_f32_c = f32Random();
+ break;
+ case 6:
+ genCases_f32_a = currentA;
+ genCases_f32_b = f32Random();
+ genCases_f32_c = currentC;
+ break;
+ case 7:
+ genCases_f32_a = f32Random();
+ genCases_f32_b = f32Random();
+ genCases_f32_c = f32Random();
+ break;
+ case 8:
+ genCases_f32_a = currentA;
+ genCases_f32_b = currentB;
+ genCases_f32_c = currentC;
+ genCases_done = sequenceA.done & sequenceB.done & sequenceC.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_f32_a = f32Random();
+ genCases_f32_b = f32Random();
+ genCases_f32_c = f32Random();
+ break;
+ case 1:
+ if ( sequenceC.done ) {
+ sequenceC.done = false;
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ currentA = f32NextQInP2( &sequenceA );
+ }
+ currentB = f32NextQInP2( &sequenceB );
+ }
+ genCases_f32_a = currentA;
+ genCases_f32_b = currentB;
+ genCases_f32_c = f32NextQInP2( &sequenceC );
+ genCases_done = sequenceA.done & sequenceB.done & sequenceC.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genCases_f64.c b/src/libs/softfloat-3e/testfloat/source/genCases_f64.c
new file mode 100644
index 00000000..5229e894
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genCases_f64.c
@@ -0,0 +1,808 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "random.h"
+#include "softfloat.h"
+#include "genCases.h"
+
+#ifdef FLOAT64
+
+struct sequence {
+ int expNum, term1Num, term2Num;
+ bool done;
+};
+
+union ui64_f64 { uint64_t ui; float64_t f; };
+
+enum {
+ f64NumQIn = 22,
+ f64NumQOut = 64,
+ f64NumP1 = 4,
+ f64NumP2 = 204
+};
+static const uint64_t f64QIn[f64NumQIn] = {
+ UINT64_C( 0x0000000000000000 ), /* positive, subnormal */
+ UINT64_C( 0x0010000000000000 ), /* positive, -1022 */
+ UINT64_C( 0x3CA0000000000000 ), /* positive, -53 */
+ UINT64_C( 0x3FD0000000000000 ), /* positive, -2 */
+ UINT64_C( 0x3FE0000000000000 ), /* positive, -1 */
+ UINT64_C( 0x3FF0000000000000 ), /* positive, 0 */
+ UINT64_C( 0x4000000000000000 ), /* positive, 1 */
+ UINT64_C( 0x4010000000000000 ), /* positive, 2 */
+ UINT64_C( 0x4340000000000000 ), /* positive, 53 */
+ UINT64_C( 0x7FE0000000000000 ), /* positive, 1023 */
+ UINT64_C( 0x7FF0000000000000 ), /* positive, infinity or NaN */
+ UINT64_C( 0x8000000000000000 ), /* negative, subnormal */
+ UINT64_C( 0x8010000000000000 ), /* negative, -1022 */
+ UINT64_C( 0xBCA0000000000000 ), /* negative, -53 */
+ UINT64_C( 0xBFD0000000000000 ), /* negative, -2 */
+ UINT64_C( 0xBFE0000000000000 ), /* negative, -1 */
+ UINT64_C( 0xBFF0000000000000 ), /* negative, 0 */
+ UINT64_C( 0xC000000000000000 ), /* negative, 1 */
+ UINT64_C( 0xC010000000000000 ), /* negative, 2 */
+ UINT64_C( 0xC340000000000000 ), /* negative, 53 */
+ UINT64_C( 0xFFE0000000000000 ), /* negative, 1023 */
+ UINT64_C( 0xFFF0000000000000 ) /* negative, infinity or NaN */
+};
+static const uint64_t f64QOut[f64NumQOut] = {
+ UINT64_C( 0x0000000000000000 ), /* positive, subnormal */
+ UINT64_C( 0x0010000000000000 ), /* positive, -1022 */
+ UINT64_C( 0x0020000000000000 ), /* positive, -1021 */
+ UINT64_C( 0x37E0000000000000 ), /* positive, -129 */
+ UINT64_C( 0x37F0000000000000 ), /* positive, -128 */
+ UINT64_C( 0x3800000000000000 ), /* positive, -127 */
+ UINT64_C( 0x3810000000000000 ), /* positive, -126 */
+ UINT64_C( 0x3CA0000000000000 ), /* positive, -53 */
+ UINT64_C( 0x3FB0000000000000 ), /* positive, -4 */
+ UINT64_C( 0x3FC0000000000000 ), /* positive, -3 */
+ UINT64_C( 0x3FD0000000000000 ), /* positive, -2 */
+ UINT64_C( 0x3FE0000000000000 ), /* positive, -1 */
+ UINT64_C( 0x3FF0000000000000 ), /* positive, 0 */
+ UINT64_C( 0x4000000000000000 ), /* positive, 1 */
+ UINT64_C( 0x4010000000000000 ), /* positive, 2 */
+ UINT64_C( 0x4020000000000000 ), /* positive, 3 */
+ UINT64_C( 0x4030000000000000 ), /* positive, 4 */
+ UINT64_C( 0x41C0000000000000 ), /* positive, 29 */
+ UINT64_C( 0x41D0000000000000 ), /* positive, 30 */
+ UINT64_C( 0x41E0000000000000 ), /* positive, 31 */
+ UINT64_C( 0x41F0000000000000 ), /* positive, 32 */
+ UINT64_C( 0x4340000000000000 ), /* positive, 53 */
+ UINT64_C( 0x43C0000000000000 ), /* positive, 61 */
+ UINT64_C( 0x43D0000000000000 ), /* positive, 62 */
+ UINT64_C( 0x43E0000000000000 ), /* positive, 63 */
+ UINT64_C( 0x43F0000000000000 ), /* positive, 64 */
+ UINT64_C( 0x47E0000000000000 ), /* positive, 127 */
+ UINT64_C( 0x47F0000000000000 ), /* positive, 128 */
+ UINT64_C( 0x4800000000000000 ), /* positive, 129 */
+ UINT64_C( 0x7FD0000000000000 ), /* positive, 1022 */
+ UINT64_C( 0x7FE0000000000000 ), /* positive, 1023 */
+ UINT64_C( 0x7FF0000000000000 ), /* positive, infinity or NaN */
+ UINT64_C( 0x8000000000000000 ), /* negative, subnormal */
+ UINT64_C( 0x8010000000000000 ), /* negative, -1022 */
+ UINT64_C( 0x8020000000000000 ), /* negative, -1021 */
+ UINT64_C( 0xB7E0000000000000 ), /* negative, -129 */
+ UINT64_C( 0xB7F0000000000000 ), /* negative, -128 */
+ UINT64_C( 0xB800000000000000 ), /* negative, -127 */
+ UINT64_C( 0xB810000000000000 ), /* negative, -126 */
+ UINT64_C( 0xBCA0000000000000 ), /* negative, -53 */
+ UINT64_C( 0xBFB0000000000000 ), /* negative, -4 */
+ UINT64_C( 0xBFC0000000000000 ), /* negative, -3 */
+ UINT64_C( 0xBFD0000000000000 ), /* negative, -2 */
+ UINT64_C( 0xBFE0000000000000 ), /* negative, -1 */
+ UINT64_C( 0xBFF0000000000000 ), /* negative, 0 */
+ UINT64_C( 0xC000000000000000 ), /* negative, 1 */
+ UINT64_C( 0xC010000000000000 ), /* negative, 2 */
+ UINT64_C( 0xC020000000000000 ), /* negative, 3 */
+ UINT64_C( 0xC030000000000000 ), /* negative, 4 */
+ UINT64_C( 0xC1C0000000000000 ), /* negative, 29 */
+ UINT64_C( 0xC1D0000000000000 ), /* negative, 30 */
+ UINT64_C( 0xC1E0000000000000 ), /* negative, 31 */
+ UINT64_C( 0xC1F0000000000000 ), /* negative, 32 */
+ UINT64_C( 0xC340000000000000 ), /* negative, 53 */
+ UINT64_C( 0xC3C0000000000000 ), /* negative, 61 */
+ UINT64_C( 0xC3D0000000000000 ), /* negative, 62 */
+ UINT64_C( 0xC3E0000000000000 ), /* negative, 63 */
+ UINT64_C( 0xC3F0000000000000 ), /* negative, 64 */
+ UINT64_C( 0xC7E0000000000000 ), /* negative, 127 */
+ UINT64_C( 0xC7F0000000000000 ), /* negative, 128 */
+ UINT64_C( 0xC800000000000000 ), /* negative, 129 */
+ UINT64_C( 0xFFD0000000000000 ), /* negative, 1022 */
+ UINT64_C( 0xFFE0000000000000 ), /* negative, 1023 */
+ UINT64_C( 0xFFF0000000000000 ) /* negative, infinity or NaN */
+};
+static const uint64_t f64P1[f64NumP1] = {
+ UINT64_C( 0x0000000000000000 ),
+ UINT64_C( 0x0000000000000001 ),
+ UINT64_C( 0x000FFFFFFFFFFFFF ),
+ UINT64_C( 0x000FFFFFFFFFFFFE )
+};
+static const uint64_t f64P2[f64NumP2] = {
+ UINT64_C( 0x0000000000000000 ),
+ UINT64_C( 0x0000000000000001 ),
+ UINT64_C( 0x0000000000000002 ),
+ UINT64_C( 0x0000000000000004 ),
+ UINT64_C( 0x0000000000000008 ),
+ UINT64_C( 0x0000000000000010 ),
+ UINT64_C( 0x0000000000000020 ),
+ UINT64_C( 0x0000000000000040 ),
+ UINT64_C( 0x0000000000000080 ),
+ UINT64_C( 0x0000000000000100 ),
+ UINT64_C( 0x0000000000000200 ),
+ UINT64_C( 0x0000000000000400 ),
+ UINT64_C( 0x0000000000000800 ),
+ UINT64_C( 0x0000000000001000 ),
+ UINT64_C( 0x0000000000002000 ),
+ UINT64_C( 0x0000000000004000 ),
+ UINT64_C( 0x0000000000008000 ),
+ UINT64_C( 0x0000000000010000 ),
+ UINT64_C( 0x0000000000020000 ),
+ UINT64_C( 0x0000000000040000 ),
+ UINT64_C( 0x0000000000080000 ),
+ UINT64_C( 0x0000000000100000 ),
+ UINT64_C( 0x0000000000200000 ),
+ UINT64_C( 0x0000000000400000 ),
+ UINT64_C( 0x0000000000800000 ),
+ UINT64_C( 0x0000000001000000 ),
+ UINT64_C( 0x0000000002000000 ),
+ UINT64_C( 0x0000000004000000 ),
+ UINT64_C( 0x0000000008000000 ),
+ UINT64_C( 0x0000000010000000 ),
+ UINT64_C( 0x0000000020000000 ),
+ UINT64_C( 0x0000000040000000 ),
+ UINT64_C( 0x0000000080000000 ),
+ UINT64_C( 0x0000000100000000 ),
+ UINT64_C( 0x0000000200000000 ),
+ UINT64_C( 0x0000000400000000 ),
+ UINT64_C( 0x0000000800000000 ),
+ UINT64_C( 0x0000001000000000 ),
+ UINT64_C( 0x0000002000000000 ),
+ UINT64_C( 0x0000004000000000 ),
+ UINT64_C( 0x0000008000000000 ),
+ UINT64_C( 0x0000010000000000 ),
+ UINT64_C( 0x0000020000000000 ),
+ UINT64_C( 0x0000040000000000 ),
+ UINT64_C( 0x0000080000000000 ),
+ UINT64_C( 0x0000100000000000 ),
+ UINT64_C( 0x0000200000000000 ),
+ UINT64_C( 0x0000400000000000 ),
+ UINT64_C( 0x0000800000000000 ),
+ UINT64_C( 0x0001000000000000 ),
+ UINT64_C( 0x0002000000000000 ),
+ UINT64_C( 0x0004000000000000 ),
+ UINT64_C( 0x0008000000000000 ),
+ UINT64_C( 0x000C000000000000 ),
+ UINT64_C( 0x000E000000000000 ),
+ UINT64_C( 0x000F000000000000 ),
+ UINT64_C( 0x000F800000000000 ),
+ UINT64_C( 0x000FC00000000000 ),
+ UINT64_C( 0x000FE00000000000 ),
+ UINT64_C( 0x000FF00000000000 ),
+ UINT64_C( 0x000FF80000000000 ),
+ UINT64_C( 0x000FFC0000000000 ),
+ UINT64_C( 0x000FFE0000000000 ),
+ UINT64_C( 0x000FFF0000000000 ),
+ UINT64_C( 0x000FFF8000000000 ),
+ UINT64_C( 0x000FFFC000000000 ),
+ UINT64_C( 0x000FFFE000000000 ),
+ UINT64_C( 0x000FFFF000000000 ),
+ UINT64_C( 0x000FFFF800000000 ),
+ UINT64_C( 0x000FFFFC00000000 ),
+ UINT64_C( 0x000FFFFE00000000 ),
+ UINT64_C( 0x000FFFFF00000000 ),
+ UINT64_C( 0x000FFFFF80000000 ),
+ UINT64_C( 0x000FFFFFC0000000 ),
+ UINT64_C( 0x000FFFFFE0000000 ),
+ UINT64_C( 0x000FFFFFF0000000 ),
+ UINT64_C( 0x000FFFFFF8000000 ),
+ UINT64_C( 0x000FFFFFFC000000 ),
+ UINT64_C( 0x000FFFFFFE000000 ),
+ UINT64_C( 0x000FFFFFFF000000 ),
+ UINT64_C( 0x000FFFFFFF800000 ),
+ UINT64_C( 0x000FFFFFFFC00000 ),
+ UINT64_C( 0x000FFFFFFFE00000 ),
+ UINT64_C( 0x000FFFFFFFF00000 ),
+ UINT64_C( 0x000FFFFFFFF80000 ),
+ UINT64_C( 0x000FFFFFFFFC0000 ),
+ UINT64_C( 0x000FFFFFFFFE0000 ),
+ UINT64_C( 0x000FFFFFFFFF0000 ),
+ UINT64_C( 0x000FFFFFFFFF8000 ),
+ UINT64_C( 0x000FFFFFFFFFC000 ),
+ UINT64_C( 0x000FFFFFFFFFE000 ),
+ UINT64_C( 0x000FFFFFFFFFF000 ),
+ UINT64_C( 0x000FFFFFFFFFF800 ),
+ UINT64_C( 0x000FFFFFFFFFFC00 ),
+ UINT64_C( 0x000FFFFFFFFFFE00 ),
+ UINT64_C( 0x000FFFFFFFFFFF00 ),
+ UINT64_C( 0x000FFFFFFFFFFF80 ),
+ UINT64_C( 0x000FFFFFFFFFFFC0 ),
+ UINT64_C( 0x000FFFFFFFFFFFE0 ),
+ UINT64_C( 0x000FFFFFFFFFFFF0 ),
+ UINT64_C( 0x000FFFFFFFFFFFF8 ),
+ UINT64_C( 0x000FFFFFFFFFFFFC ),
+ UINT64_C( 0x000FFFFFFFFFFFFE ),
+ UINT64_C( 0x000FFFFFFFFFFFFF ),
+ UINT64_C( 0x000FFFFFFFFFFFFD ),
+ UINT64_C( 0x000FFFFFFFFFFFFB ),
+ UINT64_C( 0x000FFFFFFFFFFFF7 ),
+ UINT64_C( 0x000FFFFFFFFFFFEF ),
+ UINT64_C( 0x000FFFFFFFFFFFDF ),
+ UINT64_C( 0x000FFFFFFFFFFFBF ),
+ UINT64_C( 0x000FFFFFFFFFFF7F ),
+ UINT64_C( 0x000FFFFFFFFFFEFF ),
+ UINT64_C( 0x000FFFFFFFFFFDFF ),
+ UINT64_C( 0x000FFFFFFFFFFBFF ),
+ UINT64_C( 0x000FFFFFFFFFF7FF ),
+ UINT64_C( 0x000FFFFFFFFFEFFF ),
+ UINT64_C( 0x000FFFFFFFFFDFFF ),
+ UINT64_C( 0x000FFFFFFFFFBFFF ),
+ UINT64_C( 0x000FFFFFFFFF7FFF ),
+ UINT64_C( 0x000FFFFFFFFEFFFF ),
+ UINT64_C( 0x000FFFFFFFFDFFFF ),
+ UINT64_C( 0x000FFFFFFFFBFFFF ),
+ UINT64_C( 0x000FFFFFFFF7FFFF ),
+ UINT64_C( 0x000FFFFFFFEFFFFF ),
+ UINT64_C( 0x000FFFFFFFDFFFFF ),
+ UINT64_C( 0x000FFFFFFFBFFFFF ),
+ UINT64_C( 0x000FFFFFFF7FFFFF ),
+ UINT64_C( 0x000FFFFFFEFFFFFF ),
+ UINT64_C( 0x000FFFFFFDFFFFFF ),
+ UINT64_C( 0x000FFFFFFBFFFFFF ),
+ UINT64_C( 0x000FFFFFF7FFFFFF ),
+ UINT64_C( 0x000FFFFFEFFFFFFF ),
+ UINT64_C( 0x000FFFFFDFFFFFFF ),
+ UINT64_C( 0x000FFFFFBFFFFFFF ),
+ UINT64_C( 0x000FFFFF7FFFFFFF ),
+ UINT64_C( 0x000FFFFEFFFFFFFF ),
+ UINT64_C( 0x000FFFFDFFFFFFFF ),
+ UINT64_C( 0x000FFFFBFFFFFFFF ),
+ UINT64_C( 0x000FFFF7FFFFFFFF ),
+ UINT64_C( 0x000FFFEFFFFFFFFF ),
+ UINT64_C( 0x000FFFDFFFFFFFFF ),
+ UINT64_C( 0x000FFFBFFFFFFFFF ),
+ UINT64_C( 0x000FFF7FFFFFFFFF ),
+ UINT64_C( 0x000FFEFFFFFFFFFF ),
+ UINT64_C( 0x000FFDFFFFFFFFFF ),
+ UINT64_C( 0x000FFBFFFFFFFFFF ),
+ UINT64_C( 0x000FF7FFFFFFFFFF ),
+ UINT64_C( 0x000FEFFFFFFFFFFF ),
+ UINT64_C( 0x000FDFFFFFFFFFFF ),
+ UINT64_C( 0x000FBFFFFFFFFFFF ),
+ UINT64_C( 0x000F7FFFFFFFFFFF ),
+ UINT64_C( 0x000EFFFFFFFFFFFF ),
+ UINT64_C( 0x000DFFFFFFFFFFFF ),
+ UINT64_C( 0x000BFFFFFFFFFFFF ),
+ UINT64_C( 0x0007FFFFFFFFFFFF ),
+ UINT64_C( 0x0003FFFFFFFFFFFF ),
+ UINT64_C( 0x0001FFFFFFFFFFFF ),
+ UINT64_C( 0x0000FFFFFFFFFFFF ),
+ UINT64_C( 0x00007FFFFFFFFFFF ),
+ UINT64_C( 0x00003FFFFFFFFFFF ),
+ UINT64_C( 0x00001FFFFFFFFFFF ),
+ UINT64_C( 0x00000FFFFFFFFFFF ),
+ UINT64_C( 0x000007FFFFFFFFFF ),
+ UINT64_C( 0x000003FFFFFFFFFF ),
+ UINT64_C( 0x000001FFFFFFFFFF ),
+ UINT64_C( 0x000000FFFFFFFFFF ),
+ UINT64_C( 0x0000007FFFFFFFFF ),
+ UINT64_C( 0x0000003FFFFFFFFF ),
+ UINT64_C( 0x0000001FFFFFFFFF ),
+ UINT64_C( 0x0000000FFFFFFFFF ),
+ UINT64_C( 0x00000007FFFFFFFF ),
+ UINT64_C( 0x00000003FFFFFFFF ),
+ UINT64_C( 0x00000001FFFFFFFF ),
+ UINT64_C( 0x00000000FFFFFFFF ),
+ UINT64_C( 0x000000007FFFFFFF ),
+ UINT64_C( 0x000000003FFFFFFF ),
+ UINT64_C( 0x000000001FFFFFFF ),
+ UINT64_C( 0x000000000FFFFFFF ),
+ UINT64_C( 0x0000000007FFFFFF ),
+ UINT64_C( 0x0000000003FFFFFF ),
+ UINT64_C( 0x0000000001FFFFFF ),
+ UINT64_C( 0x0000000000FFFFFF ),
+ UINT64_C( 0x00000000007FFFFF ),
+ UINT64_C( 0x00000000003FFFFF ),
+ UINT64_C( 0x00000000001FFFFF ),
+ UINT64_C( 0x00000000000FFFFF ),
+ UINT64_C( 0x000000000007FFFF ),
+ UINT64_C( 0x000000000003FFFF ),
+ UINT64_C( 0x000000000001FFFF ),
+ UINT64_C( 0x000000000000FFFF ),
+ UINT64_C( 0x0000000000007FFF ),
+ UINT64_C( 0x0000000000003FFF ),
+ UINT64_C( 0x0000000000001FFF ),
+ UINT64_C( 0x0000000000000FFF ),
+ UINT64_C( 0x00000000000007FF ),
+ UINT64_C( 0x00000000000003FF ),
+ UINT64_C( 0x00000000000001FF ),
+ UINT64_C( 0x00000000000000FF ),
+ UINT64_C( 0x000000000000007F ),
+ UINT64_C( 0x000000000000003F ),
+ UINT64_C( 0x000000000000001F ),
+ UINT64_C( 0x000000000000000F ),
+ UINT64_C( 0x0000000000000007 ),
+ UINT64_C( 0x0000000000000003 )
+};
+
+static const uint_fast64_t f64NumQInP1 = f64NumQIn * f64NumP1;
+static const uint_fast64_t f64NumQOutP1 = f64NumQOut * f64NumP1;
+
+static float64_t f64NextQInP1( struct sequence *sequencePtr )
+{
+ int expNum, sigNum;
+ union ui64_f64 uZ;
+
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uZ.ui = f64QIn[expNum] | f64P1[sigNum];
+ ++sigNum;
+ if ( f64NumP1 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f64NumQIn <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+ return uZ.f;
+
+}
+
+static float64_t f64NextQOutP1( struct sequence *sequencePtr )
+{
+ int expNum, sigNum;
+ union ui64_f64 uZ;
+
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uZ.ui = f64QOut[expNum] | f64P1[sigNum];
+ ++sigNum;
+ if ( f64NumP1 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f64NumQOut <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+ return uZ.f;
+
+}
+
+static const uint_fast64_t f64NumQInP2 = f64NumQIn * f64NumP2;
+static const uint_fast64_t f64NumQOutP2 = f64NumQOut * f64NumP2;
+
+static float64_t f64NextQInP2( struct sequence *sequencePtr )
+{
+ int expNum, sigNum;
+ union ui64_f64 uZ;
+
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uZ.ui = f64QIn[expNum] | f64P2[sigNum];
+ ++sigNum;
+ if ( f64NumP2 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f64NumQIn <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+ return uZ.f;
+
+}
+
+static float64_t f64NextQOutP2( struct sequence *sequencePtr )
+{
+ int expNum, sigNum;
+ union ui64_f64 uZ;
+
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uZ.ui = f64QOut[expNum] | f64P2[sigNum];
+ ++sigNum;
+ if ( f64NumP2 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f64NumQOut <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+ return uZ.f;
+
+}
+
+static float64_t f64RandomQOutP3( void )
+{
+ union ui64_f64 uZ;
+
+ uZ.ui =
+ f64QOut[randomN_ui8( f64NumQOut )]
+ | ((f64P2[randomN_ui8( f64NumP2 )] + f64P2[randomN_ui8( f64NumP2 )])
+ & UINT64_C( 0x000FFFFFFFFFFFFF ));
+ return uZ.f;
+
+}
+
+static float64_t f64RandomQOutPInf( void )
+{
+ union ui64_f64 uZ;
+
+ uZ.ui =
+ f64QOut[randomN_ui8( f64NumQOut )]
+ | (random_ui64() & UINT64_C( 0x000FFFFFFFFFFFFF ));
+ return uZ.f;
+
+}
+
+enum { f64NumQInfWeightMasks = 10 };
+static const uint64_t f64QInfWeightMasks[f64NumQInfWeightMasks] = {
+ UINT64_C( 0xFFF0000000000000 ),
+ UINT64_C( 0xFFF0000000000000 ),
+ UINT64_C( 0xBFF0000000000000 ),
+ UINT64_C( 0x9FF0000000000000 ),
+ UINT64_C( 0x8FF0000000000000 ),
+ UINT64_C( 0x87F0000000000000 ),
+ UINT64_C( 0x83F0000000000000 ),
+ UINT64_C( 0x81F0000000000000 ),
+ UINT64_C( 0x80F0000000000000 ),
+ UINT64_C( 0x8070000000000000 )
+};
+static const uint64_t f64QInfWeightOffsets[f64NumQInfWeightMasks] = {
+ UINT64_C( 0x0000000000000000 ),
+ UINT64_C( 0x0000000000000000 ),
+ UINT64_C( 0x2000000000000000 ),
+ UINT64_C( 0x3000000000000000 ),
+ UINT64_C( 0x3800000000000000 ),
+ UINT64_C( 0x3C00000000000000 ),
+ UINT64_C( 0x3E00000000000000 ),
+ UINT64_C( 0x3F00000000000000 ),
+ UINT64_C( 0x3F80000000000000 ),
+ UINT64_C( 0x3FC0000000000000 )
+};
+
+static float64_t f64RandomQInfP3( void )
+{
+ int weightMaskNum;
+ union ui64_f64 uZ;
+
+ weightMaskNum = randomN_ui8( f64NumQInfWeightMasks );
+ uZ.ui =
+ (((uint_fast64_t) random_ui16()<<48
+ & f64QInfWeightMasks[weightMaskNum])
+ + f64QInfWeightOffsets[weightMaskNum])
+ | ((f64P2[randomN_ui8( f64NumP2 )] + f64P2[randomN_ui8( f64NumP2 )])
+ & UINT64_C( 0x000FFFFFFFFFFFFF ));
+ return uZ.f;
+
+}
+
+static float64_t f64RandomQInfPInf( void )
+{
+ int weightMaskNum;
+ union ui64_f64 uZ;
+
+ weightMaskNum = randomN_ui8( f64NumQInfWeightMasks );
+ uZ.ui =
+ (random_ui64()
+ & (f64QInfWeightMasks[weightMaskNum]
+ | UINT64_C( 0x000FFFFFFFFFFFFF )))
+ + f64QInfWeightOffsets[weightMaskNum];
+ return uZ.f;
+
+}
+
+static float64_t f64Random( void )
+{
+
+ switch ( random_ui8() & 7 ) {
+ case 0:
+ case 1:
+ case 2:
+ return f64RandomQOutP3();
+ case 3:
+ return f64RandomQOutPInf();
+ case 4:
+ case 5:
+ case 6:
+ return f64RandomQInfP3();
+ case 7:
+ return f64RandomQInfPInf();
+ }
+
+}
+
+static struct sequence sequenceA, sequenceB, sequenceC;
+static float64_t currentA, currentB, currentC;
+static int subcase;
+
+float64_t genCases_f64_a, genCases_f64_b, genCases_f64_c;
+
+void genCases_f64_a_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ subcase = 0;
+ genCases_total =
+ (genCases_level == 1) ? 3 * f64NumQOutP1 : 2 * f64NumQOutP2;
+ genCases_done = false;
+
+}
+
+void genCases_f64_a_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ case 1:
+ genCases_f64_a = f64Random();
+ break;
+ case 2:
+ genCases_f64_a = f64NextQOutP1( &sequenceA );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_f64_a = f64Random();
+ break;
+ case 1:
+ genCases_f64_a = f64NextQOutP2( &sequenceA );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+void genCases_f64_ab_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ sequenceB.expNum = 0;
+ sequenceB.term1Num = 0;
+ sequenceB.term2Num = 0;
+ sequenceB.done = false;
+ subcase = 0;
+ if ( genCases_level == 1 ) {
+ genCases_total = 6 * f64NumQInP1 * f64NumQInP1;
+ currentA = f64NextQInP1( &sequenceA );
+ } else {
+ genCases_total = 2 * f64NumQInP2 * f64NumQInP2;
+ currentA = f64NextQInP2( &sequenceA );
+ }
+ genCases_done = false;
+
+}
+
+void genCases_f64_ab_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ currentA = f64NextQInP1( &sequenceA );
+ }
+ currentB = f64NextQInP1( &sequenceB );
+ case 2:
+ case 4:
+ genCases_f64_a = f64Random();
+ genCases_f64_b = f64Random();
+ break;
+ case 1:
+ genCases_f64_a = currentA;
+ genCases_f64_b = f64Random();
+ break;
+ case 3:
+ genCases_f64_a = f64Random();
+ genCases_f64_b = currentB;
+ break;
+ case 5:
+ genCases_f64_a = currentA;
+ genCases_f64_b = currentB;
+ genCases_done = sequenceA.done & sequenceB.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_f64_a = f64Random();
+ genCases_f64_b = f64Random();
+ break;
+ case 1:
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ currentA = f64NextQInP2( &sequenceA );
+ }
+ genCases_f64_a = currentA;
+ genCases_f64_b = f64NextQInP2( &sequenceB );
+ genCases_done = sequenceA.done & sequenceB.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+void genCases_f64_abc_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ sequenceB.expNum = 0;
+ sequenceB.term1Num = 0;
+ sequenceB.term2Num = 0;
+ sequenceB.done = false;
+ sequenceC.expNum = 0;
+ sequenceC.term1Num = 0;
+ sequenceC.term2Num = 0;
+ sequenceC.done = false;
+ subcase = 0;
+ if ( genCases_level == 1 ) {
+ genCases_total = 9 * f64NumQInP1 * f64NumQInP1 * f64NumQInP1;
+ currentA = f64NextQInP1( &sequenceA );
+ currentB = f64NextQInP1( &sequenceB );
+ } else {
+ genCases_total = 2 * f64NumQInP2 * f64NumQInP2 * f64NumQInP2;
+ currentA = f64NextQInP2( &sequenceA );
+ currentB = f64NextQInP2( &sequenceB );
+ }
+ genCases_done = false;
+
+}
+
+void genCases_f64_abc_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ if ( sequenceC.done ) {
+ sequenceC.done = false;
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ currentA = f64NextQInP1( &sequenceA );
+ }
+ currentB = f64NextQInP1( &sequenceB );
+ }
+ currentC = f64NextQInP1( &sequenceC );
+ genCases_f64_a = f64Random();
+ genCases_f64_b = f64Random();
+ genCases_f64_c = currentC;
+ break;
+ case 1:
+ genCases_f64_a = currentA;
+ genCases_f64_b = currentB;
+ genCases_f64_c = f64Random();
+ break;
+ case 2:
+ genCases_f64_a = f64Random();
+ genCases_f64_b = f64Random();
+ genCases_f64_c = f64Random();
+ break;
+ case 3:
+ genCases_f64_a = f64Random();
+ genCases_f64_b = currentB;
+ genCases_f64_c = currentC;
+ break;
+ case 4:
+ genCases_f64_a = currentA;
+ genCases_f64_b = f64Random();
+ genCases_f64_c = f64Random();
+ break;
+ case 5:
+ genCases_f64_a = f64Random();
+ genCases_f64_b = currentB;
+ genCases_f64_c = f64Random();
+ break;
+ case 6:
+ genCases_f64_a = currentA;
+ genCases_f64_b = f64Random();
+ genCases_f64_c = currentC;
+ break;
+ case 7:
+ genCases_f64_a = f64Random();
+ genCases_f64_b = f64Random();
+ genCases_f64_c = f64Random();
+ break;
+ case 8:
+ genCases_f64_a = currentA;
+ genCases_f64_b = currentB;
+ genCases_f64_c = currentC;
+ genCases_done = sequenceA.done & sequenceB.done & sequenceC.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_f64_a = f64Random();
+ genCases_f64_b = f64Random();
+ genCases_f64_c = f64Random();
+ break;
+ case 1:
+ if ( sequenceC.done ) {
+ sequenceC.done = false;
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ currentA = f64NextQInP2( &sequenceA );
+ }
+ currentB = f64NextQInP2( &sequenceB );
+ }
+ genCases_f64_a = currentA;
+ genCases_f64_b = currentB;
+ genCases_f64_c = f64NextQInP2( &sequenceC );
+ genCases_done = sequenceA.done & sequenceB.done & sequenceC.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genCases_i32.c b/src/libs/softfloat-3e/testfloat/source/genCases_i32.c
new file mode 100644
index 00000000..94c4db02
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genCases_i32.c
@@ -0,0 +1,362 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "random.h"
+#include "genCases.h"
+
+struct sequence {
+ int term1Num, term2Num;
+ bool done;
+};
+
+union ui32_i32 { uint32_t ui; int32_t i; };
+
+enum { i32NumP1 = 124 };
+static const uint32_t i32P1[i32NumP1] = {
+ 0x00000000,
+ 0x00000001,
+ 0x00000002,
+ 0x00000004,
+ 0x00000008,
+ 0x00000010,
+ 0x00000020,
+ 0x00000040,
+ 0x00000080,
+ 0x00000100,
+ 0x00000200,
+ 0x00000400,
+ 0x00000800,
+ 0x00001000,
+ 0x00002000,
+ 0x00004000,
+ 0x00008000,
+ 0x00010000,
+ 0x00020000,
+ 0x00040000,
+ 0x00080000,
+ 0x00100000,
+ 0x00200000,
+ 0x00400000,
+ 0x00800000,
+ 0x01000000,
+ 0x02000000,
+ 0x04000000,
+ 0x08000000,
+ 0x10000000,
+ 0x20000000,
+ 0x40000000,
+ 0x80000000,
+ 0xC0000000,
+ 0xE0000000,
+ 0xF0000000,
+ 0xF8000000,
+ 0xFC000000,
+ 0xFE000000,
+ 0xFF000000,
+ 0xFF800000,
+ 0xFFC00000,
+ 0xFFE00000,
+ 0xFFF00000,
+ 0xFFF80000,
+ 0xFFFC0000,
+ 0xFFFE0000,
+ 0xFFFF0000,
+ 0xFFFF8000,
+ 0xFFFFC000,
+ 0xFFFFE000,
+ 0xFFFFF000,
+ 0xFFFFF800,
+ 0xFFFFFC00,
+ 0xFFFFFE00,
+ 0xFFFFFF00,
+ 0xFFFFFF80,
+ 0xFFFFFFC0,
+ 0xFFFFFFE0,
+ 0xFFFFFFF0,
+ 0xFFFFFFF8,
+ 0xFFFFFFFC,
+ 0xFFFFFFFE,
+ 0xFFFFFFFF,
+ 0xFFFFFFFD,
+ 0xFFFFFFFB,
+ 0xFFFFFFF7,
+ 0xFFFFFFEF,
+ 0xFFFFFFDF,
+ 0xFFFFFFBF,
+ 0xFFFFFF7F,
+ 0xFFFFFEFF,
+ 0xFFFFFDFF,
+ 0xFFFFFBFF,
+ 0xFFFFF7FF,
+ 0xFFFFEFFF,
+ 0xFFFFDFFF,
+ 0xFFFFBFFF,
+ 0xFFFF7FFF,
+ 0xFFFEFFFF,
+ 0xFFFDFFFF,
+ 0xFFFBFFFF,
+ 0xFFF7FFFF,
+ 0xFFEFFFFF,
+ 0xFFDFFFFF,
+ 0xFFBFFFFF,
+ 0xFF7FFFFF,
+ 0xFEFFFFFF,
+ 0xFDFFFFFF,
+ 0xFBFFFFFF,
+ 0xF7FFFFFF,
+ 0xEFFFFFFF,
+ 0xDFFFFFFF,
+ 0xBFFFFFFF,
+ 0x7FFFFFFF,
+ 0x3FFFFFFF,
+ 0x1FFFFFFF,
+ 0x0FFFFFFF,
+ 0x07FFFFFF,
+ 0x03FFFFFF,
+ 0x01FFFFFF,
+ 0x00FFFFFF,
+ 0x007FFFFF,
+ 0x003FFFFF,
+ 0x001FFFFF,
+ 0x000FFFFF,
+ 0x0007FFFF,
+ 0x0003FFFF,
+ 0x0001FFFF,
+ 0x0000FFFF,
+ 0x00007FFF,
+ 0x00003FFF,
+ 0x00001FFF,
+ 0x00000FFF,
+ 0x000007FF,
+ 0x000003FF,
+ 0x000001FF,
+ 0x000000FF,
+ 0x0000007F,
+ 0x0000003F,
+ 0x0000001F,
+ 0x0000000F,
+ 0x00000007,
+ 0x00000003
+};
+
+static int32_t i32NextP1( struct sequence *sequencePtr )
+{
+ int termNum;
+ union ui32_i32 uZ;
+
+ termNum = sequencePtr->term1Num;
+ uZ.ui = i32P1[termNum];
+ ++termNum;
+ if ( i32NumP1 <= termNum ) {
+ termNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->term1Num = termNum;
+ return uZ.i;
+
+}
+
+static const int_fast32_t i32NumP2 = (i32NumP1 * i32NumP1 + i32NumP1) / 2;
+
+static int32_t i32NextP2( struct sequence *sequencePtr )
+{
+ int term1Num, term2Num;
+ union ui32_i32 uZ;
+
+ term2Num = sequencePtr->term2Num;
+ term1Num = sequencePtr->term1Num;
+ uZ.ui = i32P1[term1Num] + i32P1[term2Num];
+ ++term2Num;
+ if ( i32NumP1 <= term2Num ) {
+ ++term1Num;
+ if ( i32NumP1 <= term1Num ) {
+ term1Num = 0;
+ sequencePtr->done = true;
+ }
+ term2Num = term1Num;
+ sequencePtr->term1Num = term1Num;
+ }
+ sequencePtr->term2Num = term2Num;
+ return uZ.i;
+
+}
+
+static int32_t i32RandomP3( void )
+{
+ union ui32_i32 uZ;
+
+ uZ.ui =
+ i32P1[randomN_ui8( i32NumP1 )] + i32P1[randomN_ui8( i32NumP1 )]
+ + i32P1[randomN_ui8( i32NumP1 )];
+ return uZ.i;
+
+}
+
+enum { i32NumPInfWeightMasks = 29 };
+static const uint32_t i32PInfWeightMasks[i32NumPInfWeightMasks] = {
+ 0xFFFFFFFF,
+ 0x7FFFFFFF,
+ 0x3FFFFFFF,
+ 0x1FFFFFFF,
+ 0x0FFFFFFF,
+ 0x07FFFFFF,
+ 0x03FFFFFF,
+ 0x01FFFFFF,
+ 0x00FFFFFF,
+ 0x007FFFFF,
+ 0x003FFFFF,
+ 0x001FFFFF,
+ 0x000FFFFF,
+ 0x0007FFFF,
+ 0x0003FFFF,
+ 0x0001FFFF,
+ 0x0000FFFF,
+ 0x00007FFF,
+ 0x00003FFF,
+ 0x00001FFF,
+ 0x00000FFF,
+ 0x000007FF,
+ 0x000003FF,
+ 0x000001FF,
+ 0x000000FF,
+ 0x0000007F,
+ 0x0000003F,
+ 0x0000001F,
+ 0x0000000F
+};
+static const uint32_t i32PInfWeightOffsets[i32NumPInfWeightMasks] = {
+ 0x00000000,
+ 0xC0000000,
+ 0xE0000000,
+ 0xF0000000,
+ 0xF8000000,
+ 0xFC000000,
+ 0xFE000000,
+ 0xFF000000,
+ 0xFF800000,
+ 0xFFC00000,
+ 0xFFE00000,
+ 0xFFF00000,
+ 0xFFF80000,
+ 0xFFFC0000,
+ 0xFFFE0000,
+ 0xFFFF0000,
+ 0xFFFF8000,
+ 0xFFFFC000,
+ 0xFFFFE000,
+ 0xFFFFF000,
+ 0xFFFFF800,
+ 0xFFFFFC00,
+ 0xFFFFFE00,
+ 0xFFFFFF00,
+ 0xFFFFFF80,
+ 0xFFFFFFC0,
+ 0xFFFFFFE0,
+ 0xFFFFFFF0,
+ 0xFFFFFFF8
+};
+
+static int32_t i32RandomPInf( void )
+{
+ int weightMaskNum;
+ union ui32_i32 uZ;
+
+ weightMaskNum = randomN_ui8( i32NumPInfWeightMasks );
+ uZ.ui =
+ (random_ui32() & i32PInfWeightMasks[weightMaskNum])
+ + i32PInfWeightOffsets[weightMaskNum];
+ return uZ.i;
+
+}
+
+static struct sequence sequenceA;
+static int subcase;
+
+int32_t genCases_i32_a;
+
+void genCases_i32_a_init( void )
+{
+
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ subcase = 0;
+ genCases_total = (genCases_level == 1) ? 3 * i32NumP1 : 2 * i32NumP2;
+ genCases_done = false;
+
+}
+
+void genCases_i32_a_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ genCases_i32_a = i32RandomP3();
+ break;
+ case 1:
+ genCases_i32_a = i32RandomPInf();
+ break;
+ case 2:
+ genCases_i32_a = i32NextP1( &sequenceA );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_i32_a = i32RandomP3();
+ break;
+ case 2:
+ genCases_i32_a = i32RandomPInf();
+ break;
+ case 3:
+ subcase = -1;
+ case 1:
+ genCases_i32_a = i32NextP2( &sequenceA );
+ genCases_done = sequenceA.done;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genCases_i64.c b/src/libs/softfloat-3e/testfloat/source/genCases_i64.c
new file mode 100644
index 00000000..10f0716a
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genCases_i64.c
@@ -0,0 +1,554 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "random.h"
+#include "genCases.h"
+
+struct sequence {
+ int term1Num, term2Num;
+ bool done;
+};
+
+union ui64_i64 { uint64_t ui; int64_t i; };
+
+enum { i64NumP1 = 252 };
+static const uint64_t i64P1[i64NumP1] = {
+ UINT64_C( 0x0000000000000000 ),
+ UINT64_C( 0x0000000000000001 ),
+ UINT64_C( 0x0000000000000002 ),
+ UINT64_C( 0x0000000000000004 ),
+ UINT64_C( 0x0000000000000008 ),
+ UINT64_C( 0x0000000000000010 ),
+ UINT64_C( 0x0000000000000020 ),
+ UINT64_C( 0x0000000000000040 ),
+ UINT64_C( 0x0000000000000080 ),
+ UINT64_C( 0x0000000000000100 ),
+ UINT64_C( 0x0000000000000200 ),
+ UINT64_C( 0x0000000000000400 ),
+ UINT64_C( 0x0000000000000800 ),
+ UINT64_C( 0x0000000000001000 ),
+ UINT64_C( 0x0000000000002000 ),
+ UINT64_C( 0x0000000000004000 ),
+ UINT64_C( 0x0000000000008000 ),
+ UINT64_C( 0x0000000000010000 ),
+ UINT64_C( 0x0000000000020000 ),
+ UINT64_C( 0x0000000000040000 ),
+ UINT64_C( 0x0000000000080000 ),
+ UINT64_C( 0x0000000000100000 ),
+ UINT64_C( 0x0000000000200000 ),
+ UINT64_C( 0x0000000000400000 ),
+ UINT64_C( 0x0000000000800000 ),
+ UINT64_C( 0x0000000001000000 ),
+ UINT64_C( 0x0000000002000000 ),
+ UINT64_C( 0x0000000004000000 ),
+ UINT64_C( 0x0000000008000000 ),
+ UINT64_C( 0x0000000010000000 ),
+ UINT64_C( 0x0000000020000000 ),
+ UINT64_C( 0x0000000040000000 ),
+ UINT64_C( 0x0000000080000000 ),
+ UINT64_C( 0x0000000100000000 ),
+ UINT64_C( 0x0000000200000000 ),
+ UINT64_C( 0x0000000400000000 ),
+ UINT64_C( 0x0000000800000000 ),
+ UINT64_C( 0x0000001000000000 ),
+ UINT64_C( 0x0000002000000000 ),
+ UINT64_C( 0x0000004000000000 ),
+ UINT64_C( 0x0000008000000000 ),
+ UINT64_C( 0x0000010000000000 ),
+ UINT64_C( 0x0000020000000000 ),
+ UINT64_C( 0x0000040000000000 ),
+ UINT64_C( 0x0000080000000000 ),
+ UINT64_C( 0x0000100000000000 ),
+ UINT64_C( 0x0000200000000000 ),
+ UINT64_C( 0x0000400000000000 ),
+ UINT64_C( 0x0000800000000000 ),
+ UINT64_C( 0x0001000000000000 ),
+ UINT64_C( 0x0002000000000000 ),
+ UINT64_C( 0x0004000000000000 ),
+ UINT64_C( 0x0008000000000000 ),
+ UINT64_C( 0x0010000000000000 ),
+ UINT64_C( 0x0020000000000000 ),
+ UINT64_C( 0x0040000000000000 ),
+ UINT64_C( 0x0080000000000000 ),
+ UINT64_C( 0x0100000000000000 ),
+ UINT64_C( 0x0200000000000000 ),
+ UINT64_C( 0x0400000000000000 ),
+ UINT64_C( 0x0800000000000000 ),
+ UINT64_C( 0x1000000000000000 ),
+ UINT64_C( 0x2000000000000000 ),
+ UINT64_C( 0x4000000000000000 ),
+ UINT64_C( 0x8000000000000000 ),
+ UINT64_C( 0xC000000000000000 ),
+ UINT64_C( 0xE000000000000000 ),
+ UINT64_C( 0xF000000000000000 ),
+ UINT64_C( 0xF800000000000000 ),
+ UINT64_C( 0xFC00000000000000 ),
+ UINT64_C( 0xFE00000000000000 ),
+ UINT64_C( 0xFF00000000000000 ),
+ UINT64_C( 0xFF80000000000000 ),
+ UINT64_C( 0xFFC0000000000000 ),
+ UINT64_C( 0xFFE0000000000000 ),
+ UINT64_C( 0xFFF0000000000000 ),
+ UINT64_C( 0xFFF8000000000000 ),
+ UINT64_C( 0xFFFC000000000000 ),
+ UINT64_C( 0xFFFE000000000000 ),
+ UINT64_C( 0xFFFF000000000000 ),
+ UINT64_C( 0xFFFF800000000000 ),
+ UINT64_C( 0xFFFFC00000000000 ),
+ UINT64_C( 0xFFFFE00000000000 ),
+ UINT64_C( 0xFFFFF00000000000 ),
+ UINT64_C( 0xFFFFF80000000000 ),
+ UINT64_C( 0xFFFFFC0000000000 ),
+ UINT64_C( 0xFFFFFE0000000000 ),
+ UINT64_C( 0xFFFFFF0000000000 ),
+ UINT64_C( 0xFFFFFF8000000000 ),
+ UINT64_C( 0xFFFFFFC000000000 ),
+ UINT64_C( 0xFFFFFFE000000000 ),
+ UINT64_C( 0xFFFFFFF000000000 ),
+ UINT64_C( 0xFFFFFFF800000000 ),
+ UINT64_C( 0xFFFFFFFC00000000 ),
+ UINT64_C( 0xFFFFFFFE00000000 ),
+ UINT64_C( 0xFFFFFFFF00000000 ),
+ UINT64_C( 0xFFFFFFFF80000000 ),
+ UINT64_C( 0xFFFFFFFFC0000000 ),
+ UINT64_C( 0xFFFFFFFFE0000000 ),
+ UINT64_C( 0xFFFFFFFFF0000000 ),
+ UINT64_C( 0xFFFFFFFFF8000000 ),
+ UINT64_C( 0xFFFFFFFFFC000000 ),
+ UINT64_C( 0xFFFFFFFFFE000000 ),
+ UINT64_C( 0xFFFFFFFFFF000000 ),
+ UINT64_C( 0xFFFFFFFFFF800000 ),
+ UINT64_C( 0xFFFFFFFFFFC00000 ),
+ UINT64_C( 0xFFFFFFFFFFE00000 ),
+ UINT64_C( 0xFFFFFFFFFFF00000 ),
+ UINT64_C( 0xFFFFFFFFFFF80000 ),
+ UINT64_C( 0xFFFFFFFFFFFC0000 ),
+ UINT64_C( 0xFFFFFFFFFFFE0000 ),
+ UINT64_C( 0xFFFFFFFFFFFF0000 ),
+ UINT64_C( 0xFFFFFFFFFFFF8000 ),
+ UINT64_C( 0xFFFFFFFFFFFFC000 ),
+ UINT64_C( 0xFFFFFFFFFFFFE000 ),
+ UINT64_C( 0xFFFFFFFFFFFFF000 ),
+ UINT64_C( 0xFFFFFFFFFFFFF800 ),
+ UINT64_C( 0xFFFFFFFFFFFFFC00 ),
+ UINT64_C( 0xFFFFFFFFFFFFFE00 ),
+ UINT64_C( 0xFFFFFFFFFFFFFF00 ),
+ UINT64_C( 0xFFFFFFFFFFFFFF80 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFC0 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFE0 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFF0 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFF8 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFFC ),
+ UINT64_C( 0xFFFFFFFFFFFFFFFE ),
+ UINT64_C( 0xFFFFFFFFFFFFFFFF ),
+ UINT64_C( 0xFFFFFFFFFFFFFFFD ),
+ UINT64_C( 0xFFFFFFFFFFFFFFFB ),
+ UINT64_C( 0xFFFFFFFFFFFFFFF7 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFEF ),
+ UINT64_C( 0xFFFFFFFFFFFFFFDF ),
+ UINT64_C( 0xFFFFFFFFFFFFFFBF ),
+ UINT64_C( 0xFFFFFFFFFFFFFF7F ),
+ UINT64_C( 0xFFFFFFFFFFFFFEFF ),
+ UINT64_C( 0xFFFFFFFFFFFFFDFF ),
+ UINT64_C( 0xFFFFFFFFFFFFFBFF ),
+ UINT64_C( 0xFFFFFFFFFFFFF7FF ),
+ UINT64_C( 0xFFFFFFFFFFFFEFFF ),
+ UINT64_C( 0xFFFFFFFFFFFFDFFF ),
+ UINT64_C( 0xFFFFFFFFFFFFBFFF ),
+ UINT64_C( 0xFFFFFFFFFFFF7FFF ),
+ UINT64_C( 0xFFFFFFFFFFFEFFFF ),
+ UINT64_C( 0xFFFFFFFFFFFDFFFF ),
+ UINT64_C( 0xFFFFFFFFFFFBFFFF ),
+ UINT64_C( 0xFFFFFFFFFFF7FFFF ),
+ UINT64_C( 0xFFFFFFFFFFEFFFFF ),
+ UINT64_C( 0xFFFFFFFFFFDFFFFF ),
+ UINT64_C( 0xFFFFFFFFFFBFFFFF ),
+ UINT64_C( 0xFFFFFFFFFF7FFFFF ),
+ UINT64_C( 0xFFFFFFFFFEFFFFFF ),
+ UINT64_C( 0xFFFFFFFFFDFFFFFF ),
+ UINT64_C( 0xFFFFFFFFFBFFFFFF ),
+ UINT64_C( 0xFFFFFFFFF7FFFFFF ),
+ UINT64_C( 0xFFFFFFFFEFFFFFFF ),
+ UINT64_C( 0xFFFFFFFFDFFFFFFF ),
+ UINT64_C( 0xFFFFFFFFBFFFFFFF ),
+ UINT64_C( 0xFFFFFFFF7FFFFFFF ),
+ UINT64_C( 0xFFFFFFFEFFFFFFFF ),
+ UINT64_C( 0xFFFFFFFDFFFFFFFF ),
+ UINT64_C( 0xFFFFFFFBFFFFFFFF ),
+ UINT64_C( 0xFFFFFFF7FFFFFFFF ),
+ UINT64_C( 0xFFFFFFEFFFFFFFFF ),
+ UINT64_C( 0xFFFFFFDFFFFFFFFF ),
+ UINT64_C( 0xFFFFFFBFFFFFFFFF ),
+ UINT64_C( 0xFFFFFF7FFFFFFFFF ),
+ UINT64_C( 0xFFFFFEFFFFFFFFFF ),
+ UINT64_C( 0xFFFFFDFFFFFFFFFF ),
+ UINT64_C( 0xFFFFFBFFFFFFFFFF ),
+ UINT64_C( 0xFFFFF7FFFFFFFFFF ),
+ UINT64_C( 0xFFFFEFFFFFFFFFFF ),
+ UINT64_C( 0xFFFFDFFFFFFFFFFF ),
+ UINT64_C( 0xFFFFBFFFFFFFFFFF ),
+ UINT64_C( 0xFFFF7FFFFFFFFFFF ),
+ UINT64_C( 0xFFFEFFFFFFFFFFFF ),
+ UINT64_C( 0xFFFDFFFFFFFFFFFF ),
+ UINT64_C( 0xFFFBFFFFFFFFFFFF ),
+ UINT64_C( 0xFFF7FFFFFFFFFFFF ),
+ UINT64_C( 0xFFEFFFFFFFFFFFFF ),
+ UINT64_C( 0xFFDFFFFFFFFFFFFF ),
+ UINT64_C( 0xFFBFFFFFFFFFFFFF ),
+ UINT64_C( 0xFF7FFFFFFFFFFFFF ),
+ UINT64_C( 0xFEFFFFFFFFFFFFFF ),
+ UINT64_C( 0xFDFFFFFFFFFFFFFF ),
+ UINT64_C( 0xFBFFFFFFFFFFFFFF ),
+ UINT64_C( 0xF7FFFFFFFFFFFFFF ),
+ UINT64_C( 0xEFFFFFFFFFFFFFFF ),
+ UINT64_C( 0xDFFFFFFFFFFFFFFF ),
+ UINT64_C( 0xBFFFFFFFFFFFFFFF ),
+ UINT64_C( 0x7FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x3FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x1FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x0FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x07FFFFFFFFFFFFFF ),
+ UINT64_C( 0x03FFFFFFFFFFFFFF ),
+ UINT64_C( 0x01FFFFFFFFFFFFFF ),
+ UINT64_C( 0x00FFFFFFFFFFFFFF ),
+ UINT64_C( 0x007FFFFFFFFFFFFF ),
+ UINT64_C( 0x003FFFFFFFFFFFFF ),
+ UINT64_C( 0x001FFFFFFFFFFFFF ),
+ UINT64_C( 0x000FFFFFFFFFFFFF ),
+ UINT64_C( 0x0007FFFFFFFFFFFF ),
+ UINT64_C( 0x0003FFFFFFFFFFFF ),
+ UINT64_C( 0x0001FFFFFFFFFFFF ),
+ UINT64_C( 0x0000FFFFFFFFFFFF ),
+ UINT64_C( 0x00007FFFFFFFFFFF ),
+ UINT64_C( 0x00003FFFFFFFFFFF ),
+ UINT64_C( 0x00001FFFFFFFFFFF ),
+ UINT64_C( 0x00000FFFFFFFFFFF ),
+ UINT64_C( 0x000007FFFFFFFFFF ),
+ UINT64_C( 0x000003FFFFFFFFFF ),
+ UINT64_C( 0x000001FFFFFFFFFF ),
+ UINT64_C( 0x000000FFFFFFFFFF ),
+ UINT64_C( 0x0000007FFFFFFFFF ),
+ UINT64_C( 0x0000003FFFFFFFFF ),
+ UINT64_C( 0x0000001FFFFFFFFF ),
+ UINT64_C( 0x0000000FFFFFFFFF ),
+ UINT64_C( 0x00000007FFFFFFFF ),
+ UINT64_C( 0x00000003FFFFFFFF ),
+ UINT64_C( 0x00000001FFFFFFFF ),
+ UINT64_C( 0x00000000FFFFFFFF ),
+ UINT64_C( 0x000000007FFFFFFF ),
+ UINT64_C( 0x000000003FFFFFFF ),
+ UINT64_C( 0x000000001FFFFFFF ),
+ UINT64_C( 0x000000000FFFFFFF ),
+ UINT64_C( 0x0000000007FFFFFF ),
+ UINT64_C( 0x0000000003FFFFFF ),
+ UINT64_C( 0x0000000001FFFFFF ),
+ UINT64_C( 0x0000000000FFFFFF ),
+ UINT64_C( 0x00000000007FFFFF ),
+ UINT64_C( 0x00000000003FFFFF ),
+ UINT64_C( 0x00000000001FFFFF ),
+ UINT64_C( 0x00000000000FFFFF ),
+ UINT64_C( 0x000000000007FFFF ),
+ UINT64_C( 0x000000000003FFFF ),
+ UINT64_C( 0x000000000001FFFF ),
+ UINT64_C( 0x000000000000FFFF ),
+ UINT64_C( 0x0000000000007FFF ),
+ UINT64_C( 0x0000000000003FFF ),
+ UINT64_C( 0x0000000000001FFF ),
+ UINT64_C( 0x0000000000000FFF ),
+ UINT64_C( 0x00000000000007FF ),
+ UINT64_C( 0x00000000000003FF ),
+ UINT64_C( 0x00000000000001FF ),
+ UINT64_C( 0x00000000000000FF ),
+ UINT64_C( 0x000000000000007F ),
+ UINT64_C( 0x000000000000003F ),
+ UINT64_C( 0x000000000000001F ),
+ UINT64_C( 0x000000000000000F ),
+ UINT64_C( 0x0000000000000007 ),
+ UINT64_C( 0x0000000000000003 )
+};
+
+static int64_t i64NextP1( struct sequence *sequencePtr )
+{
+ int termNum;
+ union ui64_i64 uZ;
+
+ termNum = sequencePtr->term1Num;
+ uZ.ui = i64P1[termNum];
+ ++termNum;
+ if ( i64NumP1 <= termNum ) {
+ termNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->term1Num = termNum;
+ return uZ.i;
+
+}
+
+static const int_fast64_t i64NumP2 = (i64NumP1 * i64NumP1 + i64NumP1) / 2;
+
+static int64_t i64NextP2( struct sequence *sequencePtr )
+{
+ int term1Num, term2Num;
+ union ui64_i64 uZ;
+
+ term2Num = sequencePtr->term2Num;
+ term1Num = sequencePtr->term1Num;
+ uZ.ui = i64P1[term1Num] + i64P1[term2Num];
+ ++term2Num;
+ if ( i64NumP1 <= term2Num ) {
+ ++term1Num;
+ if ( i64NumP1 <= term1Num ) {
+ term1Num = 0;
+ sequencePtr->done = true;
+ }
+ term2Num = term1Num;
+ sequencePtr->term1Num = term1Num;
+ }
+ sequencePtr->term2Num = term2Num;
+ return uZ.i;
+
+}
+
+static int64_t i64RandomP3( void )
+{
+ union ui64_i64 uZ;
+
+ uZ.ui =
+ i64P1[randomN_ui8( i64NumP1 )] + i64P1[randomN_ui8( i64NumP1 )]
+ + i64P1[randomN_ui8( i64NumP1 )];
+ return uZ.i;
+
+}
+
+enum { i64NumPInfWeightMasks = 61 };
+static const uint64_t i64PInfWeightMasks[i64NumPInfWeightMasks] = {
+ UINT64_C( 0xFFFFFFFFFFFFFFFF ),
+ UINT64_C( 0x7FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x3FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x1FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x0FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x07FFFFFFFFFFFFFF ),
+ UINT64_C( 0x03FFFFFFFFFFFFFF ),
+ UINT64_C( 0x01FFFFFFFFFFFFFF ),
+ UINT64_C( 0x00FFFFFFFFFFFFFF ),
+ UINT64_C( 0x007FFFFFFFFFFFFF ),
+ UINT64_C( 0x003FFFFFFFFFFFFF ),
+ UINT64_C( 0x001FFFFFFFFFFFFF ),
+ UINT64_C( 0x000FFFFFFFFFFFFF ),
+ UINT64_C( 0x0007FFFFFFFFFFFF ),
+ UINT64_C( 0x0003FFFFFFFFFFFF ),
+ UINT64_C( 0x0001FFFFFFFFFFFF ),
+ UINT64_C( 0x0000FFFFFFFFFFFF ),
+ UINT64_C( 0x00007FFFFFFFFFFF ),
+ UINT64_C( 0x00003FFFFFFFFFFF ),
+ UINT64_C( 0x00001FFFFFFFFFFF ),
+ UINT64_C( 0x00000FFFFFFFFFFF ),
+ UINT64_C( 0x000007FFFFFFFFFF ),
+ UINT64_C( 0x000003FFFFFFFFFF ),
+ UINT64_C( 0x000001FFFFFFFFFF ),
+ UINT64_C( 0x000000FFFFFFFFFF ),
+ UINT64_C( 0x0000007FFFFFFFFF ),
+ UINT64_C( 0x0000003FFFFFFFFF ),
+ UINT64_C( 0x0000001FFFFFFFFF ),
+ UINT64_C( 0x0000000FFFFFFFFF ),
+ UINT64_C( 0x00000007FFFFFFFF ),
+ UINT64_C( 0x00000003FFFFFFFF ),
+ UINT64_C( 0x00000001FFFFFFFF ),
+ UINT64_C( 0x00000000FFFFFFFF ),
+ UINT64_C( 0x000000007FFFFFFF ),
+ UINT64_C( 0x000000003FFFFFFF ),
+ UINT64_C( 0x000000001FFFFFFF ),
+ UINT64_C( 0x000000000FFFFFFF ),
+ UINT64_C( 0x0000000007FFFFFF ),
+ UINT64_C( 0x0000000003FFFFFF ),
+ UINT64_C( 0x0000000001FFFFFF ),
+ UINT64_C( 0x0000000000FFFFFF ),
+ UINT64_C( 0x00000000007FFFFF ),
+ UINT64_C( 0x00000000003FFFFF ),
+ UINT64_C( 0x00000000001FFFFF ),
+ UINT64_C( 0x00000000000FFFFF ),
+ UINT64_C( 0x000000000007FFFF ),
+ UINT64_C( 0x000000000003FFFF ),
+ UINT64_C( 0x000000000001FFFF ),
+ UINT64_C( 0x000000000000FFFF ),
+ UINT64_C( 0x0000000000007FFF ),
+ UINT64_C( 0x0000000000003FFF ),
+ UINT64_C( 0x0000000000001FFF ),
+ UINT64_C( 0x0000000000000FFF ),
+ UINT64_C( 0x00000000000007FF ),
+ UINT64_C( 0x00000000000003FF ),
+ UINT64_C( 0x00000000000001FF ),
+ UINT64_C( 0x00000000000000FF ),
+ UINT64_C( 0x000000000000007F ),
+ UINT64_C( 0x000000000000003F ),
+ UINT64_C( 0x000000000000001F ),
+ UINT64_C( 0x000000000000000F )
+};
+static const uint64_t i64PInfWeightOffsets[i64NumPInfWeightMasks] = {
+ UINT64_C( 0x0000000000000000 ),
+ UINT64_C( 0xC000000000000000 ),
+ UINT64_C( 0xE000000000000000 ),
+ UINT64_C( 0xF000000000000000 ),
+ UINT64_C( 0xF800000000000000 ),
+ UINT64_C( 0xFC00000000000000 ),
+ UINT64_C( 0xFE00000000000000 ),
+ UINT64_C( 0xFF00000000000000 ),
+ UINT64_C( 0xFF80000000000000 ),
+ UINT64_C( 0xFFC0000000000000 ),
+ UINT64_C( 0xFFE0000000000000 ),
+ UINT64_C( 0xFFF0000000000000 ),
+ UINT64_C( 0xFFF8000000000000 ),
+ UINT64_C( 0xFFFC000000000000 ),
+ UINT64_C( 0xFFFE000000000000 ),
+ UINT64_C( 0xFFFF000000000000 ),
+ UINT64_C( 0xFFFF800000000000 ),
+ UINT64_C( 0xFFFFC00000000000 ),
+ UINT64_C( 0xFFFFE00000000000 ),
+ UINT64_C( 0xFFFFF00000000000 ),
+ UINT64_C( 0xFFFFF80000000000 ),
+ UINT64_C( 0xFFFFFC0000000000 ),
+ UINT64_C( 0xFFFFFE0000000000 ),
+ UINT64_C( 0xFFFFFF0000000000 ),
+ UINT64_C( 0xFFFFFF8000000000 ),
+ UINT64_C( 0xFFFFFFC000000000 ),
+ UINT64_C( 0xFFFFFFE000000000 ),
+ UINT64_C( 0xFFFFFFF000000000 ),
+ UINT64_C( 0xFFFFFFF800000000 ),
+ UINT64_C( 0xFFFFFFFC00000000 ),
+ UINT64_C( 0xFFFFFFFE00000000 ),
+ UINT64_C( 0xFFFFFFFF00000000 ),
+ UINT64_C( 0xFFFFFFFF80000000 ),
+ UINT64_C( 0xFFFFFFFFC0000000 ),
+ UINT64_C( 0xFFFFFFFFE0000000 ),
+ UINT64_C( 0xFFFFFFFFF0000000 ),
+ UINT64_C( 0xFFFFFFFFF8000000 ),
+ UINT64_C( 0xFFFFFFFFFC000000 ),
+ UINT64_C( 0xFFFFFFFFFE000000 ),
+ UINT64_C( 0xFFFFFFFFFF000000 ),
+ UINT64_C( 0xFFFFFFFFFF800000 ),
+ UINT64_C( 0xFFFFFFFFFFC00000 ),
+ UINT64_C( 0xFFFFFFFFFFE00000 ),
+ UINT64_C( 0xFFFFFFFFFFF00000 ),
+ UINT64_C( 0xFFFFFFFFFFF80000 ),
+ UINT64_C( 0xFFFFFFFFFFFC0000 ),
+ UINT64_C( 0xFFFFFFFFFFFE0000 ),
+ UINT64_C( 0xFFFFFFFFFFFF0000 ),
+ UINT64_C( 0xFFFFFFFFFFFF8000 ),
+ UINT64_C( 0xFFFFFFFFFFFFC000 ),
+ UINT64_C( 0xFFFFFFFFFFFFE000 ),
+ UINT64_C( 0xFFFFFFFFFFFFF000 ),
+ UINT64_C( 0xFFFFFFFFFFFFF800 ),
+ UINT64_C( 0xFFFFFFFFFFFFFC00 ),
+ UINT64_C( 0xFFFFFFFFFFFFFE00 ),
+ UINT64_C( 0xFFFFFFFFFFFFFF00 ),
+ UINT64_C( 0xFFFFFFFFFFFFFF80 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFC0 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFE0 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFF0 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFF8 )
+};
+
+static int64_t i64RandomPInf( void )
+{
+ int weightMaskNum;
+ union ui64_i64 uZ;
+
+ weightMaskNum = randomN_ui8( i64NumPInfWeightMasks );
+ uZ.ui =
+ (random_ui64() & i64PInfWeightMasks[weightMaskNum])
+ + i64PInfWeightOffsets[weightMaskNum];
+ return uZ.i;
+
+}
+
+static struct sequence sequenceA;
+static int subcase;
+
+int64_t genCases_i64_a;
+
+void genCases_i64_a_init( void )
+{
+
+ sequenceA.term2Num = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.done = false;
+ subcase = 0;
+ genCases_total = (genCases_level == 1) ? 3 * i64NumP1 : 2 * i64NumP2;
+ genCases_done = false;
+
+}
+
+void genCases_i64_a_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ genCases_i64_a = i64RandomP3();
+ break;
+ case 1:
+ genCases_i64_a = i64RandomPInf();
+ break;
+ case 2:
+ genCases_i64_a = i64NextP1( &sequenceA );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_i64_a = i64RandomP3();
+ break;
+ case 2:
+ genCases_i64_a = i64RandomPInf();
+ break;
+ case 3:
+ subcase = -1;
+ case 1:
+ genCases_i64_a = i64NextP2( &sequenceA );
+ genCases_done = sequenceA.done;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genCases_ui32.c b/src/libs/softfloat-3e/testfloat/source/genCases_ui32.c
new file mode 100644
index 00000000..bc897827
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genCases_ui32.c
@@ -0,0 +1,323 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "random.h"
+#include "genCases.h"
+
+struct sequence {
+ int term1Num, term2Num;
+ bool done;
+};
+
+enum { ui32NumP1 = 124 };
+static const uint32_t ui32P1[ui32NumP1] = {
+ 0x00000000,
+ 0x00000001,
+ 0x00000002,
+ 0x00000004,
+ 0x00000008,
+ 0x00000010,
+ 0x00000020,
+ 0x00000040,
+ 0x00000080,
+ 0x00000100,
+ 0x00000200,
+ 0x00000400,
+ 0x00000800,
+ 0x00001000,
+ 0x00002000,
+ 0x00004000,
+ 0x00008000,
+ 0x00010000,
+ 0x00020000,
+ 0x00040000,
+ 0x00080000,
+ 0x00100000,
+ 0x00200000,
+ 0x00400000,
+ 0x00800000,
+ 0x01000000,
+ 0x02000000,
+ 0x04000000,
+ 0x08000000,
+ 0x10000000,
+ 0x20000000,
+ 0x40000000,
+ 0x80000000,
+ 0xC0000000,
+ 0xE0000000,
+ 0xF0000000,
+ 0xF8000000,
+ 0xFC000000,
+ 0xFE000000,
+ 0xFF000000,
+ 0xFF800000,
+ 0xFFC00000,
+ 0xFFE00000,
+ 0xFFF00000,
+ 0xFFF80000,
+ 0xFFFC0000,
+ 0xFFFE0000,
+ 0xFFFF0000,
+ 0xFFFF8000,
+ 0xFFFFC000,
+ 0xFFFFE000,
+ 0xFFFFF000,
+ 0xFFFFF800,
+ 0xFFFFFC00,
+ 0xFFFFFE00,
+ 0xFFFFFF00,
+ 0xFFFFFF80,
+ 0xFFFFFFC0,
+ 0xFFFFFFE0,
+ 0xFFFFFFF0,
+ 0xFFFFFFF8,
+ 0xFFFFFFFC,
+ 0xFFFFFFFE,
+ 0xFFFFFFFF,
+ 0xFFFFFFFD,
+ 0xFFFFFFFB,
+ 0xFFFFFFF7,
+ 0xFFFFFFEF,
+ 0xFFFFFFDF,
+ 0xFFFFFFBF,
+ 0xFFFFFF7F,
+ 0xFFFFFEFF,
+ 0xFFFFFDFF,
+ 0xFFFFFBFF,
+ 0xFFFFF7FF,
+ 0xFFFFEFFF,
+ 0xFFFFDFFF,
+ 0xFFFFBFFF,
+ 0xFFFF7FFF,
+ 0xFFFEFFFF,
+ 0xFFFDFFFF,
+ 0xFFFBFFFF,
+ 0xFFF7FFFF,
+ 0xFFEFFFFF,
+ 0xFFDFFFFF,
+ 0xFFBFFFFF,
+ 0xFF7FFFFF,
+ 0xFEFFFFFF,
+ 0xFDFFFFFF,
+ 0xFBFFFFFF,
+ 0xF7FFFFFF,
+ 0xEFFFFFFF,
+ 0xDFFFFFFF,
+ 0xBFFFFFFF,
+ 0x7FFFFFFF,
+ 0x3FFFFFFF,
+ 0x1FFFFFFF,
+ 0x0FFFFFFF,
+ 0x07FFFFFF,
+ 0x03FFFFFF,
+ 0x01FFFFFF,
+ 0x00FFFFFF,
+ 0x007FFFFF,
+ 0x003FFFFF,
+ 0x001FFFFF,
+ 0x000FFFFF,
+ 0x0007FFFF,
+ 0x0003FFFF,
+ 0x0001FFFF,
+ 0x0000FFFF,
+ 0x00007FFF,
+ 0x00003FFF,
+ 0x00001FFF,
+ 0x00000FFF,
+ 0x000007FF,
+ 0x000003FF,
+ 0x000001FF,
+ 0x000000FF,
+ 0x0000007F,
+ 0x0000003F,
+ 0x0000001F,
+ 0x0000000F,
+ 0x00000007,
+ 0x00000003
+};
+
+static uint32_t ui32NextP1( struct sequence *sequencePtr )
+{
+ int termNum;
+ uint32_t z;
+
+ termNum = sequencePtr->term1Num;
+ z = ui32P1[termNum];
+ ++termNum;
+ if ( ui32NumP1 <= termNum ) {
+ termNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->term1Num = termNum;
+ return z;
+
+}
+
+static const uint_fast32_t ui32NumP2 = (ui32NumP1 * ui32NumP1 + ui32NumP1) / 2;
+
+static uint32_t ui32NextP2( struct sequence *sequencePtr )
+{
+ int term1Num, term2Num;
+ uint32_t z;
+
+ term2Num = sequencePtr->term2Num;
+ term1Num = sequencePtr->term1Num;
+ z = ui32P1[term1Num] + ui32P1[term2Num];
+ ++term2Num;
+ if ( ui32NumP1 <= term2Num ) {
+ ++term1Num;
+ if ( ui32NumP1 <= term1Num ) {
+ term1Num = 0;
+ sequencePtr->done = true;
+ }
+ term2Num = term1Num;
+ sequencePtr->term1Num = term1Num;
+ }
+ sequencePtr->term2Num = term2Num;
+ return z;
+
+}
+
+static uint32_t ui32RandomP3( void )
+{
+
+ return
+ ui32P1[randomN_ui8( ui32NumP1 )] + ui32P1[randomN_ui8( ui32NumP1 )]
+ + ui32P1[randomN_ui8( ui32NumP1 )];
+
+}
+
+enum { ui32NumPInfWeightMasks = 29 };
+static const uint32_t ui32PInfWeightMasks[ui32NumPInfWeightMasks] = {
+ 0xFFFFFFFF,
+ 0x7FFFFFFF,
+ 0x3FFFFFFF,
+ 0x1FFFFFFF,
+ 0x0FFFFFFF,
+ 0x07FFFFFF,
+ 0x03FFFFFF,
+ 0x01FFFFFF,
+ 0x00FFFFFF,
+ 0x007FFFFF,
+ 0x003FFFFF,
+ 0x001FFFFF,
+ 0x000FFFFF,
+ 0x0007FFFF,
+ 0x0003FFFF,
+ 0x0001FFFF,
+ 0x0000FFFF,
+ 0x00007FFF,
+ 0x00003FFF,
+ 0x00001FFF,
+ 0x00000FFF,
+ 0x000007FF,
+ 0x000003FF,
+ 0x000001FF,
+ 0x000000FF,
+ 0x0000007F,
+ 0x0000003F,
+ 0x0000001F,
+ 0x0000000F
+};
+
+static uint32_t ui32RandomPInf( void )
+{
+ int weightMaskNum;
+
+ weightMaskNum = randomN_ui8( ui32NumPInfWeightMasks );
+ return random_ui32() & ui32PInfWeightMasks[weightMaskNum];
+
+}
+
+static struct sequence sequenceA;
+static int subcase;
+
+uint32_t genCases_ui32_a;
+
+void genCases_ui32_a_init( void )
+{
+
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ subcase = 0;
+ genCases_total = (genCases_level == 1) ? 3 * ui32NumP1 : 2 * ui32NumP2;
+ genCases_done = false;
+
+}
+
+void genCases_ui32_a_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ genCases_ui32_a = ui32RandomP3();
+ break;
+ case 1:
+ genCases_ui32_a = ui32RandomPInf();
+ break;
+ case 2:
+ genCases_ui32_a = ui32NextP1( &sequenceA );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_ui32_a = ui32RandomP3();
+ break;
+ case 2:
+ genCases_ui32_a = ui32RandomPInf();
+ break;
+ case 3:
+ subcase = -1;
+ case 1:
+ genCases_ui32_a = ui32NextP2( &sequenceA );
+ genCases_done = sequenceA.done;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genCases_ui64.c b/src/libs/softfloat-3e/testfloat/source/genCases_ui64.c
new file mode 100644
index 00000000..915df78f
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genCases_ui64.c
@@ -0,0 +1,483 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "random.h"
+#include "genCases.h"
+
+struct sequence {
+ int term1Num, term2Num;
+ bool done;
+};
+
+enum { ui64NumP1 = 252 };
+static const uint64_t ui64P1[ui64NumP1] = {
+ UINT64_C( 0x0000000000000000 ),
+ UINT64_C( 0x0000000000000001 ),
+ UINT64_C( 0x0000000000000002 ),
+ UINT64_C( 0x0000000000000004 ),
+ UINT64_C( 0x0000000000000008 ),
+ UINT64_C( 0x0000000000000010 ),
+ UINT64_C( 0x0000000000000020 ),
+ UINT64_C( 0x0000000000000040 ),
+ UINT64_C( 0x0000000000000080 ),
+ UINT64_C( 0x0000000000000100 ),
+ UINT64_C( 0x0000000000000200 ),
+ UINT64_C( 0x0000000000000400 ),
+ UINT64_C( 0x0000000000000800 ),
+ UINT64_C( 0x0000000000001000 ),
+ UINT64_C( 0x0000000000002000 ),
+ UINT64_C( 0x0000000000004000 ),
+ UINT64_C( 0x0000000000008000 ),
+ UINT64_C( 0x0000000000010000 ),
+ UINT64_C( 0x0000000000020000 ),
+ UINT64_C( 0x0000000000040000 ),
+ UINT64_C( 0x0000000000080000 ),
+ UINT64_C( 0x0000000000100000 ),
+ UINT64_C( 0x0000000000200000 ),
+ UINT64_C( 0x0000000000400000 ),
+ UINT64_C( 0x0000000000800000 ),
+ UINT64_C( 0x0000000001000000 ),
+ UINT64_C( 0x0000000002000000 ),
+ UINT64_C( 0x0000000004000000 ),
+ UINT64_C( 0x0000000008000000 ),
+ UINT64_C( 0x0000000010000000 ),
+ UINT64_C( 0x0000000020000000 ),
+ UINT64_C( 0x0000000040000000 ),
+ UINT64_C( 0x0000000080000000 ),
+ UINT64_C( 0x0000000100000000 ),
+ UINT64_C( 0x0000000200000000 ),
+ UINT64_C( 0x0000000400000000 ),
+ UINT64_C( 0x0000000800000000 ),
+ UINT64_C( 0x0000001000000000 ),
+ UINT64_C( 0x0000002000000000 ),
+ UINT64_C( 0x0000004000000000 ),
+ UINT64_C( 0x0000008000000000 ),
+ UINT64_C( 0x0000010000000000 ),
+ UINT64_C( 0x0000020000000000 ),
+ UINT64_C( 0x0000040000000000 ),
+ UINT64_C( 0x0000080000000000 ),
+ UINT64_C( 0x0000100000000000 ),
+ UINT64_C( 0x0000200000000000 ),
+ UINT64_C( 0x0000400000000000 ),
+ UINT64_C( 0x0000800000000000 ),
+ UINT64_C( 0x0001000000000000 ),
+ UINT64_C( 0x0002000000000000 ),
+ UINT64_C( 0x0004000000000000 ),
+ UINT64_C( 0x0008000000000000 ),
+ UINT64_C( 0x0010000000000000 ),
+ UINT64_C( 0x0020000000000000 ),
+ UINT64_C( 0x0040000000000000 ),
+ UINT64_C( 0x0080000000000000 ),
+ UINT64_C( 0x0100000000000000 ),
+ UINT64_C( 0x0200000000000000 ),
+ UINT64_C( 0x0400000000000000 ),
+ UINT64_C( 0x0800000000000000 ),
+ UINT64_C( 0x1000000000000000 ),
+ UINT64_C( 0x2000000000000000 ),
+ UINT64_C( 0x4000000000000000 ),
+ UINT64_C( 0x8000000000000000 ),
+ UINT64_C( 0xC000000000000000 ),
+ UINT64_C( 0xE000000000000000 ),
+ UINT64_C( 0xF000000000000000 ),
+ UINT64_C( 0xF800000000000000 ),
+ UINT64_C( 0xFC00000000000000 ),
+ UINT64_C( 0xFE00000000000000 ),
+ UINT64_C( 0xFF00000000000000 ),
+ UINT64_C( 0xFF80000000000000 ),
+ UINT64_C( 0xFFC0000000000000 ),
+ UINT64_C( 0xFFE0000000000000 ),
+ UINT64_C( 0xFFF0000000000000 ),
+ UINT64_C( 0xFFF8000000000000 ),
+ UINT64_C( 0xFFFC000000000000 ),
+ UINT64_C( 0xFFFE000000000000 ),
+ UINT64_C( 0xFFFF000000000000 ),
+ UINT64_C( 0xFFFF800000000000 ),
+ UINT64_C( 0xFFFFC00000000000 ),
+ UINT64_C( 0xFFFFE00000000000 ),
+ UINT64_C( 0xFFFFF00000000000 ),
+ UINT64_C( 0xFFFFF80000000000 ),
+ UINT64_C( 0xFFFFFC0000000000 ),
+ UINT64_C( 0xFFFFFE0000000000 ),
+ UINT64_C( 0xFFFFFF0000000000 ),
+ UINT64_C( 0xFFFFFF8000000000 ),
+ UINT64_C( 0xFFFFFFC000000000 ),
+ UINT64_C( 0xFFFFFFE000000000 ),
+ UINT64_C( 0xFFFFFFF000000000 ),
+ UINT64_C( 0xFFFFFFF800000000 ),
+ UINT64_C( 0xFFFFFFFC00000000 ),
+ UINT64_C( 0xFFFFFFFE00000000 ),
+ UINT64_C( 0xFFFFFFFF00000000 ),
+ UINT64_C( 0xFFFFFFFF80000000 ),
+ UINT64_C( 0xFFFFFFFFC0000000 ),
+ UINT64_C( 0xFFFFFFFFE0000000 ),
+ UINT64_C( 0xFFFFFFFFF0000000 ),
+ UINT64_C( 0xFFFFFFFFF8000000 ),
+ UINT64_C( 0xFFFFFFFFFC000000 ),
+ UINT64_C( 0xFFFFFFFFFE000000 ),
+ UINT64_C( 0xFFFFFFFFFF000000 ),
+ UINT64_C( 0xFFFFFFFFFF800000 ),
+ UINT64_C( 0xFFFFFFFFFFC00000 ),
+ UINT64_C( 0xFFFFFFFFFFE00000 ),
+ UINT64_C( 0xFFFFFFFFFFF00000 ),
+ UINT64_C( 0xFFFFFFFFFFF80000 ),
+ UINT64_C( 0xFFFFFFFFFFFC0000 ),
+ UINT64_C( 0xFFFFFFFFFFFE0000 ),
+ UINT64_C( 0xFFFFFFFFFFFF0000 ),
+ UINT64_C( 0xFFFFFFFFFFFF8000 ),
+ UINT64_C( 0xFFFFFFFFFFFFC000 ),
+ UINT64_C( 0xFFFFFFFFFFFFE000 ),
+ UINT64_C( 0xFFFFFFFFFFFFF000 ),
+ UINT64_C( 0xFFFFFFFFFFFFF800 ),
+ UINT64_C( 0xFFFFFFFFFFFFFC00 ),
+ UINT64_C( 0xFFFFFFFFFFFFFE00 ),
+ UINT64_C( 0xFFFFFFFFFFFFFF00 ),
+ UINT64_C( 0xFFFFFFFFFFFFFF80 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFC0 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFE0 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFF0 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFF8 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFFC ),
+ UINT64_C( 0xFFFFFFFFFFFFFFFE ),
+ UINT64_C( 0xFFFFFFFFFFFFFFFF ),
+ UINT64_C( 0xFFFFFFFFFFFFFFFD ),
+ UINT64_C( 0xFFFFFFFFFFFFFFFB ),
+ UINT64_C( 0xFFFFFFFFFFFFFFF7 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFEF ),
+ UINT64_C( 0xFFFFFFFFFFFFFFDF ),
+ UINT64_C( 0xFFFFFFFFFFFFFFBF ),
+ UINT64_C( 0xFFFFFFFFFFFFFF7F ),
+ UINT64_C( 0xFFFFFFFFFFFFFEFF ),
+ UINT64_C( 0xFFFFFFFFFFFFFDFF ),
+ UINT64_C( 0xFFFFFFFFFFFFFBFF ),
+ UINT64_C( 0xFFFFFFFFFFFFF7FF ),
+ UINT64_C( 0xFFFFFFFFFFFFEFFF ),
+ UINT64_C( 0xFFFFFFFFFFFFDFFF ),
+ UINT64_C( 0xFFFFFFFFFFFFBFFF ),
+ UINT64_C( 0xFFFFFFFFFFFF7FFF ),
+ UINT64_C( 0xFFFFFFFFFFFEFFFF ),
+ UINT64_C( 0xFFFFFFFFFFFDFFFF ),
+ UINT64_C( 0xFFFFFFFFFFFBFFFF ),
+ UINT64_C( 0xFFFFFFFFFFF7FFFF ),
+ UINT64_C( 0xFFFFFFFFFFEFFFFF ),
+ UINT64_C( 0xFFFFFFFFFFDFFFFF ),
+ UINT64_C( 0xFFFFFFFFFFBFFFFF ),
+ UINT64_C( 0xFFFFFFFFFF7FFFFF ),
+ UINT64_C( 0xFFFFFFFFFEFFFFFF ),
+ UINT64_C( 0xFFFFFFFFFDFFFFFF ),
+ UINT64_C( 0xFFFFFFFFFBFFFFFF ),
+ UINT64_C( 0xFFFFFFFFF7FFFFFF ),
+ UINT64_C( 0xFFFFFFFFEFFFFFFF ),
+ UINT64_C( 0xFFFFFFFFDFFFFFFF ),
+ UINT64_C( 0xFFFFFFFFBFFFFFFF ),
+ UINT64_C( 0xFFFFFFFF7FFFFFFF ),
+ UINT64_C( 0xFFFFFFFEFFFFFFFF ),
+ UINT64_C( 0xFFFFFFFDFFFFFFFF ),
+ UINT64_C( 0xFFFFFFFBFFFFFFFF ),
+ UINT64_C( 0xFFFFFFF7FFFFFFFF ),
+ UINT64_C( 0xFFFFFFEFFFFFFFFF ),
+ UINT64_C( 0xFFFFFFDFFFFFFFFF ),
+ UINT64_C( 0xFFFFFFBFFFFFFFFF ),
+ UINT64_C( 0xFFFFFF7FFFFFFFFF ),
+ UINT64_C( 0xFFFFFEFFFFFFFFFF ),
+ UINT64_C( 0xFFFFFDFFFFFFFFFF ),
+ UINT64_C( 0xFFFFFBFFFFFFFFFF ),
+ UINT64_C( 0xFFFFF7FFFFFFFFFF ),
+ UINT64_C( 0xFFFFEFFFFFFFFFFF ),
+ UINT64_C( 0xFFFFDFFFFFFFFFFF ),
+ UINT64_C( 0xFFFFBFFFFFFFFFFF ),
+ UINT64_C( 0xFFFF7FFFFFFFFFFF ),
+ UINT64_C( 0xFFFEFFFFFFFFFFFF ),
+ UINT64_C( 0xFFFDFFFFFFFFFFFF ),
+ UINT64_C( 0xFFFBFFFFFFFFFFFF ),
+ UINT64_C( 0xFFF7FFFFFFFFFFFF ),
+ UINT64_C( 0xFFEFFFFFFFFFFFFF ),
+ UINT64_C( 0xFFDFFFFFFFFFFFFF ),
+ UINT64_C( 0xFFBFFFFFFFFFFFFF ),
+ UINT64_C( 0xFF7FFFFFFFFFFFFF ),
+ UINT64_C( 0xFEFFFFFFFFFFFFFF ),
+ UINT64_C( 0xFDFFFFFFFFFFFFFF ),
+ UINT64_C( 0xFBFFFFFFFFFFFFFF ),
+ UINT64_C( 0xF7FFFFFFFFFFFFFF ),
+ UINT64_C( 0xEFFFFFFFFFFFFFFF ),
+ UINT64_C( 0xDFFFFFFFFFFFFFFF ),
+ UINT64_C( 0xBFFFFFFFFFFFFFFF ),
+ UINT64_C( 0x7FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x3FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x1FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x0FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x07FFFFFFFFFFFFFF ),
+ UINT64_C( 0x03FFFFFFFFFFFFFF ),
+ UINT64_C( 0x01FFFFFFFFFFFFFF ),
+ UINT64_C( 0x00FFFFFFFFFFFFFF ),
+ UINT64_C( 0x007FFFFFFFFFFFFF ),
+ UINT64_C( 0x003FFFFFFFFFFFFF ),
+ UINT64_C( 0x001FFFFFFFFFFFFF ),
+ UINT64_C( 0x000FFFFFFFFFFFFF ),
+ UINT64_C( 0x0007FFFFFFFFFFFF ),
+ UINT64_C( 0x0003FFFFFFFFFFFF ),
+ UINT64_C( 0x0001FFFFFFFFFFFF ),
+ UINT64_C( 0x0000FFFFFFFFFFFF ),
+ UINT64_C( 0x00007FFFFFFFFFFF ),
+ UINT64_C( 0x00003FFFFFFFFFFF ),
+ UINT64_C( 0x00001FFFFFFFFFFF ),
+ UINT64_C( 0x00000FFFFFFFFFFF ),
+ UINT64_C( 0x000007FFFFFFFFFF ),
+ UINT64_C( 0x000003FFFFFFFFFF ),
+ UINT64_C( 0x000001FFFFFFFFFF ),
+ UINT64_C( 0x000000FFFFFFFFFF ),
+ UINT64_C( 0x0000007FFFFFFFFF ),
+ UINT64_C( 0x0000003FFFFFFFFF ),
+ UINT64_C( 0x0000001FFFFFFFFF ),
+ UINT64_C( 0x0000000FFFFFFFFF ),
+ UINT64_C( 0x00000007FFFFFFFF ),
+ UINT64_C( 0x00000003FFFFFFFF ),
+ UINT64_C( 0x00000001FFFFFFFF ),
+ UINT64_C( 0x00000000FFFFFFFF ),
+ UINT64_C( 0x000000007FFFFFFF ),
+ UINT64_C( 0x000000003FFFFFFF ),
+ UINT64_C( 0x000000001FFFFFFF ),
+ UINT64_C( 0x000000000FFFFFFF ),
+ UINT64_C( 0x0000000007FFFFFF ),
+ UINT64_C( 0x0000000003FFFFFF ),
+ UINT64_C( 0x0000000001FFFFFF ),
+ UINT64_C( 0x0000000000FFFFFF ),
+ UINT64_C( 0x00000000007FFFFF ),
+ UINT64_C( 0x00000000003FFFFF ),
+ UINT64_C( 0x00000000001FFFFF ),
+ UINT64_C( 0x00000000000FFFFF ),
+ UINT64_C( 0x000000000007FFFF ),
+ UINT64_C( 0x000000000003FFFF ),
+ UINT64_C( 0x000000000001FFFF ),
+ UINT64_C( 0x000000000000FFFF ),
+ UINT64_C( 0x0000000000007FFF ),
+ UINT64_C( 0x0000000000003FFF ),
+ UINT64_C( 0x0000000000001FFF ),
+ UINT64_C( 0x0000000000000FFF ),
+ UINT64_C( 0x00000000000007FF ),
+ UINT64_C( 0x00000000000003FF ),
+ UINT64_C( 0x00000000000001FF ),
+ UINT64_C( 0x00000000000000FF ),
+ UINT64_C( 0x000000000000007F ),
+ UINT64_C( 0x000000000000003F ),
+ UINT64_C( 0x000000000000001F ),
+ UINT64_C( 0x000000000000000F ),
+ UINT64_C( 0x0000000000000007 ),
+ UINT64_C( 0x0000000000000003 )
+};
+
+static uint64_t ui64NextP1( struct sequence *sequencePtr )
+{
+ int termNum;
+ uint64_t z;
+
+ termNum = sequencePtr->term1Num;
+ z = ui64P1[termNum];
+ ++termNum;
+ if ( ui64NumP1 <= termNum ) {
+ termNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->term1Num = termNum;
+ return z;
+
+}
+
+static const uint_fast64_t ui64NumP2 = (ui64NumP1 * ui64NumP1 + ui64NumP1) / 2;
+
+static uint64_t ui64NextP2( struct sequence *sequencePtr )
+{
+ int term1Num, term2Num;
+ uint64_t z;
+
+ term2Num = sequencePtr->term2Num;
+ term1Num = sequencePtr->term1Num;
+ z = ui64P1[term1Num] + ui64P1[term2Num];
+ ++term2Num;
+ if ( ui64NumP1 <= term2Num ) {
+ ++term1Num;
+ if ( ui64NumP1 <= term1Num ) {
+ term1Num = 0;
+ sequencePtr->done = true;
+ }
+ term2Num = term1Num;
+ sequencePtr->term1Num = term1Num;
+ }
+ sequencePtr->term2Num = term2Num;
+ return z;
+
+}
+
+static uint64_t ui64RandomP3( void )
+{
+
+ return
+ ui64P1[randomN_ui8( ui64NumP1 )] + ui64P1[randomN_ui8( ui64NumP1 )]
+ + ui64P1[randomN_ui8( ui64NumP1 )];
+
+}
+
+enum { ui64NumPInfWeightMasks = 61 };
+static const uint64_t ui64PInfWeightMasks[ui64NumPInfWeightMasks] = {
+ UINT64_C( 0xFFFFFFFFFFFFFFFF ),
+ UINT64_C( 0x7FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x3FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x1FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x0FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x07FFFFFFFFFFFFFF ),
+ UINT64_C( 0x03FFFFFFFFFFFFFF ),
+ UINT64_C( 0x01FFFFFFFFFFFFFF ),
+ UINT64_C( 0x00FFFFFFFFFFFFFF ),
+ UINT64_C( 0x007FFFFFFFFFFFFF ),
+ UINT64_C( 0x003FFFFFFFFFFFFF ),
+ UINT64_C( 0x001FFFFFFFFFFFFF ),
+ UINT64_C( 0x000FFFFFFFFFFFFF ),
+ UINT64_C( 0x0007FFFFFFFFFFFF ),
+ UINT64_C( 0x0003FFFFFFFFFFFF ),
+ UINT64_C( 0x0001FFFFFFFFFFFF ),
+ UINT64_C( 0x0000FFFFFFFFFFFF ),
+ UINT64_C( 0x00007FFFFFFFFFFF ),
+ UINT64_C( 0x00003FFFFFFFFFFF ),
+ UINT64_C( 0x00001FFFFFFFFFFF ),
+ UINT64_C( 0x00000FFFFFFFFFFF ),
+ UINT64_C( 0x000007FFFFFFFFFF ),
+ UINT64_C( 0x000003FFFFFFFFFF ),
+ UINT64_C( 0x000001FFFFFFFFFF ),
+ UINT64_C( 0x000000FFFFFFFFFF ),
+ UINT64_C( 0x0000007FFFFFFFFF ),
+ UINT64_C( 0x0000003FFFFFFFFF ),
+ UINT64_C( 0x0000001FFFFFFFFF ),
+ UINT64_C( 0x0000000FFFFFFFFF ),
+ UINT64_C( 0x00000007FFFFFFFF ),
+ UINT64_C( 0x00000003FFFFFFFF ),
+ UINT64_C( 0x00000001FFFFFFFF ),
+ UINT64_C( 0x00000000FFFFFFFF ),
+ UINT64_C( 0x000000007FFFFFFF ),
+ UINT64_C( 0x000000003FFFFFFF ),
+ UINT64_C( 0x000000001FFFFFFF ),
+ UINT64_C( 0x000000000FFFFFFF ),
+ UINT64_C( 0x0000000007FFFFFF ),
+ UINT64_C( 0x0000000003FFFFFF ),
+ UINT64_C( 0x0000000001FFFFFF ),
+ UINT64_C( 0x0000000000FFFFFF ),
+ UINT64_C( 0x00000000007FFFFF ),
+ UINT64_C( 0x00000000003FFFFF ),
+ UINT64_C( 0x00000000001FFFFF ),
+ UINT64_C( 0x00000000000FFFFF ),
+ UINT64_C( 0x000000000007FFFF ),
+ UINT64_C( 0x000000000003FFFF ),
+ UINT64_C( 0x000000000001FFFF ),
+ UINT64_C( 0x000000000000FFFF ),
+ UINT64_C( 0x0000000000007FFF ),
+ UINT64_C( 0x0000000000003FFF ),
+ UINT64_C( 0x0000000000001FFF ),
+ UINT64_C( 0x0000000000000FFF ),
+ UINT64_C( 0x00000000000007FF ),
+ UINT64_C( 0x00000000000003FF ),
+ UINT64_C( 0x00000000000001FF ),
+ UINT64_C( 0x00000000000000FF ),
+ UINT64_C( 0x000000000000007F ),
+ UINT64_C( 0x000000000000003F ),
+ UINT64_C( 0x000000000000001F ),
+ UINT64_C( 0x000000000000000F )
+};
+
+static uint64_t ui64RandomPInf( void )
+{
+ int weightMaskNum;
+
+ weightMaskNum = randomN_ui8( ui64NumPInfWeightMasks );
+ return random_ui64() & ui64PInfWeightMasks[weightMaskNum];
+
+}
+
+static struct sequence sequenceA;
+static int subcase;
+
+uint64_t genCases_ui64_a;
+
+void genCases_ui64_a_init( void )
+{
+
+ sequenceA.term2Num = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.done = false;
+ subcase = 0;
+ genCases_total = (genCases_level == 1) ? 3 * ui64NumP1 : 2 * ui64NumP2;
+ genCases_done = false;
+
+}
+
+void genCases_ui64_a_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ genCases_ui64_a = ui64RandomP3();
+ break;
+ case 1:
+ genCases_ui64_a = ui64RandomPInf();
+ break;
+ case 2:
+ genCases_ui64_a = ui64NextP1( &sequenceA );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_ui64_a = ui64RandomP3();
+ break;
+ case 2:
+ genCases_ui64_a = ui64RandomPInf();
+ break;
+ case 3:
+ subcase = -1;
+ case 1:
+ genCases_ui64_a = ui64NextP2( &sequenceA );
+ genCases_done = sequenceA.done;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genCases_writeTestsTotal.c b/src/libs/softfloat-3e/testfloat/source/genCases_writeTestsTotal.c
new file mode 100644
index 00000000..8ad6f91e
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genCases_writeTestsTotal.c
@@ -0,0 +1,63 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdio.h>
+#include "platform.h"
+#include "genCases.h"
+
+void genCases_writeTestsTotal( bool forever )
+{
+
+ if ( forever ) {
+ fputs( "Unbounded tests.\n", stderr );
+ } else {
+ if ( 2000000000 <= genCases_total ) {
+ fprintf(
+ stderr,
+ "\r%lu%09lu tests total.\n",
+ (long unsigned) (genCases_total / 1000000000),
+ (long unsigned) (genCases_total % 1000000000)
+ );
+ } else {
+ fprintf(
+ stderr, "\r%lu tests total.\n", (long unsigned) genCases_total
+ );
+ }
+ }
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genLoops.c b/src/libs/softfloat-3e/testfloat/source/genLoops.c
new file mode 100644
index 00000000..913391a0
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genLoops.c
@@ -0,0 +1,2890 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <signal.h>
+#include "platform.h"
+#include "uint128.h"
+#include "fail.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "writeHex.h"
+#include "genLoops.h"
+
+volatile sig_atomic_t genLoops_stop = false;
+
+bool genLoops_forever;
+bool genLoops_givenCount;
+uint_fast64_t genLoops_count;
+uint_fast8_t *genLoops_trueFlagsPtr;
+
+#ifdef FLOAT16
+union ui16_f16 { uint16_t ui; float16_t f; };
+#endif
+union ui32_f32 { uint32_t ui; float32_t f; };
+#ifdef FLOAT64
+union ui64_f64 { uint64_t ui; float64_t f; };
+#endif
+
+static void checkEnoughCases( void )
+{
+
+ if ( genLoops_givenCount && (genLoops_count < genCases_total) ) {
+ if ( 2000000000 <= genCases_total ) {
+ fail(
+ "Too few cases; minimum is %lu%09lu",
+ (unsigned long) (genCases_total / 1000000000),
+ (unsigned long) (genCases_total % 1000000000)
+ );
+ } else {
+ fail(
+ "Too few cases; minimum is %lu", (unsigned long) genCases_total
+ );
+ }
+ }
+
+}
+
+static void writeGenOutput_flags( uint_fast8_t flags )
+{
+ uint_fast8_t commonFlags;
+
+ commonFlags = 0;
+ if ( flags & softfloat_flag_invalid ) commonFlags |= 0x10;
+ if ( flags & softfloat_flag_infinite ) commonFlags |= 0x08;
+ if ( flags & softfloat_flag_overflow ) commonFlags |= 0x04;
+ if ( flags & softfloat_flag_underflow ) commonFlags |= 0x02;
+ if ( flags & softfloat_flag_inexact ) commonFlags |= 0x01;
+ writeHex_ui8( commonFlags, '\n' );
+
+}
+
+static bool writeGenOutputs_bool( bool z, uint_fast8_t flags )
+{
+
+ writeHex_bool( z, ' ' );
+ writeGenOutput_flags( flags );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) return true;
+ }
+ return false;
+
+}
+
+#ifdef FLOAT16
+
+static bool writeGenOutputs_ui16( uint_fast16_t z, uint_fast8_t flags )
+{
+
+ writeHex_ui16( z, ' ' );
+ writeGenOutput_flags( flags );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) return true;
+ }
+ return false;
+
+}
+
+#endif
+
+static bool writeGenOutputs_ui32( uint_fast32_t z, uint_fast8_t flags )
+{
+
+ writeHex_ui32( z, ' ' );
+ writeGenOutput_flags( flags );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) return true;
+ }
+ return false;
+
+}
+
+static bool writeGenOutputs_ui64( uint_fast64_t z, uint_fast8_t flags )
+{
+
+ writeHex_ui64( z, ' ' );
+ writeGenOutput_flags( flags );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) return true;
+ }
+ return false;
+
+}
+
+#ifdef EXTFLOAT80
+
+static void writeHex_uiExtF80M( const extFloat80_t *aPtr, char sepChar )
+{
+ const struct extFloat80M *aSPtr;
+
+ aSPtr = (const struct extFloat80M *) aPtr;
+ writeHex_ui16( aSPtr->signExp, 0 );
+ writeHex_ui64( aSPtr->signif, sepChar );
+
+}
+
+static
+bool writeGenOutputs_extF80M( const extFloat80_t *aPtr, uint_fast8_t flags )
+{
+
+ writeHex_uiExtF80M( aPtr, ' ' );
+ writeGenOutput_flags( flags );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) return true;
+ }
+ return false;
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+static void writeHex_uiF128M( const float128_t *aPtr, char sepChar )
+{
+ const struct uint128 *uiAPtr;
+
+ uiAPtr = (const struct uint128 *) aPtr;
+ writeHex_ui64( uiAPtr->v64, 0 );
+ writeHex_ui64( uiAPtr->v0, sepChar );
+
+}
+
+static bool writeGenOutputs_f128M( const float128_t *aPtr, uint_fast8_t flags )
+{
+
+ writeHex_uiF128M( aPtr, ' ' );
+ writeGenOutput_flags( flags );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) return true;
+ }
+ return false;
+
+}
+
+#endif
+
+void gen_a_ui32( void )
+{
+
+ genCases_ui32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_ui32_a_next();
+ writeHex_ui32( genCases_ui32_a, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_a_ui64( void )
+{
+
+ genCases_ui64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_ui64_a_next();
+ writeHex_ui64( genCases_ui64_a, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_a_i32( void )
+{
+
+ genCases_i32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_i32_a_next();
+ writeHex_ui32( genCases_i32_a, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_a_i64( void )
+{
+
+ genCases_i64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_i64_a_next();
+ writeHex_ui64( genCases_i64_a, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+#ifdef FLOAT16
+
+void gen_a_f16( void )
+{
+ union ui16_f16 uA;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_ab_f16( void )
+{
+ union ui16_f16 u;
+
+ genCases_f16_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_ab_next();
+ u.f = genCases_f16_a;
+ writeHex_ui16( u.ui, ' ' );
+ u.f = genCases_f16_b;
+ writeHex_ui16( u.ui, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_abc_f16( void )
+{
+ union ui16_f16 u;
+
+ genCases_f16_abc_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_abc_next();
+ u.f = genCases_f16_a;
+ writeHex_ui16( u.ui, ' ' );
+ u.f = genCases_f16_b;
+ writeHex_ui16( u.ui, ' ' );
+ u.f = genCases_f16_c;
+ writeHex_ui16( u.ui, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+#endif
+
+void gen_a_f32( void )
+{
+ union ui32_f32 uA;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_ab_f32( void )
+{
+ union ui32_f32 u;
+
+ genCases_f32_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_ab_next();
+ u.f = genCases_f32_a;
+ writeHex_ui32( u.ui, ' ' );
+ u.f = genCases_f32_b;
+ writeHex_ui32( u.ui, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_abc_f32( void )
+{
+ union ui32_f32 u;
+
+ genCases_f32_abc_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_abc_next();
+ u.f = genCases_f32_a;
+ writeHex_ui32( u.ui, ' ' );
+ u.f = genCases_f32_b;
+ writeHex_ui32( u.ui, ' ' );
+ u.f = genCases_f32_c;
+ writeHex_ui32( u.ui, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+#ifdef FLOAT64
+
+void gen_a_f64( void )
+{
+ union ui64_f64 uA;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_ab_f64( void )
+{
+ union ui64_f64 u;
+
+ genCases_f64_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_ab_next();
+ u.f = genCases_f64_a;
+ writeHex_ui64( u.ui, ' ' );
+ u.f = genCases_f64_b;
+ writeHex_ui64( u.ui, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_abc_f64( void )
+{
+ union ui64_f64 u;
+
+ genCases_f64_abc_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_abc_next();
+ u.f = genCases_f64_a;
+ writeHex_ui64( u.ui, ' ' );
+ u.f = genCases_f64_b;
+ writeHex_ui64( u.ui, ' ' );
+ u.f = genCases_f64_c;
+ writeHex_ui64( u.ui, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void gen_a_extF80( void )
+{
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_ab_extF80( void )
+{
+
+ genCases_extF80_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_ab_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ writeHex_uiExtF80M( &genCases_extF80_b, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_abc_extF80( void )
+{
+
+ genCases_extF80_abc_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_abc_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ writeHex_uiExtF80M( &genCases_extF80_b, ' ' );
+ writeHex_uiExtF80M( &genCases_extF80_c, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void gen_a_f128( void )
+{
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_ab_f128( void )
+{
+
+ genCases_f128_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_ab_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ writeHex_uiF128M( &genCases_f128_b, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_abc_f128( void )
+{
+
+ genCases_f128_abc_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_abc_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ writeHex_uiF128M( &genCases_f128_b, ' ' );
+ writeHex_uiF128M( &genCases_f128_c, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT16
+
+void gen_a_ui32_z_f16( float16_t trueFunction( uint32_t ) )
+{
+ union ui16_f16 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_ui32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_ui32_a_next();
+ writeHex_ui32( genCases_ui32_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_ui32_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui16( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void gen_a_ui32_z_f32( float32_t trueFunction( uint32_t ) )
+{
+ union ui32_f32 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_ui32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_ui32_a_next();
+ writeHex_ui32( genCases_ui32_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_ui32_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef FLOAT64
+
+void gen_a_ui32_z_f64( float64_t trueFunction( uint32_t ) )
+{
+ union ui64_f64 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_ui32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_ui32_a_next();
+ writeHex_ui32( genCases_ui32_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_ui32_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void gen_a_ui32_z_extF80( void trueFunction( uint32_t, extFloat80_t * ) )
+{
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_ui32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_ui32_a_next();
+ writeHex_ui32( genCases_ui32_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_ui32_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_extF80M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void gen_a_ui32_z_f128( void trueFunction( uint32_t, float128_t * ) )
+{
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_ui32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_ui32_a_next();
+ writeHex_ui32( genCases_ui32_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_ui32_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_f128M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT16
+
+void gen_a_ui64_z_f16( float16_t trueFunction( uint64_t ) )
+{
+ union ui16_f16 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_ui64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_ui64_a_next();
+ writeHex_ui64( genCases_ui64_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_ui64_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui16( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void gen_a_ui64_z_f32( float32_t trueFunction( uint64_t ) )
+{
+ union ui32_f32 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_ui64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_ui64_a_next();
+ writeHex_ui64( genCases_ui64_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_ui64_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef FLOAT64
+
+void gen_a_ui64_z_f64( float64_t trueFunction( uint64_t ) )
+{
+ union ui64_f64 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_ui64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_ui64_a_next();
+ writeHex_ui64( genCases_ui64_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_ui64_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void gen_a_ui64_z_extF80( void trueFunction( uint64_t, extFloat80_t * ) )
+{
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_ui64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_ui64_a_next();
+ writeHex_ui64( genCases_ui64_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_ui64_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_extF80M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void gen_a_ui64_z_f128( void trueFunction( uint64_t, float128_t * ) )
+{
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_ui64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_ui64_a_next();
+ writeHex_ui64( genCases_ui64_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_ui64_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_f128M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT16
+
+void gen_a_i32_z_f16( float16_t trueFunction( int32_t ) )
+{
+ union ui16_f16 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_i32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_i32_a_next();
+ writeHex_ui32( genCases_i32_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_i32_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui16( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void gen_a_i32_z_f32( float32_t trueFunction( int32_t ) )
+{
+ union ui32_f32 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_i32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_i32_a_next();
+ writeHex_ui32( genCases_i32_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_i32_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef FLOAT64
+
+void gen_a_i32_z_f64( float64_t trueFunction( int32_t ) )
+{
+ union ui64_f64 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_i32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_i32_a_next();
+ writeHex_ui32( genCases_i32_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_i32_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void gen_a_i32_z_extF80( void trueFunction( int32_t, extFloat80_t * ) )
+{
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_i32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_i32_a_next();
+ writeHex_ui32( genCases_i32_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_i32_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_extF80M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void gen_a_i32_z_f128( void trueFunction( int32_t, float128_t * ) )
+{
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_i32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_i32_a_next();
+ writeHex_ui32( genCases_i32_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_i32_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_f128M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT16
+
+void gen_a_i64_z_f16( float16_t trueFunction( int64_t ) )
+{
+ union ui16_f16 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_i64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_i64_a_next();
+ writeHex_ui64( genCases_i64_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_i64_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui16( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void gen_a_i64_z_f32( float32_t trueFunction( int64_t ) )
+{
+ union ui32_f32 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_i64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_i64_a_next();
+ writeHex_ui64( genCases_i64_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_i64_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef FLOAT64
+
+void gen_a_i64_z_f64( float64_t trueFunction( int64_t ) )
+{
+ union ui64_f64 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_i64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_i64_a_next();
+ writeHex_ui64( genCases_i64_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_i64_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void gen_a_i64_z_extF80( void trueFunction( int64_t, extFloat80_t * ) )
+{
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_i64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_i64_a_next();
+ writeHex_ui64( genCases_i64_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_i64_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_extF80M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void gen_a_i64_z_f128( void trueFunction( int64_t, float128_t * ) )
+{
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_i64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_i64_a_next();
+ writeHex_ui64( genCases_i64_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_i64_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_f128M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT16
+
+void
+ gen_a_f16_z_ui32_rx(
+ uint_fast32_t trueFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui16_f16 uA;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f16_z_ui64_rx(
+ uint_fast64_t trueFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui16_f16 uA;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f16_z_i32_rx(
+ int_fast32_t trueFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui16_f16 uA;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f16_z_i64_rx(
+ int_fast64_t trueFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui16_f16 uA;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f16_z_ui32_x(
+ uint_fast32_t trueFunction( float16_t, bool ), bool exact )
+{
+ union ui16_f16 uA;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f16_z_ui64_x(
+ uint_fast64_t trueFunction( float16_t, bool ), bool exact )
+{
+ union ui16_f16 uA;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f16_z_i32_x( int_fast32_t trueFunction( float16_t, bool ), bool exact )
+{
+ union ui16_f16 uA;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f16_z_i64_x( int_fast64_t trueFunction( float16_t, bool ), bool exact )
+{
+ union ui16_f16 uA;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void gen_a_f16_z_f32( float32_t trueFunction( float16_t ) )
+{
+ union ui16_f16 uA;
+ union ui32_f32 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_f16_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef FLOAT64
+
+void gen_a_f16_z_f64( float64_t trueFunction( float16_t ) )
+{
+ union ui16_f16 uA;
+ union ui64_f64 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_f16_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void gen_a_f16_z_extF80( void trueFunction( float16_t, extFloat80_t * ) )
+{
+ union ui16_f16 uA;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_f16_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_extF80M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void gen_a_f16_z_f128( void trueFunction( float16_t, float128_t * ) )
+{
+ union ui16_f16 uA;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_f16_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_f128M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void gen_az_f16( float16_t trueFunction( float16_t ) )
+{
+ union ui16_f16 u;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ u.f = genCases_f16_a;
+ writeHex_ui16( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ u.f = trueFunction( genCases_f16_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui16( u.ui, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_az_f16_rx(
+ float16_t trueFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui16_f16 u;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ u.f = genCases_f16_a;
+ writeHex_ui16( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ u.f = trueFunction( genCases_f16_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui16( u.ui, trueFlags ) ) break;
+ }
+
+}
+
+void gen_abz_f16( float16_t trueFunction( float16_t, float16_t ) )
+{
+ union ui16_f16 u;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_ab_next();
+ u.f = genCases_f16_a;
+ writeHex_ui16( u.ui, ' ' );
+ u.f = genCases_f16_b;
+ writeHex_ui16( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ u.f = trueFunction( genCases_f16_a, genCases_f16_b );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui16( u.ui, trueFlags ) ) break;
+ }
+
+}
+
+void gen_abcz_f16( float16_t trueFunction( float16_t, float16_t, float16_t ) )
+{
+ union ui16_f16 u;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_abc_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_abc_next();
+ u.f = genCases_f16_a;
+ writeHex_ui16( u.ui, ' ' );
+ u.f = genCases_f16_b;
+ writeHex_ui16( u.ui, ' ' );
+ u.f = genCases_f16_c;
+ writeHex_ui16( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ u.f = trueFunction( genCases_f16_a, genCases_f16_b, genCases_f16_c );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui16( u.ui, trueFlags ) ) break;
+ }
+
+}
+
+void gen_ab_f16_z_bool( bool trueFunction( float16_t, float16_t ) )
+{
+ union ui16_f16 u;
+ bool trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_ab_next();
+ u.f = genCases_f16_a;
+ writeHex_ui16( u.ui, ' ' );
+ u.f = genCases_f16_b;
+ writeHex_ui16( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, genCases_f16_b );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_bool( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void
+ gen_a_f32_z_ui32_rx(
+ uint_fast32_t trueFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui32_f32 uA;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f32_z_ui64_rx(
+ uint_fast64_t trueFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui32_f32 uA;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f32_z_i32_rx(
+ int_fast32_t trueFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui32_f32 uA;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f32_z_i64_rx(
+ int_fast64_t trueFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui32_f32 uA;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f32_z_ui32_x(
+ uint_fast32_t trueFunction( float32_t, bool ), bool exact )
+{
+ union ui32_f32 uA;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f32_z_ui64_x(
+ uint_fast64_t trueFunction( float32_t, bool ), bool exact )
+{
+ union ui32_f32 uA;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f32_z_i32_x( int_fast32_t trueFunction( float32_t, bool ), bool exact )
+{
+ union ui32_f32 uA;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f32_z_i64_x( int_fast64_t trueFunction( float32_t, bool ), bool exact )
+{
+ union ui32_f32 uA;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef FLOAT16
+
+void gen_a_f32_z_f16( float16_t trueFunction( float32_t ) )
+{
+ union ui32_f32 uA;
+ union ui16_f16 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_f32_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui16( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT64
+
+void gen_a_f32_z_f64( float64_t trueFunction( float32_t ) )
+{
+ union ui32_f32 uA;
+ union ui64_f64 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_f32_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void gen_a_f32_z_extF80( void trueFunction( float32_t, extFloat80_t * ) )
+{
+ union ui32_f32 uA;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_f32_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_extF80M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void gen_a_f32_z_f128( void trueFunction( float32_t, float128_t * ) )
+{
+ union ui32_f32 uA;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_f32_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_f128M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void gen_az_f32( float32_t trueFunction( float32_t ) )
+{
+ union ui32_f32 u;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ u.f = genCases_f32_a;
+ writeHex_ui32( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ u.f = trueFunction( genCases_f32_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( u.ui, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_az_f32_rx(
+ float32_t trueFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui32_f32 u;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ u.f = genCases_f32_a;
+ writeHex_ui32( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ u.f = trueFunction( genCases_f32_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( u.ui, trueFlags ) ) break;
+ }
+
+}
+
+void gen_abz_f32( float32_t trueFunction( float32_t, float32_t ) )
+{
+ union ui32_f32 u;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_ab_next();
+ u.f = genCases_f32_a;
+ writeHex_ui32( u.ui, ' ' );
+ u.f = genCases_f32_b;
+ writeHex_ui32( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ u.f = trueFunction( genCases_f32_a, genCases_f32_b );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( u.ui, trueFlags ) ) break;
+ }
+
+}
+
+void gen_abcz_f32( float32_t trueFunction( float32_t, float32_t, float32_t ) )
+{
+ union ui32_f32 u;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_abc_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_abc_next();
+ u.f = genCases_f32_a;
+ writeHex_ui32( u.ui, ' ' );
+ u.f = genCases_f32_b;
+ writeHex_ui32( u.ui, ' ' );
+ u.f = genCases_f32_c;
+ writeHex_ui32( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ u.f = trueFunction( genCases_f32_a, genCases_f32_b, genCases_f32_c );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( u.ui, trueFlags ) ) break;
+ }
+
+}
+
+void gen_ab_f32_z_bool( bool trueFunction( float32_t, float32_t ) )
+{
+ union ui32_f32 u;
+ bool trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_ab_next();
+ u.f = genCases_f32_a;
+ writeHex_ui32( u.ui, ' ' );
+ u.f = genCases_f32_b;
+ writeHex_ui32( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, genCases_f32_b );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_bool( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef FLOAT64
+
+void
+ gen_a_f64_z_ui32_rx(
+ uint_fast32_t trueFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui64_f64 uA;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f64_z_ui64_rx(
+ uint_fast64_t trueFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui64_f64 uA;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f64_z_i32_rx(
+ int_fast32_t trueFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui64_f64 uA;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f64_z_i64_rx(
+ int_fast64_t trueFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui64_f64 uA;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f64_z_ui32_x(
+ uint_fast32_t trueFunction( float64_t, bool ), bool exact )
+{
+ union ui64_f64 uA;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f64_z_ui64_x(
+ uint_fast64_t trueFunction( float64_t, bool ), bool exact )
+{
+ union ui64_f64 uA;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f64_z_i32_x( int_fast32_t trueFunction( float64_t, bool ), bool exact )
+{
+ union ui64_f64 uA;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f64_z_i64_x( int_fast64_t trueFunction( float64_t, bool ), bool exact )
+{
+ union ui64_f64 uA;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef FLOAT16
+
+void gen_a_f64_z_f16( float16_t trueFunction( float64_t ) )
+{
+ union ui64_f64 uA;
+ union ui16_f16 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_f64_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui16( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void gen_a_f64_z_f32( float32_t trueFunction( float64_t ) )
+{
+ union ui64_f64 uA;
+ union ui32_f32 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_f64_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef EXTFLOAT80
+
+void gen_a_f64_z_extF80( void trueFunction( float64_t, extFloat80_t * ) )
+{
+ union ui64_f64 uA;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_f64_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_extF80M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void gen_a_f64_z_f128( void trueFunction( float64_t, float128_t * ) )
+{
+ union ui64_f64 uA;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_f64_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_f128M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void gen_az_f64( float64_t trueFunction( float64_t ) )
+{
+ union ui64_f64 u;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ u.f = genCases_f64_a;
+ writeHex_ui64( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ u.f = trueFunction( genCases_f64_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( u.ui, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_az_f64_rx(
+ float64_t trueFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui64_f64 u;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ u.f = genCases_f64_a;
+ writeHex_ui64( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ u.f = trueFunction( genCases_f64_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( u.ui, trueFlags ) ) break;
+ }
+
+}
+
+void gen_abz_f64( float64_t trueFunction( float64_t, float64_t ) )
+{
+ union ui64_f64 u;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_ab_next();
+ u.f = genCases_f64_a;
+ writeHex_ui64( u.ui, ' ' );
+ u.f = genCases_f64_b;
+ writeHex_ui64( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ u.f = trueFunction( genCases_f64_a, genCases_f64_b );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( u.ui, trueFlags ) ) break;
+ }
+
+}
+
+void gen_abcz_f64( float64_t trueFunction( float64_t, float64_t, float64_t ) )
+{
+ union ui64_f64 u;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_abc_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_abc_next();
+ u.f = genCases_f64_a;
+ writeHex_ui64( u.ui, ' ' );
+ u.f = genCases_f64_b;
+ writeHex_ui64( u.ui, ' ' );
+ u.f = genCases_f64_c;
+ writeHex_ui64( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ u.f = trueFunction( genCases_f64_a, genCases_f64_b, genCases_f64_c );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( u.ui, trueFlags ) ) break;
+ }
+
+}
+
+void gen_ab_f64_z_bool( bool trueFunction( float64_t, float64_t ) )
+{
+ union ui64_f64 u;
+ bool trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_ab_next();
+ u.f = genCases_f64_a;
+ writeHex_ui64( u.ui, ' ' );
+ u.f = genCases_f64_b;
+ writeHex_ui64( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, genCases_f64_b );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_bool( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void
+ gen_a_extF80_z_ui32_rx(
+ uint_fast32_t trueFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_extF80_z_ui64_rx(
+ uint_fast64_t trueFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_extF80_z_i32_rx(
+ int_fast32_t trueFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_extF80_z_i64_rx(
+ int_fast64_t trueFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_extF80_z_ui32_x(
+ uint_fast32_t trueFunction( const extFloat80_t *, bool ), bool exact )
+{
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_extF80_z_ui64_x(
+ uint_fast64_t trueFunction( const extFloat80_t *, bool ), bool exact )
+{
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_extF80_z_i32_x(
+ int_fast32_t trueFunction( const extFloat80_t *, bool ), bool exact )
+{
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_extF80_z_i64_x(
+ int_fast64_t trueFunction( const extFloat80_t *, bool ), bool exact )
+{
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef FLOAT16
+
+void gen_a_extF80_z_f16( float16_t trueFunction( const extFloat80_t * ) )
+{
+ union ui16_f16 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( &genCases_extF80_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui16( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void gen_a_extF80_z_f32( float32_t trueFunction( const extFloat80_t * ) )
+{
+ union ui32_f32 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( &genCases_extF80_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef FLOAT64
+
+void gen_a_extF80_z_f64( float64_t trueFunction( const extFloat80_t * ) )
+{
+ union ui64_f64 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( &genCases_extF80_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void
+ gen_a_extF80_z_f128( void trueFunction( const extFloat80_t *, float128_t * ) )
+{
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_extF80_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_f128M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void gen_az_extF80( void trueFunction( const extFloat80_t *, extFloat80_t * ) )
+{
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_extF80_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_extF80M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_az_extF80_rx(
+ void
+ trueFunction( const extFloat80_t *, uint_fast8_t, bool, extFloat80_t * ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_extF80_a, roundingMode, exact, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_extF80M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_abz_extF80(
+ void
+ trueFunction(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * )
+ )
+{
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_ab_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ writeHex_uiExtF80M( &genCases_extF80_b, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_extF80_a, &genCases_extF80_b, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_extF80M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_ab_extF80_z_bool(
+ bool trueFunction( const extFloat80_t *, const extFloat80_t * ) )
+{
+ bool trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_ab_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ writeHex_uiExtF80M( &genCases_extF80_b, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, &genCases_extF80_b );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_bool( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void
+ gen_a_f128_z_ui32_rx(
+ uint_fast32_t trueFunction( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f128_z_ui64_rx(
+ uint_fast64_t trueFunction( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f128_z_i32_rx(
+ int_fast32_t trueFunction( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f128_z_i64_rx(
+ int_fast64_t trueFunction( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f128_z_ui32_x(
+ uint_fast32_t trueFunction( const float128_t *, bool ), bool exact )
+{
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f128_z_ui64_x(
+ uint_fast64_t trueFunction( const float128_t *, bool ), bool exact )
+{
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f128_z_i32_x(
+ int_fast32_t trueFunction( const float128_t *, bool ), bool exact )
+{
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f128_z_i64_x(
+ int_fast64_t trueFunction( const float128_t *, bool ), bool exact )
+{
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef FLOAT16
+
+void gen_a_f128_z_f16( float16_t trueFunction( const float128_t * ) )
+{
+ union ui16_f16 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( &genCases_f128_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui16( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void gen_a_f128_z_f32( float32_t trueFunction( const float128_t * ) )
+{
+ union ui32_f32 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( &genCases_f128_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef FLOAT64
+
+void gen_a_f128_z_f64( float64_t trueFunction( const float128_t * ) )
+{
+ union ui64_f64 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( &genCases_f128_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void
+ gen_a_f128_z_extF80( void trueFunction( const float128_t *, extFloat80_t * ) )
+{
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_f128_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_extF80M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void gen_az_f128( void trueFunction( const float128_t *, float128_t * ) )
+{
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_f128_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_f128M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_az_f128_rx(
+ void trueFunction( const float128_t *, uint_fast8_t, bool, float128_t * ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_f128_a, roundingMode, exact, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_f128M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_abz_f128(
+ void trueFunction( const float128_t *, const float128_t *, float128_t * )
+ )
+{
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_ab_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ writeHex_uiF128M( &genCases_f128_b, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_f128_a, &genCases_f128_b, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_f128M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_abcz_f128(
+ void
+ trueFunction(
+ const float128_t *,
+ const float128_t *,
+ const float128_t *,
+ float128_t *
+ )
+ )
+{
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_abc_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_abc_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ writeHex_uiF128M( &genCases_f128_b, ' ' );
+ writeHex_uiF128M( &genCases_f128_c, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction(
+ &genCases_f128_a, &genCases_f128_b, &genCases_f128_c, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_f128M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_ab_f128_z_bool(
+ bool trueFunction( const float128_t *, const float128_t * ) )
+{
+ bool trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_ab_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ writeHex_uiF128M( &genCases_f128_b, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, &genCases_f128_b );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_bool( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genLoops.h b/src/libs/softfloat-3e/testfloat/source/genLoops.h
new file mode 100644
index 00000000..2ca88c7b
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genLoops.h
@@ -0,0 +1,354 @@
+
+/*============================================================================
+
+This C header file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <signal.h>
+#include "softfloat.h"
+
+extern volatile sig_atomic_t genLoops_stop;
+
+extern bool genLoops_forever;
+extern bool genLoops_givenCount;
+extern uint_fast64_t genLoops_count;
+extern uint_fast8_t *genLoops_trueFlagsPtr;
+
+void gen_a_ui32( void );
+void gen_a_ui64( void );
+void gen_a_i32( void );
+void gen_a_i64( void );
+#ifdef FLOAT16
+void gen_a_f16( void );
+void gen_ab_f16( void );
+void gen_abc_f16( void );
+#endif
+void gen_a_f32( void );
+void gen_ab_f32( void );
+void gen_abc_f32( void );
+#ifdef FLOAT64
+void gen_a_f64( void );
+void gen_ab_f64( void );
+void gen_abc_f64( void );
+#endif
+#ifdef EXTFLOAT80
+void gen_a_extF80( void );
+void gen_ab_extF80( void );
+void gen_abc_extF80( void );
+#endif
+#ifdef FLOAT128
+void gen_a_f128( void );
+void gen_ab_f128( void );
+void gen_abc_f128( void );
+#endif
+
+#ifdef FLOAT16
+void gen_a_ui32_z_f16( float16_t ( uint32_t ) );
+#endif
+void gen_a_ui32_z_f32( float32_t ( uint32_t ) );
+#ifdef FLOAT64
+void gen_a_ui32_z_f64( float64_t ( uint32_t ) );
+#endif
+#ifdef EXTFLOAT80
+void gen_a_ui32_z_extF80( void ( uint32_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void gen_a_ui32_z_f128( void ( uint32_t, float128_t * ) );
+#endif
+#ifdef FLOAT16
+void gen_a_ui64_z_f16( float16_t ( uint64_t ) );
+#endif
+void gen_a_ui64_z_f32( float32_t ( uint64_t ) );
+#ifdef FLOAT64
+void gen_a_ui64_z_f64( float64_t ( uint64_t ) );
+#endif
+#ifdef EXTFLOAT80
+void gen_a_ui64_z_extF80( void ( uint64_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void gen_a_ui64_z_f128( void ( uint64_t, float128_t * ) );
+#endif
+#ifdef FLOAT16
+void gen_a_i32_z_f16( float16_t ( int32_t ) );
+#endif
+void gen_a_i32_z_f32( float32_t ( int32_t ) );
+#ifdef FLOAT64
+void gen_a_i32_z_f64( float64_t ( int32_t ) );
+#endif
+#ifdef EXTFLOAT80
+void gen_a_i32_z_extF80( void ( int32_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void gen_a_i32_z_f128( void ( int32_t, float128_t * ) );
+#endif
+#ifdef FLOAT16
+void gen_a_i64_z_f16( float16_t ( int64_t ) );
+#endif
+void gen_a_i64_z_f32( float32_t ( int64_t ) );
+#ifdef FLOAT64
+void gen_a_i64_z_f64( float64_t ( int64_t ) );
+#endif
+#ifdef EXTFLOAT80
+void gen_a_i64_z_extF80( void ( int64_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void gen_a_i64_z_f128( void ( int64_t, float128_t * ) );
+#endif
+
+#ifdef FLOAT16
+void
+ gen_a_f16_z_ui32_rx(
+ uint_fast32_t ( float16_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ gen_a_f16_z_ui64_rx(
+ uint_fast64_t ( float16_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ gen_a_f16_z_i32_rx(
+ int_fast32_t ( float16_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ gen_a_f16_z_i64_rx(
+ int_fast64_t ( float16_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void gen_a_f16_z_ui32_x( uint_fast32_t ( float16_t, bool ), bool );
+void gen_a_f16_z_ui64_x( uint_fast64_t ( float16_t, bool ), bool );
+void gen_a_f16_z_i32_x( int_fast32_t ( float16_t, bool ), bool );
+void gen_a_f16_z_i64_x( int_fast64_t ( float16_t, bool ), bool );
+void gen_a_f16_z_f32( float32_t ( float16_t ) );
+#ifdef FLOAT64
+void gen_a_f16_z_f64( float64_t ( float16_t ) );
+#endif
+#ifdef EXTFLOAT80
+void gen_a_f16_z_extF80( void ( float16_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void gen_a_f16_z_f128( void ( float16_t, float128_t * ) );
+#endif
+void gen_az_f16( float16_t ( float16_t ) );
+void
+ gen_az_f16_rx(
+ float16_t ( float16_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void gen_abz_f16( float16_t ( float16_t, float16_t ) );
+void gen_abcz_f16( float16_t ( float16_t, float16_t, float16_t ) );
+void gen_ab_f16_z_bool( bool ( float16_t, float16_t ) );
+#endif
+
+void
+ gen_a_f32_z_ui32_rx(
+ uint_fast32_t ( float32_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ gen_a_f32_z_ui64_rx(
+ uint_fast64_t ( float32_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ gen_a_f32_z_i32_rx(
+ int_fast32_t ( float32_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ gen_a_f32_z_i64_rx(
+ int_fast64_t ( float32_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void gen_a_f32_z_ui32_x( uint_fast32_t ( float32_t, bool ), bool );
+void gen_a_f32_z_ui64_x( uint_fast64_t ( float32_t, bool ), bool );
+void gen_a_f32_z_i32_x( int_fast32_t ( float32_t, bool ), bool );
+void gen_a_f32_z_i64_x( int_fast64_t ( float32_t, bool ), bool );
+#ifdef FLOAT16
+void gen_a_f32_z_f16( float16_t ( float32_t ) );
+#endif
+#ifdef FLOAT64
+void gen_a_f32_z_f64( float64_t ( float32_t ) );
+#endif
+#ifdef EXTFLOAT80
+void gen_a_f32_z_extF80( void ( float32_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void gen_a_f32_z_f128( void ( float32_t, float128_t * ) );
+#endif
+void gen_az_f32( float32_t ( float32_t ) );
+void
+ gen_az_f32_rx(
+ float32_t ( float32_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void gen_abz_f32( float32_t ( float32_t, float32_t ) );
+void gen_abcz_f32( float32_t ( float32_t, float32_t, float32_t ) );
+void gen_ab_f32_z_bool( bool ( float32_t, float32_t ) );
+
+#ifdef FLOAT64
+void
+ gen_a_f64_z_ui32_rx(
+ uint_fast32_t ( float64_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ gen_a_f64_z_ui64_rx(
+ uint_fast64_t ( float64_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ gen_a_f64_z_i32_rx(
+ int_fast32_t ( float64_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ gen_a_f64_z_i64_rx(
+ int_fast64_t ( float64_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void gen_a_f64_z_ui32_x( uint_fast32_t ( float64_t, bool ), bool );
+void gen_a_f64_z_ui64_x( uint_fast64_t ( float64_t, bool ), bool );
+void gen_a_f64_z_i32_x( int_fast32_t ( float64_t, bool ), bool );
+void gen_a_f64_z_i64_x( int_fast64_t ( float64_t, bool ), bool );
+#ifdef FLOAT16
+void gen_a_f64_z_f16( float16_t ( float64_t ) );
+#endif
+void gen_a_f64_z_f32( float32_t ( float64_t ) );
+#ifdef EXTFLOAT80
+void gen_a_f64_z_extF80( void ( float64_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void gen_a_f64_z_f128( void ( float64_t, float128_t * ) );
+#endif
+void gen_az_f64( float64_t ( float64_t ) );
+void
+ gen_az_f64_rx(
+ float64_t ( float64_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void gen_abz_f64( float64_t ( float64_t, float64_t ) );
+void gen_abcz_f64( float64_t ( float64_t, float64_t, float64_t ) );
+void gen_ab_f64_z_bool( bool ( float64_t, float64_t ) );
+#endif
+
+#ifdef EXTFLOAT80
+void
+ gen_a_extF80_z_ui32_rx(
+ uint_fast32_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ gen_a_extF80_z_ui64_rx(
+ uint_fast64_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ gen_a_extF80_z_i32_rx(
+ int_fast32_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ gen_a_extF80_z_i64_rx(
+ int_fast64_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ gen_a_extF80_z_ui32_x( uint_fast32_t ( const extFloat80_t *, bool ), bool );
+void
+ gen_a_extF80_z_ui64_x( uint_fast64_t ( const extFloat80_t *, bool ), bool );
+void gen_a_extF80_z_i32_x( int_fast32_t ( const extFloat80_t *, bool ), bool );
+void gen_a_extF80_z_i64_x( int_fast64_t ( const extFloat80_t *, bool ), bool );
+#ifdef FLOAT16
+void gen_a_extF80_z_f16( float16_t ( const extFloat80_t * ) );
+#endif
+void gen_a_extF80_z_f32( float32_t ( const extFloat80_t * ) );
+#ifdef FLOAT64
+void gen_a_extF80_z_f64( float64_t ( const extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void gen_a_extF80_z_f128( void ( const extFloat80_t *, float128_t * ) );
+#endif
+void gen_az_extF80( void ( const extFloat80_t *, extFloat80_t * ) );
+void
+ gen_az_extF80_rx(
+ void ( const extFloat80_t *, uint_fast8_t, bool, extFloat80_t * ),
+ uint_fast8_t,
+ bool
+ );
+void
+ gen_abz_extF80(
+ void ( const extFloat80_t *, const extFloat80_t *, extFloat80_t * ) );
+void
+ gen_ab_extF80_z_bool( bool ( const extFloat80_t *, const extFloat80_t * ) );
+#endif
+
+#ifdef FLOAT128
+void
+ gen_a_f128_z_ui32_rx(
+ uint_fast32_t ( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ gen_a_f128_z_ui64_rx(
+ uint_fast64_t ( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ gen_a_f128_z_i32_rx(
+ int_fast32_t ( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ gen_a_f128_z_i64_rx(
+ int_fast64_t ( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void gen_a_f128_z_ui32_x( uint_fast32_t ( const float128_t *, bool ), bool );
+void gen_a_f128_z_ui64_x( uint_fast64_t ( const float128_t *, bool ), bool );
+void gen_a_f128_z_i32_x( int_fast32_t ( const float128_t *, bool ), bool );
+void gen_a_f128_z_i64_x( int_fast64_t ( const float128_t *, bool ), bool );
+#ifdef FLOAT16
+void gen_a_f128_z_f16( float16_t ( const float128_t * ) );
+#endif
+void gen_a_f128_z_f32( float32_t ( const float128_t * ) );
+#ifdef FLOAT64
+void gen_a_f128_z_f64( float64_t ( const float128_t * ) );
+#endif
+#ifdef EXTFLOAT80
+void gen_a_f128_z_extF80( void ( const float128_t *, extFloat80_t * ) );
+#endif
+void gen_az_f128( void ( const float128_t *, float128_t * ) );
+void
+ gen_az_f128_rx(
+ void ( const float128_t *, uint_fast8_t, bool, float128_t * ),
+ uint_fast8_t,
+ bool
+ );
+void
+ gen_abz_f128( void ( const float128_t *, const float128_t *, float128_t * ) );
+void
+ gen_abcz_f128(
+ void
+ (
+ const float128_t *,
+ const float128_t *,
+ const float128_t *,
+ float128_t *
+ )
+ );
+void gen_ab_f128_z_bool( bool ( const float128_t *, const float128_t * ) );
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/random.c b/src/libs/softfloat-3e/testfloat/source/random.c
new file mode 100644
index 00000000..715c8cc1
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/random.c
@@ -0,0 +1,138 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include <stdlib.h>
+#include "platform.h"
+#include "random.h"
+
+uint_fast8_t random_ui8( void )
+{
+
+ return rand()>>4 & 0xFF;
+
+}
+
+uint_fast16_t random_ui16( void )
+{
+
+ return (rand() & 0x0FF0)<<4 | (rand()>>4 & 0xFF);
+
+}
+
+uint_fast32_t random_ui32( void )
+{
+
+ return
+ (uint_fast32_t) (rand() & 0x0FF0)<<20
+ | (uint_fast32_t) (rand() & 0x0FF0)<<12
+ | (rand() & 0x0FF0)<<4
+ | (rand()>>4 & 0xFF);
+
+}
+
+uint_fast64_t random_ui64( void )
+{
+
+ return (uint_fast64_t) random_ui32()<<32 | random_ui32();
+
+}
+
+uint_fast8_t randomN_ui8( uint_fast8_t N )
+{
+ uint_fast8_t scale, z;
+
+ scale = 0;
+ while ( N < 0x80 ) {
+ ++scale;
+ N <<= 1;
+ }
+ do {
+ z = random_ui8();
+ } while ( N <= z );
+ return z>>scale;
+
+}
+
+uint_fast16_t randomN_ui16( uint_fast16_t N )
+{
+ uint_fast16_t scale, z;
+
+ scale = 0;
+ while ( N < 0x8000 ) {
+ ++scale;
+ N <<= 1;
+ }
+ do {
+ z = random_ui16();
+ } while ( N <= z );
+ return z>>scale;
+
+}
+
+uint_fast32_t randomN_ui32( uint_fast32_t N )
+{
+ uint_fast32_t scale, z;
+
+ scale = 0;
+ while ( N < 0x8000 ) {
+ ++scale;
+ N <<= 1;
+ }
+ do {
+ z = random_ui32();
+ } while ( N <= z );
+ return z>>scale;
+
+}
+
+uint_fast64_t randomN_ui64( uint_fast64_t N )
+{
+ uint_fast64_t scale, z;
+
+ scale = 0;
+ while ( N < 0x8000 ) {
+ ++scale;
+ N <<= 1;
+ }
+ do {
+ z = random_ui64();
+ } while ( N <= z );
+ return z>>scale;
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/random.h b/src/libs/softfloat-3e/testfloat/source/random.h
new file mode 100644
index 00000000..08c8cd27
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/random.h
@@ -0,0 +1,49 @@
+
+/*============================================================================
+
+This C header file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+
+uint_fast8_t random_ui8( void );
+uint_fast16_t random_ui16( void );
+uint_fast32_t random_ui32( void );
+uint_fast64_t random_ui64( void );
+
+uint_fast8_t randomN_ui8( uint_fast8_t );
+uint_fast16_t randomN_ui16( uint_fast16_t );
+uint_fast32_t randomN_ui32( uint_fast32_t );
+uint_fast64_t randomN_ui64( uint_fast64_t );
+
diff --git a/src/libs/softfloat-3e/testfloat/source/readHex.c b/src/libs/softfloat-3e/testfloat/source/readHex.c
new file mode 100644
index 00000000..0e1b50c7
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/readHex.c
@@ -0,0 +1,190 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "readHex.h"
+
+bool readHex_bool( bool *aPtr, char sepChar )
+{
+ int i;
+ bool a;
+
+ i = fgetc( stdin );
+ if ( (i == EOF) || (i < '0') || ('1' < i) ) return false;
+ a = i - '0';
+ if ( sepChar ) {
+ i = fgetc( stdin );
+ if ( (sepChar != '\n') || (i != '\r') ) {
+ if ( i != sepChar ) return false;
+ }
+ }
+ *aPtr = a;
+ return true;
+
+}
+
+bool readHex_ui8( uint_least8_t *aPtr, char sepChar )
+{
+ int i;
+ uint_fast8_t a;
+
+ i = fgetc( stdin );
+ if ( i == EOF ) return false;
+ if ( ('0' <= i) && (i <= '9') ) {
+ i -= '0';
+ } else if ( ('A' <= i) && (i <= 'F') ) {
+ i -= 'A' - 10;
+ } else if ( ('a' <= i) && (i <= 'f') ) {
+ i -= 'a' - 10;
+ } else {
+ return false;
+ }
+ a = i<<4;
+ i = fgetc( stdin );
+ if ( i == EOF ) return false;
+ if ( ('0' <= i) && (i <= '9') ) {
+ i -= '0';
+ } else if ( ('A' <= i) && (i <= 'F') ) {
+ i -= 'A' - 10;
+ } else if ( ('a' <= i) && (i <= 'f') ) {
+ i -= 'a' - 10;
+ } else {
+ return false;
+ }
+ a |= i;
+ if ( sepChar ) {
+ i = fgetc( stdin );
+ if ( (sepChar != '\n') || (i != '\r') ) {
+ if ( i != sepChar ) return false;
+ }
+ }
+ *aPtr = a;
+ return true;
+
+}
+
+bool readHex_ui16( uint16_t *aPtr, char sepChar )
+{
+ int i;
+ uint_fast16_t a;
+
+ i = fgetc( stdin );
+ if ( i == EOF ) return false;
+ if ( ('0' <= i) && (i <= '9') ) {
+ i -= '0';
+ } else if ( ('A' <= i) && (i <= 'F') ) {
+ i -= 'A' - 10;
+ } else if ( ('a' <= i) && (i <= 'f') ) {
+ i -= 'a' - 10;
+ } else {
+ return false;
+ }
+ a = (uint_fast16_t) i<<12;
+ i = fgetc( stdin );
+ if ( i == EOF ) return false;
+ if ( ('0' <= i) && (i <= '9') ) {
+ i -= '0';
+ } else if ( ('A' <= i) && (i <= 'F') ) {
+ i -= 'A' - 10;
+ } else if ( ('a' <= i) && (i <= 'f') ) {
+ i -= 'a' - 10;
+ } else {
+ return false;
+ }
+ a |= (uint_fast16_t) i<<8;
+ i = fgetc( stdin );
+ if ( i == EOF ) return false;
+ if ( ('0' <= i) && (i <= '9') ) {
+ i -= '0';
+ } else if ( ('A' <= i) && (i <= 'F') ) {
+ i -= 'A' - 10;
+ } else if ( ('a' <= i) && (i <= 'f') ) {
+ i -= 'a' - 10;
+ } else {
+ return false;
+ }
+ a |= (uint_fast16_t) i<<4;
+ i = fgetc( stdin );
+ if ( i == EOF ) return false;
+ if ( ('0' <= i) && (i <= '9') ) {
+ i -= '0';
+ } else if ( ('A' <= i) && (i <= 'F') ) {
+ i -= 'A' - 10;
+ } else if ( ('a' <= i) && (i <= 'f') ) {
+ i -= 'a' - 10;
+ } else {
+ return false;
+ }
+ a |= i;
+ if ( sepChar ) {
+ i = fgetc( stdin );
+ if ( (sepChar != '\n') || (i != '\r') ) {
+ if ( i != sepChar ) return false;
+ }
+ }
+ *aPtr = a;
+ return true;
+
+}
+
+bool readHex_ui32( uint32_t *aPtr, char sepChar )
+{
+ uint16_t v16, v0;
+
+ if ( ! readHex_ui16( &v16, 0 ) || ! readHex_ui16( &v0, sepChar ) ) {
+ return false;
+ }
+ *aPtr = (uint_fast32_t) v16<<16 | v0;
+ return true;
+
+}
+
+bool readHex_ui64( uint64_t *aPtr, char sepChar )
+{
+ uint32_t v32, v0;
+
+ if ( ! readHex_ui32( &v32, 0 ) || ! readHex_ui32( &v0, sepChar ) ) {
+ return false;
+ }
+ *aPtr = (uint_fast64_t) v32<<32 | v0;
+ return true;
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/readHex.h b/src/libs/softfloat-3e/testfloat/source/readHex.h
new file mode 100644
index 00000000..ff323812
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/readHex.h
@@ -0,0 +1,46 @@
+
+/*============================================================================
+
+This C header file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+
+bool readHex_bool( bool *, char );
+bool readHex_ui8( uint_least8_t *, char );
+bool readHex_ui16( uint16_t *, char );
+bool readHex_ui32( uint32_t *, char );
+bool readHex_ui64( uint64_t *, char );
+
diff --git a/src/libs/softfloat-3e/testfloat/source/slowfloat.c b/src/libs/softfloat-3e/testfloat/source/slowfloat.c
new file mode 100644
index 00000000..4e84656b
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/slowfloat.c
@@ -0,0 +1,3749 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "uint128.h"
+#include "softfloat.h"
+#include "slowfloat.h"
+
+uint_fast8_t slowfloat_roundingMode;
+uint_fast8_t slowfloat_detectTininess;
+uint_fast8_t slowfloat_exceptionFlags;
+#ifdef EXTFLOAT80
+uint_fast8_t slow_extF80_roundingPrecision;
+#endif
+
+#ifdef FLOAT16
+union ui16_f16 { uint16_t ui; float16_t f; };
+#endif
+union ui32_f32 { uint32_t ui; float32_t f; };
+#ifdef FLOAT64
+union ui64_f64 { uint64_t ui; float64_t f; };
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+struct floatX {
+ bool isNaN;
+ bool isInf;
+ bool isZero;
+ bool sign;
+ int_fast32_t exp;
+ struct uint128 sig;
+};
+
+static const struct floatX floatXNaN =
+ { true, false, false, false, 0, { 0, 0 } };
+static const struct floatX floatXPositiveZero =
+ { false, false, true, false, 0, { 0, 0 } };
+static const struct floatX floatXNegativeZero =
+ { false, false, true, true, 0, { 0, 0 } };
+
+static
+void
+ roundFloatXTo11(
+ bool isTiny, struct floatX *xPtr, uint_fast8_t roundingMode, bool exact )
+{
+ uint_fast64_t roundBits, sigX64;
+
+ sigX64 = xPtr->sig.v64;
+ roundBits = (sigX64 & UINT64_C( 0x1FFFFFFFFFFF )) | (xPtr->sig.v0 != 0);
+ if ( roundBits ) {
+ sigX64 &= UINT64_C( 0xFFFFE00000000000 );
+ if ( exact ) slowfloat_exceptionFlags |= softfloat_flag_inexact;
+ if ( isTiny ) slowfloat_exceptionFlags |= softfloat_flag_underflow;
+ switch ( roundingMode ) {
+ case softfloat_round_near_even:
+ if ( roundBits < UINT64_C( 0x100000000000 ) ) goto noIncrement;
+ if (
+ (roundBits == UINT64_C( 0x100000000000 ))
+ && !(sigX64 & UINT64_C( 0x200000000000 ))
+ ) {
+ goto noIncrement;
+ }
+ break;
+ case softfloat_round_minMag:
+ goto noIncrement;
+ case softfloat_round_min:
+ if ( !xPtr->sign ) goto noIncrement;
+ break;
+ case softfloat_round_max:
+ if ( xPtr->sign ) goto noIncrement;
+ break;
+ case softfloat_round_near_maxMag:
+ if ( roundBits < UINT64_C( 0x100000000000 ) ) goto noIncrement;
+ break;
+#ifdef FLOAT_ROUND_ODD
+ case softfloat_round_odd:
+ sigX64 |= UINT64_C( 0x200000000000 );
+ goto noIncrement;
+#endif
+ }
+ sigX64 += UINT64_C( 0x200000000000 );
+ if ( sigX64 == UINT64_C( 0x0100000000000000 ) ) {
+ ++xPtr->exp;
+ sigX64 = UINT64_C( 0x0080000000000000 );
+ }
+ noIncrement:
+ xPtr->sig.v64 = sigX64;
+ xPtr->sig.v0 = 0;
+ }
+
+}
+
+static
+void
+ roundFloatXTo24(
+ bool isTiny, struct floatX *xPtr, uint_fast8_t roundingMode, bool exact )
+{
+ uint_fast64_t sigX64;
+ uint_fast32_t roundBits;
+
+ sigX64 = xPtr->sig.v64;
+ roundBits = (uint32_t) sigX64 | (xPtr->sig.v0 != 0);
+ if ( roundBits ) {
+ sigX64 &= UINT64_C( 0xFFFFFFFF00000000 );
+ if ( exact ) slowfloat_exceptionFlags |= softfloat_flag_inexact;
+ if ( isTiny ) slowfloat_exceptionFlags |= softfloat_flag_underflow;
+ switch ( roundingMode ) {
+ case softfloat_round_near_even:
+ if ( roundBits < 0x80000000 ) goto noIncrement;
+ if (
+ (roundBits == 0x80000000)
+ && !(sigX64 & UINT64_C( 0x100000000 ))
+ ) {
+ goto noIncrement;
+ }
+ break;
+ case softfloat_round_minMag:
+ goto noIncrement;
+ case softfloat_round_min:
+ if ( !xPtr->sign ) goto noIncrement;
+ break;
+ case softfloat_round_max:
+ if ( xPtr->sign ) goto noIncrement;
+ break;
+ case softfloat_round_near_maxMag:
+ if ( roundBits < 0x80000000 ) goto noIncrement;
+ break;
+#ifdef FLOAT_ROUND_ODD
+ case softfloat_round_odd:
+ sigX64 |= UINT64_C( 0x100000000 );
+ goto noIncrement;
+#endif
+ }
+ sigX64 += UINT64_C( 0x100000000 );
+ if ( sigX64 == UINT64_C( 0x0100000000000000 ) ) {
+ ++xPtr->exp;
+ sigX64 = UINT64_C( 0x0080000000000000 );
+ }
+ noIncrement:
+ xPtr->sig.v64 = sigX64;
+ xPtr->sig.v0 = 0;
+ }
+
+}
+
+static
+void
+ roundFloatXTo53(
+ bool isTiny, struct floatX *xPtr, uint_fast8_t roundingMode, bool exact )
+{
+ uint_fast64_t sigX64;
+ uint_fast8_t roundBits;
+
+ sigX64 = xPtr->sig.v64;
+ roundBits = (sigX64 & 7) | (xPtr->sig.v0 != 0);
+ if ( roundBits ) {
+ sigX64 &= UINT64_C( 0xFFFFFFFFFFFFFFF8 );
+ if ( exact ) slowfloat_exceptionFlags |= softfloat_flag_inexact;
+ if ( isTiny ) slowfloat_exceptionFlags |= softfloat_flag_underflow;
+ switch ( roundingMode ) {
+ case softfloat_round_near_even:
+ if ( roundBits < 4 ) goto noIncrement;
+ if ( (roundBits == 4) && !(sigX64 & 8) ) goto noIncrement;
+ break;
+ case softfloat_round_minMag:
+ goto noIncrement;
+ case softfloat_round_min:
+ if ( !xPtr->sign ) goto noIncrement;
+ break;
+ case softfloat_round_max:
+ if ( xPtr->sign ) goto noIncrement;
+ break;
+ case softfloat_round_near_maxMag:
+ if ( roundBits < 4 ) goto noIncrement;
+ break;
+#ifdef FLOAT_ROUND_ODD
+ case softfloat_round_odd:
+ sigX64 |= 8;
+ goto noIncrement;
+#endif
+ }
+ sigX64 += 8;
+ if ( sigX64 == UINT64_C( 0x0100000000000000 ) ) {
+ ++xPtr->exp;
+ sigX64 = UINT64_C( 0x0080000000000000 );
+ }
+ noIncrement:
+ xPtr->sig.v64 = sigX64;
+ xPtr->sig.v0 = 0;
+ }
+
+}
+
+static
+void
+ roundFloatXTo64(
+ bool isTiny, struct floatX *xPtr, uint_fast8_t roundingMode, bool exact )
+{
+ uint_fast64_t sigX0, roundBits, sigX64;
+
+ sigX0 = xPtr->sig.v0;
+ roundBits = sigX0 & UINT64_C( 0x00FFFFFFFFFFFFFF );
+ if ( roundBits ) {
+ sigX0 &= UINT64_C( 0xFF00000000000000 );
+ if ( exact ) slowfloat_exceptionFlags |= softfloat_flag_inexact;
+ if ( isTiny ) slowfloat_exceptionFlags |= softfloat_flag_underflow;
+ switch ( roundingMode ) {
+ case softfloat_round_near_even:
+ if ( roundBits < UINT64_C( 0x0080000000000000 ) ) goto noIncrement;
+ if (
+ (roundBits == UINT64_C( 0x0080000000000000 ))
+ && !(sigX0 & UINT64_C( 0x0100000000000000 ))
+ ) {
+ goto noIncrement;
+ }
+ break;
+ case softfloat_round_minMag:
+ goto noIncrement;
+ case softfloat_round_min:
+ if ( !xPtr->sign ) goto noIncrement;
+ break;
+ case softfloat_round_max:
+ if ( xPtr->sign ) goto noIncrement;
+ break;
+ case softfloat_round_near_maxMag:
+ if ( roundBits < UINT64_C( 0x0080000000000000 ) ) goto noIncrement;
+ break;
+#ifdef FLOAT_ROUND_ODD
+ case softfloat_round_odd:
+ sigX0 |= UINT64_C( 0x100000000000000 );
+ goto noIncrement;
+#endif
+ }
+ sigX0 += UINT64_C( 0x100000000000000 );
+ sigX64 = xPtr->sig.v64 + !sigX0;
+ if ( sigX64 == UINT64_C( 0x0100000000000000 ) ) {
+ ++xPtr->exp;
+ sigX64 = UINT64_C( 0x0080000000000000 );
+ }
+ xPtr->sig.v64 = sigX64;
+ noIncrement:
+ xPtr->sig.v0 = sigX0;
+ }
+
+}
+
+static
+void
+ roundFloatXTo113(
+ bool isTiny, struct floatX *xPtr, uint_fast8_t roundingMode, bool exact )
+{
+ uint_fast64_t sigX0;
+ uint_fast8_t roundBits;
+ uint_fast64_t sigX64;
+
+ sigX0 = xPtr->sig.v0;
+ roundBits = sigX0 & 0x7F;
+ if ( roundBits ) {
+ sigX0 &= UINT64_C( 0xFFFFFFFFFFFFFF80 );
+ if ( exact ) slowfloat_exceptionFlags |= softfloat_flag_inexact;
+ if ( isTiny ) slowfloat_exceptionFlags |= softfloat_flag_underflow;
+ switch ( roundingMode ) {
+ case softfloat_round_near_even:
+ if ( roundBits < 0x40 ) goto noIncrement;
+ if ( (roundBits == 0x40) && !(sigX0 & 0x80) ) goto noIncrement;
+ break;
+ case softfloat_round_minMag:
+ goto noIncrement;
+ case softfloat_round_min:
+ if ( !xPtr->sign ) goto noIncrement;
+ break;
+ case softfloat_round_max:
+ if ( xPtr->sign ) goto noIncrement;
+ break;
+ case softfloat_round_near_maxMag:
+ if ( roundBits < 0x40 ) goto noIncrement;
+ break;
+#ifdef FLOAT_ROUND_ODD
+ case softfloat_round_odd:
+ sigX0 |= 0x80;
+ goto noIncrement;
+#endif
+ }
+ sigX0 += 0x80;
+ sigX64 = xPtr->sig.v64 + !sigX0;
+ if ( sigX64 == UINT64_C( 0x0100000000000000 ) ) {
+ ++xPtr->exp;
+ sigX64 = UINT64_C( 0x0080000000000000 );
+ }
+ xPtr->sig.v64 = sigX64;
+ noIncrement:
+ xPtr->sig.v0 = sigX0;
+ }
+
+}
+
+static void ui32ToFloatX( uint_fast32_t a, struct floatX *xPtr )
+{
+ uint_fast64_t sig64;
+ int_fast32_t exp;
+
+ xPtr->isNaN = false;
+ xPtr->isInf = false;
+ xPtr->sign = false;
+ sig64 = a;
+ if ( a ) {
+ xPtr->isZero = false;
+ exp = 31;
+ sig64 <<= 24;
+ while ( sig64 < UINT64_C( 0x0080000000000000 ) ) {
+ --exp;
+ sig64 <<= 1;
+ }
+ xPtr->exp = exp;
+ } else {
+ xPtr->isZero = true;
+ }
+ xPtr->sig.v64 = sig64;
+ xPtr->sig.v0 = 0;
+
+}
+
+static
+uint_fast32_t
+ floatXToUI32(
+ const struct floatX *xPtr, uint_fast8_t roundingMode, bool exact )
+{
+ uint_fast8_t savedExceptionFlags;
+ struct floatX x;
+ int_fast32_t shiftDist;
+ uint_fast32_t z;
+
+ if ( xPtr->isInf || xPtr->isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ return (xPtr->isInf && xPtr->sign) ? 0 : 0xFFFFFFFF;
+ }
+ if ( xPtr->isZero ) return 0;
+ savedExceptionFlags = slowfloat_exceptionFlags;
+ x = *xPtr;
+ shiftDist = 52 - x.exp;
+ if ( 56 < shiftDist ) {
+ x.sig.v64 = 0;
+ x.sig.v0 = 1;
+ } else {
+ while ( 0 < shiftDist ) {
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ --shiftDist;
+ }
+ }
+ roundFloatXTo53( false, &x, roundingMode, exact );
+ x.sig = shortShiftRightJam128( x.sig, 3 );
+ z = x.sig.v64;
+ if ( (shiftDist < 0) || x.sig.v64>>32 || (x.sign && z) ) {
+ slowfloat_exceptionFlags =
+ savedExceptionFlags | softfloat_flag_invalid;
+ return x.sign ? 0 : 0xFFFFFFFF;
+ }
+ return z;
+
+}
+
+static void ui64ToFloatX( uint_fast64_t a, struct floatX *xPtr )
+{
+ struct uint128 sig;
+ int_fast32_t exp;
+
+ xPtr->isNaN = false;
+ xPtr->isInf = false;
+ xPtr->sign = false;
+ sig.v64 = 0;
+ sig.v0 = a;
+ if ( a ) {
+ xPtr->isZero = false;
+ exp = 63;
+ sig = shortShiftLeft128( sig, 56 );
+ while ( sig.v64 < UINT64_C( 0x0080000000000000 ) ) {
+ --exp;
+ sig = shortShiftLeft128( sig, 1 );
+ }
+ xPtr->exp = exp;
+ } else {
+ xPtr->isZero = true;
+ }
+ xPtr->sig = sig;
+
+}
+
+static
+uint_fast64_t
+ floatXToUI64(
+ const struct floatX *xPtr, uint_fast8_t roundingMode, bool exact )
+{
+ uint_fast8_t savedExceptionFlags;
+ struct floatX x;
+ int_fast32_t shiftDist;
+ uint_fast64_t z;
+
+ if ( xPtr->isInf || xPtr->isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ return
+ (xPtr->isInf && xPtr->sign) ? 0 : UINT64_C( 0xFFFFFFFFFFFFFFFF );
+ }
+ if ( xPtr->isZero ) return 0;
+ savedExceptionFlags = slowfloat_exceptionFlags;
+ x = *xPtr;
+ shiftDist = 112 - x.exp;
+ if ( 116 < shiftDist ) {
+ x.sig.v64 = 0;
+ x.sig.v0 = 1;
+ } else {
+ while ( 0 < shiftDist ) {
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ --shiftDist;
+ }
+ }
+ roundFloatXTo113( false, &x, roundingMode, exact );
+ x.sig = shortShiftRightJam128( x.sig, 7 );
+ z = x.sig.v0;
+ if ( (shiftDist < 0) || x.sig.v64 || (x.sign && z) ) {
+ slowfloat_exceptionFlags =
+ savedExceptionFlags | softfloat_flag_invalid;
+ return x.sign ? 0 : UINT64_C( 0xFFFFFFFFFFFFFFFF );
+ }
+ return z;
+
+}
+
+static void i32ToFloatX( int_fast32_t a, struct floatX *xPtr )
+{
+ bool sign;
+ uint_fast64_t sig64;
+ int_fast32_t exp;
+
+ xPtr->isNaN = false;
+ xPtr->isInf = false;
+ sign = (a < 0);
+ xPtr->sign = sign;
+ sig64 = sign ? -(uint64_t) a : a;
+ if ( a ) {
+ xPtr->isZero = false;
+ exp = 31;
+ sig64 <<= 24;
+ while ( sig64 < UINT64_C( 0x0080000000000000 ) ) {
+ --exp;
+ sig64 <<= 1;
+ }
+ xPtr->exp = exp;
+ } else {
+ xPtr->isZero = true;
+ }
+ xPtr->sig.v64 = sig64;
+ xPtr->sig.v0 = 0;
+
+}
+
+static
+int_fast32_t
+ floatXToI32(
+ const struct floatX *xPtr, uint_fast8_t roundingMode, bool exact )
+{
+ uint_fast8_t savedExceptionFlags;
+ struct floatX x;
+ int_fast32_t shiftDist;
+ union { uint32_t ui; int32_t i; } uZ;
+
+ if ( xPtr->isInf || xPtr->isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ return (xPtr->isInf && xPtr->sign) ? -0x7FFFFFFF - 1 : 0x7FFFFFFF;
+ }
+ if ( xPtr->isZero ) return 0;
+ savedExceptionFlags = slowfloat_exceptionFlags;
+ x = *xPtr;
+ shiftDist = 52 - x.exp;
+ if ( 56 < shiftDist ) {
+ x.sig.v64 = 0;
+ x.sig.v0 = 1;
+ } else {
+ while ( 0 < shiftDist ) {
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ --shiftDist;
+ }
+ }
+ roundFloatXTo53( false, &x, roundingMode, exact );
+ x.sig = shortShiftRightJam128( x.sig, 3 );
+ uZ.ui = x.sig.v64;
+ if ( x.sign ) uZ.ui = -uZ.ui;
+ if (
+ (shiftDist < 0) || x.sig.v64>>32
+ || ((uZ.i != 0) && (x.sign != (uZ.i < 0)))
+ ) {
+ slowfloat_exceptionFlags =
+ savedExceptionFlags | softfloat_flag_invalid;
+ return x.sign ? -0x7FFFFFFF - 1 : 0x7FFFFFFF;
+ }
+ return uZ.i;
+
+}
+
+static void i64ToFloatX( int_fast64_t a, struct floatX *xPtr )
+{
+ bool sign;
+ struct uint128 sig;
+ int_fast32_t exp;
+
+ xPtr->isNaN = false;
+ xPtr->isInf = false;
+ sign = (a < 0);
+ xPtr->sign = sign;
+ sig.v64 = 0;
+ sig.v0 = sign ? -(uint_fast64_t) a : a;
+ if ( a ) {
+ xPtr->isZero = false;
+ exp = 63;
+ sig = shortShiftLeft128( sig, 56 );
+ while ( sig.v64 < UINT64_C( 0x0080000000000000 ) ) {
+ --exp;
+ sig = shortShiftLeft128( sig, 1 );
+ }
+ xPtr->exp = exp;
+ } else {
+ xPtr->isZero = true;
+ }
+ xPtr->sig = sig;
+
+}
+
+static
+int_fast64_t
+ floatXToI64(
+ const struct floatX *xPtr, uint_fast8_t roundingMode, bool exact )
+{
+ uint_fast8_t savedExceptionFlags;
+ struct floatX x;
+ int_fast32_t shiftDist;
+ union { uint64_t ui; int64_t i; } uZ;
+
+ if ( xPtr->isInf || xPtr->isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ return
+ (xPtr->isInf && xPtr->sign) ? -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1
+ : INT64_C( 0x7FFFFFFFFFFFFFFF );
+ }
+ if ( xPtr->isZero ) return 0;
+ savedExceptionFlags = slowfloat_exceptionFlags;
+ x = *xPtr;
+ shiftDist = 112 - x.exp;
+ if ( 116 < shiftDist ) {
+ x.sig.v64 = 0;
+ x.sig.v0 = 1;
+ } else {
+ while ( 0 < shiftDist ) {
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ --shiftDist;
+ }
+ }
+ roundFloatXTo113( false, &x, roundingMode, exact );
+ x.sig = shortShiftRightJam128( x.sig, 7 );
+ uZ.ui = x.sig.v0;
+ if ( x.sign ) uZ.ui = -uZ.ui;
+ if (
+ (shiftDist < 0) || x.sig.v64 || ((uZ.i != 0) && (x.sign != (uZ.i < 0)))
+ ) {
+ slowfloat_exceptionFlags =
+ savedExceptionFlags | softfloat_flag_invalid;
+ return
+ x.sign ? -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1
+ : INT64_C( 0x7FFFFFFFFFFFFFFF );
+ }
+ return uZ.i;
+
+}
+
+#ifdef FLOAT16
+
+static void f16ToFloatX( float16_t a, struct floatX *xPtr )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ int_fast8_t exp;
+ uint_fast64_t sig64;
+
+ uA.f = a;
+ uiA = uA.ui;
+ xPtr->isNaN = false;
+ xPtr->isInf = false;
+ xPtr->isZero = false;
+ xPtr->sign = ((uiA & 0x8000) != 0);
+ exp = uiA>>10 & 0x1F;
+ sig64 = uiA & 0x03FF;
+ sig64 <<= 45;
+ if ( exp == 0x1F ) {
+ if ( sig64 ) {
+ xPtr->isNaN = true;
+ } else {
+ xPtr->isInf = true;
+ }
+ } else if ( !exp ) {
+ if ( !sig64 ) {
+ xPtr->isZero = true;
+ } else {
+ exp = 1 - 0xF;
+ do {
+ --exp;
+ sig64 <<= 1;
+ } while ( sig64 < UINT64_C( 0x0080000000000000 ) );
+ xPtr->exp = exp;
+ }
+ } else {
+ xPtr->exp = exp - 0xF;
+ sig64 |= UINT64_C( 0x0080000000000000 );
+ }
+ xPtr->sig.v64 = sig64;
+ xPtr->sig.v0 = 0;
+
+}
+
+static float16_t floatXToF16( const struct floatX *xPtr )
+{
+ uint_fast16_t uiZ;
+ struct floatX x, savedX;
+ bool isTiny;
+ int_fast32_t exp;
+ union ui16_f16 uZ;
+
+ if ( xPtr->isNaN ) {
+ uiZ = 0xFFFF;
+ goto uiZ;
+ }
+ if ( xPtr->isInf ) {
+ uiZ = xPtr->sign ? 0xFC00 : 0x7C00;
+ goto uiZ;
+ }
+ if ( xPtr->isZero ) {
+ uiZ = xPtr->sign ? 0x8000 : 0;
+ goto uiZ;
+ }
+ x = *xPtr;
+ while ( UINT64_C( 0x0100000000000000 ) <= x.sig.v64 ) {
+ ++x.exp;
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ }
+ while ( x.sig.v64 < UINT64_C( 0x0080000000000000 ) ) {
+ --x.exp;
+ x.sig = shortShiftLeft128( x.sig, 1 );
+ }
+ savedX = x;
+ isTiny =
+ (slowfloat_detectTininess == softfloat_tininess_beforeRounding)
+ && (x.exp + 0xF <= 0);
+ roundFloatXTo11( isTiny, &x, slowfloat_roundingMode, true );
+ exp = x.exp + 0xF;
+ if ( 0x1F <= exp ) {
+ slowfloat_exceptionFlags |=
+ softfloat_flag_overflow | softfloat_flag_inexact;
+ if ( x.sign ) {
+ switch ( slowfloat_roundingMode ) {
+ case softfloat_round_near_even:
+ case softfloat_round_min:
+ case softfloat_round_near_maxMag:
+ uiZ = 0xFC00;
+ break;
+ case softfloat_round_minMag:
+ case softfloat_round_max:
+ case softfloat_round_odd:
+ uiZ = 0xFBFF;
+ break;
+ }
+ } else {
+ switch ( slowfloat_roundingMode ) {
+ case softfloat_round_near_even:
+ case softfloat_round_max:
+ case softfloat_round_near_maxMag:
+ uiZ = 0x7C00;
+ break;
+ case softfloat_round_minMag:
+ case softfloat_round_min:
+ case softfloat_round_odd:
+ uiZ = 0x7BFF;
+ break;
+ }
+ }
+ goto uiZ;
+ }
+ if ( exp <= 0 ) {
+ isTiny = true;
+ x = savedX;
+ exp = x.exp + 0xF;
+ if ( exp < -14 ) {
+ x.sig.v0 = (x.sig.v64 != 0) || (x.sig.v0 != 0);
+ x.sig.v64 = 0;
+ } else {
+ while ( exp <= 0 ) {
+ ++exp;
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ }
+ }
+ roundFloatXTo11( isTiny, &x, slowfloat_roundingMode, true );
+ exp = (UINT64_C( 0x0080000000000000 ) <= x.sig.v64) ? 1 : 0;
+ }
+ uiZ = (uint_fast16_t) exp<<10;
+ if ( x.sign ) uiZ |= 0x8000;
+ uiZ |= x.sig.v64>>45 & 0x03FF;
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
+#endif
+
+static void f32ToFloatX( float32_t a, struct floatX *xPtr )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ int_fast16_t exp;
+ uint_fast64_t sig64;
+
+ uA.f = a;
+ uiA = uA.ui;
+ xPtr->isNaN = false;
+ xPtr->isInf = false;
+ xPtr->isZero = false;
+ xPtr->sign = ((uiA & 0x80000000) != 0);
+ exp = uiA>>23 & 0xFF;
+ sig64 = uiA & 0x007FFFFF;
+ sig64 <<= 32;
+ if ( exp == 0xFF ) {
+ if ( sig64 ) {
+ xPtr->isNaN = true;
+ } else {
+ xPtr->isInf = true;
+ }
+ } else if ( !exp ) {
+ if ( !sig64 ) {
+ xPtr->isZero = true;
+ } else {
+ exp = 1 - 0x7F;
+ do {
+ --exp;
+ sig64 <<= 1;
+ } while ( sig64 < UINT64_C( 0x0080000000000000 ) );
+ xPtr->exp = exp;
+ }
+ } else {
+ xPtr->exp = exp - 0x7F;
+ sig64 |= UINT64_C( 0x0080000000000000 );
+ }
+ xPtr->sig.v64 = sig64;
+ xPtr->sig.v0 = 0;
+
+}
+
+static float32_t floatXToF32( const struct floatX *xPtr )
+{
+ uint_fast32_t uiZ;
+ struct floatX x, savedX;
+ bool isTiny;
+ int_fast32_t exp;
+ union ui32_f32 uZ;
+
+ if ( xPtr->isNaN ) {
+ uiZ = 0xFFFFFFFF;
+ goto uiZ;
+ }
+ if ( xPtr->isInf ) {
+ uiZ = xPtr->sign ? 0xFF800000 : 0x7F800000;
+ goto uiZ;
+ }
+ if ( xPtr->isZero ) {
+ uiZ = xPtr->sign ? 0x80000000 : 0;
+ goto uiZ;
+ }
+ x = *xPtr;
+ while ( UINT64_C( 0x0100000000000000 ) <= x.sig.v64 ) {
+ ++x.exp;
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ }
+ while ( x.sig.v64 < UINT64_C( 0x0080000000000000 ) ) {
+ --x.exp;
+ x.sig = shortShiftLeft128( x.sig, 1 );
+ }
+ savedX = x;
+ isTiny =
+ (slowfloat_detectTininess == softfloat_tininess_beforeRounding)
+ && (x.exp + 0x7F <= 0);
+ roundFloatXTo24( isTiny, &x, slowfloat_roundingMode, true );
+ exp = x.exp + 0x7F;
+ if ( 0xFF <= exp ) {
+ slowfloat_exceptionFlags |=
+ softfloat_flag_overflow | softfloat_flag_inexact;
+ if ( x.sign ) {
+ switch ( slowfloat_roundingMode ) {
+ case softfloat_round_near_even:
+ case softfloat_round_min:
+ case softfloat_round_near_maxMag:
+ uiZ = 0xFF800000;
+ break;
+ case softfloat_round_minMag:
+ case softfloat_round_max:
+ case softfloat_round_odd:
+ uiZ = 0xFF7FFFFF;
+ break;
+ }
+ } else {
+ switch ( slowfloat_roundingMode ) {
+ case softfloat_round_near_even:
+ case softfloat_round_max:
+ case softfloat_round_near_maxMag:
+ uiZ = 0x7F800000;
+ break;
+ case softfloat_round_minMag:
+ case softfloat_round_min:
+ case softfloat_round_odd:
+ uiZ = 0x7F7FFFFF;
+ break;
+ }
+ }
+ goto uiZ;
+ }
+ if ( exp <= 0 ) {
+ isTiny = true;
+ x = savedX;
+ exp = x.exp + 0x7F;
+ if ( exp < -27 ) {
+ x.sig.v0 = (x.sig.v64 != 0) || (x.sig.v0 != 0);
+ x.sig.v64 = 0;
+ } else {
+ while ( exp <= 0 ) {
+ ++exp;
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ }
+ }
+ roundFloatXTo24( isTiny, &x, slowfloat_roundingMode, true );
+ exp = (UINT64_C( 0x0080000000000000 ) <= x.sig.v64) ? 1 : 0;
+ }
+ uiZ = (uint_fast32_t) exp<<23;
+ if ( x.sign ) uiZ |= 0x80000000;
+ uiZ |= x.sig.v64>>32 & 0x007FFFFF;
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
+#ifdef FLOAT64
+
+static void f64ToFloatX( float64_t a, struct floatX *xPtr )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ int_fast16_t exp;
+ uint_fast64_t sig64;
+
+ uA.f = a;
+ uiA = uA.ui;
+ xPtr->isNaN = false;
+ xPtr->isInf = false;
+ xPtr->isZero = false;
+ xPtr->sign = ((uiA & UINT64_C( 0x8000000000000000 )) != 0);
+ exp = uiA>>52 & 0x7FF;
+ sig64 = uiA & UINT64_C( 0x000FFFFFFFFFFFFF );
+ if ( exp == 0x7FF ) {
+ if ( sig64 ) {
+ xPtr->isNaN = true;
+ } else {
+ xPtr->isInf = true;
+ }
+ } else if ( !exp ) {
+ if ( !sig64 ) {
+ xPtr->isZero = true;
+ } else {
+ exp = 1 - 0x3FF;
+ do {
+ --exp;
+ sig64 <<= 1;
+ } while ( sig64 < UINT64_C( 0x0010000000000000 ) );
+ xPtr->exp = exp;
+ }
+ } else {
+ xPtr->exp = exp - 0x3FF;
+ sig64 |= UINT64_C( 0x0010000000000000 );
+ }
+ xPtr->sig.v64 = sig64<<3;
+ xPtr->sig.v0 = 0;
+
+}
+
+static float64_t floatXToF64( const struct floatX *xPtr )
+{
+ uint_fast64_t uiZ;
+ struct floatX x, savedX;
+ bool isTiny;
+ int_fast32_t exp;
+ union ui64_f64 uZ;
+
+ if ( xPtr->isNaN ) {
+ uiZ = UINT64_C( 0xFFFFFFFFFFFFFFFF );
+ goto uiZ;
+ }
+ if ( xPtr->isInf ) {
+ uiZ =
+ xPtr->sign ? UINT64_C( 0xFFF0000000000000 )
+ : UINT64_C( 0x7FF0000000000000 );
+ goto uiZ;
+ }
+ if ( xPtr->isZero ) {
+ uiZ = xPtr->sign ? UINT64_C( 0x8000000000000000 ) : 0;
+ goto uiZ;
+ }
+ x = *xPtr;
+ while ( UINT64_C( 0x0100000000000000 ) <= x.sig.v64 ) {
+ ++x.exp;
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ }
+ while ( x.sig.v64 < UINT64_C( 0x0080000000000000 ) ) {
+ --x.exp;
+ x.sig = shortShiftLeft128( x.sig, 1 );
+ }
+ savedX = x;
+ isTiny =
+ (slowfloat_detectTininess == softfloat_tininess_beforeRounding)
+ && (x.exp + 0x3FF <= 0);
+ roundFloatXTo53( isTiny, &x, slowfloat_roundingMode, true );
+ exp = x.exp + 0x3FF;
+ if ( 0x7FF <= exp ) {
+ slowfloat_exceptionFlags |=
+ softfloat_flag_overflow | softfloat_flag_inexact;
+ if ( x.sign ) {
+ switch ( slowfloat_roundingMode ) {
+ case softfloat_round_near_even:
+ case softfloat_round_min:
+ case softfloat_round_near_maxMag:
+ uiZ = UINT64_C( 0xFFF0000000000000 );
+ break;
+ case softfloat_round_minMag:
+ case softfloat_round_max:
+ case softfloat_round_odd:
+ uiZ = UINT64_C( 0xFFEFFFFFFFFFFFFF );
+ break;
+ }
+ } else {
+ switch ( slowfloat_roundingMode ) {
+ case softfloat_round_near_even:
+ case softfloat_round_max:
+ case softfloat_round_near_maxMag:
+ uiZ = UINT64_C( 0x7FF0000000000000 );
+ break;
+ case softfloat_round_minMag:
+ case softfloat_round_min:
+ case softfloat_round_odd:
+ uiZ = UINT64_C( 0x7FEFFFFFFFFFFFFF );
+ break;
+ }
+ }
+ goto uiZ;
+ }
+ if ( exp <= 0 ) {
+ isTiny = true;
+ x = savedX;
+ exp = x.exp + 0x3FF;
+ if ( exp < -56 ) {
+ x.sig.v0 = (x.sig.v64 != 0) || (x.sig.v0 != 0);
+ x.sig.v64 = 0;
+ } else {
+ while ( exp <= 0 ) {
+ ++exp;
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ }
+ }
+ roundFloatXTo53( isTiny, &x, slowfloat_roundingMode, true );
+ exp = (UINT64_C( 0x0080000000000000 ) <= x.sig.v64) ? 1 : 0;
+ }
+ uiZ = (uint_fast64_t) exp<<52;
+ if ( x.sign ) uiZ |= UINT64_C( 0x8000000000000000 );
+ uiZ |= x.sig.v64>>3 & UINT64_C( 0x000FFFFFFFFFFFFF );
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+static void extF80MToFloatX( const extFloat80_t *aPtr, struct floatX *xPtr )
+{
+ const struct extFloat80M *aSPtr;
+ uint_fast16_t uiA64;
+ int_fast32_t exp;
+ struct uint128 sig;
+
+ aSPtr = (const struct extFloat80M *) aPtr;
+ xPtr->isNaN = false;
+ xPtr->isInf = false;
+ xPtr->isZero = false;
+ uiA64 = aSPtr->signExp;
+ xPtr->sign = ((uiA64 & 0x8000) != 0);
+ exp = uiA64 & 0x7FFF;
+ sig.v64 = 0;
+ sig.v0 = aSPtr->signif;
+ if ( exp == 0x7FFF ) {
+ if ( sig.v0 & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) {
+ xPtr->isNaN = true;
+ } else {
+ xPtr->isInf = true;
+ }
+ } else {
+ if ( !exp ) ++exp;
+ exp -= 0x3FFF;
+ if ( !(sig.v0 & UINT64_C( 0x8000000000000000 )) ) {
+ if ( !sig.v0 ) {
+ xPtr->isZero = true;
+ } else {
+ do {
+ --exp;
+ sig.v0 <<= 1;
+ } while ( sig.v0 < UINT64_C( 0x8000000000000000 ) );
+ }
+ }
+ xPtr->exp = exp;
+ }
+ xPtr->sig = shortShiftLeft128( sig, 56 );
+
+}
+
+static void floatXToExtF80M( const struct floatX *xPtr, extFloat80_t *zPtr )
+{
+ struct extFloat80M *zSPtr;
+ struct floatX x, savedX;
+ bool isTiny;
+ int_fast32_t exp;
+ uint_fast64_t uiZ0;
+ uint_fast16_t uiZ64;
+
+ zSPtr = (struct extFloat80M *) zPtr;
+ if ( xPtr->isNaN ) {
+ zSPtr->signExp = 0xFFFF;
+ zSPtr->signif = UINT64_C( 0xFFFFFFFFFFFFFFFF );
+ return;
+ }
+ if ( xPtr->isInf ) {
+ zSPtr->signExp = xPtr->sign ? 0xFFFF : 0x7FFF;
+ zSPtr->signif = UINT64_C( 0x8000000000000000 );
+ return;
+ }
+ if ( xPtr->isZero ) {
+ zSPtr->signExp = xPtr->sign ? 0x8000 : 0;
+ zSPtr->signif = 0;
+ return;
+ }
+ x = *xPtr;
+ while ( UINT64_C( 0x0100000000000000 ) <= x.sig.v64 ) {
+ ++x.exp;
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ }
+ while ( x.sig.v64 < UINT64_C( 0x0080000000000000 ) ) {
+ --x.exp;
+ x.sig = shortShiftLeft128( x.sig, 1 );
+ }
+ savedX = x;
+ isTiny =
+ (slowfloat_detectTininess == softfloat_tininess_beforeRounding)
+ && (x.exp + 0x3FFF <= 0);
+ switch ( slow_extF80_roundingPrecision ) {
+ case 32:
+ roundFloatXTo24( isTiny, &x, slowfloat_roundingMode, true );
+ break;
+ case 64:
+ roundFloatXTo53( isTiny, &x, slowfloat_roundingMode, true );
+ break;
+ default:
+ roundFloatXTo64( isTiny, &x, slowfloat_roundingMode, true );
+ break;
+ }
+ exp = x.exp + 0x3FFF;
+ if ( 0x7FFF <= exp ) {
+ slowfloat_exceptionFlags |=
+ softfloat_flag_overflow | softfloat_flag_inexact;
+ if ( x.sign ) {
+ switch ( slowfloat_roundingMode ) {
+ case softfloat_round_near_even:
+ case softfloat_round_min:
+ case softfloat_round_near_maxMag:
+ zSPtr->signExp = 0xFFFF;
+ zSPtr->signif = UINT64_C( 0x8000000000000000 );
+ break;
+ case softfloat_round_minMag:
+ case softfloat_round_max:
+ case softfloat_round_odd:
+ switch ( slow_extF80_roundingPrecision ) {
+ case 32:
+ uiZ0 = UINT64_C( 0xFFFFFF0000000000 );
+ break;
+ case 64:
+ uiZ0 = UINT64_C( 0xFFFFFFFFFFFFF800 );
+ break;
+ default:
+ uiZ0 = UINT64_C( 0xFFFFFFFFFFFFFFFF );
+ break;
+ }
+ zSPtr->signExp = 0xFFFE;
+ zSPtr->signif = uiZ0;
+ break;
+ }
+ } else {
+ switch ( slowfloat_roundingMode ) {
+ case softfloat_round_near_even:
+ case softfloat_round_max:
+ case softfloat_round_near_maxMag:
+ zSPtr->signExp = 0x7FFF;
+ zSPtr->signif = UINT64_C( 0x8000000000000000 );
+ break;
+ case softfloat_round_minMag:
+ case softfloat_round_min:
+ case softfloat_round_odd:
+ switch ( slow_extF80_roundingPrecision ) {
+ case 32:
+ uiZ0 = UINT64_C( 0xFFFFFF0000000000 );
+ break;
+ case 64:
+ uiZ0 = UINT64_C( 0xFFFFFFFFFFFFF800 );
+ break;
+ default:
+ uiZ0 = UINT64_C( 0xFFFFFFFFFFFFFFFF );
+ break;
+ }
+ zSPtr->signExp = 0x7FFE;
+ zSPtr->signif = uiZ0;
+ break;
+ }
+ }
+ return;
+ }
+ if ( exp <= 0 ) {
+ isTiny = true;
+ x = savedX;
+ exp = x.exp + 0x3FFF;
+ if ( exp < -70 ) {
+ x.sig.v0 = (x.sig.v64 != 0) || (x.sig.v0 != 0);
+ x.sig.v64 = 0;
+ } else {
+ while ( exp <= 0 ) {
+ ++exp;
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ }
+ }
+ switch ( slow_extF80_roundingPrecision ) {
+ case 32:
+ roundFloatXTo24( isTiny, &x, slowfloat_roundingMode, true );
+ break;
+ case 64:
+ roundFloatXTo53( isTiny, &x, slowfloat_roundingMode, true );
+ break;
+ default:
+ roundFloatXTo64( isTiny, &x, slowfloat_roundingMode, true );
+ break;
+ }
+ exp = (UINT64_C( 0x0080000000000000 ) <= x.sig.v64) ? 1 : 0;
+ }
+ uiZ64 = exp;
+ if ( x.sign ) uiZ64 |= 0x8000;
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = shortShiftRightJam128( x.sig, 56 ).v0;
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+static void f128MToFloatX( const float128_t *aPtr, struct floatX *xPtr )
+{
+ const struct uint128 *uiAPtr;
+ uint_fast64_t uiA64;
+ int_fast32_t exp;
+ struct uint128 sig;
+
+ uiAPtr = (const struct uint128 *) aPtr;
+ xPtr->isNaN = false;
+ xPtr->isInf = false;
+ xPtr->isZero = false;
+ uiA64 = uiAPtr->v64;
+ xPtr->sign = ((uiA64 & UINT64_C( 0x8000000000000000 )) != 0);
+ exp = uiA64>>48 & 0x7FFF;
+ sig.v64 = uiA64 & UINT64_C( 0x0000FFFFFFFFFFFF );
+ sig.v0 = uiAPtr->v0;
+ if ( exp == 0x7FFF ) {
+ if ( sig.v64 || sig.v0 ) {
+ xPtr->isNaN = true;
+ } else {
+ xPtr->isInf = true;
+ }
+ } else if ( !exp ) {
+ if ( !sig.v64 && !sig.v0 ) {
+ xPtr->isZero = true;
+ } else {
+ exp = 1 - 0x3FFF;
+ do {
+ --exp;
+ sig = shortShiftLeft128( sig, 1 );
+ } while ( sig.v64 < UINT64_C( 0x0001000000000000 ) );
+ xPtr->exp = exp;
+ }
+ } else {
+ xPtr->exp = exp - 0x3FFF;
+ sig.v64 |= UINT64_C( 0x0001000000000000 );
+ }
+ xPtr->sig = shortShiftLeft128( sig, 7 );
+
+}
+
+static void floatXToF128M( const struct floatX *xPtr, float128_t *zPtr )
+{
+ struct uint128 *uiZPtr;
+ struct floatX x, savedX;
+ bool isTiny;
+ int_fast32_t exp;
+ uint_fast64_t uiZ64;
+
+ uiZPtr = (struct uint128 *) zPtr;
+ if ( xPtr->isNaN ) {
+ uiZPtr->v64 = uiZPtr->v0 = UINT64_C( 0xFFFFFFFFFFFFFFFF );
+ return;
+ }
+ if ( xPtr->isInf ) {
+ uiZPtr->v64 =
+ xPtr->sign ? UINT64_C( 0xFFFF000000000000 )
+ : UINT64_C( 0x7FFF000000000000 );
+ uiZPtr->v0 = 0;
+ return;
+ }
+ if ( xPtr->isZero ) {
+ uiZPtr->v64 = xPtr->sign ? UINT64_C( 0x8000000000000000 ) : 0;
+ uiZPtr->v0 = 0;
+ return;
+ }
+ x = *xPtr;
+ while ( UINT64_C( 0x0100000000000000 ) <= x.sig.v64 ) {
+ ++x.exp;
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ }
+ while ( x.sig.v64 < UINT64_C( 0x0080000000000000 ) ) {
+ --x.exp;
+ x.sig = shortShiftLeft128( x.sig, 1 );
+ }
+ savedX = x;
+ isTiny =
+ (slowfloat_detectTininess == softfloat_tininess_beforeRounding)
+ && (x.exp + 0x3FFF <= 0);
+ roundFloatXTo113( isTiny, &x, slowfloat_roundingMode, true );
+ exp = x.exp + 0x3FFF;
+ if ( 0x7FFF <= exp ) {
+ slowfloat_exceptionFlags |=
+ softfloat_flag_overflow | softfloat_flag_inexact;
+ if ( x.sign ) {
+ switch ( slowfloat_roundingMode ) {
+ case softfloat_round_near_even:
+ case softfloat_round_min:
+ case softfloat_round_near_maxMag:
+ uiZPtr->v64 = UINT64_C( 0xFFFF000000000000 );
+ uiZPtr->v0 = 0;
+ break;
+ case softfloat_round_minMag:
+ case softfloat_round_max:
+ case softfloat_round_odd:
+ uiZPtr->v64 = UINT64_C( 0xFFFEFFFFFFFFFFFF );
+ uiZPtr->v0 = UINT64_C( 0xFFFFFFFFFFFFFFFF );
+ break;
+ }
+ } else {
+ switch ( slowfloat_roundingMode ) {
+ case softfloat_round_near_even:
+ case softfloat_round_max:
+ case softfloat_round_near_maxMag:
+ uiZPtr->v64 = UINT64_C( 0x7FFF000000000000 );
+ uiZPtr->v0 = 0;
+ break;
+ case softfloat_round_minMag:
+ case softfloat_round_min:
+ case softfloat_round_odd:
+ uiZPtr->v64 = UINT64_C( 0x7FFEFFFFFFFFFFFF );
+ uiZPtr->v0 = UINT64_C( 0xFFFFFFFFFFFFFFFF );
+ break;
+ }
+ }
+ return;
+ }
+ if ( exp <= 0 ) {
+ isTiny = true;
+ x = savedX;
+ exp = x.exp + 0x3FFF;
+ if ( exp < -120 ) {
+ x.sig.v0 = (x.sig.v64 != 0) || (x.sig.v0 != 0);
+ x.sig.v64 = 0;
+ } else {
+ while ( exp <= 0 ) {
+ ++exp;
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ }
+ }
+ roundFloatXTo113( isTiny, &x, slowfloat_roundingMode, true );
+ exp = (UINT64_C( 0x0080000000000000 ) <= x.sig.v64) ? 1 : 0;
+ }
+ uiZ64 = (uint_fast64_t) exp<<48;
+ if ( x.sign ) uiZ64 |= UINT64_C( 0x8000000000000000 );
+ x.sig = shortShiftRightJam128( x.sig, 7 );
+ uiZPtr->v64 = uiZ64 | (x.sig.v64 & UINT64_C( 0x0000FFFFFFFFFFFF ));
+ uiZPtr->v0 = x.sig.v0;
+
+}
+
+#endif
+
+static void floatXInvalid( struct floatX *xPtr )
+{
+
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ *xPtr = floatXNaN;
+
+}
+
+static
+void
+ floatXRoundToInt( struct floatX *xPtr, uint_fast8_t roundingMode, bool exact )
+{
+ int_fast32_t exp, shiftDist;
+ struct uint128 sig;
+
+ if ( xPtr->isNaN || xPtr->isInf ) return;
+ exp = xPtr->exp;
+ shiftDist = 112 - exp;
+ if ( shiftDist <= 0 ) return;
+ if ( 119 < shiftDist ) {
+ xPtr->exp = 112;
+ xPtr->sig.v64 = 0;
+ xPtr->sig.v0 = !xPtr->isZero;
+ } else {
+ sig = xPtr->sig;
+ while ( 0 < shiftDist ) {
+ ++exp;
+ sig = shortShiftRightJam128( sig, 1 );
+ --shiftDist;
+ }
+ xPtr->exp = exp;
+ xPtr->sig = sig;
+ }
+ roundFloatXTo113( false, xPtr, roundingMode, exact );
+ if ( !xPtr->sig.v64 && !xPtr->sig.v0 ) xPtr->isZero = true;
+
+}
+
+static void floatXAdd( struct floatX *xPtr, const struct floatX *yPtr )
+{
+ int_fast32_t expX, expY, expDiff;
+ struct uint128 sigY;
+
+ if ( xPtr->isNaN ) return;
+ if ( yPtr->isNaN ) goto copyY;
+ if ( xPtr->isInf && yPtr->isInf ) {
+ if ( xPtr->sign != yPtr->sign ) floatXInvalid( xPtr );
+ return;
+ }
+ if ( xPtr->isInf ) return;
+ if ( yPtr->isInf ) goto copyY;
+ if ( xPtr->isZero && yPtr->isZero ) {
+ if ( xPtr->sign == yPtr->sign ) return;
+ goto completeCancellation;
+ }
+ expX = xPtr->exp;
+ expY = yPtr->exp;
+ if (
+ (xPtr->sign != yPtr->sign) && (expX == expY)
+ && eq128( xPtr->sig, yPtr->sig )
+ ) {
+ completeCancellation:
+ if (slowfloat_roundingMode == softfloat_round_min) {
+ *xPtr = floatXNegativeZero;
+ } else {
+ *xPtr = floatXPositiveZero;
+ }
+ return;
+ }
+ if ( xPtr->isZero ) goto copyY;
+ if ( yPtr->isZero ) return;
+ expDiff = expX - expY;
+ if ( expDiff < 0 ) {
+ xPtr->exp = expY;
+ if ( expDiff < -120 ) {
+ xPtr->sig.v64 = 0;
+ xPtr->sig.v0 = 1;
+ } else {
+ while ( expDiff < 0 ) {
+ ++expDiff;
+ xPtr->sig = shortShiftRightJam128( xPtr->sig, 1 );
+ }
+ }
+ if ( xPtr->sign != yPtr->sign ) xPtr->sig = neg128( xPtr->sig );
+ xPtr->sign = yPtr->sign;
+ xPtr->sig = add128( xPtr->sig, yPtr->sig );
+ } else {
+ sigY = yPtr->sig;
+ if ( 120 < expDiff ) {
+ sigY.v64 = 0;
+ sigY.v0 = 1;
+ } else {
+ while ( 0 < expDiff ) {
+ --expDiff;
+ sigY = shortShiftRightJam128( sigY, 1 );
+ }
+ }
+ if ( xPtr->sign != yPtr->sign ) sigY = neg128( sigY );
+ xPtr->sig = add128( xPtr->sig, sigY );
+ }
+ if ( xPtr->sig.v64 & UINT64_C( 0x8000000000000000 ) ) {
+ xPtr->sign = !xPtr->sign;
+ xPtr->sig = neg128( xPtr->sig );
+ }
+ return;
+ copyY:
+ *xPtr = *yPtr;
+
+}
+
+static void floatXMul( struct floatX *xPtr, const struct floatX *yPtr )
+{
+ struct uint128 sig;
+ int bitNum;
+
+ if ( xPtr->isNaN ) return;
+ if ( yPtr->isNaN ) {
+ xPtr->isNaN = true;
+ xPtr->isInf = false;
+ xPtr->isZero = false;
+ xPtr->sign = yPtr->sign;
+ return;
+ }
+ if ( yPtr->sign ) xPtr->sign = !xPtr->sign;
+ if ( xPtr->isInf ) {
+ if ( yPtr->isZero ) floatXInvalid( xPtr );
+ return;
+ }
+ if ( yPtr->isInf ) {
+ if ( xPtr->isZero ) {
+ floatXInvalid( xPtr );
+ return;
+ }
+ xPtr->isInf = true;
+ return;
+ }
+ if ( xPtr->isZero || yPtr->isZero ) {
+ if ( xPtr->sign ) {
+ *xPtr = floatXNegativeZero;
+ } else {
+ *xPtr = floatXPositiveZero;
+ }
+ return;
+ }
+ xPtr->exp += yPtr->exp;
+ sig.v64 = 0;
+ sig.v0 = 0;
+ for ( bitNum = 0; bitNum < 120; ++bitNum ) {
+ sig = shortShiftRightJam128( sig, 1 );
+ if ( xPtr->sig.v0 & 1 ) sig = add128( sig, yPtr->sig );
+ xPtr->sig = shortShiftRight128( xPtr->sig, 1 );
+ }
+ if ( UINT64_C( 0x0100000000000000 ) <= sig.v64 ) {
+ ++xPtr->exp;
+ sig = shortShiftRightJam128( sig, 1 );
+ }
+ xPtr->sig = sig;
+
+}
+
+static void floatXDiv( struct floatX *xPtr, const struct floatX *yPtr )
+{
+ struct uint128 sig, negSigY;
+ int bitNum;
+
+ if ( xPtr->isNaN ) return;
+ if ( yPtr->isNaN ) {
+ xPtr->isNaN = true;
+ xPtr->isInf = false;
+ xPtr->isZero = false;
+ xPtr->sign = yPtr->sign;
+ return;
+ }
+ if ( yPtr->sign ) xPtr->sign = !xPtr->sign;
+ if ( xPtr->isInf ) {
+ if ( yPtr->isInf ) floatXInvalid( xPtr );
+ return;
+ }
+ if ( yPtr->isZero ) {
+ if ( xPtr->isZero ) {
+ floatXInvalid( xPtr );
+ return;
+ }
+ slowfloat_exceptionFlags |= softfloat_flag_infinite;
+ xPtr->isInf = true;
+ return;
+ }
+ if ( xPtr->isZero || yPtr->isInf ) {
+ if ( xPtr->sign ) {
+ *xPtr = floatXNegativeZero;
+ } else {
+ *xPtr = floatXPositiveZero;
+ }
+ return;
+ }
+ xPtr->exp -= yPtr->exp + 1;
+ sig.v64 = 0;
+ sig.v0 = 0;
+ negSigY = neg128( yPtr->sig );
+ for ( bitNum = 0; bitNum < 120; ++bitNum ) {
+ if ( le128( yPtr->sig, xPtr->sig ) ) {
+ sig.v0 |= 1;
+ xPtr->sig = add128( xPtr->sig, negSigY );
+ }
+ xPtr->sig = shortShiftLeft128( xPtr->sig, 1 );
+ sig = shortShiftLeft128( sig, 1 );
+ }
+ if ( xPtr->sig.v64 || xPtr->sig.v0 ) sig.v0 |= 1;
+ xPtr->sig = sig;
+
+}
+
+static void floatXRem( struct floatX *xPtr, const struct floatX *yPtr )
+{
+ int_fast32_t expX, expY;
+ struct uint128 sigY, negSigY;
+ bool lastQuotientBit;
+ struct uint128 savedSigX;
+
+ if ( xPtr->isNaN ) return;
+ if ( yPtr->isNaN ) {
+ xPtr->isNaN = true;
+ xPtr->isInf = false;
+ xPtr->isZero = false;
+ xPtr->sign = yPtr->sign;
+ return;
+ }
+ if ( xPtr->isInf || yPtr->isZero ) {
+ floatXInvalid( xPtr );
+ return;
+ }
+ if ( xPtr->isZero || yPtr->isInf ) return;
+ expX = xPtr->exp;
+ expY = yPtr->exp - 1;
+ if ( expX < expY ) return;
+ sigY = shortShiftLeft128( yPtr->sig, 1 );
+ negSigY = neg128( sigY );
+ while ( expY < expX ) {
+ --expX;
+ if ( le128( sigY, xPtr->sig ) ) {
+ xPtr->sig = add128( xPtr->sig, negSigY );
+ }
+ xPtr->sig = shortShiftLeft128( xPtr->sig, 1 );
+ }
+ xPtr->exp = expX;
+ lastQuotientBit = le128( sigY, xPtr->sig );
+ if ( lastQuotientBit ) xPtr->sig = add128( xPtr->sig, negSigY );
+ savedSigX = xPtr->sig;
+ xPtr->sig = neg128( add128( xPtr->sig, negSigY ) );
+ if ( lt128( xPtr->sig, savedSigX ) ) {
+ xPtr->sign = !xPtr->sign;
+ } else if ( lt128( savedSigX, xPtr->sig ) ) {
+ goto restoreSavedSigX;
+ } else {
+ if ( lastQuotientBit ) {
+ xPtr->sign = !xPtr->sign;
+ } else {
+ restoreSavedSigX:
+ xPtr->sig = savedSigX;
+ }
+ }
+ if ( !xPtr->sig.v64 && !xPtr->sig.v0 ) xPtr->isZero = true;
+
+}
+
+static void floatXSqrt( struct floatX *xPtr )
+{
+ struct uint128 sig, bitSig;
+ int bitNum;
+ struct uint128 savedSigX;
+
+ if ( xPtr->isNaN || xPtr->isZero ) return;
+ if ( xPtr->sign ) {
+ floatXInvalid( xPtr );
+ return;
+ }
+ if ( xPtr->isInf ) return;
+ if ( !(xPtr->exp & 1) ) xPtr->sig = shortShiftRightJam128( xPtr->sig, 1 );
+ xPtr->exp >>= 1;
+ sig.v64 = 0;
+ sig.v0 = 0;
+ bitSig.v64 = UINT64_C( 0x0080000000000000 );
+ bitSig.v0 = 0;
+ for ( bitNum = 0; bitNum < 120; ++bitNum ) {
+ savedSigX = xPtr->sig;
+ xPtr->sig = add128( xPtr->sig, neg128( sig ) );
+ xPtr->sig = shortShiftLeft128( xPtr->sig, 1 );
+ xPtr->sig = add128( xPtr->sig, neg128( bitSig ) );
+ if ( xPtr->sig.v64 & UINT64_C( 0x8000000000000000 ) ) {
+ xPtr->sig = shortShiftLeft128( savedSigX, 1 );
+ } else {
+ sig.v64 |= bitSig.v64;
+ sig.v0 |= bitSig.v0;
+ }
+ bitSig = shortShiftRightJam128( bitSig, 1 );
+ }
+ if ( xPtr->sig.v64 || xPtr->sig.v0 ) sig.v0 |= 1;
+ xPtr->sig = sig;
+
+}
+
+static bool floatXEq( const struct floatX *xPtr, const struct floatX *yPtr )
+{
+
+ if ( xPtr->isNaN || yPtr->isNaN ) return false;
+ if ( xPtr->isZero && yPtr->isZero ) return true;
+ if ( xPtr->sign != yPtr->sign ) return false;
+ if ( xPtr->isInf || yPtr->isInf ) return xPtr->isInf && yPtr->isInf;
+ return ( xPtr->exp == yPtr->exp ) && eq128( xPtr->sig, yPtr->sig );
+
+}
+
+static bool floatXLe( const struct floatX *xPtr, const struct floatX *yPtr )
+{
+
+ if ( xPtr->isNaN || yPtr->isNaN ) return false;
+ if ( xPtr->isZero && yPtr->isZero ) return true;
+ if ( xPtr->sign != yPtr->sign ) return xPtr->sign;
+ if ( xPtr->sign ) {
+ if ( xPtr->isInf || yPtr->isZero ) return true;
+ if ( yPtr->isInf || xPtr->isZero ) return false;
+ if ( yPtr->exp < xPtr->exp ) return true;
+ if ( xPtr->exp < yPtr->exp ) return false;
+ return le128( yPtr->sig, xPtr->sig );
+ } else {
+ if ( yPtr->isInf || xPtr->isZero ) return true;
+ if ( xPtr->isInf || yPtr->isZero ) return false;
+ if ( xPtr->exp < yPtr->exp ) return true;
+ if ( yPtr->exp < xPtr->exp ) return false;
+ return le128( xPtr->sig, yPtr->sig );
+ }
+
+}
+
+static bool floatXLt( const struct floatX *xPtr, const struct floatX *yPtr )
+{
+
+ if ( xPtr->isNaN || yPtr->isNaN ) return false;
+ if ( xPtr->isZero && yPtr->isZero ) return false;
+ if ( xPtr->sign != yPtr->sign ) return xPtr->sign;
+ if ( xPtr->isInf && yPtr->isInf ) return false;
+ if ( xPtr->sign ) {
+ if ( xPtr->isInf || yPtr->isZero ) return true;
+ if ( yPtr->isInf || xPtr->isZero ) return false;
+ if ( yPtr->exp < xPtr->exp ) return true;
+ if ( xPtr->exp < yPtr->exp ) return false;
+ return lt128( yPtr->sig, xPtr->sig );
+ } else {
+ if ( yPtr->isInf || xPtr->isZero ) return true;
+ if ( xPtr->isInf || yPtr->isZero ) return false;
+ if ( xPtr->exp < yPtr->exp ) return true;
+ if ( yPtr->exp < xPtr->exp ) return false;
+ return lt128( xPtr->sig, yPtr->sig );
+ }
+
+}
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+#if defined EXTFLOAT80 || defined FLOAT128
+
+#ifdef LITTLEENDIAN
+struct uint256 { uint64_t v0, v64, v128, v192; };
+#else
+struct uint256 { uint64_t v192, v128, v64, v0; };
+#endif
+
+static bool eq256M( const struct uint256 *aPtr, const struct uint256 *bPtr )
+{
+
+ return
+ (aPtr->v192 == bPtr->v192) && (aPtr->v128 == bPtr->v128)
+ && (aPtr->v64 == bPtr->v64) && (aPtr->v0 == bPtr->v0);
+
+}
+
+static void shiftLeft1256M( struct uint256 *ptr )
+{
+ uint64_t dword1, dword2;
+
+ dword1 = ptr->v128;
+ ptr->v192 = ptr->v192<<1 | dword1>>63;
+ dword2 = ptr->v64;
+ ptr->v128 = dword1<<1 | dword2>>63;
+ dword1 = ptr->v0;
+ ptr->v64 = dword2<<1 | dword1>>63;
+ ptr->v0 = dword1<<1;
+
+}
+
+static void shiftRight1256M( struct uint256 *ptr )
+{
+ uint64_t dword1, dword2;
+
+ dword1 = ptr->v64;
+ ptr->v0 = dword1<<63 | ptr->v0>>1;
+ dword2 = ptr->v128;
+ ptr->v64 = dword2<<63 | dword1>>1;
+ dword1 = ptr->v192;
+ ptr->v128 = dword1<<63 | dword2>>1;
+ ptr->v192 = dword1>>1;
+
+}
+
+static void shiftRight1Jam256M( struct uint256 *ptr )
+{
+ int extra;
+
+ extra = ptr->v0 & 1;
+ shiftRight1256M( ptr );
+ ptr->v0 |= extra;
+
+}
+
+static void neg256M( struct uint256 *ptr )
+{
+ uint64_t v64, v0, v128;
+
+ v64 = ptr->v64;
+ v0 = ptr->v0;
+ if ( v64 | v0 ) {
+ ptr->v192 = ~ptr->v192;
+ ptr->v128 = ~ptr->v128;
+ if ( v0 ) {
+ ptr->v64 = ~v64;
+ ptr->v0 = -v0;
+ } else {
+ ptr->v64 = -v64;
+ }
+ } else {
+ v128 = ptr->v128;
+ if ( v128 ) {
+ ptr->v192 = ~ptr->v192;
+ ptr->v128 = -v128;
+ } else {
+ ptr->v192 = -ptr->v192;
+ }
+ }
+
+}
+
+static void add256M( struct uint256 *aPtr, const struct uint256 *bPtr )
+{
+ uint64_t dwordA, dwordZ;
+ unsigned int carry1, carry2;
+
+ dwordA = aPtr->v0;
+ dwordZ = dwordA + bPtr->v0;
+ carry1 = (dwordZ < dwordA);
+ aPtr->v0 = dwordZ;
+ dwordA = aPtr->v64;
+ dwordZ = dwordA + bPtr->v64;
+ carry2 = (dwordZ < dwordA);
+ dwordZ += carry1;
+ carry2 += (dwordZ < carry1);
+ aPtr->v64 = dwordZ;
+ dwordA = aPtr->v128;
+ dwordZ = dwordA + bPtr->v128;
+ carry1 = (dwordZ < dwordA);
+ dwordZ += carry2;
+ carry1 += (dwordZ < carry2);
+ aPtr->v128 = dwordZ;
+ aPtr->v192 = aPtr->v192 + bPtr->v192 + carry1;
+
+}
+
+struct floatX256 {
+ bool isNaN;
+ bool isInf;
+ bool isZero;
+ bool sign;
+ int_fast32_t exp;
+ struct uint256 sig;
+};
+
+static const struct floatX256 floatX256NaN =
+ { true, false, false, false, 0, { 0, 0, 0, 0 } };
+static const struct floatX256 floatX256PositiveZero =
+ { false, false, true, false, 0, { 0, 0, 0, 0 } };
+static const struct floatX256 floatX256NegativeZero =
+ { false, false, true, true, 0, { 0, 0, 0, 0 } };
+
+#ifdef FLOAT128
+
+static void f128MToFloatX256( const float128_t *aPtr, struct floatX256 *xPtr )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ xPtr->isNaN = x.isNaN;
+ xPtr->isInf = x.isInf;
+ xPtr->isZero = x.isZero;
+ xPtr->sign = x.sign;
+ xPtr->exp = x.exp;
+ xPtr->sig.v192 = x.sig.v64;
+ xPtr->sig.v128 = x.sig.v0;
+ xPtr->sig.v64 = 0;
+ xPtr->sig.v0 = 0;
+
+}
+
+static void floatX256ToF128M( const struct floatX256 *xPtr, float128_t *zPtr )
+{
+ struct floatX x;
+ int_fast32_t expZ;
+ struct uint256 sig;
+
+ x.isNaN = xPtr->isNaN;
+ x.isInf = xPtr->isInf;
+ x.isZero = xPtr->isZero;
+ x.sign = xPtr->sign;
+ if ( !(x.isNaN | x.isInf | x.isZero) ) {
+ expZ = xPtr->exp;
+ sig = xPtr->sig;
+ while ( !sig.v192 ) {
+ expZ -= 64;
+ sig.v192 = sig.v128;
+ sig.v128 = sig.v64;
+ sig.v64 = sig.v0;
+ sig.v0 = 0;
+ }
+ while ( sig.v192 < UINT64_C( 0x0100000000000000 ) ) {
+ --expZ;
+ shiftLeft1256M( &sig );
+ }
+ x.exp = expZ;
+ x.sig.v64 = sig.v192;
+ x.sig.v0 = sig.v128 | ((sig.v64 | sig.v0) != 0);
+ }
+ floatXToF128M( &x, zPtr );
+
+}
+
+#endif
+
+static void floatX256Invalid( struct floatX256 *xPtr )
+{
+
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ *xPtr = floatX256NaN;
+
+}
+
+static
+void floatX256Add( struct floatX256 *xPtr, const struct floatX256 *yPtr )
+{
+ int_fast32_t expX, expY, expDiff;
+ struct uint256 sigY;
+
+ if ( xPtr->isNaN ) return;
+ if ( yPtr->isNaN ) goto copyY;
+ if ( xPtr->isInf && yPtr->isInf ) {
+ if ( xPtr->sign != yPtr->sign ) floatX256Invalid( xPtr );
+ return;
+ }
+ if ( xPtr->isInf ) return;
+ if ( yPtr->isInf ) goto copyY;
+ if ( xPtr->isZero && yPtr->isZero ) {
+ if ( xPtr->sign == yPtr->sign ) return;
+ goto completeCancellation;
+ }
+ expX = xPtr->exp;
+ expY = yPtr->exp;
+ if (
+ (xPtr->sign != yPtr->sign) && (expX == expY)
+ && eq256M( &xPtr->sig, &yPtr->sig )
+ ) {
+ completeCancellation:
+ if (slowfloat_roundingMode == softfloat_round_min) {
+ *xPtr = floatX256NegativeZero;
+ } else {
+ *xPtr = floatX256PositiveZero;
+ }
+ return;
+ }
+ if ( xPtr->isZero ) goto copyY;
+ if ( yPtr->isZero ) return;
+ expDiff = expX - expY;
+ if ( expDiff < 0 ) {
+ xPtr->exp = expY;
+ if ( expDiff < -248 ) {
+ xPtr->sig.v192 = 0;
+ xPtr->sig.v128 = 0;
+ xPtr->sig.v64 = 0;
+ xPtr->sig.v0 = 1;
+ } else {
+ while ( expDiff < 0 ) {
+ ++expDiff;
+ shiftRight1Jam256M( &xPtr->sig );
+ }
+ }
+ if ( xPtr->sign != yPtr->sign ) neg256M( &xPtr->sig );
+ xPtr->sign = yPtr->sign;
+ add256M( &xPtr->sig, &yPtr->sig );
+ } else {
+ sigY = yPtr->sig;
+ if ( 248 < expDiff ) {
+ sigY.v192 = 0;
+ sigY.v128 = 0;
+ sigY.v64 = 0;
+ sigY.v0 = 1;
+ } else {
+ while ( 0 < expDiff ) {
+ --expDiff;
+ shiftRight1Jam256M( &sigY );
+ }
+ }
+ if ( xPtr->sign != yPtr->sign ) neg256M( &sigY );
+ add256M( &xPtr->sig, &sigY );
+ }
+ if ( xPtr->sig.v192 & UINT64_C( 0x8000000000000000 ) ) {
+ xPtr->sign = !xPtr->sign;
+ neg256M( &xPtr->sig );
+ }
+ return;
+ copyY:
+ *xPtr = *yPtr;
+
+}
+
+static
+void floatX256Mul( struct floatX256 *xPtr, const struct floatX256 *yPtr )
+{
+ struct uint256 sig;
+ int bitNum;
+
+ if ( xPtr->isNaN ) return;
+ if ( yPtr->isNaN ) {
+ xPtr->isNaN = true;
+ xPtr->isInf = false;
+ xPtr->isZero = false;
+ xPtr->sign = yPtr->sign;
+ return;
+ }
+ if ( yPtr->sign ) xPtr->sign = !xPtr->sign;
+ if ( xPtr->isInf ) {
+ if ( yPtr->isZero ) floatX256Invalid( xPtr );
+ return;
+ }
+ if ( yPtr->isInf ) {
+ if ( xPtr->isZero ) {
+ floatX256Invalid( xPtr );
+ return;
+ }
+ xPtr->isInf = true;
+ return;
+ }
+ if ( xPtr->isZero || yPtr->isZero ) {
+ if ( xPtr->sign ) {
+ *xPtr = floatX256NegativeZero;
+ } else {
+ *xPtr = floatX256PositiveZero;
+ }
+ return;
+ }
+ xPtr->exp += yPtr->exp;
+ sig.v192 = 0;
+ sig.v128 = 0;
+ sig.v64 = 0;
+ sig.v0 = 0;
+ for ( bitNum = 0; bitNum < 248; ++bitNum ) {
+ shiftRight1Jam256M( &sig );
+ if ( xPtr->sig.v0 & 1 ) add256M( &sig, &yPtr->sig );
+ shiftRight1256M( &xPtr->sig );
+ }
+ if ( UINT64_C( 0x0100000000000000 ) <= sig.v192 ) {
+ ++xPtr->exp;
+ shiftRight1Jam256M( &sig );
+ }
+ xPtr->sig = sig;
+
+}
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+#ifdef FLOAT16
+
+float16_t slow_ui32_to_f16( uint32_t a )
+{
+ struct floatX x;
+
+ ui32ToFloatX( a, &x );
+ return floatXToF16( &x );
+
+}
+
+#endif
+
+float32_t slow_ui32_to_f32( uint32_t a )
+{
+ struct floatX x;
+
+ ui32ToFloatX( a, &x );
+ return floatXToF32( &x );
+
+}
+
+#ifdef FLOAT64
+
+float64_t slow_ui32_to_f64( uint32_t a )
+{
+ struct floatX x;
+
+ ui32ToFloatX( a, &x );
+ return floatXToF64( &x );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void slow_ui32_to_extF80M( uint32_t a, extFloat80_t *zPtr )
+{
+ struct floatX x;
+
+ ui32ToFloatX( a, &x );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void slow_ui32_to_f128M( uint32_t a, float128_t *zPtr )
+{
+ struct floatX x;
+
+ ui32ToFloatX( a, &x );
+ floatXToF128M( &x, zPtr );
+
+}
+
+#endif
+
+#ifdef FLOAT16
+
+float16_t slow_ui64_to_f16( uint64_t a )
+{
+ struct floatX x;
+
+ ui64ToFloatX( a, &x );
+ return floatXToF16( &x );
+
+}
+
+#endif
+
+float32_t slow_ui64_to_f32( uint64_t a )
+{
+ struct floatX x;
+
+ ui64ToFloatX( a, &x );
+ return floatXToF32( &x );
+
+}
+
+#ifdef FLOAT64
+
+float64_t slow_ui64_to_f64( uint64_t a )
+{
+ struct floatX x;
+
+ ui64ToFloatX( a, &x );
+ return floatXToF64( &x );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void slow_ui64_to_extF80M( uint64_t a, extFloat80_t *zPtr )
+{
+ struct floatX x;
+
+ ui64ToFloatX( a, &x );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void slow_ui64_to_f128M( uint64_t a, float128_t *zPtr )
+{
+ struct floatX x;
+
+ ui64ToFloatX( a, &x );
+ floatXToF128M( &x, zPtr );
+
+}
+
+#endif
+
+#ifdef FLOAT16
+
+float16_t slow_i32_to_f16( int32_t a )
+{
+ struct floatX x;
+
+ i32ToFloatX( a, &x );
+ return floatXToF16( &x );
+
+}
+
+#endif
+
+float32_t slow_i32_to_f32( int32_t a )
+{
+ struct floatX x;
+
+ i32ToFloatX( a, &x );
+ return floatXToF32( &x );
+
+}
+
+#ifdef FLOAT64
+
+float64_t slow_i32_to_f64( int32_t a )
+{
+ struct floatX x;
+
+ i32ToFloatX( a, &x );
+ return floatXToF64( &x );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void slow_i32_to_extF80M( int32_t a, extFloat80_t *zPtr )
+{
+ struct floatX x;
+
+ i32ToFloatX( a, &x );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void slow_i32_to_f128M( int32_t a, float128_t *zPtr )
+{
+ struct floatX x;
+
+ i32ToFloatX( a, &x );
+ floatXToF128M( &x, zPtr );
+
+}
+
+#endif
+
+#ifdef FLOAT16
+
+float16_t slow_i64_to_f16( int64_t a )
+{
+ struct floatX x;
+
+ i64ToFloatX( a, &x );
+ return floatXToF16( &x );
+
+}
+
+#endif
+
+float32_t slow_i64_to_f32( int64_t a )
+{
+ struct floatX x;
+
+ i64ToFloatX( a, &x );
+ return floatXToF32( &x );
+
+}
+
+#ifdef FLOAT64
+
+float64_t slow_i64_to_f64( int64_t a )
+{
+ struct floatX x;
+
+ i64ToFloatX( a, &x );
+ return floatXToF64( &x );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void slow_i64_to_extF80M( int64_t a, extFloat80_t *zPtr )
+{
+ struct floatX x;
+
+ i64ToFloatX( a, &x );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void slow_i64_to_f128M( int64_t a, float128_t *zPtr )
+{
+ struct floatX x;
+
+ i64ToFloatX( a, &x );
+ floatXToF128M( &x, zPtr );
+
+}
+
+#endif
+
+#ifdef FLOAT16
+
+uint_fast32_t
+ slow_f16_to_ui32( float16_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ return floatXToUI32( &x, roundingMode, exact );
+
+}
+
+uint_fast64_t
+ slow_f16_to_ui64( float16_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ return floatXToUI64( &x, roundingMode, exact );
+
+}
+
+int_fast32_t
+ slow_f16_to_i32( float16_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ return floatXToI32( &x, roundingMode, exact );
+
+}
+
+int_fast64_t
+ slow_f16_to_i64( float16_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ return floatXToI64( &x, roundingMode, exact );
+
+}
+
+uint_fast32_t slow_f16_to_ui32_r_minMag( float16_t a, bool exact )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ return floatXToUI32( &x, softfloat_round_minMag, exact );
+
+}
+
+uint_fast64_t slow_f16_to_ui64_r_minMag( float16_t a, bool exact )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ return floatXToUI64( &x, softfloat_round_minMag, exact );
+
+}
+
+int_fast32_t slow_f16_to_i32_r_minMag( float16_t a, bool exact )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ return floatXToI32( &x, softfloat_round_minMag, exact );
+
+}
+
+int_fast64_t slow_f16_to_i64_r_minMag( float16_t a, bool exact )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ return floatXToI64( &x, softfloat_round_minMag, exact );
+
+}
+
+float32_t slow_f16_to_f32( float16_t a )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ return floatXToF32( &x );
+
+}
+
+#ifdef FLOAT64
+
+float64_t slow_f16_to_f64( float16_t a )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ return floatXToF64( &x );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void slow_f16_to_extF80M( float16_t a, extFloat80_t *zPtr )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void slow_f16_to_f128M( float16_t a, float128_t *zPtr )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ floatXToF128M( &x, zPtr );
+
+}
+
+#endif
+
+float16_t
+ slow_f16_roundToInt( float16_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ floatXRoundToInt( &x, roundingMode, exact );
+ return floatXToF16( &x );
+
+}
+
+float16_t slow_f16_add( float16_t a, float16_t b )
+{
+ struct floatX x, y;
+
+ f16ToFloatX( a, &x );
+ f16ToFloatX( b, &y );
+ floatXAdd( &x, &y );
+ return floatXToF16( &x );
+
+}
+
+float16_t slow_f16_sub( float16_t a, float16_t b )
+{
+ struct floatX x, y;
+
+ f16ToFloatX( a, &x );
+ f16ToFloatX( b, &y );
+ y.sign = !y.sign;
+ floatXAdd( &x, &y );
+ return floatXToF16( &x );
+
+
+}
+
+float16_t slow_f16_mul( float16_t a, float16_t b )
+{
+ struct floatX x, y;
+
+ f16ToFloatX( a, &x );
+ f16ToFloatX( b, &y );
+ floatXMul( &x, &y );
+ return floatXToF16( &x );
+
+}
+
+float16_t slow_f16_mulAdd( float16_t a, float16_t b, float16_t c )
+{
+ struct floatX x, y;
+
+ f16ToFloatX( a, &x );
+ f16ToFloatX( b, &y );
+ floatXMul( &x, &y );
+ f16ToFloatX( c, &y );
+ floatXAdd( &x, &y );
+ return floatXToF16( &x );
+
+}
+
+float16_t slow_f16_div( float16_t a, float16_t b )
+{
+ struct floatX x, y;
+
+ f16ToFloatX( a, &x );
+ f16ToFloatX( b, &y );
+ floatXDiv( &x, &y );
+ return floatXToF16( &x );
+
+}
+
+float16_t slow_f16_rem( float16_t a, float16_t b )
+{
+ struct floatX x, y;
+
+ f16ToFloatX( a, &x );
+ f16ToFloatX( b, &y );
+ floatXRem( &x, &y );
+ return floatXToF16( &x );
+
+}
+
+float16_t slow_f16_sqrt( float16_t a )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ floatXSqrt( &x );
+ return floatXToF16( &x );
+
+}
+
+bool slow_f16_eq( float16_t a, float16_t b )
+{
+ struct floatX x, y;
+
+ f16ToFloatX( a, &x );
+ f16ToFloatX( b, &y );
+ return floatXEq( &x, &y );
+
+}
+
+bool slow_f16_le( float16_t a, float16_t b )
+{
+ struct floatX x, y;
+
+ f16ToFloatX( a, &x );
+ f16ToFloatX( b, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXLe( &x, &y );
+
+}
+
+bool slow_f16_lt( float16_t a, float16_t b )
+{
+ struct floatX x, y;
+
+ f16ToFloatX( a, &x );
+ f16ToFloatX( b, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXLt( &x, &y );
+
+}
+
+bool slow_f16_eq_signaling( float16_t a, float16_t b )
+{
+ struct floatX x, y;
+
+ f16ToFloatX( a, &x );
+ f16ToFloatX( b, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXEq( &x, &y );
+
+}
+
+bool slow_f16_le_quiet( float16_t a, float16_t b )
+{
+ struct floatX x, y;
+
+ f16ToFloatX( a, &x );
+ f16ToFloatX( b, &y );
+ return floatXLe( &x, &y );
+
+}
+
+bool slow_f16_lt_quiet( float16_t a, float16_t b )
+{
+ struct floatX x, y;
+
+ f16ToFloatX( a, &x );
+ f16ToFloatX( b, &y );
+ return floatXLt( &x, &y );
+
+}
+
+#endif
+
+uint_fast32_t
+ slow_f32_to_ui32( float32_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ return floatXToUI32( &x, roundingMode, exact );
+
+}
+
+uint_fast64_t
+ slow_f32_to_ui64( float32_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ return floatXToUI64( &x, roundingMode, exact );
+
+}
+
+int_fast32_t
+ slow_f32_to_i32( float32_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ return floatXToI32( &x, roundingMode, exact );
+
+}
+
+int_fast64_t
+ slow_f32_to_i64( float32_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ return floatXToI64( &x, roundingMode, exact );
+
+}
+
+uint_fast32_t slow_f32_to_ui32_r_minMag( float32_t a, bool exact )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ return floatXToUI32( &x, softfloat_round_minMag, exact );
+
+}
+
+uint_fast64_t slow_f32_to_ui64_r_minMag( float32_t a, bool exact )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ return floatXToUI64( &x, softfloat_round_minMag, exact );
+
+}
+
+int_fast32_t slow_f32_to_i32_r_minMag( float32_t a, bool exact )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ return floatXToI32( &x, softfloat_round_minMag, exact );
+
+}
+
+int_fast64_t slow_f32_to_i64_r_minMag( float32_t a, bool exact )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ return floatXToI64( &x, softfloat_round_minMag, exact );
+
+}
+
+#ifdef FLOAT16
+
+float16_t slow_f32_to_f16( float32_t a )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ return floatXToF16( &x );
+
+}
+
+#endif
+
+#ifdef FLOAT64
+
+float64_t slow_f32_to_f64( float32_t a )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ return floatXToF64( &x );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void slow_f32_to_extF80M( float32_t a, extFloat80_t *zPtr )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void slow_f32_to_f128M( float32_t a, float128_t *zPtr )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ floatXToF128M( &x, zPtr );
+
+}
+
+#endif
+
+float32_t
+ slow_f32_roundToInt( float32_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ floatXRoundToInt( &x, roundingMode, exact );
+ return floatXToF32( &x );
+
+}
+
+float32_t slow_f32_add( float32_t a, float32_t b )
+{
+ struct floatX x, y;
+
+ f32ToFloatX( a, &x );
+ f32ToFloatX( b, &y );
+ floatXAdd( &x, &y );
+ return floatXToF32( &x );
+
+}
+
+float32_t slow_f32_sub( float32_t a, float32_t b )
+{
+ struct floatX x, y;
+
+ f32ToFloatX( a, &x );
+ f32ToFloatX( b, &y );
+ y.sign = !y.sign;
+ floatXAdd( &x, &y );
+ return floatXToF32( &x );
+
+
+}
+
+float32_t slow_f32_mul( float32_t a, float32_t b )
+{
+ struct floatX x, y;
+
+ f32ToFloatX( a, &x );
+ f32ToFloatX( b, &y );
+ floatXMul( &x, &y );
+ return floatXToF32( &x );
+
+}
+
+float32_t slow_f32_mulAdd( float32_t a, float32_t b, float32_t c )
+{
+ struct floatX x, y;
+
+ f32ToFloatX( a, &x );
+ f32ToFloatX( b, &y );
+ floatXMul( &x, &y );
+ f32ToFloatX( c, &y );
+ floatXAdd( &x, &y );
+ return floatXToF32( &x );
+
+}
+
+float32_t slow_f32_div( float32_t a, float32_t b )
+{
+ struct floatX x, y;
+
+ f32ToFloatX( a, &x );
+ f32ToFloatX( b, &y );
+ floatXDiv( &x, &y );
+ return floatXToF32( &x );
+
+}
+
+float32_t slow_f32_rem( float32_t a, float32_t b )
+{
+ struct floatX x, y;
+
+ f32ToFloatX( a, &x );
+ f32ToFloatX( b, &y );
+ floatXRem( &x, &y );
+ return floatXToF32( &x );
+
+}
+
+float32_t slow_f32_sqrt( float32_t a )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ floatXSqrt( &x );
+ return floatXToF32( &x );
+
+}
+
+bool slow_f32_eq( float32_t a, float32_t b )
+{
+ struct floatX x, y;
+
+ f32ToFloatX( a, &x );
+ f32ToFloatX( b, &y );
+ return floatXEq( &x, &y );
+
+}
+
+bool slow_f32_le( float32_t a, float32_t b )
+{
+ struct floatX x, y;
+
+ f32ToFloatX( a, &x );
+ f32ToFloatX( b, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXLe( &x, &y );
+
+}
+
+bool slow_f32_lt( float32_t a, float32_t b )
+{
+ struct floatX x, y;
+
+ f32ToFloatX( a, &x );
+ f32ToFloatX( b, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXLt( &x, &y );
+
+}
+
+bool slow_f32_eq_signaling( float32_t a, float32_t b )
+{
+ struct floatX x, y;
+
+ f32ToFloatX( a, &x );
+ f32ToFloatX( b, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXEq( &x, &y );
+
+}
+
+bool slow_f32_le_quiet( float32_t a, float32_t b )
+{
+ struct floatX x, y;
+
+ f32ToFloatX( a, &x );
+ f32ToFloatX( b, &y );
+ return floatXLe( &x, &y );
+
+}
+
+bool slow_f32_lt_quiet( float32_t a, float32_t b )
+{
+ struct floatX x, y;
+
+ f32ToFloatX( a, &x );
+ f32ToFloatX( b, &y );
+ return floatXLt( &x, &y );
+
+}
+
+#ifdef FLOAT64
+
+uint_fast32_t
+ slow_f64_to_ui32( float64_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ return floatXToUI32( &x, roundingMode, exact );
+
+}
+
+uint_fast64_t
+ slow_f64_to_ui64( float64_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ return floatXToUI64( &x, roundingMode, exact );
+
+}
+
+int_fast32_t
+ slow_f64_to_i32( float64_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ return floatXToI32( &x, roundingMode, exact );
+
+}
+
+int_fast64_t
+ slow_f64_to_i64( float64_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ return floatXToI64( &x, roundingMode, exact );
+
+}
+
+uint_fast32_t slow_f64_to_ui32_r_minMag( float64_t a, bool exact )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ return floatXToUI32( &x, softfloat_round_minMag, exact );
+
+}
+
+uint_fast64_t slow_f64_to_ui64_r_minMag( float64_t a, bool exact )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ return floatXToUI64( &x, softfloat_round_minMag, exact );
+
+}
+
+int_fast32_t slow_f64_to_i32_r_minMag( float64_t a, bool exact )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ return floatXToI32( &x, softfloat_round_minMag, exact );
+
+}
+
+int_fast64_t slow_f64_to_i64_r_minMag( float64_t a, bool exact )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ return floatXToI64( &x, softfloat_round_minMag, exact );
+
+}
+
+#ifdef FLOAT16
+
+float16_t slow_f64_to_f16( float64_t a )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ return floatXToF16( &x );
+
+}
+
+#endif
+
+float32_t slow_f64_to_f32( float64_t a )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ return floatXToF32( &x );
+
+}
+
+#ifdef EXTFLOAT80
+
+void slow_f64_to_extF80M( float64_t a, extFloat80_t *zPtr )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void slow_f64_to_f128M( float64_t a, float128_t *zPtr )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ floatXToF128M( &x, zPtr );
+
+}
+
+#endif
+
+float64_t
+ slow_f64_roundToInt( float64_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ floatXRoundToInt( &x, roundingMode, exact );
+ return floatXToF64( &x );
+
+}
+
+float64_t slow_f64_add( float64_t a, float64_t b )
+{
+ struct floatX x, y;
+
+ f64ToFloatX( a, &x );
+ f64ToFloatX( b, &y );
+ floatXAdd( &x, &y );
+ return floatXToF64( &x );
+
+}
+
+float64_t slow_f64_sub( float64_t a, float64_t b )
+{
+ struct floatX x, y;
+
+ f64ToFloatX( a, &x );
+ f64ToFloatX( b, &y );
+ y.sign = !y.sign;
+ floatXAdd( &x, &y );
+ return floatXToF64( &x );
+
+}
+
+float64_t slow_f64_mul( float64_t a, float64_t b )
+{
+ struct floatX x, y;
+
+ f64ToFloatX( a, &x );
+ f64ToFloatX( b, &y );
+ floatXMul( &x, &y );
+ return floatXToF64( &x );
+
+}
+
+float64_t slow_f64_mulAdd( float64_t a, float64_t b, float64_t c )
+{
+ struct floatX x, y;
+
+ f64ToFloatX( a, &x );
+ f64ToFloatX( b, &y );
+ floatXMul( &x, &y );
+ f64ToFloatX( c, &y );
+ floatXAdd( &x, &y );
+ return floatXToF64( &x );
+
+}
+
+float64_t slow_f64_div( float64_t a, float64_t b )
+{
+ struct floatX x, y;
+
+ f64ToFloatX( a, &x );
+ f64ToFloatX( b, &y );
+ floatXDiv( &x, &y );
+ return floatXToF64( &x );
+
+}
+
+float64_t slow_f64_rem( float64_t a, float64_t b )
+{
+ struct floatX x, y;
+
+ f64ToFloatX( a, &x );
+ f64ToFloatX( b, &y );
+ floatXRem( &x, &y );
+ return floatXToF64( &x );
+
+}
+
+float64_t slow_f64_sqrt( float64_t a )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ floatXSqrt( &x );
+ return floatXToF64( &x );
+
+}
+
+bool slow_f64_eq( float64_t a, float64_t b )
+{
+ struct floatX x, y;
+
+ f64ToFloatX( a, &x );
+ f64ToFloatX( b, &y );
+ return floatXEq( &x, &y );
+
+}
+
+bool slow_f64_le( float64_t a, float64_t b )
+{
+ struct floatX x, y;
+
+ f64ToFloatX( a, &x );
+ f64ToFloatX( b, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXLe( &x, &y );
+
+}
+
+bool slow_f64_lt( float64_t a, float64_t b )
+{
+ struct floatX x, y;
+
+ f64ToFloatX( a, &x );
+ f64ToFloatX( b, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXLt( &x, &y );
+
+}
+
+bool slow_f64_eq_signaling( float64_t a, float64_t b )
+{
+ struct floatX x, y;
+
+ f64ToFloatX( a, &x );
+ f64ToFloatX( b, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXEq( &x, &y );
+
+}
+
+bool slow_f64_le_quiet( float64_t a, float64_t b )
+{
+ struct floatX x, y;
+
+ f64ToFloatX( a, &x );
+ f64ToFloatX( b, &y );
+ return floatXLe( &x, &y );
+
+}
+
+bool slow_f64_lt_quiet( float64_t a, float64_t b )
+{
+ struct floatX x, y;
+
+ f64ToFloatX( a, &x );
+ f64ToFloatX( b, &y );
+ return floatXLt( &x, &y );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+uint_fast32_t
+ slow_extF80M_to_ui32(
+ const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ return floatXToUI32( &x, roundingMode, exact );
+
+}
+
+uint_fast64_t
+ slow_extF80M_to_ui64(
+ const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ return floatXToUI64( &x, roundingMode, exact );
+
+}
+
+int_fast32_t
+ slow_extF80M_to_i32(
+ const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ return floatXToI32( &x, roundingMode, exact );
+
+}
+
+int_fast64_t
+ slow_extF80M_to_i64(
+ const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ return floatXToI64( &x, roundingMode, exact );
+
+}
+
+uint_fast32_t
+ slow_extF80M_to_ui32_r_minMag( const extFloat80_t *aPtr, bool exact )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ return floatXToUI32( &x, softfloat_round_minMag, exact );
+
+}
+
+uint_fast64_t
+ slow_extF80M_to_ui64_r_minMag( const extFloat80_t *aPtr, bool exact )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ return floatXToUI64( &x, softfloat_round_minMag, exact );
+
+}
+
+int_fast32_t
+ slow_extF80M_to_i32_r_minMag( const extFloat80_t *aPtr, bool exact )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ return floatXToI32( &x, softfloat_round_minMag, exact );
+
+}
+
+int_fast64_t
+ slow_extF80M_to_i64_r_minMag( const extFloat80_t *aPtr, bool exact )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ return floatXToI64( &x, softfloat_round_minMag, exact );
+
+}
+
+#ifdef FLOAT16
+
+float16_t slow_extF80M_to_f16( const extFloat80_t *aPtr )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ return floatXToF16( &x );
+
+}
+
+#endif
+
+float32_t slow_extF80M_to_f32( const extFloat80_t *aPtr )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ return floatXToF32( &x );
+
+}
+
+#ifdef FLOAT64
+
+float64_t slow_extF80M_to_f64( const extFloat80_t *aPtr )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ return floatXToF64( &x );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void slow_extF80M_to_f128M( const extFloat80_t *aPtr, float128_t *zPtr )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ floatXToF128M( &x, zPtr );
+
+}
+
+#endif
+
+void
+ slow_extF80M_roundToInt(
+ const extFloat80_t *aPtr,
+ uint_fast8_t roundingMode,
+ bool exact,
+ extFloat80_t *zPtr
+ )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ floatXRoundToInt( &x, roundingMode, exact );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+void
+ slow_extF80M_add(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr )
+{
+ struct floatX x, y;
+
+ extF80MToFloatX( aPtr, &x );
+ extF80MToFloatX( bPtr, &y );
+ floatXAdd( &x, &y );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+void
+ slow_extF80M_sub(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr )
+{
+ struct floatX x, y;
+
+ extF80MToFloatX( aPtr, &x );
+ extF80MToFloatX( bPtr, &y );
+ y.sign = !y.sign;
+ floatXAdd( &x, &y );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+void
+ slow_extF80M_mul(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr )
+{
+ struct floatX x, y;
+
+ extF80MToFloatX( aPtr, &x );
+ extF80MToFloatX( bPtr, &y );
+ floatXMul( &x, &y );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+void
+ slow_extF80M_div(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr )
+{
+ struct floatX x, y;
+
+ extF80MToFloatX( aPtr, &x );
+ extF80MToFloatX( bPtr, &y );
+ floatXDiv( &x, &y );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+void
+ slow_extF80M_rem(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr )
+{
+ struct floatX x, y;
+
+ extF80MToFloatX( aPtr, &x );
+ extF80MToFloatX( bPtr, &y );
+ floatXRem( &x, &y );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+void slow_extF80M_sqrt( const extFloat80_t *aPtr, extFloat80_t *zPtr )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ floatXSqrt( &x );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+bool slow_extF80M_eq( const extFloat80_t *aPtr, const extFloat80_t *bPtr )
+{
+ struct floatX x, y;
+
+ extF80MToFloatX( aPtr, &x );
+ extF80MToFloatX( bPtr, &y );
+ return floatXEq( &x, &y );
+
+}
+
+bool slow_extF80M_le( const extFloat80_t *aPtr, const extFloat80_t *bPtr )
+{
+ struct floatX x, y;
+
+ extF80MToFloatX( aPtr, &x );
+ extF80MToFloatX( bPtr, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXLe( &x, &y );
+
+}
+
+bool slow_extF80M_lt( const extFloat80_t *aPtr, const extFloat80_t *bPtr )
+{
+ struct floatX x, y;
+
+ extF80MToFloatX( aPtr, &x );
+ extF80MToFloatX( bPtr, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXLt( &x, &y );
+
+}
+
+bool
+ slow_extF80M_eq_signaling(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr )
+{
+ struct floatX x, y;
+
+ extF80MToFloatX( aPtr, &x );
+ extF80MToFloatX( bPtr, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXEq( &x, &y );
+
+}
+
+bool slow_extF80M_le_quiet( const extFloat80_t *aPtr, const extFloat80_t *bPtr )
+{
+ struct floatX x, y;
+
+ extF80MToFloatX( aPtr, &x );
+ extF80MToFloatX( bPtr, &y );
+ return floatXLe( &x, &y );
+
+}
+
+bool slow_extF80M_lt_quiet( const extFloat80_t *aPtr, const extFloat80_t *bPtr )
+{
+ struct floatX x, y;
+
+ extF80MToFloatX( aPtr, &x );
+ extF80MToFloatX( bPtr, &y );
+ return floatXLt( &x, &y );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+uint_fast32_t
+ slow_f128M_to_ui32(
+ const float128_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ return floatXToUI32( &x, roundingMode, exact );
+
+}
+
+uint_fast64_t
+ slow_f128M_to_ui64(
+ const float128_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ return floatXToUI64( &x, roundingMode, exact );
+
+}
+
+int_fast32_t
+ slow_f128M_to_i32(
+ const float128_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ return floatXToI32( &x, roundingMode, exact );
+
+}
+
+int_fast64_t
+ slow_f128M_to_i64(
+ const float128_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ return floatXToI64( &x, roundingMode, exact );
+
+}
+
+uint_fast32_t slow_f128M_to_ui32_r_minMag( const float128_t *aPtr, bool exact )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ return floatXToUI32( &x, softfloat_round_minMag, exact );
+
+}
+
+uint_fast64_t slow_f128M_to_ui64_r_minMag( const float128_t *aPtr, bool exact )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ return floatXToUI64( &x, softfloat_round_minMag, exact );
+
+}
+
+int_fast32_t slow_f128M_to_i32_r_minMag( const float128_t *aPtr, bool exact )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ return floatXToI32( &x, softfloat_round_minMag, exact );
+
+}
+
+int_fast64_t slow_f128M_to_i64_r_minMag( const float128_t *aPtr, bool exact )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ return floatXToI64( &x, softfloat_round_minMag, exact );
+
+}
+
+#ifdef FLOAT16
+
+float16_t slow_f128M_to_f16( const float128_t *aPtr )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ return floatXToF16( &x );
+
+}
+
+#endif
+
+float32_t slow_f128M_to_f32( const float128_t *aPtr )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ return floatXToF32( &x );
+
+}
+
+#ifdef FLOAT64
+
+float64_t slow_f128M_to_f64( const float128_t *aPtr )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ return floatXToF64( &x );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void slow_f128M_to_extF80M( const float128_t *aPtr, extFloat80_t *zPtr )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+#endif
+
+void
+ slow_f128M_roundToInt(
+ const float128_t *aPtr,
+ uint_fast8_t roundingMode,
+ bool exact,
+ float128_t *zPtr
+ )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ floatXRoundToInt( &x, roundingMode, exact );
+ floatXToF128M( &x, zPtr );
+
+}
+
+void
+ slow_f128M_add(
+ const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr )
+{
+ struct floatX x, y;
+
+ f128MToFloatX( aPtr, &x );
+ f128MToFloatX( bPtr, &y );
+ floatXAdd( &x, &y );
+ floatXToF128M( &x, zPtr );
+
+}
+
+void
+ slow_f128M_sub(
+ const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr )
+{
+ struct floatX x, y;
+
+ f128MToFloatX( aPtr, &x );
+ f128MToFloatX( bPtr, &y );
+ y.sign = !y.sign;
+ floatXAdd( &x, &y );
+ floatXToF128M( &x, zPtr );
+
+}
+
+void
+ slow_f128M_mul(
+ const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr )
+{
+ struct floatX x, y;
+
+ f128MToFloatX( aPtr, &x );
+ f128MToFloatX( bPtr, &y );
+ floatXMul( &x, &y );
+ floatXToF128M( &x, zPtr );
+
+}
+
+void
+ slow_f128M_mulAdd(
+ const float128_t *aPtr,
+ const float128_t *bPtr,
+ const float128_t *cPtr,
+ float128_t *zPtr
+ )
+{
+ struct floatX256 x, y;
+
+ f128MToFloatX256( aPtr, &x );
+ f128MToFloatX256( bPtr, &y );
+ floatX256Mul( &x, &y );
+ f128MToFloatX256( cPtr, &y );
+ floatX256Add( &x, &y );
+ floatX256ToF128M( &x, zPtr );
+
+}
+
+void
+ slow_f128M_div(
+ const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr )
+{
+ struct floatX x, y;
+
+ f128MToFloatX( aPtr, &x );
+ f128MToFloatX( bPtr, &y );
+ floatXDiv( &x, &y );
+ floatXToF128M( &x, zPtr );
+
+}
+
+void
+ slow_f128M_rem(
+ const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr )
+{
+ struct floatX x, y;
+
+ f128MToFloatX( aPtr, &x );
+ f128MToFloatX( bPtr, &y );
+ floatXRem( &x, &y );
+ floatXToF128M( &x, zPtr );
+
+}
+
+void slow_f128M_sqrt( const float128_t *aPtr, float128_t *zPtr )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ floatXSqrt( &x );
+ floatXToF128M( &x, zPtr );
+
+}
+
+bool slow_f128M_eq( const float128_t *aPtr, const float128_t *bPtr )
+{
+ struct floatX x, y;
+
+ f128MToFloatX( aPtr, &x );
+ f128MToFloatX( bPtr, &y );
+ return floatXEq( &x, &y );
+
+}
+
+bool slow_f128M_le( const float128_t *aPtr, const float128_t *bPtr )
+{
+ struct floatX x, y;
+
+ f128MToFloatX( aPtr, &x );
+ f128MToFloatX( bPtr, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXLe( &x, &y );
+
+}
+
+bool slow_f128M_lt( const float128_t *aPtr, const float128_t *bPtr )
+{
+ struct floatX x, y;
+
+ f128MToFloatX( aPtr, &x );
+ f128MToFloatX( bPtr, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXLt( &x, &y );
+
+}
+
+bool slow_f128M_eq_signaling( const float128_t *aPtr, const float128_t *bPtr )
+{
+ struct floatX x, y;
+
+ f128MToFloatX( aPtr, &x );
+ f128MToFloatX( bPtr, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXEq( &x, &y );
+
+}
+
+bool slow_f128M_le_quiet( const float128_t *aPtr, const float128_t *bPtr )
+{
+ struct floatX x, y;
+
+ f128MToFloatX( aPtr, &x );
+ f128MToFloatX( bPtr, &y );
+ return floatXLe( &x, &y );
+
+}
+
+bool slow_f128M_lt_quiet( const float128_t *aPtr, const float128_t *bPtr )
+{
+ struct floatX x, y;
+
+ f128MToFloatX( aPtr, &x );
+ f128MToFloatX( bPtr, &y );
+ return floatXLt( &x, &y );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/slowfloat.h b/src/libs/softfloat-3e/testfloat/source/slowfloat.h
new file mode 100644
index 00000000..b2240e77
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/slowfloat.h
@@ -0,0 +1,298 @@
+
+/*============================================================================
+
+This C header file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "softfloat.h"
+
+extern uint_fast8_t slowfloat_roundingMode;
+extern uint_fast8_t slowfloat_detectTininess;
+extern uint_fast8_t slowfloat_exceptionFlags;
+#ifdef EXTFLOAT80
+extern uint_fast8_t slow_extF80_roundingPrecision;
+#endif
+
+#ifdef FLOAT16
+float16_t slow_ui32_to_f16( uint32_t );
+#endif
+float32_t slow_ui32_to_f32( uint32_t );
+#ifdef FLOAT64
+float64_t slow_ui32_to_f64( uint32_t );
+#endif
+#ifdef EXTFLOAT80
+void slow_ui32_to_extF80M( uint32_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void slow_ui32_to_f128M( uint32_t, float128_t * );
+#endif
+#ifdef FLOAT16
+float16_t slow_ui64_to_f16( uint64_t );
+#endif
+float32_t slow_ui64_to_f32( uint64_t );
+#ifdef FLOAT64
+float64_t slow_ui64_to_f64( uint64_t );
+#endif
+#ifdef EXTFLOAT80
+void slow_ui64_to_extF80M( uint64_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void slow_ui64_to_f128M( uint64_t, float128_t * );
+#endif
+#ifdef FLOAT16
+float16_t slow_i32_to_f16( int32_t );
+#endif
+float32_t slow_i32_to_f32( int32_t );
+#ifdef FLOAT64
+float64_t slow_i32_to_f64( int32_t );
+#endif
+#ifdef EXTFLOAT80
+void slow_i32_to_extF80M( int32_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void slow_i32_to_f128M( int32_t, float128_t * );
+#endif
+#ifdef FLOAT16
+float16_t slow_i64_to_f16( int64_t );
+#endif
+float32_t slow_i64_to_f32( int64_t );
+#ifdef FLOAT64
+float64_t slow_i64_to_f64( int64_t );
+#endif
+#ifdef EXTFLOAT80
+void slow_i64_to_extF80M( int64_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void slow_i64_to_f128M( int64_t, float128_t * );
+#endif
+
+#ifdef FLOAT16
+uint_fast32_t slow_f16_to_ui32( float16_t, uint_fast8_t, bool );
+uint_fast64_t slow_f16_to_ui64( float16_t, uint_fast8_t, bool );
+int_fast32_t slow_f16_to_i32( float16_t, uint_fast8_t, bool );
+int_fast64_t slow_f16_to_i64( float16_t, uint_fast8_t, bool );
+uint_fast32_t slow_f16_to_ui32_r_minMag( float16_t, bool );
+uint_fast64_t slow_f16_to_ui64_r_minMag( float16_t, bool );
+int_fast32_t slow_f16_to_i32_r_minMag( float16_t, bool );
+int_fast64_t slow_f16_to_i64_r_minMag( float16_t, bool );
+float32_t slow_f16_to_f32( float16_t );
+#ifdef FLOAT64
+float64_t slow_f16_to_f64( float16_t );
+#endif
+#ifdef EXTFLOAT80
+void slow_f16_to_extF80M( float16_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void slow_f16_to_f128M( float16_t, float128_t * );
+#endif
+float16_t slow_f16_roundToInt( float16_t, uint_fast8_t, bool );
+float16_t slow_f16_add( float16_t, float16_t );
+float16_t slow_f16_sub( float16_t, float16_t );
+float16_t slow_f16_mul( float16_t, float16_t );
+float16_t slow_f16_mulAdd( float16_t, float16_t, float16_t );
+float16_t slow_f16_div( float16_t, float16_t );
+float16_t slow_f16_rem( float16_t, float16_t );
+float16_t slow_f16_sqrt( float16_t );
+bool slow_f16_eq( float16_t, float16_t );
+bool slow_f16_le( float16_t, float16_t );
+bool slow_f16_lt( float16_t, float16_t );
+bool slow_f16_eq_signaling( float16_t, float16_t );
+bool slow_f16_le_quiet( float16_t, float16_t );
+bool slow_f16_lt_quiet( float16_t, float16_t );
+#endif
+
+uint_fast32_t slow_f32_to_ui32( float32_t, uint_fast8_t, bool );
+uint_fast64_t slow_f32_to_ui64( float32_t, uint_fast8_t, bool );
+int_fast32_t slow_f32_to_i32( float32_t, uint_fast8_t, bool );
+int_fast64_t slow_f32_to_i64( float32_t, uint_fast8_t, bool );
+uint_fast32_t slow_f32_to_ui32_r_minMag( float32_t, bool );
+uint_fast64_t slow_f32_to_ui64_r_minMag( float32_t, bool );
+int_fast32_t slow_f32_to_i32_r_minMag( float32_t, bool );
+int_fast64_t slow_f32_to_i64_r_minMag( float32_t, bool );
+#ifdef FLOAT16
+float16_t slow_f32_to_f16( float32_t );
+#endif
+#ifdef FLOAT64
+float64_t slow_f32_to_f64( float32_t );
+#endif
+#ifdef EXTFLOAT80
+void slow_f32_to_extF80M( float32_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void slow_f32_to_f128M( float32_t, float128_t * );
+#endif
+float32_t slow_f32_roundToInt( float32_t, uint_fast8_t, bool );
+float32_t slow_f32_add( float32_t, float32_t );
+float32_t slow_f32_sub( float32_t, float32_t );
+float32_t slow_f32_mul( float32_t, float32_t );
+float32_t slow_f32_mulAdd( float32_t, float32_t, float32_t );
+float32_t slow_f32_div( float32_t, float32_t );
+float32_t slow_f32_rem( float32_t, float32_t );
+float32_t slow_f32_sqrt( float32_t );
+bool slow_f32_eq( float32_t, float32_t );
+bool slow_f32_le( float32_t, float32_t );
+bool slow_f32_lt( float32_t, float32_t );
+bool slow_f32_eq_signaling( float32_t, float32_t );
+bool slow_f32_le_quiet( float32_t, float32_t );
+bool slow_f32_lt_quiet( float32_t, float32_t );
+
+#ifdef FLOAT64
+uint_fast32_t slow_f64_to_ui32( float64_t, uint_fast8_t, bool );
+uint_fast64_t slow_f64_to_ui64( float64_t, uint_fast8_t, bool );
+int_fast32_t slow_f64_to_i32( float64_t, uint_fast8_t, bool );
+int_fast64_t slow_f64_to_i64( float64_t, uint_fast8_t, bool );
+uint_fast32_t slow_f64_to_ui32_r_minMag( float64_t, bool );
+uint_fast64_t slow_f64_to_ui64_r_minMag( float64_t, bool );
+int_fast32_t slow_f64_to_i32_r_minMag( float64_t, bool );
+int_fast64_t slow_f64_to_i64_r_minMag( float64_t, bool );
+#ifdef FLOAT16
+float16_t slow_f64_to_f16( float64_t );
+#endif
+float32_t slow_f64_to_f32( float64_t );
+#ifdef EXTFLOAT80
+void slow_f64_to_extF80M( float64_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void slow_f64_to_f128M( float64_t, float128_t * );
+#endif
+float64_t slow_f64_roundToInt( float64_t, uint_fast8_t, bool );
+float64_t slow_f64_add( float64_t, float64_t );
+float64_t slow_f64_sub( float64_t, float64_t );
+float64_t slow_f64_mul( float64_t, float64_t );
+float64_t slow_f64_mulAdd( float64_t, float64_t, float64_t );
+float64_t slow_f64_div( float64_t, float64_t );
+float64_t slow_f64_rem( float64_t, float64_t );
+float64_t slow_f64_sqrt( float64_t );
+bool slow_f64_eq( float64_t, float64_t );
+bool slow_f64_le( float64_t, float64_t );
+bool slow_f64_lt( float64_t, float64_t );
+bool slow_f64_eq_signaling( float64_t, float64_t );
+bool slow_f64_le_quiet( float64_t, float64_t );
+bool slow_f64_lt_quiet( float64_t, float64_t );
+#endif
+
+#ifdef EXTFLOAT80
+uint_fast32_t slow_extF80M_to_ui32( const extFloat80_t *, uint_fast8_t, bool );
+uint_fast64_t slow_extF80M_to_ui64( const extFloat80_t *, uint_fast8_t, bool );
+int_fast32_t slow_extF80M_to_i32( const extFloat80_t *, uint_fast8_t, bool );
+int_fast64_t slow_extF80M_to_i64( const extFloat80_t *, uint_fast8_t, bool );
+uint_fast32_t slow_extF80M_to_ui32_r_minMag( const extFloat80_t *, bool );
+uint_fast64_t slow_extF80M_to_ui64_r_minMag( const extFloat80_t *, bool );
+int_fast32_t slow_extF80M_to_i32_r_minMag( const extFloat80_t *, bool );
+int_fast64_t slow_extF80M_to_i64_r_minMag( const extFloat80_t *, bool );
+#ifdef FLOAT16
+float16_t slow_extF80M_to_f16( const extFloat80_t * );
+#endif
+float32_t slow_extF80M_to_f32( const extFloat80_t * );
+#ifdef FLOAT64
+float64_t slow_extF80M_to_f64( const extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void slow_extF80M_to_f128M( const extFloat80_t *, float128_t * );
+#endif
+void
+ slow_extF80M_roundToInt(
+ const extFloat80_t *, uint_fast8_t, bool, extFloat80_t * );
+void
+ slow_extF80M_add(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+void
+ slow_extF80M_sub(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+void
+ slow_extF80M_mul(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+void
+ slow_extF80M_mulAdd(
+ const extFloat80_t *,
+ const extFloat80_t *,
+ const extFloat80_t *,
+ extFloat80_t *
+ );
+void
+ slow_extF80M_div(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+void
+ slow_extF80M_rem(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+void slow_extF80M_sqrt( const extFloat80_t *, extFloat80_t * );
+bool slow_extF80M_eq( const extFloat80_t *, const extFloat80_t * );
+bool slow_extF80M_le( const extFloat80_t *, const extFloat80_t * );
+bool slow_extF80M_lt( const extFloat80_t *, const extFloat80_t * );
+bool slow_extF80M_eq_signaling( const extFloat80_t *, const extFloat80_t * );
+bool slow_extF80M_le_quiet( const extFloat80_t *, const extFloat80_t * );
+bool slow_extF80M_lt_quiet( const extFloat80_t *, const extFloat80_t * );
+#endif
+
+#ifdef FLOAT128
+uint_fast32_t slow_f128M_to_ui32( const float128_t *, uint_fast8_t, bool );
+uint_fast64_t slow_f128M_to_ui64( const float128_t *, uint_fast8_t, bool );
+int_fast32_t slow_f128M_to_i32( const float128_t *, uint_fast8_t, bool );
+int_fast64_t slow_f128M_to_i64( const float128_t *, uint_fast8_t, bool );
+uint_fast32_t slow_f128M_to_ui32_r_minMag( const float128_t *, bool );
+uint_fast64_t slow_f128M_to_ui64_r_minMag( const float128_t *, bool );
+int_fast32_t slow_f128M_to_i32_r_minMag( const float128_t *, bool );
+int_fast64_t slow_f128M_to_i64_r_minMag( const float128_t *, bool );
+#ifdef FLOAT16
+float16_t slow_f128M_to_f16( const float128_t * );
+#endif
+float32_t slow_f128M_to_f32( const float128_t * );
+#ifdef FLOAT64
+float64_t slow_f128M_to_f64( const float128_t * );
+#endif
+#ifdef EXTFLOAT80
+void slow_f128M_to_extF80M( const float128_t *, extFloat80_t * );
+#endif
+void
+ slow_f128M_roundToInt( const float128_t *, uint_fast8_t, bool, float128_t * );
+void slow_f128M_add( const float128_t *, const float128_t *, float128_t * );
+void slow_f128M_sub( const float128_t *, const float128_t *, float128_t * );
+void slow_f128M_mul( const float128_t *, const float128_t *, float128_t * );
+void
+ slow_f128M_mulAdd(
+ const float128_t *, const float128_t *, const float128_t *, float128_t *
+ );
+void slow_f128M_div( const float128_t *, const float128_t *, float128_t * );
+void slow_f128M_rem( const float128_t *, const float128_t *, float128_t * );
+void slow_f128M_sqrt( const float128_t *, float128_t * );
+bool slow_f128M_eq( const float128_t *, const float128_t * );
+bool slow_f128M_le( const float128_t *, const float128_t * );
+bool slow_f128M_lt( const float128_t *, const float128_t * );
+bool slow_f128M_eq_signaling( const float128_t *, const float128_t * );
+bool slow_f128M_le_quiet( const float128_t *, const float128_t * );
+bool slow_f128M_lt_quiet( const float128_t *, const float128_t * );
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/standardFunctionInfos.c b/src/libs/softfloat-3e/testfloat/source/standardFunctionInfos.c
new file mode 100644
index 00000000..2ccc0011
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/standardFunctionInfos.c
@@ -0,0 +1,471 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include "platform.h"
+#include "functions.h"
+
+#define RNEVEN ROUND_NEAR_EVEN
+#define RMINM ROUND_MINMAG
+#define RMIN ROUND_MIN
+#define RMAX ROUND_MAX
+#define RNMAXM ROUND_NEAR_MAXMAG
+
+const struct standardFunctionInfo standardFunctionInfos[] = {
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT16
+ { "ui32_to_f16", UI32_TO_F16, 0, 0 },
+#endif
+ { "ui32_to_f32", UI32_TO_F32, 0, 0 },
+#ifdef FLOAT64
+ { "ui32_to_f64", UI32_TO_F64, 0, 0 },
+#endif
+#ifdef EXTFLOAT80
+ { "ui32_to_extF80", UI32_TO_EXTF80, 0, 0 },
+#endif
+#ifdef FLOAT128
+ { "ui32_to_f128", UI32_TO_F128, 0, 0 },
+#endif
+#ifdef FLOAT16
+ { "ui64_to_f16", UI64_TO_F16, 0, 0 },
+#endif
+ { "ui64_to_f32", UI64_TO_F32, 0, 0 },
+#ifdef FLOAT64
+ { "ui64_to_f64", UI64_TO_F64, 0, 0 },
+#endif
+#ifdef EXTFLOAT80
+ { "ui64_to_extF80", UI64_TO_EXTF80, 0, 0 },
+#endif
+#ifdef FLOAT128
+ { "ui64_to_f128", UI64_TO_F128, 0, 0 },
+#endif
+#ifdef FLOAT16
+ { "i32_to_f16", I32_TO_F16, 0, 0 },
+#endif
+ { "i32_to_f32", I32_TO_F32, 0, 0 },
+#ifdef FLOAT64
+ { "i32_to_f64", I32_TO_F64, 0, 0 },
+#endif
+#ifdef EXTFLOAT80
+ { "i32_to_extF80", I32_TO_EXTF80, 0, 0 },
+#endif
+#ifdef FLOAT128
+ { "i32_to_f128", I32_TO_F128, 0, 0 },
+#endif
+#ifdef FLOAT16
+ { "i64_to_f16", I64_TO_F16, 0, 0 },
+#endif
+ { "i64_to_f32", I64_TO_F32, 0, 0 },
+#ifdef FLOAT64
+ { "i64_to_f64", I64_TO_F64, 0, 0 },
+#endif
+#ifdef EXTFLOAT80
+ { "i64_to_extF80", I64_TO_EXTF80, 0, 0 },
+#endif
+#ifdef FLOAT128
+ { "i64_to_f128", I64_TO_F128, 0, 0 },
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT16
+ { "f16_to_ui32_r_near_even", F16_TO_UI32, RNEVEN, false },
+ { "f16_to_ui32_r_minMag", F16_TO_UI32, RMINM, false },
+ { "f16_to_ui32_r_min", F16_TO_UI32, RMIN, false },
+ { "f16_to_ui32_r_max", F16_TO_UI32, RMAX, false },
+ { "f16_to_ui32_r_near_maxMag", F16_TO_UI32, RNMAXM, false },
+ { "f16_to_ui64_r_near_even", F16_TO_UI64, RNEVEN, false },
+ { "f16_to_ui64_r_minMag", F16_TO_UI64, RMINM, false },
+ { "f16_to_ui64_r_min", F16_TO_UI64, RMIN, false },
+ { "f16_to_ui64_r_max", F16_TO_UI64, RMAX, false },
+ { "f16_to_ui64_r_near_maxMag", F16_TO_UI64, RNMAXM, false },
+ { "f16_to_i32_r_near_even", F16_TO_I32, RNEVEN, false },
+ { "f16_to_i32_r_minMag", F16_TO_I32, RMINM, false },
+ { "f16_to_i32_r_min", F16_TO_I32, RMIN, false },
+ { "f16_to_i32_r_max", F16_TO_I32, RMAX, false },
+ { "f16_to_i32_r_near_maxMag", F16_TO_I32, RNMAXM, false },
+ { "f16_to_i64_r_near_even", F16_TO_I64, RNEVEN, false },
+ { "f16_to_i64_r_minMag", F16_TO_I64, RMINM, false },
+ { "f16_to_i64_r_min", F16_TO_I64, RMIN, false },
+ { "f16_to_i64_r_max", F16_TO_I64, RMAX, false },
+ { "f16_to_i64_r_near_maxMag", F16_TO_I64, RNMAXM, false },
+ { "f16_to_ui32_rx_near_even", F16_TO_UI32, RNEVEN, true },
+ { "f16_to_ui32_rx_minMag", F16_TO_UI32, RMINM, true },
+ { "f16_to_ui32_rx_min", F16_TO_UI32, RMIN, true },
+ { "f16_to_ui32_rx_max", F16_TO_UI32, RMAX, true },
+ { "f16_to_ui32_rx_near_maxMag", F16_TO_UI32, RNMAXM, true },
+ { "f16_to_ui64_rx_near_even", F16_TO_UI64, RNEVEN, true },
+ { "f16_to_ui64_rx_minMag", F16_TO_UI64, RMINM, true },
+ { "f16_to_ui64_rx_min", F16_TO_UI64, RMIN, true },
+ { "f16_to_ui64_rx_max", F16_TO_UI64, RMAX, true },
+ { "f16_to_ui64_rx_near_maxMag", F16_TO_UI64, RNMAXM, true },
+ { "f16_to_i32_rx_near_even", F16_TO_I32, RNEVEN, true },
+ { "f16_to_i32_rx_minMag", F16_TO_I32, RMINM, true },
+ { "f16_to_i32_rx_min", F16_TO_I32, RMIN, true },
+ { "f16_to_i32_rx_max", F16_TO_I32, RMAX, true },
+ { "f16_to_i32_rx_near_maxMag", F16_TO_I32, RNMAXM, true },
+ { "f16_to_i64_rx_near_even", F16_TO_I64, RNEVEN, true },
+ { "f16_to_i64_rx_minMag", F16_TO_I64, RMINM, true },
+ { "f16_to_i64_rx_min", F16_TO_I64, RMIN, true },
+ { "f16_to_i64_rx_max", F16_TO_I64, RMAX, true },
+ { "f16_to_i64_rx_near_maxMag", F16_TO_I64, RNMAXM, true },
+ { "f16_to_f32", F16_TO_F32, 0, 0 },
+#ifdef FLOAT64
+ { "f16_to_f64", F16_TO_F64, 0, 0 },
+#endif
+#ifdef EXTFLOAT80
+ { "f16_to_extF80", F16_TO_EXTF80, 0, 0 },
+#endif
+#ifdef FLOAT128
+ { "f16_to_f128", F16_TO_F128, 0, 0 },
+#endif
+ { "f16_roundToInt_r_near_even", F16_ROUNDTOINT, RNEVEN, false },
+ { "f16_roundToInt_r_minMag", F16_ROUNDTOINT, RMINM, false },
+ { "f16_roundToInt_r_min", F16_ROUNDTOINT, RMIN, false },
+ { "f16_roundToInt_r_max", F16_ROUNDTOINT, RMAX, false },
+ { "f16_roundToInt_r_near_maxMag", F16_ROUNDTOINT, RNMAXM, false },
+ { "f16_roundToInt_x", F16_ROUNDTOINT, 0, true },
+ { "f16_add", F16_ADD, 0, 0 },
+ { "f16_sub", F16_SUB, 0, 0 },
+ { "f16_mul", F16_MUL, 0, 0 },
+ { "f16_mulAdd", F16_MULADD, 0, 0 },
+ { "f16_div", F16_DIV, 0, 0 },
+ { "f16_rem", F16_REM, 0, 0 },
+ { "f16_sqrt", F16_SQRT, 0, 0 },
+ { "f16_eq", F16_EQ, 0, 0 },
+ { "f16_le", F16_LE, 0, 0 },
+ { "f16_lt", F16_LT, 0, 0 },
+ { "f16_eq_signaling", F16_EQ_SIGNALING, 0, 0 },
+ { "f16_le_quiet", F16_LE_QUIET, 0, 0 },
+ { "f16_lt_quiet", F16_LT_QUIET, 0, 0 },
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ { "f32_to_ui32_r_near_even", F32_TO_UI32, RNEVEN, false },
+ { "f32_to_ui32_r_minMag", F32_TO_UI32, RMINM, false },
+ { "f32_to_ui32_r_min", F32_TO_UI32, RMIN, false },
+ { "f32_to_ui32_r_max", F32_TO_UI32, RMAX, false },
+ { "f32_to_ui32_r_near_maxMag", F32_TO_UI32, RNMAXM, false },
+ { "f32_to_ui64_r_near_even", F32_TO_UI64, RNEVEN, false },
+ { "f32_to_ui64_r_minMag", F32_TO_UI64, RMINM, false },
+ { "f32_to_ui64_r_min", F32_TO_UI64, RMIN, false },
+ { "f32_to_ui64_r_max", F32_TO_UI64, RMAX, false },
+ { "f32_to_ui64_r_near_maxMag", F32_TO_UI64, RNMAXM, false },
+ { "f32_to_i32_r_near_even", F32_TO_I32, RNEVEN, false },
+ { "f32_to_i32_r_minMag", F32_TO_I32, RMINM, false },
+ { "f32_to_i32_r_min", F32_TO_I32, RMIN, false },
+ { "f32_to_i32_r_max", F32_TO_I32, RMAX, false },
+ { "f32_to_i32_r_near_maxMag", F32_TO_I32, RNMAXM, false },
+ { "f32_to_i64_r_near_even", F32_TO_I64, RNEVEN, false },
+ { "f32_to_i64_r_minMag", F32_TO_I64, RMINM, false },
+ { "f32_to_i64_r_min", F32_TO_I64, RMIN, false },
+ { "f32_to_i64_r_max", F32_TO_I64, RMAX, false },
+ { "f32_to_i64_r_near_maxMag", F32_TO_I64, RNMAXM, false },
+ { "f32_to_ui32_rx_near_even", F32_TO_UI32, RNEVEN, true },
+ { "f32_to_ui32_rx_minMag", F32_TO_UI32, RMINM, true },
+ { "f32_to_ui32_rx_min", F32_TO_UI32, RMIN, true },
+ { "f32_to_ui32_rx_max", F32_TO_UI32, RMAX, true },
+ { "f32_to_ui32_rx_near_maxMag", F32_TO_UI32, RNMAXM, true },
+ { "f32_to_ui64_rx_near_even", F32_TO_UI64, RNEVEN, true },
+ { "f32_to_ui64_rx_minMag", F32_TO_UI64, RMINM, true },
+ { "f32_to_ui64_rx_min", F32_TO_UI64, RMIN, true },
+ { "f32_to_ui64_rx_max", F32_TO_UI64, RMAX, true },
+ { "f32_to_ui64_rx_near_maxMag", F32_TO_UI64, RNMAXM, true },
+ { "f32_to_i32_rx_near_even", F32_TO_I32, RNEVEN, true },
+ { "f32_to_i32_rx_minMag", F32_TO_I32, RMINM, true },
+ { "f32_to_i32_rx_min", F32_TO_I32, RMIN, true },
+ { "f32_to_i32_rx_max", F32_TO_I32, RMAX, true },
+ { "f32_to_i32_rx_near_maxMag", F32_TO_I32, RNMAXM, true },
+ { "f32_to_i64_rx_near_even", F32_TO_I64, RNEVEN, true },
+ { "f32_to_i64_rx_minMag", F32_TO_I64, RMINM, true },
+ { "f32_to_i64_rx_min", F32_TO_I64, RMIN, true },
+ { "f32_to_i64_rx_max", F32_TO_I64, RMAX, true },
+ { "f32_to_i64_rx_near_maxMag", F32_TO_I64, RNMAXM, true },
+#ifdef FLOAT16
+ { "f32_to_f16", F32_TO_F16, 0, 0 },
+#endif
+#ifdef FLOAT64
+ { "f32_to_f64", F32_TO_F64, 0, 0 },
+#endif
+#ifdef EXTFLOAT80
+ { "f32_to_extF80", F32_TO_EXTF80, 0, 0 },
+#endif
+#ifdef FLOAT128
+ { "f32_to_f128", F32_TO_F128, 0, 0 },
+#endif
+ { "f32_roundToInt_r_near_even", F32_ROUNDTOINT, RNEVEN, false },
+ { "f32_roundToInt_r_minMag", F32_ROUNDTOINT, RMINM, false },
+ { "f32_roundToInt_r_min", F32_ROUNDTOINT, RMIN, false },
+ { "f32_roundToInt_r_max", F32_ROUNDTOINT, RMAX, false },
+ { "f32_roundToInt_r_near_maxMag", F32_ROUNDTOINT, RNMAXM, false },
+ { "f32_roundToInt_x", F32_ROUNDTOINT, 0, true },
+ { "f32_add", F32_ADD, 0, 0 },
+ { "f32_sub", F32_SUB, 0, 0 },
+ { "f32_mul", F32_MUL, 0, 0 },
+ { "f32_mulAdd", F32_MULADD, 0, 0 },
+ { "f32_div", F32_DIV, 0, 0 },
+ { "f32_rem", F32_REM, 0, 0 },
+ { "f32_sqrt", F32_SQRT, 0, 0 },
+ { "f32_eq", F32_EQ, 0, 0 },
+ { "f32_le", F32_LE, 0, 0 },
+ { "f32_lt", F32_LT, 0, 0 },
+ { "f32_eq_signaling", F32_EQ_SIGNALING, 0, 0 },
+ { "f32_le_quiet", F32_LE_QUIET, 0, 0 },
+ { "f32_lt_quiet", F32_LT_QUIET, 0, 0 },
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT64
+ { "f64_to_ui32_r_near_even", F64_TO_UI32, RNEVEN, false },
+ { "f64_to_ui32_r_minMag", F64_TO_UI32, RMINM, false },
+ { "f64_to_ui32_r_min", F64_TO_UI32, RMIN, false },
+ { "f64_to_ui32_r_max", F64_TO_UI32, RMAX, false },
+ { "f64_to_ui32_r_near_maxMag", F64_TO_UI32, RNMAXM, false },
+ { "f64_to_ui64_r_near_even", F64_TO_UI64, RNEVEN, false },
+ { "f64_to_ui64_r_minMag", F64_TO_UI64, RMINM, false },
+ { "f64_to_ui64_r_min", F64_TO_UI64, RMIN, false },
+ { "f64_to_ui64_r_max", F64_TO_UI64, RMAX, false },
+ { "f64_to_ui64_r_near_maxMag", F64_TO_UI64, RNMAXM, false },
+ { "f64_to_i32_r_near_even", F64_TO_I32, RNEVEN, false },
+ { "f64_to_i32_r_minMag", F64_TO_I32, RMINM, false },
+ { "f64_to_i32_r_min", F64_TO_I32, RMIN, false },
+ { "f64_to_i32_r_max", F64_TO_I32, RMAX, false },
+ { "f64_to_i32_r_near_maxMag", F64_TO_I32, RNMAXM, false },
+ { "f64_to_i64_r_near_even", F64_TO_I64, RNEVEN, false },
+ { "f64_to_i64_r_minMag", F64_TO_I64, RMINM, false },
+ { "f64_to_i64_r_min", F64_TO_I64, RMIN, false },
+ { "f64_to_i64_r_max", F64_TO_I64, RMAX, false },
+ { "f64_to_i64_r_near_maxMag", F64_TO_I64, RNMAXM, false },
+ { "f64_to_ui32_rx_near_even", F64_TO_UI32, RNEVEN, true },
+ { "f64_to_ui32_rx_minMag", F64_TO_UI32, RMINM, true },
+ { "f64_to_ui32_rx_min", F64_TO_UI32, RMIN, true },
+ { "f64_to_ui32_rx_max", F64_TO_UI32, RMAX, true },
+ { "f64_to_ui32_rx_near_maxMag", F64_TO_UI32, RNMAXM, true },
+ { "f64_to_ui64_rx_near_even", F64_TO_UI64, RNEVEN, true },
+ { "f64_to_ui64_rx_minMag", F64_TO_UI64, RMINM, true },
+ { "f64_to_ui64_rx_min", F64_TO_UI64, RMIN, true },
+ { "f64_to_ui64_rx_max", F64_TO_UI64, RMAX, true },
+ { "f64_to_ui64_rx_near_maxMag", F64_TO_UI64, RNMAXM, true },
+ { "f64_to_i32_rx_near_even", F64_TO_I32, RNEVEN, true },
+ { "f64_to_i32_rx_minMag", F64_TO_I32, RMINM, true },
+ { "f64_to_i32_rx_min", F64_TO_I32, RMIN, true },
+ { "f64_to_i32_rx_max", F64_TO_I32, RMAX, true },
+ { "f64_to_i32_rx_near_maxMag", F64_TO_I32, RNMAXM, true },
+ { "f64_to_i64_rx_near_even", F64_TO_I64, RNEVEN, true },
+ { "f64_to_i64_rx_minMag", F64_TO_I64, RMINM, true },
+ { "f64_to_i64_rx_min", F64_TO_I64, RMIN, true },
+ { "f64_to_i64_rx_max", F64_TO_I64, RMAX, true },
+ { "f64_to_i64_rx_near_maxMag", F64_TO_I64, RNMAXM, true },
+#ifdef FLOAT16
+ { "f64_to_f16", F64_TO_F16, 0, 0 },
+#endif
+ { "f64_to_f32", F64_TO_F32, 0, 0 },
+#ifdef EXTFLOAT80
+ { "f64_to_extF80", F64_TO_EXTF80, 0, 0 },
+#endif
+#ifdef FLOAT128
+ { "f64_to_f128", F64_TO_F128, 0, 0 },
+#endif
+ { "f64_roundToInt_r_near_even", F64_ROUNDTOINT, RNEVEN, false },
+ { "f64_roundToInt_r_minMag", F64_ROUNDTOINT, RMINM, false },
+ { "f64_roundToInt_r_min", F64_ROUNDTOINT, RMIN, false },
+ { "f64_roundToInt_r_max", F64_ROUNDTOINT, RMAX, false },
+ { "f64_roundToInt_r_near_maxMag", F64_ROUNDTOINT, RNMAXM, false },
+ { "f64_roundToInt_x", F64_ROUNDTOINT, 0, true },
+ { "f64_add", F64_ADD, 0, 0 },
+ { "f64_sub", F64_SUB, 0, 0 },
+ { "f64_mul", F64_MUL, 0, 0 },
+ { "f64_mulAdd", F64_MULADD, 0, 0 },
+ { "f64_div", F64_DIV, 0, 0 },
+ { "f64_rem", F64_REM, 0, 0 },
+ { "f64_sqrt", F64_SQRT, 0, 0 },
+ { "f64_eq", F64_EQ, 0, 0 },
+ { "f64_le", F64_LE, 0, 0 },
+ { "f64_lt", F64_LT, 0, 0 },
+ { "f64_eq_signaling", F64_EQ_SIGNALING, 0, 0 },
+ { "f64_le_quiet", F64_LE_QUIET, 0, 0 },
+ { "f64_lt_quiet", F64_LT_QUIET, 0, 0 },
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef EXTFLOAT80
+ { "extF80_to_ui32_r_near_even", EXTF80_TO_UI32, RNEVEN, false },
+ { "extF80_to_ui32_r_minMag", EXTF80_TO_UI32, RMINM, false },
+ { "extF80_to_ui32_r_min", EXTF80_TO_UI32, RMIN, false },
+ { "extF80_to_ui32_r_max", EXTF80_TO_UI32, RMAX, false },
+ { "extF80_to_ui32_r_near_maxMag", EXTF80_TO_UI32, RNMAXM, false },
+ { "extF80_to_ui64_r_near_even", EXTF80_TO_UI64, RNEVEN, false },
+ { "extF80_to_ui64_r_minMag", EXTF80_TO_UI64, RMINM, false },
+ { "extF80_to_ui64_r_min", EXTF80_TO_UI64, RMIN, false },
+ { "extF80_to_ui64_r_max", EXTF80_TO_UI64, RMAX, false },
+ { "extF80_to_ui64_r_near_maxMag", EXTF80_TO_UI64, RNMAXM, false },
+ { "extF80_to_i32_r_near_even", EXTF80_TO_I32, RNEVEN, false },
+ { "extF80_to_i32_r_minMag", EXTF80_TO_I32, RMINM, false },
+ { "extF80_to_i32_r_min", EXTF80_TO_I32, RMIN, false },
+ { "extF80_to_i32_r_max", EXTF80_TO_I32, RMAX, false },
+ { "extF80_to_i32_r_near_maxMag", EXTF80_TO_I32, RNMAXM, false },
+ { "extF80_to_i64_r_near_even", EXTF80_TO_I64, RNEVEN, false },
+ { "extF80_to_i64_r_minMag", EXTF80_TO_I64, RMINM, false },
+ { "extF80_to_i64_r_min", EXTF80_TO_I64, RMIN, false },
+ { "extF80_to_i64_r_max", EXTF80_TO_I64, RMAX, false },
+ { "extF80_to_i64_r_near_maxMag", EXTF80_TO_I64, RNMAXM, false },
+ { "extF80_to_ui32_rx_near_even", EXTF80_TO_UI32, RNEVEN, true },
+ { "extF80_to_ui32_rx_minMag", EXTF80_TO_UI32, RMINM, true },
+ { "extF80_to_ui32_rx_min", EXTF80_TO_UI32, RMIN, true },
+ { "extF80_to_ui32_rx_max", EXTF80_TO_UI32, RMAX, true },
+ { "extF80_to_ui32_rx_near_maxMag", EXTF80_TO_UI32, RNMAXM, true },
+ { "extF80_to_ui64_rx_near_even", EXTF80_TO_UI64, RNEVEN, true },
+ { "extF80_to_ui64_rx_minMag", EXTF80_TO_UI64, RMINM, true },
+ { "extF80_to_ui64_rx_min", EXTF80_TO_UI64, RMIN, true },
+ { "extF80_to_ui64_rx_max", EXTF80_TO_UI64, RMAX, true },
+ { "extF80_to_ui64_rx_near_maxMag", EXTF80_TO_UI64, RNMAXM, true },
+ { "extF80_to_i32_rx_near_even", EXTF80_TO_I32, RNEVEN, true },
+ { "extF80_to_i32_rx_minMag", EXTF80_TO_I32, RMINM, true },
+ { "extF80_to_i32_rx_min", EXTF80_TO_I32, RMIN, true },
+ { "extF80_to_i32_rx_max", EXTF80_TO_I32, RMAX, true },
+ { "extF80_to_i32_rx_near_maxMag", EXTF80_TO_I32, RNMAXM, true },
+ { "extF80_to_i64_rx_near_even", EXTF80_TO_I64, RNEVEN, true },
+ { "extF80_to_i64_rx_minMag", EXTF80_TO_I64, RMINM, true },
+ { "extF80_to_i64_rx_min", EXTF80_TO_I64, RMIN, true },
+ { "extF80_to_i64_rx_max", EXTF80_TO_I64, RMAX, true },
+ { "extF80_to_i64_rx_near_maxMag", EXTF80_TO_I64, RNMAXM, true },
+#ifdef FLOAT16
+ { "extF80_to_f16", EXTF80_TO_F16, 0, 0 },
+#endif
+ { "extF80_to_f32", EXTF80_TO_F32, 0, 0 },
+#ifdef FLOAT64
+ { "extF80_to_f64", EXTF80_TO_F64, 0, 0 },
+#endif
+#ifdef FLOAT128
+ { "extF80_to_f128", EXTF80_TO_F128, 0, 0 },
+#endif
+ { "extF80_roundToInt_r_near_even", EXTF80_ROUNDTOINT, RNEVEN, false },
+ { "extF80_roundToInt_r_minMag", EXTF80_ROUNDTOINT, RMINM, false },
+ { "extF80_roundToInt_r_min", EXTF80_ROUNDTOINT, RMIN, false },
+ { "extF80_roundToInt_r_max", EXTF80_ROUNDTOINT, RMAX, false },
+ { "extF80_roundToInt_r_near_maxMag", EXTF80_ROUNDTOINT, RNMAXM, false },
+ { "extF80_roundToInt_x", EXTF80_ROUNDTOINT, 0, true },
+ { "extF80_add", EXTF80_ADD, 0, 0 },
+ { "extF80_sub", EXTF80_SUB, 0, 0 },
+ { "extF80_mul", EXTF80_MUL, 0, 0 },
+ { "extF80_div", EXTF80_DIV, 0, 0 },
+ { "extF80_rem", EXTF80_REM, 0, 0 },
+ { "extF80_sqrt", EXTF80_SQRT, 0, 0 },
+ { "extF80_eq", EXTF80_EQ, 0, 0 },
+ { "extF80_le", EXTF80_LE, 0, 0 },
+ { "extF80_lt", EXTF80_LT, 0, 0 },
+ { "extF80_eq_signaling", EXTF80_EQ_SIGNALING, 0, 0 },
+ { "extF80_le_quiet", EXTF80_LE_QUIET, 0, 0 },
+ { "extF80_lt_quiet", EXTF80_LT_QUIET, 0, 0 },
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT128
+ { "f128_to_ui32_r_near_even", F128_TO_UI32, RNEVEN, false },
+ { "f128_to_ui32_r_minMag", F128_TO_UI32, RMINM, false },
+ { "f128_to_ui32_r_min", F128_TO_UI32, RMIN, false },
+ { "f128_to_ui32_r_max", F128_TO_UI32, RMAX, false },
+ { "f128_to_ui32_r_near_maxMag", F128_TO_UI32, RNMAXM, false },
+ { "f128_to_ui64_r_near_even", F128_TO_UI64, RNEVEN, false },
+ { "f128_to_ui64_r_minMag", F128_TO_UI64, RMINM, false },
+ { "f128_to_ui64_r_min", F128_TO_UI64, RMIN, false },
+ { "f128_to_ui64_r_max", F128_TO_UI64, RMAX, false },
+ { "f128_to_ui64_r_near_maxMag", F128_TO_UI64, RNMAXM, false },
+ { "f128_to_i32_r_near_even", F128_TO_I32, RNEVEN, false },
+ { "f128_to_i32_r_minMag", F128_TO_I32, RMINM, false },
+ { "f128_to_i32_r_min", F128_TO_I32, RMIN, false },
+ { "f128_to_i32_r_max", F128_TO_I32, RMAX, false },
+ { "f128_to_i32_r_near_maxMag", F128_TO_I32, RNMAXM, false },
+ { "f128_to_i64_r_near_even", F128_TO_I64, RNEVEN, false },
+ { "f128_to_i64_r_minMag", F128_TO_I64, RMINM, false },
+ { "f128_to_i64_r_min", F128_TO_I64, RMIN, false },
+ { "f128_to_i64_r_max", F128_TO_I64, RMAX, false },
+ { "f128_to_i64_r_near_maxMag", F128_TO_I64, RNMAXM, false },
+ { "f128_to_ui32_rx_near_even", F128_TO_UI32, RNEVEN, true },
+ { "f128_to_ui32_rx_minMag", F128_TO_UI32, RMINM, true },
+ { "f128_to_ui32_rx_min", F128_TO_UI32, RMIN, true },
+ { "f128_to_ui32_rx_max", F128_TO_UI32, RMAX, true },
+ { "f128_to_ui32_rx_near_maxMag", F128_TO_UI32, RNMAXM, true },
+ { "f128_to_ui64_rx_near_even", F128_TO_UI64, RNEVEN, true },
+ { "f128_to_ui64_rx_minMag", F128_TO_UI64, RMINM, true },
+ { "f128_to_ui64_rx_min", F128_TO_UI64, RMIN, true },
+ { "f128_to_ui64_rx_max", F128_TO_UI64, RMAX, true },
+ { "f128_to_ui64_rx_near_maxMag", F128_TO_UI64, RNMAXM, true },
+ { "f128_to_i32_rx_near_even", F128_TO_I32, RNEVEN, true },
+ { "f128_to_i32_rx_minMag", F128_TO_I32, RMINM, true },
+ { "f128_to_i32_rx_min", F128_TO_I32, RMIN, true },
+ { "f128_to_i32_rx_max", F128_TO_I32, RMAX, true },
+ { "f128_to_i32_rx_near_maxMag", F128_TO_I32, RNMAXM, true },
+ { "f128_to_i64_rx_near_even", F128_TO_I64, RNEVEN, true },
+ { "f128_to_i64_rx_minMag", F128_TO_I64, RMINM, true },
+ { "f128_to_i64_rx_min", F128_TO_I64, RMIN, true },
+ { "f128_to_i64_rx_max", F128_TO_I64, RMAX, true },
+ { "f128_to_i64_rx_near_maxMag", F128_TO_I64, RNMAXM, true },
+#ifdef FLOAT16
+ { "f128_to_f16", F128_TO_F16, 0, 0 },
+#endif
+ { "f128_to_f32", F128_TO_F32, 0, 0 },
+#ifdef FLOAT64
+ { "f128_to_f64", F128_TO_F64, 0, 0 },
+#endif
+#ifdef EXTFLOAT80
+ { "f128_to_extF80", F128_TO_EXTF80, 0, 0 },
+#endif
+ { "f128_roundToInt_r_near_even", F128_ROUNDTOINT, RNEVEN, false },
+ { "f128_roundToInt_r_minMag", F128_ROUNDTOINT, RMINM, false },
+ { "f128_roundToInt_r_min", F128_ROUNDTOINT, RMIN, false },
+ { "f128_roundToInt_r_max", F128_ROUNDTOINT, RMAX, false },
+ { "f128_roundToInt_r_near_maxMag", F128_ROUNDTOINT, RNMAXM, false },
+ { "f128_roundToInt_x", F128_ROUNDTOINT, 0, true },
+ { "f128_add", F128_ADD, 0, 0 },
+ { "f128_sub", F128_SUB, 0, 0 },
+ { "f128_mul", F128_MUL, 0, 0 },
+ { "f128_mulAdd", F128_MULADD, 0, 0 },
+ { "f128_div", F128_DIV, 0, 0 },
+ { "f128_rem", F128_REM, 0, 0 },
+ { "f128_sqrt", F128_SQRT, 0, 0 },
+ { "f128_eq", F128_EQ, 0, 0 },
+ { "f128_le", F128_LE, 0, 0 },
+ { "f128_lt", F128_LT, 0, 0 },
+ { "f128_eq_signaling", F128_EQ_SIGNALING, 0, 0 },
+ { "f128_le_quiet", F128_LE_QUIET, 0, 0 },
+ { "f128_lt_quiet", F128_LT_QUIET, 0, 0 },
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ { 0, 0, 0, 0 }
+};
+
diff --git a/src/libs/softfloat-3e/testfloat/source/subj-C/subjfloat.c b/src/libs/softfloat-3e/testfloat/source/subj-C/subjfloat.c
new file mode 100644
index 00000000..f6526d16
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/subj-C/subjfloat.c
@@ -0,0 +1,856 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <fenv.h>
+#include <math.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "subjfloat_config.h"
+#include "subjfloat.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void subjfloat_setRoundingMode( uint_fast8_t roundingMode )
+{
+
+ fesetround(
+ (roundingMode == softfloat_round_near_even) ? FE_TONEAREST
+ : (roundingMode == softfloat_round_minMag) ? FE_TOWARDZERO
+ : (roundingMode == softfloat_round_min) ? FE_DOWNWARD
+ : FE_UPWARD
+ );
+
+}
+
+void subjfloat_setExtF80RoundingPrecision( uint_fast8_t roundingPrecision )
+{
+
+}
+
+uint_fast8_t subjfloat_clearExceptionFlags( void )
+{
+ int subjExceptionFlags;
+ uint_fast8_t exceptionFlags;
+
+ subjExceptionFlags =
+ fetestexcept(
+ FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT
+ );
+ feclearexcept(
+ FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT );
+ exceptionFlags = 0;
+ if ( subjExceptionFlags & FE_INVALID ) {
+ exceptionFlags |= softfloat_flag_invalid;
+ }
+ if ( subjExceptionFlags & FE_DIVBYZERO ) {
+ exceptionFlags |= softfloat_flag_infinite;
+ }
+ if ( subjExceptionFlags & FE_OVERFLOW ) {
+ exceptionFlags |= softfloat_flag_overflow;
+ }
+ if ( subjExceptionFlags & FE_UNDERFLOW ) {
+ exceptionFlags |= softfloat_flag_underflow;
+ }
+ if ( subjExceptionFlags & FE_INEXACT ) {
+ exceptionFlags |= softfloat_flag_inexact;
+ }
+ return exceptionFlags;
+
+}
+
+union f32_f { float32_t f32; float f; };
+
+float32_t subj_ui32_to_f32( uint32_t a )
+{
+ union f32_f uZ;
+
+ uZ.f = a;
+ return uZ.f32;
+
+}
+
+float32_t subj_ui64_to_f32( uint64_t a )
+{
+ union f32_f uZ;
+
+ uZ.f = a;
+ return uZ.f32;
+
+}
+
+float32_t subj_i32_to_f32( int32_t a )
+{
+ union f32_f uZ;
+
+ uZ.f = a;
+ return uZ.f32;
+
+}
+
+float32_t subj_i64_to_f32( int64_t a )
+{
+ union f32_f uZ;
+
+ uZ.f = a;
+ return uZ.f32;
+
+}
+
+uint_fast32_t subj_f32_to_ui32_rx_minMag( float32_t a )
+{
+ union f32_f uA;
+
+ uA.f32 = a;
+ return (uint32_t) uA.f;
+
+}
+
+uint_fast64_t subj_f32_to_ui64_rx_minMag( float32_t a )
+{
+ union f32_f uA;
+
+ uA.f32 = a;
+ return (uint64_t) uA.f;
+
+}
+
+int_fast32_t subj_f32_to_i32_rx_minMag( float32_t a )
+{
+ union f32_f uA;
+
+ uA.f32 = a;
+ return (int32_t) uA.f;
+
+}
+
+int_fast64_t subj_f32_to_i64_rx_minMag( float32_t a )
+{
+ union f32_f uA;
+
+ uA.f32 = a;
+ return (int64_t) uA.f;
+
+}
+
+float32_t subj_f32_add( float32_t a, float32_t b )
+{
+ union f32_f uA, uB, uZ;
+
+ uA.f32 = a;
+ uB.f32 = b;
+ uZ.f = uA.f + uB.f;
+ return uZ.f32;
+
+}
+
+float32_t subj_f32_sub( float32_t a, float32_t b )
+{
+ union f32_f uA, uB, uZ;
+
+ uA.f32 = a;
+ uB.f32 = b;
+ uZ.f = uA.f - uB.f;
+ return uZ.f32;
+
+}
+
+float32_t subj_f32_mul( float32_t a, float32_t b )
+{
+ union f32_f uA, uB, uZ;
+
+ uA.f32 = a;
+ uB.f32 = b;
+ uZ.f = uA.f * uB.f;
+ return uZ.f32;
+
+}
+
+#ifdef __STDC_VERSION__
+#if 199901L <= __STDC_VERSION__
+
+float32_t subj_f32_mulAdd( float32_t a, float32_t b, float32_t c )
+{
+ union f32_f uA, uB, uC, uZ;
+
+ uA.f32 = a;
+ uB.f32 = b;
+ uC.f32 = c;
+ uZ.f = fmaf( uA.f, uB.f, uC.f );
+ return uZ.f32;
+
+}
+
+#endif
+#endif
+
+float32_t subj_f32_div( float32_t a, float32_t b )
+{
+ union f32_f uA, uB, uZ;
+
+ uA.f32 = a;
+ uB.f32 = b;
+ uZ.f = uA.f / uB.f;
+ return uZ.f32;
+
+}
+
+#ifdef __STDC_VERSION__
+#if 199901L <= __STDC_VERSION__
+
+float32_t subj_f32_sqrt( float32_t a )
+{
+ union f32_f uA, uZ;
+
+ uA.f32 = a;
+ uZ.f = sqrtf( uA.f );
+ return uZ.f32;
+
+}
+
+#endif
+#endif
+
+bool subj_f32_eq( float32_t a, float32_t b )
+{
+ union f32_f uA, uB;
+
+ uA.f32 = a;
+ uB.f32 = b;
+ return (uA.f == uB.f);
+
+}
+
+bool subj_f32_le( float32_t a, float32_t b )
+{
+ union f32_f uA, uB;
+
+ uA.f32 = a;
+ uB.f32 = b;
+ return (uA.f <= uB.f);
+
+}
+
+bool subj_f32_lt( float32_t a, float32_t b )
+{
+ union f32_f uA, uB;
+
+ uA.f32 = a;
+ uB.f32 = b;
+ return (uA.f < uB.f);
+
+}
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+#ifdef FLOAT64
+
+union f64_d { float64_t f64; double d; };
+
+float64_t subj_ui32_to_f64( uint32_t a )
+{
+ union f64_d uZ;
+
+ uZ.d = a;
+ return uZ.f64;
+
+}
+
+float64_t subj_ui64_to_f64( uint64_t a )
+{
+ union f64_d uZ;
+
+ uZ.d = a;
+ return uZ.f64;
+
+}
+
+float64_t subj_i32_to_f64( int32_t a )
+{
+ union f64_d uZ;
+
+ uZ.d = a;
+ return uZ.f64;
+
+}
+
+float64_t subj_i64_to_f64( int64_t a )
+{
+ union f64_d uZ;
+
+ uZ.d = a;
+ return uZ.f64;
+
+}
+
+float64_t subj_f32_to_f64( float32_t a )
+{
+ union f32_f uA;
+ union f64_d uZ;
+
+ uA.f32 = a;
+ uZ.d = uA.f;
+ return uZ.f64;
+
+}
+
+uint_fast32_t subj_f64_to_ui32_rx_minMag( float64_t a )
+{
+ union f64_d uA;
+
+ uA.f64 = a;
+ return (uint32_t) uA.d;
+
+}
+
+uint_fast64_t subj_f64_to_ui64_rx_minMag( float64_t a )
+{
+ union f64_d uA;
+
+ uA.f64 = a;
+ return (uint64_t) uA.d;
+
+}
+
+int_fast32_t subj_f64_to_i32_rx_minMag( float64_t a )
+{
+ union f64_d uA;
+
+ uA.f64 = a;
+ return (int32_t) uA.d;
+
+}
+
+int_fast64_t subj_f64_to_i64_rx_minMag( float64_t a )
+{
+ union f64_d uA;
+
+ uA.f64 = a;
+ return (int64_t) uA.d;
+
+}
+
+float32_t subj_f64_to_f32( float64_t a )
+{
+ union f64_d uA;
+ union f32_f uZ;
+
+ uA.f64 = a;
+ uZ.f = uA.d;
+ return uZ.f32;
+
+}
+
+float64_t subj_f64_add( float64_t a, float64_t b )
+{
+ union f64_d uA, uB, uZ;
+
+ uA.f64 = a;
+ uB.f64 = b;
+ uZ.d = uA.d + uB.d;
+ return uZ.f64;
+
+}
+
+float64_t subj_f64_sub( float64_t a, float64_t b )
+{
+ union f64_d uA, uB, uZ;
+
+ uA.f64 = a;
+ uB.f64 = b;
+ uZ.d = uA.d - uB.d;
+ return uZ.f64;
+
+}
+
+float64_t subj_f64_mul( float64_t a, float64_t b )
+{
+ union f64_d uA, uB, uZ;
+
+ uA.f64 = a;
+ uB.f64 = b;
+ uZ.d = uA.d * uB.d;
+ return uZ.f64;
+
+}
+
+#ifdef __STDC_VERSION__
+#if 199901L <= __STDC_VERSION__
+
+float64_t subj_f64_mulAdd( float64_t a, float64_t b, float64_t c )
+{
+ union f64_d uA, uB, uC, uZ;
+
+ uA.f64 = a;
+ uB.f64 = b;
+ uC.f64 = c;
+ uZ.d = fma( uA.d, uB.d, uC.d );
+ return uZ.f64;
+
+}
+
+#endif
+#endif
+
+float64_t subj_f64_div( float64_t a, float64_t b )
+{
+ union f64_d uA, uB, uZ;
+
+ uA.f64 = a;
+ uB.f64 = b;
+ uZ.d = uA.d / uB.d;
+ return uZ.f64;
+
+}
+
+float64_t subj_f64_sqrt( float64_t a )
+{
+ union f64_d uA, uZ;
+
+ uA.f64 = a;
+ uZ.d = sqrt( uA.d );
+ return uZ.f64;
+
+}
+
+bool subj_f64_eq( float64_t a, float64_t b )
+{
+ union f64_d uA, uB;
+
+ uA.f64 = a;
+ uB.f64 = b;
+ return (uA.d == uB.d);
+
+}
+
+bool subj_f64_le( float64_t a, float64_t b )
+{
+ union f64_d uA, uB;
+
+ uA.f64 = a;
+ uB.f64 = b;
+ return (uA.d <= uB.d);
+
+}
+
+bool subj_f64_lt( float64_t a, float64_t b )
+{
+ union f64_d uA, uB;
+
+ uA.f64 = a;
+ uB.f64 = b;
+ return (uA.d < uB.d);
+
+}
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+#if defined EXTFLOAT80 && defined LONG_DOUBLE_IS_EXTFLOAT80
+
+void subj_ui32_to_extF80M( uint32_t a, extFloat80_t *zPtr )
+{
+
+ *((long double *) zPtr) = a;
+
+}
+
+void subj_ui64_to_extF80M( uint64_t a, extFloat80_t *zPtr )
+{
+
+ *((long double *) zPtr) = a;
+
+}
+
+void subj_i32_to_extF80M( int32_t a, extFloat80_t *zPtr )
+{
+
+ *((long double *) zPtr) = a;
+
+}
+
+void subj_i64_to_extF80M( int64_t a, extFloat80_t *zPtr )
+{
+
+ *((long double *) zPtr) = a;
+
+}
+
+void subj_f32_to_extF80M( float32_t a, extFloat80_t *zPtr )
+{
+ union f32_f uA;
+
+ uA.f32 = a;
+ *((long double *) zPtr) = uA.f;
+
+}
+
+#ifdef FLOAT64
+
+void subj_f64_to_extF80M( float64_t a, extFloat80_t *zPtr )
+{
+ union f64_d uA;
+
+ uA.f64 = a;
+ *((long double *) zPtr) = uA.d;
+
+}
+
+#endif
+
+uint_fast32_t subj_extF80M_to_ui32_rx_minMag( const extFloat80_t *aPtr )
+{
+
+ return *((const long double *) aPtr);
+
+}
+
+uint_fast64_t subj_extF80M_to_ui64_rx_minMag( const extFloat80_t *aPtr )
+{
+
+ return *((const long double *) aPtr);
+
+}
+
+int_fast32_t subj_extF80M_to_i32_rx_minMag( const extFloat80_t *aPtr )
+{
+
+ return *((const long double *) aPtr);
+
+}
+
+int_fast64_t subj_extF80M_to_i64_rx_minMag( const extFloat80_t *aPtr )
+{
+
+ return *((const long double *) aPtr);
+
+}
+
+float32_t subj_extF80M_to_f32( const extFloat80_t *aPtr )
+{
+ union f32_f uZ;
+
+ uZ.f = *((const long double *) aPtr);
+ return uZ.f32;
+
+}
+
+#ifdef FLOAT64
+
+float64_t subj_extF80M_to_f64( const extFloat80_t *aPtr )
+{
+ union f64_d uZ;
+
+ uZ.d = *((const long double *) aPtr);
+ return uZ.f64;
+
+}
+
+#endif
+
+void
+ subj_extF80M_add(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr )
+{
+
+ *((long double *) zPtr) =
+ *((const long double *) aPtr) + *((const long double *) bPtr);
+
+}
+
+void
+ subj_extF80M_sub(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr )
+{
+
+ *((long double *) zPtr) =
+ *((const long double *) aPtr) - *((const long double *) bPtr);
+
+}
+
+void
+ subj_extF80M_mul(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr )
+{
+
+ *((long double *) zPtr) =
+ *((const long double *) aPtr) * *((const long double *) bPtr);
+
+}
+
+void
+ subj_extF80M_div(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr )
+{
+
+ *((long double *) zPtr) =
+ *((const long double *) aPtr) / *((const long double *) bPtr);
+
+}
+
+bool subj_extF80M_eq( const extFloat80_t *aPtr, const extFloat80_t *bPtr )
+{
+
+ return (*((const long double *) aPtr) == *((const long double *) bPtr));
+
+}
+
+bool subj_extF80M_le( const extFloat80_t *aPtr, const extFloat80_t *bPtr )
+{
+
+ return (*((const long double *) aPtr) <= *((const long double *) bPtr));
+
+}
+
+bool subj_extF80M_lt( const extFloat80_t *aPtr, const extFloat80_t *bPtr )
+{
+
+ return (*((const long double *) aPtr) < *((const long double *) bPtr));
+
+}
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+#if defined FLOAT128 && defined LONG_DOUBLE_IS_FLOAT128
+
+void subj_ui32_to_f128M( uint32_t a, float128_t *zPtr )
+{
+
+ *((long double *) zPtr) = a;
+
+}
+
+void subj_ui64_to_f128M( uint64_t a, float128_t *zPtr )
+{
+
+ *((long double *) zPtr) = a;
+
+}
+
+void subj_i32_to_f128M( int32_t a, float128_t *zPtr )
+{
+
+ *((long double *) zPtr) = a;
+
+}
+
+void subj_i64_to_f128M( int64_t a, float128_t *zPtr )
+{
+
+ *((long double *) zPtr) = a;
+
+}
+
+void subj_f32_to_f128M( float32_t a, float128_t *zPtr )
+{
+ union f32_f uA;
+
+ uA.f32 = a;
+ *((long double *) zPtr) = uA.f;
+
+}
+
+#ifdef FLOAT64
+
+void subj_f64_to_f128M( float64_t a, float128_t *zPtr )
+{
+ union f64_d uA;
+
+ uA.f64 = a;
+ *((long double *) zPtr) = uA.d;
+
+}
+
+#endif
+
+uint_fast32_t subj_f128M_to_ui32_rx_minMag( const float128_t *aPtr )
+{
+
+ return *((const long double *) aPtr);
+
+}
+
+uint_fast64_t subj_f128M_to_ui64_rx_minMag( const float128_t *aPtr )
+{
+
+ return *((const long double *) aPtr);
+
+}
+
+int_fast32_t subj_f128M_to_i32_rx_minMag( const float128_t *aPtr )
+{
+
+ return *((const long double *) aPtr);
+
+}
+
+int_fast64_t subj_f128M_to_i64_rx_minMag( const float128_t *aPtr )
+{
+
+ return *((const long double *) aPtr);
+
+}
+
+float32_t subj_f128M_to_f32( const float128_t *aPtr )
+{
+ union f32_f uZ;
+
+ uZ.f = *((const long double *) aPtr);
+ return uZ.f32;
+
+}
+
+#ifdef FLOAT64
+
+float64_t subj_f128M_to_f64( const float128_t *aPtr )
+{
+ union f64_d uZ;
+
+ uZ.d = *((const long double *) aPtr);
+ return uZ.f64;
+
+}
+
+#endif
+
+void
+ subj_f128M_add(
+ const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr )
+{
+
+ *((long double *) zPtr) =
+ *((const long double *) aPtr) + *((const long double *) bPtr);
+
+}
+
+void
+ subj_f128M_sub(
+ const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr )
+{
+
+ *((long double *) zPtr) =
+ *((const long double *) aPtr) - *((const long double *) bPtr);
+
+}
+
+void
+ subj_f128M_mul(
+ const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr )
+{
+
+ *((long double *) zPtr) =
+ *((const long double *) aPtr) * *((const long double *) bPtr);
+
+}
+
+#ifdef __STDC_VERSION__
+#if 199901L <= __STDC_VERSION__
+
+void
+ subj_f128M_mulAdd(
+ const float128_t *aPtr,
+ const float128_t *bPtr,
+ const float128_t *cPtr,
+ float128_t *zPtr
+ )
+{
+
+ *((long double *) zPtr) =
+ fmal(
+ *((const long double *) aPtr),
+ *((const long double *) bPtr),
+ *((const long double *) cPtr)
+ );
+
+}
+
+#endif
+#endif
+
+void
+ subj_f128M_div(
+ const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr )
+{
+
+ *((long double *) zPtr) =
+ *((const long double *) aPtr) / *((const long double *) bPtr);
+
+}
+
+#ifdef __STDC_VERSION__
+#if 199901L <= __STDC_VERSION__
+
+void subj_f128M_sqrt( const float128_t *aPtr, float128_t *zPtr )
+{
+
+ *((long double *) zPtr) = sqrtl( *((const long double *) aPtr) );
+
+}
+
+#endif
+#endif
+
+bool subj_f128M_eq( const float128_t *aPtr, const float128_t *bPtr )
+{
+
+ return (*((const long double *) aPtr) == *((const long double *) bPtr));
+
+}
+
+bool subj_f128M_le( const float128_t *aPtr, const float128_t *bPtr )
+{
+
+ return (*((const long double *) aPtr) <= *((const long double *) bPtr));
+
+}
+
+bool subj_f128M_lt( const float128_t *aPtr, const float128_t *bPtr )
+{
+
+ return (*((const long double *) aPtr) < *((const long double *) bPtr));
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/subj-C/subjfloat_config.h b/src/libs/softfloat-3e/testfloat/source/subj-C/subjfloat_config.h
new file mode 100644
index 00000000..3c2ed79d
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/subj-C/subjfloat_config.h
@@ -0,0 +1,133 @@
+
+/*----------------------------------------------------------------------------
+| The following macros are defined to indicate all the subject functions that
+| exist.
+*----------------------------------------------------------------------------*/
+
+#define SUBJ_UI32_TO_F32
+#define SUBJ_UI64_TO_F32
+#define SUBJ_I32_TO_F32
+#define SUBJ_I64_TO_F32
+
+#define SUBJ_F32_TO_UI32_RX_MINMAG
+#define SUBJ_F32_TO_UI64_RX_MINMAG
+#define SUBJ_F32_TO_I32_RX_MINMAG
+#define SUBJ_F32_TO_I64_RX_MINMAG
+#define SUBJ_F32_ADD
+#define SUBJ_F32_SUB
+#define SUBJ_F32_MUL
+#ifdef __STDC_VERSION__
+#if 199901L <= __STDC_VERSION__
+#define SUBJ_F32_MULADD
+#endif
+#endif
+#define SUBJ_F32_DIV
+#ifdef __STDC_VERSION__
+#if 199901L <= __STDC_VERSION__
+#define SUBJ_F32_SQRT
+#endif
+#endif
+#define SUBJ_F32_EQ
+#define SUBJ_F32_LE
+#define SUBJ_F32_LT
+
+#ifdef FLOAT64
+
+#define SUBJ_UI32_TO_F64
+#define SUBJ_UI64_TO_F64
+#define SUBJ_I32_TO_F64
+#define SUBJ_I64_TO_F64
+
+#define SUBJ_F32_TO_F64
+
+#define SUBJ_F64_TO_UI32_RX_MINMAG
+#define SUBJ_F64_TO_UI64_RX_MINMAG
+#define SUBJ_F64_TO_I32_RX_MINMAG
+#define SUBJ_F64_TO_I64_RX_MINMAG
+#define SUBJ_F64_TO_F32
+#define SUBJ_F64_ADD
+#define SUBJ_F64_SUB
+#define SUBJ_F64_MUL
+#ifdef __STDC_VERSION__
+#if 199901L <= __STDC_VERSION__
+#define SUBJ_F64_MULADD
+#endif
+#endif
+#define SUBJ_F64_DIV
+#define SUBJ_F64_SQRT
+#define SUBJ_F64_EQ
+#define SUBJ_F64_LE
+#define SUBJ_F64_LT
+
+#endif
+
+#if defined EXTFLOAT80 && defined LONG_DOUBLE_IS_EXTFLOAT80
+
+#define SUBJ_UI32_TO_EXTF80
+#define SUBJ_UI64_TO_EXTF80
+#define SUBJ_I32_TO_EXTF80
+#define SUBJ_I64_TO_EXTF80
+
+#define SUBJ_F32_TO_EXTF80
+#ifdef FLOAT64
+#define SUBJ_F64_TO_EXTF80
+#endif
+
+#define SUBJ_EXTF80_TO_UI32_RX_MINMAG
+#define SUBJ_EXTF80_TO_UI64_RX_MINMAG
+#define SUBJ_EXTF80_TO_I32_RX_MINMAG
+#define SUBJ_EXTF80_TO_I64_RX_MINMAG
+#define SUBJ_EXTF80_TO_F32
+#ifdef FLOAT64
+#define SUBJ_EXTF80_TO_F64
+#endif
+#define SUBJ_EXTF80_ADD
+#define SUBJ_EXTF80_SUB
+#define SUBJ_EXTF80_MUL
+#define SUBJ_EXTF80_DIV
+#define SUBJ_EXTF80_EQ
+#define SUBJ_EXTF80_LE
+#define SUBJ_EXTF80_LT
+
+#endif
+
+#if defined FLOAT128 && defined LONG_DOUBLE_IS_FLOAT128
+
+#define SUBJ_UI32_TO_F128
+#define SUBJ_UI64_TO_F128
+#define SUBJ_I32_TO_F128
+#define SUBJ_I64_TO_F128
+
+#define SUBJ_F32_TO_F128
+#ifdef FLOAT64
+#define SUBJ_F64_TO_F128
+#endif
+
+#define SUBJ_F128_TO_UI32_RX_MINMAG
+#define SUBJ_F128_TO_UI64_RX_MINMAG
+#define SUBJ_F128_TO_I32_RX_MINMAG
+#define SUBJ_F128_TO_I64_RX_MINMAG
+#define SUBJ_F128_TO_F32
+#ifdef FLOAT64
+#define SUBJ_F128_TO_F64
+#endif
+#define SUBJ_F128_ADD
+#define SUBJ_F128_SUB
+#define SUBJ_F128_MUL
+#ifdef __STDC_VERSION__
+#if 199901L <= __STDC_VERSION__
+#define SUBJ_F128_MULADD
+#endif
+#endif
+#define SUBJ_F128_DIV
+#ifdef __STDC_VERSION__
+#if 199901L <= __STDC_VERSION__
+#define SUBJ_F128_SQRT
+#endif
+#endif
+#define SUBJ_F128_EQ
+#define SUBJ_F128_LE
+#define SUBJ_F128_LT
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/subjfloat.h b/src/libs/softfloat-3e/testfloat/source/subjfloat.h
new file mode 100644
index 00000000..aaf9776b
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/subjfloat.h
@@ -0,0 +1,516 @@
+
+/*============================================================================
+
+This C header file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "softfloat.h"
+
+extern void (*const subjfloat_functions[])();
+
+void subjfloat_setRoundingMode( uint_fast8_t );
+void subjfloat_setExtF80RoundingPrecision( uint_fast8_t );
+uint_fast8_t subjfloat_clearExceptionFlags( void );
+
+/*----------------------------------------------------------------------------
+| Subject function declarations. (Many of these functions may not exist.)
+| WARNING:
+| This file should not normally be modified. Use "subjfloat_config.h" to
+| specify which of these functions actually exist.
+*----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef FLOAT16
+float16_t subj_ui32_to_f16( uint32_t );
+#endif
+float32_t subj_ui32_to_f32( uint32_t );
+#ifdef FLOAT64
+float64_t subj_ui32_to_f64( uint32_t );
+#endif
+#ifdef EXTFLOAT80
+void subj_ui32_to_extF80M( uint32_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void subj_ui32_to_f128M( uint32_t, float128_t * );
+#endif
+#ifdef FLOAT16
+float16_t subj_ui64_to_f16( uint64_t );
+#endif
+float32_t subj_ui64_to_f32( uint64_t );
+#ifdef FLOAT64
+float64_t subj_ui64_to_f64( uint64_t );
+#endif
+#ifdef EXTFLOAT80
+void subj_ui64_to_extF80M( uint64_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void subj_ui64_to_f128M( uint64_t, float128_t * );
+#endif
+#ifdef FLOAT16
+float16_t subj_i32_to_f16( int32_t );
+#endif
+float32_t subj_i32_to_f32( int32_t );
+#ifdef FLOAT64
+float64_t subj_i32_to_f64( int32_t );
+#endif
+#ifdef EXTFLOAT80
+void subj_i32_to_extF80M( int32_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void subj_i32_to_f128M( int32_t, float128_t * );
+#endif
+#ifdef FLOAT16
+float16_t subj_i64_to_f16( int64_t );
+#endif
+float32_t subj_i64_to_f32( int64_t );
+#ifdef FLOAT64
+float64_t subj_i64_to_f64( int64_t );
+#endif
+#ifdef EXTFLOAT80
+void subj_i64_to_extF80M( int64_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void subj_i64_to_f128M( int64_t, float128_t * );
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef FLOAT16
+
+uint_fast32_t subj_f16_to_ui32_r_near_even( float16_t );
+uint_fast32_t subj_f16_to_ui32_r_minMag( float16_t );
+uint_fast32_t subj_f16_to_ui32_r_min( float16_t );
+uint_fast32_t subj_f16_to_ui32_r_max( float16_t );
+uint_fast32_t subj_f16_to_ui32_r_near_maxMag( float16_t );
+uint_fast64_t subj_f16_to_ui64_r_near_even( float16_t );
+uint_fast64_t subj_f16_to_ui64_r_minMag( float16_t );
+uint_fast64_t subj_f16_to_ui64_r_min( float16_t );
+uint_fast64_t subj_f16_to_ui64_r_max( float16_t );
+uint_fast64_t subj_f16_to_ui64_r_near_maxMag( float16_t );
+int_fast32_t subj_f16_to_i32_r_near_even( float16_t );
+int_fast32_t subj_f16_to_i32_r_minMag( float16_t );
+int_fast32_t subj_f16_to_i32_r_min( float16_t );
+int_fast32_t subj_f16_to_i32_r_max( float16_t );
+int_fast32_t subj_f16_to_i32_r_near_maxMag( float16_t );
+int_fast64_t subj_f16_to_i64_r_near_even( float16_t );
+int_fast64_t subj_f16_to_i64_r_minMag( float16_t );
+int_fast64_t subj_f16_to_i64_r_min( float16_t );
+int_fast64_t subj_f16_to_i64_r_max( float16_t );
+int_fast64_t subj_f16_to_i64_r_near_maxMag( float16_t );
+
+uint_fast32_t subj_f16_to_ui32_rx_near_even( float16_t );
+uint_fast32_t subj_f16_to_ui32_rx_minMag( float16_t );
+uint_fast32_t subj_f16_to_ui32_rx_min( float16_t );
+uint_fast32_t subj_f16_to_ui32_rx_max( float16_t );
+uint_fast32_t subj_f16_to_ui32_rx_near_maxMag( float16_t );
+uint_fast64_t subj_f16_to_ui64_rx_near_even( float16_t );
+uint_fast64_t subj_f16_to_ui64_rx_minMag( float16_t );
+uint_fast64_t subj_f16_to_ui64_rx_min( float16_t );
+uint_fast64_t subj_f16_to_ui64_rx_max( float16_t );
+uint_fast64_t subj_f16_to_ui64_rx_near_maxMag( float16_t );
+int_fast32_t subj_f16_to_i32_rx_near_even( float16_t );
+int_fast32_t subj_f16_to_i32_rx_minMag( float16_t );
+int_fast32_t subj_f16_to_i32_rx_min( float16_t );
+int_fast32_t subj_f16_to_i32_rx_max( float16_t );
+int_fast32_t subj_f16_to_i32_rx_near_maxMag( float16_t );
+int_fast64_t subj_f16_to_i64_rx_near_even( float16_t );
+int_fast64_t subj_f16_to_i64_rx_minMag( float16_t );
+int_fast64_t subj_f16_to_i64_rx_min( float16_t );
+int_fast64_t subj_f16_to_i64_rx_max( float16_t );
+int_fast64_t subj_f16_to_i64_rx_near_maxMag( float16_t );
+
+float32_t subj_f16_to_f32( float16_t );
+#ifdef FLOAT64
+float64_t subj_f16_to_f64( float16_t );
+#endif
+#ifdef EXTFLOAT80
+void subj_f16_to_extF80M( float16_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void subj_f16_to_f128M( float16_t, float128_t * );
+#endif
+
+float16_t subj_f16_roundToInt_r_near_even( float16_t );
+float16_t subj_f16_roundToInt_r_minMag( float16_t );
+float16_t subj_f16_roundToInt_r_min( float16_t );
+float16_t subj_f16_roundToInt_r_max( float16_t );
+float16_t subj_f16_roundToInt_r_near_maxMag( float16_t );
+float16_t subj_f16_roundToInt_x( float16_t );
+float16_t subj_f16_add( float16_t, float16_t );
+float16_t subj_f16_sub( float16_t, float16_t );
+float16_t subj_f16_mul( float16_t, float16_t );
+float16_t subj_f16_mulAdd( float16_t, float16_t, float16_t );
+float16_t subj_f16_div( float16_t, float16_t );
+float16_t subj_f16_rem( float16_t, float16_t );
+float16_t subj_f16_sqrt( float16_t );
+bool subj_f16_eq( float16_t, float16_t );
+bool subj_f16_le( float16_t, float16_t );
+bool subj_f16_lt( float16_t, float16_t );
+bool subj_f16_eq_signaling( float16_t, float16_t );
+bool subj_f16_le_quiet( float16_t, float16_t );
+bool subj_f16_lt_quiet( float16_t, float16_t );
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+uint_fast32_t subj_f32_to_ui32_r_near_even( float32_t );
+uint_fast32_t subj_f32_to_ui32_r_minMag( float32_t );
+uint_fast32_t subj_f32_to_ui32_r_min( float32_t );
+uint_fast32_t subj_f32_to_ui32_r_max( float32_t );
+uint_fast32_t subj_f32_to_ui32_r_near_maxMag( float32_t );
+uint_fast64_t subj_f32_to_ui64_r_near_even( float32_t );
+uint_fast64_t subj_f32_to_ui64_r_minMag( float32_t );
+uint_fast64_t subj_f32_to_ui64_r_min( float32_t );
+uint_fast64_t subj_f32_to_ui64_r_max( float32_t );
+uint_fast64_t subj_f32_to_ui64_r_near_maxMag( float32_t );
+int_fast32_t subj_f32_to_i32_r_near_even( float32_t );
+int_fast32_t subj_f32_to_i32_r_minMag( float32_t );
+int_fast32_t subj_f32_to_i32_r_min( float32_t );
+int_fast32_t subj_f32_to_i32_r_max( float32_t );
+int_fast32_t subj_f32_to_i32_r_near_maxMag( float32_t );
+int_fast64_t subj_f32_to_i64_r_near_even( float32_t );
+int_fast64_t subj_f32_to_i64_r_minMag( float32_t );
+int_fast64_t subj_f32_to_i64_r_min( float32_t );
+int_fast64_t subj_f32_to_i64_r_max( float32_t );
+int_fast64_t subj_f32_to_i64_r_near_maxMag( float32_t );
+
+uint_fast32_t subj_f32_to_ui32_rx_near_even( float32_t );
+uint_fast32_t subj_f32_to_ui32_rx_minMag( float32_t );
+uint_fast32_t subj_f32_to_ui32_rx_min( float32_t );
+uint_fast32_t subj_f32_to_ui32_rx_max( float32_t );
+uint_fast32_t subj_f32_to_ui32_rx_near_maxMag( float32_t );
+uint_fast64_t subj_f32_to_ui64_rx_near_even( float32_t );
+uint_fast64_t subj_f32_to_ui64_rx_minMag( float32_t );
+uint_fast64_t subj_f32_to_ui64_rx_min( float32_t );
+uint_fast64_t subj_f32_to_ui64_rx_max( float32_t );
+uint_fast64_t subj_f32_to_ui64_rx_near_maxMag( float32_t );
+int_fast32_t subj_f32_to_i32_rx_near_even( float32_t );
+int_fast32_t subj_f32_to_i32_rx_minMag( float32_t );
+int_fast32_t subj_f32_to_i32_rx_min( float32_t );
+int_fast32_t subj_f32_to_i32_rx_max( float32_t );
+int_fast32_t subj_f32_to_i32_rx_near_maxMag( float32_t );
+int_fast64_t subj_f32_to_i64_rx_near_even( float32_t );
+int_fast64_t subj_f32_to_i64_rx_minMag( float32_t );
+int_fast64_t subj_f32_to_i64_rx_min( float32_t );
+int_fast64_t subj_f32_to_i64_rx_max( float32_t );
+int_fast64_t subj_f32_to_i64_rx_near_maxMag( float32_t );
+
+#ifdef FLOAT16
+float16_t subj_f32_to_f16( float32_t );
+#endif
+#ifdef FLOAT64
+float64_t subj_f32_to_f64( float32_t );
+#endif
+#ifdef EXTFLOAT80
+void subj_f32_to_extF80M( float32_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void subj_f32_to_f128M( float32_t, float128_t * );
+#endif
+
+float32_t subj_f32_roundToInt_r_near_even( float32_t );
+float32_t subj_f32_roundToInt_r_minMag( float32_t );
+float32_t subj_f32_roundToInt_r_min( float32_t );
+float32_t subj_f32_roundToInt_r_max( float32_t );
+float32_t subj_f32_roundToInt_r_near_maxMag( float32_t );
+float32_t subj_f32_roundToInt_x( float32_t );
+float32_t subj_f32_add( float32_t, float32_t );
+float32_t subj_f32_sub( float32_t, float32_t );
+float32_t subj_f32_mul( float32_t, float32_t );
+float32_t subj_f32_mulAdd( float32_t, float32_t, float32_t );
+float32_t subj_f32_div( float32_t, float32_t );
+float32_t subj_f32_rem( float32_t, float32_t );
+float32_t subj_f32_sqrt( float32_t );
+bool subj_f32_eq( float32_t, float32_t );
+bool subj_f32_le( float32_t, float32_t );
+bool subj_f32_lt( float32_t, float32_t );
+bool subj_f32_eq_signaling( float32_t, float32_t );
+bool subj_f32_le_quiet( float32_t, float32_t );
+bool subj_f32_lt_quiet( float32_t, float32_t );
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef FLOAT64
+
+uint_fast32_t subj_f64_to_ui32_r_near_even( float64_t );
+uint_fast32_t subj_f64_to_ui32_r_minMag( float64_t );
+uint_fast32_t subj_f64_to_ui32_r_min( float64_t );
+uint_fast32_t subj_f64_to_ui32_r_max( float64_t );
+uint_fast32_t subj_f64_to_ui32_r_near_maxMag( float64_t );
+uint_fast64_t subj_f64_to_ui64_r_near_even( float64_t );
+uint_fast64_t subj_f64_to_ui64_r_minMag( float64_t );
+uint_fast64_t subj_f64_to_ui64_r_min( float64_t );
+uint_fast64_t subj_f64_to_ui64_r_max( float64_t );
+uint_fast64_t subj_f64_to_ui64_r_near_maxMag( float64_t );
+int_fast32_t subj_f64_to_i32_r_near_even( float64_t );
+int_fast32_t subj_f64_to_i32_r_minMag( float64_t );
+int_fast32_t subj_f64_to_i32_r_min( float64_t );
+int_fast32_t subj_f64_to_i32_r_max( float64_t );
+int_fast32_t subj_f64_to_i32_r_near_maxMag( float64_t );
+int_fast64_t subj_f64_to_i64_r_near_even( float64_t );
+int_fast64_t subj_f64_to_i64_r_minMag( float64_t );
+int_fast64_t subj_f64_to_i64_r_min( float64_t );
+int_fast64_t subj_f64_to_i64_r_max( float64_t );
+int_fast64_t subj_f64_to_i64_r_near_maxMag( float64_t );
+
+uint_fast32_t subj_f64_to_ui32_rx_near_even( float64_t );
+uint_fast32_t subj_f64_to_ui32_rx_minMag( float64_t );
+uint_fast32_t subj_f64_to_ui32_rx_min( float64_t );
+uint_fast32_t subj_f64_to_ui32_rx_max( float64_t );
+uint_fast32_t subj_f64_to_ui32_rx_near_maxMag( float64_t );
+uint_fast64_t subj_f64_to_ui64_rx_near_even( float64_t );
+uint_fast64_t subj_f64_to_ui64_rx_minMag( float64_t );
+uint_fast64_t subj_f64_to_ui64_rx_min( float64_t );
+uint_fast64_t subj_f64_to_ui64_rx_max( float64_t );
+uint_fast64_t subj_f64_to_ui64_rx_near_maxMag( float64_t );
+int_fast32_t subj_f64_to_i32_rx_near_even( float64_t );
+int_fast32_t subj_f64_to_i32_rx_minMag( float64_t );
+int_fast32_t subj_f64_to_i32_rx_min( float64_t );
+int_fast32_t subj_f64_to_i32_rx_max( float64_t );
+int_fast32_t subj_f64_to_i32_rx_near_maxMag( float64_t );
+int_fast64_t subj_f64_to_i64_rx_near_even( float64_t );
+int_fast64_t subj_f64_to_i64_rx_minMag( float64_t );
+int_fast64_t subj_f64_to_i64_rx_min( float64_t );
+int_fast64_t subj_f64_to_i64_rx_max( float64_t );
+int_fast64_t subj_f64_to_i64_rx_near_maxMag( float64_t );
+
+#ifdef FLOAT16
+float16_t subj_f64_to_f16( float64_t );
+#endif
+float32_t subj_f64_to_f32( float64_t );
+#ifdef EXTFLOAT80
+void subj_f64_to_extF80M( float64_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void subj_f64_to_f128M( float64_t, float128_t * );
+#endif
+
+float64_t subj_f64_roundToInt_r_near_even( float64_t );
+float64_t subj_f64_roundToInt_r_minMag( float64_t );
+float64_t subj_f64_roundToInt_r_min( float64_t );
+float64_t subj_f64_roundToInt_r_max( float64_t );
+float64_t subj_f64_roundToInt_r_near_maxMag( float64_t );
+float64_t subj_f64_roundToInt_x( float64_t );
+float64_t subj_f64_add( float64_t, float64_t );
+float64_t subj_f64_sub( float64_t, float64_t );
+float64_t subj_f64_mul( float64_t, float64_t );
+float64_t subj_f64_mulAdd( float64_t, float64_t, float64_t );
+float64_t subj_f64_div( float64_t, float64_t );
+float64_t subj_f64_rem( float64_t, float64_t );
+float64_t subj_f64_sqrt( float64_t );
+bool subj_f64_eq( float64_t, float64_t );
+bool subj_f64_le( float64_t, float64_t );
+bool subj_f64_lt( float64_t, float64_t );
+bool subj_f64_eq_signaling( float64_t, float64_t );
+bool subj_f64_le_quiet( float64_t, float64_t );
+bool subj_f64_lt_quiet( float64_t, float64_t );
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef EXTFLOAT80
+
+uint_fast32_t subj_extF80M_to_ui32_r_near_even( const extFloat80_t * );
+uint_fast32_t subj_extF80M_to_ui32_r_minMag( const extFloat80_t * );
+uint_fast32_t subj_extF80M_to_ui32_r_min( const extFloat80_t * );
+uint_fast32_t subj_extF80M_to_ui32_r_max( const extFloat80_t * );
+uint_fast32_t subj_extF80M_to_ui32_r_near_maxMag( const extFloat80_t * );
+uint_fast64_t subj_extF80M_to_ui64_r_near_even( const extFloat80_t * );
+uint_fast64_t subj_extF80M_to_ui64_r_minMag( const extFloat80_t * );
+uint_fast64_t subj_extF80M_to_ui64_r_min( const extFloat80_t * );
+uint_fast64_t subj_extF80M_to_ui64_r_max( const extFloat80_t * );
+uint_fast64_t subj_extF80M_to_ui64_r_near_maxMag( const extFloat80_t * );
+int_fast32_t subj_extF80M_to_i32_r_near_even( const extFloat80_t * );
+int_fast32_t subj_extF80M_to_i32_r_minMag( const extFloat80_t * );
+int_fast32_t subj_extF80M_to_i32_r_min( const extFloat80_t * );
+int_fast32_t subj_extF80M_to_i32_r_max( const extFloat80_t * );
+int_fast32_t subj_extF80M_to_i32_r_near_maxMag( const extFloat80_t * );
+int_fast64_t subj_extF80M_to_i64_r_near_even( const extFloat80_t * );
+int_fast64_t subj_extF80M_to_i64_r_minMag( const extFloat80_t * );
+int_fast64_t subj_extF80M_to_i64_r_min( const extFloat80_t * );
+int_fast64_t subj_extF80M_to_i64_r_max( const extFloat80_t * );
+int_fast64_t subj_extF80M_to_i64_r_near_maxMag( const extFloat80_t * );
+
+uint_fast32_t subj_extF80M_to_ui32_rx_near_even( const extFloat80_t * );
+uint_fast32_t subj_extF80M_to_ui32_rx_minMag( const extFloat80_t * );
+uint_fast32_t subj_extF80M_to_ui32_rx_min( const extFloat80_t * );
+uint_fast32_t subj_extF80M_to_ui32_rx_max( const extFloat80_t * );
+uint_fast32_t subj_extF80M_to_ui32_rx_near_maxMag( const extFloat80_t * );
+uint_fast64_t subj_extF80M_to_ui64_rx_near_even( const extFloat80_t * );
+uint_fast64_t subj_extF80M_to_ui64_rx_minMag( const extFloat80_t * );
+uint_fast64_t subj_extF80M_to_ui64_rx_min( const extFloat80_t * );
+uint_fast64_t subj_extF80M_to_ui64_rx_max( const extFloat80_t * );
+uint_fast64_t subj_extF80M_to_ui64_rx_near_maxMag( const extFloat80_t * );
+int_fast32_t subj_extF80M_to_i32_rx_near_even( const extFloat80_t * );
+int_fast32_t subj_extF80M_to_i32_rx_minMag( const extFloat80_t * );
+int_fast32_t subj_extF80M_to_i32_rx_min( const extFloat80_t * );
+int_fast32_t subj_extF80M_to_i32_rx_max( const extFloat80_t * );
+int_fast32_t subj_extF80M_to_i32_rx_near_maxMag( const extFloat80_t * );
+int_fast64_t subj_extF80M_to_i64_rx_near_even( const extFloat80_t * );
+int_fast64_t subj_extF80M_to_i64_rx_minMag( const extFloat80_t * );
+int_fast64_t subj_extF80M_to_i64_rx_min( const extFloat80_t * );
+int_fast64_t subj_extF80M_to_i64_rx_max( const extFloat80_t * );
+int_fast64_t subj_extF80M_to_i64_rx_near_maxMag( const extFloat80_t * );
+
+#ifdef FLOAT16
+float16_t subj_extF80M_to_f16( const extFloat80_t * );
+#endif
+float32_t subj_extF80M_to_f32( const extFloat80_t * );
+#ifdef FLOAT64
+float64_t subj_extF80M_to_f64( const extFloat80_t * );
+#endif
+#ifdef EXTFLOAT80
+void subj_extF80M_to_f128M( const extFloat80_t *, float128_t * );
+#endif
+
+void
+ subj_extF80M_roundToInt_r_near_even( const extFloat80_t *, extFloat80_t * );
+void subj_extF80M_roundToInt_r_minMag( const extFloat80_t *, extFloat80_t * );
+void subj_extF80M_roundToInt_r_min( const extFloat80_t *, extFloat80_t * );
+void subj_extF80M_roundToInt_r_max( const extFloat80_t *, extFloat80_t * );
+void
+ subj_extF80M_roundToInt_r_near_maxMag( const extFloat80_t *, extFloat80_t * );
+void subj_extF80M_roundToInt_x( const extFloat80_t *, extFloat80_t * );
+void
+ subj_extF80M_add(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+void
+ subj_extF80M_sub(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+void
+ subj_extF80M_mul(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+void
+ subj_extF80M_div(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+void
+ subj_extF80M_rem(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+void subj_extF80M_sqrt( const extFloat80_t *, extFloat80_t * );
+bool subj_extF80M_eq( const extFloat80_t *, const extFloat80_t * );
+bool subj_extF80M_le( const extFloat80_t *, const extFloat80_t * );
+bool subj_extF80M_lt( const extFloat80_t *, const extFloat80_t * );
+bool subj_extF80M_eq_signaling( const extFloat80_t *, const extFloat80_t * );
+bool subj_extF80M_le_quiet( const extFloat80_t *, const extFloat80_t * );
+bool subj_extF80M_lt_quiet( const extFloat80_t *, const extFloat80_t * );
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef FLOAT128
+
+uint_fast32_t subj_f128M_to_ui32_r_near_even( const float128_t * );
+uint_fast32_t subj_f128M_to_ui32_r_minMag( const float128_t * );
+uint_fast32_t subj_f128M_to_ui32_r_min( const float128_t * );
+uint_fast32_t subj_f128M_to_ui32_r_max( const float128_t * );
+uint_fast32_t subj_f128M_to_ui32_r_near_maxMag( extFloat80_t * );
+uint_fast64_t subj_f128M_to_ui64_r_near_even( const float128_t * );
+uint_fast64_t subj_f128M_to_ui64_r_minMag( const float128_t * );
+uint_fast64_t subj_f128M_to_ui64_r_min( const float128_t * );
+uint_fast64_t subj_f128M_to_ui64_r_max( const float128_t * );
+uint_fast64_t subj_f128M_to_ui64_r_near_maxMag( extFloat80_t * );
+int_fast32_t subj_f128M_to_i32_r_near_even( const float128_t * );
+int_fast32_t subj_f128M_to_i32_r_minMag( const float128_t * );
+int_fast32_t subj_f128M_to_i32_r_min( const float128_t * );
+int_fast32_t subj_f128M_to_i32_r_max( const float128_t * );
+int_fast32_t subj_f128M_to_i32_r_near_maxMag( extFloat80_t * );
+int_fast64_t subj_f128M_to_i64_r_near_even( const float128_t * );
+int_fast64_t subj_f128M_to_i64_r_minMag( const float128_t * );
+int_fast64_t subj_f128M_to_i64_r_min( const float128_t * );
+int_fast64_t subj_f128M_to_i64_r_max( const float128_t * );
+int_fast64_t subj_f128M_to_i64_r_near_maxMag( extFloat80_t * );
+
+uint_fast32_t subj_f128M_to_ui32_rx_near_even( const float128_t * );
+uint_fast32_t subj_f128M_to_ui32_rx_minMag( const float128_t * );
+uint_fast32_t subj_f128M_to_ui32_rx_min( const float128_t * );
+uint_fast32_t subj_f128M_to_ui32_rx_max( const float128_t * );
+uint_fast32_t subj_f128M_to_ui32_rx_near_maxMag( extFloat80_t * );
+uint_fast64_t subj_f128M_to_ui64_rx_near_even( const float128_t * );
+uint_fast64_t subj_f128M_to_ui64_rx_minMag( const float128_t * );
+uint_fast64_t subj_f128M_to_ui64_rx_min( const float128_t * );
+uint_fast64_t subj_f128M_to_ui64_rx_max( const float128_t * );
+uint_fast64_t subj_f128M_to_ui64_rx_near_maxMag( extFloat80_t * );
+int_fast32_t subj_f128M_to_i32_rx_near_even( const float128_t * );
+int_fast32_t subj_f128M_to_i32_rx_minMag( const float128_t * );
+int_fast32_t subj_f128M_to_i32_rx_min( const float128_t * );
+int_fast32_t subj_f128M_to_i32_rx_max( const float128_t * );
+int_fast32_t subj_f128M_to_i32_rx_near_maxMag( extFloat80_t * );
+int_fast64_t subj_f128M_to_i64_rx_near_even( const float128_t * );
+int_fast64_t subj_f128M_to_i64_rx_minMag( const float128_t * );
+int_fast64_t subj_f128M_to_i64_rx_min( const float128_t * );
+int_fast64_t subj_f128M_to_i64_rx_max( const float128_t * );
+int_fast64_t subj_f128M_to_i64_rx_near_maxMag( extFloat80_t * );
+
+#ifdef FLOAT16
+float16_t subj_f128M_to_f16( const float128_t * );
+#endif
+float32_t subj_f128M_to_f32( const float128_t * );
+#ifdef FLOAT64
+float64_t subj_f128M_to_f64( const float128_t * );
+#endif
+#ifdef FLOAT128
+void subj_f128M_to_extF80M( const float128_t *, extFloat80_t * );
+#endif
+
+void subj_f128M_roundToInt_r_near_even( const float128_t, float128_t * );
+void subj_f128M_roundToInt_r_minMag( const float128_t, float128_t * );
+void subj_f128M_roundToInt_r_min( const float128_t, float128_t * );
+void subj_f128M_roundToInt_r_max( const float128_t, float128_t * );
+void subj_f128M_roundToInt_r_near_maxMag( const float128_t, float128_t * );
+void subj_f128M_roundToInt_x( const float128_t, float128_t * );
+void subj_f128M_add( const float128_t *, const float128_t *, float128_t * );
+void subj_f128M_sub( const float128_t *, const float128_t *, float128_t * );
+void subj_f128M_mul( const float128_t *, const float128_t *, float128_t * );
+void
+ subj_f128M_mulAdd(
+ const float128_t *, const float128_t *, const float128_t *, float128_t *
+ );
+void subj_f128M_div( const float128_t *, const float128_t *, float128_t * );
+void subj_f128M_rem( const float128_t *, const float128_t *, float128_t * );
+void subj_f128M_sqrt( const float128_t *, float128_t * );
+bool subj_f128M_eq( const float128_t *, const float128_t * );
+bool subj_f128M_le( const float128_t *, const float128_t * );
+bool subj_f128M_lt( const float128_t *, const float128_t * );
+bool subj_f128M_eq_signaling( const float128_t *, const float128_t * );
+bool subj_f128M_le_quiet( const float128_t *, const float128_t * );
+bool subj_f128M_lt_quiet( const float128_t *, const float128_t * );
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/subjfloat_functions.c b/src/libs/softfloat-3e/testfloat/source/subjfloat_functions.c
new file mode 100644
index 00000000..13b28960
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/subjfloat_functions.c
@@ -0,0 +1,1810 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include "platform.h"
+#include "subjfloat_config.h"
+#include "subjfloat.h"
+#include "functions.h"
+
+typedef void genericFuncType();
+
+/*----------------------------------------------------------------------------
+| WARNING:
+| This file should not normally be modified. See "subjfloat_config.h"
+| instead.
+| The order of these array entries must match the order in the array
+| `standardFunctionInfos'. Be careful about making changes.
+*----------------------------------------------------------------------------*/
+
+genericFuncType *const subjfloat_functions[] = {
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT16
+#ifdef SUBJ_UI32_TO_F16
+ (genericFuncType *) subj_ui32_to_f16,
+#else
+ 0,
+#endif
+#endif
+#ifdef SUBJ_UI32_TO_F32
+ (genericFuncType *) subj_ui32_to_f32,
+#else
+ 0,
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_UI32_TO_F64
+ (genericFuncType *) subj_ui32_to_f64,
+#else
+ 0,
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_UI32_TO_EXTF80
+ (genericFuncType *) subj_ui32_to_extF80M,
+#else
+ 0,
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_UI32_TO_F128
+ (genericFuncType *) subj_ui32_to_f128M,
+#else
+ 0,
+#endif
+#endif
+#ifdef FLOAT16
+#ifdef SUBJ_UI64_TO_F16
+ (genericFuncType *) subj_ui64_to_f16,
+#else
+ 0,
+#endif
+#endif
+#ifdef SUBJ_UI64_TO_F32
+ (genericFuncType *) subj_ui64_to_f32,
+#else
+ 0,
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_UI64_TO_F64
+ (genericFuncType *) subj_ui64_to_f64,
+#else
+ 0,
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_UI64_TO_EXTF80
+ (genericFuncType *) subj_ui64_to_extF80M,
+#else
+ 0,
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_UI64_TO_F128
+ (genericFuncType *) subj_ui64_to_f128M,
+#else
+ 0,
+#endif
+#endif
+#ifdef FLOAT16
+#ifdef SUBJ_I32_TO_F16
+ (genericFuncType *) subj_i32_to_f16,
+#else
+ 0,
+#endif
+#endif
+#ifdef SUBJ_I32_TO_F32
+ (genericFuncType *) subj_i32_to_f32,
+#else
+ 0,
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_I32_TO_F64
+ (genericFuncType *) subj_i32_to_f64,
+#else
+ 0,
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_I32_TO_EXTF80
+ (genericFuncType *) subj_i32_to_extF80M,
+#else
+ 0,
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_I32_TO_F128
+ (genericFuncType *) subj_i32_to_f128M,
+#else
+ 0,
+#endif
+#endif
+#ifdef FLOAT16
+#ifdef SUBJ_I64_TO_F16
+ (genericFuncType *) subj_i64_to_f16,
+#else
+ 0,
+#endif
+#endif
+#ifdef SUBJ_I64_TO_F32
+ (genericFuncType *) subj_i64_to_f32,
+#else
+ 0,
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_I64_TO_F64
+ (genericFuncType *) subj_i64_to_f64,
+#else
+ 0,
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_I64_TO_EXTF80
+ (genericFuncType *) subj_i64_to_extF80M,
+#else
+ 0,
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_I64_TO_F128
+ (genericFuncType *) subj_i64_to_f128M,
+#else
+ 0,
+#endif
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT16
+#ifdef SUBJ_F16_TO_UI32_R_NEAR_EVEN
+ (genericFuncType *) subj_f16_to_ui32_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI32_R_MINMAG
+ (genericFuncType *) subj_f16_to_ui32_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI32_R_MIN
+ (genericFuncType *) subj_f16_to_ui32_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI32_R_MAX
+ (genericFuncType *) subj_f16_to_ui32_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI32_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f16_to_ui32_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI64_R_NEAR_EVEN
+ (genericFuncType *) subj_f16_to_ui64_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI64_R_MINMAG
+ (genericFuncType *) subj_f16_to_ui64_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI64_R_MIN
+ (genericFuncType *) subj_f16_to_ui64_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI64_R_MAX
+ (genericFuncType *) subj_f16_to_ui64_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI64_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f16_to_ui64_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I32_R_NEAR_EVEN
+ (genericFuncType *) subj_f16_to_i32_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I32_R_MINMAG
+ (genericFuncType *) subj_f16_to_i32_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I32_R_MIN
+ (genericFuncType *) subj_f16_to_i32_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I32_R_MAX
+ (genericFuncType *) subj_f16_to_i32_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I32_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f16_to_i32_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I64_R_NEAR_EVEN
+ (genericFuncType *) subj_f16_to_i64_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I64_R_MINMAG
+ (genericFuncType *) subj_f16_to_i64_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I64_R_MIN
+ (genericFuncType *) subj_f16_to_i64_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I64_R_MAX
+ (genericFuncType *) subj_f16_to_i64_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I64_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f16_to_i64_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI32_RX_NEAR_EVEN
+ (genericFuncType *) subj_f16_to_ui32_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI32_RX_MINMAG
+ (genericFuncType *) subj_f16_to_ui32_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI32_RX_MIN
+ (genericFuncType *) subj_f16_to_ui32_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI32_RX_MAX
+ (genericFuncType *) subj_f16_to_ui32_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI32_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f16_to_ui32_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI64_RX_NEAR_EVEN
+ (genericFuncType *) subj_f16_to_ui64_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI64_RX_MINMAG
+ (genericFuncType *) subj_f16_to_ui64_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI64_RX_MIN
+ (genericFuncType *) subj_f16_to_ui64_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI64_RX_MAX
+ (genericFuncType *) subj_f16_to_ui64_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI64_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f16_to_ui64_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I32_RX_NEAR_EVEN
+ (genericFuncType *) subj_f16_to_i32_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I32_RX_MINMAG
+ (genericFuncType *) subj_f16_to_i32_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I32_RX_MIN
+ (genericFuncType *) subj_f16_to_i32_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I32_RX_MAX
+ (genericFuncType *) subj_f16_to_i32_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I32_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f16_to_i32_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I64_RX_NEAR_EVEN
+ (genericFuncType *) subj_f16_to_i64_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I64_RX_MINMAG
+ (genericFuncType *) subj_f16_to_i64_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I64_RX_MIN
+ (genericFuncType *) subj_f16_to_i64_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I64_RX_MAX
+ (genericFuncType *) subj_f16_to_i64_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I64_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f16_to_i64_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_F32
+ (genericFuncType *) subj_f16_to_f32,
+#else
+ 0,
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_F16_TO_F64
+ (genericFuncType *) subj_f16_to_f64,
+#else
+ 0,
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_F16_TO_EXTF80
+ (genericFuncType *) subj_f16_to_extF80M,
+#else
+ 0,
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_F16_TO_F128
+ (genericFuncType *) subj_f16_to_f128M,
+#else
+ 0,
+#endif
+#endif
+#ifdef SUBJ_F16_ROUNDTOINT_R_NEAR_EVEN
+ (genericFuncType *) subj_f16_roundToInt_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_ROUNDTOINT_R_MINMAG
+ (genericFuncType *) subj_f16_roundToInt_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_ROUNDTOINT_R_MIN
+ (genericFuncType *) subj_f16_roundToInt_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_ROUNDTOINT_R_MAX
+ (genericFuncType *) subj_f16_roundToInt_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_ROUNDTOINT_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f16_roundToInt_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_ROUNDTOINT_X
+ (genericFuncType *) subj_f16_roundToInt_x,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_ADD
+ (genericFuncType *) subj_f16_add,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_SUB
+ (genericFuncType *) subj_f16_sub,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_MUL
+ (genericFuncType *) subj_f16_mul,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_MULADD
+ (genericFuncType *) subj_f16_mulAdd,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_DIV
+ (genericFuncType *) subj_f16_div,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_REM
+ (genericFuncType *) subj_f16_rem,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_SQRT
+ (genericFuncType *) subj_f16_sqrt,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_EQ
+ (genericFuncType *) subj_f16_eq,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_LE
+ (genericFuncType *) subj_f16_le,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_LT
+ (genericFuncType *) subj_f16_lt,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_EQ_SIGNALING
+ (genericFuncType *) subj_f16_eq_signaling,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_LE_QUIET
+ (genericFuncType *) subj_f16_le_quiet,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_LT_QUIET
+ (genericFuncType *) subj_f16_lt_quiet,
+#else
+ 0,
+#endif
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef SUBJ_F32_TO_UI32_R_NEAR_EVEN
+ (genericFuncType *) subj_f32_to_ui32_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI32_R_MINMAG
+ (genericFuncType *) subj_f32_to_ui32_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI32_R_MIN
+ (genericFuncType *) subj_f32_to_ui32_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI32_R_MAX
+ (genericFuncType *) subj_f32_to_ui32_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI32_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f32_to_ui32_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI64_R_NEAR_EVEN
+ (genericFuncType *) subj_f32_to_ui64_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI64_R_MINMAG
+ (genericFuncType *) subj_f32_to_ui64_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI64_R_MIN
+ (genericFuncType *) subj_f32_to_ui64_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI64_R_MAX
+ (genericFuncType *) subj_f32_to_ui64_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI64_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f32_to_ui64_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I32_R_NEAR_EVEN
+ (genericFuncType *) subj_f32_to_i32_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I32_R_MINMAG
+ (genericFuncType *) subj_f32_to_i32_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I32_R_MIN
+ (genericFuncType *) subj_f32_to_i32_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I32_R_MAX
+ (genericFuncType *) subj_f32_to_i32_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I32_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f32_to_i32_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I64_R_NEAR_EVEN
+ (genericFuncType *) subj_f32_to_i64_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I64_R_MINMAG
+ (genericFuncType *) subj_f32_to_i64_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I64_R_MIN
+ (genericFuncType *) subj_f32_to_i64_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I64_R_MAX
+ (genericFuncType *) subj_f32_to_i64_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I64_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f32_to_i64_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI32_RX_NEAR_EVEN
+ (genericFuncType *) subj_f32_to_ui32_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI32_RX_MINMAG
+ (genericFuncType *) subj_f32_to_ui32_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI32_RX_MIN
+ (genericFuncType *) subj_f32_to_ui32_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI32_RX_MAX
+ (genericFuncType *) subj_f32_to_ui32_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI32_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f32_to_ui32_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI64_RX_NEAR_EVEN
+ (genericFuncType *) subj_f32_to_ui64_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI64_RX_MINMAG
+ (genericFuncType *) subj_f32_to_ui64_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI64_RX_MIN
+ (genericFuncType *) subj_f32_to_ui64_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI64_RX_MAX
+ (genericFuncType *) subj_f32_to_ui64_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI64_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f32_to_ui64_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I32_RX_NEAR_EVEN
+ (genericFuncType *) subj_f32_to_i32_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I32_RX_MINMAG
+ (genericFuncType *) subj_f32_to_i32_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I32_RX_MIN
+ (genericFuncType *) subj_f32_to_i32_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I32_RX_MAX
+ (genericFuncType *) subj_f32_to_i32_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I32_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f32_to_i32_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I64_RX_NEAR_EVEN
+ (genericFuncType *) subj_f32_to_i64_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I64_RX_MINMAG
+ (genericFuncType *) subj_f32_to_i64_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I64_RX_MIN
+ (genericFuncType *) subj_f32_to_i64_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I64_RX_MAX
+ (genericFuncType *) subj_f32_to_i64_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I64_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f32_to_i64_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef FLOAT16
+#ifdef SUBJ_F32_TO_F16
+ (genericFuncType *) subj_f32_to_f16,
+#else
+ 0,
+#endif
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_F32_TO_F64
+ (genericFuncType *) subj_f32_to_f64,
+#else
+ 0,
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_F32_TO_EXTF80
+ (genericFuncType *) subj_f32_to_extF80M,
+#else
+ 0,
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_F32_TO_F128
+ (genericFuncType *) subj_f32_to_f128M,
+#else
+ 0,
+#endif
+#endif
+#ifdef SUBJ_F32_ROUNDTOINT_R_NEAR_EVEN
+ (genericFuncType *) subj_f32_roundToInt_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_ROUNDTOINT_R_MINMAG
+ (genericFuncType *) subj_f32_roundToInt_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_ROUNDTOINT_R_MIN
+ (genericFuncType *) subj_f32_roundToInt_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_ROUNDTOINT_R_MAX
+ (genericFuncType *) subj_f32_roundToInt_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_ROUNDTOINT_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f32_roundToInt_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_ROUNDTOINT_X
+ (genericFuncType *) subj_f32_roundToInt_x,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_ADD
+ (genericFuncType *) subj_f32_add,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_SUB
+ (genericFuncType *) subj_f32_sub,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_MUL
+ (genericFuncType *) subj_f32_mul,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_MULADD
+ (genericFuncType *) subj_f32_mulAdd,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_DIV
+ (genericFuncType *) subj_f32_div,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_REM
+ (genericFuncType *) subj_f32_rem,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_SQRT
+ (genericFuncType *) subj_f32_sqrt,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_EQ
+ (genericFuncType *) subj_f32_eq,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_LE
+ (genericFuncType *) subj_f32_le,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_LT
+ (genericFuncType *) subj_f32_lt,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_EQ_SIGNALING
+ (genericFuncType *) subj_f32_eq_signaling,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_LE_QUIET
+ (genericFuncType *) subj_f32_le_quiet,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_LT_QUIET
+ (genericFuncType *) subj_f32_lt_quiet,
+#else
+ 0,
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT64
+#ifdef SUBJ_F64_TO_UI32_R_NEAR_EVEN
+ (genericFuncType *) subj_f64_to_ui32_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI32_R_MINMAG
+ (genericFuncType *) subj_f64_to_ui32_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI32_R_MIN
+ (genericFuncType *) subj_f64_to_ui32_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI32_R_MAX
+ (genericFuncType *) subj_f64_to_ui32_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI32_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f64_to_ui32_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI64_R_NEAR_EVEN
+ (genericFuncType *) subj_f64_to_ui64_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI64_R_MINMAG
+ (genericFuncType *) subj_f64_to_ui64_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI64_R_MIN
+ (genericFuncType *) subj_f64_to_ui64_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI64_R_MAX
+ (genericFuncType *) subj_f64_to_ui64_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI64_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f64_to_ui64_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I32_R_NEAR_EVEN
+ (genericFuncType *) subj_f64_to_i32_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I32_R_MINMAG
+ (genericFuncType *) subj_f64_to_i32_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I32_R_MIN
+ (genericFuncType *) subj_f64_to_i32_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I32_R_MAX
+ (genericFuncType *) subj_f64_to_i32_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I32_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f64_to_i32_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I64_R_NEAR_EVEN
+ (genericFuncType *) subj_f64_to_i64_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I64_R_MINMAG
+ (genericFuncType *) subj_f64_to_i64_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I64_R_MIN
+ (genericFuncType *) subj_f64_to_i64_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I64_R_MAX
+ (genericFuncType *) subj_f64_to_i64_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I64_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f64_to_i64_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI32_RX_NEAR_EVEN
+ (genericFuncType *) subj_f64_to_ui32_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI32_RX_MINMAG
+ (genericFuncType *) subj_f64_to_ui32_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI32_RX_MIN
+ (genericFuncType *) subj_f64_to_ui32_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI32_RX_MAX
+ (genericFuncType *) subj_f64_to_ui32_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI32_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f64_to_ui32_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI64_RX_NEAR_EVEN
+ (genericFuncType *) subj_f64_to_ui64_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI64_RX_MINMAG
+ (genericFuncType *) subj_f64_to_ui64_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI64_RX_MIN
+ (genericFuncType *) subj_f64_to_ui64_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI64_RX_MAX
+ (genericFuncType *) subj_f64_to_ui64_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI64_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f64_to_ui64_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I32_RX_NEAR_EVEN
+ (genericFuncType *) subj_f64_to_i32_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I32_RX_MINMAG
+ (genericFuncType *) subj_f64_to_i32_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I32_RX_MIN
+ (genericFuncType *) subj_f64_to_i32_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I32_RX_MAX
+ (genericFuncType *) subj_f64_to_i32_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I32_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f64_to_i32_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I64_RX_NEAR_EVEN
+ (genericFuncType *) subj_f64_to_i64_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I64_RX_MINMAG
+ (genericFuncType *) subj_f64_to_i64_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I64_RX_MIN
+ (genericFuncType *) subj_f64_to_i64_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I64_RX_MAX
+ (genericFuncType *) subj_f64_to_i64_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I64_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f64_to_i64_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef FLOAT16
+#ifdef SUBJ_F64_TO_F16
+ (genericFuncType *) subj_f64_to_f16,
+#else
+ 0,
+#endif
+#endif
+#ifdef SUBJ_F64_TO_F32
+ (genericFuncType *) subj_f64_to_f32,
+#else
+ 0,
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_F64_TO_EXTF80
+ (genericFuncType *) subj_f64_to_extF80M,
+#else
+ 0,
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_F64_TO_F128
+ (genericFuncType *) subj_f64_to_f128M,
+#else
+ 0,
+#endif
+#endif
+#ifdef SUBJ_F64_ROUNDTOINT_R_NEAR_EVEN
+ (genericFuncType *) subj_f64_roundToInt_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_ROUNDTOINT_R_MINMAG
+ (genericFuncType *) subj_f64_roundToInt_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_ROUNDTOINT_R_MIN
+ (genericFuncType *) subj_f64_roundToInt_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_ROUNDTOINT_R_MAX
+ (genericFuncType *) subj_f64_roundToInt_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_ROUNDTOINT_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f64_roundToInt_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_ROUNDTOINT_X
+ (genericFuncType *) subj_f64_roundToInt_x,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_ADD
+ (genericFuncType *) subj_f64_add,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_SUB
+ (genericFuncType *) subj_f64_sub,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_MUL
+ (genericFuncType *) subj_f64_mul,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_MULADD
+ (genericFuncType *) subj_f64_mulAdd,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_DIV
+ (genericFuncType *) subj_f64_div,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_REM
+ (genericFuncType *) subj_f64_rem,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_SQRT
+ (genericFuncType *) subj_f64_sqrt,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_EQ
+ (genericFuncType *) subj_f64_eq,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_LE
+ (genericFuncType *) subj_f64_le,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_LT
+ (genericFuncType *) subj_f64_lt,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_EQ_SIGNALING
+ (genericFuncType *) subj_f64_eq_signaling,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_LE_QUIET
+ (genericFuncType *) subj_f64_le_quiet,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_LT_QUIET
+ (genericFuncType *) subj_f64_lt_quiet,
+#else
+ 0,
+#endif
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef EXTFLOAT80
+#ifdef SUBJ_EXTF80_TO_UI32_R_NEAR_EVEN
+ (genericFuncType *) subj_extF80M_to_ui32_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI32_R_MINMAG
+ (genericFuncType *) subj_extF80M_to_ui32_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI32_R_MIN
+ (genericFuncType *) subj_extF80M_to_ui32_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI32_R_MAX
+ (genericFuncType *) subj_extF80M_to_ui32_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI32_R_NEAR_MAXMAG
+ (genericFuncType *) subj_extF80M_to_ui32_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI64_R_NEAR_EVEN
+ (genericFuncType *) subj_extF80M_to_ui64_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI64_R_MINMAG
+ (genericFuncType *) subj_extF80M_to_ui64_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI64_R_MIN
+ (genericFuncType *) subj_extF80M_to_ui64_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI64_R_MAX
+ (genericFuncType *) subj_extF80M_to_ui64_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI64_R_NEAR_MAXMAG
+ (genericFuncType *) subj_extF80M_to_ui64_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I32_R_NEAR_EVEN
+ (genericFuncType *) subj_extF80M_to_i32_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I32_R_MINMAG
+ (genericFuncType *) subj_extF80M_to_i32_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I32_R_MIN
+ (genericFuncType *) subj_extF80M_to_i32_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I32_R_MAX
+ (genericFuncType *) subj_extF80M_to_i32_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I32_R_NEAR_MAXMAG
+ (genericFuncType *) subj_extF80M_to_i32_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I64_R_NEAR_EVEN
+ (genericFuncType *) subj_extF80M_to_i64_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I64_R_MINMAG
+ (genericFuncType *) subj_extF80M_to_i64_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I64_R_MIN
+ (genericFuncType *) subj_extF80M_to_i64_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I64_R_MAX
+ (genericFuncType *) subj_extF80M_to_i64_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I64_R_NEAR_MAXMAG
+ (genericFuncType *) subj_extF80M_to_i64_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI32_RX_NEAR_EVEN
+ (genericFuncType *) subj_extF80M_to_ui32_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI32_RX_MINMAG
+ (genericFuncType *) subj_extF80M_to_ui32_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI32_RX_MIN
+ (genericFuncType *) subj_extF80M_to_ui32_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI32_RX_MAX
+ (genericFuncType *) subj_extF80M_to_ui32_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI32_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_extF80M_to_ui32_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI64_RX_NEAR_EVEN
+ (genericFuncType *) subj_extF80M_to_ui64_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI64_RX_MINMAG
+ (genericFuncType *) subj_extF80M_to_ui64_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI64_RX_MIN
+ (genericFuncType *) subj_extF80M_to_ui64_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI64_RX_MAX
+ (genericFuncType *) subj_extF80M_to_ui64_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI64_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_extF80M_to_ui64_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I32_RX_NEAR_EVEN
+ (genericFuncType *) subj_extF80M_to_i32_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I32_RX_MINMAG
+ (genericFuncType *) subj_extF80M_to_i32_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I32_RX_MIN
+ (genericFuncType *) subj_extF80M_to_i32_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I32_RX_MAX
+ (genericFuncType *) subj_extF80M_to_i32_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I32_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_extF80M_to_i32_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I64_RX_NEAR_EVEN
+ (genericFuncType *) subj_extF80M_to_i64_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I64_RX_MINMAG
+ (genericFuncType *) subj_extF80M_to_i64_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I64_RX_MIN
+ (genericFuncType *) subj_extF80M_to_i64_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I64_RX_MAX
+ (genericFuncType *) subj_extF80M_to_i64_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I64_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_extF80M_to_i64_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef FLOAT16
+#ifdef SUBJ_EXTF80_TO_F16
+ (genericFuncType *) subj_extF80M_to_f16,
+#else
+ 0,
+#endif
+#endif
+#ifdef SUBJ_EXTF80_TO_F32
+ (genericFuncType *) subj_extF80M_to_f32,
+#else
+ 0,
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_EXTF80_TO_F64
+ (genericFuncType *) subj_extF80M_to_f64,
+#else
+ 0,
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_EXTF80_TO_F128
+ (genericFuncType *) subj_extF80M_to_f128M,
+#else
+ 0,
+#endif
+#endif
+#ifdef SUBJ_EXTF80_ROUNDTOINT_R_NEAR_EVEN
+ (genericFuncType *) subj_extF80M_roundToInt_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_ROUNDTOINT_R_MINMAG
+ (genericFuncType *) subj_extF80M_roundToInt_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_ROUNDTOINT_R_MIN
+ (genericFuncType *) subj_extF80M_roundToInt_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_ROUNDTOINT_R_MAX
+ (genericFuncType *) subj_extF80M_roundToInt_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_ROUNDTOINT_R_NEAR_MAXMAG
+ (genericFuncType *) subj_extF80M_roundToInt_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_ROUNDTOINT_X
+ (genericFuncType *) subj_extF80M_roundToInt_x,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_ADD
+ (genericFuncType *) subj_extF80M_add,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_SUB
+ (genericFuncType *) subj_extF80M_sub,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_MUL
+ (genericFuncType *) subj_extF80M_mul,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_DIV
+ (genericFuncType *) subj_extF80M_div,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_REM
+ (genericFuncType *) subj_extF80M_rem,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_SQRT
+ (genericFuncType *) subj_extF80M_sqrt,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_EQ
+ (genericFuncType *) subj_extF80M_eq,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_LE
+ (genericFuncType *) subj_extF80M_le,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_LT
+ (genericFuncType *) subj_extF80M_lt,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_EQ_SIGNALING
+ (genericFuncType *) subj_extF80M_eq_signaling,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_LE_QUIET
+ (genericFuncType *) subj_extF80M_le_quiet,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_LT_QUIET
+ (genericFuncType *) subj_extF80M_lt_quiet,
+#else
+ 0,
+#endif
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT128
+#ifdef SUBJ_F128_TO_UI32_R_NEAR_EVEN
+ (genericFuncType *) subj_f128M_to_ui32_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI32_R_MINMAG
+ (genericFuncType *) subj_f128M_to_ui32_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI32_R_MIN
+ (genericFuncType *) subj_f128M_to_ui32_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI32_R_MAX
+ (genericFuncType *) subj_f128M_to_ui32_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI32_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f128M_to_ui32_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI64_R_NEAR_EVEN
+ (genericFuncType *) subj_f128M_to_ui64_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI64_R_MINMAG
+ (genericFuncType *) subj_f128M_to_ui64_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI64_R_MIN
+ (genericFuncType *) subj_f128M_to_ui64_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI64_R_MAX
+ (genericFuncType *) subj_f128M_to_ui64_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI64_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f128M_to_ui64_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I32_R_NEAR_EVEN
+ (genericFuncType *) subj_f128M_to_i32_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I32_R_MINMAG
+ (genericFuncType *) subj_f128M_to_i32_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I32_R_MIN
+ (genericFuncType *) subj_f128M_to_i32_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I32_R_MAX
+ (genericFuncType *) subj_f128M_to_i32_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I32_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f128M_to_i32_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I64_R_NEAR_EVEN
+ (genericFuncType *) subj_f128M_to_i64_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I64_R_MINMAG
+ (genericFuncType *) subj_f128M_to_i64_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I64_R_MIN
+ (genericFuncType *) subj_f128M_to_i64_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I64_R_MAX
+ (genericFuncType *) subj_f128M_to_i64_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I64_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f128M_to_i64_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI32_RX_NEAR_EVEN
+ (genericFuncType *) subj_f128M_to_ui32_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI32_RX_MINMAG
+ (genericFuncType *) subj_f128M_to_ui32_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI32_RX_MIN
+ (genericFuncType *) subj_f128M_to_ui32_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI32_RX_MAX
+ (genericFuncType *) subj_f128M_to_ui32_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI32_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f128M_to_ui32_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI64_RX_NEAR_EVEN
+ (genericFuncType *) subj_f128M_to_ui64_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI64_RX_MINMAG
+ (genericFuncType *) subj_f128M_to_ui64_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI64_RX_MIN
+ (genericFuncType *) subj_f128M_to_ui64_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI64_RX_MAX
+ (genericFuncType *) subj_f128M_to_ui64_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI64_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f128M_to_ui64_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I32_RX_NEAR_EVEN
+ (genericFuncType *) subj_f128M_to_i32_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I32_RX_MINMAG
+ (genericFuncType *) subj_f128M_to_i32_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I32_RX_MIN
+ (genericFuncType *) subj_f128M_to_i32_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I32_RX_MAX
+ (genericFuncType *) subj_f128M_to_i32_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I32_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f128M_to_i32_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I64_RX_NEAR_EVEN
+ (genericFuncType *) subj_f128M_to_i64_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I64_RX_MINMAG
+ (genericFuncType *) subj_f128M_to_i64_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I64_RX_MIN
+ (genericFuncType *) subj_f128M_to_i64_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I64_RX_MAX
+ (genericFuncType *) subj_f128M_to_i64_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I64_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f128M_to_i64_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef FLOAT16
+#ifdef SUBJ_F128_TO_F16
+ (genericFuncType *) subj_f128M_to_f16,
+#else
+ 0,
+#endif
+#endif
+#ifdef SUBJ_F128_TO_F32
+ (genericFuncType *) subj_f128M_to_f32,
+#else
+ 0,
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_F128_TO_F64
+ (genericFuncType *) subj_f128M_to_f64,
+#else
+ 0,
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_F128_TO_EXTF80
+ (genericFuncType *) subj_f128M_to_extF80M,
+#else
+ 0,
+#endif
+#endif
+#ifdef SUBJ_F128_ROUNDTOINT_R_NEAR_EVEN
+ (genericFuncType *) subj_f128M_roundToInt_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_ROUNDTOINT_R_MINMAG
+ (genericFuncType *) subj_f128M_roundToInt_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_ROUNDTOINT_R_MIN
+ (genericFuncType *) subj_f128M_roundToInt_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_ROUNDTOINT_R_MAX
+ (genericFuncType *) subj_f128M_roundToInt_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_ROUNDTOINT_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f128M_roundToInt_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_ROUNDTOINT_X
+ (genericFuncType *) subj_f128M_roundToInt_x,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_ADD
+ (genericFuncType *) subj_f128M_add,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_SUB
+ (genericFuncType *) subj_f128M_sub,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_MUL
+ (genericFuncType *) subj_f128M_mul,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_MULADD
+ (genericFuncType *) subj_f128M_mulAdd,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_DIV
+ (genericFuncType *) subj_f128M_div,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_REM
+ (genericFuncType *) subj_f128M_rem,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_SQRT
+ (genericFuncType *) subj_f128M_sqrt,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_EQ
+ (genericFuncType *) subj_f128M_eq,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_LE
+ (genericFuncType *) subj_f128M_le,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_LT
+ (genericFuncType *) subj_f128M_lt,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_EQ_SIGNALING
+ (genericFuncType *) subj_f128M_eq_signaling,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_LE_QUIET
+ (genericFuncType *) subj_f128M_le_quiet,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_LT_QUIET
+ (genericFuncType *) subj_f128M_lt_quiet,
+#else
+ 0,
+#endif
+#endif
+};
+
diff --git a/src/libs/softfloat-3e/testfloat/source/testLoops.h b/src/libs/softfloat-3e/testfloat/source/testLoops.h
new file mode 100644
index 00000000..f9b88d7d
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/testLoops.h
@@ -0,0 +1,578 @@
+
+/*============================================================================
+
+This C header file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
+#include "softfloat.h"
+
+extern bool testLoops_forever;
+
+extern uint_fast8_t *testLoops_trueFlagsPtr;
+extern uint_fast8_t (*testLoops_subjFlagsFunction)( void );
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef FLOAT16
+void test_a_ui32_z_f16( float16_t ( uint32_t ), float16_t ( uint32_t ) );
+#endif
+void test_a_ui32_z_f32( float32_t ( uint32_t ), float32_t ( uint32_t ) );
+#ifdef FLOAT64
+void test_a_ui32_z_f64( float64_t ( uint32_t ), float64_t ( uint32_t ) );
+#endif
+#ifdef EXTFLOAT80
+void
+ test_a_ui32_z_extF80(
+ void ( uint32_t, extFloat80_t * ), void ( uint32_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void
+ test_a_ui32_z_f128(
+ void ( uint32_t, float128_t * ), void ( uint32_t, float128_t * )
+ );
+#endif
+#ifdef FLOAT16
+void test_a_ui64_z_f16( float16_t ( uint64_t ), float16_t ( uint64_t ) );
+#endif
+void test_a_ui64_z_f32( float32_t ( uint64_t ), float32_t ( uint64_t ) );
+#ifdef FLOAT64
+void test_a_ui64_z_f64( float64_t ( uint64_t ), float64_t ( uint64_t ) );
+#endif
+#ifdef EXTFLOAT80
+void
+ test_a_ui64_z_extF80(
+ void ( uint64_t, extFloat80_t * ), void ( uint64_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void
+ test_a_ui64_z_f128(
+ void ( uint64_t, float128_t * ), void ( uint64_t, float128_t * ) );
+#endif
+#ifdef FLOAT16
+void test_a_i32_z_f16( float16_t ( int32_t ), float16_t ( int32_t ) );
+#endif
+void test_a_i32_z_f32( float32_t ( int32_t ), float32_t ( int32_t ) );
+#ifdef FLOAT64
+void test_a_i32_z_f64( float64_t ( int32_t ), float64_t ( int32_t ) );
+#endif
+#ifdef EXTFLOAT80
+void
+ test_a_i32_z_extF80(
+ void ( int32_t, extFloat80_t * ), void ( int32_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void
+ test_a_i32_z_f128(
+ void ( int32_t, float128_t * ), void ( int32_t, float128_t * ) );
+#endif
+#ifdef FLOAT16
+void test_a_i64_z_f16( float16_t ( int64_t ), float16_t ( int64_t ) );
+#endif
+void test_a_i64_z_f32( float32_t ( int64_t ), float32_t ( int64_t ) );
+#ifdef FLOAT64
+void test_a_i64_z_f64( float64_t ( int64_t ), float64_t ( int64_t ) );
+#endif
+#ifdef EXTFLOAT80
+void
+ test_a_i64_z_extF80(
+ void ( int64_t, extFloat80_t * ), void ( int64_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void
+ test_a_i64_z_f128(
+ void ( int64_t, float128_t * ), void ( int64_t, float128_t * ) );
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef FLOAT16
+void
+ test_a_f16_z_ui32_rx(
+ uint_fast32_t ( float16_t, uint_fast8_t, bool ),
+ uint_fast32_t ( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f16_z_ui64_rx(
+ uint_fast64_t ( float16_t, uint_fast8_t, bool ),
+ uint_fast64_t ( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f16_z_i32_rx(
+ int_fast32_t ( float16_t, uint_fast8_t, bool ),
+ int_fast32_t ( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f16_z_i64_rx(
+ int_fast64_t ( float16_t, uint_fast8_t, bool ),
+ int_fast64_t ( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f16_z_ui32_x(
+ uint_fast32_t ( float16_t, bool ), uint_fast32_t ( float16_t, bool ), bool
+ );
+void
+ test_a_f16_z_ui64_x(
+ uint_fast64_t ( float16_t, bool ), uint_fast64_t ( float16_t, bool ), bool
+ );
+void
+ test_a_f16_z_i32_x(
+ int_fast32_t ( float16_t, bool ), int_fast32_t ( float16_t, bool ), bool
+ );
+void
+ test_a_f16_z_i64_x(
+ int_fast64_t ( float16_t, bool ), int_fast64_t ( float16_t, bool ), bool
+ );
+void test_a_f16_z_f32( float32_t ( float16_t ), float32_t ( float16_t ) );
+#ifdef FLOAT64
+void test_a_f16_z_f64( float64_t ( float16_t ), float64_t ( float16_t ) );
+#endif
+#ifdef EXTFLOAT80
+void
+ test_a_f16_z_extF80(
+ void ( float16_t, extFloat80_t * ), void ( float16_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void
+ test_a_f16_z_f128(
+ void ( float16_t, float128_t * ), void ( float16_t, float128_t * ) );
+#endif
+void test_az_f16( float16_t ( float16_t ), float16_t ( float16_t ) );
+void
+ test_az_f16_rx(
+ float16_t ( float16_t, uint_fast8_t, bool ),
+ float16_t ( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_abz_f16(
+ float16_t ( float16_t, float16_t ), float16_t ( float16_t, float16_t ) );
+void
+ test_abcz_f16(
+ float16_t ( float16_t, float16_t, float16_t ),
+ float16_t ( float16_t, float16_t, float16_t )
+ );
+void
+ test_ab_f16_z_bool(
+ bool ( float16_t, float16_t ), bool ( float16_t, float16_t ) );
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+void
+ test_a_f32_z_ui32_rx(
+ uint_fast32_t ( float32_t, uint_fast8_t, bool ),
+ uint_fast32_t ( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f32_z_ui64_rx(
+ uint_fast64_t ( float32_t, uint_fast8_t, bool ),
+ uint_fast64_t ( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f32_z_i32_rx(
+ int_fast32_t ( float32_t, uint_fast8_t, bool ),
+ int_fast32_t ( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f32_z_i64_rx(
+ int_fast64_t ( float32_t, uint_fast8_t, bool ),
+ int_fast64_t ( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f32_z_ui32_x(
+ uint_fast32_t ( float32_t, bool ), uint_fast32_t ( float32_t, bool ), bool
+ );
+void
+ test_a_f32_z_ui64_x(
+ uint_fast64_t ( float32_t, bool ), uint_fast64_t ( float32_t, bool ), bool
+ );
+void
+ test_a_f32_z_i32_x(
+ int_fast32_t ( float32_t, bool ), int_fast32_t ( float32_t, bool ), bool
+ );
+void
+ test_a_f32_z_i64_x(
+ int_fast64_t ( float32_t, bool ), int_fast64_t ( float32_t, bool ), bool
+ );
+#ifdef FLOAT16
+void test_a_f32_z_f16( float16_t ( float32_t ), float16_t ( float32_t ) );
+#endif
+#ifdef FLOAT64
+void test_a_f32_z_f64( float64_t ( float32_t ), float64_t ( float32_t ) );
+#endif
+#ifdef EXTFLOAT80
+void
+ test_a_f32_z_extF80(
+ void ( float32_t, extFloat80_t * ), void ( float32_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void
+ test_a_f32_z_f128(
+ void ( float32_t, float128_t * ), void ( float32_t, float128_t * ) );
+#endif
+void test_az_f32( float32_t ( float32_t ), float32_t ( float32_t ) );
+void
+ test_az_f32_rx(
+ float32_t ( float32_t, uint_fast8_t, bool ),
+ float32_t ( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_abz_f32(
+ float32_t ( float32_t, float32_t ), float32_t ( float32_t, float32_t ) );
+void
+ test_abcz_f32(
+ float32_t ( float32_t, float32_t, float32_t ),
+ float32_t ( float32_t, float32_t, float32_t )
+ );
+void
+ test_ab_f32_z_bool(
+ bool ( float32_t, float32_t ), bool ( float32_t, float32_t ) );
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef FLOAT64
+void
+ test_a_f64_z_ui32_rx(
+ uint_fast32_t ( float64_t, uint_fast8_t, bool ),
+ uint_fast32_t ( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f64_z_ui64_rx(
+ uint_fast64_t ( float64_t, uint_fast8_t, bool ),
+ uint_fast64_t ( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f64_z_i32_rx(
+ int_fast32_t ( float64_t, uint_fast8_t, bool ),
+ int_fast32_t ( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f64_z_i64_rx(
+ int_fast64_t ( float64_t, uint_fast8_t, bool ),
+ int_fast64_t ( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f64_z_ui32_x(
+ uint_fast32_t ( float64_t, bool ), uint_fast32_t ( float64_t, bool ), bool
+ );
+void
+ test_a_f64_z_ui64_x(
+ uint_fast64_t ( float64_t, bool ), uint_fast64_t ( float64_t, bool ), bool
+ );
+void
+ test_a_f64_z_i32_x(
+ int_fast32_t ( float64_t, bool ), int_fast32_t ( float64_t, bool ), bool
+ );
+void
+ test_a_f64_z_i64_x(
+ int_fast64_t ( float64_t, bool ), int_fast64_t ( float64_t, bool ), bool
+ );
+#ifdef FLOAT16
+void test_a_f64_z_f16( float16_t ( float64_t ), float16_t ( float64_t ) );
+#endif
+void test_a_f64_z_f32( float32_t ( float64_t ), float32_t ( float64_t ) );
+#ifdef EXTFLOAT80
+void
+ test_a_f64_z_extF80(
+ void ( float64_t, extFloat80_t * ), void ( float64_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void
+ test_a_f64_z_f128(
+ void ( float64_t, float128_t * ), void ( float64_t, float128_t * ) );
+#endif
+void test_az_f64( float64_t ( float64_t ), float64_t ( float64_t ) );
+void
+ test_az_f64_rx(
+ float64_t ( float64_t, uint_fast8_t, bool ),
+ float64_t ( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_abz_f64(
+ float64_t ( float64_t, float64_t ), float64_t ( float64_t, float64_t ) );
+void
+ test_abcz_f64(
+ float64_t ( float64_t, float64_t, float64_t ),
+ float64_t ( float64_t, float64_t, float64_t )
+ );
+void
+ test_ab_f64_z_bool(
+ bool ( float64_t, float64_t ), bool ( float64_t, float64_t ) );
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef EXTFLOAT80
+void
+ test_a_extF80_z_ui32_rx(
+ uint_fast32_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast32_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_extF80_z_ui64_rx(
+ uint_fast64_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast64_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_extF80_z_i32_rx(
+ int_fast32_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ int_fast32_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_extF80_z_i64_rx(
+ int_fast64_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ int_fast64_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_extF80_z_ui32_x(
+ uint_fast32_t ( const extFloat80_t *, bool ),
+ uint_fast32_t ( const extFloat80_t *, bool ),
+ bool
+ );
+void
+ test_a_extF80_z_ui64_x(
+ uint_fast64_t ( const extFloat80_t *, bool ),
+ uint_fast64_t ( const extFloat80_t *, bool ),
+ bool
+ );
+void
+ test_a_extF80_z_i32_x(
+ int_fast32_t ( const extFloat80_t *, bool ),
+ int_fast32_t ( const extFloat80_t *, bool ),
+ bool
+ );
+void
+ test_a_extF80_z_i64_x(
+ int_fast64_t ( const extFloat80_t *, bool ),
+ int_fast64_t ( const extFloat80_t *, bool ),
+ bool
+ );
+#ifdef FLOAT16
+void
+ test_a_extF80_z_f16(
+ float16_t ( const extFloat80_t * ), float16_t ( const extFloat80_t * ) );
+#endif
+void
+ test_a_extF80_z_f32(
+ float32_t ( const extFloat80_t * ), float32_t ( const extFloat80_t * ) );
+#ifdef FLOAT64
+void
+ test_a_extF80_z_f64(
+ float64_t ( const extFloat80_t * ), float64_t ( const extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void
+ test_a_extF80_z_f128(
+ void ( const extFloat80_t *, float128_t * ),
+ void ( const extFloat80_t *, float128_t * )
+ );
+#endif
+void
+ test_az_extF80(
+ void ( const extFloat80_t *, extFloat80_t * ),
+ void ( const extFloat80_t *, extFloat80_t * )
+ );
+void
+ test_az_extF80_rx(
+ void ( const extFloat80_t *, uint_fast8_t, bool, extFloat80_t * ),
+ void ( const extFloat80_t *, uint_fast8_t, bool, extFloat80_t * ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_abz_extF80(
+ void ( const extFloat80_t *, const extFloat80_t *, extFloat80_t * ),
+ void ( const extFloat80_t *, const extFloat80_t *, extFloat80_t * )
+ );
+void
+ test_ab_extF80_z_bool(
+ bool ( const extFloat80_t *, const extFloat80_t * ),
+ bool ( const extFloat80_t *, const extFloat80_t * )
+ );
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef FLOAT128
+void
+ test_a_f128_z_ui32_rx(
+ uint_fast32_t ( const float128_t *, uint_fast8_t, bool ),
+ uint_fast32_t ( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f128_z_ui64_rx(
+ uint_fast64_t ( const float128_t *, uint_fast8_t, bool ),
+ uint_fast64_t ( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f128_z_i32_rx(
+ int_fast32_t ( const float128_t *, uint_fast8_t, bool ),
+ int_fast32_t ( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f128_z_i64_rx(
+ int_fast64_t ( const float128_t *, uint_fast8_t, bool ),
+ int_fast64_t ( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f128_z_ui32_x(
+ uint_fast32_t ( const float128_t *, bool ),
+ uint_fast32_t ( const float128_t *, bool ),
+ bool
+ );
+void
+ test_a_f128_z_ui64_x(
+ uint_fast64_t ( const float128_t *, bool ),
+ uint_fast64_t ( const float128_t *, bool ),
+ bool
+ );
+void
+ test_a_f128_z_i32_x(
+ int_fast32_t ( const float128_t *, bool ),
+ int_fast32_t ( const float128_t *, bool ),
+ bool
+ );
+void
+ test_a_f128_z_i64_x(
+ int_fast64_t ( const float128_t *, bool ),
+ int_fast64_t ( const float128_t *, bool ),
+ bool
+ );
+#ifdef FLOAT16
+void
+ test_a_f128_z_f16(
+ float16_t ( const float128_t * ), float16_t ( const float128_t * ) );
+#endif
+void
+ test_a_f128_z_f32(
+ float32_t ( const float128_t * ), float32_t ( const float128_t * ) );
+#ifdef FLOAT64
+void
+ test_a_f128_z_f64(
+ float64_t ( const float128_t * ), float64_t ( const float128_t * ) );
+#endif
+#ifdef EXTFLOAT80
+void
+ test_a_f128_z_extF80(
+ void ( const float128_t *, extFloat80_t * ),
+ void ( const float128_t *, extFloat80_t * )
+ );
+#endif
+void
+ test_az_f128(
+ void ( const float128_t *, float128_t * ),
+ void ( const float128_t *, float128_t * )
+ );
+void
+ test_az_f128_rx(
+ void ( const float128_t *, uint_fast8_t, bool, float128_t * ),
+ void ( const float128_t *, uint_fast8_t, bool, float128_t * ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_abz_f128(
+ void ( const float128_t *, const float128_t *, float128_t * ),
+ void ( const float128_t *, const float128_t *, float128_t * )
+ );
+void
+ test_abcz_f128(
+ void
+ ( const float128_t *,
+ const float128_t *,
+ const float128_t *,
+ float128_t *
+ ),
+ void
+ ( const float128_t *,
+ const float128_t *,
+ const float128_t *,
+ float128_t *
+ )
+ );
+void
+ test_ab_f128_z_bool(
+ bool ( const float128_t *, const float128_t * ),
+ bool ( const float128_t *, const float128_t * )
+ );
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/testLoops_common.c b/src/libs/softfloat-3e/testfloat/source/testLoops_common.c
new file mode 100644
index 00000000..ea6a53d3
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/testLoops_common.c
@@ -0,0 +1,47 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "testLoops.h"
+
+bool testLoops_forever = false;
+
+uint_fast8_t *testLoops_trueFlagsPtr;
+uint_fast8_t (*testLoops_subjFlagsFunction)( void );
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f128.c b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f128.c
new file mode 100644
index 00000000..d4540952
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f128.c
@@ -0,0 +1,107 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdio.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#if defined EXTFLOAT80 && defined FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_extF80_z_f128(
+ void trueFunction( const extFloat80_t *, float128_t * ),
+ void subjFunction( const extFloat80_t *, float128_t * )
+ )
+{
+ int count;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_extF80_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( &genCases_extF80_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && extF80M_isSignalingNaN( &genCases_extF80_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f16.c b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f16.c
new file mode 100644
index 00000000..a1e4f8c1
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f16.c
@@ -0,0 +1,107 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdio.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#if defined FLOAT16 && defined EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_extF80_z_f16(
+ float16_t trueFunction( const extFloat80_t * ),
+ float16_t subjFunction( const extFloat80_t * )
+ )
+{
+ int count;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_extF80_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && extF80M_isSignalingNaN( &genCases_extF80_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, " " );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f32.c b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f32.c
new file mode 100644
index 00000000..ff0e31a5
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f32.c
@@ -0,0 +1,107 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdio.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_extF80_z_f32(
+ float32_t trueFunction( const extFloat80_t * ),
+ float32_t subjFunction( const extFloat80_t * )
+ )
+{
+ int count;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_extF80_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && extF80M_isSignalingNaN( &genCases_extF80_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, " " );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f64.c b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f64.c
new file mode 100644
index 00000000..b105228c
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f64.c
@@ -0,0 +1,107 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdio.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#if defined FLOAT64 && defined EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_extF80_z_f64(
+ float64_t trueFunction( const extFloat80_t * ),
+ float64_t subjFunction( const extFloat80_t * )
+ )
+{
+ int count;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_extF80_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && extF80M_isSignalingNaN( &genCases_extF80_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, "\n\t" );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i32_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i32_rx.c
new file mode 100644
index 00000000..fa9fe98d
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i32_rx.c
@@ -0,0 +1,105 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_extF80_z_i32_rx(
+ int_fast32_t trueFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ int_fast32_t subjFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_extF80_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! extF80M_isNaN( &genCases_extF80_a )
+ || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, " " );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i32_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i32_x.c
new file mode 100644
index 00000000..b3dc9c94
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i32_x.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_extF80_z_i32_x(
+ int_fast32_t trueFunction( const extFloat80_t *, bool ),
+ int_fast32_t subjFunction( const extFloat80_t *, bool ),
+ bool exact
+ )
+{
+ int count;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_extF80_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! extF80M_isNaN( &genCases_extF80_a )
+ || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, " " );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i64_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i64_rx.c
new file mode 100644
index 00000000..0d711594
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i64_rx.c
@@ -0,0 +1,106 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_extF80_z_i64_rx(
+ int_fast64_t trueFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ int_fast64_t subjFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_extF80_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! extF80M_isNaN( &genCases_extF80_a )
+ || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, "\n\t" );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i64_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i64_x.c
new file mode 100644
index 00000000..bfa9a6a5
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i64_x.c
@@ -0,0 +1,105 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_extF80_z_i64_x(
+ int_fast64_t trueFunction( const extFloat80_t *, bool ),
+ int_fast64_t subjFunction( const extFloat80_t *, bool ),
+ bool exact
+ )
+{
+ int count;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_extF80_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! extF80M_isNaN( &genCases_extF80_a )
+ || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, "\n\t" );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui32_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui32_rx.c
new file mode 100644
index 00000000..9fa9cff5
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui32_rx.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_extF80_z_ui32_rx(
+ uint_fast32_t trueFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast32_t subjFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_extF80_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, " " );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui32_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui32_x.c
new file mode 100644
index 00000000..df7d8200
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui32_x.c
@@ -0,0 +1,102 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_extF80_z_ui32_x(
+ uint_fast32_t trueFunction( const extFloat80_t *, bool ),
+ uint_fast32_t subjFunction( const extFloat80_t *, bool ),
+ bool exact
+ )
+{
+ int count;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_extF80_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, " " );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui64_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui64_rx.c
new file mode 100644
index 00000000..3a768d7a
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui64_rx.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_extF80_z_ui64_rx(
+ uint_fast64_t trueFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast64_t subjFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_extF80_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, "\n\t" );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui64_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui64_x.c
new file mode 100644
index 00000000..48c59655
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui64_x.c
@@ -0,0 +1,102 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_extF80_z_ui64_x(
+ uint_fast64_t trueFunction( const extFloat80_t *, bool ),
+ uint_fast64_t subjFunction( const extFloat80_t *, bool ),
+ bool exact
+ )
+{
+ int count;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_extF80_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, "\n\t" );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_extF80.c b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_extF80.c
new file mode 100644
index 00000000..ec7dfbbf
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_extF80.c
@@ -0,0 +1,107 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#if defined EXTFLOAT80 && defined FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f128_z_extF80(
+ void trueFunction( const float128_t *, extFloat80_t * ),
+ void subjFunction( const float128_t *, extFloat80_t * )
+ )
+{
+ int count;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_f128_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( &genCases_f128_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && f128M_isSignalingNaN( &genCases_f128_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_f16.c b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_f16.c
new file mode 100644
index 00000000..12540780
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_f16.c
@@ -0,0 +1,107 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#if defined FLOAT16 && defined FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f128_z_f16(
+ float16_t trueFunction( const float128_t * ),
+ float16_t subjFunction( const float128_t * )
+ )
+{
+ int count;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_f128_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && f128M_isSignalingNaN( &genCases_f128_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, " " );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_f32.c b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_f32.c
new file mode 100644
index 00000000..24cae7da
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_f32.c
@@ -0,0 +1,107 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f128_z_f32(
+ float32_t trueFunction( const float128_t * ),
+ float32_t subjFunction( const float128_t * )
+ )
+{
+ int count;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_f128_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && f128M_isSignalingNaN( &genCases_f128_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, "\n\t" );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_f64.c b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_f64.c
new file mode 100644
index 00000000..bcd91bcd
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_f64.c
@@ -0,0 +1,107 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#if defined FLOAT64 && defined FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f128_z_f64(
+ float64_t trueFunction( const float128_t * ),
+ float64_t subjFunction( const float128_t * )
+ )
+{
+ int count;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_f128_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && f128M_isSignalingNaN( &genCases_f128_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, "\n\t" );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i32_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i32_rx.c
new file mode 100644
index 00000000..90848337
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i32_rx.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f128_z_i32_rx(
+ int_fast32_t trueFunction( const float128_t *, uint_fast8_t, bool ),
+ int_fast32_t subjFunction( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_f128_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! f128M_isNaN( &genCases_f128_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, " " );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i32_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i32_x.c
new file mode 100644
index 00000000..52951765
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i32_x.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f128_z_i32_x(
+ int_fast32_t trueFunction( const float128_t *, bool ),
+ int_fast32_t subjFunction( const float128_t *, bool ),
+ bool exact
+ )
+{
+ int count;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_f128_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! f128M_isNaN( &genCases_f128_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, " " );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i64_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i64_rx.c
new file mode 100644
index 00000000..e7da2f02
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i64_rx.c
@@ -0,0 +1,105 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f128_z_i64_rx(
+ int_fast64_t trueFunction( const float128_t *, uint_fast8_t, bool ),
+ int_fast64_t subjFunction( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_f128_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! f128M_isNaN( &genCases_f128_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, "\n\t" );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i64_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i64_x.c
new file mode 100644
index 00000000..0597367b
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i64_x.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f128_z_i64_x(
+ int_fast64_t trueFunction( const float128_t *, bool ),
+ int_fast64_t subjFunction( const float128_t *, bool ),
+ bool exact
+ )
+{
+ int count;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_f128_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! f128M_isNaN( &genCases_f128_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, "\n\t" );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui32_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui32_rx.c
new file mode 100644
index 00000000..31ede56f
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui32_rx.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f128_z_ui32_rx(
+ uint_fast32_t trueFunction( const float128_t *, uint_fast8_t, bool ),
+ uint_fast32_t subjFunction( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_f128_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, " " );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui32_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui32_x.c
new file mode 100644
index 00000000..b5623e13
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui32_x.c
@@ -0,0 +1,102 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f128_z_ui32_x(
+ uint_fast32_t trueFunction( const float128_t *, bool ),
+ uint_fast32_t subjFunction( const float128_t *, bool ),
+ bool exact
+ )
+{
+ int count;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_f128_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, " " );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui64_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui64_rx.c
new file mode 100644
index 00000000..cd58c923
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui64_rx.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f128_z_ui64_rx(
+ uint_fast64_t trueFunction( const float128_t *, uint_fast8_t, bool ),
+ uint_fast64_t subjFunction( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_f128_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, "\n\t" );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui64_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui64_x.c
new file mode 100644
index 00000000..9e103f82
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui64_x.c
@@ -0,0 +1,102 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f128_z_ui64_x(
+ uint_fast64_t trueFunction( const float128_t *, bool ),
+ uint_fast64_t subjFunction( const float128_t *, bool ),
+ bool exact
+ )
+{
+ int count;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_f128_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, "\n\t" );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_extF80.c b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_extF80.c
new file mode 100644
index 00000000..dc442af6
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_extF80.c
@@ -0,0 +1,106 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#if defined FLOAT16 && defined EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f16_z_extF80(
+ void trueFunction( float16_t, extFloat80_t * ),
+ void subjFunction( float16_t, extFloat80_t * )
+ )
+{
+ int count;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_f16_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_f16_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f16_isSignalingNaN( genCases_f16_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_f128.c b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_f128.c
new file mode 100644
index 00000000..49c1fe71
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_f128.c
@@ -0,0 +1,106 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#if defined FLOAT16 && defined FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f16_z_f128(
+ void trueFunction( float16_t, float128_t * ),
+ void subjFunction( float16_t, float128_t * )
+ )
+{
+ int count;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_f16_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_f16_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f16_isSignalingNaN( genCases_f16_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_f32.c b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_f32.c
new file mode 100644
index 00000000..097e9cc0
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_f32.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f16_z_f32(
+ float32_t trueFunction( float16_t ), float32_t subjFunction( float16_t ) )
+{
+ int count;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f16_isSignalingNaN( genCases_f16_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_f64.c b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_f64.c
new file mode 100644
index 00000000..349cc69a
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_f64.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#if defined FLOAT16 && defined FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f16_z_f64(
+ float64_t trueFunction( float16_t ), float64_t subjFunction( float16_t ) )
+{
+ int count;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f16_isSignalingNaN( genCases_f16_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i32_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i32_rx.c
new file mode 100644
index 00000000..ecb5f69a
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i32_rx.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f16_z_i32_rx(
+ int_fast32_t trueFunction( float16_t, uint_fast8_t, bool ),
+ int_fast32_t subjFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! f16_isNaN( genCases_f16_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i32_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i32_x.c
new file mode 100644
index 00000000..373eaf29
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i32_x.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f16_z_i32_x(
+ int_fast32_t trueFunction( float16_t, bool ),
+ int_fast32_t subjFunction( float16_t, bool ),
+ bool exact
+ )
+{
+ int count;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! f16_isNaN( genCases_f16_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i64_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i64_rx.c
new file mode 100644
index 00000000..0ffdd63c
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i64_rx.c
@@ -0,0 +1,105 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f16_z_i64_rx(
+ int_fast64_t trueFunction( float16_t, uint_fast8_t, bool ),
+ int_fast64_t subjFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! f16_isNaN( genCases_f16_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i64_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i64_x.c
new file mode 100644
index 00000000..df73dd54
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i64_x.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f16_z_i64_x(
+ int_fast64_t trueFunction( float16_t, bool ),
+ int_fast64_t subjFunction( float16_t, bool ),
+ bool exact
+ )
+{
+ int count;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! f16_isNaN( genCases_f16_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui32_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui32_rx.c
new file mode 100644
index 00000000..434dd4cc
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui32_rx.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f16_z_ui32_rx(
+ uint_fast32_t trueFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast32_t subjFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui32_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui32_x.c
new file mode 100644
index 00000000..392c3bd5
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui32_x.c
@@ -0,0 +1,102 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f16_z_ui32_x(
+ uint_fast32_t trueFunction( float16_t, bool ),
+ uint_fast32_t subjFunction( float16_t, bool ),
+ bool exact
+ )
+{
+ int count;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui64_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui64_rx.c
new file mode 100644
index 00000000..8b47c95e
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui64_rx.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f16_z_ui64_rx(
+ uint_fast64_t trueFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast64_t subjFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui64_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui64_x.c
new file mode 100644
index 00000000..e13ab5e6
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui64_x.c
@@ -0,0 +1,102 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f16_z_ui64_x(
+ uint_fast64_t trueFunction( float16_t, bool ),
+ uint_fast64_t subjFunction( float16_t, bool ),
+ bool exact
+ )
+{
+ int count;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_extF80.c b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_extF80.c
new file mode 100644
index 00000000..f0473ff8
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_extF80.c
@@ -0,0 +1,106 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f32_z_extF80(
+ void trueFunction( float32_t, extFloat80_t * ),
+ void subjFunction( float32_t, extFloat80_t * )
+ )
+{
+ int count;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_f32_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_f32_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f32_isSignalingNaN( genCases_f32_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_f128.c b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_f128.c
new file mode 100644
index 00000000..956e292d
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_f128.c
@@ -0,0 +1,106 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f32_z_f128(
+ void trueFunction( float32_t, float128_t * ),
+ void subjFunction( float32_t, float128_t * )
+ )
+{
+ int count;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_f32_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_f32_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f32_isSignalingNaN( genCases_f32_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_f16.c b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_f16.c
new file mode 100644
index 00000000..3f9e4abe
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_f16.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f32_z_f16(
+ float16_t trueFunction( float32_t ), float16_t subjFunction( float32_t ) )
+{
+ int count;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f32_isSignalingNaN( genCases_f32_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_f64.c b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_f64.c
new file mode 100644
index 00000000..c1d8c4d5
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_f64.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f32_z_f64(
+ float64_t trueFunction( float32_t ), float64_t subjFunction( float32_t ) )
+{
+ int count;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f32_isSignalingNaN( genCases_f32_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i32_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i32_rx.c
new file mode 100644
index 00000000..12d2053d
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i32_rx.c
@@ -0,0 +1,100 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f32_z_i32_rx(
+ int_fast32_t trueFunction( float32_t, uint_fast8_t, bool ),
+ int_fast32_t subjFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! f32_isNaN( genCases_f32_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i32_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i32_x.c
new file mode 100644
index 00000000..df920aef
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i32_x.c
@@ -0,0 +1,99 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f32_z_i32_x(
+ int_fast32_t trueFunction( float32_t, bool ),
+ int_fast32_t subjFunction( float32_t, bool ),
+ bool exact
+ )
+{
+ int count;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! f32_isNaN( genCases_f32_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i64_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i64_rx.c
new file mode 100644
index 00000000..44efc79e
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i64_rx.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f32_z_i64_rx(
+ int_fast64_t trueFunction( float32_t, uint_fast8_t, bool ),
+ int_fast64_t subjFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! f32_isNaN( genCases_f32_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i64_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i64_x.c
new file mode 100644
index 00000000..a8dc17af
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i64_x.c
@@ -0,0 +1,100 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f32_z_i64_x(
+ int_fast64_t trueFunction( float32_t, bool ),
+ int_fast64_t subjFunction( float32_t, bool ),
+ bool exact
+ )
+{
+ int count;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! f32_isNaN( genCases_f32_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui32_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui32_rx.c
new file mode 100644
index 00000000..62f865c6
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui32_rx.c
@@ -0,0 +1,99 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f32_z_ui32_rx(
+ uint_fast32_t trueFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast32_t subjFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui32_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui32_x.c
new file mode 100644
index 00000000..91589c4c
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui32_x.c
@@ -0,0 +1,98 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f32_z_ui32_x(
+ uint_fast32_t trueFunction( float32_t, bool ),
+ uint_fast32_t subjFunction( float32_t, bool ),
+ bool exact
+ )
+{
+ int count;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui64_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui64_rx.c
new file mode 100644
index 00000000..021102db
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui64_rx.c
@@ -0,0 +1,99 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f32_z_ui64_rx(
+ uint_fast64_t trueFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast64_t subjFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui64_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui64_x.c
new file mode 100644
index 00000000..2287ccb9
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui64_x.c
@@ -0,0 +1,98 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f32_z_ui64_x(
+ uint_fast64_t trueFunction( float32_t, bool ),
+ uint_fast64_t subjFunction( float32_t, bool ),
+ bool exact
+ )
+{
+ int count;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_extF80.c b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_extF80.c
new file mode 100644
index 00000000..ce18476d
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_extF80.c
@@ -0,0 +1,106 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#if defined FLOAT64 && defined EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f64_z_extF80(
+ void trueFunction( float64_t, extFloat80_t * ),
+ void subjFunction( float64_t, extFloat80_t * )
+ )
+{
+ int count;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_f64_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_f64_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f64_isSignalingNaN( genCases_f64_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_f128.c b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_f128.c
new file mode 100644
index 00000000..3f36e9e8
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_f128.c
@@ -0,0 +1,106 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#if defined FLOAT64 && defined FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f64_z_f128(
+ void trueFunction( float64_t, float128_t * ),
+ void subjFunction( float64_t, float128_t * )
+ )
+{
+ int count;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_f64_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_f64_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f64_isSignalingNaN( genCases_f64_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_f16.c b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_f16.c
new file mode 100644
index 00000000..63f6c15c
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_f16.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#if defined FLOAT16 && defined FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f64_z_f16(
+ float16_t trueFunction( float64_t ), float16_t subjFunction( float64_t ) )
+{
+ int count;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f64_isSignalingNaN( genCases_f64_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, " " );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_f32.c b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_f32.c
new file mode 100644
index 00000000..8fdad441
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_f32.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f64_z_f32(
+ float32_t trueFunction( float64_t ), float32_t subjFunction( float64_t ) )
+{
+ int count;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f64_isSignalingNaN( genCases_f64_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, " " );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i32_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i32_rx.c
new file mode 100644
index 00000000..bd20ad9e
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i32_rx.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f64_z_i32_rx(
+ int_fast32_t trueFunction( float64_t, uint_fast8_t, bool ),
+ int_fast32_t subjFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! f64_isNaN( genCases_f64_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, " " );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i32_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i32_x.c
new file mode 100644
index 00000000..cf1ab501
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i32_x.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f64_z_i32_x(
+ int_fast32_t trueFunction( float64_t, bool ),
+ int_fast32_t subjFunction( float64_t, bool ),
+ bool exact
+ )
+{
+ int count;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! f64_isNaN( genCases_f64_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, " " );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i64_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i64_rx.c
new file mode 100644
index 00000000..93dc6a03
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i64_rx.c
@@ -0,0 +1,105 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f64_z_i64_rx(
+ int_fast64_t trueFunction( float64_t, uint_fast8_t, bool ),
+ int_fast64_t subjFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! f64_isNaN( genCases_f64_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, " " );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i64_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i64_x.c
new file mode 100644
index 00000000..6b1eadef
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i64_x.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f64_z_i64_x(
+ int_fast64_t trueFunction( float64_t, bool ),
+ int_fast64_t subjFunction( float64_t, bool ),
+ bool exact
+ )
+{
+ int count;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! f64_isNaN( genCases_f64_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, " " );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui32_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui32_rx.c
new file mode 100644
index 00000000..a7974677
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui32_rx.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f64_z_ui32_rx(
+ uint_fast32_t trueFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast32_t subjFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, " " );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui32_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui32_x.c
new file mode 100644
index 00000000..40a6ee17
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui32_x.c
@@ -0,0 +1,102 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f64_z_ui32_x(
+ uint_fast32_t trueFunction( float64_t, bool ),
+ uint_fast32_t subjFunction( float64_t, bool ),
+ bool exact
+ )
+{
+ int count;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, " " );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui64_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui64_rx.c
new file mode 100644
index 00000000..83068dd3
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui64_rx.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f64_z_ui64_rx(
+ uint_fast64_t trueFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast64_t subjFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, " " );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui64_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui64_x.c
new file mode 100644
index 00000000..38e7d55b
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui64_x.c
@@ -0,0 +1,102 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f64_z_ui64_x(
+ uint_fast64_t trueFunction( float64_t, bool ),
+ uint_fast64_t subjFunction( float64_t, bool ),
+ bool exact
+ )
+{
+ int count;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, " " );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_extF80.c b/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_extF80.c
new file mode 100644
index 00000000..506f9e66
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_extF80.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_i32_z_extF80(
+ void trueFunction( int32_t, extFloat80_t * ),
+ void subjFunction( int32_t, extFloat80_t * )
+ )
+{
+ int count;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_i32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_i32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_i32_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_i32_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i32( genCases_i32_a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f128.c b/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f128.c
new file mode 100644
index 00000000..40e2f01a
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f128.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_i32_z_f128(
+ void trueFunction( int32_t, float128_t * ),
+ void subjFunction( int32_t, float128_t * )
+ )
+{
+ int count;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_i32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_i32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_i32_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_i32_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i32( genCases_i32_a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f16.c b/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f16.c
new file mode 100644
index 00000000..7c85d53c
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f16.c
@@ -0,0 +1,99 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_i32_z_f16(
+ float16_t trueFunction( int32_t ), float16_t subjFunction( int32_t ) )
+{
+ int count;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_i32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_i32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_i32_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_i32_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i32( genCases_i32_a, " " );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f32.c b/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f32.c
new file mode 100644
index 00000000..fa2f8651
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f32.c
@@ -0,0 +1,95 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_i32_z_f32(
+ float32_t trueFunction( int32_t ), float32_t subjFunction( int32_t ) )
+{
+ int count;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_i32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_i32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_i32_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_i32_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i32( genCases_i32_a, " " );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f64.c b/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f64.c
new file mode 100644
index 00000000..0dbad0be
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f64.c
@@ -0,0 +1,99 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_i32_z_f64(
+ float64_t trueFunction( int32_t ), float64_t subjFunction( int32_t ) )
+{
+ int count;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_i32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_i32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_i32_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_i32_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i32( genCases_i32_a, " " );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_extF80.c b/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_extF80.c
new file mode 100644
index 00000000..d8dc8d59
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_extF80.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_i64_z_extF80(
+ void trueFunction( int64_t, extFloat80_t * ),
+ void subjFunction( int64_t, extFloat80_t * )
+ )
+{
+ int count;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_i64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_i64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_i64_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_i64_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i64( genCases_i64_a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f128.c b/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f128.c
new file mode 100644
index 00000000..f44f520c
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f128.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_i64_z_f128(
+ void trueFunction( int64_t, float128_t * ),
+ void subjFunction( int64_t, float128_t * )
+ )
+{
+ int count;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_i64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_i64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_i64_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_i64_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i64( genCases_i64_a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f16.c b/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f16.c
new file mode 100644
index 00000000..53551b37
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f16.c
@@ -0,0 +1,99 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_i64_z_f16(
+ float16_t trueFunction( int64_t ), float16_t subjFunction( int64_t ) )
+{
+ int count;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_i64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_i64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_i64_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_i64_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i64( genCases_i64_a, " " );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f32.c b/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f32.c
new file mode 100644
index 00000000..19695c89
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f32.c
@@ -0,0 +1,95 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_i64_z_f32(
+ float32_t trueFunction( int64_t ), float32_t subjFunction( int64_t ) )
+{
+ int count;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_i64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_i64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_i64_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_i64_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i64( genCases_i64_a, " " );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f64.c b/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f64.c
new file mode 100644
index 00000000..24c96c6a
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f64.c
@@ -0,0 +1,99 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_i64_z_f64(
+ float64_t trueFunction( int64_t ), float64_t subjFunction( int64_t ) )
+{
+ int count;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_i64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_i64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_i64_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_i64_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i64( genCases_i64_a, "\n\t" );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_extF80.c b/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_extF80.c
new file mode 100644
index 00000000..bdcb2bfe
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_extF80.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_ui32_z_extF80(
+ void trueFunction( uint32_t, extFloat80_t * ),
+ void subjFunction( uint32_t, extFloat80_t * )
+ )
+{
+ int count;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_ui32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_ui32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_ui32_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_ui32_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui32( genCases_ui32_a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f128.c b/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f128.c
new file mode 100644
index 00000000..534cd9ae
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f128.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_ui32_z_f128(
+ void trueFunction( uint32_t, float128_t * ),
+ void subjFunction( uint32_t, float128_t * )
+ )
+{
+ int count;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_ui32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_ui32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_ui32_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_ui32_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui32( genCases_ui32_a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f16.c b/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f16.c
new file mode 100644
index 00000000..6a4cc0e4
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f16.c
@@ -0,0 +1,99 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_ui32_z_f16(
+ float16_t trueFunction( uint32_t ), float16_t subjFunction( uint32_t ) )
+{
+ int count;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_ui32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_ui32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_ui32_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_ui32_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui32( genCases_ui32_a, " " );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f32.c b/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f32.c
new file mode 100644
index 00000000..fde88485
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f32.c
@@ -0,0 +1,95 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_ui32_z_f32(
+ float32_t trueFunction( uint32_t ), float32_t subjFunction( uint32_t ) )
+{
+ int count;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_ui32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_ui32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_ui32_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_ui32_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui32( genCases_ui32_a, " " );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f64.c b/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f64.c
new file mode 100644
index 00000000..b3f9d882
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f64.c
@@ -0,0 +1,99 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_ui32_z_f64(
+ float64_t trueFunction( uint32_t ), float64_t subjFunction( uint32_t ) )
+{
+ int count;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_ui32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_ui32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_ui32_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_ui32_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui32( genCases_ui32_a, " " );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_extF80.c b/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_extF80.c
new file mode 100644
index 00000000..325d500c
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_extF80.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_ui64_z_extF80(
+ void trueFunction( uint64_t, extFloat80_t * ),
+ void subjFunction( uint64_t, extFloat80_t * )
+ )
+{
+ int count;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_ui64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_ui64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_ui64_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_ui64_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui64( genCases_ui64_a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f128.c b/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f128.c
new file mode 100644
index 00000000..2a57c057
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f128.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_ui64_z_f128(
+ void trueFunction( uint64_t, float128_t * ),
+ void subjFunction( uint64_t, float128_t * )
+ )
+{
+ int count;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_ui64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_ui64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_ui64_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_ui64_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui64( genCases_ui64_a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f16.c b/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f16.c
new file mode 100644
index 00000000..ce54c8ff
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f16.c
@@ -0,0 +1,99 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_ui64_z_f16(
+ float16_t trueFunction( uint64_t ), float16_t subjFunction( uint64_t ) )
+{
+ int count;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_ui64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_ui64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_ui64_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_ui64_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui64( genCases_ui64_a, " " );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f32.c b/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f32.c
new file mode 100644
index 00000000..4a6dda3c
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f32.c
@@ -0,0 +1,95 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_ui64_z_f32(
+ float32_t trueFunction( uint64_t ), float32_t subjFunction( uint64_t ) )
+{
+ int count;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_ui64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_ui64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_ui64_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_ui64_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui64( genCases_ui64_a, " " );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f64.c b/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f64.c
new file mode 100644
index 00000000..9fc9cd17
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f64.c
@@ -0,0 +1,99 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_ui64_z_f64(
+ float64_t trueFunction( uint64_t ), float64_t subjFunction( uint64_t ) )
+{
+ int count;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_ui64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_ui64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_ui64_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_ui64_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui64( genCases_ui64_a, "\n\t" );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_ab_extF80_z_bool.c b/src/libs/softfloat-3e/testfloat/source/test_ab_extF80_z_bool.c
new file mode 100644
index 00000000..1a830bcc
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_ab_extF80_z_bool.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_ab_extF80_z_bool(
+ bool trueFunction( const extFloat80_t *, const extFloat80_t * ),
+ bool subjFunction( const extFloat80_t *, const extFloat80_t * )
+ )
+{
+ int count;
+ bool trueZ;
+ uint_fast8_t trueFlags;
+ bool subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_ab_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_ab_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, &genCases_extF80_b );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_extF80_a, &genCases_extF80_b );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (extF80M_isSignalingNaN( &genCases_extF80_a )
+ || extF80M_isSignalingNaN( &genCases_extF80_b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_extF80M(
+ &genCases_extF80_a, &genCases_extF80_b, " " );
+ writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_ab_f128_z_bool.c b/src/libs/softfloat-3e/testfloat/source/test_ab_f128_z_bool.c
new file mode 100644
index 00000000..b5ee911b
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_ab_f128_z_bool.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_ab_f128_z_bool(
+ bool trueFunction( const float128_t *, const float128_t * ),
+ bool subjFunction( const float128_t *, const float128_t * )
+ )
+{
+ int count;
+ bool trueZ;
+ uint_fast8_t trueFlags;
+ bool subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_ab_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_ab_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, &genCases_f128_b );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_f128_a, &genCases_f128_b );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f128M_isSignalingNaN( &genCases_f128_a )
+ || f128M_isSignalingNaN( &genCases_f128_b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_f128M( &genCases_f128_a, &genCases_f128_b );
+ writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_ab_f16_z_bool.c b/src/libs/softfloat-3e/testfloat/source/test_ab_f16_z_bool.c
new file mode 100644
index 00000000..02be4657
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_ab_f16_z_bool.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_ab_f16_z_bool(
+ bool trueFunction( float16_t, float16_t ),
+ bool subjFunction( float16_t, float16_t )
+ )
+{
+ int count;
+ bool trueZ;
+ uint_fast8_t trueFlags;
+ bool subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_ab_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_ab_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, genCases_f16_b );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a, genCases_f16_b );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f16_isSignalingNaN( genCases_f16_a )
+ || f16_isSignalingNaN( genCases_f16_b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_f16( genCases_f16_a, genCases_f16_b );
+ writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_ab_f32_z_bool.c b/src/libs/softfloat-3e/testfloat/source/test_ab_f32_z_bool.c
new file mode 100644
index 00000000..677892e6
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_ab_f32_z_bool.c
@@ -0,0 +1,99 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_ab_f32_z_bool(
+ bool trueFunction( float32_t, float32_t ),
+ bool subjFunction( float32_t, float32_t )
+ )
+{
+ int count;
+ bool trueZ;
+ uint_fast8_t trueFlags;
+ bool subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_ab_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_ab_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, genCases_f32_b );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a, genCases_f32_b );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f32_isSignalingNaN( genCases_f32_a )
+ || f32_isSignalingNaN( genCases_f32_b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_f32( genCases_f32_a, genCases_f32_b );
+ writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_ab_f64_z_bool.c b/src/libs/softfloat-3e/testfloat/source/test_ab_f64_z_bool.c
new file mode 100644
index 00000000..03b208d7
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_ab_f64_z_bool.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_ab_f64_z_bool(
+ bool trueFunction( float64_t, float64_t ),
+ bool subjFunction( float64_t, float64_t )
+ )
+{
+ int count;
+ bool trueZ;
+ uint_fast8_t trueFlags;
+ bool subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_ab_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_ab_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, genCases_f64_b );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a, genCases_f64_b );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f64_isSignalingNaN( genCases_f64_a )
+ || f64_isSignalingNaN( genCases_f64_b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_f64( genCases_f64_a, genCases_f64_b, " " );
+ writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_abcz_f128.c b/src/libs/softfloat-3e/testfloat/source/test_abcz_f128.c
new file mode 100644
index 00000000..8e624466
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_abcz_f128.c
@@ -0,0 +1,125 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_abcz_f128(
+ void
+ trueFunction(
+ const float128_t *,
+ const float128_t *,
+ const float128_t *,
+ float128_t *
+ ),
+ void
+ subjFunction(
+ const float128_t *,
+ const float128_t *,
+ const float128_t *,
+ float128_t *
+ )
+ )
+{
+ int count;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_abc_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_abc_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction(
+ &genCases_f128_a, &genCases_f128_b, &genCases_f128_c, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction(
+ &genCases_f128_a, &genCases_f128_b, &genCases_f128_c, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && ( f128M_isSignalingNaN( &genCases_f128_a )
+ || f128M_isSignalingNaN( &genCases_f128_b )
+ || f128M_isSignalingNaN( &genCases_f128_c )
+ )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_abc_f128M(
+ &genCases_f128_a, &genCases_f128_b, &genCases_f128_c );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_abcz_f16.c b/src/libs/softfloat-3e/testfloat/source/test_abcz_f16.c
new file mode 100644
index 00000000..7e455c73
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_abcz_f16.c
@@ -0,0 +1,111 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_abcz_f16(
+ float16_t trueFunction( float16_t, float16_t, float16_t ),
+ float16_t subjFunction( float16_t, float16_t, float16_t )
+ )
+{
+ int count;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_abc_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_abc_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, genCases_f16_b, genCases_f16_c );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a, genCases_f16_b, genCases_f16_c );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && ( f16_isSignalingNaN( genCases_f16_a )
+ || f16_isSignalingNaN( genCases_f16_b )
+ || f16_isSignalingNaN( genCases_f16_c )
+ )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_abc_f16(
+ genCases_f16_a, genCases_f16_b, genCases_f16_c );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_abcz_f32.c b/src/libs/softfloat-3e/testfloat/source/test_abcz_f32.c
new file mode 100644
index 00000000..c7b06c43
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_abcz_f32.c
@@ -0,0 +1,107 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_abcz_f32(
+ float32_t trueFunction( float32_t, float32_t, float32_t ),
+ float32_t subjFunction( float32_t, float32_t, float32_t )
+ )
+{
+ int count;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_abc_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_abc_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, genCases_f32_b, genCases_f32_c );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a, genCases_f32_b, genCases_f32_c );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && ( f32_isSignalingNaN( genCases_f32_a )
+ || f32_isSignalingNaN( genCases_f32_b )
+ || f32_isSignalingNaN( genCases_f32_c )
+ )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_abc_f32(
+ genCases_f32_a, genCases_f32_b, genCases_f32_c );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_abcz_f64.c b/src/libs/softfloat-3e/testfloat/source/test_abcz_f64.c
new file mode 100644
index 00000000..c15f0429
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_abcz_f64.c
@@ -0,0 +1,111 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_abcz_f64(
+ float64_t trueFunction( float64_t, float64_t, float64_t ),
+ float64_t subjFunction( float64_t, float64_t, float64_t )
+ )
+{
+ int count;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_abc_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_abc_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, genCases_f64_b, genCases_f64_c );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a, genCases_f64_b, genCases_f64_c );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && ( f64_isSignalingNaN( genCases_f64_a )
+ || f64_isSignalingNaN( genCases_f64_b )
+ || f64_isSignalingNaN( genCases_f64_c )
+ )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_abc_f64(
+ genCases_f64_a, genCases_f64_b, genCases_f64_c );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_abz_extF80.c b/src/libs/softfloat-3e/testfloat/source/test_abz_extF80.c
new file mode 100644
index 00000000..041e8b7b
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_abz_extF80.c
@@ -0,0 +1,113 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_abz_extF80(
+ void
+ trueFunction(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * ),
+ void
+ subjFunction(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * )
+ )
+{
+ int count;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_ab_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_ab_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_extF80_a, &genCases_extF80_b, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( &genCases_extF80_a, &genCases_extF80_b, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (extF80M_isSignalingNaN( &genCases_extF80_a )
+ || extF80M_isSignalingNaN( &genCases_extF80_b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_extF80M(
+ &genCases_extF80_a, &genCases_extF80_b, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_abz_f128.c b/src/libs/softfloat-3e/testfloat/source/test_abz_f128.c
new file mode 100644
index 00000000..44f4d79b
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_abz_f128.c
@@ -0,0 +1,108 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_abz_f128(
+ void trueFunction( const float128_t *, const float128_t *, float128_t * ),
+ void subjFunction( const float128_t *, const float128_t *, float128_t * )
+ )
+{
+ int count;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_ab_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_ab_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_f128_a, &genCases_f128_b, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( &genCases_f128_a, &genCases_f128_b, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f128M_isSignalingNaN( &genCases_f128_a )
+ || f128M_isSignalingNaN( &genCases_f128_b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_f128M( &genCases_f128_a, &genCases_f128_b );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_abz_f16.c b/src/libs/softfloat-3e/testfloat/source/test_abz_f16.c
new file mode 100644
index 00000000..40cd2465
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_abz_f16.c
@@ -0,0 +1,108 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_abz_f16(
+ float16_t trueFunction( float16_t, float16_t ),
+ float16_t subjFunction( float16_t, float16_t )
+ )
+{
+ int count;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_ab_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_ab_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, genCases_f16_b );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a, genCases_f16_b );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f16_isSignalingNaN( genCases_f16_a )
+ || f16_isSignalingNaN( genCases_f16_b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_f16( genCases_f16_a, genCases_f16_b );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_abz_f32.c b/src/libs/softfloat-3e/testfloat/source/test_abz_f32.c
new file mode 100644
index 00000000..f31da82b
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_abz_f32.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_abz_f32(
+ float32_t trueFunction( float32_t, float32_t ),
+ float32_t subjFunction( float32_t, float32_t )
+ )
+{
+ int count;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_ab_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_ab_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, genCases_f32_b );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a, genCases_f32_b );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f32_isSignalingNaN( genCases_f32_a )
+ || f32_isSignalingNaN( genCases_f32_b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_f32( genCases_f32_a, genCases_f32_b );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_abz_f64.c b/src/libs/softfloat-3e/testfloat/source/test_abz_f64.c
new file mode 100644
index 00000000..caded698
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_abz_f64.c
@@ -0,0 +1,108 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_abz_f64(
+ float64_t trueFunction( float64_t, float64_t ),
+ float64_t subjFunction( float64_t, float64_t )
+ )
+{
+ int count;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_ab_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_ab_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, genCases_f64_b );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a, genCases_f64_b );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f64_isSignalingNaN( genCases_f64_a )
+ || f64_isSignalingNaN( genCases_f64_b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_f64( genCases_f64_a, genCases_f64_b, "\n\t" );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_az_extF80.c b/src/libs/softfloat-3e/testfloat/source/test_az_extF80.c
new file mode 100644
index 00000000..c9e3ed12
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_az_extF80.c
@@ -0,0 +1,107 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_az_extF80(
+ void trueFunction( const extFloat80_t *, extFloat80_t * ),
+ void subjFunction( const extFloat80_t *, extFloat80_t * )
+ )
+{
+ int count;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_extF80_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( &genCases_extF80_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && extF80M_isSignalingNaN( &genCases_extF80_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_az_extF80_rx.c b/src/libs/softfloat-3e/testfloat/source/test_az_extF80_rx.c
new file mode 100644
index 00000000..dd251111
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_az_extF80_rx.c
@@ -0,0 +1,112 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_az_extF80_rx(
+ void
+ trueFunction( const extFloat80_t *, uint_fast8_t, bool, extFloat80_t * ),
+ void
+ subjFunction( const extFloat80_t *, uint_fast8_t, bool, extFloat80_t * ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_extF80_a, roundingMode, exact, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( &genCases_extF80_a, roundingMode, exact, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && extF80M_isSignalingNaN( &genCases_extF80_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_az_f128.c b/src/libs/softfloat-3e/testfloat/source/test_az_f128.c
new file mode 100644
index 00000000..fe4358cd
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_az_f128.c
@@ -0,0 +1,107 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_az_f128(
+ void trueFunction( const float128_t *, float128_t * ),
+ void subjFunction( const float128_t *, float128_t * )
+ )
+{
+ int count;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_f128_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( &genCases_f128_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && f128M_isSignalingNaN( &genCases_f128_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_az_f128_rx.c b/src/libs/softfloat-3e/testfloat/source/test_az_f128_rx.c
new file mode 100644
index 00000000..53583fae
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_az_f128_rx.c
@@ -0,0 +1,110 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_az_f128_rx(
+ void trueFunction( const float128_t *, uint_fast8_t, bool, float128_t * ),
+ void subjFunction( const float128_t *, uint_fast8_t, bool, float128_t * ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_f128_a, roundingMode, exact, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( &genCases_f128_a, roundingMode, exact, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && f128M_isSignalingNaN( &genCases_f128_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_az_f16.c b/src/libs/softfloat-3e/testfloat/source/test_az_f16.c
new file mode 100644
index 00000000..a3c2b9a4
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_az_f16.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_az_f16(
+ float16_t trueFunction( float16_t ), float16_t subjFunction( float16_t ) )
+{
+ int count;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f16_isSignalingNaN( genCases_f16_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_az_f16_rx.c b/src/libs/softfloat-3e/testfloat/source/test_az_f16_rx.c
new file mode 100644
index 00000000..2d1dd1ef
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_az_f16_rx.c
@@ -0,0 +1,109 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_az_f16_rx(
+ float16_t trueFunction( float16_t, uint_fast8_t, bool ),
+ float16_t subjFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f16_isSignalingNaN( genCases_f16_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_az_f32.c b/src/libs/softfloat-3e/testfloat/source/test_az_f32.c
new file mode 100644
index 00000000..46d62e37
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_az_f32.c
@@ -0,0 +1,100 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_az_f32(
+ float32_t trueFunction( float32_t ), float32_t subjFunction( float32_t ) )
+{
+ int count;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f32_isSignalingNaN( genCases_f32_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_az_f32_rx.c b/src/libs/softfloat-3e/testfloat/source/test_az_f32_rx.c
new file mode 100644
index 00000000..e3e9953f
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_az_f32_rx.c
@@ -0,0 +1,105 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_az_f32_rx(
+ float32_t trueFunction( float32_t, uint_fast8_t, bool ),
+ float32_t subjFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f32_isSignalingNaN( genCases_f32_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_az_f64.c b/src/libs/softfloat-3e/testfloat/source/test_az_f64.c
new file mode 100644
index 00000000..01f6760e
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_az_f64.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_az_f64(
+ float64_t trueFunction( float64_t ), float64_t subjFunction( float64_t ) )
+{
+ int count;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f64_isSignalingNaN( genCases_f64_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, "\n\t" );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_az_f64_rx.c b/src/libs/softfloat-3e/testfloat/source/test_az_f64_rx.c
new file mode 100644
index 00000000..d0c66447
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_az_f64_rx.c
@@ -0,0 +1,109 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_az_f64_rx(
+ float64_t trueFunction( float64_t, uint_fast8_t, bool ),
+ float64_t subjFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f64_isSignalingNaN( genCases_f64_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, "\n\t" );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/testfloat.c b/src/libs/softfloat-3e/testfloat/source/testfloat.c
new file mode 100644
index 00000000..743e37ab
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/testfloat.c
@@ -0,0 +1,1715 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <signal.h>
+#include "platform.h"
+#include "fail.h"
+#include "softfloat.h"
+#include "subjfloat_config.h"
+#include "subjfloat.h"
+#include "functions.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "testLoops.h"
+
+static void catchSIGINT( int signalCode )
+{
+
+ if ( verCases_stop ) exit( EXIT_FAILURE );
+ verCases_stop = true;
+
+}
+
+static void (*subjFunctionPtr)();
+
+#ifdef FLOAT16
+typedef float16_t funcType_a_ui32_z_f16( uint32_t );
+#endif
+typedef float32_t funcType_a_ui32_z_f32( uint32_t );
+#ifdef FLOAT64
+typedef float64_t funcType_a_ui32_z_f64( uint32_t );
+#endif
+#ifdef EXTFLOAT80
+typedef void funcType_a_ui32_z_extF80( uint32_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+typedef void funcType_a_ui32_z_f128( uint32_t, float128_t * );
+#endif
+#ifdef FLOAT16
+typedef float16_t funcType_a_ui64_z_f16( uint64_t );
+#endif
+typedef float32_t funcType_a_ui64_z_f32( uint64_t );
+#ifdef FLOAT64
+typedef float64_t funcType_a_ui64_z_f64( uint64_t );
+#endif
+#ifdef EXTFLOAT80
+typedef void funcType_a_ui64_z_extF80( uint64_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+typedef void funcType_a_ui64_z_f128( uint64_t, float128_t * );
+#endif
+#ifdef FLOAT16
+typedef float16_t funcType_a_i32_z_f16( int32_t );
+#endif
+typedef float32_t funcType_a_i32_z_f32( int32_t );
+#ifdef FLOAT64
+typedef float64_t funcType_a_i32_z_f64( int32_t );
+#endif
+#ifdef EXTFLOAT80
+typedef void funcType_a_i32_z_extF80( int32_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+typedef void funcType_a_i32_z_f128( int32_t, float128_t * );
+#endif
+#ifdef FLOAT16
+typedef float16_t funcType_a_i64_z_f16( int64_t );
+#endif
+typedef float32_t funcType_a_i64_z_f32( int64_t );
+#ifdef FLOAT64
+typedef float64_t funcType_a_i64_z_f64( int64_t );
+#endif
+#ifdef EXTFLOAT80
+typedef void funcType_a_i64_z_extF80( int64_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+typedef void funcType_a_i64_z_f128( int64_t, float128_t * );
+#endif
+
+#ifdef FLOAT16
+typedef uint_fast32_t funcType_a_f16_z_ui32( float16_t );
+typedef uint_fast64_t funcType_a_f16_z_ui64( float16_t );
+typedef int_fast32_t funcType_a_f16_z_i32( float16_t );
+typedef int_fast64_t funcType_a_f16_z_i64( float16_t );
+typedef float32_t funcType_a_f16_z_f32( float16_t );
+#ifdef FLOAT64
+typedef float64_t funcType_a_f16_z_f64( float16_t );
+#endif
+#ifdef EXTFLOAT80
+typedef void funcType_a_f16_z_extF80( float16_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+typedef void funcType_a_f16_z_f128( float16_t, float128_t * );
+#endif
+typedef float16_t funcType_az_f16( float16_t );
+typedef float16_t funcType_abz_f16( float16_t, float16_t );
+typedef float16_t funcType_abcz_f16( float16_t, float16_t, float16_t );
+typedef bool funcType_ab_f16_z_bool( float16_t, float16_t );
+#endif
+
+typedef uint_fast32_t funcType_a_f32_z_ui32( float32_t );
+typedef uint_fast64_t funcType_a_f32_z_ui64( float32_t );
+typedef int_fast32_t funcType_a_f32_z_i32( float32_t );
+typedef int_fast64_t funcType_a_f32_z_i64( float32_t );
+#ifdef FLOAT16
+typedef float16_t funcType_a_f32_z_f16( float32_t );
+#endif
+#ifdef FLOAT64
+typedef float64_t funcType_a_f32_z_f64( float32_t );
+#endif
+#ifdef EXTFLOAT80
+typedef void funcType_a_f32_z_extF80( float32_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+typedef void funcType_a_f32_z_f128( float32_t, float128_t * );
+#endif
+typedef float32_t funcType_az_f32( float32_t );
+typedef float32_t funcType_abz_f32( float32_t, float32_t );
+typedef float32_t funcType_abcz_f32( float32_t, float32_t, float32_t );
+typedef bool funcType_ab_f32_z_bool( float32_t, float32_t );
+
+#ifdef FLOAT64
+typedef uint_fast32_t funcType_a_f64_z_ui32( float64_t );
+typedef uint_fast64_t funcType_a_f64_z_ui64( float64_t );
+typedef int_fast32_t funcType_a_f64_z_i32( float64_t );
+typedef int_fast64_t funcType_a_f64_z_i64( float64_t );
+#ifdef FLOAT16
+typedef float16_t funcType_a_f64_z_f16( float64_t );
+#endif
+typedef float32_t funcType_a_f64_z_f32( float64_t );
+#ifdef EXTFLOAT80
+typedef void funcType_a_f64_z_extF80( float64_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+typedef void funcType_a_f64_z_f128( float64_t, float128_t * );
+#endif
+typedef float64_t funcType_az_f64( float64_t );
+typedef float64_t funcType_abz_f64( float64_t, float64_t );
+typedef float64_t funcType_abcz_f64( float64_t, float64_t, float64_t );
+typedef bool funcType_ab_f64_z_bool( float64_t, float64_t );
+#endif
+
+#ifdef EXTFLOAT80
+typedef uint_fast32_t funcType_a_extF80_z_ui32( const extFloat80_t * );
+typedef uint_fast64_t funcType_a_extF80_z_ui64( const extFloat80_t * );
+typedef int_fast32_t funcType_a_extF80_z_i32( const extFloat80_t * );
+typedef int_fast64_t funcType_a_extF80_z_i64( const extFloat80_t * );
+#ifdef FLOAT16
+typedef float16_t funcType_a_extF80_z_f16( const extFloat80_t * );
+#endif
+typedef float32_t funcType_a_extF80_z_f32( const extFloat80_t * );
+#ifdef FLOAT64
+typedef float64_t funcType_a_extF80_z_f64( const extFloat80_t * );
+#endif
+#ifdef FLOAT128
+typedef void funcType_a_extF80_z_f128( const extFloat80_t *, float128_t * );
+#endif
+typedef void funcType_az_extF80( const extFloat80_t *, extFloat80_t * );
+typedef
+ void
+ funcType_abz_extF80(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+typedef
+ bool funcType_ab_extF80_z_bool( const extFloat80_t *, const extFloat80_t * );
+#endif
+
+#ifdef FLOAT128
+typedef uint_fast32_t funcType_a_f128_z_ui32( const float128_t * );
+typedef uint_fast64_t funcType_a_f128_z_ui64( const float128_t * );
+typedef int_fast32_t funcType_a_f128_z_i32( const float128_t * );
+typedef int_fast64_t funcType_a_f128_z_i64( const float128_t * );
+#ifdef FLOAT16
+typedef float16_t funcType_a_f128_z_f16( const float128_t * );
+#endif
+typedef float32_t funcType_a_f128_z_f32( const float128_t * );
+#ifdef FLOAT64
+typedef float64_t funcType_a_f128_z_f64( const float128_t * );
+#endif
+#ifdef EXTFLOAT80
+typedef void funcType_a_f128_z_extF80( const float128_t *, extFloat80_t * );
+#endif
+typedef void funcType_az_f128( const float128_t *, float128_t * );
+typedef
+ void
+ funcType_abz_f128( const float128_t *, const float128_t *, float128_t * );
+typedef
+ void
+ funcType_abcz_f128(
+ const float128_t *, const float128_t *, const float128_t *, float128_t *
+ );
+typedef bool funcType_ab_f128_z_bool( const float128_t *, const float128_t * );
+#endif
+
+#ifdef FLOAT16
+
+static
+uint_fast32_t
+ subjFunction_a_f16_z_ui32_rx(
+ float16_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f16_z_ui32 *) subjFunctionPtr)( a );
+
+}
+
+static
+uint_fast64_t
+ subjFunction_a_f16_z_ui64_rx(
+ float16_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f16_z_ui64 *) subjFunctionPtr)( a );
+
+}
+
+static
+int_fast32_t
+ subjFunction_a_f16_z_i32_rx(
+ float16_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f16_z_i32 *) subjFunctionPtr)( a );
+
+}
+
+static
+int_fast64_t
+ subjFunction_a_f16_z_i64_rx(
+ float16_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f16_z_i64 *) subjFunctionPtr)( a );
+
+}
+
+static
+float16_t
+ subjFunction_az_f16_rx( float16_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_az_f16 *) subjFunctionPtr)( a );
+
+}
+
+#endif
+
+static
+uint_fast32_t
+ subjFunction_a_f32_z_ui32_rx(
+ float32_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f32_z_ui32 *) subjFunctionPtr)( a );
+
+}
+
+static
+uint_fast64_t
+ subjFunction_a_f32_z_ui64_rx(
+ float32_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f32_z_ui64 *) subjFunctionPtr)( a );
+
+}
+
+static
+int_fast32_t
+ subjFunction_a_f32_z_i32_rx(
+ float32_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f32_z_i32 *) subjFunctionPtr)( a );
+
+}
+
+static
+int_fast64_t
+ subjFunction_a_f32_z_i64_rx(
+ float32_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f32_z_i64 *) subjFunctionPtr)( a );
+
+}
+
+static
+float32_t
+ subjFunction_az_f32_rx( float32_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_az_f32 *) subjFunctionPtr)( a );
+
+}
+
+#ifdef FLOAT64
+
+static
+uint_fast32_t
+ subjFunction_a_f64_z_ui32_rx(
+ float64_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f64_z_ui32 *) subjFunctionPtr)( a );
+
+}
+
+static
+uint_fast64_t
+ subjFunction_a_f64_z_ui64_rx(
+ float64_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f64_z_ui64 *) subjFunctionPtr)( a );
+
+}
+
+static
+int_fast32_t
+ subjFunction_a_f64_z_i32_rx(
+ float64_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f64_z_i32 *) subjFunctionPtr)( a );
+
+}
+
+static
+int_fast64_t
+ subjFunction_a_f64_z_i64_rx(
+ float64_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f64_z_i64 *) subjFunctionPtr)( a );
+
+}
+
+static
+float64_t
+ subjFunction_az_f64_rx( float64_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_az_f64 *) subjFunctionPtr)( a );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+static
+uint_fast32_t
+ subjFunction_a_extF80_z_ui32_rx(
+ const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_extF80_z_ui32 *) subjFunctionPtr)( aPtr );
+
+}
+
+static
+uint_fast64_t
+ subjFunction_a_extF80_z_ui64_rx(
+ const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_extF80_z_ui64 *) subjFunctionPtr)( aPtr );
+
+}
+
+static
+int_fast32_t
+ subjFunction_a_extF80_z_i32_rx(
+ const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_extF80_z_i32 *) subjFunctionPtr)( aPtr );
+
+}
+
+static
+int_fast64_t
+ subjFunction_a_extF80_z_i64_rx(
+ const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_extF80_z_i64 *) subjFunctionPtr)( aPtr );
+
+}
+
+static
+void
+ subjFunction_az_extF80_rx(
+ const extFloat80_t *aPtr,
+ uint_fast8_t roundingMode,
+ bool exact,
+ extFloat80_t *zPtr
+ )
+{
+
+ return ((funcType_az_extF80 *) subjFunctionPtr)( aPtr, zPtr );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+static
+uint_fast32_t
+ subjFunction_a_f128_z_ui32_rx(
+ const float128_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f128_z_ui32 *) subjFunctionPtr)( aPtr );
+
+}
+
+static
+uint_fast64_t
+ subjFunction_a_f128_z_ui64_rx(
+ const float128_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f128_z_ui64 *) subjFunctionPtr)( aPtr );
+
+}
+
+static
+int_fast32_t
+ subjFunction_a_f128_z_i32_rx(
+ const float128_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f128_z_i32 *) subjFunctionPtr)( aPtr );
+
+}
+
+static
+int_fast64_t
+ subjFunction_a_f128_z_i64_rx(
+ const float128_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f128_z_i64 *) subjFunctionPtr)( aPtr );
+
+}
+
+static
+void
+ subjFunction_az_f128_rx(
+ const float128_t *aPtr,
+ uint_fast8_t roundingMode,
+ bool exact,
+ float128_t *zPtr
+ )
+{
+
+ return ((funcType_az_f128 *) subjFunctionPtr)( aPtr, zPtr );
+
+}
+
+#endif
+
+static
+void
+ testFunctionInstance(
+ int functionCode, uint_fast8_t roundingMode, bool exact )
+{
+#ifdef FLOAT16
+ funcType_abz_f16 *trueFunction_abz_f16;
+ funcType_ab_f16_z_bool *trueFunction_ab_f16_z_bool;
+#endif
+ funcType_abz_f32 *trueFunction_abz_f32;
+ funcType_ab_f32_z_bool *trueFunction_ab_f32_z_bool;
+#ifdef FLOAT64
+ funcType_abz_f64 *trueFunction_abz_f64;
+ funcType_ab_f64_z_bool *trueFunction_ab_f64_z_bool;
+#endif
+#ifdef EXTFLOAT80
+ funcType_abz_extF80 *trueFunction_abz_extF80;
+ funcType_ab_extF80_z_bool *trueFunction_ab_extF80_z_bool;
+#endif
+#ifdef FLOAT128
+ funcType_abz_f128 *trueFunction_abz_f128;
+ funcType_ab_f128_z_bool *trueFunction_ab_f128_z_bool;
+#endif
+
+ fputs( "Testing ", stderr );
+ verCases_writeFunctionName( stderr );
+ fputs( ".\n", stderr );
+ switch ( functionCode ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef FLOAT16
+#ifdef SUBJ_UI32_TO_F16
+ case UI32_TO_F16:
+ test_a_ui32_z_f16(
+ ui32_to_f16, (funcType_a_ui32_z_f16 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef SUBJ_UI32_TO_F32
+ case UI32_TO_F32:
+ test_a_ui32_z_f32(
+ ui32_to_f32, (funcType_a_ui32_z_f32 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_UI32_TO_F64
+ case UI32_TO_F64:
+ test_a_ui32_z_f64(
+ ui32_to_f64, (funcType_a_ui32_z_f64 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_UI32_TO_EXTF80
+ case UI32_TO_EXTF80:
+ test_a_ui32_z_extF80(
+ ui32_to_extF80M, (funcType_a_ui32_z_extF80 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_UI32_TO_F128
+ case UI32_TO_F128:
+ test_a_ui32_z_f128(
+ ui32_to_f128M, (funcType_a_ui32_z_f128 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef FLOAT16
+#ifdef SUBJ_UI64_TO_F16
+ case UI64_TO_F16:
+ test_a_ui64_z_f16(
+ ui64_to_f16, (funcType_a_ui64_z_f16 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef SUBJ_UI64_TO_F32
+ case UI64_TO_F32:
+ test_a_ui64_z_f32(
+ ui64_to_f32, (funcType_a_ui64_z_f32 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_UI64_TO_F64
+ case UI64_TO_F64:
+ test_a_ui64_z_f64(
+ ui64_to_f64, (funcType_a_ui64_z_f64 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_UI64_TO_EXTF80
+ case UI64_TO_EXTF80:
+ test_a_ui64_z_extF80(
+ ui64_to_extF80M, (funcType_a_ui64_z_extF80 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_UI64_TO_F128
+ case UI64_TO_F128:
+ test_a_ui64_z_f128(
+ ui64_to_f128M, (funcType_a_ui64_z_f128 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef FLOAT16
+#ifdef SUBJ_I32_TO_F16
+ case I32_TO_F16:
+ test_a_i32_z_f16(
+ i32_to_f16, (funcType_a_i32_z_f16 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef SUBJ_I32_TO_F32
+ case I32_TO_F32:
+ test_a_i32_z_f32(
+ i32_to_f32, (funcType_a_i32_z_f32 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_I32_TO_F64
+ case I32_TO_F64:
+ test_a_i32_z_f64(
+ i32_to_f64, (funcType_a_i32_z_f64 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_I32_TO_EXTF80
+ case I32_TO_EXTF80:
+ test_a_i32_z_extF80(
+ i32_to_extF80M, (funcType_a_i32_z_extF80 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_I32_TO_F128
+ case I32_TO_F128:
+ test_a_i32_z_f128(
+ i32_to_f128M, (funcType_a_i32_z_f128 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef FLOAT16
+#ifdef SUBJ_I64_TO_F16
+ case I64_TO_F16:
+ test_a_i64_z_f16(
+ i64_to_f16, (funcType_a_i64_z_f16 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef SUBJ_I64_TO_F32
+ case I64_TO_F32:
+ test_a_i64_z_f32(
+ i64_to_f32, (funcType_a_i64_z_f32 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_I64_TO_F64
+ case I64_TO_F64:
+ test_a_i64_z_f64(
+ i64_to_f64, (funcType_a_i64_z_f64 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_I64_TO_EXTF80
+ case I64_TO_EXTF80:
+ test_a_i64_z_extF80(
+ i64_to_extF80M, (funcType_a_i64_z_extF80 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_I64_TO_F128
+ case I64_TO_F128:
+ test_a_i64_z_f128(
+ i64_to_f128M, (funcType_a_i64_z_f128 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef FLOAT16
+ case F16_TO_UI32:
+ test_a_f16_z_ui32_rx(
+ f16_to_ui32, subjFunction_a_f16_z_ui32_rx, roundingMode, exact );
+ break;
+ case F16_TO_UI64:
+ test_a_f16_z_ui64_rx(
+ f16_to_ui64, subjFunction_a_f16_z_ui64_rx, roundingMode, exact );
+ break;
+ case F16_TO_I32:
+ test_a_f16_z_i32_rx(
+ f16_to_i32, subjFunction_a_f16_z_i32_rx, roundingMode, exact );
+ break;
+ case F16_TO_I64:
+ test_a_f16_z_i64_rx(
+ f16_to_i64, subjFunction_a_f16_z_i64_rx, roundingMode, exact );
+ break;
+#ifdef SUBJ_F16_TO_F32
+ case F16_TO_F32:
+ test_a_f16_z_f32(
+ f16_to_f32, (funcType_a_f16_z_f32 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_F16_TO_F64
+ case F16_TO_F64:
+ test_a_f16_z_f64(
+ f16_to_f64, (funcType_a_f16_z_f64 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_F16_TO_EXTF80
+ case F16_TO_EXTF80:
+ test_a_f16_z_extF80(
+ f16_to_extF80M, (funcType_a_f16_z_extF80 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_F16_TO_F128
+ case F16_TO_F128:
+ test_a_f16_z_f128(
+ f16_to_f128M, (funcType_a_f16_z_f128 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+ case F16_ROUNDTOINT:
+ test_az_f16_rx(
+ f16_roundToInt, subjFunction_az_f16_rx, roundingMode, exact );
+ break;
+#ifdef SUBJ_F16_ADD
+ case F16_ADD:
+ trueFunction_abz_f16 = f16_add;
+ goto test_abz_f16;
+#endif
+#ifdef SUBJ_F16_SUB
+ case F16_SUB:
+ trueFunction_abz_f16 = f16_sub;
+ goto test_abz_f16;
+#endif
+#ifdef SUBJ_F16_MUL
+ case F16_MUL:
+ trueFunction_abz_f16 = f16_mul;
+ goto test_abz_f16;
+#endif
+#ifdef SUBJ_F16_MULADD
+ case F16_MULADD:
+ test_abcz_f16( f16_mulAdd, (funcType_abcz_f16 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef SUBJ_F16_DIV
+ case F16_DIV:
+ trueFunction_abz_f16 = f16_div;
+ goto test_abz_f16;
+#endif
+#ifdef SUBJ_F16_REM
+ case F16_REM:
+ trueFunction_abz_f16 = f16_rem;
+ goto test_abz_f16;
+#endif
+ test_abz_f16:
+ test_abz_f16(
+ trueFunction_abz_f16, (funcType_abz_f16 *) subjFunctionPtr );
+ break;
+#ifdef SUBJ_F16_SQRT
+ case F16_SQRT:
+ test_az_f16( f16_sqrt, (funcType_az_f16 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef SUBJ_F16_EQ
+ case F16_EQ:
+ trueFunction_ab_f16_z_bool = f16_eq;
+ goto test_ab_f16_z_bool;
+#endif
+#ifdef SUBJ_F16_LE
+ case F16_LE:
+ trueFunction_ab_f16_z_bool = f16_le;
+ goto test_ab_f16_z_bool;
+#endif
+#ifdef SUBJ_F16_LT
+ case F16_LT:
+ trueFunction_ab_f16_z_bool = f16_lt;
+ goto test_ab_f16_z_bool;
+#endif
+#ifdef SUBJ_F16_EQ_SIGNALING
+ case F16_EQ_SIGNALING:
+ trueFunction_ab_f16_z_bool = f16_eq_signaling;
+ goto test_ab_f16_z_bool;
+#endif
+#ifdef SUBJ_F16_LE_QUIET
+ case F16_LE_QUIET:
+ trueFunction_ab_f16_z_bool = f16_le_quiet;
+ goto test_ab_f16_z_bool;
+#endif
+#ifdef SUBJ_F16_LT_QUIET
+ case F16_LT_QUIET:
+ trueFunction_ab_f16_z_bool = f16_lt_quiet;
+ goto test_ab_f16_z_bool;
+#endif
+ test_ab_f16_z_bool:
+ test_ab_f16_z_bool(
+ trueFunction_ab_f16_z_bool,
+ (funcType_ab_f16_z_bool *) subjFunctionPtr
+ );
+ break;
+#endif
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ case F32_TO_UI32:
+ test_a_f32_z_ui32_rx(
+ f32_to_ui32, subjFunction_a_f32_z_ui32_rx, roundingMode, exact );
+ break;
+ case F32_TO_UI64:
+ test_a_f32_z_ui64_rx(
+ f32_to_ui64, subjFunction_a_f32_z_ui64_rx, roundingMode, exact );
+ break;
+ case F32_TO_I32:
+ test_a_f32_z_i32_rx(
+ f32_to_i32, subjFunction_a_f32_z_i32_rx, roundingMode, exact );
+ break;
+ case F32_TO_I64:
+ test_a_f32_z_i64_rx(
+ f32_to_i64, subjFunction_a_f32_z_i64_rx, roundingMode, exact );
+ break;
+#ifdef FLOAT16
+#ifdef SUBJ_F32_TO_F16
+ case F32_TO_F16:
+ test_a_f32_z_f16(
+ f32_to_f16, (funcType_a_f32_z_f16 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_F32_TO_F64
+ case F32_TO_F64:
+ test_a_f32_z_f64(
+ f32_to_f64, (funcType_a_f32_z_f64 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_F32_TO_EXTF80
+ case F32_TO_EXTF80:
+ test_a_f32_z_extF80(
+ f32_to_extF80M, (funcType_a_f32_z_extF80 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_F32_TO_F128
+ case F32_TO_F128:
+ test_a_f32_z_f128(
+ f32_to_f128M, (funcType_a_f32_z_f128 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+ case F32_ROUNDTOINT:
+ test_az_f32_rx(
+ f32_roundToInt, subjFunction_az_f32_rx, roundingMode, exact );
+ break;
+#ifdef SUBJ_F32_ADD
+ case F32_ADD:
+ trueFunction_abz_f32 = f32_add;
+ goto test_abz_f32;
+#endif
+#ifdef SUBJ_F32_SUB
+ case F32_SUB:
+ trueFunction_abz_f32 = f32_sub;
+ goto test_abz_f32;
+#endif
+#ifdef SUBJ_F32_MUL
+ case F32_MUL:
+ trueFunction_abz_f32 = f32_mul;
+ goto test_abz_f32;
+#endif
+#ifdef SUBJ_F32_MULADD
+ case F32_MULADD:
+ test_abcz_f32( f32_mulAdd, (funcType_abcz_f32 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef SUBJ_F32_DIV
+ case F32_DIV:
+ trueFunction_abz_f32 = f32_div;
+ goto test_abz_f32;
+#endif
+#ifdef SUBJ_F32_REM
+ case F32_REM:
+ trueFunction_abz_f32 = f32_rem;
+ goto test_abz_f32;
+#endif
+ test_abz_f32:
+ test_abz_f32(
+ trueFunction_abz_f32, (funcType_abz_f32 *) subjFunctionPtr );
+ break;
+#ifdef SUBJ_F32_SQRT
+ case F32_SQRT:
+ test_az_f32( f32_sqrt, (funcType_az_f32 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef SUBJ_F32_EQ
+ case F32_EQ:
+ trueFunction_ab_f32_z_bool = f32_eq;
+ goto test_ab_f32_z_bool;
+#endif
+#ifdef SUBJ_F32_LE
+ case F32_LE:
+ trueFunction_ab_f32_z_bool = f32_le;
+ goto test_ab_f32_z_bool;
+#endif
+#ifdef SUBJ_F32_LT
+ case F32_LT:
+ trueFunction_ab_f32_z_bool = f32_lt;
+ goto test_ab_f32_z_bool;
+#endif
+#ifdef SUBJ_F32_EQ_SIGNALING
+ case F32_EQ_SIGNALING:
+ trueFunction_ab_f32_z_bool = f32_eq_signaling;
+ goto test_ab_f32_z_bool;
+#endif
+#ifdef SUBJ_F32_LE_QUIET
+ case F32_LE_QUIET:
+ trueFunction_ab_f32_z_bool = f32_le_quiet;
+ goto test_ab_f32_z_bool;
+#endif
+#ifdef SUBJ_F32_LT_QUIET
+ case F32_LT_QUIET:
+ trueFunction_ab_f32_z_bool = f32_lt_quiet;
+ goto test_ab_f32_z_bool;
+#endif
+ test_ab_f32_z_bool:
+ test_ab_f32_z_bool(
+ trueFunction_ab_f32_z_bool,
+ (funcType_ab_f32_z_bool *) subjFunctionPtr
+ );
+ break;
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef FLOAT64
+ case F64_TO_UI32:
+ test_a_f64_z_ui32_rx(
+ f64_to_ui32, subjFunction_a_f64_z_ui32_rx, roundingMode, exact );
+ break;
+ case F64_TO_UI64:
+ test_a_f64_z_ui64_rx(
+ f64_to_ui64, subjFunction_a_f64_z_ui64_rx, roundingMode, exact );
+ break;
+ case F64_TO_I32:
+ test_a_f64_z_i32_rx(
+ f64_to_i32, subjFunction_a_f64_z_i32_rx, roundingMode, exact );
+ break;
+ case F64_TO_I64:
+ test_a_f64_z_i64_rx(
+ f64_to_i64, subjFunction_a_f64_z_i64_rx, roundingMode, exact );
+ break;
+#ifdef FLOAT16
+#ifdef SUBJ_F64_TO_F16
+ case F64_TO_F16:
+ test_a_f64_z_f16(
+ f64_to_f16, (funcType_a_f64_z_f16 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef SUBJ_F64_TO_F32
+ case F64_TO_F32:
+ test_a_f64_z_f32(
+ f64_to_f32, (funcType_a_f64_z_f32 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_F64_TO_EXTF80
+ case F64_TO_EXTF80:
+ test_a_f64_z_extF80(
+ f64_to_extF80M, (funcType_a_f64_z_extF80 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_F64_TO_F128
+ case F64_TO_F128:
+ test_a_f64_z_f128(
+ f64_to_f128M, (funcType_a_f64_z_f128 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+ case F64_ROUNDTOINT:
+ test_az_f64_rx(
+ f64_roundToInt, subjFunction_az_f64_rx, roundingMode, exact );
+ break;
+#ifdef SUBJ_F64_ADD
+ case F64_ADD:
+ trueFunction_abz_f64 = f64_add;
+ goto test_abz_f64;
+#endif
+#ifdef SUBJ_F64_SUB
+ case F64_SUB:
+ trueFunction_abz_f64 = f64_sub;
+ goto test_abz_f64;
+#endif
+#ifdef SUBJ_F64_MUL
+ case F64_MUL:
+ trueFunction_abz_f64 = f64_mul;
+ goto test_abz_f64;
+#endif
+#ifdef SUBJ_F64_MULADD
+ case F64_MULADD:
+ test_abcz_f64( f64_mulAdd, (funcType_abcz_f64 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef SUBJ_F64_DIV
+ case F64_DIV:
+ trueFunction_abz_f64 = f64_div;
+ goto test_abz_f64;
+#endif
+#ifdef SUBJ_F64_REM
+ case F64_REM:
+ trueFunction_abz_f64 = f64_rem;
+ goto test_abz_f64;
+#endif
+ test_abz_f64:
+ test_abz_f64(
+ trueFunction_abz_f64, (funcType_abz_f64 *) subjFunctionPtr );
+ break;
+#ifdef SUBJ_F64_SQRT
+ case F64_SQRT:
+ test_az_f64( f64_sqrt, (funcType_az_f64 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef SUBJ_F64_EQ
+ case F64_EQ:
+ trueFunction_ab_f64_z_bool = f64_eq;
+ goto test_ab_f64_z_bool;
+#endif
+#ifdef SUBJ_F64_LE
+ case F64_LE:
+ trueFunction_ab_f64_z_bool = f64_le;
+ goto test_ab_f64_z_bool;
+#endif
+#ifdef SUBJ_F64_LT
+ case F64_LT:
+ trueFunction_ab_f64_z_bool = f64_lt;
+ goto test_ab_f64_z_bool;
+#endif
+#ifdef SUBJ_F64_EQ_SIGNALING
+ case F64_EQ_SIGNALING:
+ trueFunction_ab_f64_z_bool = f64_eq_signaling;
+ goto test_ab_f64_z_bool;
+#endif
+#ifdef SUBJ_F64_LE_QUIET
+ case F64_LE_QUIET:
+ trueFunction_ab_f64_z_bool = f64_le_quiet;
+ goto test_ab_f64_z_bool;
+#endif
+#ifdef SUBJ_F64_LT_QUIET
+ case F64_LT_QUIET:
+ trueFunction_ab_f64_z_bool = f64_lt_quiet;
+ goto test_ab_f64_z_bool;
+#endif
+ test_ab_f64_z_bool:
+ test_ab_f64_z_bool(
+ trueFunction_ab_f64_z_bool,
+ (funcType_ab_f64_z_bool *) subjFunctionPtr
+ );
+ break;
+#endif
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef EXTFLOAT80
+ case EXTF80_TO_UI32:
+ test_a_extF80_z_ui32_rx(
+ extF80M_to_ui32,
+ subjFunction_a_extF80_z_ui32_rx,
+ roundingMode,
+ exact
+ );
+ break;
+ case EXTF80_TO_UI64:
+ test_a_extF80_z_ui64_rx(
+ extF80M_to_ui64,
+ subjFunction_a_extF80_z_ui64_rx,
+ roundingMode,
+ exact
+ );
+ break;
+ case EXTF80_TO_I32:
+ test_a_extF80_z_i32_rx(
+ extF80M_to_i32, subjFunction_a_extF80_z_i32_rx, roundingMode, exact
+ );
+ break;
+ case EXTF80_TO_I64:
+ test_a_extF80_z_i64_rx(
+ extF80M_to_i64, subjFunction_a_extF80_z_i64_rx, roundingMode, exact
+ );
+ break;
+#ifdef FLOAT16
+#ifdef SUBJ_EXTF80_TO_F16
+ case EXTF80_TO_F16:
+ test_a_extF80_z_f16(
+ extF80M_to_f16, (funcType_a_extF80_z_f16 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef SUBJ_EXTF80_TO_F32
+ case EXTF80_TO_F32:
+ test_a_extF80_z_f32(
+ extF80M_to_f32, (funcType_a_extF80_z_f32 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_EXTF80_TO_F64
+ case EXTF80_TO_F64:
+ test_a_extF80_z_f64(
+ extF80M_to_f64, (funcType_a_extF80_z_f64 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_EXTF80_TO_F128
+ case EXTF80_TO_F128:
+ test_a_extF80_z_f128(
+ extF80M_to_f128M, (funcType_a_extF80_z_f128 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+ case EXTF80_ROUNDTOINT:
+ test_az_extF80_rx(
+ extF80M_roundToInt, subjFunction_az_extF80_rx, roundingMode, exact
+ );
+ break;
+#ifdef SUBJ_EXTF80_ADD
+ case EXTF80_ADD:
+ trueFunction_abz_extF80 = extF80M_add;
+ goto test_abz_extF80;
+#endif
+#ifdef SUBJ_EXTF80_SUB
+ case EXTF80_SUB:
+ trueFunction_abz_extF80 = extF80M_sub;
+ goto test_abz_extF80;
+#endif
+#ifdef SUBJ_EXTF80_MUL
+ case EXTF80_MUL:
+ trueFunction_abz_extF80 = extF80M_mul;
+ goto test_abz_extF80;
+#endif
+#ifdef SUBJ_EXTF80_DIV
+ case EXTF80_DIV:
+ trueFunction_abz_extF80 = extF80M_div;
+ goto test_abz_extF80;
+#endif
+#ifdef SUBJ_EXTF80_REM
+ case EXTF80_REM:
+ trueFunction_abz_extF80 = extF80M_rem;
+ goto test_abz_extF80;
+#endif
+ test_abz_extF80:
+ test_abz_extF80(
+ trueFunction_abz_extF80, (funcType_abz_extF80 *) subjFunctionPtr );
+ break;
+#ifdef SUBJ_EXTF80_SQRT
+ case EXTF80_SQRT:
+ test_az_extF80( extF80M_sqrt, (funcType_az_extF80 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef SUBJ_EXTF80_EQ
+ case EXTF80_EQ:
+ trueFunction_ab_extF80_z_bool = extF80M_eq;
+ goto test_ab_extF80_z_bool;
+#endif
+#ifdef SUBJ_EXTF80_LE
+ case EXTF80_LE:
+ trueFunction_ab_extF80_z_bool = extF80M_le;
+ goto test_ab_extF80_z_bool;
+#endif
+#ifdef SUBJ_EXTF80_LT
+ case EXTF80_LT:
+ trueFunction_ab_extF80_z_bool = extF80M_lt;
+ goto test_ab_extF80_z_bool;
+#endif
+#ifdef SUBJ_EXTF80_EQ_SIGNALING
+ case EXTF80_EQ_SIGNALING:
+ trueFunction_ab_extF80_z_bool = extF80M_eq_signaling;
+ goto test_ab_extF80_z_bool;
+#endif
+#ifdef SUBJ_EXTF80_LE_QUIET
+ case EXTF80_LE_QUIET:
+ trueFunction_ab_extF80_z_bool = extF80M_le_quiet;
+ goto test_ab_extF80_z_bool;
+#endif
+#ifdef SUBJ_EXTF80_LT_QUIET
+ case EXTF80_LT_QUIET:
+ trueFunction_ab_extF80_z_bool = extF80M_lt_quiet;
+ goto test_ab_extF80_z_bool;
+#endif
+ test_ab_extF80_z_bool:
+ test_ab_extF80_z_bool(
+ trueFunction_ab_extF80_z_bool,
+ (funcType_ab_extF80_z_bool *) subjFunctionPtr
+ );
+ break;
+#endif
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef FLOAT128
+ case F128_TO_UI32:
+ test_a_f128_z_ui32_rx(
+ f128M_to_ui32, subjFunction_a_f128_z_ui32_rx, roundingMode, exact
+ );
+ break;
+ case F128_TO_UI64:
+ test_a_f128_z_ui64_rx(
+ f128M_to_ui64, subjFunction_a_f128_z_ui64_rx, roundingMode, exact
+ );
+ break;
+ case F128_TO_I32:
+ test_a_f128_z_i32_rx(
+ f128M_to_i32, subjFunction_a_f128_z_i32_rx, roundingMode, exact );
+ break;
+ case F128_TO_I64:
+ test_a_f128_z_i64_rx(
+ f128M_to_i64, subjFunction_a_f128_z_i64_rx, roundingMode, exact );
+ break;
+#ifdef FLOAT16
+#ifdef SUBJ_F128_TO_F16
+ case F128_TO_F16:
+ test_a_f128_z_f16(
+ f128M_to_f16, (funcType_a_f128_z_f16 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef SUBJ_F128_TO_F32
+ case F128_TO_F32:
+ test_a_f128_z_f32(
+ f128M_to_f32, (funcType_a_f128_z_f32 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_F128_TO_F64
+ case F128_TO_F64:
+ test_a_f128_z_f64(
+ f128M_to_f64, (funcType_a_f128_z_f64 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_F128_TO_EXTF80
+ case F128_TO_EXTF80:
+ test_a_f128_z_extF80(
+ f128M_to_extF80M, (funcType_a_f128_z_extF80 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+ case F128_ROUNDTOINT:
+ test_az_f128_rx(
+ f128M_roundToInt, subjFunction_az_f128_rx, roundingMode, exact );
+ break;
+#ifdef SUBJ_F128_ADD
+ case F128_ADD:
+ trueFunction_abz_f128 = f128M_add;
+ goto test_abz_f128;
+#endif
+#ifdef SUBJ_F128_SUB
+ case F128_SUB:
+ trueFunction_abz_f128 = f128M_sub;
+ goto test_abz_f128;
+#endif
+#ifdef SUBJ_F128_MUL
+ case F128_MUL:
+ trueFunction_abz_f128 = f128M_mul;
+ goto test_abz_f128;
+#endif
+#ifdef SUBJ_F128_MULADD
+ case F128_MULADD:
+ test_abcz_f128( f128M_mulAdd, (funcType_abcz_f128 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef SUBJ_F128_DIV
+ case F128_DIV:
+ trueFunction_abz_f128 = f128M_div;
+ goto test_abz_f128;
+#endif
+#ifdef SUBJ_F128_REM
+ case F128_REM:
+ trueFunction_abz_f128 = f128M_rem;
+ goto test_abz_f128;
+#endif
+ test_abz_f128:
+ test_abz_f128(
+ trueFunction_abz_f128, (funcType_abz_f128 *) subjFunctionPtr );
+ break;
+#ifdef SUBJ_F128_SQRT
+ case F128_SQRT:
+ test_az_f128( f128M_sqrt, (funcType_az_f128 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef SUBJ_F128_EQ
+ case F128_EQ:
+ trueFunction_ab_f128_z_bool = f128M_eq;
+ goto test_ab_f128_z_bool;
+#endif
+#ifdef SUBJ_F128_LE
+ case F128_LE:
+ trueFunction_ab_f128_z_bool = f128M_le;
+ goto test_ab_f128_z_bool;
+#endif
+#ifdef SUBJ_F128_LT
+ case F128_LT:
+ trueFunction_ab_f128_z_bool = f128M_lt;
+ goto test_ab_f128_z_bool;
+#endif
+#ifdef SUBJ_F128_EQ_SIGNALING
+ case F128_EQ_SIGNALING:
+ trueFunction_ab_f128_z_bool = f128M_eq_signaling;
+ goto test_ab_f128_z_bool;
+#endif
+#ifdef SUBJ_F128_LE_QUIET
+ case F128_LE_QUIET:
+ trueFunction_ab_f128_z_bool = f128M_le_quiet;
+ goto test_ab_f128_z_bool;
+#endif
+#ifdef SUBJ_F128_LT_QUIET
+ case F128_LT_QUIET:
+ trueFunction_ab_f128_z_bool = f128M_lt_quiet;
+ goto test_ab_f128_z_bool;
+#endif
+ test_ab_f128_z_bool:
+ test_ab_f128_z_bool(
+ trueFunction_ab_f128_z_bool,
+ (funcType_ab_f128_z_bool *) subjFunctionPtr
+ );
+ break;
+#endif
+ }
+ if ( (verCases_errorStop && verCases_anyErrors) || verCases_stop ) {
+ verCases_exitWithStatus();
+ }
+
+}
+
+static
+void
+ testFunction(
+ const struct standardFunctionInfo *standardFunctionInfoPtr,
+ uint_fast8_t roundingPrecisionIn,
+ int roundingCodeIn
+ )
+{
+ int functionCode, functionAttribs;
+ bool standardFunctionHasFixedRounding;
+ int roundingCode;
+ bool exact;
+ uint_fast8_t roundingPrecision, roundingMode = 0;
+
+ functionCode = standardFunctionInfoPtr->functionCode;
+ functionAttribs = functionInfos[functionCode].attribs;
+ standardFunctionHasFixedRounding = false;
+ if ( functionAttribs & FUNC_ARG_ROUNDINGMODE ) {
+ roundingCode = standardFunctionInfoPtr->roundingCode;
+ if ( roundingCode ) {
+ standardFunctionHasFixedRounding = true;
+ roundingCodeIn = roundingCode;
+ }
+ }
+ exact = standardFunctionInfoPtr->exact;
+ verCases_functionNamePtr = standardFunctionInfoPtr->namePtr;
+ roundingPrecision = 32;
+ for (;;) {
+ if ( functionAttribs & FUNC_EFF_ROUNDINGPRECISION ) {
+ if ( roundingPrecisionIn ) roundingPrecision = roundingPrecisionIn;
+ } else {
+ roundingPrecision = 0;
+ }
+#ifdef EXTFLOAT80
+ verCases_roundingPrecision = roundingPrecision;
+ if ( roundingPrecision ) {
+ extF80_roundingPrecision = roundingPrecision;
+ subjfloat_setExtF80RoundingPrecision( roundingPrecision );
+ }
+#endif
+ for (
+ roundingCode = 1; roundingCode < NUM_ROUNDINGMODES; ++roundingCode
+ ) {
+#ifndef SUBJFLOAT_ROUND_NEAR_MAXMAG
+ if ( roundingCode != ROUND_NEAR_MAXMAG ) {
+#endif
+#if defined FLOAT_ROUND_ODD && ! defined SUBJFLOAT_ROUND_NEAR_MAXMAG
+ if ( roundingCode != ROUND_ODD ) {
+#endif
+ if (
+ functionAttribs
+ & (FUNC_ARG_ROUNDINGMODE | FUNC_EFF_ROUNDINGMODE)
+ ) {
+ if ( roundingCodeIn ) roundingCode = roundingCodeIn;
+ } else {
+ roundingCode = 0;
+ }
+ verCases_roundingCode =
+ standardFunctionHasFixedRounding ? 0 : roundingCode;
+ if ( roundingCode ) {
+ roundingMode = roundingModes[roundingCode];
+ softfloat_roundingMode = roundingMode;
+ if ( ! standardFunctionHasFixedRounding ) {
+ subjfloat_setRoundingMode( roundingMode );
+ }
+ }
+ testFunctionInstance( functionCode, roundingMode, exact );
+ if ( roundingCodeIn || ! roundingCode ) break;
+#if defined FLOAT_ROUND_ODD && ! defined SUBJFLOAT_ROUND_NEAR_MAXMAG
+ }
+#endif
+#ifndef SUBJFLOAT_ROUND_NEAR_MAXMAG
+ }
+#endif
+ }
+ if ( roundingPrecisionIn || ! roundingPrecision ) break;
+ if ( roundingPrecision == 80 ) {
+ break;
+ } else if ( roundingPrecision == 64 ) {
+ roundingPrecision = 80;
+ } else if ( roundingPrecision == 32 ) {
+ roundingPrecision = 64;
+ }
+ }
+
+}
+
+int main( int argc, char *argv[] )
+{
+ bool haveFunctionArg;
+ const struct standardFunctionInfo *standardFunctionInfoPtr;
+ int numOperands;
+ uint_fast8_t roundingPrecision;
+ int roundingCode;
+ const char *argPtr;
+ void (*const *subjFunctionPtrPtr)();
+ const char *functionNamePtr;
+ unsigned long ui;
+ long i;
+ int functionMatchAttrib;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ fail_programName = "testfloat";
+ if ( argc <= 1 ) goto writeHelpMessage;
+ genCases_setLevel( 1 );
+ verCases_maxErrorCount = 20;
+ testLoops_trueFlagsPtr = &softfloat_exceptionFlags;
+ testLoops_subjFlagsFunction = subjfloat_clearExceptionFlags;
+ haveFunctionArg = false;
+ standardFunctionInfoPtr = 0;
+ numOperands = 0;
+ roundingPrecision = 0;
+ roundingCode = 0;
+ for (;;) {
+ --argc;
+ if ( ! argc ) break;
+ argPtr = *++argv;
+ if ( ! argPtr ) break;
+ if ( argPtr[0] == '-' ) ++argPtr;
+ if (
+ ! strcmp( argPtr, "help" ) || ! strcmp( argPtr, "-help" )
+ || ! strcmp( argPtr, "h" )
+ ) {
+ writeHelpMessage:
+ fputs(
+"testfloat [<option>...] <function>\n"
+" <option>: (* is default)\n"
+" -help --Write this message and exit.\n"
+" -list --List all testable subject functions and exit.\n"
+" -seed <num> --Set pseudo-random number generator seed to <num>.\n"
+" * -seed 1\n"
+" -level <num> --Testing level <num> (1 or 2).\n"
+" * -level 1\n"
+" -errors <num> --Stop each function test after <num> errors.\n"
+" * -errors 20\n"
+" -errorstop --Exit after first function with any error.\n"
+" -forever --Test one function repeatedly (implies '-level 2').\n"
+" -checkNaNs --Check for specific NaN results.\n"
+" -checkInvInts --Check for specific invalid integer results.\n"
+" -checkAll --Same as both '-checkNaNs' and '-checkInvInts'.\n"
+#ifdef EXTFLOAT80
+" -precision32 --For extF80, test only 32-bit rounding precision.\n"
+" -precision64 --For extF80, test only 64-bit rounding precision.\n"
+" -precision80 --For extF80, test only 80-bit rounding precision.\n"
+#endif
+" -r<round> --Test only specified rounding (if not inherent to\n"
+" function).\n"
+" -tininessbefore --Underflow tininess is detected before rounding.\n"
+" -tininessafter --Underflow tininess is detected after rounding.\n"
+" <function>:\n"
+" <int>_to_<float> <float>_add <float>_eq\n"
+" <float>_to_<int>_r_<round> <float>_sub <float>_le\n"
+" <float>_to_<int>_rx_<round> <float>_mul <float>_lt\n"
+" <float>_to_<float> <float>_mulAdd <float>_eq_signaling\n"
+" <float>_roundToInt_r_<round> <float>_div <float>_le_quiet\n"
+" <float>_roundToInt_x <float>_rem <float>_lt_quiet\n"
+" <float>_sqrt\n"
+" -all1 --All unary functions.\n"
+" -all2 --All binary functions.\n"
+" <int>:\n"
+" ui32 --Unsigned 32-bit integer.\n"
+" ui64 --Unsigned 64-bit integer.\n"
+" i32 --Signed 32-bit integer.\n"
+" i64 --Signed 64-bit integer.\n"
+" <float>:\n"
+#ifdef FLOAT16
+" f16 --Binary 16-bit floating-point (half-precision).\n"
+#endif
+" f32 --Binary 32-bit floating-point (single-precision).\n"
+#ifdef FLOAT64
+" f64 --Binary 64-bit floating-point (double-precision).\n"
+#endif
+#ifdef EXTFLOAT80
+" extF80 --Binary 80-bit extended floating-point.\n"
+#endif
+#ifdef FLOAT128
+" f128 --Binary 128-bit floating-point (quadruple-precision).\n"
+#endif
+" <round>:\n"
+" near_even --Round to nearest/even.\n"
+" minMag --Round to minimum magnitude (toward zero).\n"
+" min --Round to minimum (down).\n"
+" max --Round to maximum (up).\n"
+#ifdef SUBJFLOAT_ROUND_NEAR_MAXMAG
+" near_maxMag --Round to nearest/maximum magnitude (nearest/away).\n"
+#endif
+#if defined FLOAT_ROUND_ODD && defined SUBJFLOAT_ROUND_ODD
+" odd --Round to odd (jamming). (Not allowed as an inherent\n"
+" rounding mode. For 'roundToInt_x', rounds to minimum\n"
+" magnitude instead.)\n"
+#endif
+ ,
+ stdout
+ );
+ return EXIT_SUCCESS;
+ } else if ( ! strcmp( argPtr, "list" ) ) {
+ standardFunctionInfoPtr = standardFunctionInfos;
+ subjFunctionPtrPtr = subjfloat_functions;
+ for (;;) {
+ functionNamePtr = standardFunctionInfoPtr->namePtr;
+ if ( ! functionNamePtr ) break;
+ if ( *subjFunctionPtrPtr ) puts( functionNamePtr );
+ ++standardFunctionInfoPtr;
+ ++subjFunctionPtrPtr;
+ }
+ return EXIT_SUCCESS;
+ } else if ( ! strcmp( argPtr, "seed" ) ) {
+ if ( argc < 2 ) goto optionError;
+ ui = strtoul( argv[1], (char **) &argPtr, 10 );
+ if ( *argPtr ) goto optionError;
+ srand( ui );
+ --argc;
+ ++argv;
+ } else if ( ! strcmp( argPtr, "level" ) ) {
+ if ( argc < 2 ) goto optionError;
+ i = strtol( argv[1], (char **) &argPtr, 10 );
+ if ( *argPtr ) goto optionError;
+ genCases_setLevel( i );
+ --argc;
+ ++argv;
+ } else if ( ! strcmp( argPtr, "level1" ) ) {
+ genCases_setLevel( 1 );
+ } else if ( ! strcmp( argPtr, "level2" ) ) {
+ genCases_setLevel( 2 );
+ } else if ( ! strcmp( argPtr, "errors" ) ) {
+ if ( argc < 2 ) goto optionError;
+ i = strtol( argv[1], (char **) &argPtr, 10 );
+ if ( *argPtr ) goto optionError;
+ verCases_maxErrorCount = i;
+ --argc;
+ ++argv;
+ } else if ( ! strcmp( argPtr, "errorstop" ) ) {
+ verCases_errorStop = true;
+ } else if ( ! strcmp( argPtr, "forever" ) ) {
+ genCases_setLevel( 2 );
+ testLoops_forever = true;
+ } else if (
+ ! strcmp( argPtr, "checkNaNs" ) || ! strcmp( argPtr, "checknans" )
+ ) {
+ verCases_checkNaNs = true;
+ } else if (
+ ! strcmp( argPtr, "checkInvInts" )
+ || ! strcmp( argPtr, "checkinvints" )
+ ) {
+ verCases_checkInvInts = true;
+ } else if (
+ ! strcmp( argPtr, "checkAll" ) || ! strcmp( argPtr, "checkall" )
+ ) {
+ verCases_checkNaNs = true;
+ verCases_checkInvInts = true;
+#ifdef EXTFLOAT80
+ } else if ( ! strcmp( argPtr, "precision32" ) ) {
+ roundingPrecision = 32;
+ } else if ( ! strcmp( argPtr, "precision64" ) ) {
+ roundingPrecision = 64;
+ } else if ( ! strcmp( argPtr, "precision80" ) ) {
+ roundingPrecision = 80;
+#endif
+ } else if (
+ ! strcmp( argPtr, "rnear_even" )
+ || ! strcmp( argPtr, "rneareven" )
+ || ! strcmp( argPtr, "rnearest_even" )
+ ) {
+ roundingCode = ROUND_NEAR_EVEN;
+ } else if (
+ ! strcmp( argPtr, "rminmag" ) || ! strcmp( argPtr, "rminMag" )
+ ) {
+ roundingCode = ROUND_MINMAG;
+ } else if ( ! strcmp( argPtr, "rmin" ) ) {
+ roundingCode = ROUND_MIN;
+ } else if ( ! strcmp( argPtr, "rmax" ) ) {
+ roundingCode = ROUND_MAX;
+ } else if (
+ ! strcmp( argPtr, "rnear_maxmag" )
+ || ! strcmp( argPtr, "rnear_maxMag" )
+ || ! strcmp( argPtr, "rnearmaxmag" )
+ || ! strcmp( argPtr, "rnearest_maxmag" )
+ || ! strcmp( argPtr, "rnearest_maxMag" )
+ ) {
+#ifdef SUBJFLOAT_ROUND_NEAR_MAXMAG
+ roundingCode = ROUND_NEAR_MAXMAG;
+#else
+ fail(
+ "Rounding mode 'near_maxMag' is not supported or cannot be tested"
+ );
+#endif
+#ifdef FLOAT_ROUND_ODD
+ } else if ( ! strcmp( argPtr, "rodd" ) ) {
+#ifdef SUBJFLOAT_ROUND_ODD
+ roundingCode = ROUND_ODD;
+#else
+ fail( "Rounding mode 'odd' is not supported or cannot be tested" );
+#endif
+#endif
+ } else if ( ! strcmp( argPtr, "tininessbefore" ) ) {
+ softfloat_detectTininess = softfloat_tininess_beforeRounding;
+ } else if ( ! strcmp( argPtr, "tininessafter" ) ) {
+ softfloat_detectTininess = softfloat_tininess_afterRounding;
+ } else if ( ! strcmp( argPtr, "all1" ) ) {
+ haveFunctionArg = true;
+ standardFunctionInfoPtr = 0;
+ numOperands = 1;
+ } else if ( ! strcmp( argPtr, "all2" ) ) {
+ haveFunctionArg = true;
+ standardFunctionInfoPtr = 0;
+ numOperands = 2;
+ } else {
+ standardFunctionInfoPtr = standardFunctionInfos;
+ for (;;) {
+ functionNamePtr = standardFunctionInfoPtr->namePtr;
+ if ( ! functionNamePtr ) {
+ fail( "Invalid argument '%s'", *argv );
+ }
+ if ( ! strcmp( argPtr, functionNamePtr ) ) break;
+ ++standardFunctionInfoPtr;
+ }
+ subjFunctionPtr =
+ subjfloat_functions
+ [standardFunctionInfoPtr - standardFunctionInfos];
+ if ( ! subjFunctionPtr ) {
+ fail(
+ "Function '%s' is not supported or cannot be tested",
+ argPtr
+ );
+ }
+ haveFunctionArg = true;
+ }
+ }
+ if ( ! haveFunctionArg ) fail( "Function argument required" );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ signal( SIGINT, catchSIGINT );
+ signal( SIGTERM, catchSIGINT );
+ if ( standardFunctionInfoPtr ) {
+ if ( testLoops_forever ) {
+ if ( ! roundingPrecision ) roundingPrecision = 80;
+ if ( ! roundingCode ) roundingCode = ROUND_NEAR_EVEN;
+ }
+ testFunction(
+ standardFunctionInfoPtr, roundingPrecision, roundingCode );
+ } else {
+ if ( testLoops_forever ) {
+ fail( "Can test only one function with '-forever' option" );
+ }
+ functionMatchAttrib =
+ (numOperands == 1) ? FUNC_ARG_UNARY : FUNC_ARG_BINARY;
+ standardFunctionInfoPtr = standardFunctionInfos;
+ subjFunctionPtrPtr = subjfloat_functions;
+ while ( standardFunctionInfoPtr->namePtr ) {
+ subjFunctionPtr = *subjFunctionPtrPtr;
+ if (
+ subjFunctionPtr
+ && (functionInfos[standardFunctionInfoPtr->functionCode]
+ .attribs
+ & functionMatchAttrib)
+ ) {
+ testFunction(
+ standardFunctionInfoPtr, roundingPrecision, roundingCode );
+ }
+ ++standardFunctionInfoPtr;
+ ++subjFunctionPtrPtr;
+ }
+ }
+ verCases_exitWithStatus();
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ optionError:
+ fail( "'%s' option requires numeric argument", *argv );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/testfloat_gen.c b/src/libs/softfloat-3e/testfloat/source/testfloat_gen.c
new file mode 100644
index 00000000..67882c19
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/testfloat_gen.c
@@ -0,0 +1,953 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <signal.h>
+#include "platform.h"
+#include "fail.h"
+#include "softfloat.h"
+#include "functions.h"
+#include "genCases.h"
+#include "genLoops.h"
+
+enum {
+ TYPE_UI32 = NUM_FUNCTIONS,
+ TYPE_UI64,
+ TYPE_I32,
+ TYPE_I64,
+ TYPE_F16,
+ TYPE_F16_2,
+ TYPE_F16_3,
+ TYPE_F32,
+ TYPE_F32_2,
+ TYPE_F32_3,
+ TYPE_F64,
+ TYPE_F64_2,
+ TYPE_F64_3,
+ TYPE_EXTF80,
+ TYPE_EXTF80_2,
+ TYPE_EXTF80_3,
+ TYPE_F128,
+ TYPE_F128_2,
+ TYPE_F128_3
+};
+
+static void catchSIGINT( int signalCode )
+{
+
+ if ( genLoops_stop ) exit( EXIT_FAILURE );
+ genLoops_stop = true;
+
+}
+
+int main( int argc, char *argv[] )
+{
+ const char *prefixTextPtr;
+ uint_fast8_t roundingMode;
+ bool exact;
+ int functionCode;
+ const char *argPtr;
+ unsigned long ui;
+ long i;
+ int functionAttribs;
+#ifdef FLOAT16
+ float16_t (*trueFunction_abz_f16)( float16_t, float16_t );
+ bool (*trueFunction_ab_f16_z_bool)( float16_t, float16_t );
+#endif
+ float32_t (*trueFunction_abz_f32)( float32_t, float32_t );
+ bool (*trueFunction_ab_f32_z_bool)( float32_t, float32_t );
+#ifdef FLOAT64
+ float64_t (*trueFunction_abz_f64)( float64_t, float64_t );
+ bool (*trueFunction_ab_f64_z_bool)( float64_t, float64_t );
+#endif
+#ifdef EXTFLOAT80
+ void
+ (*trueFunction_abz_extF80)(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+ bool
+ (*trueFunction_ab_extF80_z_bool)(
+ const extFloat80_t *, const extFloat80_t * );
+#endif
+#ifdef FLOAT128
+ void
+ (*trueFunction_abz_f128)(
+ const float128_t *, const float128_t *, float128_t * );
+ bool
+ (*trueFunction_ab_f128_z_bool)( const float128_t *, const float128_t * );
+#endif
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ fail_programName = "testfloat_gen";
+ if ( argc <= 1 ) goto writeHelpMessage;
+ prefixTextPtr = 0;
+ softfloat_detectTininess = softfloat_tininess_afterRounding;
+#ifdef EXTFLOAT80
+ extF80_roundingPrecision = 80;
+#endif
+ roundingMode = softfloat_round_near_even;
+ exact = false;
+ genCases_setLevel( 1 );
+ genLoops_trueFlagsPtr = &softfloat_exceptionFlags;
+ genLoops_forever = false;
+ genLoops_givenCount = false;
+ functionCode = 0;
+ for (;;) {
+ --argc;
+ if ( ! argc ) break;
+ argPtr = *++argv;
+ if ( ! argPtr ) break;
+ if ( argPtr[0] == '-' ) ++argPtr;
+ if (
+ ! strcmp( argPtr, "help" ) || ! strcmp( argPtr, "-help" )
+ || ! strcmp( argPtr, "h" )
+ ) {
+ writeHelpMessage:
+ fputs(
+"testfloat_gen [<option>...] <type>|<function>\n"
+" <option>: (* is default)\n"
+" -help --Write this message and exit.\n"
+" -prefix <text> --Write <text> as a line of output before any test cases.\n"
+" -seed <num> --Set pseudo-random number generator seed to <num>.\n"
+" * -seed 1\n"
+" -level <num> --Testing level <num> (1 or 2).\n"
+" * -level 1\n"
+" -n <num> --Generate <num> test cases.\n"
+" -forever --Generate test cases indefinitely (implies '-level 2').\n"
+#ifdef EXTFLOAT80
+" -precision32 --For extF80, rounding precision is 32 bits.\n"
+" -precision64 --For extF80, rounding precision is 64 bits.\n"
+" * -precision80 --For extF80, rounding precision is 80 bits.\n"
+#endif
+" * -rnear_even --Round to nearest/even.\n"
+" -rminMag --Round to minimum magnitude (toward zero).\n"
+" -rmin --Round to minimum (down).\n"
+" -rmax --Round to maximum (up).\n"
+" -rnear_maxMag --Round to nearest/maximum magnitude (nearest/away).\n"
+#ifdef FLOAT_ROUND_ODD
+" -rodd --Round to odd (jamming). (For rounding to an integer\n"
+" value, rounds to minimum magnitude instead.)\n"
+#endif
+" -tininessbefore --Detect underflow tininess before rounding.\n"
+" * -tininessafter --Detect underflow tininess after rounding.\n"
+" * -notexact --Rounding to integer is not exact (no inexact\n"
+" exceptions).\n"
+" -exact --Rounding to integer is exact (raising inexact\n"
+" exceptions).\n"
+" <type>:\n"
+" <int> --Generate test cases with one integer operand.\n"
+" <float> --Generate test cases with one floating-point operand.\n"
+" <float> <num> --Generate test cases with <num> (1, 2, or 3)\n"
+" floating-point operands.\n"
+" <function>:\n"
+" <int>_to_<float> <float>_add <float>_eq\n"
+" <float>_to_<int> <float>_sub <float>_le\n"
+" <float>_to_<float> <float>_mul <float>_lt\n"
+" <float>_roundToInt <float>_mulAdd <float>_eq_signaling\n"
+" <float>_div <float>_le_quiet\n"
+" <float>_rem <float>_lt_quiet\n"
+" <float>_sqrt\n"
+" <int>:\n"
+" ui32 --Unsigned 32-bit integer.\n"
+" ui64 --Unsigned 64-bit integer.\n"
+" i32 --Signed 32-bit integer.\n"
+" i64 --Signed 64-bit integer.\n"
+" <float>:\n"
+#ifdef FLOAT16
+" f16 --Binary 16-bit floating-point (half-precision).\n"
+#endif
+" f32 --Binary 32-bit floating-point (single-precision).\n"
+#ifdef FLOAT64
+" f64 --Binary 64-bit floating-point (double-precision).\n"
+#endif
+#ifdef EXTFLOAT80
+" extF80 --Binary 80-bit extended floating-point.\n"
+#endif
+#ifdef FLOAT128
+" f128 --Binary 128-bit floating-point (quadruple-precision).\n"
+#endif
+ ,
+ stdout
+ );
+ return EXIT_SUCCESS;
+ } else if ( ! strcmp( argPtr, "prefix" ) ) {
+ if ( argc < 2 ) goto optionError;
+ prefixTextPtr = argv[1];
+ --argc;
+ ++argv;
+ } else if ( ! strcmp( argPtr, "seed" ) ) {
+ if ( argc < 2 ) goto optionError;
+ ui = strtoul( argv[1], (char **) &argPtr, 10 );
+ if ( *argPtr ) goto optionError;
+ srand( ui );
+ --argc;
+ ++argv;
+ } else if ( ! strcmp( argPtr, "level" ) ) {
+ if ( argc < 2 ) goto optionError;
+ i = strtol( argv[1], (char **) &argPtr, 10 );
+ if ( *argPtr ) goto optionError;
+ genCases_setLevel( i );
+ --argc;
+ ++argv;
+ } else if ( ! strcmp( argPtr, "level1" ) ) {
+ genCases_setLevel( 1 );
+ } else if ( ! strcmp( argPtr, "level2" ) ) {
+ genCases_setLevel( 2 );
+ } else if ( ! strcmp( argPtr, "n" ) ) {
+ if ( argc < 2 ) goto optionError;
+ genLoops_forever = true;
+ genLoops_givenCount = true;
+ i = strtol( argv[1], (char **) &argPtr, 10 );
+ if ( *argPtr ) goto optionError;
+ genLoops_count = i;
+ --argc;
+ ++argv;
+ } else if ( ! strcmp( argPtr, "forever" ) ) {
+ genCases_setLevel( 2 );
+ genLoops_forever = true;
+ genLoops_givenCount = false;
+#ifdef EXTFLOAT80
+ } else if ( ! strcmp( argPtr, "precision32" ) ) {
+ extF80_roundingPrecision = 32;
+ } else if ( ! strcmp( argPtr, "precision64" ) ) {
+ extF80_roundingPrecision = 64;
+ } else if ( ! strcmp( argPtr, "precision80" ) ) {
+ extF80_roundingPrecision = 80;
+#endif
+ } else if (
+ ! strcmp( argPtr, "rnear_even" )
+ || ! strcmp( argPtr, "rneareven" )
+ || ! strcmp( argPtr, "rnearest_even" )
+ ) {
+ roundingMode = softfloat_round_near_even;
+ } else if (
+ ! strcmp( argPtr, "rminmag" ) || ! strcmp( argPtr, "rminMag" )
+ ) {
+ roundingMode = softfloat_round_minMag;
+ } else if ( ! strcmp( argPtr, "rmin" ) ) {
+ roundingMode = softfloat_round_min;
+ } else if ( ! strcmp( argPtr, "rmax" ) ) {
+ roundingMode = softfloat_round_max;
+ } else if (
+ ! strcmp( argPtr, "rnear_maxmag" )
+ || ! strcmp( argPtr, "rnear_maxMag" )
+ || ! strcmp( argPtr, "rnearmaxmag" )
+ || ! strcmp( argPtr, "rnearest_maxmag" )
+ || ! strcmp( argPtr, "rnearest_maxMag" )
+ ) {
+ roundingMode = softfloat_round_near_maxMag;
+#ifdef FLOAT_ROUND_ODD
+ } else if ( ! strcmp( argPtr, "rodd" ) ) {
+ roundingMode = softfloat_round_odd;
+#endif
+ } else if ( ! strcmp( argPtr, "tininessbefore" ) ) {
+ softfloat_detectTininess = softfloat_tininess_beforeRounding;
+ } else if ( ! strcmp( argPtr, "tininessafter" ) ) {
+ softfloat_detectTininess = softfloat_tininess_afterRounding;
+ } else if ( ! strcmp( argPtr, "notexact" ) ) {
+ exact = false;
+ } else if ( ! strcmp( argPtr, "exact" ) ) {
+ exact = true;
+ } else if (
+ ! strcmp( argPtr, "ui32" ) || ! strcmp( argPtr, "uint32" )
+ ) {
+ functionCode = TYPE_UI32;
+ if ( 2 <= argc ) goto absorbArg1;
+ } else if (
+ ! strcmp( argPtr, "ui64" ) || ! strcmp( argPtr, "uint64" )
+ ) {
+ functionCode = TYPE_UI64;
+ if ( 2 <= argc ) goto absorbArg1;
+ } else if (
+ ! strcmp( argPtr, "i32" ) || ! strcmp( argPtr, "int32" )
+ ) {
+ functionCode = TYPE_I32;
+ if ( 2 <= argc ) goto absorbArg1;
+ } else if (
+ ! strcmp( argPtr, "i64" ) || ! strcmp( argPtr, "int64" )
+ ) {
+ functionCode = TYPE_I64;
+ if ( 2 <= argc ) goto absorbArg1;
+#ifdef FLOAT16
+ } else if (
+ ! strcmp( argPtr, "f16" ) || ! strcmp( argPtr, "float16" )
+ ) {
+ functionCode = TYPE_F16;
+ goto absorbArg;
+#endif
+ } else if (
+ ! strcmp( argPtr, "f32" ) || ! strcmp( argPtr, "float32" )
+ ) {
+ functionCode = TYPE_F32;
+#ifdef FLOAT64
+ goto absorbArg;
+ } else if (
+ ! strcmp( argPtr, "f64" ) || ! strcmp( argPtr, "float64" )
+ ) {
+ functionCode = TYPE_F64;
+#endif
+#ifdef EXTFLOAT80
+ goto absorbArg;
+ } else if (
+ ! strcmp( argPtr, "extF80" ) || ! strcmp( argPtr, "extFloat80" )
+ ) {
+ functionCode = TYPE_EXTF80;
+#endif
+#ifdef FLOAT128
+ goto absorbArg;
+ } else if (
+ ! strcmp( argPtr, "f128" ) || ! strcmp( argPtr, "float128" )
+ ) {
+ functionCode = TYPE_F128;
+#endif
+ absorbArg:
+ if ( 2 <= argc ) {
+ if ( ! strcmp( argv[1], "2" ) ) {
+ --argc;
+ ++argv;
+ ++functionCode;
+ } else if ( ! strcmp( argv[1], "3" ) ) {
+ --argc;
+ ++argv;
+ functionCode += 2;
+ } else {
+ absorbArg1:
+ if ( ! strcmp( argv[1], "1" ) ) {
+ --argc;
+ ++argv;
+ }
+ }
+ }
+ } else {
+ functionCode = 1;
+ while ( strcmp( argPtr, functionInfos[functionCode].namePtr ) ) {
+ ++functionCode;
+ if ( functionCode == NUM_FUNCTIONS ) goto invalidArg;
+ }
+ functionAttribs = functionInfos[functionCode].attribs;
+ if (
+ (functionAttribs & FUNC_ARG_EXACT)
+ && ! (functionAttribs & FUNC_ARG_ROUNDINGMODE)
+ ) {
+ goto invalidArg;
+ }
+ }
+ }
+ if ( ! functionCode ) fail( "Type or function argument required" );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ if ( prefixTextPtr ) {
+ fputs( prefixTextPtr, stdout );
+ fputc( '\n', stdout );
+ }
+ softfloat_roundingMode = roundingMode;
+ signal( SIGINT, catchSIGINT );
+ signal( SIGTERM, catchSIGINT );
+ switch ( functionCode ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ case TYPE_UI32:
+ gen_a_ui32();
+ break;
+ case TYPE_UI64:
+ gen_a_ui64();
+ break;
+ case TYPE_I32:
+ gen_a_i32();
+ break;
+ case TYPE_I64:
+ gen_a_i64();
+ break;
+#ifdef FLOAT16
+ case TYPE_F16:
+ gen_a_f16();
+ break;
+ case TYPE_F16_2:
+ gen_ab_f16();
+ break;
+ case TYPE_F16_3:
+ gen_abc_f16();
+ break;
+#endif
+ case TYPE_F32:
+ gen_a_f32();
+ break;
+ case TYPE_F32_2:
+ gen_ab_f32();
+ break;
+ case TYPE_F32_3:
+ gen_abc_f32();
+ break;
+#ifdef FLOAT64
+ case TYPE_F64:
+ gen_a_f64();
+ break;
+ case TYPE_F64_2:
+ gen_ab_f64();
+ break;
+ case TYPE_F64_3:
+ gen_abc_f64();
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case TYPE_EXTF80:
+ gen_a_extF80();
+ break;
+ case TYPE_EXTF80_2:
+ gen_ab_extF80();
+ break;
+ case TYPE_EXTF80_3:
+ gen_abc_extF80();
+ break;
+#endif
+#ifdef FLOAT128
+ case TYPE_F128:
+ gen_a_f128();
+ break;
+ case TYPE_F128_2:
+ gen_ab_f128();
+ break;
+ case TYPE_F128_3:
+ gen_abc_f128();
+ break;
+#endif
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef FLOAT16
+ case UI32_TO_F16:
+ gen_a_ui32_z_f16( ui32_to_f16 );
+ break;
+#endif
+ case UI32_TO_F32:
+ gen_a_ui32_z_f32( ui32_to_f32 );
+ break;
+#ifdef FLOAT64
+ case UI32_TO_F64:
+ gen_a_ui32_z_f64( ui32_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case UI32_TO_EXTF80:
+ gen_a_ui32_z_extF80( ui32_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case UI32_TO_F128:
+ gen_a_ui32_z_f128( ui32_to_f128M );
+ break;
+#endif
+#ifdef FLOAT16
+ case UI64_TO_F16:
+ gen_a_ui64_z_f16( ui64_to_f16 );
+ break;
+#endif
+ case UI64_TO_F32:
+ gen_a_ui64_z_f32( ui64_to_f32 );
+ break;
+#ifdef FLOAT64
+ case UI64_TO_F64:
+ gen_a_ui64_z_f64( ui64_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case UI64_TO_EXTF80:
+ gen_a_ui64_z_extF80( ui64_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case UI64_TO_F128:
+ gen_a_ui64_z_f128( ui64_to_f128M );
+ break;
+#endif
+#ifdef FLOAT16
+ case I32_TO_F16:
+ gen_a_i32_z_f16( i32_to_f16 );
+ break;
+#endif
+ case I32_TO_F32:
+ gen_a_i32_z_f32( i32_to_f32 );
+ break;
+#ifdef FLOAT64
+ case I32_TO_F64:
+ gen_a_i32_z_f64( i32_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case I32_TO_EXTF80:
+ gen_a_i32_z_extF80( i32_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case I32_TO_F128:
+ gen_a_i32_z_f128( i32_to_f128M );
+ break;
+#endif
+#ifdef FLOAT16
+ case I64_TO_F16:
+ gen_a_i64_z_f16( i64_to_f16 );
+ break;
+#endif
+ case I64_TO_F32:
+ gen_a_i64_z_f32( i64_to_f32 );
+ break;
+#ifdef FLOAT64
+ case I64_TO_F64:
+ gen_a_i64_z_f64( i64_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case I64_TO_EXTF80:
+ gen_a_i64_z_extF80( i64_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case I64_TO_F128:
+ gen_a_i64_z_f128( i64_to_f128M );
+ break;
+#endif
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef FLOAT16
+ case F16_TO_UI32:
+ gen_a_f16_z_ui32_rx( f16_to_ui32, roundingMode, exact );
+ break;
+ case F16_TO_UI64:
+ gen_a_f16_z_ui64_rx( f16_to_ui64, roundingMode, exact );
+ break;
+ case F16_TO_I32:
+ gen_a_f16_z_i32_rx( f16_to_i32, roundingMode, exact );
+ break;
+ case F16_TO_I64:
+ gen_a_f16_z_i64_rx( f16_to_i64, roundingMode, exact );
+ break;
+ case F16_TO_F32:
+ gen_a_f16_z_f32( f16_to_f32 );
+ break;
+#ifdef FLOAT64
+ case F16_TO_F64:
+ gen_a_f16_z_f64( f16_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case F16_TO_EXTF80:
+ gen_a_f16_z_extF80( f16_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case F16_TO_F128:
+ gen_a_f16_z_f128( f16_to_f128M );
+ break;
+#endif
+ case F16_ROUNDTOINT:
+ gen_az_f16_rx( f16_roundToInt, roundingMode, exact );
+ break;
+ case F16_ADD:
+ trueFunction_abz_f16 = f16_add;
+ goto gen_abz_f16;
+ case F16_SUB:
+ trueFunction_abz_f16 = f16_sub;
+ goto gen_abz_f16;
+ case F16_MUL:
+ trueFunction_abz_f16 = f16_mul;
+ goto gen_abz_f16;
+ case F16_DIV:
+ trueFunction_abz_f16 = f16_div;
+ goto gen_abz_f16;
+ case F16_REM:
+ trueFunction_abz_f16 = f16_rem;
+ gen_abz_f16:
+ gen_abz_f16( trueFunction_abz_f16 );
+ break;
+ case F16_MULADD:
+ gen_abcz_f16( f16_mulAdd );
+ break;
+ case F16_SQRT:
+ gen_az_f16( f16_sqrt );
+ break;
+ case F16_EQ:
+ trueFunction_ab_f16_z_bool = f16_eq;
+ goto gen_ab_f16_z_bool;
+ case F16_LE:
+ trueFunction_ab_f16_z_bool = f16_le;
+ goto gen_ab_f16_z_bool;
+ case F16_LT:
+ trueFunction_ab_f16_z_bool = f16_lt;
+ goto gen_ab_f16_z_bool;
+ case F16_EQ_SIGNALING:
+ trueFunction_ab_f16_z_bool = f16_eq_signaling;
+ goto gen_ab_f16_z_bool;
+ case F16_LE_QUIET:
+ trueFunction_ab_f16_z_bool = f16_le_quiet;
+ goto gen_ab_f16_z_bool;
+ case F16_LT_QUIET:
+ trueFunction_ab_f16_z_bool = f16_lt_quiet;
+ gen_ab_f16_z_bool:
+ gen_ab_f16_z_bool( trueFunction_ab_f16_z_bool );
+ break;
+#endif
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ case F32_TO_UI32:
+ gen_a_f32_z_ui32_rx( f32_to_ui32, roundingMode, exact );
+ break;
+ case F32_TO_UI64:
+ gen_a_f32_z_ui64_rx( f32_to_ui64, roundingMode, exact );
+ break;
+ case F32_TO_I32:
+ gen_a_f32_z_i32_rx( f32_to_i32, roundingMode, exact );
+ break;
+ case F32_TO_I64:
+ gen_a_f32_z_i64_rx( f32_to_i64, roundingMode, exact );
+ break;
+#ifdef FLOAT16
+ case F32_TO_F16:
+ gen_a_f32_z_f16( f32_to_f16 );
+ break;
+#endif
+#ifdef FLOAT64
+ case F32_TO_F64:
+ gen_a_f32_z_f64( f32_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case F32_TO_EXTF80:
+ gen_a_f32_z_extF80( f32_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case F32_TO_F128:
+ gen_a_f32_z_f128( f32_to_f128M );
+ break;
+#endif
+ case F32_ROUNDTOINT:
+ gen_az_f32_rx( f32_roundToInt, roundingMode, exact );
+ break;
+ case F32_ADD:
+ trueFunction_abz_f32 = f32_add;
+ goto gen_abz_f32;
+ case F32_SUB:
+ trueFunction_abz_f32 = f32_sub;
+ goto gen_abz_f32;
+ case F32_MUL:
+ trueFunction_abz_f32 = f32_mul;
+ goto gen_abz_f32;
+ case F32_DIV:
+ trueFunction_abz_f32 = f32_div;
+ goto gen_abz_f32;
+ case F32_REM:
+ trueFunction_abz_f32 = f32_rem;
+ gen_abz_f32:
+ gen_abz_f32( trueFunction_abz_f32 );
+ break;
+ case F32_MULADD:
+ gen_abcz_f32( f32_mulAdd );
+ break;
+ case F32_SQRT:
+ gen_az_f32( f32_sqrt );
+ break;
+ case F32_EQ:
+ trueFunction_ab_f32_z_bool = f32_eq;
+ goto gen_ab_f32_z_bool;
+ case F32_LE:
+ trueFunction_ab_f32_z_bool = f32_le;
+ goto gen_ab_f32_z_bool;
+ case F32_LT:
+ trueFunction_ab_f32_z_bool = f32_lt;
+ goto gen_ab_f32_z_bool;
+ case F32_EQ_SIGNALING:
+ trueFunction_ab_f32_z_bool = f32_eq_signaling;
+ goto gen_ab_f32_z_bool;
+ case F32_LE_QUIET:
+ trueFunction_ab_f32_z_bool = f32_le_quiet;
+ goto gen_ab_f32_z_bool;
+ case F32_LT_QUIET:
+ trueFunction_ab_f32_z_bool = f32_lt_quiet;
+ gen_ab_f32_z_bool:
+ gen_ab_f32_z_bool( trueFunction_ab_f32_z_bool );
+ break;
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef FLOAT64
+ case F64_TO_UI32:
+ gen_a_f64_z_ui32_rx( f64_to_ui32, roundingMode, exact );
+ break;
+ case F64_TO_UI64:
+ gen_a_f64_z_ui64_rx( f64_to_ui64, roundingMode, exact );
+ break;
+ case F64_TO_I32:
+ gen_a_f64_z_i32_rx( f64_to_i32, roundingMode, exact );
+ break;
+ case F64_TO_I64:
+ gen_a_f64_z_i64_rx( f64_to_i64, roundingMode, exact );
+ break;
+#ifdef FLOAT16
+ case F64_TO_F16:
+ gen_a_f64_z_f16( f64_to_f16 );
+ break;
+#endif
+ case F64_TO_F32:
+ gen_a_f64_z_f32( f64_to_f32 );
+ break;
+#ifdef EXTFLOAT80
+ case F64_TO_EXTF80:
+ gen_a_f64_z_extF80( f64_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case F64_TO_F128:
+ gen_a_f64_z_f128( f64_to_f128M );
+ break;
+#endif
+ case F64_ROUNDTOINT:
+ gen_az_f64_rx( f64_roundToInt, roundingMode, exact );
+ break;
+ case F64_ADD:
+ trueFunction_abz_f64 = f64_add;
+ goto gen_abz_f64;
+ case F64_SUB:
+ trueFunction_abz_f64 = f64_sub;
+ goto gen_abz_f64;
+ case F64_MUL:
+ trueFunction_abz_f64 = f64_mul;
+ goto gen_abz_f64;
+ case F64_DIV:
+ trueFunction_abz_f64 = f64_div;
+ goto gen_abz_f64;
+ case F64_REM:
+ trueFunction_abz_f64 = f64_rem;
+ gen_abz_f64:
+ gen_abz_f64( trueFunction_abz_f64 );
+ break;
+ case F64_MULADD:
+ gen_abcz_f64( f64_mulAdd );
+ break;
+ case F64_SQRT:
+ gen_az_f64( f64_sqrt );
+ break;
+ case F64_EQ:
+ trueFunction_ab_f64_z_bool = f64_eq;
+ goto gen_ab_f64_z_bool;
+ case F64_LE:
+ trueFunction_ab_f64_z_bool = f64_le;
+ goto gen_ab_f64_z_bool;
+ case F64_LT:
+ trueFunction_ab_f64_z_bool = f64_lt;
+ goto gen_ab_f64_z_bool;
+ case F64_EQ_SIGNALING:
+ trueFunction_ab_f64_z_bool = f64_eq_signaling;
+ goto gen_ab_f64_z_bool;
+ case F64_LE_QUIET:
+ trueFunction_ab_f64_z_bool = f64_le_quiet;
+ goto gen_ab_f64_z_bool;
+ case F64_LT_QUIET:
+ trueFunction_ab_f64_z_bool = f64_lt_quiet;
+ gen_ab_f64_z_bool:
+ gen_ab_f64_z_bool( trueFunction_ab_f64_z_bool );
+ break;
+#endif
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef EXTFLOAT80
+ case EXTF80_TO_UI32:
+ gen_a_extF80_z_ui32_rx( extF80M_to_ui32, roundingMode, exact );
+ break;
+ case EXTF80_TO_UI64:
+ gen_a_extF80_z_ui64_rx( extF80M_to_ui64, roundingMode, exact );
+ break;
+ case EXTF80_TO_I32:
+ gen_a_extF80_z_i32_rx( extF80M_to_i32, roundingMode, exact );
+ break;
+ case EXTF80_TO_I64:
+ gen_a_extF80_z_i64_rx( extF80M_to_i64, roundingMode, exact );
+ break;
+#ifdef FLOAT16
+ case EXTF80_TO_F16:
+ gen_a_extF80_z_f16( extF80M_to_f16 );
+ break;
+#endif
+ case EXTF80_TO_F32:
+ gen_a_extF80_z_f32( extF80M_to_f32 );
+ break;
+#ifdef FLOAT64
+ case EXTF80_TO_F64:
+ gen_a_extF80_z_f64( extF80M_to_f64 );
+ break;
+#endif
+#ifdef FLOAT128
+ case EXTF80_TO_F128:
+ gen_a_extF80_z_f128( extF80M_to_f128M );
+ break;
+#endif
+ case EXTF80_ROUNDTOINT:
+ gen_az_extF80_rx( extF80M_roundToInt, roundingMode, exact );
+ break;
+ case EXTF80_ADD:
+ trueFunction_abz_extF80 = extF80M_add;
+ goto gen_abz_extF80;
+ case EXTF80_SUB:
+ trueFunction_abz_extF80 = extF80M_sub;
+ goto gen_abz_extF80;
+ case EXTF80_MUL:
+ trueFunction_abz_extF80 = extF80M_mul;
+ goto gen_abz_extF80;
+ case EXTF80_DIV:
+ trueFunction_abz_extF80 = extF80M_div;
+ goto gen_abz_extF80;
+ case EXTF80_REM:
+ trueFunction_abz_extF80 = extF80M_rem;
+ gen_abz_extF80:
+ gen_abz_extF80( trueFunction_abz_extF80 );
+ break;
+ case EXTF80_SQRT:
+ gen_az_extF80( extF80M_sqrt );
+ break;
+ case EXTF80_EQ:
+ trueFunction_ab_extF80_z_bool = extF80M_eq;
+ goto gen_ab_extF80_z_bool;
+ case EXTF80_LE:
+ trueFunction_ab_extF80_z_bool = extF80M_le;
+ goto gen_ab_extF80_z_bool;
+ case EXTF80_LT:
+ trueFunction_ab_extF80_z_bool = extF80M_lt;
+ goto gen_ab_extF80_z_bool;
+ case EXTF80_EQ_SIGNALING:
+ trueFunction_ab_extF80_z_bool = extF80M_eq_signaling;
+ goto gen_ab_extF80_z_bool;
+ case EXTF80_LE_QUIET:
+ trueFunction_ab_extF80_z_bool = extF80M_le_quiet;
+ goto gen_ab_extF80_z_bool;
+ case EXTF80_LT_QUIET:
+ trueFunction_ab_extF80_z_bool = extF80M_lt_quiet;
+ gen_ab_extF80_z_bool:
+ gen_ab_extF80_z_bool( trueFunction_ab_extF80_z_bool );
+ break;
+#endif
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef FLOAT128
+ case F128_TO_UI32:
+ gen_a_f128_z_ui32_rx( f128M_to_ui32, roundingMode, exact );
+ break;
+ case F128_TO_UI64:
+ gen_a_f128_z_ui64_rx( f128M_to_ui64, roundingMode, exact );
+ break;
+ case F128_TO_I32:
+ gen_a_f128_z_i32_rx( f128M_to_i32, roundingMode, exact );
+ break;
+ case F128_TO_I64:
+ gen_a_f128_z_i64_rx( f128M_to_i64, roundingMode, exact );
+ break;
+#ifdef FLOAT16
+ case F128_TO_F16:
+ gen_a_f128_z_f16( f128M_to_f16 );
+ break;
+#endif
+ case F128_TO_F32:
+ gen_a_f128_z_f32( f128M_to_f32 );
+ break;
+#ifdef FLOAT64
+ case F128_TO_F64:
+ gen_a_f128_z_f64( f128M_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case F128_TO_EXTF80:
+ gen_a_f128_z_extF80( f128M_to_extF80M );
+ break;
+#endif
+ case F128_ROUNDTOINT:
+ gen_az_f128_rx( f128M_roundToInt, roundingMode, exact );
+ break;
+ case F128_ADD:
+ trueFunction_abz_f128 = f128M_add;
+ goto gen_abz_f128;
+ case F128_SUB:
+ trueFunction_abz_f128 = f128M_sub;
+ goto gen_abz_f128;
+ case F128_MUL:
+ trueFunction_abz_f128 = f128M_mul;
+ goto gen_abz_f128;
+ case F128_DIV:
+ trueFunction_abz_f128 = f128M_div;
+ goto gen_abz_f128;
+ case F128_REM:
+ trueFunction_abz_f128 = f128M_rem;
+ gen_abz_f128:
+ gen_abz_f128( trueFunction_abz_f128 );
+ break;
+ case F128_MULADD:
+ gen_abcz_f128( f128M_mulAdd );
+ break;
+ case F128_SQRT:
+ gen_az_f128( f128M_sqrt );
+ break;
+ case F128_EQ:
+ trueFunction_ab_f128_z_bool = f128M_eq;
+ goto gen_ab_f128_z_bool;
+ case F128_LE:
+ trueFunction_ab_f128_z_bool = f128M_le;
+ goto gen_ab_f128_z_bool;
+ case F128_LT:
+ trueFunction_ab_f128_z_bool = f128M_lt;
+ goto gen_ab_f128_z_bool;
+ case F128_EQ_SIGNALING:
+ trueFunction_ab_f128_z_bool = f128M_eq_signaling;
+ goto gen_ab_f128_z_bool;
+ case F128_LE_QUIET:
+ trueFunction_ab_f128_z_bool = f128M_le_quiet;
+ goto gen_ab_f128_z_bool;
+ case F128_LT_QUIET:
+ trueFunction_ab_f128_z_bool = f128M_lt_quiet;
+ gen_ab_f128_z_bool:
+ gen_ab_f128_z_bool( trueFunction_ab_f128_z_bool );
+ break;
+#endif
+ }
+ return EXIT_SUCCESS;
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ optionError:
+ fail( "'%s' option requires numeric argument", *argv );
+ invalidArg:
+ fail( "Invalid argument '%s'", *argv );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/testfloat_ver.c b/src/libs/softfloat-3e/testfloat/source/testfloat_ver.c
new file mode 100644
index 00000000..e1e613ce
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/testfloat_ver.c
@@ -0,0 +1,795 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <signal.h>
+#include "platform.h"
+#include "fail.h"
+#include "softfloat.h"
+#include "functions.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "verLoops.h"
+
+static void catchSIGINT( int signalCode )
+{
+
+ if ( verCases_stop ) exit( EXIT_FAILURE );
+ verCases_stop = true;
+
+}
+
+int main( int argc, char *argv[] )
+{
+ bool exact;
+ int functionCode, roundingCode, tininessCode;
+ const char *argPtr;
+ long i;
+ int functionAttribs;
+ uint_fast8_t roundingMode;
+#ifdef FLOAT16
+ float16_t (*trueFunction_abz_f16)( float16_t, float16_t );
+ bool (*trueFunction_ab_f16_z_bool)( float16_t, float16_t );
+#endif
+ float32_t (*trueFunction_abz_f32)( float32_t, float32_t );
+ bool (*trueFunction_ab_f32_z_bool)( float32_t, float32_t );
+#ifdef FLOAT64
+ float64_t (*trueFunction_abz_f64)( float64_t, float64_t );
+ bool (*trueFunction_ab_f64_z_bool)( float64_t, float64_t );
+#endif
+#ifdef EXTFLOAT80
+ void
+ (*trueFunction_abz_extF80)(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+ bool
+ (*trueFunction_ab_extF80_z_bool)(
+ const extFloat80_t *, const extFloat80_t * );
+#endif
+#ifdef FLOAT128
+ void
+ (*trueFunction_abz_f128)(
+ const float128_t *, const float128_t *, float128_t * );
+ bool
+ (*trueFunction_ab_f128_z_bool)( const float128_t *, const float128_t * );
+#endif
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ fail_programName = "testfloat_ver";
+ if ( argc <= 1 ) goto writeHelpMessage;
+ softfloat_detectTininess = softfloat_tininess_afterRounding;
+#ifdef EXTFLOAT80
+ extF80_roundingPrecision = 80;
+#endif
+ roundingMode = softfloat_round_near_even;
+ exact = false;
+ verCases_maxErrorCount = 20;
+ verLoops_trueFlagsPtr = &softfloat_exceptionFlags;
+ functionCode = 0;
+ roundingCode = ROUND_NEAR_EVEN;
+ tininessCode = TININESS_AFTER_ROUNDING;
+ for (;;) {
+ --argc;
+ if ( ! argc ) break;
+ argPtr = *++argv;
+ if ( ! argPtr ) break;
+ if ( argPtr[0] == '-' ) ++argPtr;
+ if (
+ ! strcmp( argPtr, "help" ) || ! strcmp( argPtr, "-help" )
+ || ! strcmp( argPtr, "h" )
+ ) {
+ writeHelpMessage:
+ fputs(
+"testfloat_ver [<option>...] <function>\n"
+" <option>: (* is default)\n"
+" -help --Write this message and exit.\n"
+" -errors <num> --Stop after <num> errors.\n"
+" * -errors 20\n"
+" -checkNaNs --Check for specific NaN results.\n"
+" -checkInvInts --Check for specific invalid integer results.\n"
+" -checkAll --Same as both '-checkNaNs' and '-checkInvInts'.\n"
+#ifdef EXTFLOAT80
+" -precision32 --For extF80, rounding precision is 32 bits.\n"
+" -precision64 --For extF80, rounding precision is 64 bits.\n"
+" * -precision80 --For extF80, rounding precision is 80 bits.\n"
+#endif
+" * -rnear_even --Round to nearest/even.\n"
+" -rminMag --Round to minimum magnitude (toward zero).\n"
+" -rmin --Round to minimum (down).\n"
+" -rmax --Round to maximum (up).\n"
+" -rnear_maxMag --Round to nearest/maximum magnitude (nearest/away).\n"
+#ifdef FLOAT_ROUND_ODD
+" -rodd --Round to odd (jamming). (For rounding to an integer\n"
+" value, rounds to minimum magnitude instead.)\n"
+#endif
+" -tininessbefore --Detect underflow tininess before rounding.\n"
+" * -tininessafter --Detect underflow tininess after rounding.\n"
+" * -notexact --Rounding to integer is not exact (no inexact\n"
+" exceptions).\n"
+" -exact --Rounding to integer is exact (raising inexact\n"
+" exceptions).\n"
+" <function>:\n"
+" <int>_to_<float> <float>_add <float>_eq\n"
+" <float>_to_<int> <float>_sub <float>_le\n"
+" <float>_to_<float> <float>_mul <float>_lt\n"
+" <float>_roundToInt <float>_mulAdd <float>_eq_signaling\n"
+" <float>_div <float>_le_quiet\n"
+" <float>_rem <float>_lt_quiet\n"
+" <float>_sqrt\n"
+" <int>:\n"
+" ui32 --Unsigned 32-bit integer.\n"
+" ui64 --Unsigned 64-bit integer.\n"
+" i32 --Signed 32-bit integer.\n"
+" i64 --Signed 64-bit integer.\n"
+" <float>:\n"
+#ifdef FLOAT16
+" f16 --Binary 16-bit floating-point (half-precision).\n"
+#endif
+" f32 --Binary 32-bit floating-point (single-precision).\n"
+#ifdef FLOAT64
+" f64 --Binary 64-bit floating-point (double-precision).\n"
+#endif
+#ifdef EXTFLOAT80
+" extF80 --Binary 80-bit extended floating-point.\n"
+#endif
+#ifdef FLOAT128
+" f128 --Binary 128-bit floating-point (quadruple-precision).\n"
+#endif
+ ,
+ stdout
+ );
+ return EXIT_SUCCESS;
+ } else if ( ! strcmp( argPtr, "errors" ) ) {
+ if ( argc < 2 ) goto optionError;
+ i = strtol( argv[1], (char **) &argPtr, 10 );
+ if ( *argPtr ) goto optionError;
+ verCases_maxErrorCount = i;
+ --argc;
+ ++argv;
+ } else if (
+ ! strcmp( argPtr, "checkNaNs" ) || ! strcmp( argPtr, "checknans" )
+ ) {
+ verCases_checkNaNs = true;
+ } else if (
+ ! strcmp( argPtr, "checkInvInts" )
+ || ! strcmp( argPtr, "checkinvints" )
+ ) {
+ verCases_checkInvInts = true;
+ } else if (
+ ! strcmp( argPtr, "checkAll" ) || ! strcmp( argPtr, "checkall" )
+ ) {
+ verCases_checkNaNs = true;
+ verCases_checkInvInts = true;
+#ifdef EXTFLOAT80
+ } else if ( ! strcmp( argPtr, "precision32" ) ) {
+ extF80_roundingPrecision = 32;
+ } else if ( ! strcmp( argPtr, "precision64" ) ) {
+ extF80_roundingPrecision = 64;
+ } else if ( ! strcmp( argPtr, "precision80" ) ) {
+ extF80_roundingPrecision = 80;
+#endif
+ } else if (
+ ! strcmp( argPtr, "rnear_even" )
+ || ! strcmp( argPtr, "rneareven" )
+ || ! strcmp( argPtr, "rnearest_even" )
+ ) {
+ roundingCode = ROUND_NEAR_EVEN;
+ } else if (
+ ! strcmp( argPtr, "rminmag" ) || ! strcmp( argPtr, "rminMag" )
+ ) {
+ roundingCode = ROUND_MINMAG;
+ } else if ( ! strcmp( argPtr, "rmin" ) ) {
+ roundingCode = ROUND_MIN;
+ } else if ( ! strcmp( argPtr, "rmax" ) ) {
+ roundingCode = ROUND_MAX;
+ } else if (
+ ! strcmp( argPtr, "rnear_maxmag" )
+ || ! strcmp( argPtr, "rnear_maxMag" )
+ || ! strcmp( argPtr, "rnearmaxmag" )
+ || ! strcmp( argPtr, "rnearest_maxmag" )
+ || ! strcmp( argPtr, "rnearest_maxMag" )
+ ) {
+ roundingCode = ROUND_NEAR_MAXMAG;
+#ifdef FLOAT_ROUND_ODD
+ } else if ( ! strcmp( argPtr, "rodd" ) ) {
+ roundingCode = ROUND_ODD;
+#endif
+ } else if ( ! strcmp( argPtr, "tininessbefore" ) ) {
+ tininessCode = TININESS_BEFORE_ROUNDING;
+ } else if ( ! strcmp( argPtr, "tininessafter" ) ) {
+ tininessCode = TININESS_AFTER_ROUNDING;
+ } else if ( ! strcmp( argPtr, "notexact" ) ) {
+ exact = false;
+ } else if ( ! strcmp( argPtr, "exact" ) ) {
+ exact = true;
+ } else {
+ functionCode = 1;
+ while ( strcmp( argPtr, functionInfos[functionCode].namePtr ) ) {
+ ++functionCode;
+ if ( functionCode == NUM_FUNCTIONS ) goto invalidArg;
+ }
+ functionAttribs = functionInfos[functionCode].attribs;
+ if (
+ (functionAttribs & FUNC_ARG_EXACT)
+ && ! (functionAttribs & FUNC_ARG_ROUNDINGMODE)
+ ) {
+ goto invalidArg;
+ }
+ }
+ }
+ if ( ! functionCode ) fail( "Function argument required" );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ verCases_functionNamePtr = functionInfos[functionCode].namePtr;
+#ifdef EXTFLOAT80
+ verCases_roundingPrecision =
+ functionAttribs & FUNC_EFF_ROUNDINGPRECISION ? extF80_roundingPrecision
+ : 0;
+#endif
+ verCases_roundingCode =
+ functionAttribs & (FUNC_ARG_ROUNDINGMODE | FUNC_EFF_ROUNDINGMODE)
+ ? roundingCode
+ : 0;
+#ifdef EXTFLOAT80
+ verCases_tininessCode =
+ (functionAttribs & FUNC_EFF_TININESSMODE)
+ || ((functionAttribs & FUNC_EFF_TININESSMODE_REDUCEDPREC)
+ && extF80_roundingPrecision
+ && (extF80_roundingPrecision < 80))
+ ? tininessCode
+ : 0;
+#else
+ verCases_tininessCode =
+ functionAttribs & FUNC_EFF_TININESSMODE ? tininessCode : 0;
+#endif
+ verCases_usesExact = ((functionAttribs & FUNC_ARG_EXACT) != 0);
+ verCases_exact = exact;
+ roundingMode = roundingModes[roundingCode];
+ softfloat_roundingMode = roundingMode;
+ softfloat_detectTininess = tininessModes[tininessCode];
+ signal( SIGINT, catchSIGINT );
+ signal( SIGTERM, catchSIGINT );
+ fputs( "Testing ", stderr );
+ verCases_writeFunctionName( stderr );
+ fputs( ".\n", stderr );
+ switch ( functionCode ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef FLOAT16
+ case UI32_TO_F16:
+ ver_a_ui32_z_f16( ui32_to_f16 );
+ break;
+#endif
+ case UI32_TO_F32:
+ ver_a_ui32_z_f32( ui32_to_f32 );
+ break;
+#ifdef FLOAT64
+ case UI32_TO_F64:
+ ver_a_ui32_z_f64( ui32_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case UI32_TO_EXTF80:
+ ver_a_ui32_z_extF80( ui32_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case UI32_TO_F128:
+ ver_a_ui32_z_f128( ui32_to_f128M );
+ break;
+#endif
+#ifdef FLOAT16
+ case UI64_TO_F16:
+ ver_a_ui64_z_f16( ui64_to_f16 );
+ break;
+#endif
+ case UI64_TO_F32:
+ ver_a_ui64_z_f32( ui64_to_f32 );
+ break;
+#ifdef FLOAT64
+ case UI64_TO_F64:
+ ver_a_ui64_z_f64( ui64_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case UI64_TO_EXTF80:
+ ver_a_ui64_z_extF80( ui64_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case UI64_TO_F128:
+ ver_a_ui64_z_f128( ui64_to_f128M );
+ break;
+#endif
+#ifdef FLOAT16
+ case I32_TO_F16:
+ ver_a_i32_z_f16( i32_to_f16 );
+ break;
+#endif
+ case I32_TO_F32:
+ ver_a_i32_z_f32( i32_to_f32 );
+ break;
+#ifdef FLOAT64
+ case I32_TO_F64:
+ ver_a_i32_z_f64( i32_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case I32_TO_EXTF80:
+ ver_a_i32_z_extF80( i32_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case I32_TO_F128:
+ ver_a_i32_z_f128( i32_to_f128M );
+ break;
+#endif
+#ifdef FLOAT16
+ case I64_TO_F16:
+ ver_a_i64_z_f16( i64_to_f16 );
+ break;
+#endif
+ case I64_TO_F32:
+ ver_a_i64_z_f32( i64_to_f32 );
+ break;
+#ifdef FLOAT64
+ case I64_TO_F64:
+ ver_a_i64_z_f64( i64_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case I64_TO_EXTF80:
+ ver_a_i64_z_extF80( i64_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case I64_TO_F128:
+ ver_a_i64_z_f128( i64_to_f128M );
+ break;
+#endif
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef FLOAT16
+ case F16_TO_UI32:
+ ver_a_f16_z_ui32_rx( f16_to_ui32, roundingMode, exact );
+ break;
+ case F16_TO_UI64:
+ ver_a_f16_z_ui64_rx( f16_to_ui64, roundingMode, exact );
+ break;
+ case F16_TO_I32:
+ ver_a_f16_z_i32_rx( f16_to_i32, roundingMode, exact );
+ break;
+ case F16_TO_I64:
+ ver_a_f16_z_i64_rx( f16_to_i64, roundingMode, exact );
+ break;
+ case F16_TO_F32:
+ ver_a_f16_z_f32( f16_to_f32 );
+ break;
+#ifdef FLOAT64
+ case F16_TO_F64:
+ ver_a_f16_z_f64( f16_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case F16_TO_EXTF80:
+ ver_a_f16_z_extF80( f16_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case F16_TO_F128:
+ ver_a_f16_z_f128( f16_to_f128M );
+ break;
+#endif
+ case F16_ROUNDTOINT:
+ ver_az_f16_rx( f16_roundToInt, roundingMode, exact );
+ break;
+ case F16_ADD:
+ trueFunction_abz_f16 = f16_add;
+ goto ver_abz_f16;
+ case F16_SUB:
+ trueFunction_abz_f16 = f16_sub;
+ goto ver_abz_f16;
+ case F16_MUL:
+ trueFunction_abz_f16 = f16_mul;
+ goto ver_abz_f16;
+ case F16_DIV:
+ trueFunction_abz_f16 = f16_div;
+ goto ver_abz_f16;
+ case F16_REM:
+ trueFunction_abz_f16 = f16_rem;
+ ver_abz_f16:
+ ver_abz_f16( trueFunction_abz_f16 );
+ break;
+ case F16_MULADD:
+ ver_abcz_f16( f16_mulAdd );
+ break;
+ case F16_SQRT:
+ ver_az_f16( f16_sqrt );
+ break;
+ case F16_EQ:
+ trueFunction_ab_f16_z_bool = f16_eq;
+ goto ver_ab_f16_z_bool;
+ case F16_LE:
+ trueFunction_ab_f16_z_bool = f16_le;
+ goto ver_ab_f16_z_bool;
+ case F16_LT:
+ trueFunction_ab_f16_z_bool = f16_lt;
+ goto ver_ab_f16_z_bool;
+ case F16_EQ_SIGNALING:
+ trueFunction_ab_f16_z_bool = f16_eq_signaling;
+ goto ver_ab_f16_z_bool;
+ case F16_LE_QUIET:
+ trueFunction_ab_f16_z_bool = f16_le_quiet;
+ goto ver_ab_f16_z_bool;
+ case F16_LT_QUIET:
+ trueFunction_ab_f16_z_bool = f16_lt_quiet;
+ ver_ab_f16_z_bool:
+ ver_ab_f16_z_bool( trueFunction_ab_f16_z_bool );
+ break;
+#endif
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ case F32_TO_UI32:
+ ver_a_f32_z_ui32_rx( f32_to_ui32, roundingMode, exact );
+ break;
+ case F32_TO_UI64:
+ ver_a_f32_z_ui64_rx( f32_to_ui64, roundingMode, exact );
+ break;
+ case F32_TO_I32:
+ ver_a_f32_z_i32_rx( f32_to_i32, roundingMode, exact );
+ break;
+ case F32_TO_I64:
+ ver_a_f32_z_i64_rx( f32_to_i64, roundingMode, exact );
+ break;
+#ifdef FLOAT16
+ case F32_TO_F16:
+ ver_a_f32_z_f16( f32_to_f16 );
+ break;
+#endif
+#ifdef FLOAT64
+ case F32_TO_F64:
+ ver_a_f32_z_f64( f32_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case F32_TO_EXTF80:
+ ver_a_f32_z_extF80( f32_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case F32_TO_F128:
+ ver_a_f32_z_f128( f32_to_f128M );
+ break;
+#endif
+ case F32_ROUNDTOINT:
+ ver_az_f32_rx( f32_roundToInt, roundingMode, exact );
+ break;
+ case F32_ADD:
+ trueFunction_abz_f32 = f32_add;
+ goto ver_abz_f32;
+ case F32_SUB:
+ trueFunction_abz_f32 = f32_sub;
+ goto ver_abz_f32;
+ case F32_MUL:
+ trueFunction_abz_f32 = f32_mul;
+ goto ver_abz_f32;
+ case F32_DIV:
+ trueFunction_abz_f32 = f32_div;
+ goto ver_abz_f32;
+ case F32_REM:
+ trueFunction_abz_f32 = f32_rem;
+ ver_abz_f32:
+ ver_abz_f32( trueFunction_abz_f32 );
+ break;
+ case F32_MULADD:
+ ver_abcz_f32( f32_mulAdd );
+ break;
+ case F32_SQRT:
+ ver_az_f32( f32_sqrt );
+ break;
+ case F32_EQ:
+ trueFunction_ab_f32_z_bool = f32_eq;
+ goto ver_ab_f32_z_bool;
+ case F32_LE:
+ trueFunction_ab_f32_z_bool = f32_le;
+ goto ver_ab_f32_z_bool;
+ case F32_LT:
+ trueFunction_ab_f32_z_bool = f32_lt;
+ goto ver_ab_f32_z_bool;
+ case F32_EQ_SIGNALING:
+ trueFunction_ab_f32_z_bool = f32_eq_signaling;
+ goto ver_ab_f32_z_bool;
+ case F32_LE_QUIET:
+ trueFunction_ab_f32_z_bool = f32_le_quiet;
+ goto ver_ab_f32_z_bool;
+ case F32_LT_QUIET:
+ trueFunction_ab_f32_z_bool = f32_lt_quiet;
+ ver_ab_f32_z_bool:
+ ver_ab_f32_z_bool( trueFunction_ab_f32_z_bool );
+ break;
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef FLOAT64
+ case F64_TO_UI32:
+ ver_a_f64_z_ui32_rx( f64_to_ui32, roundingMode, exact );
+ break;
+ case F64_TO_UI64:
+ ver_a_f64_z_ui64_rx( f64_to_ui64, roundingMode, exact );
+ break;
+ case F64_TO_I32:
+ ver_a_f64_z_i32_rx( f64_to_i32, roundingMode, exact );
+ break;
+ case F64_TO_I64:
+ ver_a_f64_z_i64_rx( f64_to_i64, roundingMode, exact );
+ break;
+#ifdef FLOAT16
+ case F64_TO_F16:
+ ver_a_f64_z_f16( f64_to_f16 );
+ break;
+#endif
+ case F64_TO_F32:
+ ver_a_f64_z_f32( f64_to_f32 );
+ break;
+#ifdef EXTFLOAT80
+ case F64_TO_EXTF80:
+ ver_a_f64_z_extF80( f64_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case F64_TO_F128:
+ ver_a_f64_z_f128( f64_to_f128M );
+ break;
+#endif
+ case F64_ROUNDTOINT:
+ ver_az_f64_rx( f64_roundToInt, roundingMode, exact );
+ break;
+ case F64_ADD:
+ trueFunction_abz_f64 = f64_add;
+ goto ver_abz_f64;
+ case F64_SUB:
+ trueFunction_abz_f64 = f64_sub;
+ goto ver_abz_f64;
+ case F64_MUL:
+ trueFunction_abz_f64 = f64_mul;
+ goto ver_abz_f64;
+ case F64_DIV:
+ trueFunction_abz_f64 = f64_div;
+ goto ver_abz_f64;
+ case F64_REM:
+ trueFunction_abz_f64 = f64_rem;
+ ver_abz_f64:
+ ver_abz_f64( trueFunction_abz_f64 );
+ break;
+ case F64_MULADD:
+ ver_abcz_f64( f64_mulAdd );
+ break;
+ case F64_SQRT:
+ ver_az_f64( f64_sqrt );
+ break;
+ case F64_EQ:
+ trueFunction_ab_f64_z_bool = f64_eq;
+ goto ver_ab_f64_z_bool;
+ case F64_LE:
+ trueFunction_ab_f64_z_bool = f64_le;
+ goto ver_ab_f64_z_bool;
+ case F64_LT:
+ trueFunction_ab_f64_z_bool = f64_lt;
+ goto ver_ab_f64_z_bool;
+ case F64_EQ_SIGNALING:
+ trueFunction_ab_f64_z_bool = f64_eq_signaling;
+ goto ver_ab_f64_z_bool;
+ case F64_LE_QUIET:
+ trueFunction_ab_f64_z_bool = f64_le_quiet;
+ goto ver_ab_f64_z_bool;
+ case F64_LT_QUIET:
+ trueFunction_ab_f64_z_bool = f64_lt_quiet;
+ ver_ab_f64_z_bool:
+ ver_ab_f64_z_bool( trueFunction_ab_f64_z_bool );
+ break;
+#endif
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef EXTFLOAT80
+ case EXTF80_TO_UI32:
+ ver_a_extF80_z_ui32_rx( extF80M_to_ui32, roundingMode, exact );
+ break;
+ case EXTF80_TO_UI64:
+ ver_a_extF80_z_ui64_rx( extF80M_to_ui64, roundingMode, exact );
+ break;
+ case EXTF80_TO_I32:
+ ver_a_extF80_z_i32_rx( extF80M_to_i32, roundingMode, exact );
+ break;
+ case EXTF80_TO_I64:
+ ver_a_extF80_z_i64_rx( extF80M_to_i64, roundingMode, exact );
+ break;
+#ifdef FLOAT16
+ case EXTF80_TO_F16:
+ ver_a_extF80_z_f16( extF80M_to_f16 );
+ break;
+#endif
+ case EXTF80_TO_F32:
+ ver_a_extF80_z_f32( extF80M_to_f32 );
+ break;
+#ifdef FLOAT64
+ case EXTF80_TO_F64:
+ ver_a_extF80_z_f64( extF80M_to_f64 );
+ break;
+#endif
+#ifdef FLOAT128
+ case EXTF80_TO_F128:
+ ver_a_extF80_z_f128( extF80M_to_f128M );
+ break;
+#endif
+ case EXTF80_ROUNDTOINT:
+ ver_az_extF80_rx( extF80M_roundToInt, roundingMode, exact );
+ break;
+ case EXTF80_ADD:
+ trueFunction_abz_extF80 = extF80M_add;
+ goto ver_abz_extF80;
+ case EXTF80_SUB:
+ trueFunction_abz_extF80 = extF80M_sub;
+ goto ver_abz_extF80;
+ case EXTF80_MUL:
+ trueFunction_abz_extF80 = extF80M_mul;
+ goto ver_abz_extF80;
+ case EXTF80_DIV:
+ trueFunction_abz_extF80 = extF80M_div;
+ goto ver_abz_extF80;
+ case EXTF80_REM:
+ trueFunction_abz_extF80 = extF80M_rem;
+ ver_abz_extF80:
+ ver_abz_extF80( trueFunction_abz_extF80 );
+ break;
+ case EXTF80_SQRT:
+ ver_az_extF80( extF80M_sqrt );
+ break;
+ case EXTF80_EQ:
+ trueFunction_ab_extF80_z_bool = extF80M_eq;
+ goto ver_ab_extF80_z_bool;
+ case EXTF80_LE:
+ trueFunction_ab_extF80_z_bool = extF80M_le;
+ goto ver_ab_extF80_z_bool;
+ case EXTF80_LT:
+ trueFunction_ab_extF80_z_bool = extF80M_lt;
+ goto ver_ab_extF80_z_bool;
+ case EXTF80_EQ_SIGNALING:
+ trueFunction_ab_extF80_z_bool = extF80M_eq_signaling;
+ goto ver_ab_extF80_z_bool;
+ case EXTF80_LE_QUIET:
+ trueFunction_ab_extF80_z_bool = extF80M_le_quiet;
+ goto ver_ab_extF80_z_bool;
+ case EXTF80_LT_QUIET:
+ trueFunction_ab_extF80_z_bool = extF80M_lt_quiet;
+ ver_ab_extF80_z_bool:
+ ver_ab_extF80_z_bool( trueFunction_ab_extF80_z_bool );
+ break;
+#endif
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef FLOAT128
+ case F128_TO_UI32:
+ ver_a_f128_z_ui32_rx( f128M_to_ui32, roundingMode, exact );
+ break;
+ case F128_TO_UI64:
+ ver_a_f128_z_ui64_rx( f128M_to_ui64, roundingMode, exact );
+ break;
+ case F128_TO_I32:
+ ver_a_f128_z_i32_rx( f128M_to_i32, roundingMode, exact );
+ break;
+ case F128_TO_I64:
+ ver_a_f128_z_i64_rx( f128M_to_i64, roundingMode, exact );
+ break;
+#ifdef FLOAT16
+ case F128_TO_F16:
+ ver_a_f128_z_f16( f128M_to_f16 );
+ break;
+#endif
+ case F128_TO_F32:
+ ver_a_f128_z_f32( f128M_to_f32 );
+ break;
+#ifdef FLOAT64
+ case F128_TO_F64:
+ ver_a_f128_z_f64( f128M_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case F128_TO_EXTF80:
+ ver_a_f128_z_extF80( f128M_to_extF80M );
+ break;
+#endif
+ case F128_ROUNDTOINT:
+ ver_az_f128_rx( f128M_roundToInt, roundingMode, exact );
+ break;
+ case F128_ADD:
+ trueFunction_abz_f128 = f128M_add;
+ goto ver_abz_f128;
+ case F128_SUB:
+ trueFunction_abz_f128 = f128M_sub;
+ goto ver_abz_f128;
+ case F128_MUL:
+ trueFunction_abz_f128 = f128M_mul;
+ goto ver_abz_f128;
+ case F128_DIV:
+ trueFunction_abz_f128 = f128M_div;
+ goto ver_abz_f128;
+ case F128_REM:
+ trueFunction_abz_f128 = f128M_rem;
+ ver_abz_f128:
+ ver_abz_f128( trueFunction_abz_f128 );
+ break;
+ case F128_MULADD:
+ ver_abcz_f128( f128M_mulAdd );
+ break;
+ case F128_SQRT:
+ ver_az_f128( f128M_sqrt );
+ break;
+ case F128_EQ:
+ trueFunction_ab_f128_z_bool = f128M_eq;
+ goto ver_ab_f128_z_bool;
+ case F128_LE:
+ trueFunction_ab_f128_z_bool = f128M_le;
+ goto ver_ab_f128_z_bool;
+ case F128_LT:
+ trueFunction_ab_f128_z_bool = f128M_lt;
+ goto ver_ab_f128_z_bool;
+ case F128_EQ_SIGNALING:
+ trueFunction_ab_f128_z_bool = f128M_eq_signaling;
+ goto ver_ab_f128_z_bool;
+ case F128_LE_QUIET:
+ trueFunction_ab_f128_z_bool = f128M_le_quiet;
+ goto ver_ab_f128_z_bool;
+ case F128_LT_QUIET:
+ trueFunction_ab_f128_z_bool = f128M_lt_quiet;
+ ver_ab_f128_z_bool:
+ ver_ab_f128_z_bool( trueFunction_ab_f128_z_bool );
+ break;
+#endif
+ }
+ verCases_exitWithStatus();
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ optionError:
+ fail( "'%s' option requires numeric argument", *argv );
+ invalidArg:
+ fail( "Invalid argument '%s'", *argv );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/testsoftfloat.c b/src/libs/softfloat-3e/testfloat/source/testsoftfloat.c
new file mode 100644
index 00000000..1aa1f025
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/testsoftfloat.c
@@ -0,0 +1,1127 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <signal.h>
+#include "platform.h"
+#include "fail.h"
+#include "softfloat.h"
+#include "slowfloat.h"
+#include "functions.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+static void catchSIGINT( int signalCode )
+{
+
+ if ( verCases_stop ) exit( EXIT_FAILURE );
+ verCases_stop = true;
+
+}
+
+static uint_fast8_t softfloat_clearExceptionFlags( void )
+{
+ uint_fast8_t prevFlags;
+
+ prevFlags = softfloat_exceptionFlags;
+ softfloat_exceptionFlags = 0;
+ return prevFlags;
+
+}
+
+static
+void
+ testFunctionInstance(
+ int functionCode, uint_fast8_t roundingMode, bool exact )
+{
+#ifdef FLOAT16
+ float16_t (*trueFunction_abz_f16)( float16_t, float16_t );
+ float16_t (*subjFunction_abz_f16)( float16_t, float16_t );
+ bool (*trueFunction_ab_f16_z_bool)( float16_t, float16_t );
+ bool (*subjFunction_ab_f16_z_bool)( float16_t, float16_t );
+#endif
+ float32_t (*trueFunction_abz_f32)( float32_t, float32_t );
+ float32_t (*subjFunction_abz_f32)( float32_t, float32_t );
+ bool (*trueFunction_ab_f32_z_bool)( float32_t, float32_t );
+ bool (*subjFunction_ab_f32_z_bool)( float32_t, float32_t );
+#ifdef FLOAT64
+ float64_t (*trueFunction_abz_f64)( float64_t, float64_t );
+ float64_t (*subjFunction_abz_f64)( float64_t, float64_t );
+ bool (*trueFunction_ab_f64_z_bool)( float64_t, float64_t );
+ bool (*subjFunction_ab_f64_z_bool)( float64_t, float64_t );
+#endif
+#ifdef EXTFLOAT80
+ void (*trueFunction_abz_extF80M)(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+ void (*subjFunction_abz_extF80M)(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+ bool (*trueFunction_ab_extF80M_z_bool)(
+ const extFloat80_t *, const extFloat80_t * );
+ bool (*subjFunction_ab_extF80M_z_bool)(
+ const extFloat80_t *, const extFloat80_t * );
+#endif
+#ifdef FLOAT128
+ void (*trueFunction_abz_f128M)(
+ const float128_t *, const float128_t *, float128_t * );
+ void (*subjFunction_abz_f128M)(
+ const float128_t *, const float128_t *, float128_t * );
+ bool (*trueFunction_ab_f128M_z_bool)(
+ const float128_t *, const float128_t * );
+ bool (*subjFunction_ab_f128M_z_bool)(
+ const float128_t *, const float128_t * );
+#endif
+
+ fputs( "Testing ", stderr );
+ verCases_writeFunctionName( stderr );
+ fputs( ".\n", stderr );
+ switch ( functionCode ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef FLOAT16
+ case UI32_TO_F16:
+ test_a_ui32_z_f16( slow_ui32_to_f16, ui32_to_f16 );
+ break;
+#endif
+ case UI32_TO_F32:
+ test_a_ui32_z_f32( slow_ui32_to_f32, ui32_to_f32 );
+ break;
+#ifdef FLOAT64
+ case UI32_TO_F64:
+ test_a_ui32_z_f64( slow_ui32_to_f64, ui32_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case UI32_TO_EXTF80:
+ test_a_ui32_z_extF80( slow_ui32_to_extF80M, ui32_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case UI32_TO_F128:
+ test_a_ui32_z_f128( slow_ui32_to_f128M, ui32_to_f128M );
+ break;
+#endif
+#ifdef FLOAT16
+ case UI64_TO_F16:
+ test_a_ui64_z_f16( slow_ui64_to_f16, ui64_to_f16 );
+ break;
+#endif
+ case UI64_TO_F32:
+ test_a_ui64_z_f32( slow_ui64_to_f32, ui64_to_f32 );
+ break;
+#ifdef FLOAT64
+ case UI64_TO_F64:
+ test_a_ui64_z_f64( slow_ui64_to_f64, ui64_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case UI64_TO_EXTF80:
+ test_a_ui64_z_extF80( slow_ui64_to_extF80M, ui64_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case UI64_TO_F128:
+ test_a_ui64_z_f128( slow_ui64_to_f128M, ui64_to_f128M );
+ break;
+#endif
+#ifdef FLOAT16
+ case I32_TO_F16:
+ test_a_i32_z_f16( slow_i32_to_f16, i32_to_f16 );
+ break;
+#endif
+ case I32_TO_F32:
+ test_a_i32_z_f32( slow_i32_to_f32, i32_to_f32 );
+ break;
+#ifdef FLOAT64
+ case I32_TO_F64:
+ test_a_i32_z_f64( slow_i32_to_f64, i32_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case I32_TO_EXTF80:
+ test_a_i32_z_extF80( slow_i32_to_extF80M, i32_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case I32_TO_F128:
+ test_a_i32_z_f128( slow_i32_to_f128M, i32_to_f128M );
+ break;
+#endif
+#ifdef FLOAT16
+ case I64_TO_F16:
+ test_a_i64_z_f16( slow_i64_to_f16, i64_to_f16 );
+ break;
+#endif
+ case I64_TO_F32:
+ test_a_i64_z_f32( slow_i64_to_f32, i64_to_f32 );
+ break;
+#ifdef FLOAT64
+ case I64_TO_F64:
+ test_a_i64_z_f64( slow_i64_to_f64, i64_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case I64_TO_EXTF80:
+ test_a_i64_z_extF80( slow_i64_to_extF80M, i64_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case I64_TO_F128:
+ test_a_i64_z_f128( slow_i64_to_f128M, i64_to_f128M );
+ break;
+#endif
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef FLOAT16
+ case F16_TO_UI32:
+ test_a_f16_z_ui32_rx(
+ slow_f16_to_ui32, f16_to_ui32, roundingMode, exact );
+ break;
+ case F16_TO_UI64:
+ test_a_f16_z_ui64_rx(
+ slow_f16_to_ui64, f16_to_ui64, roundingMode, exact );
+ break;
+ case F16_TO_I32:
+ test_a_f16_z_i32_rx(
+ slow_f16_to_i32, f16_to_i32, roundingMode, exact );
+ break;
+ case F16_TO_I64:
+ test_a_f16_z_i64_rx(
+ slow_f16_to_i64, f16_to_i64, roundingMode, exact );
+ break;
+ case F16_TO_UI32_R_MINMAG:
+ test_a_f16_z_ui32_x(
+ slow_f16_to_ui32_r_minMag, f16_to_ui32_r_minMag, exact );
+ break;
+ case F16_TO_UI64_R_MINMAG:
+ test_a_f16_z_ui64_x(
+ slow_f16_to_ui64_r_minMag, f16_to_ui64_r_minMag, exact );
+ break;
+ case F16_TO_I32_R_MINMAG:
+ test_a_f16_z_i32_x(
+ slow_f16_to_i32_r_minMag, f16_to_i32_r_minMag, exact );
+ break;
+ case F16_TO_I64_R_MINMAG:
+ test_a_f16_z_i64_x(
+ slow_f16_to_i64_r_minMag, f16_to_i64_r_minMag, exact );
+ break;
+ case F16_TO_F32:
+ test_a_f16_z_f32( slow_f16_to_f32, f16_to_f32 );
+ break;
+#ifdef FLOAT64
+ case F16_TO_F64:
+ test_a_f16_z_f64( slow_f16_to_f64, f16_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case F16_TO_EXTF80:
+ test_a_f16_z_extF80( slow_f16_to_extF80M, f16_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case F16_TO_F128:
+ test_a_f16_z_f128( slow_f16_to_f128M, f16_to_f128M );
+ break;
+#endif
+ case F16_ROUNDTOINT:
+ test_az_f16_rx(
+ slow_f16_roundToInt, f16_roundToInt, roundingMode, exact );
+ break;
+ case F16_ADD:
+ trueFunction_abz_f16 = slow_f16_add;
+ subjFunction_abz_f16 = f16_add;
+ goto test_abz_f16;
+ case F16_SUB:
+ trueFunction_abz_f16 = slow_f16_sub;
+ subjFunction_abz_f16 = f16_sub;
+ goto test_abz_f16;
+ case F16_MUL:
+ trueFunction_abz_f16 = slow_f16_mul;
+ subjFunction_abz_f16 = f16_mul;
+ goto test_abz_f16;
+ case F16_DIV:
+ trueFunction_abz_f16 = slow_f16_div;
+ subjFunction_abz_f16 = f16_div;
+ goto test_abz_f16;
+ case F16_REM:
+ trueFunction_abz_f16 = slow_f16_rem;
+ subjFunction_abz_f16 = f16_rem;
+ test_abz_f16:
+ test_abz_f16( trueFunction_abz_f16, subjFunction_abz_f16 );
+ break;
+ case F16_MULADD:
+ test_abcz_f16( slow_f16_mulAdd, f16_mulAdd );
+ break;
+ case F16_SQRT:
+ test_az_f16( slow_f16_sqrt, f16_sqrt );
+ break;
+ case F16_EQ:
+ trueFunction_ab_f16_z_bool = slow_f16_eq;
+ subjFunction_ab_f16_z_bool = f16_eq;
+ goto test_ab_f16_z_bool;
+ case F16_LE:
+ trueFunction_ab_f16_z_bool = slow_f16_le;
+ subjFunction_ab_f16_z_bool = f16_le;
+ goto test_ab_f16_z_bool;
+ case F16_LT:
+ trueFunction_ab_f16_z_bool = slow_f16_lt;
+ subjFunction_ab_f16_z_bool = f16_lt;
+ goto test_ab_f16_z_bool;
+ case F16_EQ_SIGNALING:
+ trueFunction_ab_f16_z_bool = slow_f16_eq_signaling;
+ subjFunction_ab_f16_z_bool = f16_eq_signaling;
+ goto test_ab_f16_z_bool;
+ case F16_LE_QUIET:
+ trueFunction_ab_f16_z_bool = slow_f16_le_quiet;
+ subjFunction_ab_f16_z_bool = f16_le_quiet;
+ goto test_ab_f16_z_bool;
+ case F16_LT_QUIET:
+ trueFunction_ab_f16_z_bool = slow_f16_lt_quiet;
+ subjFunction_ab_f16_z_bool = f16_lt_quiet;
+ test_ab_f16_z_bool:
+ test_ab_f16_z_bool(
+ trueFunction_ab_f16_z_bool, subjFunction_ab_f16_z_bool );
+ break;
+#endif
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ case F32_TO_UI32:
+ test_a_f32_z_ui32_rx(
+ slow_f32_to_ui32, f32_to_ui32, roundingMode, exact );
+ break;
+ case F32_TO_UI64:
+ test_a_f32_z_ui64_rx(
+ slow_f32_to_ui64, f32_to_ui64, roundingMode, exact );
+ break;
+ case F32_TO_I32:
+ test_a_f32_z_i32_rx(
+ slow_f32_to_i32, f32_to_i32, roundingMode, exact );
+ break;
+ case F32_TO_I64:
+ test_a_f32_z_i64_rx(
+ slow_f32_to_i64, f32_to_i64, roundingMode, exact );
+ break;
+ case F32_TO_UI32_R_MINMAG:
+ test_a_f32_z_ui32_x(
+ slow_f32_to_ui32_r_minMag, f32_to_ui32_r_minMag, exact );
+ break;
+ case F32_TO_UI64_R_MINMAG:
+ test_a_f32_z_ui64_x(
+ slow_f32_to_ui64_r_minMag, f32_to_ui64_r_minMag, exact );
+ break;
+ case F32_TO_I32_R_MINMAG:
+ test_a_f32_z_i32_x(
+ slow_f32_to_i32_r_minMag, f32_to_i32_r_minMag, exact );
+ break;
+ case F32_TO_I64_R_MINMAG:
+ test_a_f32_z_i64_x(
+ slow_f32_to_i64_r_minMag, f32_to_i64_r_minMag, exact );
+ break;
+#ifdef FLOAT16
+ case F32_TO_F16:
+ test_a_f32_z_f16( slow_f32_to_f16, f32_to_f16 );
+ break;
+#endif
+#ifdef FLOAT64
+ case F32_TO_F64:
+ test_a_f32_z_f64( slow_f32_to_f64, f32_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case F32_TO_EXTF80:
+ test_a_f32_z_extF80( slow_f32_to_extF80M, f32_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case F32_TO_F128:
+ test_a_f32_z_f128( slow_f32_to_f128M, f32_to_f128M );
+ break;
+#endif
+ case F32_ROUNDTOINT:
+ test_az_f32_rx(
+ slow_f32_roundToInt, f32_roundToInt, roundingMode, exact );
+ break;
+ case F32_ADD:
+ trueFunction_abz_f32 = slow_f32_add;
+ subjFunction_abz_f32 = f32_add;
+ goto test_abz_f32;
+ case F32_SUB:
+ trueFunction_abz_f32 = slow_f32_sub;
+ subjFunction_abz_f32 = f32_sub;
+ goto test_abz_f32;
+ case F32_MUL:
+ trueFunction_abz_f32 = slow_f32_mul;
+ subjFunction_abz_f32 = f32_mul;
+ goto test_abz_f32;
+ case F32_DIV:
+ trueFunction_abz_f32 = slow_f32_div;
+ subjFunction_abz_f32 = f32_div;
+ goto test_abz_f32;
+ case F32_REM:
+ trueFunction_abz_f32 = slow_f32_rem;
+ subjFunction_abz_f32 = f32_rem;
+ test_abz_f32:
+ test_abz_f32( trueFunction_abz_f32, subjFunction_abz_f32 );
+ break;
+ case F32_MULADD:
+ test_abcz_f32( slow_f32_mulAdd, f32_mulAdd );
+ break;
+ case F32_SQRT:
+ test_az_f32( slow_f32_sqrt, f32_sqrt );
+ break;
+ case F32_EQ:
+ trueFunction_ab_f32_z_bool = slow_f32_eq;
+ subjFunction_ab_f32_z_bool = f32_eq;
+ goto test_ab_f32_z_bool;
+ case F32_LE:
+ trueFunction_ab_f32_z_bool = slow_f32_le;
+ subjFunction_ab_f32_z_bool = f32_le;
+ goto test_ab_f32_z_bool;
+ case F32_LT:
+ trueFunction_ab_f32_z_bool = slow_f32_lt;
+ subjFunction_ab_f32_z_bool = f32_lt;
+ goto test_ab_f32_z_bool;
+ case F32_EQ_SIGNALING:
+ trueFunction_ab_f32_z_bool = slow_f32_eq_signaling;
+ subjFunction_ab_f32_z_bool = f32_eq_signaling;
+ goto test_ab_f32_z_bool;
+ case F32_LE_QUIET:
+ trueFunction_ab_f32_z_bool = slow_f32_le_quiet;
+ subjFunction_ab_f32_z_bool = f32_le_quiet;
+ goto test_ab_f32_z_bool;
+ case F32_LT_QUIET:
+ trueFunction_ab_f32_z_bool = slow_f32_lt_quiet;
+ subjFunction_ab_f32_z_bool = f32_lt_quiet;
+ test_ab_f32_z_bool:
+ test_ab_f32_z_bool(
+ trueFunction_ab_f32_z_bool, subjFunction_ab_f32_z_bool );
+ break;
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef FLOAT64
+ case F64_TO_UI32:
+ test_a_f64_z_ui32_rx(
+ slow_f64_to_ui32, f64_to_ui32, roundingMode, exact );
+ break;
+ case F64_TO_UI64:
+ test_a_f64_z_ui64_rx(
+ slow_f64_to_ui64, f64_to_ui64, roundingMode, exact );
+ break;
+ case F64_TO_I32:
+ test_a_f64_z_i32_rx(
+ slow_f64_to_i32, f64_to_i32, roundingMode, exact );
+ break;
+ case F64_TO_I64:
+ test_a_f64_z_i64_rx(
+ slow_f64_to_i64, f64_to_i64, roundingMode, exact );
+ break;
+ case F64_TO_UI32_R_MINMAG:
+ test_a_f64_z_ui32_x(
+ slow_f64_to_ui32_r_minMag, f64_to_ui32_r_minMag, exact );
+ break;
+ case F64_TO_UI64_R_MINMAG:
+ test_a_f64_z_ui64_x(
+ slow_f64_to_ui64_r_minMag, f64_to_ui64_r_minMag, exact );
+ break;
+ case F64_TO_I32_R_MINMAG:
+ test_a_f64_z_i32_x(
+ slow_f64_to_i32_r_minMag, f64_to_i32_r_minMag, exact );
+ break;
+ case F64_TO_I64_R_MINMAG:
+ test_a_f64_z_i64_x(
+ slow_f64_to_i64_r_minMag, f64_to_i64_r_minMag, exact );
+ break;
+#ifdef FLOAT16
+ case F64_TO_F16:
+ test_a_f64_z_f16( slow_f64_to_f16, f64_to_f16 );
+ break;
+#endif
+ case F64_TO_F32:
+ test_a_f64_z_f32( slow_f64_to_f32, f64_to_f32 );
+ break;
+#ifdef EXTFLOAT80
+ case F64_TO_EXTF80:
+ test_a_f64_z_extF80( slow_f64_to_extF80M, f64_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case F64_TO_F128:
+ test_a_f64_z_f128( slow_f64_to_f128M, f64_to_f128M );
+ break;
+#endif
+ case F64_ROUNDTOINT:
+ test_az_f64_rx(
+ slow_f64_roundToInt, f64_roundToInt, roundingMode, exact );
+ break;
+ case F64_ADD:
+ trueFunction_abz_f64 = slow_f64_add;
+ subjFunction_abz_f64 = f64_add;
+ goto test_abz_f64;
+ case F64_SUB:
+ trueFunction_abz_f64 = slow_f64_sub;
+ subjFunction_abz_f64 = f64_sub;
+ goto test_abz_f64;
+ case F64_MUL:
+ trueFunction_abz_f64 = slow_f64_mul;
+ subjFunction_abz_f64 = f64_mul;
+ goto test_abz_f64;
+ case F64_DIV:
+ trueFunction_abz_f64 = slow_f64_div;
+ subjFunction_abz_f64 = f64_div;
+ goto test_abz_f64;
+ case F64_REM:
+ trueFunction_abz_f64 = slow_f64_rem;
+ subjFunction_abz_f64 = f64_rem;
+ test_abz_f64:
+ test_abz_f64( trueFunction_abz_f64, subjFunction_abz_f64 );
+ break;
+ case F64_MULADD:
+ test_abcz_f64( slow_f64_mulAdd, f64_mulAdd );
+ break;
+ case F64_SQRT:
+ test_az_f64( slow_f64_sqrt, f64_sqrt );
+ break;
+ case F64_EQ:
+ trueFunction_ab_f64_z_bool = slow_f64_eq;
+ subjFunction_ab_f64_z_bool = f64_eq;
+ goto test_ab_f64_z_bool;
+ case F64_LE:
+ trueFunction_ab_f64_z_bool = slow_f64_le;
+ subjFunction_ab_f64_z_bool = f64_le;
+ goto test_ab_f64_z_bool;
+ case F64_LT:
+ trueFunction_ab_f64_z_bool = slow_f64_lt;
+ subjFunction_ab_f64_z_bool = f64_lt;
+ goto test_ab_f64_z_bool;
+ case F64_EQ_SIGNALING:
+ trueFunction_ab_f64_z_bool = slow_f64_eq_signaling;
+ subjFunction_ab_f64_z_bool = f64_eq_signaling;
+ goto test_ab_f64_z_bool;
+ case F64_LE_QUIET:
+ trueFunction_ab_f64_z_bool = slow_f64_le_quiet;
+ subjFunction_ab_f64_z_bool = f64_le_quiet;
+ goto test_ab_f64_z_bool;
+ case F64_LT_QUIET:
+ trueFunction_ab_f64_z_bool = slow_f64_lt_quiet;
+ subjFunction_ab_f64_z_bool = f64_lt_quiet;
+ test_ab_f64_z_bool:
+ test_ab_f64_z_bool(
+ trueFunction_ab_f64_z_bool, subjFunction_ab_f64_z_bool );
+ break;
+#endif
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef EXTFLOAT80
+ case EXTF80_TO_UI32:
+ test_a_extF80_z_ui32_rx(
+ slow_extF80M_to_ui32, extF80M_to_ui32, roundingMode, exact );
+ break;
+ case EXTF80_TO_UI64:
+ test_a_extF80_z_ui64_rx(
+ slow_extF80M_to_ui64, extF80M_to_ui64, roundingMode, exact );
+ break;
+ case EXTF80_TO_I32:
+ test_a_extF80_z_i32_rx(
+ slow_extF80M_to_i32, extF80M_to_i32, roundingMode, exact );
+ break;
+ case EXTF80_TO_I64:
+ test_a_extF80_z_i64_rx(
+ slow_extF80M_to_i64, extF80M_to_i64, roundingMode, exact );
+ break;
+ case EXTF80_TO_UI32_R_MINMAG:
+ test_a_extF80_z_ui32_x(
+ slow_extF80M_to_ui32_r_minMag, extF80M_to_ui32_r_minMag, exact );
+ break;
+ case EXTF80_TO_UI64_R_MINMAG:
+ test_a_extF80_z_ui64_x(
+ slow_extF80M_to_ui64_r_minMag, extF80M_to_ui64_r_minMag, exact );
+ break;
+ case EXTF80_TO_I32_R_MINMAG:
+ test_a_extF80_z_i32_x(
+ slow_extF80M_to_i32_r_minMag, extF80M_to_i32_r_minMag, exact );
+ break;
+ case EXTF80_TO_I64_R_MINMAG:
+ test_a_extF80_z_i64_x(
+ slow_extF80M_to_i64_r_minMag, extF80M_to_i64_r_minMag, exact );
+ break;
+#ifdef FLOAT16
+ case EXTF80_TO_F16:
+ test_a_extF80_z_f16( slow_extF80M_to_f16, extF80M_to_f16 );
+ break;
+#endif
+ case EXTF80_TO_F32:
+ test_a_extF80_z_f32( slow_extF80M_to_f32, extF80M_to_f32 );
+ break;
+#ifdef FLOAT64
+ case EXTF80_TO_F64:
+ test_a_extF80_z_f64( slow_extF80M_to_f64, extF80M_to_f64 );
+ break;
+#endif
+#ifdef FLOAT128
+ case EXTF80_TO_F128:
+ test_a_extF80_z_f128( slow_extF80M_to_f128M, extF80M_to_f128M );
+ break;
+#endif
+ case EXTF80_ROUNDTOINT:
+ test_az_extF80_rx(
+ slow_extF80M_roundToInt, extF80M_roundToInt, roundingMode, exact );
+ break;
+ case EXTF80_ADD:
+ trueFunction_abz_extF80M = slow_extF80M_add;
+ subjFunction_abz_extF80M = extF80M_add;
+ goto test_abz_extF80;
+ case EXTF80_SUB:
+ trueFunction_abz_extF80M = slow_extF80M_sub;
+ subjFunction_abz_extF80M = extF80M_sub;
+ goto test_abz_extF80;
+ case EXTF80_MUL:
+ trueFunction_abz_extF80M = slow_extF80M_mul;
+ subjFunction_abz_extF80M = extF80M_mul;
+ goto test_abz_extF80;
+ case EXTF80_DIV:
+ trueFunction_abz_extF80M = slow_extF80M_div;
+ subjFunction_abz_extF80M = extF80M_div;
+ goto test_abz_extF80;
+ case EXTF80_REM:
+ trueFunction_abz_extF80M = slow_extF80M_rem;
+ subjFunction_abz_extF80M = extF80M_rem;
+ test_abz_extF80:
+ test_abz_extF80( trueFunction_abz_extF80M, subjFunction_abz_extF80M );
+ break;
+ case EXTF80_SQRT:
+ test_az_extF80( slow_extF80M_sqrt, extF80M_sqrt );
+ break;
+ case EXTF80_EQ:
+ trueFunction_ab_extF80M_z_bool = slow_extF80M_eq;
+ subjFunction_ab_extF80M_z_bool = extF80M_eq;
+ goto test_ab_extF80_z_bool;
+ case EXTF80_LE:
+ trueFunction_ab_extF80M_z_bool = slow_extF80M_le;
+ subjFunction_ab_extF80M_z_bool = extF80M_le;
+ goto test_ab_extF80_z_bool;
+ case EXTF80_LT:
+ trueFunction_ab_extF80M_z_bool = slow_extF80M_lt;
+ subjFunction_ab_extF80M_z_bool = extF80M_lt;
+ goto test_ab_extF80_z_bool;
+ case EXTF80_EQ_SIGNALING:
+ trueFunction_ab_extF80M_z_bool = slow_extF80M_eq_signaling;
+ subjFunction_ab_extF80M_z_bool = extF80M_eq_signaling;
+ goto test_ab_extF80_z_bool;
+ case EXTF80_LE_QUIET:
+ trueFunction_ab_extF80M_z_bool = slow_extF80M_le_quiet;
+ subjFunction_ab_extF80M_z_bool = extF80M_le_quiet;
+ goto test_ab_extF80_z_bool;
+ case EXTF80_LT_QUIET:
+ trueFunction_ab_extF80M_z_bool = slow_extF80M_lt_quiet;
+ subjFunction_ab_extF80M_z_bool = extF80M_lt_quiet;
+ test_ab_extF80_z_bool:
+ test_ab_extF80_z_bool(
+ trueFunction_ab_extF80M_z_bool, subjFunction_ab_extF80M_z_bool );
+ break;
+#endif
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef FLOAT128
+ case F128_TO_UI32:
+ test_a_f128_z_ui32_rx(
+ slow_f128M_to_ui32, f128M_to_ui32, roundingMode, exact );
+ break;
+ case F128_TO_UI64:
+ test_a_f128_z_ui64_rx(
+ slow_f128M_to_ui64, f128M_to_ui64, roundingMode, exact );
+ break;
+ case F128_TO_I32:
+ test_a_f128_z_i32_rx(
+ slow_f128M_to_i32, f128M_to_i32, roundingMode, exact );
+ break;
+ case F128_TO_I64:
+ test_a_f128_z_i64_rx(
+ slow_f128M_to_i64, f128M_to_i64, roundingMode, exact );
+ break;
+ case F128_TO_UI32_R_MINMAG:
+ test_a_f128_z_ui32_x(
+ slow_f128M_to_ui32_r_minMag, f128M_to_ui32_r_minMag, exact );
+ break;
+ case F128_TO_UI64_R_MINMAG:
+ test_a_f128_z_ui64_x(
+ slow_f128M_to_ui64_r_minMag, f128M_to_ui64_r_minMag, exact );
+ break;
+ case F128_TO_I32_R_MINMAG:
+ test_a_f128_z_i32_x(
+ slow_f128M_to_i32_r_minMag, f128M_to_i32_r_minMag, exact );
+ break;
+ case F128_TO_I64_R_MINMAG:
+ test_a_f128_z_i64_x(
+ slow_f128M_to_i64_r_minMag, f128M_to_i64_r_minMag, exact );
+ break;
+#ifdef FLOAT16
+ case F128_TO_F16:
+ test_a_f128_z_f16( slow_f128M_to_f16, f128M_to_f16 );
+ break;
+#endif
+ case F128_TO_F32:
+ test_a_f128_z_f32( slow_f128M_to_f32, f128M_to_f32 );
+ break;
+#ifdef FLOAT64
+ case F128_TO_F64:
+ test_a_f128_z_f64( slow_f128M_to_f64, f128M_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case F128_TO_EXTF80:
+ test_a_f128_z_extF80( slow_f128M_to_extF80M, f128M_to_extF80M );
+ break;
+#endif
+ case F128_ROUNDTOINT:
+ test_az_f128_rx(
+ slow_f128M_roundToInt, f128M_roundToInt, roundingMode, exact );
+ break;
+ case F128_ADD:
+ trueFunction_abz_f128M = slow_f128M_add;
+ subjFunction_abz_f128M = f128M_add;
+ goto test_abz_f128;
+ case F128_SUB:
+ trueFunction_abz_f128M = slow_f128M_sub;
+ subjFunction_abz_f128M = f128M_sub;
+ goto test_abz_f128;
+ case F128_MUL:
+ trueFunction_abz_f128M = slow_f128M_mul;
+ subjFunction_abz_f128M = f128M_mul;
+ goto test_abz_f128;
+ case F128_DIV:
+ trueFunction_abz_f128M = slow_f128M_div;
+ subjFunction_abz_f128M = f128M_div;
+ goto test_abz_f128;
+ case F128_REM:
+ trueFunction_abz_f128M = slow_f128M_rem;
+ subjFunction_abz_f128M = f128M_rem;
+ test_abz_f128:
+ test_abz_f128( trueFunction_abz_f128M, subjFunction_abz_f128M );
+ break;
+ case F128_MULADD:
+ test_abcz_f128( slow_f128M_mulAdd, f128M_mulAdd );
+ break;
+ case F128_SQRT:
+ test_az_f128( slow_f128M_sqrt, f128M_sqrt );
+ break;
+ case F128_EQ:
+ trueFunction_ab_f128M_z_bool = slow_f128M_eq;
+ subjFunction_ab_f128M_z_bool = f128M_eq;
+ goto test_ab_f128_z_bool;
+ case F128_LE:
+ trueFunction_ab_f128M_z_bool = slow_f128M_le;
+ subjFunction_ab_f128M_z_bool = f128M_le;
+ goto test_ab_f128_z_bool;
+ case F128_LT:
+ trueFunction_ab_f128M_z_bool = slow_f128M_lt;
+ subjFunction_ab_f128M_z_bool = f128M_lt;
+ goto test_ab_f128_z_bool;
+ case F128_EQ_SIGNALING:
+ trueFunction_ab_f128M_z_bool = slow_f128M_eq_signaling;
+ subjFunction_ab_f128M_z_bool = f128M_eq_signaling;
+ goto test_ab_f128_z_bool;
+ case F128_LE_QUIET:
+ trueFunction_ab_f128M_z_bool = slow_f128M_le_quiet;
+ subjFunction_ab_f128M_z_bool = f128M_le_quiet;
+ goto test_ab_f128_z_bool;
+ case F128_LT_QUIET:
+ trueFunction_ab_f128M_z_bool = slow_f128M_lt_quiet;
+ subjFunction_ab_f128M_z_bool = f128M_lt_quiet;
+ test_ab_f128_z_bool:
+ test_ab_f128_z_bool(
+ trueFunction_ab_f128M_z_bool, subjFunction_ab_f128M_z_bool );
+ break;
+#endif
+ }
+ if ( (verCases_errorStop && verCases_anyErrors) || verCases_stop ) {
+ verCases_exitWithStatus();
+ }
+
+}
+
+enum { EXACT_FALSE = 1, EXACT_TRUE };
+
+static
+void
+ testFunction(
+ int functionCode,
+ uint_fast8_t roundingPrecisionIn,
+ int roundingCodeIn,
+ int tininessCodeIn,
+ int exactCodeIn
+ )
+{
+ int functionAttribs;
+ uint_fast8_t roundingPrecision;
+ int roundingCode;
+ uint_fast8_t roundingMode = 0;
+ int exactCode;
+ bool exact;
+ int tininessCode;
+ uint_fast8_t tininessMode;
+
+ functionAttribs = functionInfos[functionCode].attribs;
+ verCases_functionNamePtr = functionInfos[functionCode].namePtr;
+ roundingPrecision = 32;
+ for (;;) {
+ if ( functionAttribs & FUNC_EFF_ROUNDINGPRECISION ) {
+ if ( roundingPrecisionIn ) roundingPrecision = roundingPrecisionIn;
+ } else {
+ roundingPrecision = 0;
+ }
+#ifdef EXTFLOAT80
+ verCases_roundingPrecision = roundingPrecision;
+ if ( roundingPrecision ) {
+ slow_extF80_roundingPrecision = roundingPrecision;
+ extF80_roundingPrecision = roundingPrecision;
+ }
+#endif
+ for (
+ roundingCode = 1; roundingCode < NUM_ROUNDINGMODES; ++roundingCode
+ ) {
+ if (
+ functionAttribs
+ & (FUNC_ARG_ROUNDINGMODE | FUNC_EFF_ROUNDINGMODE)
+ ) {
+ if ( roundingCodeIn ) roundingCode = roundingCodeIn;
+ } else {
+ roundingCode = 0;
+ }
+ verCases_roundingCode = roundingCode;
+ if ( roundingCode ) {
+ roundingMode = roundingModes[roundingCode];
+ if ( functionAttribs & FUNC_EFF_ROUNDINGMODE ) {
+ slowfloat_roundingMode = roundingMode;
+ softfloat_roundingMode = roundingMode;
+ }
+ }
+ for (
+ exactCode = EXACT_FALSE; exactCode <= EXACT_TRUE; ++exactCode
+ ) {
+ if ( functionAttribs & FUNC_ARG_EXACT ) {
+ if ( exactCodeIn ) exactCode = exactCodeIn;
+ } else {
+ exactCode = 0;
+ }
+ exact = (exactCode == EXACT_TRUE);
+ verCases_usesExact = (exactCode != 0);
+ verCases_exact = exact;
+ for (
+ tininessCode = 1;
+ tininessCode < NUM_TININESSMODES;
+ ++tininessCode
+ ) {
+ if (
+ (functionAttribs & FUNC_EFF_TININESSMODE)
+ || ((functionAttribs
+ & FUNC_EFF_TININESSMODE_REDUCEDPREC)
+ && roundingPrecision
+ && (roundingPrecision < 80))
+ ) {
+ if ( tininessCodeIn ) tininessCode = tininessCodeIn;
+ } else {
+ tininessCode = 0;
+ }
+ verCases_tininessCode = tininessCode;
+ if ( tininessCode ) {
+ tininessMode = tininessModes[tininessCode];
+ slowfloat_detectTininess = tininessMode;
+ softfloat_detectTininess = tininessMode;
+ }
+ testFunctionInstance( functionCode, roundingMode, exact );
+ if ( tininessCodeIn || ! tininessCode ) break;
+ }
+ if ( exactCodeIn || ! exactCode ) break;
+ }
+ if ( roundingCodeIn || ! roundingCode ) break;
+ }
+ if ( roundingPrecisionIn || ! roundingPrecision ) break;
+ if ( roundingPrecision == 80 ) {
+ break;
+ } else if ( roundingPrecision == 64 ) {
+ roundingPrecision = 80;
+ } else if ( roundingPrecision == 32 ) {
+ roundingPrecision = 64;
+ }
+ }
+
+}
+
+int main( int argc, char *argv[] )
+{
+ bool haveFunctionArg;
+ int functionCode, numOperands;
+ uint_fast8_t roundingPrecision;
+ int roundingCode, tininessCode, exactCode;
+ const char *argPtr;
+ unsigned long ui;
+ long i;
+ int functionMatchAttrib;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ fail_programName = "testsoftfloat";
+ if ( argc <= 1 ) goto writeHelpMessage;
+ genCases_setLevel( 1 );
+ verCases_maxErrorCount = 20;
+ testLoops_trueFlagsPtr = &slowfloat_exceptionFlags;
+ testLoops_subjFlagsFunction = softfloat_clearExceptionFlags;
+ haveFunctionArg = false;
+ functionCode = 0;
+ numOperands = 0;
+ roundingPrecision = 0;
+ roundingCode = 0;
+ tininessCode = 0;
+ exactCode = 0;
+ for (;;) {
+ --argc;
+ if ( ! argc ) break;
+ argPtr = *++argv;
+ if ( ! argPtr ) break;
+ if ( argPtr[0] == '-' ) ++argPtr;
+ if (
+ ! strcmp( argPtr, "help" ) || ! strcmp( argPtr, "-help" )
+ || ! strcmp( argPtr, "h" )
+ ) {
+ writeHelpMessage:
+ fputs(
+"testsoftfloat [<option>...] <function>\n"
+" <option>: (* is default)\n"
+" -help --Write this message and exit.\n"
+" -seed <num> --Set pseudo-random number generator seed to <num>.\n"
+" * -seed 1\n"
+" -level <num> --Testing level <num> (1 or 2).\n"
+" * -level 1\n"
+" -errors <num> --Stop each function test after <num> errors.\n"
+" * -errors 20\n"
+" -errorstop --Exit after first function with any error.\n"
+" -forever --Test one function repeatedly (implies '-level 2').\n"
+#ifdef EXTFLOAT80
+" -precision32 --For extF80, test only 32-bit rounding precision.\n"
+" -precision64 --For extF80, test only 64-bit rounding precision.\n"
+" -precision80 --For extF80, test only 80-bit rounding precision.\n"
+#endif
+" -rnear_even --Test only rounding to nearest/even.\n"
+" -rminMag --Test only rounding to minimum magnitude (toward zero).\n"
+" -rmin --Test only rounding to minimum (down).\n"
+" -rmax --Test only rounding to maximum (up).\n"
+" -rnear_maxMag --Test only rounding to nearest/maximum magnitude\n"
+" (nearest/away).\n"
+#ifdef FLOAT_ROUND_ODD
+" -rodd --Test only rounding to odd (jamming). (For rounding to\n"
+" an integer value, 'minMag' rounding is done instead.)\n"
+#endif
+" -tininessbefore --Test only underflow tininess detected before rounding.\n"
+" -tininessafter --Test only underflow tininess detected after rounding.\n"
+" -notexact --Test only non-exact rounding to integer (no inexact\n"
+" exceptions).\n"
+" -exact --Test only exact rounding to integer (raising inexact\n"
+" exceptions).\n"
+" <function>:\n"
+" <int>_to_<float> <float>_add <float>_eq\n"
+" <float>_to_<int> <float>_sub <float>_le\n"
+" <float>_to_<int>_r_minMag <float>_mul <float>_lt\n"
+" <float>_to_<float> <float>_mulAdd <float>_eq_signaling\n"
+" <float>_roundToInt <float>_div <float>_le_quiet\n"
+" <float>_rem <float>_lt_quiet\n"
+" <float>_sqrt\n"
+" -all1 --All unary functions.\n"
+" -all2 --All binary functions.\n"
+" <int>:\n"
+" ui32 --Unsigned 32-bit integer.\n"
+" ui64 --Unsigned 64-bit integer.\n"
+" i32 --Signed 32-bit integer.\n"
+" i64 --Signed 64-bit integer.\n"
+" <float>:\n"
+#ifdef FLOAT16
+" f16 --Binary 16-bit floating-point (half-precision).\n"
+#endif
+" f32 --Binary 32-bit floating-point (single-precision).\n"
+#ifdef FLOAT64
+" f64 --Binary 64-bit floating-point (double-precision).\n"
+#endif
+#ifdef EXTFLOAT80
+" extF80 --Binary 80-bit extended floating-point.\n"
+#endif
+#ifdef FLOAT128
+" f128 --Binary 128-bit floating-point (quadruple-precision).\n"
+#endif
+ ,
+ stdout
+ );
+ return EXIT_SUCCESS;
+ } else if ( ! strcmp( argPtr, "seed" ) ) {
+ if ( argc < 2 ) goto optionError;
+ ui = strtoul( argv[1], (char **) &argPtr, 10 );
+ if ( *argPtr ) goto optionError;
+ srand( ui );
+ --argc;
+ ++argv;
+ } else if ( ! strcmp( argPtr, "level" ) ) {
+ if ( argc < 2 ) goto optionError;
+ i = strtol( argv[1], (char **) &argPtr, 10 );
+ if ( *argPtr ) goto optionError;
+ genCases_setLevel( i );
+ --argc;
+ ++argv;
+ } else if ( ! strcmp( argPtr, "level1" ) ) {
+ genCases_setLevel( 1 );
+ } else if ( ! strcmp( argPtr, "level2" ) ) {
+ genCases_setLevel( 2 );
+ } else if ( ! strcmp( argPtr, "errors" ) ) {
+ if ( argc < 2 ) goto optionError;
+ i = strtol( argv[1], (char **) &argPtr, 10 );
+ if ( *argPtr ) goto optionError;
+ verCases_maxErrorCount = i;
+ --argc;
+ ++argv;
+ } else if ( ! strcmp( argPtr, "errorstop" ) ) {
+ verCases_errorStop = true;
+ } else if ( ! strcmp( argPtr, "forever" ) ) {
+ genCases_setLevel( 2 );
+ testLoops_forever = true;
+#ifdef EXTFLOAT80
+ } else if ( ! strcmp( argPtr, "precision32" ) ) {
+ roundingPrecision = 32;
+ } else if ( ! strcmp( argPtr, "precision64" ) ) {
+ roundingPrecision = 64;
+ } else if ( ! strcmp( argPtr, "precision80" ) ) {
+ roundingPrecision = 80;
+#endif
+ } else if (
+ ! strcmp( argPtr, "rnear_even" )
+ || ! strcmp( argPtr, "rneareven" )
+ || ! strcmp( argPtr, "rnearest_even" )
+ ) {
+ roundingCode = ROUND_NEAR_EVEN;
+ } else if (
+ ! strcmp( argPtr, "rminmag" ) || ! strcmp( argPtr, "rminMag" )
+ ) {
+ roundingCode = ROUND_MINMAG;
+ } else if ( ! strcmp( argPtr, "rmin" ) ) {
+ roundingCode = ROUND_MIN;
+ } else if ( ! strcmp( argPtr, "rmax" ) ) {
+ roundingCode = ROUND_MAX;
+ } else if (
+ ! strcmp( argPtr, "rnear_maxmag" )
+ || ! strcmp( argPtr, "rnear_maxMag" )
+ || ! strcmp( argPtr, "rnearmaxmag" )
+ || ! strcmp( argPtr, "rnearest_maxmag" )
+ || ! strcmp( argPtr, "rnearest_maxMag" )
+ ) {
+ roundingCode = ROUND_NEAR_MAXMAG;
+#ifdef FLOAT_ROUND_ODD
+ } else if ( ! strcmp( argPtr, "rodd" ) ) {
+ roundingCode = ROUND_ODD;
+#endif
+ } else if ( ! strcmp( argPtr, "tininessbefore" ) ) {
+ tininessCode = TININESS_BEFORE_ROUNDING;
+ } else if ( ! strcmp( argPtr, "tininessafter" ) ) {
+ tininessCode = TININESS_AFTER_ROUNDING;
+ } else if ( ! strcmp( argPtr, "notexact" ) ) {
+ exactCode = EXACT_FALSE;
+ } else if ( ! strcmp( argPtr, "exact" ) ) {
+ exactCode = EXACT_TRUE;
+ } else if ( ! strcmp( argPtr, "all1" ) ) {
+ haveFunctionArg = true;
+ functionCode = 0;
+ numOperands = 1;
+ } else if ( ! strcmp( argPtr, "all2" ) ) {
+ haveFunctionArg = true;
+ functionCode = 0;
+ numOperands = 2;
+ } else {
+ functionCode = 1;
+ while ( strcmp( argPtr, functionInfos[functionCode].namePtr ) ) {
+ ++functionCode;
+ if ( functionCode == NUM_FUNCTIONS ) {
+ fail( "Invalid argument '%s'", *argv );
+ }
+ }
+ haveFunctionArg = true;
+ }
+ }
+ if ( ! haveFunctionArg ) fail( "Function argument required" );
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ signal( SIGINT, catchSIGINT );
+ signal( SIGTERM, catchSIGINT );
+ if ( functionCode ) {
+ if ( testLoops_forever ) {
+ if ( ! roundingPrecision ) roundingPrecision = 80;
+ if ( ! roundingCode ) roundingCode = ROUND_NEAR_EVEN;
+ }
+ testFunction(
+ functionCode,
+ roundingPrecision,
+ roundingCode,
+ tininessCode,
+ exactCode
+ );
+ } else {
+ if ( testLoops_forever ) {
+ fail( "Can test only one function with '-forever' option" );
+ }
+ functionMatchAttrib =
+ (numOperands == 1) ? FUNC_ARG_UNARY : FUNC_ARG_BINARY;
+ for (
+ functionCode = 1; functionCode < NUM_FUNCTIONS; ++functionCode
+ ) {
+ if ( functionInfos[functionCode].attribs & functionMatchAttrib ) {
+ testFunction(
+ functionCode,
+ roundingPrecision,
+ roundingCode,
+ tininessCode,
+ exactCode
+ );
+ }
+ }
+ }
+ verCases_exitWithStatus();
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ optionError:
+ fail( "'%s' option requires numeric argument", *argv );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/timesoftfloat.c b/src/libs/softfloat-3e/testfloat/source/timesoftfloat.c
new file mode 100644
index 00000000..b0705a91
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/timesoftfloat.c
@@ -0,0 +1,5060 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <time.h>
+#include "platform.h"
+#include "uint128.h"
+#include "fail.h"
+#include "softfloat.h"
+#include "functions.h"
+
+enum { minIterations = 1000 };
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+static const char *functionNamePtr;
+static uint_fast8_t roundingPrecision;
+static int roundingCode;
+static int tininessCode;
+static bool usesExact;
+static bool exact;
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+static void reportTime( int_fast64_t count, clock_t clockTicks )
+{
+ static const char *roundingModeNames[NUM_ROUNDINGMODES] = {
+ 0,
+ ", rounding near_even",
+ ", rounding minMag",
+ ", rounding min",
+ ", rounding max",
+ ", rounding near_maxMag",
+#ifdef FLOAT_ROUND_ODD
+ ", rounding odd"
+#endif
+ };
+
+ printf(
+ "%9.4f Mop/s: %s",
+ count / ((float) clockTicks / CLOCKS_PER_SEC) / 1000000,
+ functionNamePtr
+ );
+ if ( roundingCode ) {
+#ifdef EXTFLOAT80
+ if ( roundingPrecision ) {
+ printf( ", precision %d", (int) roundingPrecision );
+ }
+#endif
+ fputs( roundingModeNames[roundingCode], stdout );
+ if ( tininessCode ) {
+ fputs(
+ (tininessCode == TININESS_BEFORE_ROUNDING)
+ ? ", tininess before rounding"
+ : ", tininess after rounding",
+ stdout
+ );
+ }
+ }
+ if ( usesExact ) fputs( exact ? ", exact" : ", not exact", stdout );
+ fputc( '\n', stdout );
+ fflush( stdout );
+
+}
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+#ifdef FLOAT16
+union ui16_f16 { uint16_t ui; float16_t f; };
+#endif
+union ui32_f32 { uint32_t ui; float32_t f; };
+#ifdef FLOAT64
+union ui64_f64 { uint64_t ui; float64_t f; };
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+enum { numInputs_ui32 = 32 };
+
+static const uint32_t inputs_ui32[numInputs_ui32] = {
+ 0x00004487, 0x405CF80F, 0x00000000, 0x000002FC,
+ 0x000DFFFE, 0x0C8EF795, 0x0FFFEE01, 0x000006CA,
+ 0x00009BFE, 0x00B79D1D, 0x60001002, 0x00000049,
+ 0x0BFF7FFF, 0x0000F37A, 0x0011DFFE, 0x00000006,
+ 0x000FDFFA, 0x0000082F, 0x10200003, 0x2172089B,
+ 0x00003E02, 0x000019E8, 0x0008FFFE, 0x000004A4,
+ 0x00208002, 0x07C42FBF, 0x0FFFE3FF, 0x040B9F13,
+ 0x40000008, 0x0001BF56, 0x000017F6, 0x000A908A
+};
+
+#ifdef FLOAT16
+
+static void time_a_ui32_z_f16( float16_t function( uint32_t ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( inputs_ui32[inputNum] );
+ inputNum = (inputNum + 1) & (numInputs_ui32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( inputs_ui32[inputNum] );
+ inputNum = (inputNum + 1) & (numInputs_ui32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+static void time_a_ui32_z_f32( float32_t function( uint32_t ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( inputs_ui32[inputNum] );
+ inputNum = (inputNum + 1) & (numInputs_ui32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( inputs_ui32[inputNum] );
+ inputNum = (inputNum + 1) & (numInputs_ui32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#ifdef FLOAT64
+
+static void time_a_ui32_z_f64( float64_t function( uint32_t ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( inputs_ui32[inputNum] );
+ inputNum = (inputNum + 1) & (numInputs_ui32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( inputs_ui32[inputNum] );
+ inputNum = (inputNum + 1) & (numInputs_ui32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+static void time_a_ui32_z_extF80( void function( uint32_t, extFloat80_t * ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ extFloat80_t z;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( inputs_ui32[inputNum], &z );
+ inputNum = (inputNum + 1) & (numInputs_ui32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( inputs_ui32[inputNum], &z );
+ inputNum = (inputNum + 1) & (numInputs_ui32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+static void time_a_ui32_z_f128( void function( uint32_t, float128_t * ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ float128_t z;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( inputs_ui32[inputNum], &z );
+ inputNum = (inputNum + 1) & (numInputs_ui32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( inputs_ui32[inputNum], &z );
+ inputNum = (inputNum + 1) & (numInputs_ui32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+enum { numInputs_ui64 = 32 };
+
+static const int64_t inputs_ui64[numInputs_ui64] = {
+ UINT64_C( 0x04003C0000000001 ), UINT64_C( 0x0000000003C589BC ),
+ UINT64_C( 0x00000000400013FE ), UINT64_C( 0x0000000000186171 ),
+ UINT64_C( 0x0000000000010406 ), UINT64_C( 0x000002861920038D ),
+ UINT64_C( 0x0000000010001DFF ), UINT64_C( 0x22E5F0F387AEC8F0 ),
+ UINT64_C( 0x00007C0000010002 ), UINT64_C( 0x00756EBD1AD0C1C7 ),
+ UINT64_C( 0x0003FDFFFFFFFFBE ), UINT64_C( 0x0007D0FB2C2CA951 ),
+ UINT64_C( 0x0007FC0007FFFFFE ), UINT64_C( 0x0000001F942B18BB ),
+ UINT64_C( 0x0000080101FFFFFE ), UINT64_C( 0x000000000000F688 ),
+ UINT64_C( 0x000000000008BFFF ), UINT64_C( 0x0000000006F5AF08 ),
+ UINT64_C( 0x0021008000000002 ), UINT64_C( 0x0000000000000003 ),
+ UINT64_C( 0x3FFFFFFFFF80007D ), UINT64_C( 0x0000000000000078 ),
+ UINT64_C( 0x0007FFFFFF802003 ), UINT64_C( 0x1BBC775B78016AB0 ),
+ UINT64_C( 0x0006FFE000000002 ), UINT64_C( 0x0002B89854671BC1 ),
+ UINT64_C( 0x0000010001FFFFE2 ), UINT64_C( 0x00000000000FB103 ),
+ UINT64_C( 0x07FFFFFFFFFFF7FF ), UINT64_C( 0x00036155C7076FB0 ),
+ UINT64_C( 0x00000020FBFFFFFE ), UINT64_C( 0x0000099AE6455357 )
+};
+
+#ifdef FLOAT16
+
+static void time_a_ui64_z_f16( float16_t function( uint64_t ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( inputs_ui64[inputNum] );
+ inputNum = (inputNum + 1) & (numInputs_ui64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( inputs_ui64[inputNum] );
+ inputNum = (inputNum + 1) & (numInputs_ui64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+static void time_a_ui64_z_f32( float32_t function( uint64_t ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( inputs_ui64[inputNum] );
+ inputNum = (inputNum + 1) & (numInputs_ui64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( inputs_ui64[inputNum] );
+ inputNum = (inputNum + 1) & (numInputs_ui64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#ifdef FLOAT64
+
+static void time_a_ui64_z_f64( float64_t function( uint64_t ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( inputs_ui64[inputNum] );
+ inputNum = (inputNum + 1) & (numInputs_ui64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( inputs_ui64[inputNum] );
+ inputNum = (inputNum + 1) & (numInputs_ui64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+static void time_a_ui64_z_extF80( void function( uint64_t, extFloat80_t * ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ extFloat80_t z;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( inputs_ui64[inputNum], &z );
+ inputNum = (inputNum + 1) & (numInputs_ui64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( inputs_ui64[inputNum], &z );
+ inputNum = (inputNum + 1) & (numInputs_ui64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+static void time_a_ui64_z_f128( void function( uint64_t, float128_t * ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ float128_t z;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( inputs_ui64[inputNum], &z );
+ inputNum = (inputNum + 1) & (numInputs_ui64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( inputs_ui64[inputNum], &z );
+ inputNum = (inputNum + 1) & (numInputs_ui64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+enum { numInputs_i32 = 32 };
+
+static const int32_t inputs_i32[numInputs_i32] = {
+ -0x00004487, 0x405CF80F, 0x00000000, -0x000002FC,
+ -0x000DFFFE, 0x0C8EF795, -0x0FFFEE01, 0x000006CA,
+ 0x00009BFE, -0x00B79D1D, -0x60001002, -0x00000049,
+ 0x0BFF7FFF, 0x0000F37A, 0x0011DFFE, 0x00000006,
+ -0x000FDFFA, -0x0000082F, 0x10200003, -0x2172089B,
+ 0x00003E02, 0x000019E8, 0x0008FFFE, -0x000004A4,
+ -0x00208002, 0x07C42FBF, 0x0FFFE3FF, 0x040B9F13,
+ -0x40000008, 0x0001BF56, 0x000017F6, 0x000A908A
+};
+
+#ifdef FLOAT16
+
+static void time_a_i32_z_f16( float16_t function( int32_t ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( inputs_i32[inputNum] );
+ inputNum = (inputNum + 1) & (numInputs_i32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( inputs_i32[inputNum] );
+ inputNum = (inputNum + 1) & (numInputs_i32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+static void time_a_i32_z_f32( float32_t function( int32_t ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( inputs_i32[inputNum] );
+ inputNum = (inputNum + 1) & (numInputs_i32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( inputs_i32[inputNum] );
+ inputNum = (inputNum + 1) & (numInputs_i32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#ifdef FLOAT64
+
+static void time_a_i32_z_f64( float64_t function( int32_t ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( inputs_i32[inputNum] );
+ inputNum = (inputNum + 1) & (numInputs_i32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( inputs_i32[inputNum] );
+ inputNum = (inputNum + 1) & (numInputs_i32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+static void time_a_i32_z_extF80( void function( int32_t, extFloat80_t * ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ extFloat80_t z;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( inputs_i32[inputNum], &z );
+ inputNum = (inputNum + 1) & (numInputs_i32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( inputs_i32[inputNum], &z );
+ inputNum = (inputNum + 1) & (numInputs_i32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+static void time_a_i32_z_f128( void function( int32_t, float128_t * ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ float128_t z;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( inputs_i32[inputNum], &z );
+ inputNum = (inputNum + 1) & (numInputs_i32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( inputs_i32[inputNum], &z );
+ inputNum = (inputNum + 1) & (numInputs_i32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+enum { numInputs_i64 = 32 };
+
+static const int64_t inputs_i64[numInputs_i64] = {
+ -INT64_C( 0x04003C0000000001 ), INT64_C( 0x0000000003C589BC ),
+ INT64_C( 0x00000000400013FE ), INT64_C( 0x0000000000186171 ),
+ -INT64_C( 0x0000000000010406 ), -INT64_C( 0x000002861920038D ),
+ INT64_C( 0x0000000010001DFF ), -INT64_C( 0x22E5F0F387AEC8F0 ),
+ -INT64_C( 0x00007C0000010002 ), INT64_C( 0x00756EBD1AD0C1C7 ),
+ INT64_C( 0x0003FDFFFFFFFFBE ), INT64_C( 0x0007D0FB2C2CA951 ),
+ INT64_C( 0x0007FC0007FFFFFE ), INT64_C( 0x0000001F942B18BB ),
+ INT64_C( 0x0000080101FFFFFE ), -INT64_C( 0x000000000000F688 ),
+ INT64_C( 0x000000000008BFFF ), INT64_C( 0x0000000006F5AF08 ),
+ -INT64_C( 0x0021008000000002 ), INT64_C( 0x0000000000000003 ),
+ INT64_C( 0x3FFFFFFFFF80007D ), INT64_C( 0x0000000000000078 ),
+ -INT64_C( 0x0007FFFFFF802003 ), INT64_C( 0x1BBC775B78016AB0 ),
+ -INT64_C( 0x0006FFE000000002 ), -INT64_C( 0x0002B89854671BC1 ),
+ -INT64_C( 0x0000010001FFFFE2 ), -INT64_C( 0x00000000000FB103 ),
+ INT64_C( 0x07FFFFFFFFFFF7FF ), -INT64_C( 0x00036155C7076FB0 ),
+ INT64_C( 0x00000020FBFFFFFE ), INT64_C( 0x0000099AE6455357 )
+};
+
+#ifdef FLOAT16
+
+static void time_a_i64_z_f16( float16_t function( int64_t ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( inputs_i64[inputNum] );
+ inputNum = (inputNum + 1) & (numInputs_i64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( inputs_i64[inputNum] );
+ inputNum = (inputNum + 1) & (numInputs_i64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+static void time_a_i64_z_f32( float32_t function( int64_t ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( inputs_i64[inputNum] );
+ inputNum = (inputNum + 1) & (numInputs_i64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( inputs_i64[inputNum] );
+ inputNum = (inputNum + 1) & (numInputs_i64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#ifdef FLOAT64
+
+static void time_a_i64_z_f64( float64_t function( int64_t ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( inputs_i64[inputNum] );
+ inputNum = (inputNum + 1) & (numInputs_i64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( inputs_i64[inputNum] );
+ inputNum = (inputNum + 1) & (numInputs_i64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+static void time_a_i64_z_extF80( void function( int64_t, extFloat80_t * ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ extFloat80_t z;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( inputs_i64[inputNum], &z );
+ inputNum = (inputNum + 1) & (numInputs_i64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( inputs_i64[inputNum], &z );
+ inputNum = (inputNum + 1) & (numInputs_i64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+static void time_a_i64_z_f128( void function( int64_t, float128_t * ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ float128_t z;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( inputs_i64[inputNum], &z );
+ inputNum = (inputNum + 1) & (numInputs_i64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( inputs_i64[inputNum], &z );
+ inputNum = (inputNum + 1) & (numInputs_i64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+#ifdef FLOAT16
+
+enum { numInputs_f16 = 32 };
+
+static const uint16_t inputs_F16UI[numInputs_f16] = {
+ 0x0BBA, 0x77FE, 0x084F, 0x9C0F, 0x7800, 0x4436, 0xCE67, 0x80F3,
+ 0x87EF, 0xC2FA, 0x7BFF, 0x13FE, 0x7BFE, 0x1C00, 0xAC46, 0xEAFA,
+ 0x3813, 0x4804, 0x385E, 0x8000, 0xB86C, 0x4B7D, 0xC7FD, 0xC97F,
+ 0x260C, 0x78EE, 0xB84F, 0x249E, 0x0D27, 0x37DC, 0x8400, 0xE8EF
+};
+
+static
+void
+ time_a_f16_z_ui32_rx(
+ uint_fast32_t function( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui16_f16 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_f16_z_ui64_rx(
+ uint_fast64_t function( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui16_f16 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_f16_z_i32_rx(
+ int_fast32_t function( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui16_f16 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_f16_z_i64_rx(
+ int_fast64_t function( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui16_f16 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_f16_z_ui32_x( uint_fast32_t function( float16_t, bool ), bool exact )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui16_f16 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_f16_z_ui64_x( uint_fast64_t function( float16_t, bool ), bool exact )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui16_f16 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void time_a_f16_z_i32_x( int_fast32_t function( float16_t, bool ), bool exact )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui16_f16 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void time_a_f16_z_i64_x( int_fast64_t function( float16_t, bool ), bool exact )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui16_f16 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static void time_a_f16_z_f32( float32_t function( float16_t ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui16_f16 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#ifdef FLOAT64
+
+static void time_a_f16_z_f64( float64_t function( float16_t ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui16_f16 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+static void time_a_f16_z_extF80( void function( float16_t, extFloat80_t * ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui16_f16 uA;
+ extFloat80_t z;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f, &z );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f, &z );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+static void time_a_f16_z_f128( void function( float16_t, float128_t * ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui16_f16 uA;
+ float128_t z;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f, &z );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f, &z );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+static
+void
+ time_az_f16_rx(
+ float16_t function( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui16_f16 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F16UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static void time_abz_f16( float16_t function( float16_t, float16_t ) )
+{
+ int_fast64_t count;
+ int inputNumA, inputNumB;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui16_f16 uA, uB;
+ clock_t endClock;
+
+ count = 0;
+ inputNumA = 0;
+ inputNumB = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F16UI[inputNumA];
+ uB.ui = inputs_F16UI[inputNumB];
+ function( uA.f, uB.f );
+ inputNumA = (inputNumA + 1) & (numInputs_f16 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_f16 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNumA = 0;
+ inputNumB = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F16UI[inputNumA];
+ uB.ui = inputs_F16UI[inputNumB];
+ function( uA.f, uB.f );
+ inputNumA = (inputNumA + 1) & (numInputs_f16 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_f16 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void time_abcz_f16( float16_t function( float16_t, float16_t, float16_t ) )
+{
+ int_fast64_t count;
+ int inputNumA, inputNumB, inputNumC;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui16_f16 uA, uB, uC;
+ clock_t endClock;
+
+ count = 0;
+ inputNumA = 0;
+ inputNumB = 0;
+ inputNumC = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F16UI[inputNumA];
+ uB.ui = inputs_F16UI[inputNumB];
+ uC.ui = inputs_F16UI[inputNumC];
+ function( uA.f, uB.f, uC.f );
+ inputNumA = (inputNumA + 1) & (numInputs_f16 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_f16 - 1);
+ if ( ! inputNumB ) ++inputNumC;
+ inputNumC = (inputNumC + 1) & (numInputs_f16 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNumA = 0;
+ inputNumB = 0;
+ inputNumC = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F16UI[inputNumA];
+ uB.ui = inputs_F16UI[inputNumB];
+ uC.ui = inputs_F16UI[inputNumC];
+ function( uA.f, uB.f, uC.f );
+ inputNumA = (inputNumA + 1) & (numInputs_f16 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_f16 - 1);
+ if ( ! inputNumB ) ++inputNumC;
+ inputNumC = (inputNumC + 1) & (numInputs_f16 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static void time_ab_f16_z_bool( bool function( float16_t, float16_t ) )
+{
+ int_fast64_t count;
+ int inputNumA, inputNumB;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui16_f16 uA, uB;
+ clock_t endClock;
+
+ count = 0;
+ inputNumA = 0;
+ inputNumB = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F16UI[inputNumA];
+ uB.ui = inputs_F16UI[inputNumB];
+ function( uA.f, uB.f );
+ inputNumA = (inputNumA + 1) & (numInputs_f16 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_f16 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNumA = 0;
+ inputNumB = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F16UI[inputNumA];
+ uB.ui = inputs_F16UI[inputNumB];
+ function( uA.f, uB.f );
+ inputNumA = (inputNumA + 1) & (numInputs_f16 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_f16 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static const uint16_t inputs_F16UI_pos[numInputs_f16] = {
+ 0x0BBA, 0x77FE, 0x084F, 0x1C0F, 0x7800, 0x4436, 0x4E67, 0x00F3,
+ 0x07EF, 0x42FA, 0x7BFF, 0x13FE, 0x7BFE, 0x1C00, 0x2C46, 0x6AFA,
+ 0x3813, 0x4804, 0x385E, 0x0000, 0x386C, 0x4B7D, 0x47FD, 0x497F,
+ 0x260C, 0x78EE, 0x384F, 0x249E, 0x0D27, 0x37DC, 0x0400, 0x68EF
+};
+
+static void time_az_f16_pos( float16_t function( float16_t ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui16_f16 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F16UI_pos[inputNum];
+ function( uA.f );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F16UI_pos[inputNum];
+ function( uA.f );
+ inputNum = (inputNum + 1) & (numInputs_f16 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+enum { numInputs_f32 = 32 };
+
+static const uint32_t inputs_F32UI[numInputs_f32] = {
+ 0x4EFA0000, 0xC1D0B328, 0x80000000, 0x3E69A31E,
+ 0xAF803EFF, 0x3F800000, 0x17BF8000, 0xE74A301A,
+ 0x4E010003, 0x7EE3C75D, 0xBD803FE0, 0xBFFEFF00,
+ 0x7981F800, 0x431FFFFC, 0xC100C000, 0x3D87EFFF,
+ 0x4103FEFE, 0xBC000007, 0xBF01F7FF, 0x4E6C6B5C,
+ 0xC187FFFE, 0xC58B9F13, 0x4F88007F, 0xDF004007,
+ 0xB7FFD7FE, 0x7E8001FB, 0x46EFFBFF, 0x31C10000,
+ 0xDB428661, 0x33F89B1F, 0xA3BFEFFF, 0x537BFFBE
+};
+
+static
+void
+ time_a_f32_z_ui32_rx(
+ uint_fast32_t function( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui32_f32 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_f32_z_ui64_rx(
+ uint_fast64_t function( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui32_f32 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_f32_z_i32_rx(
+ int_fast32_t function( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui32_f32 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_f32_z_i64_rx(
+ int_fast64_t function( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui32_f32 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_f32_z_ui32_x( uint_fast32_t function( float32_t, bool ), bool exact )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui32_f32 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_f32_z_ui64_x( uint_fast64_t function( float32_t, bool ), bool exact )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui32_f32 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void time_a_f32_z_i32_x( int_fast32_t function( float32_t, bool ), bool exact )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui32_f32 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void time_a_f32_z_i64_x( int_fast64_t function( float32_t, bool ), bool exact )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui32_f32 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#ifdef FLOAT16
+
+static void time_a_f32_z_f16( float16_t function( float32_t ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui32_f32 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+#ifdef FLOAT64
+
+static void time_a_f32_z_f64( float64_t function( float32_t ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui32_f32 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+static void time_a_f32_z_extF80( void function( float32_t, extFloat80_t * ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui32_f32 uA;
+ extFloat80_t z;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f, &z );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f, &z );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+static void time_a_f32_z_f128( void function( float32_t, float128_t * ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui32_f32 uA;
+ float128_t z;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f, &z );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f, &z );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+static
+void
+ time_az_f32_rx(
+ float32_t function( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui32_f32 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F32UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static void time_abz_f32( float32_t function( float32_t, float32_t ) )
+{
+ int_fast64_t count;
+ int inputNumA, inputNumB;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui32_f32 uA, uB;
+ clock_t endClock;
+
+ count = 0;
+ inputNumA = 0;
+ inputNumB = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F32UI[inputNumA];
+ uB.ui = inputs_F32UI[inputNumB];
+ function( uA.f, uB.f );
+ inputNumA = (inputNumA + 1) & (numInputs_f32 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_f32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNumA = 0;
+ inputNumB = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F32UI[inputNumA];
+ uB.ui = inputs_F32UI[inputNumB];
+ function( uA.f, uB.f );
+ inputNumA = (inputNumA + 1) & (numInputs_f32 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_f32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void time_abcz_f32( float32_t function( float32_t, float32_t, float32_t ) )
+{
+ int_fast64_t count;
+ int inputNumA, inputNumB, inputNumC;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui32_f32 uA, uB, uC;
+ clock_t endClock;
+
+ count = 0;
+ inputNumA = 0;
+ inputNumB = 0;
+ inputNumC = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F32UI[inputNumA];
+ uB.ui = inputs_F32UI[inputNumB];
+ uC.ui = inputs_F32UI[inputNumC];
+ function( uA.f, uB.f, uC.f );
+ inputNumA = (inputNumA + 1) & (numInputs_f32 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_f32 - 1);
+ if ( ! inputNumB ) ++inputNumC;
+ inputNumC = (inputNumC + 1) & (numInputs_f32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNumA = 0;
+ inputNumB = 0;
+ inputNumC = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F32UI[inputNumA];
+ uB.ui = inputs_F32UI[inputNumB];
+ uC.ui = inputs_F32UI[inputNumC];
+ function( uA.f, uB.f, uC.f );
+ inputNumA = (inputNumA + 1) & (numInputs_f32 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_f32 - 1);
+ if ( ! inputNumB ) ++inputNumC;
+ inputNumC = (inputNumC + 1) & (numInputs_f32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static void time_ab_f32_z_bool( bool function( float32_t, float32_t ) )
+{
+ int_fast64_t count;
+ int inputNumA, inputNumB;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui32_f32 uA, uB;
+ clock_t endClock;
+
+ count = 0;
+ inputNumA = 0;
+ inputNumB = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F32UI[inputNumA];
+ uB.ui = inputs_F32UI[inputNumB];
+ function( uA.f, uB.f );
+ inputNumA = (inputNumA + 1) & (numInputs_f32 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_f32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNumA = 0;
+ inputNumB = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F32UI[inputNumA];
+ uB.ui = inputs_F32UI[inputNumB];
+ function( uA.f, uB.f );
+ inputNumA = (inputNumA + 1) & (numInputs_f32 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_f32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static const uint32_t inputs_F32UI_pos[numInputs_f32] = {
+ 0x4EFA0000, 0x41D0B328, 0x00000000, 0x3E69A31E,
+ 0x2F803EFF, 0x3F800000, 0x17BF8000, 0x674A301A,
+ 0x4E010003, 0x7EE3C75D, 0x3D803FE0, 0x3FFEFF00,
+ 0x7981F800, 0x431FFFFC, 0x4100C000, 0x3D87EFFF,
+ 0x4103FEFE, 0x3C000007, 0x3F01F7FF, 0x4E6C6B5C,
+ 0x4187FFFE, 0x458B9F13, 0x4F88007F, 0x5F004007,
+ 0x37FFD7FE, 0x7E8001FB, 0x46EFFBFF, 0x31C10000,
+ 0x5B428661, 0x33F89B1F, 0x23BFEFFF, 0x537BFFBE
+};
+
+static void time_az_f32_pos( float32_t function( float32_t ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui32_f32 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F32UI_pos[inputNum];
+ function( uA.f );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F32UI_pos[inputNum];
+ function( uA.f );
+ inputNum = (inputNum + 1) & (numInputs_f32 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+#ifdef FLOAT64
+
+enum { numInputs_f64 = 32 };
+
+static const uint64_t inputs_F64UI[numInputs_f64] = {
+ UINT64_C( 0x422FFFC008000000 ),
+ UINT64_C( 0xB7E0000480000000 ),
+ UINT64_C( 0xF3FD2546120B7935 ),
+ UINT64_C( 0x3FF0000000000000 ),
+ UINT64_C( 0xCE07F766F09588D6 ),
+ UINT64_C( 0x8000000000000000 ),
+ UINT64_C( 0x3FCE000400000000 ),
+ UINT64_C( 0x8313B60F0032BED8 ),
+ UINT64_C( 0xC1EFFFFFC0002000 ),
+ UINT64_C( 0x3FB3C75D224F2B0F ),
+ UINT64_C( 0x7FD00000004000FF ),
+ UINT64_C( 0xA12FFF8000001FFF ),
+ UINT64_C( 0x3EE0000000FE0000 ),
+ UINT64_C( 0x0010000080000004 ),
+ UINT64_C( 0x41CFFFFE00000020 ),
+ UINT64_C( 0x40303FFFFFFFFFFD ),
+ UINT64_C( 0x3FD000003FEFFFFF ),
+ UINT64_C( 0xBFD0000010000000 ),
+ UINT64_C( 0xB7FC6B5C16CA55CF ),
+ UINT64_C( 0x413EEB940B9D1301 ),
+ UINT64_C( 0xC7E00200001FFFFF ),
+ UINT64_C( 0x47F00021FFFFFFFE ),
+ UINT64_C( 0xBFFFFFFFF80000FF ),
+ UINT64_C( 0xC07FFFFFE00FFFFF ),
+ UINT64_C( 0x001497A63740C5E8 ),
+ UINT64_C( 0xC4BFFFE0001FFFFF ),
+ UINT64_C( 0x96FFDFFEFFFFFFFF ),
+ UINT64_C( 0x403FC000000001FE ),
+ UINT64_C( 0xFFD00000000001F6 ),
+ UINT64_C( 0x0640400002000000 ),
+ UINT64_C( 0x479CEE1E4F789FE0 ),
+ UINT64_C( 0xC237FFFFFFFFFDFE )
+};
+
+static
+void
+ time_a_f64_z_ui32_rx(
+ uint_fast32_t function( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui64_f64 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_f64_z_ui64_rx(
+ uint_fast64_t function( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui64_f64 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_f64_z_i32_rx(
+ int_fast32_t function( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui64_f64 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_f64_z_i64_rx(
+ int_fast64_t function( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui64_f64 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_f64_z_ui32_x( uint_fast32_t function( float64_t, bool ), bool exact )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui64_f64 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_f64_z_ui64_x( uint_fast64_t function( float64_t, bool ), bool exact )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui64_f64 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void time_a_f64_z_i32_x( int_fast32_t function( float64_t, bool ), bool exact )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui64_f64 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void time_a_f64_z_i64_x( int_fast64_t function( float64_t, bool ), bool exact )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui64_f64 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#ifdef FLOAT16
+
+static void time_a_f64_z_f16( float16_t function( float64_t ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui64_f64 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+static void time_a_f64_z_f32( float32_t function( float64_t ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui64_f64 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#ifdef EXTFLOAT80
+
+static void time_a_f64_z_extF80( void function( float64_t, extFloat80_t * ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui64_f64 uA;
+ extFloat80_t z;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f, &z );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f, &z );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+static void time_a_f64_z_f128( void function( float64_t, float128_t * ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui64_f64 uA;
+ float128_t z;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f, &z );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f, &z );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+static
+void
+ time_az_f64_rx(
+ float64_t function( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui64_f64 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F64UI[inputNum];
+ function( uA.f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static void time_abz_f64( float64_t function( float64_t, float64_t ) )
+{
+ int_fast64_t count;
+ int inputNumA, inputNumB;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui64_f64 uA, uB;
+ clock_t endClock;
+
+ count = 0;
+ inputNumA = 0;
+ inputNumB = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F64UI[inputNumA];
+ uB.ui = inputs_F64UI[inputNumB];
+ function( uA.f, uB.f );
+ inputNumA = (inputNumA + 1) & (numInputs_f64 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_f64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNumA = 0;
+ inputNumB = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F64UI[inputNumA];
+ uB.ui = inputs_F64UI[inputNumB];
+ function( uA.f, uB.f );
+ inputNumA = (inputNumA + 1) & (numInputs_f64 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_f64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void time_abcz_f64( float64_t function( float64_t, float64_t, float64_t ) )
+{
+ int_fast64_t count;
+ int inputNumA, inputNumB, inputNumC;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui64_f64 uA, uB, uC;
+ clock_t endClock;
+
+ count = 0;
+ inputNumA = 0;
+ inputNumB = 0;
+ inputNumC = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F64UI[inputNumA];
+ uB.ui = inputs_F64UI[inputNumB];
+ uC.ui = inputs_F64UI[inputNumC];
+ function( uA.f, uB.f, uC.f );
+ inputNumA = (inputNumA + 1) & (numInputs_f64 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_f64 - 1);
+ if ( ! inputNumB ) ++inputNumC;
+ inputNumC = (inputNumC + 1) & (numInputs_f64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNumA = 0;
+ inputNumB = 0;
+ inputNumC = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F64UI[inputNumA];
+ uB.ui = inputs_F64UI[inputNumB];
+ uC.ui = inputs_F64UI[inputNumC];
+ function( uA.f, uB.f, uC.f );
+ inputNumA = (inputNumA + 1) & (numInputs_f64 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_f64 - 1);
+ if ( ! inputNumB ) ++inputNumC;
+ inputNumC = (inputNumC + 1) & (numInputs_f64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static void time_ab_f64_z_bool( bool function( float64_t, float64_t ) )
+{
+ int_fast64_t count;
+ int inputNumA, inputNumB;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui64_f64 uA, uB;
+ clock_t endClock;
+
+ count = 0;
+ inputNumA = 0;
+ inputNumB = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F64UI[inputNumA];
+ uB.ui = inputs_F64UI[inputNumB];
+ function( uA.f, uB.f );
+ inputNumA = (inputNumA + 1) & (numInputs_f64 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_f64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNumA = 0;
+ inputNumB = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F64UI[inputNumA];
+ uB.ui = inputs_F64UI[inputNumB];
+ function( uA.f, uB.f );
+ inputNumA = (inputNumA + 1) & (numInputs_f64 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_f64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static const uint64_t inputs_F64UI_pos[numInputs_f64] = {
+ UINT64_C( 0x422FFFC008000000 ),
+ UINT64_C( 0x37E0000480000000 ),
+ UINT64_C( 0x73FD2546120B7935 ),
+ UINT64_C( 0x3FF0000000000000 ),
+ UINT64_C( 0x4E07F766F09588D6 ),
+ UINT64_C( 0x0000000000000000 ),
+ UINT64_C( 0x3FCE000400000000 ),
+ UINT64_C( 0x0313B60F0032BED8 ),
+ UINT64_C( 0x41EFFFFFC0002000 ),
+ UINT64_C( 0x3FB3C75D224F2B0F ),
+ UINT64_C( 0x7FD00000004000FF ),
+ UINT64_C( 0x212FFF8000001FFF ),
+ UINT64_C( 0x3EE0000000FE0000 ),
+ UINT64_C( 0x0010000080000004 ),
+ UINT64_C( 0x41CFFFFE00000020 ),
+ UINT64_C( 0x40303FFFFFFFFFFD ),
+ UINT64_C( 0x3FD000003FEFFFFF ),
+ UINT64_C( 0x3FD0000010000000 ),
+ UINT64_C( 0x37FC6B5C16CA55CF ),
+ UINT64_C( 0x413EEB940B9D1301 ),
+ UINT64_C( 0x47E00200001FFFFF ),
+ UINT64_C( 0x47F00021FFFFFFFE ),
+ UINT64_C( 0x3FFFFFFFF80000FF ),
+ UINT64_C( 0x407FFFFFE00FFFFF ),
+ UINT64_C( 0x001497A63740C5E8 ),
+ UINT64_C( 0x44BFFFE0001FFFFF ),
+ UINT64_C( 0x16FFDFFEFFFFFFFF ),
+ UINT64_C( 0x403FC000000001FE ),
+ UINT64_C( 0x7FD00000000001F6 ),
+ UINT64_C( 0x0640400002000000 ),
+ UINT64_C( 0x479CEE1E4F789FE0 ),
+ UINT64_C( 0x4237FFFFFFFFFDFE )
+};
+
+static void time_az_f64_pos( float64_t function( float64_t ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ union ui64_f64 uA;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ uA.ui = inputs_F64UI_pos[inputNum];
+ function( uA.f );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ uA.ui = inputs_F64UI_pos[inputNum];
+ function( uA.f );
+ inputNum = (inputNum + 1) & (numInputs_f64 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+#ifdef EXTFLOAT80
+
+#ifdef LITTLEENDIAN
+#define extF80Const( v64, v0 ) { UINT64_C( v0 ), v64 }
+#else
+#define extF80Const( v64, v0 ) { v64, UINT64_C( v0 ) }
+#endif
+
+enum { numInputs_extF80 = 32 };
+
+static
+const union { struct extFloat80M s; extFloat80_t f; }
+ inputs_extF80[numInputs_extF80] = {
+ extF80Const( 0xC03F, 0xA9BE15A19C1E8B62 ),
+ extF80Const( 0x8000, 0x0000000000000000 ),
+ extF80Const( 0x75A8, 0xE59591E4788957A5 ),
+ extF80Const( 0xBFFF, 0xFFF0000000000040 ),
+ extF80Const( 0x0CD8, 0xFC000000000007FE ),
+ extF80Const( 0x43BA, 0x99A4000000000000 ),
+ extF80Const( 0x3FFF, 0x8000000000000000 ),
+ extF80Const( 0x4081, 0x94FBF1BCEB5545F0 ),
+ extF80Const( 0x403E, 0xFFF0000000002000 ),
+ extF80Const( 0x3FFE, 0xC860E3C75D224F28 ),
+ extF80Const( 0x407E, 0xFC00000FFFFFFFFE ),
+ extF80Const( 0x737A, 0x800000007FFDFFFE ),
+ extF80Const( 0x4044, 0xFFFFFF80000FFFFF ),
+ extF80Const( 0xBBFE, 0x8000040000001FFE ),
+ extF80Const( 0xC002, 0xFF80000000000020 ),
+ extF80Const( 0xDE8D, 0xFFFFFFFFFFE00004 ),
+ extF80Const( 0xC004, 0x8000000000003FFB ),
+ extF80Const( 0x407F, 0x800000000003FFFE ),
+ extF80Const( 0xC000, 0xA459EE6A5C16CA55 ),
+ extF80Const( 0x8003, 0xC42CBF7399AEEB94 ),
+ extF80Const( 0xBF7F, 0xF800000000000006 ),
+ extF80Const( 0xC07F, 0xBF56BE8871F28FEA ),
+ extF80Const( 0xC07E, 0xFFFF77FFFFFFFFFE ),
+ extF80Const( 0xADC9, 0x8000000FFFFFFFDE ),
+ extF80Const( 0xC001, 0xEFF7FFFFFFFFFFFF ),
+ extF80Const( 0x4001, 0xBE84F30125C497A6 ),
+ extF80Const( 0xC06B, 0xEFFFFFFFFFFFFFFF ),
+ extF80Const( 0x4080, 0xFFFFFFFFBFFFFFFF ),
+ extF80Const( 0x87E9, 0x81FFFFFFFFFFFBFF ),
+ extF80Const( 0xA63F, 0x801FFFFFFEFFFFFE ),
+ extF80Const( 0x403C, 0x801FFFFFFFF7FFFF ),
+ extF80Const( 0x4018, 0x8000000000080003 )
+ };
+
+static
+void
+ time_a_extF80_z_ui32_rx(
+ uint_fast32_t function( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_extF80[inputNum].f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_extF80[inputNum].f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_extF80_z_ui64_rx(
+ uint_fast64_t function( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_extF80[inputNum].f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_extF80[inputNum].f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_extF80_z_i32_rx(
+ int_fast32_t function( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_extF80[inputNum].f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_extF80[inputNum].f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_extF80_z_i64_rx(
+ int_fast64_t function( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_extF80[inputNum].f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_extF80[inputNum].f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_extF80_z_ui32_x(
+ uint_fast32_t function( const extFloat80_t *, bool ), bool exact )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_extF80[inputNum].f, exact );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_extF80[inputNum].f, exact );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_extF80_z_ui64_x(
+ uint_fast64_t function( const extFloat80_t *, bool ), bool exact )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_extF80[inputNum].f, exact );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_extF80[inputNum].f, exact );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_extF80_z_i32_x(
+ int_fast32_t function( const extFloat80_t *, bool ), bool exact )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_extF80[inputNum].f, exact );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_extF80[inputNum].f, exact );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_extF80_z_i64_x(
+ int_fast64_t function( const extFloat80_t *, bool ), bool exact )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_extF80[inputNum].f, exact );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_extF80[inputNum].f, exact );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#ifdef FLOAT16
+
+static void time_a_extF80_z_f16( float16_t function( const extFloat80_t * ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_extF80[inputNum].f );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_extF80[inputNum].f );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+static void time_a_extF80_z_f32( float32_t function( const extFloat80_t * ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_extF80[inputNum].f );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_extF80[inputNum].f );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#ifdef FLOAT64
+
+static void time_a_extF80_z_f64( float64_t function( const extFloat80_t * ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_extF80[inputNum].f );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_extF80[inputNum].f );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+static
+void
+ time_a_extF80_z_f128( void function( const extFloat80_t *, float128_t * ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ float128_t z;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_extF80[inputNum].f, &z );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_extF80[inputNum].f, &z );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+static
+void
+ time_az_extF80_rx(
+ void function( const extFloat80_t *, uint_fast8_t, bool, extFloat80_t * ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ extFloat80_t z;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_extF80[inputNum].f, roundingMode, exact, &z );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_extF80[inputNum].f, roundingMode, exact, &z );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_abz_extF80(
+ void
+ function( const extFloat80_t *, const extFloat80_t *, extFloat80_t * )
+ )
+{
+ int_fast64_t count;
+ int inputNumA, inputNumB;
+ clock_t startClock;
+ int_fast64_t i;
+ extFloat80_t z;
+ clock_t endClock;
+
+ count = 0;
+ inputNumA = 0;
+ inputNumB = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function(
+ &inputs_extF80[inputNumA].f, &inputs_extF80[inputNumB].f, &z );
+ inputNumA = (inputNumA + 1) & (numInputs_extF80 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_extF80 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNumA = 0;
+ inputNumB = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function(
+ &inputs_extF80[inputNumA].f, &inputs_extF80[inputNumB].f, &z );
+ inputNumA = (inputNumA + 1) & (numInputs_extF80 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_extF80 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_ab_extF80_z_bool(
+ bool function( const extFloat80_t *, const extFloat80_t * ) )
+{
+ int_fast64_t count;
+ int inputNumA, inputNumB;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNumA = 0;
+ inputNumB = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function(
+ &inputs_extF80[inputNumA].f, &inputs_extF80[inputNumB].f );
+ inputNumA = (inputNumA + 1) & (numInputs_extF80 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_extF80 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNumA = 0;
+ inputNumB = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_extF80[inputNumA].f, &inputs_extF80[inputNumB].f );
+ inputNumA = (inputNumA + 1) & (numInputs_extF80 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_extF80 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+const union { struct extFloat80M s; extFloat80_t f; }
+ inputs_extF80_pos[numInputs_extF80] = {
+ extF80Const( 0x403F, 0xA9BE15A19C1E8B62 ),
+ extF80Const( 0x0000, 0x0000000000000000 ),
+ extF80Const( 0x75A8, 0xE59591E4788957A5 ),
+ extF80Const( 0x3FFF, 0xFFF0000000000040 ),
+ extF80Const( 0x0CD8, 0xFC000000000007FE ),
+ extF80Const( 0x43BA, 0x99A4000000000000 ),
+ extF80Const( 0x3FFF, 0x8000000000000000 ),
+ extF80Const( 0x4081, 0x94FBF1BCEB5545F0 ),
+ extF80Const( 0x403E, 0xFFF0000000002000 ),
+ extF80Const( 0x3FFE, 0xC860E3C75D224F28 ),
+ extF80Const( 0x407E, 0xFC00000FFFFFFFFE ),
+ extF80Const( 0x737A, 0x800000007FFDFFFE ),
+ extF80Const( 0x4044, 0xFFFFFF80000FFFFF ),
+ extF80Const( 0x3BFE, 0x8000040000001FFE ),
+ extF80Const( 0x4002, 0xFF80000000000020 ),
+ extF80Const( 0x5E8D, 0xFFFFFFFFFFE00004 ),
+ extF80Const( 0x4004, 0x8000000000003FFB ),
+ extF80Const( 0x407F, 0x800000000003FFFE ),
+ extF80Const( 0x4000, 0xA459EE6A5C16CA55 ),
+ extF80Const( 0x0003, 0xC42CBF7399AEEB94 ),
+ extF80Const( 0x3F7F, 0xF800000000000006 ),
+ extF80Const( 0x407F, 0xBF56BE8871F28FEA ),
+ extF80Const( 0x407E, 0xFFFF77FFFFFFFFFE ),
+ extF80Const( 0x2DC9, 0x8000000FFFFFFFDE ),
+ extF80Const( 0x4001, 0xEFF7FFFFFFFFFFFF ),
+ extF80Const( 0x4001, 0xBE84F30125C497A6 ),
+ extF80Const( 0x406B, 0xEFFFFFFFFFFFFFFF ),
+ extF80Const( 0x4080, 0xFFFFFFFFBFFFFFFF ),
+ extF80Const( 0x07E9, 0x81FFFFFFFFFFFBFF ),
+ extF80Const( 0x263F, 0x801FFFFFFEFFFFFE ),
+ extF80Const( 0x403C, 0x801FFFFFFFF7FFFF ),
+ extF80Const( 0x4018, 0x8000000000080003 )
+ };
+
+static
+void
+ time_az_extF80_pos( void function( const extFloat80_t *, extFloat80_t * ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ extFloat80_t z;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_extF80[inputNum].f, &z );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_extF80[inputNum].f, &z );
+ inputNum = (inputNum + 1) & (numInputs_extF80 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+#ifdef FLOAT128
+
+#ifdef LITTLEENDIAN
+#define f128Const( v64, v0 ) { UINT64_C( v0 ), UINT64_C( v64 ) }
+#else
+#define f128Const( v64, v0 ) { UINT64_C( v64 ), UINT64_C( v0 ) }
+#endif
+
+enum { numInputs_f128 = 32 };
+
+static
+const union { struct uint128 ui; float128_t f; }
+ inputs_f128[numInputs_f128] = {
+ f128Const( 0x3FDA200000100000, 0x0000000000000000 ),
+ f128Const( 0x3FFF000000000000, 0x0000000000000000 ),
+ f128Const( 0x85F14776190C8306, 0xD8715F4E3D54BB92 ),
+ f128Const( 0xF2B00000007FFFFF, 0xFFFFFFFFFFF7FFFF ),
+ f128Const( 0x8000000000000000, 0x0000000000000000 ),
+ f128Const( 0xBFFFFFFFFFE00000, 0x0000008000000000 ),
+ f128Const( 0x407F1719CE722F3E, 0xDA6B3FE5FF29425B ),
+ f128Const( 0x43FFFF8000000000, 0x0000000000400000 ),
+ f128Const( 0x401E000000000100, 0x0000000000002000 ),
+ f128Const( 0x3FFED71DACDA8E47, 0x4860E3C75D224F28 ),
+ f128Const( 0xBF7ECFC1E90647D1, 0x7A124FE55623EE44 ),
+ f128Const( 0x0DF7007FFFFFFFFF, 0xFFFFFFFFEFFFFFFF ),
+ f128Const( 0x3FE5FFEFFFFFFFFF, 0xFFFFFFFFFFFFEFFF ),
+ f128Const( 0x403FFFFFFFFFFFFF, 0xFFFFFFFFFFFFFBFE ),
+ f128Const( 0xBFFB2FBF7399AFEB, 0xA459EE6A5C16CA55 ),
+ f128Const( 0xBDB8FFFFFFFFFFFC, 0x0000000000000400 ),
+ f128Const( 0x3FC8FFDFFFFFFFFF, 0xFFFFFFFFF0000000 ),
+ f128Const( 0x3FFBFFFFFFDFFFFF, 0xFFF8000000000000 ),
+ f128Const( 0x407043C11737BE84, 0xDDD58212ADC937F4 ),
+ f128Const( 0x8001000000000000, 0x0000001000000001 ),
+ f128Const( 0xC036FFFFFFFFFFFF, 0xFE40000000000000 ),
+ f128Const( 0x4002FFFFFE000002, 0x0000000000000000 ),
+ f128Const( 0x4000C3FEDE897773, 0x326AC4FD8EFBE6DC ),
+ f128Const( 0xBFFF0000000FFFFF, 0xFFFFFE0000000000 ),
+ f128Const( 0x62C3E502146E426D, 0x43F3CAA0DC7DF1A0 ),
+ f128Const( 0xB5CBD32E52BB570E, 0xBCC477CB11C6236C ),
+ f128Const( 0xE228FFFFFFC00000, 0x0000000000000000 ),
+ f128Const( 0x3F80000000000000, 0x0000000080000008 ),
+ f128Const( 0xC1AFFFDFFFFFFFFF, 0xFFFC000000000000 ),
+ f128Const( 0xC96F000000000000, 0x00000001FFFBFFFF ),
+ f128Const( 0x3DE09BFE7923A338, 0xBCC8FBBD7CEC1F4F ),
+ f128Const( 0x401CFFFFFFFFFFFF, 0xFFFFFFFEFFFFFF80 )
+ };
+
+static
+void
+ time_a_f128_z_ui32_rx(
+ uint_fast32_t function( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_f128[inputNum].f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_f128[inputNum].f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_f128_z_ui64_rx(
+ uint_fast64_t function( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_f128[inputNum].f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_f128[inputNum].f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_f128_z_i32_rx(
+ int_fast32_t function( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_f128[inputNum].f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_f128[inputNum].f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_f128_z_i64_rx(
+ int_fast64_t function( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_f128[inputNum].f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_f128[inputNum].f, roundingMode, exact );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_f128_z_ui32_x(
+ uint_fast32_t function( const float128_t *, bool ), bool exact )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_f128[inputNum].f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_f128[inputNum].f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_f128_z_ui64_x(
+ uint_fast64_t function( const float128_t *, bool ), bool exact )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_f128[inputNum].f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_f128[inputNum].f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_f128_z_i32_x(
+ int_fast32_t function( const float128_t *, bool ), bool exact )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_f128[inputNum].f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_f128[inputNum].f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_a_f128_z_i64_x(
+ int_fast64_t function( const float128_t *, bool ), bool exact )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_f128[inputNum].f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_f128[inputNum].f, exact );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#ifdef FLOAT16
+
+static void time_a_f128_z_f16( float16_t function( const float128_t * ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_f128[inputNum].f );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_f128[inputNum].f );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+static void time_a_f128_z_f32( float32_t function( const float128_t * ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_f128[inputNum].f );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_f128[inputNum].f );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#ifdef FLOAT64
+
+static void time_a_f128_z_f64( float64_t function( const float128_t * ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_f128[inputNum].f );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_f128[inputNum].f );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+static
+void
+ time_a_f128_z_extF80( void function( const float128_t *, extFloat80_t * ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ extFloat80_t z;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_f128[inputNum].f, &z );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_f128[inputNum].f, &z );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+static
+void
+ time_az_f128_rx(
+ void function( const float128_t *, uint_fast8_t, bool, float128_t * ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ float128_t z;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_f128[inputNum].f, roundingMode, exact, &z );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_f128[inputNum].f, roundingMode, exact, &z );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_abz_f128(
+ void function( const float128_t *, const float128_t *, float128_t * ) )
+{
+ int_fast64_t count;
+ int inputNumA, inputNumB;
+ clock_t startClock;
+ int_fast64_t i;
+ float128_t z;
+ clock_t endClock;
+
+ count = 0;
+ inputNumA = 0;
+ inputNumB = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function(
+ &inputs_f128[inputNumA].f, &inputs_f128[inputNumB].f, &z );
+ inputNumA = (inputNumA + 1) & (numInputs_f128 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_f128 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNumA = 0;
+ inputNumB = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_f128[inputNumA].f, &inputs_f128[inputNumB].f, &z );
+ inputNumA = (inputNumA + 1) & (numInputs_f128 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_f128 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_abcz_f128(
+ void
+ function(
+ const float128_t *,
+ const float128_t *,
+ const float128_t *,
+ float128_t *
+ )
+ )
+{
+ int_fast64_t count;
+ int inputNumA, inputNumB, inputNumC;
+ clock_t startClock;
+ int_fast64_t i;
+ float128_t z;
+ clock_t endClock;
+
+ count = 0;
+ inputNumA = 0;
+ inputNumB = 0;
+ inputNumC = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function(
+ &inputs_f128[inputNumA].f,
+ &inputs_f128[inputNumB].f,
+ &inputs_f128[inputNumC].f,
+ &z
+ );
+ inputNumA = (inputNumA + 1) & (numInputs_f128 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_f128 - 1);
+ if ( ! inputNumB ) ++inputNumC;
+ inputNumC = (inputNumC + 1) & (numInputs_f128 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNumA = 0;
+ inputNumB = 0;
+ inputNumC = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function(
+ &inputs_f128[inputNumA].f,
+ &inputs_f128[inputNumB].f,
+ &inputs_f128[inputNumC].f,
+ &z
+ );
+ inputNumA = (inputNumA + 1) & (numInputs_f128 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_f128 - 1);
+ if ( ! inputNumB ) ++inputNumC;
+ inputNumC = (inputNumC + 1) & (numInputs_f128 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+void
+ time_ab_f128_z_bool( bool function( const float128_t *, const float128_t * ) )
+{
+ int_fast64_t count;
+ int inputNumA, inputNumB;
+ clock_t startClock;
+ int_fast64_t i;
+ clock_t endClock;
+
+ count = 0;
+ inputNumA = 0;
+ inputNumB = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_f128[inputNumA].f, &inputs_f128[inputNumB].f );
+ inputNumA = (inputNumA + 1) & (numInputs_f128 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_f128 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNumA = 0;
+ inputNumB = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_f128[inputNumA].f, &inputs_f128[inputNumB].f );
+ inputNumA = (inputNumA + 1) & (numInputs_f128 - 1);
+ if ( ! inputNumA ) ++inputNumB;
+ inputNumB = (inputNumB + 1) & (numInputs_f128 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+static
+const union { struct uint128 ui; float128_t f; }
+ inputs_f128_pos[numInputs_f128] = {
+ f128Const( 0x3FDA200000100000, 0x0000000000000000 ),
+ f128Const( 0x3FFF000000000000, 0x0000000000000000 ),
+ f128Const( 0x05F14776190C8306, 0xD8715F4E3D54BB92 ),
+ f128Const( 0x72B00000007FFFFF, 0xFFFFFFFFFFF7FFFF ),
+ f128Const( 0x0000000000000000, 0x0000000000000000 ),
+ f128Const( 0x3FFFFFFFFFE00000, 0x0000008000000000 ),
+ f128Const( 0x407F1719CE722F3E, 0xDA6B3FE5FF29425B ),
+ f128Const( 0x43FFFF8000000000, 0x0000000000400000 ),
+ f128Const( 0x401E000000000100, 0x0000000000002000 ),
+ f128Const( 0x3FFED71DACDA8E47, 0x4860E3C75D224F28 ),
+ f128Const( 0x3F7ECFC1E90647D1, 0x7A124FE55623EE44 ),
+ f128Const( 0x0DF7007FFFFFFFFF, 0xFFFFFFFFEFFFFFFF ),
+ f128Const( 0x3FE5FFEFFFFFFFFF, 0xFFFFFFFFFFFFEFFF ),
+ f128Const( 0x403FFFFFFFFFFFFF, 0xFFFFFFFFFFFFFBFE ),
+ f128Const( 0x3FFB2FBF7399AFEB, 0xA459EE6A5C16CA55 ),
+ f128Const( 0x3DB8FFFFFFFFFFFC, 0x0000000000000400 ),
+ f128Const( 0x3FC8FFDFFFFFFFFF, 0xFFFFFFFFF0000000 ),
+ f128Const( 0x3FFBFFFFFFDFFFFF, 0xFFF8000000000000 ),
+ f128Const( 0x407043C11737BE84, 0xDDD58212ADC937F4 ),
+ f128Const( 0x0001000000000000, 0x0000001000000001 ),
+ f128Const( 0x4036FFFFFFFFFFFF, 0xFE40000000000000 ),
+ f128Const( 0x4002FFFFFE000002, 0x0000000000000000 ),
+ f128Const( 0x4000C3FEDE897773, 0x326AC4FD8EFBE6DC ),
+ f128Const( 0x3FFF0000000FFFFF, 0xFFFFFE0000000000 ),
+ f128Const( 0x62C3E502146E426D, 0x43F3CAA0DC7DF1A0 ),
+ f128Const( 0x35CBD32E52BB570E, 0xBCC477CB11C6236C ),
+ f128Const( 0x6228FFFFFFC00000, 0x0000000000000000 ),
+ f128Const( 0x3F80000000000000, 0x0000000080000008 ),
+ f128Const( 0x41AFFFDFFFFFFFFF, 0xFFFC000000000000 ),
+ f128Const( 0x496F000000000000, 0x00000001FFFBFFFF ),
+ f128Const( 0x3DE09BFE7923A338, 0xBCC8FBBD7CEC1F4F ),
+ f128Const( 0x401CFFFFFFFFFFFF, 0xFFFFFFFEFFFFFF80 )
+ };
+
+static
+void time_az_f128_pos( void function( const float128_t *, float128_t * ) )
+{
+ int_fast64_t count;
+ int inputNum;
+ clock_t startClock;
+ int_fast64_t i;
+ float128_t z;
+ clock_t endClock;
+
+ count = 0;
+ inputNum = 0;
+ startClock = clock();
+ do {
+ for ( i = minIterations; i; --i ) {
+ function( &inputs_f128[inputNum].f, &z );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ count += minIterations;
+ } while ( clock() - startClock < CLOCKS_PER_SEC );
+ inputNum = 0;
+ startClock = clock();
+ for ( i = count; i; --i ) {
+ function( &inputs_f128[inputNum].f, &z );
+ inputNum = (inputNum + 1) & (numInputs_f128 - 1);
+ }
+ endClock = clock();
+ reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+static
+void
+ timeFunctionInstance(
+ int functionCode, uint_fast8_t roundingMode, bool exact )
+{
+#ifdef FLOAT16
+ float16_t (*function_abz_f16)( float16_t, float16_t );
+ bool (*function_ab_f16_z_bool)( float16_t, float16_t );
+#endif
+ float32_t (*function_abz_f32)( float32_t, float32_t );
+ bool (*function_ab_f32_z_bool)( float32_t, float32_t );
+#ifdef FLOAT64
+ float64_t (*function_abz_f64)( float64_t, float64_t );
+ bool (*function_ab_f64_z_bool)( float64_t, float64_t );
+#endif
+#ifdef EXTFLOAT80
+ void
+ (*function_abz_extF80)(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+ bool
+ (*function_ab_extF80_z_bool)(
+ const extFloat80_t *, const extFloat80_t * );
+#endif
+#ifdef FLOAT128
+ void
+ (*function_abz_f128)(
+ const float128_t *, const float128_t *, float128_t * );
+ bool (*function_ab_f128_z_bool)( const float128_t *, const float128_t * );
+#endif
+
+ switch ( functionCode ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef FLOAT16
+ case UI32_TO_F16:
+ time_a_ui32_z_f16( ui32_to_f16 );
+ break;
+#endif
+ case UI32_TO_F32:
+ time_a_ui32_z_f32( ui32_to_f32 );
+ break;
+#ifdef FLOAT64
+ case UI32_TO_F64:
+ time_a_ui32_z_f64( ui32_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case UI32_TO_EXTF80:
+ time_a_ui32_z_extF80( ui32_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case UI32_TO_F128:
+ time_a_ui32_z_f128( ui32_to_f128M );
+ break;
+#endif
+#ifdef FLOAT16
+ case UI64_TO_F16:
+ time_a_ui64_z_f16( ui64_to_f16 );
+ break;
+#endif
+ case UI64_TO_F32:
+ time_a_ui64_z_f32( ui64_to_f32 );
+ break;
+#ifdef FLOAT64
+ case UI64_TO_F64:
+ time_a_ui64_z_f64( ui64_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case UI64_TO_EXTF80:
+ time_a_ui64_z_extF80( ui64_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case UI64_TO_F128:
+ time_a_ui64_z_f128( ui64_to_f128M );
+ break;
+#endif
+#ifdef FLOAT16
+ case I32_TO_F16:
+ time_a_i32_z_f16( i32_to_f16 );
+ break;
+#endif
+ case I32_TO_F32:
+ time_a_i32_z_f32( i32_to_f32 );
+ break;
+#ifdef FLOAT64
+ case I32_TO_F64:
+ time_a_i32_z_f64( i32_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case I32_TO_EXTF80:
+ time_a_i32_z_extF80( i32_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case I32_TO_F128:
+ time_a_i32_z_f128( i32_to_f128M );
+ break;
+#endif
+#ifdef FLOAT16
+ case I64_TO_F16:
+ time_a_i64_z_f16( i64_to_f16 );
+ break;
+#endif
+ case I64_TO_F32:
+ time_a_i64_z_f32( i64_to_f32 );
+ break;
+#ifdef FLOAT64
+ case I64_TO_F64:
+ time_a_i64_z_f64( i64_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case I64_TO_EXTF80:
+ time_a_i64_z_extF80( i64_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case I64_TO_F128:
+ time_a_i64_z_f128( i64_to_f128M );
+ break;
+#endif
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef FLOAT16
+ case F16_TO_UI32:
+ time_a_f16_z_ui32_rx( f16_to_ui32, roundingMode, exact );
+ break;
+ case F16_TO_UI64:
+ time_a_f16_z_ui64_rx( f16_to_ui64, roundingMode, exact );
+ break;
+ case F16_TO_I32:
+ time_a_f16_z_i32_rx( f16_to_i32, roundingMode, exact );
+ break;
+ case F16_TO_I64:
+ time_a_f16_z_i64_rx( f16_to_i64, roundingMode, exact );
+ break;
+ case F16_TO_UI32_R_MINMAG:
+ time_a_f16_z_ui32_x( f16_to_ui32_r_minMag, exact );
+ break;
+ case F16_TO_UI64_R_MINMAG:
+ time_a_f16_z_ui64_x( f16_to_ui64_r_minMag, exact );
+ break;
+ case F16_TO_I32_R_MINMAG:
+ time_a_f16_z_i32_x( f16_to_i32_r_minMag, exact );
+ break;
+ case F16_TO_I64_R_MINMAG:
+ time_a_f16_z_i64_x( f16_to_i64_r_minMag, exact );
+ break;
+ case F16_TO_F32:
+ time_a_f16_z_f32( f16_to_f32 );
+ break;
+#ifdef FLOAT64
+ case F16_TO_F64:
+ time_a_f16_z_f64( f16_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case F16_TO_EXTF80:
+ time_a_f16_z_extF80( f16_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case F16_TO_F128:
+ time_a_f16_z_f128( f16_to_f128M );
+ break;
+#endif
+ case F16_ROUNDTOINT:
+ time_az_f16_rx( f16_roundToInt, roundingMode, exact );
+ break;
+ case F16_ADD:
+ function_abz_f16 = f16_add;
+ goto time_abz_f16;
+ case F16_SUB:
+ function_abz_f16 = f16_sub;
+ goto time_abz_f16;
+ case F16_MUL:
+ function_abz_f16 = f16_mul;
+ goto time_abz_f16;
+ case F16_DIV:
+ function_abz_f16 = f16_div;
+ goto time_abz_f16;
+ case F16_REM:
+ function_abz_f16 = f16_rem;
+ time_abz_f16:
+ time_abz_f16( function_abz_f16 );
+ break;
+ case F16_MULADD:
+ time_abcz_f16( f16_mulAdd );
+ break;
+ case F16_SQRT:
+ time_az_f16_pos( f16_sqrt );
+ break;
+ case F16_EQ:
+ function_ab_f16_z_bool = f16_eq;
+ goto time_ab_f16_z_bool;
+ case F16_LE:
+ function_ab_f16_z_bool = f16_le;
+ goto time_ab_f16_z_bool;
+ case F16_LT:
+ function_ab_f16_z_bool = f16_lt;
+ goto time_ab_f16_z_bool;
+ case F16_EQ_SIGNALING:
+ function_ab_f16_z_bool = f16_eq_signaling;
+ goto time_ab_f16_z_bool;
+ case F16_LE_QUIET:
+ function_ab_f16_z_bool = f16_le_quiet;
+ goto time_ab_f16_z_bool;
+ case F16_LT_QUIET:
+ function_ab_f16_z_bool = f16_lt_quiet;
+ time_ab_f16_z_bool:
+ time_ab_f16_z_bool( function_ab_f16_z_bool );
+ break;
+#endif
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ case F32_TO_UI32:
+ time_a_f32_z_ui32_rx( f32_to_ui32, roundingMode, exact );
+ break;
+ case F32_TO_UI64:
+ time_a_f32_z_ui64_rx( f32_to_ui64, roundingMode, exact );
+ break;
+ case F32_TO_I32:
+ time_a_f32_z_i32_rx( f32_to_i32, roundingMode, exact );
+ break;
+ case F32_TO_I64:
+ time_a_f32_z_i64_rx( f32_to_i64, roundingMode, exact );
+ break;
+ case F32_TO_UI32_R_MINMAG:
+ time_a_f32_z_ui32_x( f32_to_ui32_r_minMag, exact );
+ break;
+ case F32_TO_UI64_R_MINMAG:
+ time_a_f32_z_ui64_x( f32_to_ui64_r_minMag, exact );
+ break;
+ case F32_TO_I32_R_MINMAG:
+ time_a_f32_z_i32_x( f32_to_i32_r_minMag, exact );
+ break;
+ case F32_TO_I64_R_MINMAG:
+ time_a_f32_z_i64_x( f32_to_i64_r_minMag, exact );
+ break;
+#ifdef FLOAT16
+ case F32_TO_F16:
+ time_a_f32_z_f16( f32_to_f16 );
+ break;
+#endif
+#ifdef FLOAT64
+ case F32_TO_F64:
+ time_a_f32_z_f64( f32_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case F32_TO_EXTF80:
+ time_a_f32_z_extF80( f32_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case F32_TO_F128:
+ time_a_f32_z_f128( f32_to_f128M );
+ break;
+#endif
+ case F32_ROUNDTOINT:
+ time_az_f32_rx( f32_roundToInt, roundingMode, exact );
+ break;
+ case F32_ADD:
+ function_abz_f32 = f32_add;
+ goto time_abz_f32;
+ case F32_SUB:
+ function_abz_f32 = f32_sub;
+ goto time_abz_f32;
+ case F32_MUL:
+ function_abz_f32 = f32_mul;
+ goto time_abz_f32;
+ case F32_DIV:
+ function_abz_f32 = f32_div;
+ goto time_abz_f32;
+ case F32_REM:
+ function_abz_f32 = f32_rem;
+ time_abz_f32:
+ time_abz_f32( function_abz_f32 );
+ break;
+ case F32_MULADD:
+ time_abcz_f32( f32_mulAdd );
+ break;
+ case F32_SQRT:
+ time_az_f32_pos( f32_sqrt );
+ break;
+ case F32_EQ:
+ function_ab_f32_z_bool = f32_eq;
+ goto time_ab_f32_z_bool;
+ case F32_LE:
+ function_ab_f32_z_bool = f32_le;
+ goto time_ab_f32_z_bool;
+ case F32_LT:
+ function_ab_f32_z_bool = f32_lt;
+ goto time_ab_f32_z_bool;
+ case F32_EQ_SIGNALING:
+ function_ab_f32_z_bool = f32_eq_signaling;
+ goto time_ab_f32_z_bool;
+ case F32_LE_QUIET:
+ function_ab_f32_z_bool = f32_le_quiet;
+ goto time_ab_f32_z_bool;
+ case F32_LT_QUIET:
+ function_ab_f32_z_bool = f32_lt_quiet;
+ time_ab_f32_z_bool:
+ time_ab_f32_z_bool( function_ab_f32_z_bool );
+ break;
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef FLOAT64
+ case F64_TO_UI32:
+ time_a_f64_z_ui32_rx( f64_to_ui32, roundingMode, exact );
+ break;
+ case F64_TO_UI64:
+ time_a_f64_z_ui64_rx( f64_to_ui64, roundingMode, exact );
+ break;
+ case F64_TO_I32:
+ time_a_f64_z_i32_rx( f64_to_i32, roundingMode, exact );
+ break;
+ case F64_TO_I64:
+ time_a_f64_z_i64_rx( f64_to_i64, roundingMode, exact );
+ break;
+ case F64_TO_UI32_R_MINMAG:
+ time_a_f64_z_ui32_x( f64_to_ui32_r_minMag, exact );
+ break;
+ case F64_TO_UI64_R_MINMAG:
+ time_a_f64_z_ui64_x( f64_to_ui64_r_minMag, exact );
+ break;
+ case F64_TO_I32_R_MINMAG:
+ time_a_f64_z_i32_x( f64_to_i32_r_minMag, exact );
+ break;
+ case F64_TO_I64_R_MINMAG:
+ time_a_f64_z_i64_x( f64_to_i64_r_minMag, exact );
+ break;
+#ifdef FLOAT16
+ case F64_TO_F16:
+ time_a_f64_z_f16( f64_to_f16 );
+ break;
+#endif
+ case F64_TO_F32:
+ time_a_f64_z_f32( f64_to_f32 );
+ break;
+#ifdef EXTFLOAT80
+ case F64_TO_EXTF80:
+ time_a_f64_z_extF80( f64_to_extF80M );
+ break;
+#endif
+#ifdef FLOAT128
+ case F64_TO_F128:
+ time_a_f64_z_f128( f64_to_f128M );
+ break;
+#endif
+ case F64_ROUNDTOINT:
+ time_az_f64_rx( f64_roundToInt, roundingMode, exact );
+ break;
+ case F64_ADD:
+ function_abz_f64 = f64_add;
+ goto time_abz_f64;
+ case F64_SUB:
+ function_abz_f64 = f64_sub;
+ goto time_abz_f64;
+ case F64_MUL:
+ function_abz_f64 = f64_mul;
+ goto time_abz_f64;
+ case F64_DIV:
+ function_abz_f64 = f64_div;
+ goto time_abz_f64;
+ case F64_REM:
+ function_abz_f64 = f64_rem;
+ time_abz_f64:
+ time_abz_f64( function_abz_f64 );
+ break;
+ case F64_MULADD:
+ time_abcz_f64( f64_mulAdd );
+ break;
+ case F64_SQRT:
+ time_az_f64_pos( f64_sqrt );
+ break;
+ case F64_EQ:
+ function_ab_f64_z_bool = f64_eq;
+ goto time_ab_f64_z_bool;
+ case F64_LE:
+ function_ab_f64_z_bool = f64_le;
+ goto time_ab_f64_z_bool;
+ case F64_LT:
+ function_ab_f64_z_bool = f64_lt;
+ goto time_ab_f64_z_bool;
+ case F64_EQ_SIGNALING:
+ function_ab_f64_z_bool = f64_eq_signaling;
+ goto time_ab_f64_z_bool;
+ case F64_LE_QUIET:
+ function_ab_f64_z_bool = f64_le_quiet;
+ goto time_ab_f64_z_bool;
+ case F64_LT_QUIET:
+ function_ab_f64_z_bool = f64_lt_quiet;
+ time_ab_f64_z_bool:
+ time_ab_f64_z_bool( function_ab_f64_z_bool );
+ break;
+#endif
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef EXTFLOAT80
+ case EXTF80_TO_UI32:
+ time_a_extF80_z_ui32_rx( extF80M_to_ui32, roundingMode, exact );
+ break;
+ case EXTF80_TO_UI64:
+ time_a_extF80_z_ui64_rx( extF80M_to_ui64, roundingMode, exact );
+ break;
+ case EXTF80_TO_I32:
+ time_a_extF80_z_i32_rx( extF80M_to_i32, roundingMode, exact );
+ break;
+ case EXTF80_TO_I64:
+ time_a_extF80_z_i64_rx( extF80M_to_i64, roundingMode, exact );
+ break;
+ case EXTF80_TO_UI32_R_MINMAG:
+ time_a_extF80_z_ui32_x( extF80M_to_ui32_r_minMag, exact );
+ break;
+ case EXTF80_TO_UI64_R_MINMAG:
+ time_a_extF80_z_ui64_x( extF80M_to_ui64_r_minMag, exact );
+ break;
+ case EXTF80_TO_I32_R_MINMAG:
+ time_a_extF80_z_i32_x( extF80M_to_i32_r_minMag, exact );
+ break;
+ case EXTF80_TO_I64_R_MINMAG:
+ time_a_extF80_z_i64_x( extF80M_to_i64_r_minMag, exact );
+ break;
+#ifdef FLOAT16
+ case EXTF80_TO_F16:
+ time_a_extF80_z_f16( extF80M_to_f16 );
+ break;
+#endif
+ case EXTF80_TO_F32:
+ time_a_extF80_z_f32( extF80M_to_f32 );
+ break;
+#ifdef FLOAT64
+ case EXTF80_TO_F64:
+ time_a_extF80_z_f64( extF80M_to_f64 );
+ break;
+#endif
+#ifdef FLOAT128
+ case EXTF80_TO_F128:
+ time_a_extF80_z_f128( extF80M_to_f128M );
+ break;
+#endif
+ case EXTF80_ROUNDTOINT:
+ time_az_extF80_rx( extF80M_roundToInt, roundingMode, exact );
+ break;
+ case EXTF80_ADD:
+ function_abz_extF80 = extF80M_add;
+ goto time_abz_extF80;
+ case EXTF80_SUB:
+ function_abz_extF80 = extF80M_sub;
+ goto time_abz_extF80;
+ case EXTF80_MUL:
+ function_abz_extF80 = extF80M_mul;
+ goto time_abz_extF80;
+ case EXTF80_DIV:
+ function_abz_extF80 = extF80M_div;
+ goto time_abz_extF80;
+ case EXTF80_REM:
+ function_abz_extF80 = extF80M_rem;
+ time_abz_extF80:
+ time_abz_extF80( function_abz_extF80 );
+ break;
+ case EXTF80_SQRT:
+ time_az_extF80_pos( extF80M_sqrt );
+ break;
+ case EXTF80_EQ:
+ function_ab_extF80_z_bool = extF80M_eq;
+ goto time_ab_extF80_z_bool;
+ case EXTF80_LE:
+ function_ab_extF80_z_bool = extF80M_le;
+ goto time_ab_extF80_z_bool;
+ case EXTF80_LT:
+ function_ab_extF80_z_bool = extF80M_lt;
+ goto time_ab_extF80_z_bool;
+ case EXTF80_EQ_SIGNALING:
+ function_ab_extF80_z_bool = extF80M_eq_signaling;
+ goto time_ab_extF80_z_bool;
+ case EXTF80_LE_QUIET:
+ function_ab_extF80_z_bool = extF80M_le_quiet;
+ goto time_ab_extF80_z_bool;
+ case EXTF80_LT_QUIET:
+ function_ab_extF80_z_bool = extF80M_lt_quiet;
+ time_ab_extF80_z_bool:
+ time_ab_extF80_z_bool( function_ab_extF80_z_bool );
+ break;
+#endif
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef FLOAT128
+ case F128_TO_UI32:
+ time_a_f128_z_ui32_rx( f128M_to_ui32, roundingMode, exact );
+ break;
+ case F128_TO_UI64:
+ time_a_f128_z_ui64_rx( f128M_to_ui64, roundingMode, exact );
+ break;
+ case F128_TO_I32:
+ time_a_f128_z_i32_rx( f128M_to_i32, roundingMode, exact );
+ break;
+ case F128_TO_I64:
+ time_a_f128_z_i64_rx( f128M_to_i64, roundingMode, exact );
+ break;
+ case F128_TO_UI32_R_MINMAG:
+ time_a_f128_z_ui32_x( f128M_to_ui32_r_minMag, exact );
+ break;
+ case F128_TO_UI64_R_MINMAG:
+ time_a_f128_z_ui64_x( f128M_to_ui64_r_minMag, exact );
+ break;
+ case F128_TO_I32_R_MINMAG:
+ time_a_f128_z_i32_x( f128M_to_i32_r_minMag, exact );
+ break;
+ case F128_TO_I64_R_MINMAG:
+ time_a_f128_z_i64_x( f128M_to_i64_r_minMag, exact );
+ break;
+#ifdef FLOAT16
+ case F128_TO_F16:
+ time_a_f128_z_f16( f128M_to_f16 );
+ break;
+#endif
+ case F128_TO_F32:
+ time_a_f128_z_f32( f128M_to_f32 );
+ break;
+#ifdef FLOAT64
+ case F128_TO_F64:
+ time_a_f128_z_f64( f128M_to_f64 );
+ break;
+#endif
+#ifdef EXTFLOAT80
+ case F128_TO_EXTF80:
+ time_a_f128_z_extF80( f128M_to_extF80M );
+ break;
+#endif
+ case F128_ROUNDTOINT:
+ time_az_f128_rx( f128M_roundToInt, roundingMode, exact );
+ break;
+ case F128_ADD:
+ function_abz_f128 = f128M_add;
+ goto time_abz_f128;
+ case F128_SUB:
+ function_abz_f128 = f128M_sub;
+ goto time_abz_f128;
+ case F128_MUL:
+ function_abz_f128 = f128M_mul;
+ goto time_abz_f128;
+ case F128_DIV:
+ function_abz_f128 = f128M_div;
+ goto time_abz_f128;
+ case F128_REM:
+ function_abz_f128 = f128M_rem;
+ time_abz_f128:
+ time_abz_f128( function_abz_f128 );
+ break;
+ case F128_MULADD:
+ time_abcz_f128( f128M_mulAdd );
+ break;
+ case F128_SQRT:
+ time_az_f128_pos( f128M_sqrt );
+ break;
+ case F128_EQ:
+ function_ab_f128_z_bool = f128M_eq;
+ goto time_ab_f128_z_bool;
+ case F128_LE:
+ function_ab_f128_z_bool = f128M_le;
+ goto time_ab_f128_z_bool;
+ case F128_LT:
+ function_ab_f128_z_bool = f128M_lt;
+ goto time_ab_f128_z_bool;
+ case F128_EQ_SIGNALING:
+ function_ab_f128_z_bool = f128M_eq_signaling;
+ goto time_ab_f128_z_bool;
+ case F128_LE_QUIET:
+ function_ab_f128_z_bool = f128M_le_quiet;
+ goto time_ab_f128_z_bool;
+ case F128_LT_QUIET:
+ function_ab_f128_z_bool = f128M_lt_quiet;
+ time_ab_f128_z_bool:
+ time_ab_f128_z_bool( function_ab_f128_z_bool );
+ break;
+#endif
+ }
+
+}
+
+enum { EXACT_FALSE = 1, EXACT_TRUE };
+
+static
+void
+ timeFunction(
+ int functionCode,
+ uint_fast8_t roundingPrecisionIn,
+ int roundingCodeIn,
+ int tininessCodeIn,
+ int exactCodeIn
+ )
+{
+ int functionAttribs, exactCode;
+ uint_fast8_t roundingMode = softfloat_round_near_even, tininessMode;
+
+ functionNamePtr = functionInfos[functionCode].namePtr;
+ functionAttribs = functionInfos[functionCode].attribs;
+ roundingPrecision = 32;
+ for (;;) {
+ if ( functionAttribs & FUNC_EFF_ROUNDINGPRECISION ) {
+ if ( roundingPrecisionIn ) roundingPrecision = roundingPrecisionIn;
+ } else {
+ roundingPrecision = 0;
+ }
+#ifdef EXTFLOAT80
+ if ( roundingPrecision ) extF80_roundingPrecision = roundingPrecision;
+#endif
+ for (
+ roundingCode = 1; roundingCode < NUM_ROUNDINGMODES; ++roundingCode
+ ) {
+ if (
+ functionAttribs
+ & (FUNC_ARG_ROUNDINGMODE | FUNC_EFF_ROUNDINGMODE)
+ ) {
+ if ( roundingCodeIn ) roundingCode = roundingCodeIn;
+ } else {
+ roundingCode = 0;
+ }
+ if ( roundingCode ) {
+ roundingMode = roundingModes[roundingCode];
+ if ( functionAttribs & FUNC_EFF_ROUNDINGMODE ) {
+ softfloat_roundingMode = roundingMode;
+ }
+ }
+ for (
+ exactCode = EXACT_FALSE; exactCode <= EXACT_TRUE; ++exactCode
+ ) {
+ if ( functionAttribs & FUNC_ARG_EXACT ) {
+ if ( exactCodeIn ) exactCode = exactCodeIn;
+ } else {
+ exactCode = 0;
+ }
+ exact = (exactCode == EXACT_TRUE );
+ usesExact = (exactCode != 0 );
+ for (
+ tininessCode = 1;
+ tininessCode < NUM_TININESSMODES;
+ ++tininessCode
+ ) {
+ if (
+ (functionAttribs & FUNC_EFF_TININESSMODE)
+ || ((functionAttribs
+ & FUNC_EFF_TININESSMODE_REDUCEDPREC)
+ && roundingPrecision
+ && (roundingPrecision < 80))
+ ) {
+ if ( tininessCodeIn ) tininessCode = tininessCodeIn;
+ } else {
+ tininessCode = 0;
+ }
+ if ( tininessCode ) {
+ tininessMode = tininessModes[tininessCode];
+ softfloat_detectTininess = tininessMode;
+ }
+ timeFunctionInstance( functionCode, roundingMode, exact );
+ if ( tininessCodeIn || ! tininessCode ) break;
+ }
+ if ( exactCodeIn || ! exactCode ) break;
+ }
+ if ( roundingCodeIn || ! roundingCode ) break;
+ }
+ if ( roundingPrecisionIn || ! roundingPrecision ) break;
+ if ( roundingPrecision == 80 ) {
+ break;
+ } else if ( roundingPrecision == 64 ) {
+ roundingPrecision = 80;
+ } else if ( roundingPrecision == 32 ) {
+ roundingPrecision = 64;
+ }
+ }
+
+}
+
+int main( int argc, char *argv[] )
+{
+ bool haveFunctionArg;
+ int functionCode, numOperands;
+ uint_fast8_t roundingPrecision;
+ int roundingCode, tininessCode, exactCode;
+ const char *argPtr;
+
+ fail_programName = "timesoftfloat";
+ if ( argc <= 1 ) goto writeHelpMessage;
+ haveFunctionArg = false;
+ functionCode = 0;
+ numOperands = 0;
+ roundingPrecision = 0;
+ roundingCode = 0;
+ tininessCode = 0;
+ exactCode = 0;
+ for (;;) {
+ --argc;
+ if ( ! argc ) break;
+ argPtr = *++argv;
+ if ( ! argPtr ) break;
+ if ( argPtr[0] == '-' ) ++argPtr;
+ if (
+ ! strcmp( argPtr, "help" ) || ! strcmp( argPtr, "-help" )
+ || ! strcmp( argPtr, "h" )
+ ) {
+ writeHelpMessage:
+ fputs(
+"timesoftfloat [<option>...] <function>\n"
+" <option>: (* is default)\n"
+" -help --Write this message and exit.\n"
+#ifdef EXTFLOAT80
+" -precision32 --For extF80, time only 32-bit rounding precision.\n"
+" -precision64 --For extF80, time only 64-bit rounding precision.\n"
+" -precision80 --For extF80, time only 80-bit rounding precision.\n"
+#endif
+" -rnear_even --Time only rounding to nearest/even.\n"
+" -rminMag --Time only rounding to minimum magnitude (toward zero).\n"
+" -rmin --Time only rounding to minimum (down).\n"
+" -rmax --Time only rounding to maximum (up).\n"
+" -rnear_maxMag --Time only rounding to nearest/maximum magnitude\n"
+" (nearest/away).\n"
+#ifdef FLOAT_ROUND_ODD
+" -rodd --Time only rounding to odd (jamming).\n"
+#endif
+" -tininessbefore --Time only underflow tininess detected before rounding.\n"
+" -tininessafter --Time only underflow tininess detected after rounding.\n"
+" -notexact --Time only non-exact rounding to integer (no inexact\n"
+" exception).\n"
+" -exact --Time only exact rounding to integer (allow inexact\n"
+" exception).\n"
+" <function>:\n"
+" <int>_to_<float> <float>_add <float>_eq\n"
+" <float>_to_<int> <float>_sub <float>_le\n"
+" <float>_to_<int>_r_minMag <float>_mul <float>_lt\n"
+" <float>_to_<float> <float>_mulAdd <float>_eq_signaling\n"
+" <float>_roundToInt <float>_div <float>_le_quiet\n"
+" <float>_rem <float>_lt_quiet\n"
+" <float>_sqrt\n"
+" -all1 --All unary functions.\n"
+" -all2 --All binary functions.\n"
+" -all --All functions.\n"
+" <int>:\n"
+" ui32 --Unsigned 32-bit integer.\n"
+" ui64 --Unsigned 64-bit integer.\n"
+" i32 --Signed 32-bit integer.\n"
+" i64 --Signed 64-bit integer.\n"
+" <float>:\n"
+#ifdef FLOAT16
+" f16 --Binary 16-bit floating-point (half-precision).\n"
+#endif
+" f32 --Binary 32-bit floating-point (single-precision).\n"
+#ifdef FLOAT64
+" f64 --Binary 64-bit floating-point (double-precision).\n"
+#endif
+#ifdef EXTFLOAT80
+" extF80 --Binary 80-bit extended floating-point.\n"
+#endif
+#ifdef FLOAT128
+" f128 --Binary 128-bit floating-point (quadruple-precision).\n"
+#endif
+ ,
+ stdout
+ );
+ return EXIT_SUCCESS;
+#ifdef EXTFLOAT80
+ } else if ( ! strcmp( argPtr, "precision32" ) ) {
+ roundingPrecision = 32;
+ } else if ( ! strcmp( argPtr, "precision64" ) ) {
+ roundingPrecision = 64;
+ } else if ( ! strcmp( argPtr, "precision80" ) ) {
+ roundingPrecision = 80;
+#endif
+ } else if (
+ ! strcmp( argPtr, "rnear_even" )
+ || ! strcmp( argPtr, "rneareven" )
+ || ! strcmp( argPtr, "rnearest_even" )
+ ) {
+ roundingCode = ROUND_NEAR_EVEN;
+ } else if (
+ ! strcmp( argPtr, "rminmag" ) || ! strcmp( argPtr, "rminMag" )
+ ) {
+ roundingCode = ROUND_MINMAG;
+ } else if ( ! strcmp( argPtr, "rmin" ) ) {
+ roundingCode = ROUND_MIN;
+ } else if ( ! strcmp( argPtr, "rmax" ) ) {
+ roundingCode = ROUND_MAX;
+ } else if (
+ ! strcmp( argPtr, "rnear_maxmag" )
+ || ! strcmp( argPtr, "rnear_maxMag" )
+ || ! strcmp( argPtr, "rnearmaxmag" )
+ || ! strcmp( argPtr, "rnearest_maxmag" )
+ || ! strcmp( argPtr, "rnearest_maxMag" )
+ ) {
+ roundingCode = ROUND_NEAR_MAXMAG;
+#ifdef FLOAT_ROUND_ODD
+ } else if ( ! strcmp( argPtr, "rodd" ) ) {
+ roundingCode = ROUND_ODD;
+#endif
+ } else if ( ! strcmp( argPtr, "tininessbefore" ) ) {
+ tininessCode = TININESS_BEFORE_ROUNDING;
+ } else if ( ! strcmp( argPtr, "tininessafter" ) ) {
+ tininessCode = TININESS_AFTER_ROUNDING;
+ } else if ( ! strcmp( argPtr, "notexact" ) ) {
+ exactCode = EXACT_FALSE;
+ } else if ( ! strcmp( argPtr, "exact" ) ) {
+ exactCode = EXACT_TRUE;
+ } else if ( ! strcmp( argPtr, "all1" ) ) {
+ haveFunctionArg = true;
+ functionCode = 0;
+ numOperands = 1;
+ } else if ( ! strcmp( argPtr, "all2" ) ) {
+ haveFunctionArg = true;
+ functionCode = 0;
+ numOperands = 2;
+ } else if ( ! strcmp( argPtr, "all" ) ) {
+ haveFunctionArg = true;
+ functionCode = 0;
+ numOperands = 0;
+ } else {
+ functionCode = 1;
+ while ( strcmp( argPtr, functionInfos[functionCode].namePtr ) ) {
+ ++functionCode;
+ if ( functionCode == NUM_FUNCTIONS ) {
+ fail( "Invalid argument '%s'", *argv );
+ }
+ }
+ haveFunctionArg = true;
+ }
+ }
+ if ( ! haveFunctionArg ) fail( "Function argument required" );
+ if ( functionCode ) {
+ timeFunction(
+ functionCode,
+ roundingPrecision,
+ roundingCode,
+ tininessCode,
+ exactCode
+ );
+ } else {
+ for (
+ functionCode = 1; functionCode < NUM_FUNCTIONS; ++functionCode
+ ) {
+ if (
+ ! numOperands
+ || (functionInfos[functionCode].attribs
+ & ((numOperands == 1) ? FUNC_ARG_UNARY
+ : FUNC_ARG_BINARY))
+ ) {
+ timeFunction(
+ functionCode,
+ roundingPrecision,
+ roundingCode,
+ tininessCode,
+ exactCode
+ );
+ }
+ }
+ }
+ return EXIT_SUCCESS;
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/uint128.c b/src/libs/softfloat-3e/testfloat/source/uint128.c
new file mode 100644
index 00000000..0dcbdfef
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/uint128.c
@@ -0,0 +1,99 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "uint128.h"
+
+struct uint128 shortShiftLeft128( struct uint128 a, int count )
+{
+ struct uint128 z;
+
+ z.v64 = a.v64<<count | a.v0>>(-count & 63);
+ z.v0 = a.v0<<count;
+ return z;
+
+}
+
+struct uint128 shortShiftRight128( struct uint128 a, int count )
+{
+ struct uint128 z;
+
+ z.v64 = a.v64>>count;
+ z.v0 = a.v64<<(-count & 63) | a.v0>>count;
+ return z;
+
+}
+
+struct uint128 shortShiftRightJam128( struct uint128 a, int count )
+{
+ int negCount;
+ struct uint128 z;
+
+ negCount = -count;
+ z.v64 = a.v64>>count;
+ z.v0 =
+ a.v64<<(negCount & 63) | a.v0>>count
+ | ((uint64_t) (a.v0<<(negCount & 63)) != 0);
+ return z;
+
+}
+
+struct uint128 neg128( struct uint128 a )
+{
+
+ if ( a.v0 ) {
+ a.v64 = ~a.v64;
+ a.v0 = -a.v0;
+ } else {
+ a.v64 = -a.v64;
+ }
+ return a;
+
+}
+
+struct uint128 add128( struct uint128 a, struct uint128 b )
+{
+ struct uint128 z;
+
+ z.v0 = a.v0 + b.v0;
+ z.v64 = a.v64 + b.v64 + (z.v0 < a.v0);
+ return z;
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/uint128.h b/src/libs/softfloat-3e/testfloat/source/uint128.h
new file mode 100644
index 00000000..387c4be5
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/uint128.h
@@ -0,0 +1,76 @@
+
+/*============================================================================
+
+This C header file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#ifndef uint128_h
+#define uint128_h 1
+
+#include <stdbool.h>
+#include <stdint.h>
+
+#ifdef LITTLEENDIAN
+struct uint128 { uint64_t v0, v64; };
+#else
+struct uint128 { uint64_t v64, v0; };
+#endif
+
+#ifdef INLINE
+
+INLINE bool eq128( struct uint128 a, struct uint128 b )
+ { return (a.v64 == b.v64) && (a.v0 == b.v0); }
+
+INLINE bool le128( struct uint128 a, struct uint128 b )
+ { return (a.v64 < b.v64) || ((a.v64 == b.v64) && (a.v0 <= b.v0)); }
+
+INLINE bool lt128( struct uint128 a, struct uint128 b )
+ { return (a.v64 < b.v64) || ((a.v64 == b.v64) && (a.v0 < b.v0)); }
+
+#else
+
+bool eq128( struct uint128, struct uint128 );
+bool le128( struct uint128, struct uint128 );
+bool lt128( struct uint128, struct uint128 );
+
+#endif
+
+struct uint128 shortShiftLeft128( struct uint128, int );
+struct uint128 shortShiftRight128( struct uint128, int );
+struct uint128 shortShiftRightJam128( struct uint128, int );
+struct uint128 neg128( struct uint128 );
+struct uint128 add128( struct uint128, struct uint128 );
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/uint128_inline.c b/src/libs/softfloat-3e/testfloat/source/uint128_inline.c
new file mode 100644
index 00000000..ab12c1e1
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/uint128_inline.c
@@ -0,0 +1,56 @@
+
+/*============================================================================
+
+This C header file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+
+#ifdef LITTLEENDIAN
+struct uint128 { uint64_t v0, v64; };
+#else
+struct uint128 { uint64_t v64, v0; };
+#endif
+
+bool eq128( struct uint128 a, struct uint128 b )
+ { return (a.v64 == b.v64) && (a.v0 == b.v0); }
+
+bool le128( struct uint128 a, struct uint128 b )
+ { return (a.v64 < b.v64) || ((a.v64 == b.v64) && (a.v0 <= b.v0)); }
+
+bool lt128( struct uint128 a, struct uint128 b )
+ { return (a.v64 < b.v64) || ((a.v64 == b.v64) && (a.v0 < b.v0)); }
+
diff --git a/src/libs/softfloat-3e/testfloat/source/verCases.h b/src/libs/softfloat-3e/testfloat/source/verCases.h
new file mode 100644
index 00000000..27ed1c9b
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/verCases.h
@@ -0,0 +1,193 @@
+
+/*============================================================================
+
+This C header file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <signal.h>
+#include "uint128.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+extern const char *verCases_functionNamePtr;
+extern uint_fast8_t verCases_roundingPrecision;
+extern int verCases_roundingCode;
+extern int verCases_tininessCode;
+extern bool verCases_usesExact, verCases_exact;
+extern bool verCases_checkNaNs, verCases_checkInvInts;
+extern uint_fast32_t verCases_maxErrorCount;
+extern bool verCases_errorStop;
+
+void verCases_writeFunctionName( FILE * );
+
+extern volatile sig_atomic_t verCases_stop;
+
+extern bool verCases_anyErrors;
+
+void verCases_exitWithStatus( void );
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+#ifdef INLINE
+
+#ifdef FLOAT16
+
+INLINE bool f16_same( float16_t a, float16_t b )
+{
+ union { uint16_t ui; float16_t f; } uA, uB;
+ uA.f = a;
+ uB.f = b;
+ return (uA.ui == uB.ui);
+}
+
+INLINE bool f16_isNaN( float16_t a )
+{
+ union { uint16_t ui; float16_t f; } uA;
+ uA.f = a;
+ return 0x7C00 < (uA.ui & 0x7FFF);
+}
+
+#endif
+
+INLINE bool f32_same( float32_t a, float32_t b )
+{
+ union { uint32_t ui; float32_t f; } uA, uB;
+ uA.f = a;
+ uB.f = b;
+ return (uA.ui == uB.ui);
+}
+
+INLINE bool f32_isNaN( float32_t a )
+{
+ union { uint32_t ui; float32_t f; } uA;
+ uA.f = a;
+ return 0x7F800000 < (uA.ui & 0x7FFFFFFF);
+}
+
+#ifdef FLOAT64
+
+INLINE bool f64_same( float64_t a, float64_t b )
+{
+ union { uint64_t ui; float64_t f; } uA, uB;
+ uA.f = a;
+ uB.f = b;
+ return (uA.ui == uB.ui);
+}
+
+INLINE bool f64_isNaN( float64_t a )
+{
+ union { uint64_t ui; float64_t f; } uA;
+ uA.f = a;
+ return
+ UINT64_C( 0x7FF0000000000000 )
+ < (uA.ui & UINT64_C( 0x7FFFFFFFFFFFFFFF ));
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+INLINE bool extF80M_same( const extFloat80_t *aPtr, const extFloat80_t *bPtr )
+{
+ const struct extFloat80M *aSPtr = (const struct extFloat80M *) aPtr;
+ const struct extFloat80M *bSPtr = (const struct extFloat80M *) bPtr;
+ return
+ (aSPtr->signExp == bSPtr->signExp) && (aSPtr->signif == bSPtr->signif);
+}
+
+INLINE bool extF80M_isNaN( const extFloat80_t *aPtr )
+{
+ const struct extFloat80M *aSPtr = (const struct extFloat80M *) aPtr;
+ return
+ ((aSPtr->signExp & 0x7FFF) == 0x7FFF)
+ && (aSPtr->signif & UINT64_C( 0x7FFFFFFFFFFFFFFF ));
+}
+
+#endif
+
+#ifdef FLOAT128
+
+INLINE bool f128M_same( const float128_t *aPtr, const float128_t *bPtr )
+{
+ const struct uint128 *uiAPtr = (const struct uint128 *) aPtr;
+ const struct uint128 *uiBPtr = (const struct uint128 *) bPtr;
+ return (uiAPtr->v64 == uiBPtr->v64) && (uiAPtr->v0 == uiBPtr->v0);
+}
+
+INLINE bool f128M_isNaN( const float128_t *aPtr )
+{
+ const struct uint128 *uiAPtr = (const struct uint128 *) aPtr;
+ uint_fast64_t absA64 = uiAPtr->v64 & UINT64_C( 0x7FFFFFFFFFFFFFFF );
+ return
+ (UINT64_C( 0x7FFF000000000000 ) < absA64)
+ || ((absA64 == UINT64_C( 0x7FFF000000000000 )) && uiAPtr->v0);
+}
+
+#endif
+
+#else
+
+#ifdef FLOAT16
+bool f16_same( float16_t, float16_t );
+bool f16_isNaN( float16_t );
+#endif
+bool f32_same( float32_t, float32_t );
+bool f32_isNaN( float32_t );
+#ifdef FLOAT64
+bool f64_same( float64_t, float64_t );
+bool f64_isNaN( float64_t );
+#endif
+#ifdef EXTFLOAT80
+bool extF80M_same( const extFloat80_t *, const extFloat80_t * );
+bool extF80M_isNaN( const extFloat80_t * );
+#endif
+#ifdef FLOAT128
+bool f128M_same( const float128_t *, const float128_t * );
+bool f128M_isNaN( const float128_t * );
+#endif
+
+#endif
+
+extern uint_fast32_t verCases_tenThousandsCount, verCases_errorCount;
+
+void verCases_writeTestsPerformed( int );
+void verCases_perTenThousand( void );
+void verCases_writeErrorFound( int );
+
diff --git a/src/libs/softfloat-3e/testfloat/source/verCases_common.c b/src/libs/softfloat-3e/testfloat/source/verCases_common.c
new file mode 100644
index 00000000..f1e33858
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/verCases_common.c
@@ -0,0 +1,138 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017, 2018 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <signal.h>
+#include "platform.h"
+#include "verCases.h"
+
+const char *verCases_functionNamePtr;
+uint_fast8_t verCases_roundingPrecision = 0;
+int verCases_roundingCode = 0;
+int verCases_tininessCode = 0;
+bool verCases_usesExact = false;
+bool verCases_exact;
+bool verCases_checkNaNs = false;
+bool verCases_checkInvInts = false;
+uint_fast32_t verCases_maxErrorCount = 0;
+bool verCases_errorStop = false;
+
+volatile sig_atomic_t verCases_stop = false;
+
+bool verCases_anyErrors = false;
+
+void verCases_exitWithStatus( void )
+{
+
+ exit( verCases_anyErrors ? EXIT_FAILURE : EXIT_SUCCESS );
+
+}
+
+uint_fast32_t verCases_tenThousandsCount, verCases_errorCount;
+
+void verCases_writeTestsPerformed( int count )
+{
+
+ if ( verCases_tenThousandsCount ) {
+ fprintf(
+ stderr,
+ "\r%lu%04d tests performed",
+ (unsigned long) verCases_tenThousandsCount,
+ count
+ );
+ } else {
+ fprintf( stderr, "\r%d tests performed", count );
+ }
+ if ( verCases_errorCount ) {
+ fprintf(
+ stderr,
+ "; %lu error%s found.\n",
+ (unsigned long) verCases_errorCount,
+ (verCases_errorCount == 1) ? "" : "s"
+ );
+ } else {
+ fputs( ".\n", stderr );
+ if ( verCases_tenThousandsCount ) {
+ fprintf(
+ stdout,
+ "In %lu%04d tests, no errors found in ",
+ (unsigned long) verCases_tenThousandsCount,
+ count
+ );
+ } else {
+ fprintf( stdout, "In %d tests, no errors found in ", count );
+ }
+ verCases_writeFunctionName( stdout );
+ fputs( ".\n", stdout );
+ fflush( stdout );
+ }
+
+}
+
+void verCases_perTenThousand( void )
+{
+
+ ++verCases_tenThousandsCount;
+ if ( verCases_stop ) {
+ verCases_writeTestsPerformed( 0 );
+ verCases_exitWithStatus();
+ }
+ fprintf(
+ stderr, "\r%3lu0000", (unsigned long) verCases_tenThousandsCount );
+
+}
+
+void verCases_writeErrorFound( int count )
+{
+
+ fputc( '\r', stderr );
+ if ( verCases_errorCount == 1 ) {
+ fputs( "Errors found in ", stdout );
+ verCases_writeFunctionName( stdout );
+ fputs( ":\n", stdout );
+ }
+ if ( verCases_stop ) {
+ verCases_writeTestsPerformed( count );
+ verCases_exitWithStatus();
+ }
+ verCases_anyErrors = true;
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/verCases_inline.c b/src/libs/softfloat-3e/testfloat/source/verCases_inline.c
new file mode 100644
index 00000000..8e2171ef
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/verCases_inline.c
@@ -0,0 +1,138 @@
+
+/*============================================================================
+
+This C header file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "uint128.h"
+#include "softfloat.h"
+
+#ifdef FLOAT16
+
+bool f16_same( float16_t a, float16_t b )
+{
+ union { uint16_t ui; float16_t f; } uA, uB;
+ uA.f = a;
+ uB.f = b;
+ return (uA.ui == uB.ui);
+}
+
+bool f16_isNaN( float16_t a )
+{
+ union { uint16_t ui; float16_t f; } uA;
+ uA.f = a;
+ return 0x7C00 < (uA.ui & 0x7FFF);
+}
+
+#endif
+
+bool f32_same( float32_t a, float32_t b )
+{
+ union { uint32_t ui; float32_t f; } uA, uB;
+ uA.f = a;
+ uB.f = b;
+ return (uA.ui == uB.ui);
+}
+
+bool f32_isNaN( float32_t a )
+{
+ union { uint32_t ui; float32_t f; } uA;
+ uA.f = a;
+ return 0x7F800000 < (uA.ui & 0x7FFFFFFF);
+}
+
+#ifdef FLOAT64
+
+bool f64_same( float64_t a, float64_t b )
+{
+ union { uint64_t ui; float64_t f; } uA, uB;
+ uA.f = a;
+ uB.f = b;
+ return (uA.ui == uB.ui);
+}
+
+bool f64_isNaN( float64_t a )
+{
+ union { uint64_t ui; float64_t f; } uA;
+ uA.f = a;
+ return
+ UINT64_C( 0x7FF0000000000000 )
+ < (uA.ui & UINT64_C( 0x7FFFFFFFFFFFFFFF ));
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+bool extF80M_same( const extFloat80_t *aPtr, const extFloat80_t *bPtr )
+{
+ const struct extFloat80M *aSPtr = (const struct extFloat80M *) aPtr;
+ const struct extFloat80M *bSPtr = (const struct extFloat80M *) bPtr;
+ return
+ (aSPtr->signExp == bSPtr->signExp) && (aSPtr->signif == bSPtr->signif);
+}
+
+bool extF80M_isNaN( const extFloat80_t *aPtr )
+{
+ const struct extFloat80M *aSPtr = (const struct extFloat80M *) aPtr;
+ return
+ ((aSPtr->signExp & 0x7FFF) == 0x7FFF)
+ && (aSPtr->signif & UINT64_C( 0x7FFFFFFFFFFFFFFF ));
+}
+
+#endif
+
+#ifdef FLOAT128
+
+bool f128M_same( const float128_t *aPtr, const float128_t *bPtr )
+{
+ const struct uint128 *uiAPtr = (const struct uint128 *) aPtr;
+ const struct uint128 *uiBPtr = (const struct uint128 *) bPtr;
+ return (uiAPtr->v64 == uiBPtr->v64) && (uiAPtr->v0 == uiBPtr->v0);
+}
+
+bool f128M_isNaN( const float128_t *aPtr )
+{
+ const struct uint128 *uiAPtr = (const struct uint128 *) aPtr;
+ uint_fast64_t absA64 = uiAPtr->v64 & UINT64_C( 0x7FFFFFFFFFFFFFFF );
+ return
+ (UINT64_C( 0x7FFF000000000000 ) < absA64)
+ || ((absA64 == UINT64_C( 0x7FFF000000000000 )) && uiAPtr->v0);
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/verCases_writeFunctionName.c b/src/libs/softfloat-3e/testfloat/source/verCases_writeFunctionName.c
new file mode 100644
index 00000000..b8a09ae4
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/verCases_writeFunctionName.c
@@ -0,0 +1,79 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdio.h>
+#include "platform.h"
+#include "functions.h"
+#include "verCases.h"
+
+void verCases_writeFunctionName( FILE *streamPtr )
+{
+ static const char *roundingModeNames[NUM_ROUNDINGMODES] = {
+ 0,
+ ", rounding near_even",
+ ", rounding minMag",
+ ", rounding min",
+ ", rounding max",
+ ", rounding near_maxMag",
+#ifdef FLOAT_ROUND_ODD
+ ", rounding odd"
+#endif
+ };
+
+ fputs( verCases_functionNamePtr, streamPtr );
+ if ( verCases_roundingCode ) {
+ if ( verCases_roundingPrecision ) {
+ fprintf(
+ streamPtr, ", precision %d", (int) verCases_roundingPrecision
+ );
+ }
+ fputs( roundingModeNames[verCases_roundingCode], streamPtr );
+ if ( verCases_tininessCode ) {
+ fputs(
+ (verCases_tininessCode == TININESS_BEFORE_ROUNDING)
+ ? ", tininess before rounding"
+ : ", tininess after rounding",
+ streamPtr
+ );
+ }
+ }
+ if ( verCases_usesExact ) {
+ fputs( verCases_exact ? ", exact" : ", not exact", streamPtr );
+ }
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/verLoops.c b/src/libs/softfloat-3e/testfloat/source/verLoops.c
new file mode 100644
index 00000000..01735957
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/verLoops.c
@@ -0,0 +1,5283 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include "platform.h"
+#include "uint128.h"
+#include "fail.h"
+#include "softfloat.h"
+#include "readHex.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "verLoops.h"
+
+uint_fast8_t *verLoops_trueFlagsPtr;
+
+static bool atEndOfInput( void )
+{
+ int i;
+
+ i = fgetc( stdin );
+ if ( i == EOF ) {
+ if ( ! ferror( stdin ) && feof( stdin ) ) return true;
+ fail( "Error reading input" );
+ }
+ ungetc( i, stdin );
+ return false;
+
+}
+
+static void failFromBadInput( void )
+{
+
+ fail( "Invalid input format" );
+
+}
+
+static void readVerInput_bool( bool *aPtr )
+{
+
+ if ( ! readHex_bool( aPtr, ' ' ) ) failFromBadInput();
+
+}
+
+static void readVerInput_ui32( uint_fast32_t *aPtr )
+{
+ uint32_t a;
+
+ if ( ! readHex_ui32( &a, ' ' ) ) failFromBadInput();
+ *aPtr = a;
+
+}
+
+static void readVerInput_ui64( uint_fast64_t *aPtr )
+{
+ uint64_t a;
+
+ if ( ! readHex_ui64( &a, ' ' ) ) failFromBadInput();
+ *aPtr = a;
+
+}
+
+static void readVerInput_i32( int_fast32_t *aPtr )
+{
+ union { uint32_t ui; int32_t i; } uA;
+
+ if ( ! readHex_ui32( &uA.ui, ' ' ) ) failFromBadInput();
+ *aPtr = uA.i;
+
+}
+
+static void readVerInput_i64( int_fast64_t *aPtr )
+{
+ union { uint64_t ui; int64_t i; } uA;
+
+ if ( ! readHex_ui64( &uA.ui, ' ' ) ) failFromBadInput();
+ *aPtr = uA.i;
+
+}
+
+#ifdef FLOAT16
+
+static void readVerInput_f16( float16_t *aPtr )
+{
+ union { uint16_t ui; float16_t f; } uA;
+
+ if ( ! readHex_ui16( &uA.ui, ' ' ) ) failFromBadInput();
+ *aPtr = uA.f;
+
+}
+
+#endif
+
+static void readVerInput_f32( float32_t *aPtr )
+{
+ union { uint32_t ui; float32_t f; } uA;
+
+ if ( ! readHex_ui32( &uA.ui, ' ' ) ) failFromBadInput();
+ *aPtr = uA.f;
+
+}
+
+#ifdef FLOAT64
+
+static void readVerInput_f64( float64_t *aPtr )
+{
+ union { uint64_t ui; float64_t f; } uA;
+
+ if ( ! readHex_ui64( &uA.ui, ' ' ) ) failFromBadInput();
+ *aPtr = uA.f;
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+static void readVerInput_extF80( extFloat80_t *aPtr )
+{
+ struct extFloat80M *aSPtr;
+
+ aSPtr = (struct extFloat80M *) aPtr;
+ if (
+ ! readHex_ui16( &aSPtr->signExp, 0 )
+ || ! readHex_ui64( &aSPtr->signif, ' ' )
+ ) {
+ failFromBadInput();
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+static void readVerInput_f128( float128_t *aPtr )
+{
+ struct uint128 *uiAPtr;
+
+ uiAPtr = (struct uint128 *) aPtr;
+ if (
+ ! readHex_ui64( &uiAPtr->v64, 0 ) || ! readHex_ui64( &uiAPtr->v0, ' ' )
+ ) {
+ failFromBadInput();
+ }
+
+}
+
+#endif
+
+static void readVerInput_flags( uint_fast8_t *flagsPtr )
+{
+ uint_least8_t commonFlags;
+ uint_fast8_t flags;
+
+ if ( ! readHex_ui8( &commonFlags, '\n' ) || (0x20 <= commonFlags) ) {
+ failFromBadInput();
+ }
+ flags = 0;
+ if ( commonFlags & 0x10 ) flags |= softfloat_flag_invalid;
+ if ( commonFlags & 0x08 ) flags |= softfloat_flag_infinite;
+ if ( commonFlags & 0x04 ) flags |= softfloat_flag_overflow;
+ if ( commonFlags & 0x02 ) flags |= softfloat_flag_underflow;
+ if ( commonFlags & 0x01 ) flags |= softfloat_flag_inexact;
+ *flagsPtr = flags;
+
+}
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+#ifdef FLOAT16
+
+void ver_a_ui32_z_f16( float16_t trueFunction( uint32_t ) )
+{
+ int count;
+ uint_fast32_t a;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_ui32( &a );
+ readVerInput_f16( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui32( a, " " );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+void ver_a_ui32_z_f32( float32_t trueFunction( uint32_t ) )
+{
+ int count;
+ uint_fast32_t a;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_ui32( &a );
+ readVerInput_f32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui32( a, " " );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#ifdef FLOAT64
+
+void ver_a_ui32_z_f64( float64_t trueFunction( uint32_t ) )
+{
+ int count;
+ uint_fast32_t a;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_ui32( &a );
+ readVerInput_f64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui32( a, " " );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void ver_a_ui32_z_extF80( void trueFunction( uint32_t, extFloat80_t * ) )
+{
+ int count;
+ uint_fast32_t a;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_ui32( &a );
+ readVerInput_extF80( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueFunction( a, &trueZ );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui32( a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void ver_a_ui32_z_f128( void trueFunction( uint32_t, float128_t * ) )
+{
+ int count;
+ uint_fast32_t a;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_ui32( &a );
+ readVerInput_f128( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueFunction( a, &trueZ );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui32( a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+#ifdef FLOAT16
+
+void ver_a_ui64_z_f16( float16_t trueFunction( uint64_t ) )
+{
+ int count;
+ uint_fast64_t a;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_ui64( &a );
+ readVerInput_f16( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui64( a, " " );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+void ver_a_ui64_z_f32( float32_t trueFunction( uint64_t ) )
+{
+ int count;
+ uint_fast64_t a;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_ui64( &a );
+ readVerInput_f32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui64( a, " " );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#ifdef FLOAT64
+
+void ver_a_ui64_z_f64( float64_t trueFunction( uint64_t ) )
+{
+ int count;
+ uint_fast64_t a;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_ui64( &a );
+ readVerInput_f64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui64( a, "\n\t" );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void ver_a_ui64_z_extF80( void trueFunction( uint64_t, extFloat80_t * ) )
+{
+ int count;
+ uint_fast64_t a;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_ui64( &a );
+ readVerInput_extF80( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueFunction( a, &trueZ );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui64( a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void ver_a_ui64_z_f128( void trueFunction( uint64_t, float128_t * ) )
+{
+ int count;
+ uint_fast64_t a;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_ui64( &a );
+ readVerInput_f128( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueFunction( a, &trueZ );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui64( a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+#ifdef FLOAT16
+
+void ver_a_i32_z_f16( float16_t trueFunction( int32_t ) )
+{
+ int count;
+ int_fast32_t a;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_i32( &a );
+ readVerInput_f16( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i32( a, " " );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+void ver_a_i32_z_f32( float32_t trueFunction( int32_t ) )
+{
+ int count;
+ int_fast32_t a;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_i32( &a );
+ readVerInput_f32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i32( a, " " );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#ifdef FLOAT64
+
+void ver_a_i32_z_f64( float64_t trueFunction( int32_t ) )
+{
+ int count;
+ int_fast32_t a;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_i32( &a );
+ readVerInput_f64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i32( a, " " );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void ver_a_i32_z_extF80( void trueFunction( int32_t, extFloat80_t * ) )
+{
+ int count;
+ int_fast32_t a;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_i32( &a );
+ readVerInput_extF80( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueFunction( a, &trueZ );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i32( a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void ver_a_i32_z_f128( void trueFunction( int32_t, float128_t * ) )
+{
+ int count;
+ int_fast32_t a;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_i32( &a );
+ readVerInput_f128( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueFunction( a, &trueZ );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i32( a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+#ifdef FLOAT16
+
+void ver_a_i64_z_f16( float16_t trueFunction( int64_t ) )
+{
+ int count;
+ int_fast64_t a;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_i64( &a );
+ readVerInput_f16( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i64( a, " " );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+void ver_a_i64_z_f32( float32_t trueFunction( int64_t ) )
+{
+ int count;
+ int_fast64_t a;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_i64( &a );
+ readVerInput_f32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i64( a, " " );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#ifdef FLOAT64
+
+void ver_a_i64_z_f64( float64_t trueFunction( int64_t ) )
+{
+ int count;
+ int_fast64_t a;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_i64( &a );
+ readVerInput_f64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i64( a, "\n\t" );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void ver_a_i64_z_extF80( void trueFunction( int64_t, extFloat80_t * ) )
+{
+ int count;
+ int_fast64_t a;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_i64( &a );
+ readVerInput_extF80( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueFunction( a, &trueZ );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i64( a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void ver_a_i64_z_f128( void trueFunction( int64_t, float128_t * ) )
+{
+ int count;
+ int_fast64_t a;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_i64( &a );
+ readVerInput_f128( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueFunction( a, &trueZ );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i64( a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+#ifdef FLOAT16
+
+void
+ ver_a_f16_z_ui32_rx(
+ uint_fast32_t trueFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float16_t a;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f16( &a );
+ readVerInput_ui32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, roundingMode, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( a );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f16_z_ui64_rx(
+ uint_fast64_t trueFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float16_t a;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f16( &a );
+ readVerInput_ui64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, roundingMode, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( a );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f16_z_i32_rx(
+ int_fast32_t trueFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float16_t a;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f16( &a );
+ readVerInput_i32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, roundingMode, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! f16_isNaN( a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( a );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f16_z_i64_rx(
+ int_fast64_t trueFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float16_t a;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f16( &a );
+ readVerInput_i64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, roundingMode, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! f16_isNaN( a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( a );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f16_z_ui32_x(
+ uint_fast32_t trueFunction( float16_t, bool ), bool exact )
+{
+ int count;
+ float16_t a;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f16( &a );
+ readVerInput_ui32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( a );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f16_z_ui64_x(
+ uint_fast64_t trueFunction( float16_t, bool ), bool exact )
+{
+ int count;
+ float16_t a;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f16( &a );
+ readVerInput_ui64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( a );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f16_z_i32_x(
+ int_fast32_t trueFunction( float16_t, bool ), bool exact )
+{
+ int count;
+ float16_t a;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f16( &a );
+ readVerInput_i32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! f16_isNaN( a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( a );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f16_z_i64_x(
+ int_fast64_t trueFunction( float16_t, bool ), bool exact )
+{
+ int count;
+ float16_t a;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f16( &a );
+ readVerInput_i64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! f16_isNaN( a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( a );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void ver_a_f16_z_f32( float32_t trueFunction( float16_t ) )
+{
+ int count;
+ float16_t a;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f16( &a );
+ readVerInput_f32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && f16_isSignalingNaN( a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( a );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#ifdef FLOAT64
+
+void ver_a_f16_z_f64( float64_t trueFunction( float16_t ) )
+{
+ int count;
+ float16_t a;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f16( &a );
+ readVerInput_f64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && f16_isSignalingNaN( a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( a );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void ver_a_f16_z_extF80( void trueFunction( float16_t, extFloat80_t * ) )
+{
+ int count;
+ float16_t a;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f16( &a );
+ readVerInput_extF80( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueFunction( a, &trueZ );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && f16_isSignalingNaN( a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( a );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void ver_a_f16_z_f128( void trueFunction( float16_t, float128_t * ) )
+{
+ int count;
+ float16_t a;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f16( &a );
+ readVerInput_f128( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueFunction( a, &trueZ );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && f16_isSignalingNaN( a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( a );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+void ver_az_f16( float16_t trueFunction( float16_t ) )
+{
+ int count;
+ float16_t a, subjZ;
+ uint_fast8_t subjFlags;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f16( &a );
+ readVerInput_f16( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && f16_isSignalingNaN( a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( a );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_az_f16_rx(
+ float16_t trueFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float16_t a, subjZ;
+ uint_fast8_t subjFlags;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f16( &a );
+ readVerInput_f16( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, roundingMode, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && f16_isSignalingNaN( a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( a );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void ver_abz_f16( float16_t trueFunction( float16_t, float16_t ) )
+{
+ int count;
+ float16_t a, b, subjZ;
+ uint_fast8_t subjFlags;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f16( &a );
+ readVerInput_f16( &b );
+ readVerInput_f16( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, b );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f16_isSignalingNaN( a ) || f16_isSignalingNaN( b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_f16( a, b );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void ver_abcz_f16( float16_t trueFunction( float16_t, float16_t, float16_t ) )
+{
+ int count;
+ float16_t a, b, c, subjZ;
+ uint_fast8_t subjFlags;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f16( &a );
+ readVerInput_f16( &b );
+ readVerInput_f16( &c );
+ readVerInput_f16( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, b, c );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f16_isSignalingNaN( a ) || f16_isSignalingNaN( b )
+ || f16_isSignalingNaN( c ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_abc_f16( a, b, c );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void ver_ab_f16_z_bool( bool trueFunction( float16_t, float16_t ) )
+{
+ int count;
+ float16_t a, b;
+ bool subjZ;
+ uint_fast8_t subjFlags;
+ bool trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f16( &a );
+ readVerInput_f16( &b );
+ readVerInput_bool( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, b );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f16_isSignalingNaN( a ) || f16_isSignalingNaN( b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_f16( a, b );
+ writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+void
+ ver_a_f32_z_ui32_rx(
+ uint_fast32_t trueFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float32_t a;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f32( &a );
+ readVerInput_ui32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, roundingMode, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( a, " " );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f32_z_ui64_rx(
+ uint_fast64_t trueFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float32_t a;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f32( &a );
+ readVerInput_ui64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, roundingMode, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( a, " " );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f32_z_i32_rx(
+ int_fast32_t trueFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float32_t a;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f32( &a );
+ readVerInput_i32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, roundingMode, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! f32_isNaN( a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( a, " " );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f32_z_i64_rx(
+ int_fast64_t trueFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float32_t a;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f32( &a );
+ readVerInput_i64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, roundingMode, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! f32_isNaN( a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( a, " " );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f32_z_ui32_x(
+ uint_fast32_t trueFunction( float32_t, bool ), bool exact )
+{
+ int count;
+ float32_t a;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f32( &a );
+ readVerInput_ui32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( a, " " );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f32_z_ui64_x(
+ uint_fast64_t trueFunction( float32_t, bool ), bool exact )
+{
+ int count;
+ float32_t a;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f32( &a );
+ readVerInput_ui64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( a, " " );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f32_z_i32_x(
+ int_fast32_t trueFunction( float32_t, bool ), bool exact )
+{
+ int count;
+ float32_t a;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f32( &a );
+ readVerInput_i32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! f32_isNaN( a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( a, " " );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f32_z_i64_x(
+ int_fast64_t trueFunction( float32_t, bool ), bool exact )
+{
+ int count;
+ float32_t a;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f32( &a );
+ readVerInput_i64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! f32_isNaN( a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( a, " " );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#ifdef FLOAT16
+
+void ver_a_f32_z_f16( float16_t trueFunction( float32_t ) )
+{
+ int count;
+ float32_t a;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f32( &a );
+ readVerInput_f16( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && f32_isSignalingNaN( a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( a, " " );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+#ifdef FLOAT64
+
+void ver_a_f32_z_f64( float64_t trueFunction( float32_t ) )
+{
+ int count;
+ float32_t a;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f32( &a );
+ readVerInput_f64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && f32_isSignalingNaN( a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( a, " " );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void ver_a_f32_z_extF80( void trueFunction( float32_t, extFloat80_t * ) )
+{
+ int count;
+ float32_t a;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f32( &a );
+ readVerInput_extF80( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueFunction( a, &trueZ );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && f32_isSignalingNaN( a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void ver_a_f32_z_f128( void trueFunction( float32_t, float128_t * ) )
+{
+ int count;
+ float32_t a;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f32( &a );
+ readVerInput_f128( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueFunction( a, &trueZ );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && f32_isSignalingNaN( a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+void ver_az_f32( float32_t trueFunction( float32_t ) )
+{
+ int count;
+ float32_t a, subjZ;
+ uint_fast8_t subjFlags;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f32( &a );
+ readVerInput_f32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && f32_isSignalingNaN( a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( a, " " );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_az_f32_rx(
+ float32_t trueFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float32_t a, subjZ;
+ uint_fast8_t subjFlags;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f32( &a );
+ readVerInput_f32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, roundingMode, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && f32_isSignalingNaN( a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( a, " " );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void ver_abz_f32( float32_t trueFunction( float32_t, float32_t ) )
+{
+ int count;
+ float32_t a, b, subjZ;
+ uint_fast8_t subjFlags;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f32( &a );
+ readVerInput_f32( &b );
+ readVerInput_f32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, b );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f32_isSignalingNaN( a ) || f32_isSignalingNaN( b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_f32( a, b );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void ver_abcz_f32( float32_t trueFunction( float32_t, float32_t, float32_t ) )
+{
+ int count;
+ float32_t a, b, c, subjZ;
+ uint_fast8_t subjFlags;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f32( &a );
+ readVerInput_f32( &b );
+ readVerInput_f32( &c );
+ readVerInput_f32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, b, c );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f32_isSignalingNaN( a ) || f32_isSignalingNaN( b )
+ || f32_isSignalingNaN( c ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_abc_f32( a, b, c );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void ver_ab_f32_z_bool( bool trueFunction( float32_t, float32_t ) )
+{
+ int count;
+ float32_t a, b;
+ bool subjZ;
+ uint_fast8_t subjFlags;
+ bool trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f32( &a );
+ readVerInput_f32( &b );
+ readVerInput_bool( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, b );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f32_isSignalingNaN( a ) || f32_isSignalingNaN( b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_f32( a, b );
+ writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+#ifdef FLOAT64
+
+void
+ ver_a_f64_z_ui32_rx(
+ uint_fast32_t trueFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float64_t a;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f64( &a );
+ readVerInput_ui32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, roundingMode, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( a, " " );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f64_z_ui64_rx(
+ uint_fast64_t trueFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float64_t a;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f64( &a );
+ readVerInput_ui64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, roundingMode, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( a, " " );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f64_z_i32_rx(
+ int_fast32_t trueFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float64_t a;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f64( &a );
+ readVerInput_i32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, roundingMode, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! f64_isNaN( a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( a, " " );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f64_z_i64_rx(
+ int_fast64_t trueFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float64_t a;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f64( &a );
+ readVerInput_i64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, roundingMode, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! f64_isNaN( a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( a, " " );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f64_z_ui32_x(
+ uint_fast32_t trueFunction( float64_t, bool ), bool exact )
+{
+ int count;
+ float64_t a;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f64( &a );
+ readVerInput_ui32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( a, " " );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f64_z_ui64_x(
+ uint_fast64_t trueFunction( float64_t, bool ), bool exact )
+{
+ int count;
+ float64_t a;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f64( &a );
+ readVerInput_ui64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( a, " " );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f64_z_i32_x(
+ int_fast32_t trueFunction( float64_t, bool ), bool exact )
+{
+ int count;
+ float64_t a;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f64( &a );
+ readVerInput_i32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! f64_isNaN( a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( a, " " );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f64_z_i64_x(
+ int_fast64_t trueFunction( float64_t, bool ), bool exact )
+{
+ int count;
+ float64_t a;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f64( &a );
+ readVerInput_i64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! f64_isNaN( a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( a, " " );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#ifdef FLOAT16
+
+void ver_a_f64_z_f16( float16_t trueFunction( float64_t ) )
+{
+ int count;
+ float64_t a;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f64( &a );
+ readVerInput_f16( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && f64_isSignalingNaN( a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( a, " " );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+void ver_a_f64_z_f32( float32_t trueFunction( float64_t ) )
+{
+ int count;
+ float64_t a;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f64( &a );
+ readVerInput_f32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && f64_isSignalingNaN( a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( a, " " );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#ifdef EXTFLOAT80
+
+void ver_a_f64_z_extF80( void trueFunction( float64_t, extFloat80_t * ) )
+{
+ int count;
+ float64_t a;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f64( &a );
+ readVerInput_extF80( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueFunction( a, &trueZ );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && f64_isSignalingNaN( a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void ver_a_f64_z_f128( void trueFunction( float64_t, float128_t * ) )
+{
+ int count;
+ float64_t a;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f64( &a );
+ readVerInput_f128( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueFunction( a, &trueZ );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && f64_isSignalingNaN( a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+void ver_az_f64( float64_t trueFunction( float64_t ) )
+{
+ int count;
+ float64_t a, subjZ;
+ uint_fast8_t subjFlags;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f64( &a );
+ readVerInput_f64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && f64_isSignalingNaN( a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( a, "\n\t" );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_az_f64_rx(
+ float64_t trueFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float64_t a, subjZ;
+ uint_fast8_t subjFlags;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f64( &a );
+ readVerInput_f64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, roundingMode, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && f64_isSignalingNaN( a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( a, "\n\t" );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void ver_abz_f64( float64_t trueFunction( float64_t, float64_t ) )
+{
+ int count;
+ float64_t a, b, subjZ;
+ uint_fast8_t subjFlags;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f64( &a );
+ readVerInput_f64( &b );
+ readVerInput_f64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, b );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f64_isSignalingNaN( a ) || f64_isSignalingNaN( b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_f64( a, b, "\n\t" );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void ver_abcz_f64( float64_t trueFunction( float64_t, float64_t, float64_t ) )
+{
+ int count;
+ float64_t a, b, c, subjZ;
+ uint_fast8_t subjFlags;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f64( &a );
+ readVerInput_f64( &b );
+ readVerInput_f64( &c );
+ readVerInput_f64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, b, c );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f64_isSignalingNaN( a ) || f64_isSignalingNaN( b )
+ || f64_isSignalingNaN( c ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_abc_f64( a, b, c );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void ver_ab_f64_z_bool( bool trueFunction( float64_t, float64_t ) )
+{
+ int count;
+ float64_t a, b;
+ bool subjZ;
+ uint_fast8_t subjFlags;
+ bool trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f64( &a );
+ readVerInput_f64( &b );
+ readVerInput_bool( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( a, b );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f64_isSignalingNaN( a ) || f64_isSignalingNaN( b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_f64( a, b, " " );
+ writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+#ifdef EXTFLOAT80
+
+void
+ ver_a_extF80_z_ui32_rx(
+ uint_fast32_t trueFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ extFloat80_t a;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_extF80( &a );
+ readVerInput_ui32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &a, roundingMode, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &a, " " );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_extF80_z_ui64_rx(
+ uint_fast64_t trueFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ extFloat80_t a;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_extF80( &a );
+ readVerInput_ui64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &a, roundingMode, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &a, "\n\t" );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_extF80_z_i32_rx(
+ int_fast32_t trueFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ extFloat80_t a;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_extF80( &a );
+ readVerInput_i32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &a, roundingMode, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! extF80M_isNaN( &a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &a, " " );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_extF80_z_i64_rx(
+ int_fast64_t trueFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ extFloat80_t a;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_extF80( &a );
+ readVerInput_i64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &a, roundingMode, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! extF80M_isNaN( &a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &a, "\n\t" );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_extF80_z_ui32_x(
+ uint_fast32_t trueFunction( const extFloat80_t *, bool ), bool exact )
+{
+ int count;
+ extFloat80_t a;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_extF80( &a );
+ readVerInput_ui32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &a, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &a, " " );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_extF80_z_ui64_x(
+ uint_fast64_t trueFunction( const extFloat80_t *, bool ), bool exact )
+{
+ int count;
+ extFloat80_t a;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_extF80( &a );
+ readVerInput_ui64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &a, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &a, "\n\t" );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_extF80_z_i32_x(
+ int_fast32_t trueFunction( const extFloat80_t *, bool ), bool exact )
+{
+ int count;
+ extFloat80_t a;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_extF80( &a );
+ readVerInput_i32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &a, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! extF80M_isNaN( &a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &a, " " );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_extF80_z_i64_x(
+ int_fast64_t trueFunction( const extFloat80_t *, bool ), bool exact )
+{
+ int count;
+ extFloat80_t a;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_extF80( &a );
+ readVerInput_i64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &a, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! extF80M_isNaN( &a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &a, "\n\t" );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#ifdef FLOAT16
+
+void ver_a_extF80_z_f16( float16_t trueFunction( const extFloat80_t * ) )
+{
+ int count;
+ extFloat80_t a;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_extF80( &a );
+ readVerInput_f16( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && extF80M_isSignalingNaN( &a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &a, " " );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+void ver_a_extF80_z_f32( float32_t trueFunction( const extFloat80_t * ) )
+{
+ int count;
+ extFloat80_t a;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_extF80( &a );
+ readVerInput_f32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && extF80M_isSignalingNaN( &a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &a, " " );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#ifdef FLOAT64
+
+void ver_a_extF80_z_f64( float64_t trueFunction( const extFloat80_t * ) )
+{
+ int count;
+ extFloat80_t a;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_extF80( &a );
+ readVerInput_f64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && extF80M_isSignalingNaN( &a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &a, "\n\t" );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void
+ ver_a_extF80_z_f128( void trueFunction( const extFloat80_t *, float128_t * ) )
+{
+ int count;
+ extFloat80_t a;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_extF80( &a );
+ readVerInput_f128( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueFunction( &a, &trueZ );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && extF80M_isSignalingNaN( &a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+void ver_az_extF80( void trueFunction( const extFloat80_t *, extFloat80_t * ) )
+{
+ int count;
+ extFloat80_t a, subjZ;
+ uint_fast8_t subjFlags;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_extF80( &a );
+ readVerInput_extF80( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueFunction( &a, &trueZ );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && extF80M_isSignalingNaN( &a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_az_extF80_rx(
+ void
+ trueFunction( const extFloat80_t *, uint_fast8_t, bool, extFloat80_t * ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ extFloat80_t a, subjZ;
+ uint_fast8_t subjFlags;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_extF80( &a );
+ readVerInput_extF80( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueFunction( &a, roundingMode, exact, &trueZ );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && extF80M_isSignalingNaN( &a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_abz_extF80(
+ void
+ trueFunction(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * )
+ )
+{
+ int count;
+ extFloat80_t a, b, subjZ;
+ uint_fast8_t subjFlags;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_extF80( &a );
+ readVerInput_extF80( &b );
+ readVerInput_extF80( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueFunction( &a, &b, &trueZ );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (extF80M_isSignalingNaN( &a )
+ || extF80M_isSignalingNaN( &b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_extF80M( &a, &b, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_ab_extF80_z_bool(
+ bool trueFunction( const extFloat80_t *, const extFloat80_t * ) )
+{
+ int count;
+ extFloat80_t a, b;
+ bool subjZ;
+ uint_fast8_t subjFlags;
+ bool trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_extF80( &a );
+ readVerInput_extF80( &b );
+ readVerInput_bool( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &a, &b );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (extF80M_isSignalingNaN( &a )
+ || extF80M_isSignalingNaN( &b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_extF80M( &a, &b, " " );
+ writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+#ifdef FLOAT128
+
+void
+ ver_a_f128_z_ui32_rx(
+ uint_fast32_t trueFunction( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float128_t a;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f128( &a );
+ readVerInput_ui32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &a, roundingMode, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &a, " " );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f128_z_ui64_rx(
+ uint_fast64_t trueFunction( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float128_t a;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f128( &a );
+ readVerInput_ui64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &a, roundingMode, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &a, "\n\t" );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f128_z_i32_rx(
+ int_fast32_t trueFunction( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float128_t a;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f128( &a );
+ readVerInput_i32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &a, roundingMode, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! f128M_isNaN( &a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &a, " " );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f128_z_i64_rx(
+ int_fast64_t trueFunction( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float128_t a;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f128( &a );
+ readVerInput_i64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &a, roundingMode, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! f128M_isNaN( &a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &a, "\n\t" );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f128_z_ui32_x(
+ uint_fast32_t trueFunction( const float128_t *, bool ), bool exact )
+{
+ int count;
+ float128_t a;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f128( &a );
+ readVerInput_ui32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &a, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &a, " " );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f128_z_ui64_x(
+ uint_fast64_t trueFunction( const float128_t *, bool ), bool exact )
+{
+ int count;
+ float128_t a;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f128( &a );
+ readVerInput_ui64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &a, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &a, "\n\t" );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f128_z_i32_x(
+ int_fast32_t trueFunction( const float128_t *, bool ), bool exact )
+{
+ int count;
+ float128_t a;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f128( &a );
+ readVerInput_i32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &a, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! f128M_isNaN( &a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &a, " " );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_a_f128_z_i64_x(
+ int_fast64_t trueFunction( const float128_t *, bool ), bool exact )
+{
+ int count;
+ float128_t a;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f128( &a );
+ readVerInput_i64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &a, exact );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! f128M_isNaN( &a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &a, "\n\t" );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#ifdef FLOAT16
+
+void ver_a_f128_z_f16( float16_t trueFunction( const float128_t * ) )
+{
+ int count;
+ float128_t a;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f128( &a );
+ readVerInput_f16( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && f128M_isSignalingNaN( &a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &a, " " );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+void ver_a_f128_z_f32( float32_t trueFunction( const float128_t * ) )
+{
+ int count;
+ float128_t a;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f128( &a );
+ readVerInput_f32( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && f128M_isSignalingNaN( &a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &a, "\n\t" );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#ifdef FLOAT64
+
+void ver_a_f128_z_f64( float64_t trueFunction( const float128_t * ) )
+{
+ int count;
+ float128_t a;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f128( &a );
+ readVerInput_f64( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &a );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && f128M_isSignalingNaN( &a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &a, "\n\t" );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void
+ ver_a_f128_z_extF80( void trueFunction( const float128_t *, extFloat80_t * ) )
+{
+ int count;
+ float128_t a;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f128( &a );
+ readVerInput_extF80( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueFunction( &a, &trueZ );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && f128M_isSignalingNaN( &a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
+void ver_az_f128( void trueFunction( const float128_t *, float128_t * ) )
+{
+ int count;
+ float128_t a, subjZ;
+ uint_fast8_t subjFlags;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f128( &a );
+ readVerInput_f128( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueFunction( &a, &trueZ );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && f128M_isSignalingNaN( &a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_az_f128_rx(
+ void trueFunction( const float128_t *, uint_fast8_t, bool, float128_t * ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float128_t a, subjZ;
+ uint_fast8_t subjFlags;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f128( &a );
+ readVerInput_f128( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueFunction( &a, roundingMode, exact, &trueZ );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if ( ! verCases_checkNaNs && f128M_isSignalingNaN( &a ) ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_abz_f128(
+ void trueFunction( const float128_t *, const float128_t *, float128_t * )
+ )
+{
+ int count;
+ float128_t a, b, subjZ;
+ uint_fast8_t subjFlags;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f128( &a );
+ readVerInput_f128( &b );
+ readVerInput_f128( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueFunction( &a, &b, &trueZ );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f128M_isSignalingNaN( &a )
+ || f128M_isSignalingNaN( &b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_f128M( &a, &b );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_abcz_f128(
+ void
+ trueFunction(
+ const float128_t *,
+ const float128_t *,
+ const float128_t *,
+ float128_t *
+ )
+ )
+{
+ int count;
+ float128_t a, b, c, subjZ;
+ uint_fast8_t subjFlags;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f128( &a );
+ readVerInput_f128( &b );
+ readVerInput_f128( &c );
+ readVerInput_f128( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueFunction( &a, &b, &c, &trueZ );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && ( f128M_isSignalingNaN( &a )
+ || f128M_isSignalingNaN( &b )
+ || f128M_isSignalingNaN( &c )
+ )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_abc_f128M( &a, &b, &c );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+void
+ ver_ab_f128_z_bool(
+ bool trueFunction( const float128_t *, const float128_t * ) )
+{
+ int count;
+ float128_t a, b;
+ bool subjZ;
+ uint_fast8_t subjFlags;
+ bool trueZ;
+ uint_fast8_t trueFlags;
+
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! atEndOfInput() ) {
+ readVerInput_f128( &a );
+ readVerInput_f128( &b );
+ readVerInput_bool( &subjZ );
+ readVerInput_flags( &subjFlags );
+ *verLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &a, &b );
+ trueFlags = *verLoops_trueFlagsPtr;
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f128M_isSignalingNaN( &a )
+ || f128M_isSignalingNaN( &b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_f128M( &a, &b );
+ writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/verLoops.h b/src/libs/softfloat-3e/testfloat/source/verLoops.h
new file mode 100644
index 00000000..5115e918
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/verLoops.h
@@ -0,0 +1,320 @@
+
+/*============================================================================
+
+This C header file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "softfloat.h"
+
+extern uint_fast8_t *verLoops_trueFlagsPtr;
+
+#ifdef FLOAT16
+void ver_a_ui32_z_f16( float16_t ( uint32_t ) );
+#endif
+void ver_a_ui32_z_f32( float32_t ( uint32_t ) );
+#ifdef FLOAT64
+void ver_a_ui32_z_f64( float64_t ( uint32_t ) );
+#endif
+#ifdef EXTFLOAT80
+void ver_a_ui32_z_extF80( void ( uint32_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void ver_a_ui32_z_f128( void ( uint32_t, float128_t * ) );
+#endif
+#ifdef FLOAT16
+void ver_a_ui64_z_f16( float16_t ( uint64_t ) );
+#endif
+void ver_a_ui64_z_f32( float32_t ( uint64_t ) );
+#ifdef FLOAT64
+void ver_a_ui64_z_f64( float64_t ( uint64_t ) );
+#endif
+#ifdef EXTFLOAT80
+void ver_a_ui64_z_extF80( void ( uint64_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void ver_a_ui64_z_f128( void ( uint64_t, float128_t * ) );
+#endif
+#ifdef FLOAT16
+void ver_a_i32_z_f16( float16_t ( int32_t ) );
+#endif
+void ver_a_i32_z_f32( float32_t ( int32_t ) );
+#ifdef FLOAT64
+void ver_a_i32_z_f64( float64_t ( int32_t ) );
+#endif
+#ifdef EXTFLOAT80
+void ver_a_i32_z_extF80( void ( int32_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void ver_a_i32_z_f128( void ( int32_t, float128_t * ) );
+#endif
+#ifdef FLOAT16
+void ver_a_i64_z_f16( float16_t ( int64_t ) );
+#endif
+void ver_a_i64_z_f32( float32_t ( int64_t ) );
+#ifdef FLOAT64
+void ver_a_i64_z_f64( float64_t ( int64_t ) );
+#endif
+#ifdef EXTFLOAT80
+void ver_a_i64_z_extF80( void ( int64_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void ver_a_i64_z_f128( void ( int64_t, float128_t * ) );
+#endif
+
+#ifdef FLOAT16
+void
+ ver_a_f16_z_ui32_rx(
+ uint_fast32_t ( float16_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ ver_a_f16_z_ui64_rx(
+ uint_fast64_t ( float16_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ ver_a_f16_z_i32_rx(
+ int_fast32_t ( float16_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ ver_a_f16_z_i64_rx(
+ int_fast64_t ( float16_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void ver_a_f16_z_ui32_x( uint_fast32_t ( float16_t, bool ), bool );
+void ver_a_f16_z_ui64_x( uint_fast64_t ( float16_t, bool ), bool );
+void ver_a_f16_z_i32_x( int_fast32_t ( float16_t, bool ), bool );
+void ver_a_f16_z_i64_x( int_fast64_t ( float16_t, bool ), bool );
+void ver_a_f16_z_f32( float32_t ( float16_t ) );
+#ifdef FLOAT64
+void ver_a_f16_z_f64( float64_t ( float16_t ) );
+#endif
+#ifdef EXTFLOAT80
+void ver_a_f16_z_extF80( void ( float16_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void ver_a_f16_z_f128( void ( float16_t, float128_t * ) );
+#endif
+void ver_az_f16( float16_t ( float16_t ) );
+void
+ ver_az_f16_rx(
+ float16_t ( float16_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void ver_abz_f16( float16_t ( float16_t, float16_t ) );
+void ver_abcz_f16( float16_t ( float16_t, float16_t, float16_t ) );
+void ver_ab_f16_z_bool( bool ( float16_t, float16_t ) );
+#endif
+
+void
+ ver_a_f32_z_ui32_rx(
+ uint_fast32_t ( float32_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ ver_a_f32_z_ui64_rx(
+ uint_fast64_t ( float32_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ ver_a_f32_z_i32_rx(
+ int_fast32_t ( float32_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ ver_a_f32_z_i64_rx(
+ int_fast64_t ( float32_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void ver_a_f32_z_ui32_x( uint_fast32_t ( float32_t, bool ), bool );
+void ver_a_f32_z_ui64_x( uint_fast64_t ( float32_t, bool ), bool );
+void ver_a_f32_z_i32_x( int_fast32_t ( float32_t, bool ), bool );
+void ver_a_f32_z_i64_x( int_fast64_t ( float32_t, bool ), bool );
+#ifdef FLOAT16
+void ver_a_f32_z_f16( float16_t ( float32_t ) );
+#endif
+#ifdef FLOAT64
+void ver_a_f32_z_f64( float64_t ( float32_t ) );
+#endif
+#ifdef EXTFLOAT80
+void ver_a_f32_z_extF80( void ( float32_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void ver_a_f32_z_f128( void ( float32_t, float128_t * ) );
+#endif
+void ver_az_f32( float32_t ( float32_t ) );
+void
+ ver_az_f32_rx(
+ float32_t ( float32_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void ver_abz_f32( float32_t ( float32_t, float32_t ) );
+void ver_abcz_f32( float32_t ( float32_t, float32_t, float32_t ) );
+void ver_ab_f32_z_bool( bool ( float32_t, float32_t ) );
+
+#ifdef FLOAT64
+void
+ ver_a_f64_z_ui32_rx(
+ uint_fast32_t ( float64_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ ver_a_f64_z_ui64_rx(
+ uint_fast64_t ( float64_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ ver_a_f64_z_i32_rx(
+ int_fast32_t ( float64_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ ver_a_f64_z_i64_rx(
+ int_fast64_t ( float64_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void ver_a_f64_z_ui32_x( uint_fast32_t ( float64_t, bool ), bool );
+void ver_a_f64_z_ui64_x( uint_fast64_t ( float64_t, bool ), bool );
+void ver_a_f64_z_i32_x( int_fast32_t ( float64_t, bool ), bool );
+void ver_a_f64_z_i64_x( int_fast64_t ( float64_t, bool ), bool );
+#ifdef FLOAT16
+void ver_a_f64_z_f16( float16_t ( float64_t ) );
+#endif
+void ver_a_f64_z_f32( float32_t ( float64_t ) );
+#ifdef EXTFLOAT80
+void ver_a_f64_z_extF80( void ( float64_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void ver_a_f64_z_f128( void ( float64_t, float128_t * ) );
+#endif
+void ver_az_f64( float64_t ( float64_t ) );
+void
+ ver_az_f64_rx(
+ float64_t ( float64_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void ver_abz_f64( float64_t ( float64_t, float64_t ) );
+void ver_abcz_f64( float64_t ( float64_t, float64_t, float64_t ) );
+void ver_ab_f64_z_bool( bool ( float64_t, float64_t ) );
+#endif
+
+#ifdef EXTFLOAT80
+void
+ ver_a_extF80_z_ui32_rx(
+ uint_fast32_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ ver_a_extF80_z_ui64_rx(
+ uint_fast64_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ ver_a_extF80_z_i32_rx(
+ int_fast32_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ ver_a_extF80_z_i64_rx(
+ int_fast64_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ ver_a_extF80_z_ui32_x( uint_fast32_t ( const extFloat80_t *, bool ), bool );
+void
+ ver_a_extF80_z_ui64_x( uint_fast64_t ( const extFloat80_t *, bool ), bool );
+void ver_a_extF80_z_i32_x( int_fast32_t ( const extFloat80_t *, bool ), bool );
+void ver_a_extF80_z_i64_x( int_fast64_t ( const extFloat80_t *, bool ), bool );
+#ifdef FLOAT16
+void ver_a_extF80_z_f16( float16_t ( const extFloat80_t * ) );
+#endif
+void ver_a_extF80_z_f32( float32_t ( const extFloat80_t * ) );
+#ifdef FLOAT64
+void ver_a_extF80_z_f64( float64_t ( const extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void ver_a_extF80_z_f128( void ( const extFloat80_t *, float128_t * ) );
+#endif
+void ver_az_extF80( void ( const extFloat80_t *, extFloat80_t * ) );
+void
+ ver_az_extF80_rx(
+ void ( const extFloat80_t *, uint_fast8_t, bool, extFloat80_t * ),
+ uint_fast8_t,
+ bool
+ );
+void
+ ver_abz_extF80(
+ void ( const extFloat80_t *, const extFloat80_t *, extFloat80_t * ) );
+void
+ ver_ab_extF80_z_bool( bool ( const extFloat80_t *, const extFloat80_t * ) );
+#endif
+
+#ifdef FLOAT128
+void
+ ver_a_f128_z_ui32_rx(
+ uint_fast32_t ( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ ver_a_f128_z_ui64_rx(
+ uint_fast64_t ( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ ver_a_f128_z_i32_rx(
+ int_fast32_t ( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ ver_a_f128_z_i64_rx(
+ int_fast64_t ( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void ver_a_f128_z_ui32_x( uint_fast32_t ( const float128_t *, bool ), bool );
+void ver_a_f128_z_ui64_x( uint_fast64_t ( const float128_t *, bool ), bool );
+void ver_a_f128_z_i32_x( int_fast32_t ( const float128_t *, bool ), bool );
+void ver_a_f128_z_i64_x( int_fast64_t ( const float128_t *, bool ), bool );
+#ifdef FLOAT16
+void ver_a_f128_z_f16( float16_t ( const float128_t * ) );
+#endif
+void ver_a_f128_z_f32( float32_t ( const float128_t * ) );
+#ifdef FLOAT64
+void ver_a_f128_z_f64( float64_t ( const float128_t * ) );
+#endif
+#ifdef EXTFLOAT80
+void ver_a_f128_z_extF80( void ( const float128_t *, extFloat80_t * ) );
+#endif
+void ver_az_f128( void ( const float128_t *, float128_t * ) );
+void
+ ver_az_f128_rx(
+ void ( const float128_t *, uint_fast8_t, bool, float128_t * ),
+ uint_fast8_t,
+ bool
+ );
+void
+ ver_abz_f128( void ( const float128_t *, const float128_t *, float128_t * ) );
+void
+ ver_abcz_f128(
+ void
+ (
+ const float128_t *,
+ const float128_t *,
+ const float128_t *,
+ float128_t *
+ )
+ );
+void ver_ab_f128_z_bool( bool ( const float128_t *, const float128_t * ) );
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeCase.h b/src/libs/softfloat-3e/testfloat/source/writeCase.h
new file mode 100644
index 00000000..d1054c8c
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeCase.h
@@ -0,0 +1,97 @@
+
+/*============================================================================
+
+This C header file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "softfloat.h"
+
+void writeCase_a_ui32( uint_fast32_t, const char * );
+void writeCase_a_ui64( uint_fast64_t, const char * );
+#define writeCase_a_i32 writeCase_a_ui32
+#define writeCase_a_i64 writeCase_a_ui64
+#ifdef FLOAT16
+void writeCase_a_f16( float16_t );
+void writeCase_ab_f16( float16_t, float16_t );
+void writeCase_abc_f16( float16_t, float16_t, float16_t );
+#endif
+void writeCase_a_f32( float32_t, const char * );
+void writeCase_ab_f32( float32_t, float32_t );
+void writeCase_abc_f32( float32_t, float32_t, float32_t );
+#ifdef FLOAT64
+void writeCase_a_f64( float64_t, const char * );
+void writeCase_ab_f64( float64_t, float64_t, const char * );
+void writeCase_abc_f64( float64_t, float64_t, float64_t );
+#endif
+#ifdef EXTFLOAT80
+void writeCase_a_extF80M( const extFloat80_t *, const char * );
+void
+ writeCase_ab_extF80M(
+ const extFloat80_t *, const extFloat80_t *, const char * );
+#endif
+#ifdef FLOAT128
+void writeCase_a_f128M( const float128_t *, const char * );
+void writeCase_ab_f128M( const float128_t *, const float128_t * );
+void
+ writeCase_abc_f128M(
+ const float128_t *, const float128_t *, const float128_t * );
+#endif
+
+void writeCase_z_bool( bool, uint_fast8_t, bool, uint_fast8_t );
+void
+ writeCase_z_ui32( uint_fast32_t, uint_fast8_t, uint_fast32_t, uint_fast8_t );
+void
+ writeCase_z_ui64( uint_fast64_t, uint_fast8_t, uint_fast64_t, uint_fast8_t );
+#define writeCase_z_i32 writeCase_z_ui32
+#define writeCase_z_i64 writeCase_z_ui64
+#ifdef FLOAT16
+void writeCase_z_f16( float16_t, uint_fast8_t, float16_t, uint_fast8_t );
+#endif
+void writeCase_z_f32( float32_t, uint_fast8_t, float32_t, uint_fast8_t );
+#ifdef FLOAT64
+void writeCase_z_f64( float64_t, uint_fast8_t, float64_t, uint_fast8_t );
+#endif
+#ifdef EXTFLOAT80
+void
+ writeCase_z_extF80M(
+ const extFloat80_t *, uint_fast8_t, const extFloat80_t *, uint_fast8_t );
+#endif
+#ifdef FLOAT128
+void
+ writeCase_z_f128M(
+ const float128_t *, uint_fast8_t, const float128_t *, uint_fast8_t );
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeCase_a_extF80M.c b/src/libs/softfloat-3e/testfloat/source/writeCase_a_extF80M.c
new file mode 100644
index 00000000..b960f0d0
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeCase_a_extF80M.c
@@ -0,0 +1,55 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "writeHex.h"
+#include "writeCase.h"
+
+#ifdef EXTFLOAT80
+
+void writeCase_a_extF80M( const extFloat80_t *aPtr, const char *sepStringPtr )
+{
+
+ writeHex_extF80M( aPtr, 0 );
+ fputs( sepStringPtr, stdout );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeCase_a_f128M.c b/src/libs/softfloat-3e/testfloat/source/writeCase_a_f128M.c
new file mode 100644
index 00000000..630f0002
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeCase_a_f128M.c
@@ -0,0 +1,55 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "writeHex.h"
+#include "writeCase.h"
+
+#ifdef FLOAT128
+
+void writeCase_a_f128M( const float128_t *aPtr, const char *sepStringPtr )
+{
+
+ writeHex_f128M( aPtr, 0 );
+ fputs( sepStringPtr, stdout );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeCase_a_f16.c b/src/libs/softfloat-3e/testfloat/source/writeCase_a_f16.c
new file mode 100644
index 00000000..f404b459
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeCase_a_f16.c
@@ -0,0 +1,55 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "writeHex.h"
+#include "writeCase.h"
+
+#ifdef FLOAT16
+
+void writeCase_a_f16( float16_t a )
+{
+
+ writeHex_f16( a, 0 );
+ fputs( " ", stdout );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeCase_a_f32.c b/src/libs/softfloat-3e/testfloat/source/writeCase_a_f32.c
new file mode 100644
index 00000000..edaaae2a
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeCase_a_f32.c
@@ -0,0 +1,51 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "writeHex.h"
+#include "writeCase.h"
+
+void writeCase_a_f32( float32_t a, const char *sepStringPtr )
+{
+
+ writeHex_f32( a, 0 );
+ fputs( sepStringPtr, stdout );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeCase_a_f64.c b/src/libs/softfloat-3e/testfloat/source/writeCase_a_f64.c
new file mode 100644
index 00000000..b5e0ec61
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeCase_a_f64.c
@@ -0,0 +1,55 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "writeHex.h"
+#include "writeCase.h"
+
+#ifdef FLOAT64
+
+void writeCase_a_f64( float64_t a, const char *sepStringPtr )
+{
+
+ writeHex_f64( a, 0 );
+ fputs( sepStringPtr, stdout );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeCase_a_ui32.c b/src/libs/softfloat-3e/testfloat/source/writeCase_a_ui32.c
new file mode 100644
index 00000000..5d96e043
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeCase_a_ui32.c
@@ -0,0 +1,51 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "writeHex.h"
+#include "writeCase.h"
+
+void writeCase_a_ui32( uint_fast32_t a, const char *sepStringPtr )
+{
+
+ writeHex_ui32( a, 0 );
+ fputs( sepStringPtr, stdout );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeCase_a_ui64.c b/src/libs/softfloat-3e/testfloat/source/writeCase_a_ui64.c
new file mode 100644
index 00000000..5666721a
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeCase_a_ui64.c
@@ -0,0 +1,51 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "writeHex.h"
+#include "writeCase.h"
+
+void writeCase_a_ui64( uint_fast64_t a, const char *sepStringPtr )
+{
+
+ writeHex_ui64( a, 0 );
+ fputs( sepStringPtr, stdout );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeCase_ab_extF80M.c b/src/libs/softfloat-3e/testfloat/source/writeCase_ab_extF80M.c
new file mode 100644
index 00000000..e66e6792
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeCase_ab_extF80M.c
@@ -0,0 +1,62 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "writeHex.h"
+#include "writeCase.h"
+
+#ifdef EXTFLOAT80
+
+void
+ writeCase_ab_extF80M(
+ const extFloat80_t *aPtr,
+ const extFloat80_t *bPtr,
+ const char *sepStringPtr
+ )
+{
+
+ writeHex_extF80M( aPtr, 0 );
+ fputs( " ", stdout );
+ writeHex_extF80M( bPtr, 0 );
+ fputs( sepStringPtr, stdout );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeCase_ab_f128M.c b/src/libs/softfloat-3e/testfloat/source/writeCase_ab_f128M.c
new file mode 100644
index 00000000..8ff0deee
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeCase_ab_f128M.c
@@ -0,0 +1,57 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "writeHex.h"
+#include "writeCase.h"
+
+#ifdef FLOAT128
+
+void writeCase_ab_f128M( const float128_t *aPtr, const float128_t *bPtr )
+{
+
+ writeHex_f128M( aPtr, 0 );
+ fputs( " ", stdout );
+ writeHex_f128M( bPtr, 0 );
+ fputs( "\n\t", stdout );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeCase_ab_f16.c b/src/libs/softfloat-3e/testfloat/source/writeCase_ab_f16.c
new file mode 100644
index 00000000..6c86e933
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeCase_ab_f16.c
@@ -0,0 +1,57 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "writeHex.h"
+#include "writeCase.h"
+
+#ifdef FLOAT16
+
+void writeCase_ab_f16( float16_t a, float16_t b )
+{
+
+ writeHex_f16( a, 0 );
+ fputs( " ", stdout );
+ writeHex_f16( b, 0 );
+ fputs( " ", stdout );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeCase_ab_f32.c b/src/libs/softfloat-3e/testfloat/source/writeCase_ab_f32.c
new file mode 100644
index 00000000..1218dfba
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeCase_ab_f32.c
@@ -0,0 +1,53 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "writeHex.h"
+#include "writeCase.h"
+
+void writeCase_ab_f32( float32_t a, float32_t b )
+{
+
+ writeHex_f32( a, 0 );
+ fputs( " ", stdout );
+ writeHex_f32( b, 0 );
+ fputs( " ", stdout );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeCase_ab_f64.c b/src/libs/softfloat-3e/testfloat/source/writeCase_ab_f64.c
new file mode 100644
index 00000000..251f009c
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeCase_ab_f64.c
@@ -0,0 +1,57 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "writeHex.h"
+#include "writeCase.h"
+
+#ifdef FLOAT64
+
+void writeCase_ab_f64( float64_t a, float64_t b, const char *sepStringPtr )
+{
+
+ writeHex_f64( a, 0 );
+ fputs( " ", stdout );
+ writeHex_f64( b, 0 );
+ fputs( sepStringPtr, stdout );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeCase_abc_f128M.c b/src/libs/softfloat-3e/testfloat/source/writeCase_abc_f128M.c
new file mode 100644
index 00000000..c9697442
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeCase_abc_f128M.c
@@ -0,0 +1,61 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "writeHex.h"
+#include "writeCase.h"
+
+#ifdef FLOAT128
+
+void
+ writeCase_abc_f128M(
+ const float128_t *aPtr, const float128_t *bPtr, const float128_t *cPtr )
+{
+
+ writeHex_f128M( aPtr, 0 );
+ fputs( " ", stdout );
+ writeHex_f128M( bPtr, 0 );
+ fputs( "\n\t", stdout );
+ writeHex_f128M( cPtr, 0 );
+ fputs( "\n\t", stdout );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeCase_abc_f16.c b/src/libs/softfloat-3e/testfloat/source/writeCase_abc_f16.c
new file mode 100644
index 00000000..17acf2aa
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeCase_abc_f16.c
@@ -0,0 +1,59 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "writeHex.h"
+#include "writeCase.h"
+
+#ifdef FLOAT16
+
+void writeCase_abc_f16( float16_t a, float16_t b, float16_t c )
+{
+
+ writeHex_f16( a, 0 );
+ fputs( " ", stdout );
+ writeHex_f16( b, 0 );
+ fputs( " ", stdout );
+ writeHex_f16( c, 0 );
+ fputs( " ", stdout );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeCase_abc_f32.c b/src/libs/softfloat-3e/testfloat/source/writeCase_abc_f32.c
new file mode 100644
index 00000000..09a46a31
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeCase_abc_f32.c
@@ -0,0 +1,55 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "writeHex.h"
+#include "writeCase.h"
+
+void writeCase_abc_f32( float32_t a, float32_t b, float32_t c )
+{
+
+ writeHex_f32( a, 0 );
+ fputs( " ", stdout );
+ writeHex_f32( b, 0 );
+ fputs( " ", stdout );
+ writeHex_f32( c, 0 );
+ fputs( "\n\t", stdout );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeCase_abc_f64.c b/src/libs/softfloat-3e/testfloat/source/writeCase_abc_f64.c
new file mode 100644
index 00000000..1f0a4ae0
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeCase_abc_f64.c
@@ -0,0 +1,59 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "writeHex.h"
+#include "writeCase.h"
+
+#ifdef FLOAT64
+
+void writeCase_abc_f64( float64_t a, float64_t b, float64_t c )
+{
+
+ writeHex_f64( a, 0 );
+ fputs( " ", stdout );
+ writeHex_f64( b, 0 );
+ fputs( " ", stdout );
+ writeHex_f64( c, 0 );
+ fputs( "\n\t", stdout );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeCase_z_bool.c b/src/libs/softfloat-3e/testfloat/source/writeCase_z_bool.c
new file mode 100644
index 00000000..aca956b6
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeCase_z_bool.c
@@ -0,0 +1,59 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "writeHex.h"
+#include "writeCase.h"
+
+void
+ writeCase_z_bool(
+ bool trueZ, uint_fast8_t trueFlags, bool subjZ, uint_fast8_t subjFlags )
+{
+
+ fputs( "=> ", stdout );
+ writeHex_bool( subjZ, ' ' );
+ writeHex_softfloat_flags( subjFlags, 0 );
+ fputs( " expected ", stdout );
+ writeHex_bool( trueZ, ' ' );
+ writeHex_softfloat_flags( trueFlags, '\n' );
+ fflush( stdout );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeCase_z_extF80M.c b/src/libs/softfloat-3e/testfloat/source/writeCase_z_extF80M.c
new file mode 100644
index 00000000..8c0f3f0b
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeCase_z_extF80M.c
@@ -0,0 +1,67 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "writeHex.h"
+#include "writeCase.h"
+
+#ifdef EXTFLOAT80
+
+void
+ writeCase_z_extF80M(
+ const extFloat80_t *trueZPtr,
+ uint_fast8_t trueFlags,
+ const extFloat80_t *subjZPtr,
+ uint_fast8_t subjFlags
+ )
+{
+
+ fputs( "=> ", stdout );
+ writeHex_extF80M( subjZPtr, ' ' );
+ writeHex_softfloat_flags( subjFlags, 0 );
+ fputs( " expected ", stdout );
+ writeHex_extF80M( trueZPtr, ' ' );
+ writeHex_softfloat_flags( trueFlags, '\n' );
+ fflush( stdout );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeCase_z_f128M.c b/src/libs/softfloat-3e/testfloat/source/writeCase_z_f128M.c
new file mode 100644
index 00000000..ec574bb5
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeCase_z_f128M.c
@@ -0,0 +1,67 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "writeHex.h"
+#include "writeCase.h"
+
+#ifdef FLOAT128
+
+void
+ writeCase_z_f128M(
+ const float128_t *trueZPtr,
+ uint_fast8_t trueFlags,
+ const float128_t *subjZPtr,
+ uint_fast8_t subjFlags
+ )
+{
+
+ fputs( "=> ", stdout );
+ writeHex_f128M( subjZPtr, ' ' );
+ writeHex_softfloat_flags( subjFlags, 0 );
+ fputs( "\n\texpected ", stdout );
+ writeHex_f128M( trueZPtr, ' ' );
+ writeHex_softfloat_flags( trueFlags, '\n' );
+ fflush( stdout );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeCase_z_f16.c b/src/libs/softfloat-3e/testfloat/source/writeCase_z_f16.c
new file mode 100644
index 00000000..f8a11eee
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeCase_z_f16.c
@@ -0,0 +1,67 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "writeHex.h"
+#include "writeCase.h"
+
+#ifdef FLOAT16
+
+void
+ writeCase_z_f16(
+ float16_t trueZ,
+ uint_fast8_t trueFlags,
+ float16_t subjZ,
+ uint_fast8_t subjFlags
+ )
+{
+
+ fputs( "=> ", stdout );
+ writeHex_f16( subjZ, ' ' );
+ writeHex_softfloat_flags( subjFlags, 0 );
+ fputs( " expected ", stdout );
+ writeHex_f16( trueZ, ' ' );
+ writeHex_softfloat_flags( trueFlags, '\n' );
+ fflush( stdout );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeCase_z_f32.c b/src/libs/softfloat-3e/testfloat/source/writeCase_z_f32.c
new file mode 100644
index 00000000..b1593b7e
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeCase_z_f32.c
@@ -0,0 +1,63 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "writeHex.h"
+#include "writeCase.h"
+
+void
+ writeCase_z_f32(
+ float32_t trueZ,
+ uint_fast8_t trueFlags,
+ float32_t subjZ,
+ uint_fast8_t subjFlags
+ )
+{
+
+ fputs( "=> ", stdout );
+ writeHex_f32( subjZ, ' ' );
+ writeHex_softfloat_flags( subjFlags, 0 );
+ fputs( " expected ", stdout );
+ writeHex_f32( trueZ, ' ' );
+ writeHex_softfloat_flags( trueFlags, '\n' );
+ fflush( stdout );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeCase_z_f64.c b/src/libs/softfloat-3e/testfloat/source/writeCase_z_f64.c
new file mode 100644
index 00000000..97f2bf56
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeCase_z_f64.c
@@ -0,0 +1,67 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "softfloat.h"
+#include "writeHex.h"
+#include "writeCase.h"
+
+#ifdef FLOAT64
+
+void
+ writeCase_z_f64(
+ float64_t trueZ,
+ uint_fast8_t trueFlags,
+ float64_t subjZ,
+ uint_fast8_t subjFlags
+ )
+{
+
+ fputs( "=> ", stdout );
+ writeHex_f64( subjZ, ' ' );
+ writeHex_softfloat_flags( subjFlags, 0 );
+ fputs( " expected ", stdout );
+ writeHex_f64( trueZ, ' ' );
+ writeHex_softfloat_flags( trueFlags, '\n' );
+ fflush( stdout );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeCase_z_ui32.c b/src/libs/softfloat-3e/testfloat/source/writeCase_z_ui32.c
new file mode 100644
index 00000000..ed07ffc5
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeCase_z_ui32.c
@@ -0,0 +1,62 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "writeHex.h"
+#include "writeCase.h"
+
+void
+ writeCase_z_ui32(
+ uint_fast32_t trueZ,
+ uint_fast8_t trueFlags,
+ uint_fast32_t subjZ,
+ uint_fast8_t subjFlags
+ )
+{
+
+ fputs( "=> ", stdout );
+ writeHex_ui32( subjZ, ' ' );
+ writeHex_softfloat_flags( subjFlags, 0 );
+ fputs( " expected ", stdout );
+ writeHex_ui32( trueZ, ' ' );
+ writeHex_softfloat_flags( trueFlags, '\n' );
+ fflush( stdout );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeCase_z_ui64.c b/src/libs/softfloat-3e/testfloat/source/writeCase_z_ui64.c
new file mode 100644
index 00000000..f20cb188
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeCase_z_ui64.c
@@ -0,0 +1,62 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "writeHex.h"
+#include "writeCase.h"
+
+void
+ writeCase_z_ui64(
+ uint_fast64_t trueZ,
+ uint_fast8_t trueFlags,
+ uint_fast64_t subjZ,
+ uint_fast8_t subjFlags
+ )
+{
+
+ fputs( "=> ", stdout );
+ writeHex_ui64( subjZ, ' ' );
+ writeHex_softfloat_flags( subjFlags, 0 );
+ fputs( " expected ", stdout );
+ writeHex_ui64( trueZ, ' ' );
+ writeHex_softfloat_flags( trueFlags, '\n' );
+ fflush( stdout );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeHex.c b/src/libs/softfloat-3e/testfloat/source/writeHex.c
new file mode 100644
index 00000000..442bbb99
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeHex.c
@@ -0,0 +1,224 @@
+
+/*============================================================================
+
+This C source file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
+#include "platform.h"
+#include "uint128.h"
+#include "softfloat.h"
+#include "writeHex.h"
+
+void writeHex_bool( bool a, char sepChar )
+{
+
+ fputc( a ? '1' : '0', stdout );
+ if ( sepChar ) fputc( sepChar, stdout );
+
+}
+
+void writeHex_ui8( uint_fast8_t a, char sepChar )
+{
+ int digit;
+
+ digit = a>>4 & 0xF;
+ if ( 9 < digit ) digit += 'A' - ('0' + 10);
+ fputc( '0' + digit, stdout );
+ digit = a & 0xF;
+ if ( 9 < digit ) digit += 'A' - ('0' + 10);
+ fputc( '0' + digit, stdout );
+ if ( sepChar ) fputc( sepChar, stdout );
+
+}
+
+static void writeHex_ui12( uint_fast16_t a, char sepChar )
+{
+ int digit;
+
+ digit = a>>8 & 0xF;
+ if ( 9 < digit ) digit += 'A' - ('0' + 10);
+ fputc( '0' + digit, stdout );
+ digit = a>>4 & 0xF;
+ if ( 9 < digit ) digit += 'A' - ('0' + 10);
+ fputc( '0' + digit, stdout );
+ digit = a & 0xF;
+ if ( 9 < digit ) digit += 'A' - ('0' + 10);
+ fputc( '0' + digit, stdout );
+ if ( sepChar ) fputc( sepChar, stdout );
+
+}
+
+void writeHex_ui16( uint_fast16_t a, char sepChar )
+{
+ int digit;
+
+ digit = a>>12 & 0xF;
+ if ( 9 < digit ) digit += 'A' - ('0' + 10);
+ fputc( '0' + digit, stdout );
+ digit = a>>8 & 0xF;
+ if ( 9 < digit ) digit += 'A' - ('0' + 10);
+ fputc( '0' + digit, stdout );
+ digit = a>>4 & 0xF;
+ if ( 9 < digit ) digit += 'A' - ('0' + 10);
+ fputc( '0' + digit, stdout );
+ digit = a & 0xF;
+ if ( 9 < digit ) digit += 'A' - ('0' + 10);
+ fputc( '0' + digit, stdout );
+ if ( sepChar ) fputc( sepChar, stdout );
+
+}
+
+void writeHex_ui32( uint_fast32_t a, char sepChar )
+{
+
+ writeHex_ui16( a>>16, 0 );
+ writeHex_ui16( a, sepChar );
+
+}
+
+void writeHex_ui64( uint_fast64_t a, char sepChar )
+{
+
+ writeHex_ui32( a>>32, 0 );
+ writeHex_ui32( a, sepChar );
+
+}
+
+#ifdef FLOAT16
+
+void writeHex_f16( float16_t a, char sepChar )
+{
+ union { uint16_t ui; float16_t f; } uA;
+ uint_fast16_t uiA;
+
+ uA.f = a;
+ uiA = uA.ui;
+ fputc( uiA & 0x8000 ? '-' : '+', stdout );
+ writeHex_ui8( uiA>>10 & 0x1F, 0 );
+ fputc( '.', stdout );
+ fputc( '0' + (uiA>>8 & 3), stdout );
+ writeHex_ui8( uiA, sepChar );
+
+}
+
+#endif
+
+void writeHex_f32( float32_t a, char sepChar )
+{
+ union { uint32_t ui; float32_t f; } uA;
+ uint_fast32_t uiA;
+
+ uA.f = a;
+ uiA = uA.ui;
+ fputc( uiA & 0x80000000 ? '-' : '+', stdout );
+ writeHex_ui8( uiA>>23, 0 );
+ fputc( '.', stdout );
+ writeHex_ui8( uiA>>16 & 0x7F, 0 );
+ writeHex_ui16( uiA, sepChar );
+
+}
+
+#ifdef FLOAT64
+
+void writeHex_f64( float64_t a, char sepChar )
+{
+ union { uint64_t ui; float64_t f; } uA;
+ uint_fast64_t uiA;
+
+ uA.f = a;
+ uiA = uA.ui;
+ fputc( uiA & UINT64_C( 0x8000000000000000 ) ? '-' : '+', stdout );
+ writeHex_ui12( uiA>>52 & 0x7FF, 0 );
+ fputc( '.', stdout );
+ writeHex_ui12( uiA>>40, 0 );
+ writeHex_ui8( uiA>>32, 0 );
+ writeHex_ui32( uiA, sepChar );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void writeHex_extF80M( const extFloat80_t *aPtr, char sepChar )
+{
+ const struct extFloat80M *aSPtr;
+ uint_fast16_t uiA64;
+
+ aSPtr = (const struct extFloat80M *) aPtr;
+ uiA64 = aSPtr->signExp;
+ fputc( uiA64 & 0x8000 ? '-' : '+', stdout );
+ writeHex_ui16( uiA64 & 0x7FFF, 0 );
+ fputc( '.', stdout );
+ writeHex_ui64( aSPtr->signif, sepChar );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void writeHex_f128M( const float128_t *aPtr, char sepChar )
+{
+ const struct uint128 *uiAPtr;
+ uint_fast64_t uiA64;
+
+ uiAPtr = (const struct uint128 *) aPtr;
+ uiA64 = uiAPtr->v64;
+ fputc( uiA64 & UINT64_C( 0x8000000000000000 ) ? '-' : '+', stdout );
+ writeHex_ui16( uiA64>>48 & 0x7FFF, 0 );
+ fputc( '.', stdout );
+ writeHex_ui16( uiA64>>32, 0 );
+ writeHex_ui32( uiA64, 0 );
+ writeHex_ui64( uiAPtr->v0, sepChar );
+
+}
+
+#endif
+
+void writeHex_softfloat_flags( uint_fast8_t flags, char sepChar )
+{
+
+ fputc( flags & softfloat_flag_invalid ? 'v' : '.', stdout );
+ fputc( flags & softfloat_flag_infinite ? 'i' : '.', stdout );
+ fputc( flags & softfloat_flag_overflow ? 'o' : '.', stdout );
+ fputc( flags & softfloat_flag_underflow ? 'u' : '.', stdout );
+ fputc( flags & softfloat_flag_inexact ? 'x' : '.', stdout );
+ if ( sepChar ) fputc( sepChar, stdout );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/writeHex.h b/src/libs/softfloat-3e/testfloat/source/writeHex.h
new file mode 100644
index 00000000..951a26fd
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/writeHex.h
@@ -0,0 +1,61 @@
+
+/*============================================================================
+
+This C header file is part of TestFloat, Release 3e, a package of programs for
+testing the correctness of floating-point arithmetic complying with the IEEE
+Standard for Floating-Point, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "softfloat.h"
+
+void writeHex_bool( bool, char );
+void writeHex_ui8( uint_fast8_t, char );
+void writeHex_ui16( uint_fast16_t, char );
+void writeHex_ui32( uint_fast32_t, char );
+void writeHex_ui64( uint_fast64_t, char );
+#ifdef FLOAT16
+void writeHex_f16( float16_t, char );
+#endif
+void writeHex_f32( float32_t, char );
+#ifdef FLOAT64
+void writeHex_f64( float64_t, char );
+#endif
+#ifdef EXTFLOAT80
+void writeHex_extF80M( const extFloat80_t *, char );
+#endif
+#ifdef FLOAT128
+void writeHex_f128M( const float128_t *, char );
+#endif
+void writeHex_softfloat_flags( uint_fast8_t, char );
+