summaryrefslogtreecommitdiffstats
path: root/src/libs/softfloat-3e/Makefile.kmk
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:49:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:49:04 +0000
commit16f504a9dca3fe3b70568f67b7d41241ae485288 (patch)
treec60f36ada0496ba928b7161059ba5ab1ab224f9d /src/libs/softfloat-3e/Makefile.kmk
parentInitial commit. (diff)
downloadvirtualbox-16f504a9dca3fe3b70568f67b7d41241ae485288.tar.xz
virtualbox-16f504a9dca3fe3b70568f67b7d41241ae485288.zip
Adding upstream version 7.0.6-dfsg.upstream/7.0.6-dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/libs/softfloat-3e/Makefile.kmk')
-rw-r--r--src/libs/softfloat-3e/Makefile.kmk408
1 files changed, 408 insertions, 0 deletions
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)
+