diff --git a/.clang-format-ignore b/.clang-format-ignore index 218bbde33..f86588fa0 100644 --- a/.clang-format-ignore +++ b/.clang-format-ignore @@ -3,8 +3,6 @@ # Ignore all files in the External directory External/* -# SoftFloat-3e code doesn't belong to us -FEXCore/Source/Common/SoftFloat-3e/* Source/Common/cpp-optparse/* # Files with human-indented tables for readability - don't mess with these diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ac4d026c..ee63ab141 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -440,6 +440,7 @@ if (BUILD_TESTS) set(TEST_JOB_FLAG "-j${TEST_JOB_COUNT}") endif() +add_subdirectory(External/SoftFloat-3e/) add_subdirectory(External/cephes/) add_subdirectory(FEXHeaderUtils/) add_subdirectory(CodeEmitter/) diff --git a/External/SoftFloat-3e/CMakeLists.txt b/External/SoftFloat-3e/CMakeLists.txt new file mode 100644 index 000000000..9f5d34c76 --- /dev/null +++ b/External/SoftFloat-3e/CMakeLists.txt @@ -0,0 +1,63 @@ + +set (SRCS + src/extF80_add.c + src/extF80_div.c + src/extF80_sub.c + src/extF80_mul.c + src/extF80_rem.c + src/extF80_sqrt.c + src/extF80_to_i32.c + src/extF80_to_i64.c + src/extF80_to_ui64.c + src/extF80_to_f32.c + src/extF80_to_f64.c + src/i32_to_extF80.c + src/ui64_to_extF80.c + src/extF80_to_f128.c + src/f128_to_extF80.c + src/s_roundToUI64.c + src/s_f128UIToCommonNaN.c + src/s_commonNaNToF128UI.c + src/s_normSubnormalF128Sig.c + src/s_roundToI32.c + src/s_roundToI64.c + src/s_roundPackToF32.c + src/s_addMagsExtF80.c + src/s_extF80UIToCommonNaN.c + src/s_commonNaNToF32UI.c + src/s_commonNaNToF64UI.c + src/s_roundPackToF64.c + src/s_propagateNaNExtF80UI.c + src/s_roundPackToExtF80.c + src/s_normSubnormalExtF80Sig.c + src/s_subMagsExtF80.c + src/s_shiftRightJam128.c + src/s_shiftRightJam128Extra.c + src/s_normRoundPackToExtF80.c + src/s_approxRecip_1Ks.c + src/s_approxRecipSqrt32_1.c + src/s_approxRecipSqrt_1Ks.c + src/softfloat_raiseFlags.c + src/f64_to_extF80.c + src/s_commonNaNToExtF80UI.c + src/s_normSubnormalF64Sig.c + src/s_f64UIToCommonNaN.c + src/extF80_roundToInt.c + src/extF80_eq.c + src/extF80_lt.c + src/f32_to_extF80.c + src/s_normSubnormalF32Sig.c + src/s_f32UIToCommonNaN.c) + +if (_M_ARM_64 AND HAS_CLANG_PRESERVE_ALL) + list(APPEND DEFINES "-DFEXCORE_PRESERVE_ALL_ATTR=__attribute__((preserve_all));-DFEXCORE_HAS_PRESERVE_ALL_ATTR=1") +else() + list(APPEND DEFINES "-DFEXCORE_PRESERVE_ALL_ATTR=;-DFEXCORE_HAS_PRESERVE_ALL_ATTR=0") +endif() + +list(APPEND DEFINES "-DSOFTFLOAT_BUILTIN_CLZ=1;-DINLINE=static inline;-DINLINE_LEVEL=4;-DSOFTFLOAT_FAST_INT64=1;-DSOFTFLOAT_FAST_DIV32TO16=1;-DSOFTFLOAT_FAST_DIV64TO32=1") + +add_library(softfloat_3e STATIC ${SRCS}) +target_include_directories(softfloat_3e PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/) +target_include_directories(softfloat_3e PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/SoftFloat-3e/) +target_compile_definitions(softfloat_3e PUBLIC ${DEFINES}) diff --git a/FEXCore/Source/Common/SoftFloat-3e/opts-GCC.h b/External/SoftFloat-3e/include/SoftFloat-3e/opts-GCC.h similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/opts-GCC.h rename to External/SoftFloat-3e/include/SoftFloat-3e/opts-GCC.h diff --git a/FEXCore/Source/Common/SoftFloat-3e/platform.h b/External/SoftFloat-3e/include/SoftFloat-3e/platform.h similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/platform.h rename to External/SoftFloat-3e/include/SoftFloat-3e/platform.h diff --git a/FEXCore/Source/Common/SoftFloat-3e/primitiveTypes.h b/External/SoftFloat-3e/include/SoftFloat-3e/primitiveTypes.h similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/primitiveTypes.h rename to External/SoftFloat-3e/include/SoftFloat-3e/primitiveTypes.h diff --git a/FEXCore/Source/Common/SoftFloat-3e/softfloat.h b/External/SoftFloat-3e/include/SoftFloat-3e/softfloat.h similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/softfloat.h rename to External/SoftFloat-3e/include/SoftFloat-3e/softfloat.h diff --git a/FEXCore/Source/Common/SoftFloat-3e/softfloat_types.h b/External/SoftFloat-3e/include/SoftFloat-3e/softfloat_types.h similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/softfloat_types.h rename to External/SoftFloat-3e/include/SoftFloat-3e/softfloat_types.h diff --git a/FEXCore/Source/Common/SoftFloat-3e/extF80_add.c b/External/SoftFloat-3e/src/extF80_add.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/extF80_add.c rename to External/SoftFloat-3e/src/extF80_add.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/extF80_div.c b/External/SoftFloat-3e/src/extF80_div.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/extF80_div.c rename to External/SoftFloat-3e/src/extF80_div.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/extF80_eq.c b/External/SoftFloat-3e/src/extF80_eq.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/extF80_eq.c rename to External/SoftFloat-3e/src/extF80_eq.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/extF80_lt.c b/External/SoftFloat-3e/src/extF80_lt.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/extF80_lt.c rename to External/SoftFloat-3e/src/extF80_lt.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/extF80_mul.c b/External/SoftFloat-3e/src/extF80_mul.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/extF80_mul.c rename to External/SoftFloat-3e/src/extF80_mul.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/extF80_rem.c b/External/SoftFloat-3e/src/extF80_rem.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/extF80_rem.c rename to External/SoftFloat-3e/src/extF80_rem.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/extF80_roundToInt.c b/External/SoftFloat-3e/src/extF80_roundToInt.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/extF80_roundToInt.c rename to External/SoftFloat-3e/src/extF80_roundToInt.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/extF80_sqrt.c b/External/SoftFloat-3e/src/extF80_sqrt.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/extF80_sqrt.c rename to External/SoftFloat-3e/src/extF80_sqrt.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/extF80_sub.c b/External/SoftFloat-3e/src/extF80_sub.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/extF80_sub.c rename to External/SoftFloat-3e/src/extF80_sub.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/extF80_to_f128.c b/External/SoftFloat-3e/src/extF80_to_f128.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/extF80_to_f128.c rename to External/SoftFloat-3e/src/extF80_to_f128.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/extF80_to_f32.c b/External/SoftFloat-3e/src/extF80_to_f32.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/extF80_to_f32.c rename to External/SoftFloat-3e/src/extF80_to_f32.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/extF80_to_f64.c b/External/SoftFloat-3e/src/extF80_to_f64.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/extF80_to_f64.c rename to External/SoftFloat-3e/src/extF80_to_f64.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/extF80_to_i32.c b/External/SoftFloat-3e/src/extF80_to_i32.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/extF80_to_i32.c rename to External/SoftFloat-3e/src/extF80_to_i32.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/extF80_to_i64.c b/External/SoftFloat-3e/src/extF80_to_i64.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/extF80_to_i64.c rename to External/SoftFloat-3e/src/extF80_to_i64.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/extF80_to_ui64.c b/External/SoftFloat-3e/src/extF80_to_ui64.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/extF80_to_ui64.c rename to External/SoftFloat-3e/src/extF80_to_ui64.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/f128_to_extF80.c b/External/SoftFloat-3e/src/f128_to_extF80.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/f128_to_extF80.c rename to External/SoftFloat-3e/src/f128_to_extF80.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/f32_to_extF80.c b/External/SoftFloat-3e/src/f32_to_extF80.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/f32_to_extF80.c rename to External/SoftFloat-3e/src/f32_to_extF80.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/f64_to_extF80.c b/External/SoftFloat-3e/src/f64_to_extF80.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/f64_to_extF80.c rename to External/SoftFloat-3e/src/f64_to_extF80.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/i32_to_extF80.c b/External/SoftFloat-3e/src/i32_to_extF80.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/i32_to_extF80.c rename to External/SoftFloat-3e/src/i32_to_extF80.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/internals.h b/External/SoftFloat-3e/src/internals.h similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/internals.h rename to External/SoftFloat-3e/src/internals.h diff --git a/FEXCore/Source/Common/SoftFloat-3e/primitives.h b/External/SoftFloat-3e/src/primitives.h similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/primitives.h rename to External/SoftFloat-3e/src/primitives.h diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_add128.c b/External/SoftFloat-3e/src/s_add128.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_add128.c rename to External/SoftFloat-3e/src/s_add128.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_addMagsExtF80.c b/External/SoftFloat-3e/src/s_addMagsExtF80.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_addMagsExtF80.c rename to External/SoftFloat-3e/src/s_addMagsExtF80.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_approxRecip32_1.c b/External/SoftFloat-3e/src/s_approxRecip32_1.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_approxRecip32_1.c rename to External/SoftFloat-3e/src/s_approxRecip32_1.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_approxRecipSqrt32_1.c b/External/SoftFloat-3e/src/s_approxRecipSqrt32_1.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_approxRecipSqrt32_1.c rename to External/SoftFloat-3e/src/s_approxRecipSqrt32_1.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_approxRecipSqrt_1Ks.c b/External/SoftFloat-3e/src/s_approxRecipSqrt_1Ks.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_approxRecipSqrt_1Ks.c rename to External/SoftFloat-3e/src/s_approxRecipSqrt_1Ks.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_approxRecip_1Ks.c b/External/SoftFloat-3e/src/s_approxRecip_1Ks.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_approxRecip_1Ks.c rename to External/SoftFloat-3e/src/s_approxRecip_1Ks.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_commonNaNToExtF80UI.c b/External/SoftFloat-3e/src/s_commonNaNToExtF80UI.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_commonNaNToExtF80UI.c rename to External/SoftFloat-3e/src/s_commonNaNToExtF80UI.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_commonNaNToF128UI.c b/External/SoftFloat-3e/src/s_commonNaNToF128UI.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_commonNaNToF128UI.c rename to External/SoftFloat-3e/src/s_commonNaNToF128UI.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_commonNaNToF32UI.c b/External/SoftFloat-3e/src/s_commonNaNToF32UI.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_commonNaNToF32UI.c rename to External/SoftFloat-3e/src/s_commonNaNToF32UI.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_commonNaNToF64UI.c b/External/SoftFloat-3e/src/s_commonNaNToF64UI.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_commonNaNToF64UI.c rename to External/SoftFloat-3e/src/s_commonNaNToF64UI.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_countLeadingZeros32.c b/External/SoftFloat-3e/src/s_countLeadingZeros32.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_countLeadingZeros32.c rename to External/SoftFloat-3e/src/s_countLeadingZeros32.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_countLeadingZeros64.c b/External/SoftFloat-3e/src/s_countLeadingZeros64.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_countLeadingZeros64.c rename to External/SoftFloat-3e/src/s_countLeadingZeros64.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_countLeadingZeros8.c b/External/SoftFloat-3e/src/s_countLeadingZeros8.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_countLeadingZeros8.c rename to External/SoftFloat-3e/src/s_countLeadingZeros8.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_extF80UIToCommonNaN.c b/External/SoftFloat-3e/src/s_extF80UIToCommonNaN.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_extF80UIToCommonNaN.c rename to External/SoftFloat-3e/src/s_extF80UIToCommonNaN.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_f128UIToCommonNaN.c b/External/SoftFloat-3e/src/s_f128UIToCommonNaN.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_f128UIToCommonNaN.c rename to External/SoftFloat-3e/src/s_f128UIToCommonNaN.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_f32UIToCommonNaN.c b/External/SoftFloat-3e/src/s_f32UIToCommonNaN.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_f32UIToCommonNaN.c rename to External/SoftFloat-3e/src/s_f32UIToCommonNaN.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_f64UIToCommonNaN.c b/External/SoftFloat-3e/src/s_f64UIToCommonNaN.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_f64UIToCommonNaN.c rename to External/SoftFloat-3e/src/s_f64UIToCommonNaN.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_le128.c b/External/SoftFloat-3e/src/s_le128.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_le128.c rename to External/SoftFloat-3e/src/s_le128.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_lt128.c b/External/SoftFloat-3e/src/s_lt128.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_lt128.c rename to External/SoftFloat-3e/src/s_lt128.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_mul64ByShifted32To128.c b/External/SoftFloat-3e/src/s_mul64ByShifted32To128.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_mul64ByShifted32To128.c rename to External/SoftFloat-3e/src/s_mul64ByShifted32To128.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_mul64To128.c b/External/SoftFloat-3e/src/s_mul64To128.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_mul64To128.c rename to External/SoftFloat-3e/src/s_mul64To128.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_normRoundPackToExtF80.c b/External/SoftFloat-3e/src/s_normRoundPackToExtF80.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_normRoundPackToExtF80.c rename to External/SoftFloat-3e/src/s_normRoundPackToExtF80.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_normSubnormalExtF80Sig.c b/External/SoftFloat-3e/src/s_normSubnormalExtF80Sig.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_normSubnormalExtF80Sig.c rename to External/SoftFloat-3e/src/s_normSubnormalExtF80Sig.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_normSubnormalF128Sig.c b/External/SoftFloat-3e/src/s_normSubnormalF128Sig.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_normSubnormalF128Sig.c rename to External/SoftFloat-3e/src/s_normSubnormalF128Sig.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_normSubnormalF128SigM.c b/External/SoftFloat-3e/src/s_normSubnormalF128SigM.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_normSubnormalF128SigM.c rename to External/SoftFloat-3e/src/s_normSubnormalF128SigM.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_normSubnormalF32Sig.c b/External/SoftFloat-3e/src/s_normSubnormalF32Sig.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_normSubnormalF32Sig.c rename to External/SoftFloat-3e/src/s_normSubnormalF32Sig.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_normSubnormalF64Sig.c b/External/SoftFloat-3e/src/s_normSubnormalF64Sig.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_normSubnormalF64Sig.c rename to External/SoftFloat-3e/src/s_normSubnormalF64Sig.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_propagateNaNExtF80UI.c b/External/SoftFloat-3e/src/s_propagateNaNExtF80UI.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_propagateNaNExtF80UI.c rename to External/SoftFloat-3e/src/s_propagateNaNExtF80UI.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_roundPackToExtF80.c b/External/SoftFloat-3e/src/s_roundPackToExtF80.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_roundPackToExtF80.c rename to External/SoftFloat-3e/src/s_roundPackToExtF80.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_roundPackToF32.c b/External/SoftFloat-3e/src/s_roundPackToF32.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_roundPackToF32.c rename to External/SoftFloat-3e/src/s_roundPackToF32.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_roundPackToF64.c b/External/SoftFloat-3e/src/s_roundPackToF64.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_roundPackToF64.c rename to External/SoftFloat-3e/src/s_roundPackToF64.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_roundToI32.c b/External/SoftFloat-3e/src/s_roundToI32.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_roundToI32.c rename to External/SoftFloat-3e/src/s_roundToI32.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_roundToI64.c b/External/SoftFloat-3e/src/s_roundToI64.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_roundToI64.c rename to External/SoftFloat-3e/src/s_roundToI64.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_roundToUI64.c b/External/SoftFloat-3e/src/s_roundToUI64.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_roundToUI64.c rename to External/SoftFloat-3e/src/s_roundToUI64.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_shiftRightJam128.c b/External/SoftFloat-3e/src/s_shiftRightJam128.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_shiftRightJam128.c rename to External/SoftFloat-3e/src/s_shiftRightJam128.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_shiftRightJam128Extra.c b/External/SoftFloat-3e/src/s_shiftRightJam128Extra.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_shiftRightJam128Extra.c rename to External/SoftFloat-3e/src/s_shiftRightJam128Extra.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_shiftRightJam32.c b/External/SoftFloat-3e/src/s_shiftRightJam32.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_shiftRightJam32.c rename to External/SoftFloat-3e/src/s_shiftRightJam32.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_shiftRightJam64.c b/External/SoftFloat-3e/src/s_shiftRightJam64.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_shiftRightJam64.c rename to External/SoftFloat-3e/src/s_shiftRightJam64.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_shiftRightJam64Extra.c b/External/SoftFloat-3e/src/s_shiftRightJam64Extra.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_shiftRightJam64Extra.c rename to External/SoftFloat-3e/src/s_shiftRightJam64Extra.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_shortShiftLeft128.c b/External/SoftFloat-3e/src/s_shortShiftLeft128.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_shortShiftLeft128.c rename to External/SoftFloat-3e/src/s_shortShiftLeft128.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_shortShiftRight128.c b/External/SoftFloat-3e/src/s_shortShiftRight128.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_shortShiftRight128.c rename to External/SoftFloat-3e/src/s_shortShiftRight128.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_shortShiftRightJam64.c b/External/SoftFloat-3e/src/s_shortShiftRightJam64.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_shortShiftRightJam64.c rename to External/SoftFloat-3e/src/s_shortShiftRightJam64.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_shortShiftRightJam64Extra.c b/External/SoftFloat-3e/src/s_shortShiftRightJam64Extra.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_shortShiftRightJam64Extra.c rename to External/SoftFloat-3e/src/s_shortShiftRightJam64Extra.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_sub128.c b/External/SoftFloat-3e/src/s_sub128.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_sub128.c rename to External/SoftFloat-3e/src/s_sub128.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/s_subMagsExtF80.c b/External/SoftFloat-3e/src/s_subMagsExtF80.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/s_subMagsExtF80.c rename to External/SoftFloat-3e/src/s_subMagsExtF80.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/softfloat_raiseFlags.c b/External/SoftFloat-3e/src/softfloat_raiseFlags.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/softfloat_raiseFlags.c rename to External/SoftFloat-3e/src/softfloat_raiseFlags.c diff --git a/FEXCore/Source/Common/SoftFloat-3e/specialize.h b/External/SoftFloat-3e/src/specialize.h similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/specialize.h rename to External/SoftFloat-3e/src/specialize.h diff --git a/FEXCore/Source/Common/SoftFloat-3e/ui64_to_extF80.c b/External/SoftFloat-3e/src/ui64_to_extF80.c similarity index 100% rename from FEXCore/Source/Common/SoftFloat-3e/ui64_to_extF80.c rename to External/SoftFloat-3e/src/ui64_to_extF80.c diff --git a/FEXCore/Source/CMakeLists.txt b/FEXCore/Source/CMakeLists.txt index 277d80f90..9da9b4c30 100644 --- a/FEXCore/Source/CMakeLists.txt +++ b/FEXCore/Source/CMakeLists.txt @@ -18,54 +18,6 @@ endif() set (SRCS Common/JitSymbols.cpp - Common/SoftFloat-3e/extF80_add.c - Common/SoftFloat-3e/extF80_div.c - Common/SoftFloat-3e/extF80_sub.c - Common/SoftFloat-3e/extF80_mul.c - Common/SoftFloat-3e/extF80_rem.c - Common/SoftFloat-3e/extF80_sqrt.c - Common/SoftFloat-3e/extF80_to_i32.c - Common/SoftFloat-3e/extF80_to_i64.c - Common/SoftFloat-3e/extF80_to_ui64.c - Common/SoftFloat-3e/extF80_to_f32.c - Common/SoftFloat-3e/extF80_to_f64.c - Common/SoftFloat-3e/i32_to_extF80.c - Common/SoftFloat-3e/ui64_to_extF80.c - Common/SoftFloat-3e/extF80_to_f128.c - Common/SoftFloat-3e/f128_to_extF80.c - Common/SoftFloat-3e/s_roundToUI64.c - Common/SoftFloat-3e/s_f128UIToCommonNaN.c - Common/SoftFloat-3e/s_commonNaNToF128UI.c - Common/SoftFloat-3e/s_normSubnormalF128Sig.c - Common/SoftFloat-3e/s_roundToI32.c - Common/SoftFloat-3e/s_roundToI64.c - Common/SoftFloat-3e/s_roundPackToF32.c - Common/SoftFloat-3e/s_addMagsExtF80.c - Common/SoftFloat-3e/s_extF80UIToCommonNaN.c - Common/SoftFloat-3e/s_commonNaNToF32UI.c - Common/SoftFloat-3e/s_commonNaNToF64UI.c - Common/SoftFloat-3e/s_roundPackToF64.c - Common/SoftFloat-3e/s_propagateNaNExtF80UI.c - Common/SoftFloat-3e/s_roundPackToExtF80.c - Common/SoftFloat-3e/s_normSubnormalExtF80Sig.c - Common/SoftFloat-3e/s_subMagsExtF80.c - Common/SoftFloat-3e/s_shiftRightJam128.c - Common/SoftFloat-3e/s_shiftRightJam128Extra.c - Common/SoftFloat-3e/s_normRoundPackToExtF80.c - Common/SoftFloat-3e/s_approxRecip_1Ks.c - Common/SoftFloat-3e/s_approxRecipSqrt32_1.c - Common/SoftFloat-3e/s_approxRecipSqrt_1Ks.c - Common/SoftFloat-3e/softfloat_raiseFlags.c - Common/SoftFloat-3e/f64_to_extF80.c - Common/SoftFloat-3e/s_commonNaNToExtF80UI.c - Common/SoftFloat-3e/s_normSubnormalF64Sig.c - Common/SoftFloat-3e/s_f64UIToCommonNaN.c - Common/SoftFloat-3e/extF80_roundToInt.c - Common/SoftFloat-3e/extF80_eq.c - Common/SoftFloat-3e/extF80_lt.c - Common/SoftFloat-3e/f32_to_extF80.c - Common/SoftFloat-3e/s_normSubnormalF32Sig.c - Common/SoftFloat-3e/s_f32UIToCommonNaN.c Interface/Context/Context.cpp Interface/Core/LookupCache.cpp Interface/Core/Core.cpp @@ -158,10 +110,7 @@ else() list(APPEND DEFINES "-DFEXCORE_PRESERVE_ALL_ATTR=;-DFEXCORE_HAS_PRESERVE_ALL_ATTR=0") endif() -# Some defines for the softfloat library -list(APPEND DEFINES "-DSOFTFLOAT_BUILTIN_CLZ=1;-DINLINE=static inline;-DINLINE_LEVEL=4;-DSOFTFLOAT_FAST_INT64=1;-DSOFTFLOAT_FAST_DIV32TO16=1;-DSOFTFLOAT_FAST_DIV64TO32=1") - -set (LIBS fmt::fmt xxHash::xxhash FEXHeaderUtils CodeEmitter cephes_128bit) +set (LIBS fmt::fmt xxHash::xxhash FEXHeaderUtils CodeEmitter softfloat_3e cephes_128bit) if (ENABLE_VIXL_DISASSEMBLER OR ENABLE_VIXL_SIMULATOR) list (APPEND LIBS vixl)