VirtualBox

source: vbox/trunk/src/libs/softfloat-3e/Makefile.kmk

Last change on this file was 106061, checked in by vboxsync, 3 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 11.9 KB
Line 
1# $Id: Makefile.kmk 106061 2024-09-16 14:03:52Z vboxsync $
2## @file
3# Sub-Makefile for SoftFloat-3e.
4#
5
6#
7# Copyright (C) 2022-2024 Oracle and/or its affiliates.
8#
9# This file is part of VirtualBox base platform packages, as
10# available from https://www.virtualbox.org.
11#
12# This program is free software; you can redistribute it and/or
13# modify it under the terms of the GNU General Public License
14# as published by the Free Software Foundation, in version 3 of the
15# License.
16#
17# This program is distributed in the hope that it will be useful, but
18# WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20# General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, see <https://www.gnu.org/licenses>.
24#
25# SPDX-License-Identifier: GPL-3.0-only
26#
27
28SUB_DEPTH = ../../..
29include $(KBUILD_PATH)/subheader.kmk
30
31VBOX_SOFTFLOAT_SPECIALIZATION := 8086
32
33ifndef defined(VBOX_ONLY_ADDITIONS)
34 LIBRARIES += VBox-SoftFloat
35endif
36VBox-SoftFloat_TEMPLATE := VBoxR3DllNonPedantic
37VBox-SoftFloat_DEFS := \
38 INLINE_LEVEL=5
39VBox-SoftFloat_INCS := \
40 build/vbox \
41 source/$(VBOX_SOFTFLOAT_SPECIALIZATION) \
42 source/include
43
44# -wd4146: primitives.h(74): warning C4146: unary minus operator applied to unsigned type, result still unsigned
45VBox-SoftFloat_CFLAGS.win := -wd4146
46
47# Primitives:
48VBox-SoftFloat_SOURCES := \
49 source/s_eq128.c \
50 source/s_le128.c \
51 source/s_lt128.c \
52 source/s_shortShiftLeft128.c \
53 source/s_shortShiftRight128.c \
54 source/s_shortShiftRightJam64.c \
55 source/s_shortShiftRightJam64Extra.c \
56 source/s_shortShiftRightJam128.c \
57 source/s_shortShiftRightJam128Extra.c \
58 source/s_shiftRightJam32.c \
59 source/s_shiftRightJam64.c \
60 source/s_shiftRightJam64Extra.c \
61 source/s_shiftRightJam128.c \
62 source/s_shiftRightJam128Extra.c \
63 source/s_shiftRightJam256M.c \
64 source/s_countLeadingZeros8.c \
65 source/s_countLeadingZeros16.c \
66 source/s_countLeadingZeros32.c \
67 source/s_countLeadingZeros64.c \
68 source/s_add128.c \
69 source/s_add256M.c \
70 source/s_sub128.c \
71 source/s_sub256M.c \
72 source/s_mul64ByShifted32To128.c \
73 source/s_mul64To128.c \
74 source/s_mul128By32.c \
75 source/s_mul128To256M.c \
76 source/s_approxRecip_1Ks.c \
77 source/s_approxRecip32_1.c \
78 source/s_approxRecipSqrt_1Ks.c \
79 source/s_approxRecipSqrt32_1.c
80
81# Specialization (target FPU behaviour):
82# @todo maybe use 8086-SSE here...
83VBox-SoftFloat_SOURCES += \
84 source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/softfloat_raiseFlags.c \
85 source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_f16UIToCommonNaN.c \
86 source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_commonNaNToF16UI.c \
87 source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_propagateNaNF16UI.c \
88 source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_f32UIToCommonNaN.c \
89 source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_commonNaNToF32UI.c \
90 source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_propagateNaNF32UI.c \
91 source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_f64UIToCommonNaN.c \
92 source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_commonNaNToF64UI.c \
93 source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_propagateNaNF64UI.c \
94 source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/extF80M_isSignalingNaN.c \
95 source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_extF80UIToCommonNaN.c \
96 source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_commonNaNToExtF80UI.c \
97 source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_propagateNaNExtF80UI.c \
98 source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/f128M_isSignalingNaN.c \
99 source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_f128UIToCommonNaN.c \
100 source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_commonNaNToF128UI.c \
101 source/$(VBOX_SOFTFLOAT_SPECIALIZATION)/s_propagateNaNF128UI.c
102
103# Others:
104VBox-SoftFloat_SOURCES += \
105 source/s_roundToUI32.c \
106 source/s_roundToUI64.c \
107 source/s_roundToI32.c \
108 source/s_roundToI64.c \
109 source/s_normSubnormalF16Sig.c \
110 source/s_roundPackToF16.c \
111 source/s_normRoundPackToF16.c \
112 source/s_addMagsF16.c \
113 source/s_subMagsF16.c \
114 source/s_mulAddF16.c \
115 source/s_normSubnormalF32Sig.c \
116 source/s_roundPackToF32.c \
117 source/s_normRoundPackToF32.c \
118 source/s_addMagsF32.c \
119 source/s_subMagsF32.c \
120 source/s_mulAddF32.c \
121 source/s_normSubnormalF64Sig.c \
122 source/s_roundPackToF64.c \
123 source/s_normRoundPackToF64.c \
124 source/s_addMagsF64.c \
125 source/s_subMagsF64.c \
126 source/s_mulAddF64.c \
127 source/s_normSubnormalExtF80Sig.c \
128 source/s_roundPackToExtF80.c \
129 source/s_normRoundPackToExtF80.c \
130 source/s_addMagsExtF80.c \
131 source/s_subMagsExtF80.c \
132 source/s_normSubnormalF128Sig.c \
133 source/s_roundPackToF128.c \
134 source/s_normRoundPackToF128.c \
135 source/s_addMagsF128.c \
136 source/s_subMagsF128.c \
137 source/s_mulAddF128.c \
138 source/softfloat_state.c \
139 source/ui32_to_f16.c \
140 source/ui32_to_f32.c \
141 source/ui32_to_f64.c \
142 source/ui32_to_extF80.c \
143 source/ui32_to_extF80M.c \
144 source/ui32_to_f128.c \
145 source/ui32_to_f128M.c \
146 source/ui64_to_f16.c \
147 source/ui64_to_f32.c \
148 source/ui64_to_f64.c \
149 source/ui64_to_extF80.c \
150 source/ui64_to_extF80M.c \
151 source/ui64_to_f128.c \
152 source/ui64_to_f128M.c \
153 source/i32_to_f16.c \
154 source/i32_to_f32.c \
155 source/i32_to_f64.c \
156 source/i32_to_extF80.c \
157 source/i32_to_extF80M.c \
158 source/i32_to_f128.c \
159 source/i32_to_f128M.c \
160 source/i64_to_f16.c \
161 source/i64_to_f32.c \
162 source/i64_to_f64.c \
163 source/i64_to_extF80.c \
164 source/i64_to_extF80M.c \
165 source/i64_to_f128.c \
166 source/i64_to_f128M.c \
167 source/f16_to_ui32.c \
168 source/f16_to_ui64.c \
169 source/f16_to_i32.c \
170 source/f16_to_i64.c \
171 source/f16_to_ui32_r_minMag.c \
172 source/f16_to_ui64_r_minMag.c \
173 source/f16_to_i32_r_minMag.c \
174 source/f16_to_i64_r_minMag.c \
175 source/f16_to_f32.c \
176 source/f16_to_f64.c \
177 source/f16_to_extF80.c \
178 source/f16_to_extF80M.c \
179 source/f16_to_f128.c \
180 source/f16_to_f128M.c \
181 source/f16_roundToInt.c \
182 source/f16_add.c \
183 source/f16_sub.c \
184 source/f16_mul.c \
185 source/f16_mulAdd.c \
186 source/f16_div.c \
187 source/f16_rem.c \
188 source/f16_sqrt.c \
189 source/f16_eq.c \
190 source/f16_le.c \
191 source/f16_lt.c \
192 source/f16_eq_signaling.c \
193 source/f16_le_quiet.c \
194 source/f16_lt_quiet.c \
195 source/f16_isSignalingNaN.c \
196 source/f32_to_ui32.c \
197 source/f32_to_ui64.c \
198 source/f32_to_i32.c \
199 source/f32_to_i64.c \
200 source/f32_to_ui32_r_minMag.c \
201 source/f32_to_ui64_r_minMag.c \
202 source/f32_to_i32_r_minMag.c \
203 source/f32_to_i64_r_minMag.c \
204 source/f32_to_f16.c \
205 source/f32_to_f64.c \
206 source/f32_to_extF80.c \
207 source/f32_to_extF80M.c \
208 source/f32_to_f128.c \
209 source/f32_to_f128M.c \
210 source/f32_roundToInt.c \
211 source/f32_add.c \
212 source/f32_sub.c \
213 source/f32_mul.c \
214 source/f32_mulAdd.c \
215 source/f32_div.c \
216 source/f32_rem.c \
217 source/f32_sqrt.c \
218 source/f32_eq.c \
219 source/f32_le.c \
220 source/f32_lt.c \
221 source/f32_eq_signaling.c \
222 source/f32_le_quiet.c \
223 source/f32_lt_quiet.c \
224 source/f32_isSignalingNaN.c \
225 source/f64_to_ui32.c \
226 source/f64_to_ui64.c \
227 source/f64_to_i32.c \
228 source/f64_to_i64.c \
229 source/f64_to_ui32_r_minMag.c \
230 source/f64_to_ui64_r_minMag.c \
231 source/f64_to_i32_r_minMag.c \
232 source/f64_to_i64_r_minMag.c \
233 source/f64_to_f16.c \
234 source/f64_to_f32.c \
235 source/f64_to_extF80.c \
236 source/f64_to_extF80M.c \
237 source/f64_to_f128.c \
238 source/f64_to_f128M.c \
239 source/f64_roundToInt.c \
240 source/f64_add.c \
241 source/f64_sub.c \
242 source/f64_mul.c \
243 source/f64_mulAdd.c \
244 source/f64_div.c \
245 source/f64_rem.c \
246 source/f64_sqrt.c \
247 source/f64_eq.c \
248 source/f64_le.c \
249 source/f64_lt.c \
250 source/f64_eq_signaling.c \
251 source/f64_le_quiet.c \
252 source/f64_lt_quiet.c \
253 source/f64_isSignalingNaN.c \
254 source/extF80_to_ui32.c \
255 source/extF80_to_ui64.c \
256 source/extF80_to_i32.c \
257 source/extF80_to_i64.c \
258 source/extF80_to_ui32_r_minMag.c \
259 source/extF80_to_ui64_r_minMag.c \
260 source/extF80_to_i32_r_minMag.c \
261 source/extF80_to_i64_r_minMag.c \
262 source/extF80_to_f16.c \
263 source/extF80_to_f32.c \
264 source/extF80_to_f64.c \
265 source/extF80_to_f128.c \
266 source/extF80_roundToInt.c \
267 source/extF80_add.c \
268 source/extF80_sub.c \
269 source/extF80_mul.c \
270 source/extF80_div.c \
271 source/extF80_rem.c \
272 source/extF80_partialRem.c \
273 source/extF80_sincos.c \
274 source/extF80_log2.c \
275 source/extF80_tan.c \
276 source/extF80_sqrt.c \
277 source/extF80_scale_extF80.c \
278 source/extF80_eq.c \
279 source/extF80_le.c \
280 source/extF80_lt.c \
281 source/extF80_eq_signaling.c \
282 source/extF80_le_quiet.c \
283 source/extF80_lt_quiet.c \
284 source/extF80_isSignalingNaN.c \
285 source/extF80M_to_ui32.c \
286 source/extF80M_to_ui64.c \
287 source/extF80M_to_i32.c \
288 source/extF80M_to_i64.c \
289 source/extF80M_to_ui32_r_minMag.c \
290 source/extF80M_to_ui64_r_minMag.c \
291 source/extF80M_to_i32_r_minMag.c \
292 source/extF80M_to_i64_r_minMag.c \
293 source/extF80M_to_f16.c \
294 source/extF80M_to_f32.c \
295 source/extF80M_to_f64.c \
296 source/extF80M_to_f128M.c \
297 source/extF80M_roundToInt.c \
298 source/extF80M_add.c \
299 source/extF80M_sub.c \
300 source/extF80M_mul.c \
301 source/extF80M_div.c \
302 source/extF80M_rem.c \
303 source/extF80M_sqrt.c \
304 source/extF80M_eq.c \
305 source/extF80M_le.c \
306 source/extF80M_lt.c \
307 source/extF80M_eq_signaling.c \
308 source/extF80M_le_quiet.c \
309 source/extF80M_lt_quiet.c \
310 source/f128_to_ui32.c \
311 source/f128_to_ui64.c \
312 source/f128_to_i32.c \
313 source/f128_to_i64.c \
314 source/f128_to_ui32_r_minMag.c \
315 source/f128_to_ui64_r_minMag.c \
316 source/f128_to_i32_r_minMag.c \
317 source/f128_to_i64_r_minMag.c \
318 source/f128_to_f16.c \
319 source/f128_to_f32.c \
320 source/f128_to_extF80.c \
321 source/f128_to_f64.c \
322 source/f128_roundToInt.c \
323 source/f128_add.c \
324 source/f128_sub.c \
325 source/f128_mul.c \
326 source/f128_mulAdd.c \
327 source/f128_div.c \
328 source/f128_rem.c \
329 source/f128_sqrt.c \
330 source/f128_eq.c \
331 source/f128_le.c \
332 source/f128_lt.c \
333 source/f128_eq_signaling.c \
334 source/f128_le_quiet.c \
335 source/f128_lt_quiet.c \
336 source/f128_isSignalingNaN.c \
337 source/f128M_to_ui32.c \
338 source/f128M_to_ui64.c \
339 source/f128M_to_i32.c \
340 source/f128M_to_i64.c \
341 source/f128M_to_ui32_r_minMag.c \
342 source/f128M_to_ui64_r_minMag.c \
343 source/f128M_to_i32_r_minMag.c \
344 source/f128M_to_i64_r_minMag.c \
345 source/f128M_to_f16.c \
346 source/f128M_to_f32.c \
347 source/f128M_to_extF80M.c \
348 source/f128M_to_f64.c \
349 source/f128M_roundToInt.c \
350 source/f128M_add.c \
351 source/f128M_sub.c \
352 source/f128M_mul.c \
353 source/f128M_mulAdd.c \
354 source/f128M_div.c \
355 source/f128M_rem.c \
356 source/f128M_sqrt.c \
357 source/f128M_eq.c \
358 source/f128M_le.c \
359 source/f128M_lt.c \
360 source/f128M_eq_signaling.c \
361 source/f128M_le_quiet.c \
362 source/f128M_lt_quiet.c
363
364#
365# Ring-0 version of the above (has different compiler settings).
366#
367if defined(VBOX_WITH_R0_MODULES) && !defined(VBOX_ONLY_EXTPACKS) && !defined(VBOX_ONLY_ADDITIONS)
368 LIBRARIES += VBox-SoftFloatR0
369endif
370VBox-SoftFloatR0_EXTENDS := VBox-SoftFloat
371VBox-SoftFloatR0_TEMPLATE := VBoxR0
372VBox-SoftFloatR0_DEFS = $(NO_SUCH_VARIABLE)
373
374# -wd4245: f128_sqrt.c(184): warning C4245: '=': conversion from 'int' to 'uint_fast64_t', signed/unsigned mismatch
375# -wd4389: f64_to_i64_r_minMag.c(93): warning C4389: '!=': signed/unsigned mismatch
376VBox-SoftFloatR0_CFLAGS.win := $(VBox-SoftFloat_CFLAGS.win) -wd4245 -wd4389
377ifn1of ($(KBUILD_TARGET), win)
378 VBox-SoftFloatR0_CFLAGS := $(VBox-SoftFloat_CFLAGS) -Wno-sign-compare
379endif
380
381
382ifdef VBOX_WITH_NOCRT_STATIC
383 #
384 # Static No-CRT version of the above for use with VBoxGL.dll in the GAs.
385 #
386 LIBRARIES.win += VBox-SoftFloatGuestR3Shared
387 VBox-SoftFloatGuestR3Shared_TEMPLATE := NewerVccVBoxGuestR3Dll
388 VBox-SoftFloatGuestR3Shared_EXTENDS := VBox-SoftFloat
389 VBox-SoftFloatGuestR3Shared_INST = $(INST_ADDITIONS_LIB)
390
391 # -wd4389: f64_to_i64_r_minMag.c(93): warning C4389: '!=': signed/unsigned mismatch
392 VBox-SoftFloatGuestR3Shared_CFLAGS.win := $(VBox-SoftFloat_CFLAGS.win) -wd4245 -wd4389
393 ifn1of ($(KBUILD_TARGET), win)
394 VBox-SoftFloatGuestR3Shared_CFLAGS := $(VBox-SoftFloat_CFLAGS) -Wno-sign-compare
395 endif
396
397 #
398 # And a x86 version of that again for amd64 targets.
399 #
400 LIBRARIES.win.amd64 += VBox-SoftFloatGuestR3Shared-x86
401 VBox-SoftFloatGuestR3Shared-x86_TEMPLATE := NewerVccVBoxGuestR3Dll
402 VBox-SoftFloatGuestR3Shared-x86_EXTENDS := VBox-SoftFloatGuestR3Shared
403 VBox-SoftFloatGuestR3Shared-x86_BLD_TRG_ARCH := x86
404endif # VBOX_WITH_NOCRT_STATIC
405
406
407include $(FILE_KBUILD_SUB_FOOTER)
408
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette