d2dfe0b506
Unlike other subprojects, these require an overlay directory to include meson rules to build the libraries. The rules are basically lifted from tests/fp/meson.build, with a few changes to create platform.h and publish a dependency. The build defines are passed through a subproject option, and posted back to users of the library via the dependency's compile_args. The only remaining user of GIT_SUBMODULES and GIT_SUBMODULES_ACTION is roms/SLOF, which is used to build pc-bios/s390-ccw. All other roms submodules are only present to satisfy the license on pre-built firmware blobs. Best reviewed with --color-moved. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
340 lines
10 KiB
Meson
340 lines
10 KiB
Meson
project('berkeley-softfloat-3', 'c',
|
|
default_options: ['warning_level=1', 'c_std=gnu99'])
|
|
|
|
fpcflags = get_option('defines')
|
|
|
|
platform_data = configuration_data()
|
|
platform_data.set('INLINE', 'static inline')
|
|
platform_data.set('LITTLEENDIAN', host_machine.endian() == 'little')
|
|
configure_file(output: 'platform.h', configuration: platform_data)
|
|
|
|
sfdir = 'source'
|
|
sfspedir = sfdir / '8086-SSE'
|
|
sfinc = include_directories('.', sfdir / 'include', sfspedir)
|
|
|
|
add_project_arguments([
|
|
'-Wno-implicit-fallthrough',
|
|
'-Wno-missing-prototypes',
|
|
'-Wno-redundant-decls',
|
|
'-Wno-return-type',
|
|
'-Wno-error',
|
|
], native: false, language: 'c')
|
|
|
|
libsoftfloat = static_library(
|
|
'softfloat',
|
|
files(
|
|
# primitives
|
|
sfdir / 's_eq128.c',
|
|
sfdir / 's_le128.c',
|
|
sfdir / 's_lt128.c',
|
|
sfdir / 's_shortShiftLeft128.c',
|
|
sfdir / 's_shortShiftRight128.c',
|
|
sfdir / 's_shortShiftRightJam64.c',
|
|
sfdir / 's_shortShiftRightJam64Extra.c',
|
|
sfdir / 's_shortShiftRightJam128.c',
|
|
sfdir / 's_shortShiftRightJam128Extra.c',
|
|
sfdir / 's_shiftRightJam32.c',
|
|
sfdir / 's_shiftRightJam64.c',
|
|
sfdir / 's_shiftRightJam64Extra.c',
|
|
sfdir / 's_shiftRightJam128.c',
|
|
sfdir / 's_shiftRightJam128Extra.c',
|
|
sfdir / 's_shiftRightJam256M.c',
|
|
sfdir / 's_countLeadingZeros8.c',
|
|
sfdir / 's_countLeadingZeros16.c',
|
|
sfdir / 's_countLeadingZeros32.c',
|
|
sfdir / 's_countLeadingZeros64.c',
|
|
sfdir / 's_add128.c',
|
|
sfdir / 's_add256M.c',
|
|
sfdir / 's_sub128.c',
|
|
sfdir / 's_sub256M.c',
|
|
sfdir / 's_mul64ByShifted32To128.c',
|
|
sfdir / 's_mul64To128.c',
|
|
sfdir / 's_mul128By32.c',
|
|
sfdir / 's_mul128To256M.c',
|
|
sfdir / 's_approxRecip_1Ks.c',
|
|
sfdir / 's_approxRecip32_1.c',
|
|
sfdir / 's_approxRecipSqrt_1Ks.c',
|
|
sfdir / 's_approxRecipSqrt32_1.c',
|
|
# others
|
|
sfdir / 's_roundToUI32.c',
|
|
sfdir / 's_roundToUI64.c',
|
|
sfdir / 's_roundToI32.c',
|
|
sfdir / 's_roundToI64.c',
|
|
sfdir / 's_normSubnormalF16Sig.c',
|
|
sfdir / 's_roundPackToF16.c',
|
|
sfdir / 's_normRoundPackToF16.c',
|
|
sfdir / 's_addMagsF16.c',
|
|
sfdir / 's_subMagsF16.c',
|
|
sfdir / 's_mulAddF16.c',
|
|
sfdir / 's_normSubnormalF32Sig.c',
|
|
sfdir / 's_roundPackToF32.c',
|
|
sfdir / 's_normRoundPackToF32.c',
|
|
sfdir / 's_addMagsF32.c',
|
|
sfdir / 's_subMagsF32.c',
|
|
sfdir / 's_mulAddF32.c',
|
|
sfdir / 's_normSubnormalF64Sig.c',
|
|
sfdir / 's_roundPackToF64.c',
|
|
sfdir / 's_normRoundPackToF64.c',
|
|
sfdir / 's_addMagsF64.c',
|
|
sfdir / 's_subMagsF64.c',
|
|
sfdir / 's_mulAddF64.c',
|
|
sfdir / 's_normSubnormalExtF80Sig.c',
|
|
sfdir / 's_roundPackToExtF80.c',
|
|
sfdir / 's_normRoundPackToExtF80.c',
|
|
sfdir / 's_addMagsExtF80.c',
|
|
sfdir / 's_subMagsExtF80.c',
|
|
sfdir / 's_normSubnormalF128Sig.c',
|
|
sfdir / 's_roundPackToF128.c',
|
|
sfdir / 's_normRoundPackToF128.c',
|
|
sfdir / 's_addMagsF128.c',
|
|
sfdir / 's_subMagsF128.c',
|
|
sfdir / 's_mulAddF128.c',
|
|
sfdir / 'softfloat_state.c',
|
|
sfdir / 'ui32_to_f16.c',
|
|
sfdir / 'ui32_to_f32.c',
|
|
sfdir / 'ui32_to_f64.c',
|
|
sfdir / 'ui32_to_extF80.c',
|
|
sfdir / 'ui32_to_extF80M.c',
|
|
sfdir / 'ui32_to_f128.c',
|
|
sfdir / 'ui32_to_f128M.c',
|
|
sfdir / 'ui64_to_f16.c',
|
|
sfdir / 'ui64_to_f32.c',
|
|
sfdir / 'ui64_to_f64.c',
|
|
sfdir / 'ui64_to_extF80.c',
|
|
sfdir / 'ui64_to_extF80M.c',
|
|
sfdir / 'ui64_to_f128.c',
|
|
sfdir / 'ui64_to_f128M.c',
|
|
sfdir / 'i32_to_f16.c',
|
|
sfdir / 'i32_to_f32.c',
|
|
sfdir / 'i32_to_f64.c',
|
|
sfdir / 'i32_to_extF80.c',
|
|
sfdir / 'i32_to_extF80M.c',
|
|
sfdir / 'i32_to_f128.c',
|
|
sfdir / 'i32_to_f128M.c',
|
|
sfdir / 'i64_to_f16.c',
|
|
sfdir / 'i64_to_f32.c',
|
|
sfdir / 'i64_to_f64.c',
|
|
sfdir / 'i64_to_extF80.c',
|
|
sfdir / 'i64_to_extF80M.c',
|
|
sfdir / 'i64_to_f128.c',
|
|
sfdir / 'i64_to_f128M.c',
|
|
sfdir / 'f16_to_ui32.c',
|
|
sfdir / 'f16_to_ui64.c',
|
|
sfdir / 'f16_to_i32.c',
|
|
sfdir / 'f16_to_i64.c',
|
|
sfdir / 'f16_to_ui32_r_minMag.c',
|
|
sfdir / 'f16_to_ui64_r_minMag.c',
|
|
sfdir / 'f16_to_i32_r_minMag.c',
|
|
sfdir / 'f16_to_i64_r_minMag.c',
|
|
sfdir / 'f16_to_f32.c',
|
|
sfdir / 'f16_to_f64.c',
|
|
sfdir / 'f16_to_extF80.c',
|
|
sfdir / 'f16_to_extF80M.c',
|
|
sfdir / 'f16_to_f128.c',
|
|
sfdir / 'f16_to_f128M.c',
|
|
sfdir / 'f16_roundToInt.c',
|
|
sfdir / 'f16_add.c',
|
|
sfdir / 'f16_sub.c',
|
|
sfdir / 'f16_mul.c',
|
|
sfdir / 'f16_mulAdd.c',
|
|
sfdir / 'f16_div.c',
|
|
sfdir / 'f16_rem.c',
|
|
sfdir / 'f16_sqrt.c',
|
|
sfdir / 'f16_eq.c',
|
|
sfdir / 'f16_le.c',
|
|
sfdir / 'f16_lt.c',
|
|
sfdir / 'f16_eq_signaling.c',
|
|
sfdir / 'f16_le_quiet.c',
|
|
sfdir / 'f16_lt_quiet.c',
|
|
sfdir / 'f16_isSignalingNaN.c',
|
|
sfdir / 'f32_to_ui32.c',
|
|
sfdir / 'f32_to_ui64.c',
|
|
sfdir / 'f32_to_i32.c',
|
|
sfdir / 'f32_to_i64.c',
|
|
sfdir / 'f32_to_ui32_r_minMag.c',
|
|
sfdir / 'f32_to_ui64_r_minMag.c',
|
|
sfdir / 'f32_to_i32_r_minMag.c',
|
|
sfdir / 'f32_to_i64_r_minMag.c',
|
|
sfdir / 'f32_to_f16.c',
|
|
sfdir / 'f32_to_f64.c',
|
|
sfdir / 'f32_to_extF80.c',
|
|
sfdir / 'f32_to_extF80M.c',
|
|
sfdir / 'f32_to_f128.c',
|
|
sfdir / 'f32_to_f128M.c',
|
|
sfdir / 'f32_roundToInt.c',
|
|
sfdir / 'f32_add.c',
|
|
sfdir / 'f32_sub.c',
|
|
sfdir / 'f32_mul.c',
|
|
sfdir / 'f32_mulAdd.c',
|
|
sfdir / 'f32_div.c',
|
|
sfdir / 'f32_rem.c',
|
|
sfdir / 'f32_sqrt.c',
|
|
sfdir / 'f32_eq.c',
|
|
sfdir / 'f32_le.c',
|
|
sfdir / 'f32_lt.c',
|
|
sfdir / 'f32_eq_signaling.c',
|
|
sfdir / 'f32_le_quiet.c',
|
|
sfdir / 'f32_lt_quiet.c',
|
|
sfdir / 'f32_isSignalingNaN.c',
|
|
sfdir / 'f64_to_ui32.c',
|
|
sfdir / 'f64_to_ui64.c',
|
|
sfdir / 'f64_to_i32.c',
|
|
sfdir / 'f64_to_i64.c',
|
|
sfdir / 'f64_to_ui32_r_minMag.c',
|
|
sfdir / 'f64_to_ui64_r_minMag.c',
|
|
sfdir / 'f64_to_i32_r_minMag.c',
|
|
sfdir / 'f64_to_i64_r_minMag.c',
|
|
sfdir / 'f64_to_f16.c',
|
|
sfdir / 'f64_to_f32.c',
|
|
sfdir / 'f64_to_extF80.c',
|
|
sfdir / 'f64_to_extF80M.c',
|
|
sfdir / 'f64_to_f128.c',
|
|
sfdir / 'f64_to_f128M.c',
|
|
sfdir / 'f64_roundToInt.c',
|
|
sfdir / 'f64_add.c',
|
|
sfdir / 'f64_sub.c',
|
|
sfdir / 'f64_mul.c',
|
|
sfdir / 'f64_mulAdd.c',
|
|
sfdir / 'f64_div.c',
|
|
sfdir / 'f64_rem.c',
|
|
sfdir / 'f64_sqrt.c',
|
|
sfdir / 'f64_eq.c',
|
|
sfdir / 'f64_le.c',
|
|
sfdir / 'f64_lt.c',
|
|
sfdir / 'f64_eq_signaling.c',
|
|
sfdir / 'f64_le_quiet.c',
|
|
sfdir / 'f64_lt_quiet.c',
|
|
sfdir / 'f64_isSignalingNaN.c',
|
|
sfdir / 'extF80_to_ui32.c',
|
|
sfdir / 'extF80_to_ui64.c',
|
|
sfdir / 'extF80_to_i32.c',
|
|
sfdir / 'extF80_to_i64.c',
|
|
sfdir / 'extF80_to_ui32_r_minMag.c',
|
|
sfdir / 'extF80_to_ui64_r_minMag.c',
|
|
sfdir / 'extF80_to_i32_r_minMag.c',
|
|
sfdir / 'extF80_to_i64_r_minMag.c',
|
|
sfdir / 'extF80_to_f16.c',
|
|
sfdir / 'extF80_to_f32.c',
|
|
sfdir / 'extF80_to_f64.c',
|
|
sfdir / 'extF80_to_f128.c',
|
|
sfdir / 'extF80_roundToInt.c',
|
|
sfdir / 'extF80_add.c',
|
|
sfdir / 'extF80_sub.c',
|
|
sfdir / 'extF80_mul.c',
|
|
sfdir / 'extF80_div.c',
|
|
sfdir / 'extF80_rem.c',
|
|
sfdir / 'extF80_sqrt.c',
|
|
sfdir / 'extF80_eq.c',
|
|
sfdir / 'extF80_le.c',
|
|
sfdir / 'extF80_lt.c',
|
|
sfdir / 'extF80_eq_signaling.c',
|
|
sfdir / 'extF80_le_quiet.c',
|
|
sfdir / 'extF80_lt_quiet.c',
|
|
sfdir / 'extF80_isSignalingNaN.c',
|
|
sfdir / 'extF80M_to_ui32.c',
|
|
sfdir / 'extF80M_to_ui64.c',
|
|
sfdir / 'extF80M_to_i32.c',
|
|
sfdir / 'extF80M_to_i64.c',
|
|
sfdir / 'extF80M_to_ui32_r_minMag.c',
|
|
sfdir / 'extF80M_to_ui64_r_minMag.c',
|
|
sfdir / 'extF80M_to_i32_r_minMag.c',
|
|
sfdir / 'extF80M_to_i64_r_minMag.c',
|
|
sfdir / 'extF80M_to_f16.c',
|
|
sfdir / 'extF80M_to_f32.c',
|
|
sfdir / 'extF80M_to_f64.c',
|
|
sfdir / 'extF80M_to_f128M.c',
|
|
sfdir / 'extF80M_roundToInt.c',
|
|
sfdir / 'extF80M_add.c',
|
|
sfdir / 'extF80M_sub.c',
|
|
sfdir / 'extF80M_mul.c',
|
|
sfdir / 'extF80M_div.c',
|
|
sfdir / 'extF80M_rem.c',
|
|
sfdir / 'extF80M_sqrt.c',
|
|
sfdir / 'extF80M_eq.c',
|
|
sfdir / 'extF80M_le.c',
|
|
sfdir / 'extF80M_lt.c',
|
|
sfdir / 'extF80M_eq_signaling.c',
|
|
sfdir / 'extF80M_le_quiet.c',
|
|
sfdir / 'extF80M_lt_quiet.c',
|
|
sfdir / 'f128_to_ui32.c',
|
|
sfdir / 'f128_to_ui64.c',
|
|
sfdir / 'f128_to_i32.c',
|
|
sfdir / 'f128_to_i64.c',
|
|
sfdir / 'f128_to_ui32_r_minMag.c',
|
|
sfdir / 'f128_to_ui64_r_minMag.c',
|
|
sfdir / 'f128_to_i32_r_minMag.c',
|
|
sfdir / 'f128_to_i64_r_minMag.c',
|
|
sfdir / 'f128_to_f16.c',
|
|
sfdir / 'f128_to_f32.c',
|
|
sfdir / 'f128_to_extF80.c',
|
|
sfdir / 'f128_to_f64.c',
|
|
sfdir / 'f128_roundToInt.c',
|
|
sfdir / 'f128_add.c',
|
|
sfdir / 'f128_sub.c',
|
|
sfdir / 'f128_mul.c',
|
|
sfdir / 'f128_mulAdd.c',
|
|
sfdir / 'f128_div.c',
|
|
sfdir / 'f128_rem.c',
|
|
sfdir / 'f128_sqrt.c',
|
|
sfdir / 'f128_eq.c',
|
|
sfdir / 'f128_le.c',
|
|
sfdir / 'f128_lt.c',
|
|
sfdir / 'f128_eq_signaling.c',
|
|
sfdir / 'f128_le_quiet.c',
|
|
sfdir / 'f128_lt_quiet.c',
|
|
sfdir / 'f128_isSignalingNaN.c',
|
|
sfdir / 'f128M_to_ui32.c',
|
|
sfdir / 'f128M_to_ui64.c',
|
|
sfdir / 'f128M_to_i32.c',
|
|
sfdir / 'f128M_to_i64.c',
|
|
sfdir / 'f128M_to_ui32_r_minMag.c',
|
|
sfdir / 'f128M_to_ui64_r_minMag.c',
|
|
sfdir / 'f128M_to_i32_r_minMag.c',
|
|
sfdir / 'f128M_to_i64_r_minMag.c',
|
|
sfdir / 'f128M_to_f16.c',
|
|
sfdir / 'f128M_to_f32.c',
|
|
sfdir / 'f128M_to_extF80M.c',
|
|
sfdir / 'f128M_to_f64.c',
|
|
sfdir / 'f128M_roundToInt.c',
|
|
sfdir / 'f128M_add.c',
|
|
sfdir / 'f128M_sub.c',
|
|
sfdir / 'f128M_mul.c',
|
|
sfdir / 'f128M_mulAdd.c',
|
|
sfdir / 'f128M_div.c',
|
|
sfdir / 'f128M_rem.c',
|
|
sfdir / 'f128M_sqrt.c',
|
|
sfdir / 'f128M_eq.c',
|
|
sfdir / 'f128M_le.c',
|
|
sfdir / 'f128M_lt.c',
|
|
sfdir / 'f128M_eq_signaling.c',
|
|
sfdir / 'f128M_le_quiet.c',
|
|
sfdir / 'f128M_lt_quiet.c',
|
|
# spe
|
|
sfspedir / 'softfloat_raiseFlags.c',
|
|
sfspedir / 's_f16UIToCommonNaN.c',
|
|
sfspedir / 's_commonNaNToF16UI.c',
|
|
sfspedir / 's_propagateNaNF16UI.c',
|
|
sfspedir / 's_f32UIToCommonNaN.c',
|
|
sfspedir / 's_commonNaNToF32UI.c',
|
|
sfspedir / 's_propagateNaNF32UI.c',
|
|
sfspedir / 's_f64UIToCommonNaN.c',
|
|
sfspedir / 's_commonNaNToF64UI.c',
|
|
sfspedir / 's_propagateNaNF64UI.c',
|
|
sfspedir / 'extF80M_isSignalingNaN.c',
|
|
sfspedir / 's_extF80UIToCommonNaN.c',
|
|
sfspedir / 's_commonNaNToExtF80UI.c',
|
|
sfspedir / 's_propagateNaNExtF80UI.c',
|
|
sfspedir / 'f128M_isSignalingNaN.c',
|
|
sfspedir / 's_f128UIToCommonNaN.c',
|
|
sfspedir / 's_commonNaNToF128UI.c',
|
|
sfspedir / 's_propagateNaNF128UI.c',
|
|
),
|
|
include_directories: sfinc,
|
|
c_args: fpcflags,
|
|
)
|
|
|
|
libsoftfloat_dep = declare_dependency(
|
|
link_with: libsoftfloat,
|
|
include_directories: sfinc,
|
|
compile_args: fpcflags)
|