VirtualBox

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

Last change on this file since 94678 was 94678, checked in by vboxsync, 3 years ago

libs/softfloat: Implemented a 387-style fscale function. bugref:9898

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