qapi/error: Check format string argument in error_*prepend()
[qemu/armbru.git] / tests / fp / Makefile
blob56768ecfd2ffbb03598a0104b2f5ad3a04d2b55b
1 BUILD_DIR := $(CURDIR)/../..
3 include $(BUILD_DIR)/config-host.mak
4 include $(SRC_PATH)/rules.mak
6 SOFTFLOAT_DIR := $(SRC_PATH)/tests/fp/berkeley-softfloat-3
7 TESTFLOAT_DIR := $(SRC_PATH)/tests/fp/berkeley-testfloat-3
9 SF_SOURCE_DIR := $(SOFTFLOAT_DIR)/source
10 SF_INCLUDE_DIR := $(SOFTFLOAT_DIR)/source/include
11 # we could use any specialize here, it doesn't matter
12 SF_SPECIALIZE := 8086-SSE
13 SF_SPECIALIZE_DIR := $(SF_SOURCE_DIR)/$(SF_SPECIALIZE)
15 TF_SOURCE_DIR := $(TESTFLOAT_DIR)/source
17 $(call set-vpath, $(SRC_PATH)/fpu $(SRC_PATH)/tests/fp)
19 LIBQEMUUTIL := $(BUILD_DIR)/libqemuutil.a
21 # Use this variable to be clear when we pull in our own implementation
22 # We build the object with a default rule thanks to the vpath above
23 QEMU_SOFTFLOAT_OBJ := softfloat.o
25 QEMU_INCLUDES += -I$(SRC_PATH)/tests/fp
26 QEMU_INCLUDES += -I$(SF_INCLUDE_DIR)
27 QEMU_INCLUDES += -I$(SF_SPECIALIZE_DIR)
28 QEMU_INCLUDES += -I$(TF_SOURCE_DIR)
30 # work around TARGET_* poisoning
31 QEMU_CFLAGS += -DHW_POISON_H
32 # define a target to match testfloat's implementation-defined choices, such as
33 # whether to raise the invalid flag when dealing with NaNs in muladd.
34 QEMU_CFLAGS += -DTARGET_ARM
36 # capstone has a platform.h file that clashes with softfloat's
37 QEMU_CFLAGS := $(filter-out %capstone, $(QEMU_CFLAGS))
39 # softfloat defines
40 SF_OPTS :=
41 SF_OPTS += -DSOFTFLOAT_ROUND_ODD
42 SF_OPTS += -DINLINE_LEVEL=5
43 SF_OPTS += -DSOFTFLOAT_FAST_DIV32TO16
44 SF_OPTS += -DSOFTFLOAT_FAST_DIV64TO32
45 SF_OPTS += -DSOFTFLOAT_FAST_INT64
46 QEMU_CFLAGS += $(SF_OPTS)
48 # silence the build of softfloat objects
49 SF_CFLAGS += -Wno-missing-prototypes
50 SF_CFLAGS += -Wno-redundant-decls
51 SF_CFLAGS += -Wno-return-type
52 SF_CFLAGS += -Wno-error
54 # testfloat defines
55 TF_OPTS :=
56 TF_OPTS += -DFLOAT16
57 TF_OPTS += -DFLOAT64
58 TF_OPTS += -DEXTFLOAT80
59 TF_OPTS += -DFLOAT128
60 TF_OPTS += -DFLOAT_ROUND_ODD
61 TF_OPTS += -DLONG_DOUBLE_IS_EXTFLOAT80
62 QEMU_CFLAGS += $(TF_OPTS)
64 # silence the build of testfloat objects
65 TF_CFLAGS :=
66 TF_CFLAGS += -Wno-strict-prototypes
67 TF_CFLAGS += -Wno-unknown-pragmas
68 TF_CFLAGS += -Wno-uninitialized
69 TF_CFLAGS += -Wno-missing-prototypes
70 TF_CFLAGS += -Wno-return-type
71 TF_CFLAGS += -Wno-unused-function
72 TF_CFLAGS += -Wno-error
74 # softfloat objects
75 SF_OBJS_PRIMITIVES :=
76 SF_OBJS_PRIMITIVES += s_eq128.o
77 SF_OBJS_PRIMITIVES += s_le128.o
78 SF_OBJS_PRIMITIVES += s_lt128.o
79 SF_OBJS_PRIMITIVES += s_shortShiftLeft128.o
80 SF_OBJS_PRIMITIVES += s_shortShiftRight128.o
81 SF_OBJS_PRIMITIVES += s_shortShiftRightJam64.o
82 SF_OBJS_PRIMITIVES += s_shortShiftRightJam64Extra.o
83 SF_OBJS_PRIMITIVES += s_shortShiftRightJam128.o
84 SF_OBJS_PRIMITIVES += s_shortShiftRightJam128Extra.o
85 SF_OBJS_PRIMITIVES += s_shiftRightJam32.o
86 SF_OBJS_PRIMITIVES += s_shiftRightJam64.o
87 SF_OBJS_PRIMITIVES += s_shiftRightJam64Extra.o
88 SF_OBJS_PRIMITIVES += s_shiftRightJam128.o
89 SF_OBJS_PRIMITIVES += s_shiftRightJam128Extra.o
90 SF_OBJS_PRIMITIVES += s_shiftRightJam256M.o
91 SF_OBJS_PRIMITIVES += s_countLeadingZeros8.o
92 SF_OBJS_PRIMITIVES += s_countLeadingZeros16.o
93 SF_OBJS_PRIMITIVES += s_countLeadingZeros32.o
94 SF_OBJS_PRIMITIVES += s_countLeadingZeros64.o
95 SF_OBJS_PRIMITIVES += s_add128.o
96 SF_OBJS_PRIMITIVES += s_add256M.o
97 SF_OBJS_PRIMITIVES += s_sub128.o
98 SF_OBJS_PRIMITIVES += s_sub256M.o
99 SF_OBJS_PRIMITIVES += s_mul64ByShifted32To128.o
100 SF_OBJS_PRIMITIVES += s_mul64To128.o
101 SF_OBJS_PRIMITIVES += s_mul128By32.o
102 SF_OBJS_PRIMITIVES += s_mul128To256M.o
103 SF_OBJS_PRIMITIVES += s_approxRecip_1Ks.o
104 SF_OBJS_PRIMITIVES += s_approxRecip32_1.o
105 SF_OBJS_PRIMITIVES += s_approxRecipSqrt_1Ks.o
106 SF_OBJS_PRIMITIVES += s_approxRecipSqrt32_1.o
108 SF_OBJS_SPECIALIZE :=
109 SF_OBJS_SPECIALIZE += softfloat_raiseFlags.o
110 SF_OBJS_SPECIALIZE += s_f16UIToCommonNaN.o
111 SF_OBJS_SPECIALIZE += s_commonNaNToF16UI.o
112 SF_OBJS_SPECIALIZE += s_propagateNaNF16UI.o
113 SF_OBJS_SPECIALIZE += s_f32UIToCommonNaN.o
114 SF_OBJS_SPECIALIZE += s_commonNaNToF32UI.o
115 SF_OBJS_SPECIALIZE += s_propagateNaNF32UI.o
116 SF_OBJS_SPECIALIZE += s_f64UIToCommonNaN.o
117 SF_OBJS_SPECIALIZE += s_commonNaNToF64UI.o
118 SF_OBJS_SPECIALIZE += s_propagateNaNF64UI.o
119 SF_OBJS_SPECIALIZE += extF80M_isSignalingNaN.o
120 SF_OBJS_SPECIALIZE += s_extF80UIToCommonNaN.o
121 SF_OBJS_SPECIALIZE += s_commonNaNToExtF80UI.o
122 SF_OBJS_SPECIALIZE += s_propagateNaNExtF80UI.o
123 SF_OBJS_SPECIALIZE += f128M_isSignalingNaN.o
124 SF_OBJS_SPECIALIZE += s_f128UIToCommonNaN.o
125 SF_OBJS_SPECIALIZE += s_commonNaNToF128UI.o
126 SF_OBJS_SPECIALIZE += s_propagateNaNF128UI.o
128 SF_OBJS_OTHERS :=
129 SF_OBJS_OTHERS += s_roundToUI32.o
130 SF_OBJS_OTHERS += s_roundToUI64.o
131 SF_OBJS_OTHERS += s_roundToI32.o
132 SF_OBJS_OTHERS += s_roundToI64.o
133 SF_OBJS_OTHERS += s_normSubnormalF16Sig.o
134 SF_OBJS_OTHERS += s_roundPackToF16.o
135 SF_OBJS_OTHERS += s_normRoundPackToF16.o
136 SF_OBJS_OTHERS += s_addMagsF16.o
137 SF_OBJS_OTHERS += s_subMagsF16.o
138 SF_OBJS_OTHERS += s_mulAddF16.o
139 SF_OBJS_OTHERS += s_normSubnormalF32Sig.o
140 SF_OBJS_OTHERS += s_roundPackToF32.o
141 SF_OBJS_OTHERS += s_normRoundPackToF32.o
142 SF_OBJS_OTHERS += s_addMagsF32.o
143 SF_OBJS_OTHERS += s_subMagsF32.o
144 SF_OBJS_OTHERS += s_mulAddF32.o
145 SF_OBJS_OTHERS += s_normSubnormalF64Sig.o
146 SF_OBJS_OTHERS += s_roundPackToF64.o
147 SF_OBJS_OTHERS += s_normRoundPackToF64.o
148 SF_OBJS_OTHERS += s_addMagsF64.o
149 SF_OBJS_OTHERS += s_subMagsF64.o
150 SF_OBJS_OTHERS += s_mulAddF64.o
151 SF_OBJS_OTHERS += s_normSubnormalExtF80Sig.o
152 SF_OBJS_OTHERS += s_roundPackToExtF80.o
153 SF_OBJS_OTHERS += s_normRoundPackToExtF80.o
154 SF_OBJS_OTHERS += s_addMagsExtF80.o
155 SF_OBJS_OTHERS += s_subMagsExtF80.o
156 SF_OBJS_OTHERS += s_normSubnormalF128Sig.o
157 SF_OBJS_OTHERS += s_roundPackToF128.o
158 SF_OBJS_OTHERS += s_normRoundPackToF128.o
159 SF_OBJS_OTHERS += s_addMagsF128.o
160 SF_OBJS_OTHERS += s_subMagsF128.o
161 SF_OBJS_OTHERS += s_mulAddF128.o
162 SF_OBJS_OTHERS += softfloat_state.o
163 SF_OBJS_OTHERS += ui32_to_f16.o
164 SF_OBJS_OTHERS += ui32_to_f32.o
165 SF_OBJS_OTHERS += ui32_to_f64.o
166 SF_OBJS_OTHERS += ui32_to_extF80.o
167 SF_OBJS_OTHERS += ui32_to_extF80M.o
168 SF_OBJS_OTHERS += ui32_to_f128.o
169 SF_OBJS_OTHERS += ui32_to_f128M.o
170 SF_OBJS_OTHERS += ui64_to_f16.o
171 SF_OBJS_OTHERS += ui64_to_f32.o
172 SF_OBJS_OTHERS += ui64_to_f64.o
173 SF_OBJS_OTHERS += ui64_to_extF80.o
174 SF_OBJS_OTHERS += ui64_to_extF80M.o
175 SF_OBJS_OTHERS += ui64_to_f128.o
176 SF_OBJS_OTHERS += ui64_to_f128M.o
177 SF_OBJS_OTHERS += i32_to_f16.o
178 SF_OBJS_OTHERS += i32_to_f32.o
179 SF_OBJS_OTHERS += i32_to_f64.o
180 SF_OBJS_OTHERS += i32_to_extF80.o
181 SF_OBJS_OTHERS += i32_to_extF80M.o
182 SF_OBJS_OTHERS += i32_to_f128.o
183 SF_OBJS_OTHERS += i32_to_f128M.o
184 SF_OBJS_OTHERS += i64_to_f16.o
185 SF_OBJS_OTHERS += i64_to_f32.o
186 SF_OBJS_OTHERS += i64_to_f64.o
187 SF_OBJS_OTHERS += i64_to_extF80.o
188 SF_OBJS_OTHERS += i64_to_extF80M.o
189 SF_OBJS_OTHERS += i64_to_f128.o
190 SF_OBJS_OTHERS += i64_to_f128M.o
191 SF_OBJS_OTHERS += f16_to_ui32.o
192 SF_OBJS_OTHERS += f16_to_ui64.o
193 SF_OBJS_OTHERS += f16_to_i32.o
194 SF_OBJS_OTHERS += f16_to_i64.o
195 SF_OBJS_OTHERS += f16_to_ui32_r_minMag.o
196 SF_OBJS_OTHERS += f16_to_ui64_r_minMag.o
197 SF_OBJS_OTHERS += f16_to_i32_r_minMag.o
198 SF_OBJS_OTHERS += f16_to_i64_r_minMag.o
199 SF_OBJS_OTHERS += f16_to_f32.o
200 SF_OBJS_OTHERS += f16_to_f64.o
201 SF_OBJS_OTHERS += f16_to_extF80.o
202 SF_OBJS_OTHERS += f16_to_extF80M.o
203 SF_OBJS_OTHERS += f16_to_f128.o
204 SF_OBJS_OTHERS += f16_to_f128M.o
205 SF_OBJS_OTHERS += f16_roundToInt.o
206 SF_OBJS_OTHERS += f16_add.o
207 SF_OBJS_OTHERS += f16_sub.o
208 SF_OBJS_OTHERS += f16_mul.o
209 SF_OBJS_OTHERS += f16_mulAdd.o
210 SF_OBJS_OTHERS += f16_div.o
211 SF_OBJS_OTHERS += f16_rem.o
212 SF_OBJS_OTHERS += f16_sqrt.o
213 SF_OBJS_OTHERS += f16_eq.o
214 SF_OBJS_OTHERS += f16_le.o
215 SF_OBJS_OTHERS += f16_lt.o
216 SF_OBJS_OTHERS += f16_eq_signaling.o
217 SF_OBJS_OTHERS += f16_le_quiet.o
218 SF_OBJS_OTHERS += f16_lt_quiet.o
219 SF_OBJS_OTHERS += f16_isSignalingNaN.o
220 SF_OBJS_OTHERS += f32_to_ui32.o
221 SF_OBJS_OTHERS += f32_to_ui64.o
222 SF_OBJS_OTHERS += f32_to_i32.o
223 SF_OBJS_OTHERS += f32_to_i64.o
224 SF_OBJS_OTHERS += f32_to_ui32_r_minMag.o
225 SF_OBJS_OTHERS += f32_to_ui64_r_minMag.o
226 SF_OBJS_OTHERS += f32_to_i32_r_minMag.o
227 SF_OBJS_OTHERS += f32_to_i64_r_minMag.o
228 SF_OBJS_OTHERS += f32_to_f16.o
229 SF_OBJS_OTHERS += f32_to_f64.o
230 SF_OBJS_OTHERS += f32_to_extF80.o
231 SF_OBJS_OTHERS += f32_to_extF80M.o
232 SF_OBJS_OTHERS += f32_to_f128.o
233 SF_OBJS_OTHERS += f32_to_f128M.o
234 SF_OBJS_OTHERS += f32_roundToInt.o
235 SF_OBJS_OTHERS += f32_add.o
236 SF_OBJS_OTHERS += f32_sub.o
237 SF_OBJS_OTHERS += f32_mul.o
238 SF_OBJS_OTHERS += f32_mulAdd.o
239 SF_OBJS_OTHERS += f32_div.o
240 SF_OBJS_OTHERS += f32_rem.o
241 SF_OBJS_OTHERS += f32_sqrt.o
242 SF_OBJS_OTHERS += f32_eq.o
243 SF_OBJS_OTHERS += f32_le.o
244 SF_OBJS_OTHERS += f32_lt.o
245 SF_OBJS_OTHERS += f32_eq_signaling.o
246 SF_OBJS_OTHERS += f32_le_quiet.o
247 SF_OBJS_OTHERS += f32_lt_quiet.o
248 SF_OBJS_OTHERS += f32_isSignalingNaN.o
249 SF_OBJS_OTHERS += f64_to_ui32.o
250 SF_OBJS_OTHERS += f64_to_ui64.o
251 SF_OBJS_OTHERS += f64_to_i32.o
252 SF_OBJS_OTHERS += f64_to_i64.o
253 SF_OBJS_OTHERS += f64_to_ui32_r_minMag.o
254 SF_OBJS_OTHERS += f64_to_ui64_r_minMag.o
255 SF_OBJS_OTHERS += f64_to_i32_r_minMag.o
256 SF_OBJS_OTHERS += f64_to_i64_r_minMag.o
257 SF_OBJS_OTHERS += f64_to_f16.o
258 SF_OBJS_OTHERS += f64_to_f32.o
259 SF_OBJS_OTHERS += f64_to_extF80.o
260 SF_OBJS_OTHERS += f64_to_extF80M.o
261 SF_OBJS_OTHERS += f64_to_f128.o
262 SF_OBJS_OTHERS += f64_to_f128M.o
263 SF_OBJS_OTHERS += f64_roundToInt.o
264 SF_OBJS_OTHERS += f64_add.o
265 SF_OBJS_OTHERS += f64_sub.o
266 SF_OBJS_OTHERS += f64_mul.o
267 SF_OBJS_OTHERS += f64_mulAdd.o
268 SF_OBJS_OTHERS += f64_div.o
269 SF_OBJS_OTHERS += f64_rem.o
270 SF_OBJS_OTHERS += f64_sqrt.o
271 SF_OBJS_OTHERS += f64_eq.o
272 SF_OBJS_OTHERS += f64_le.o
273 SF_OBJS_OTHERS += f64_lt.o
274 SF_OBJS_OTHERS += f64_eq_signaling.o
275 SF_OBJS_OTHERS += f64_le_quiet.o
276 SF_OBJS_OTHERS += f64_lt_quiet.o
277 SF_OBJS_OTHERS += f64_isSignalingNaN.o
278 SF_OBJS_OTHERS += extF80_to_ui32.o
279 SF_OBJS_OTHERS += extF80_to_ui64.o
280 SF_OBJS_OTHERS += extF80_to_i32.o
281 SF_OBJS_OTHERS += extF80_to_i64.o
282 SF_OBJS_OTHERS += extF80_to_ui32_r_minMag.o
283 SF_OBJS_OTHERS += extF80_to_ui64_r_minMag.o
284 SF_OBJS_OTHERS += extF80_to_i32_r_minMag.o
285 SF_OBJS_OTHERS += extF80_to_i64_r_minMag.o
286 SF_OBJS_OTHERS += extF80_to_f16.o
287 SF_OBJS_OTHERS += extF80_to_f32.o
288 SF_OBJS_OTHERS += extF80_to_f64.o
289 SF_OBJS_OTHERS += extF80_to_f128.o
290 SF_OBJS_OTHERS += extF80_roundToInt.o
291 SF_OBJS_OTHERS += extF80_add.o
292 SF_OBJS_OTHERS += extF80_sub.o
293 SF_OBJS_OTHERS += extF80_mul.o
294 SF_OBJS_OTHERS += extF80_div.o
295 SF_OBJS_OTHERS += extF80_rem.o
296 SF_OBJS_OTHERS += extF80_sqrt.o
297 SF_OBJS_OTHERS += extF80_eq.o
298 SF_OBJS_OTHERS += extF80_le.o
299 SF_OBJS_OTHERS += extF80_lt.o
300 SF_OBJS_OTHERS += extF80_eq_signaling.o
301 SF_OBJS_OTHERS += extF80_le_quiet.o
302 SF_OBJS_OTHERS += extF80_lt_quiet.o
303 SF_OBJS_OTHERS += extF80_isSignalingNaN.o
304 SF_OBJS_OTHERS += extF80M_to_ui32.o
305 SF_OBJS_OTHERS += extF80M_to_ui64.o
306 SF_OBJS_OTHERS += extF80M_to_i32.o
307 SF_OBJS_OTHERS += extF80M_to_i64.o
308 SF_OBJS_OTHERS += extF80M_to_ui32_r_minMag.o
309 SF_OBJS_OTHERS += extF80M_to_ui64_r_minMag.o
310 SF_OBJS_OTHERS += extF80M_to_i32_r_minMag.o
311 SF_OBJS_OTHERS += extF80M_to_i64_r_minMag.o
312 SF_OBJS_OTHERS += extF80M_to_f16.o
313 SF_OBJS_OTHERS += extF80M_to_f32.o
314 SF_OBJS_OTHERS += extF80M_to_f64.o
315 SF_OBJS_OTHERS += extF80M_to_f128M.o
316 SF_OBJS_OTHERS += extF80M_roundToInt.o
317 SF_OBJS_OTHERS += extF80M_add.o
318 SF_OBJS_OTHERS += extF80M_sub.o
319 SF_OBJS_OTHERS += extF80M_mul.o
320 SF_OBJS_OTHERS += extF80M_div.o
321 SF_OBJS_OTHERS += extF80M_rem.o
322 SF_OBJS_OTHERS += extF80M_sqrt.o
323 SF_OBJS_OTHERS += extF80M_eq.o
324 SF_OBJS_OTHERS += extF80M_le.o
325 SF_OBJS_OTHERS += extF80M_lt.o
326 SF_OBJS_OTHERS += extF80M_eq_signaling.o
327 SF_OBJS_OTHERS += extF80M_le_quiet.o
328 SF_OBJS_OTHERS += extF80M_lt_quiet.o
329 SF_OBJS_OTHERS += f128_to_ui32.o
330 SF_OBJS_OTHERS += f128_to_ui64.o
331 SF_OBJS_OTHERS += f128_to_i32.o
332 SF_OBJS_OTHERS += f128_to_i64.o
333 SF_OBJS_OTHERS += f128_to_ui32_r_minMag.o
334 SF_OBJS_OTHERS += f128_to_ui64_r_minMag.o
335 SF_OBJS_OTHERS += f128_to_i32_r_minMag.o
336 SF_OBJS_OTHERS += f128_to_i64_r_minMag.o
337 SF_OBJS_OTHERS += f128_to_f16.o
338 SF_OBJS_OTHERS += f128_to_f32.o
339 SF_OBJS_OTHERS += f128_to_extF80.o
340 SF_OBJS_OTHERS += f128_to_f64.o
341 SF_OBJS_OTHERS += f128_roundToInt.o
342 SF_OBJS_OTHERS += f128_add.o
343 SF_OBJS_OTHERS += f128_sub.o
344 SF_OBJS_OTHERS += f128_mul.o
345 SF_OBJS_OTHERS += f128_mulAdd.o
346 SF_OBJS_OTHERS += f128_div.o
347 SF_OBJS_OTHERS += f128_rem.o
348 SF_OBJS_OTHERS += f128_sqrt.o
349 SF_OBJS_OTHERS += f128_eq.o
350 SF_OBJS_OTHERS += f128_le.o
351 SF_OBJS_OTHERS += f128_lt.o
352 SF_OBJS_OTHERS += f128_eq_signaling.o
353 SF_OBJS_OTHERS += f128_le_quiet.o
354 SF_OBJS_OTHERS += f128_lt_quiet.o
355 SF_OBJS_OTHERS += f128_isSignalingNaN.o
356 SF_OBJS_OTHERS += f128M_to_ui32.o
357 SF_OBJS_OTHERS += f128M_to_ui64.o
358 SF_OBJS_OTHERS += f128M_to_i32.o
359 SF_OBJS_OTHERS += f128M_to_i64.o
360 SF_OBJS_OTHERS += f128M_to_ui32_r_minMag.o
361 SF_OBJS_OTHERS += f128M_to_ui64_r_minMag.o
362 SF_OBJS_OTHERS += f128M_to_i32_r_minMag.o
363 SF_OBJS_OTHERS += f128M_to_i64_r_minMag.o
364 SF_OBJS_OTHERS += f128M_to_f16.o
365 SF_OBJS_OTHERS += f128M_to_f32.o
366 SF_OBJS_OTHERS += f128M_to_extF80M.o
367 SF_OBJS_OTHERS += f128M_to_f64.o
368 SF_OBJS_OTHERS += f128M_roundToInt.o
369 SF_OBJS_OTHERS += f128M_add.o
370 SF_OBJS_OTHERS += f128M_sub.o
371 SF_OBJS_OTHERS += f128M_mul.o
372 SF_OBJS_OTHERS += f128M_mulAdd.o
373 SF_OBJS_OTHERS += f128M_div.o
374 SF_OBJS_OTHERS += f128M_rem.o
375 SF_OBJS_OTHERS += f128M_sqrt.o
376 SF_OBJS_OTHERS += f128M_eq.o
377 SF_OBJS_OTHERS += f128M_le.o
378 SF_OBJS_OTHERS += f128M_lt.o
379 SF_OBJS_OTHERS += f128M_eq_signaling.o
380 SF_OBJS_OTHERS += f128M_le_quiet.o
381 SF_OBJS_OTHERS += f128M_lt_quiet.o
383 SF_OBJS_ALL_NOSPEC :=
384 SF_OBJS_ALL_NOSPEC += $(SF_OBJS_PRIMITIVES)
385 SF_OBJS_ALL_NOSPEC += $(SF_OBJS_OTHERS)
387 SF_OBJS_ALL :=
388 SF_OBJS_ALL += $(SF_OBJS_ALL_NOSPEC)
389 SF_OBJS_ALL += $(SF_OBJS_SPECIALIZE)
391 # testfloat objects
392 TF_OBJS_GENCASES :=
393 TF_OBJS_GENCASES += genCases_ui32.o
394 TF_OBJS_GENCASES += genCases_ui64.o
395 TF_OBJS_GENCASES += genCases_i32.o
396 TF_OBJS_GENCASES += genCases_i64.o
397 TF_OBJS_GENCASES += genCases_f16.o
398 TF_OBJS_GENCASES += genCases_f32.o
399 TF_OBJS_GENCASES += genCases_f64.o
400 TF_OBJS_GENCASES += genCases_extF80.o
401 TF_OBJS_GENCASES += genCases_f128.o
403 TF_OBJS_WRITECASE :=
404 TF_OBJS_WRITECASE += writeCase_a_ui32.o
405 TF_OBJS_WRITECASE += writeCase_a_ui64.o
406 TF_OBJS_WRITECASE += writeCase_a_f16.o
407 TF_OBJS_WRITECASE += writeCase_ab_f16.o
408 TF_OBJS_WRITECASE += writeCase_abc_f16.o
409 TF_OBJS_WRITECASE += writeCase_a_f32.o
410 TF_OBJS_WRITECASE += writeCase_ab_f32.o
411 TF_OBJS_WRITECASE += writeCase_abc_f32.o
412 TF_OBJS_WRITECASE += writeCase_a_f64.o
413 TF_OBJS_WRITECASE += writeCase_ab_f64.o
414 TF_OBJS_WRITECASE += writeCase_abc_f64.o
415 TF_OBJS_WRITECASE += writeCase_a_extF80M.o
416 TF_OBJS_WRITECASE += writeCase_ab_extF80M.o
417 TF_OBJS_WRITECASE += writeCase_a_f128M.o
418 TF_OBJS_WRITECASE += writeCase_ab_f128M.o
419 TF_OBJS_WRITECASE += writeCase_abc_f128M.o
420 TF_OBJS_WRITECASE += writeCase_z_bool.o
421 TF_OBJS_WRITECASE += writeCase_z_ui32.o
422 TF_OBJS_WRITECASE += writeCase_z_ui64.o
423 TF_OBJS_WRITECASE += writeCase_z_f16.o
424 TF_OBJS_WRITECASE += writeCase_z_f32.o
425 TF_OBJS_WRITECASE += writeCase_z_f64.o
426 TF_OBJS_WRITECASE += writeCase_z_extF80M.o
427 TF_OBJS_WRITECASE += writeCase_z_f128M.o
429 TF_OBJS_TEST :=
430 TF_OBJS_TEST += test_a_ui32_z_f16.o
431 TF_OBJS_TEST += test_a_ui32_z_f32.o
432 TF_OBJS_TEST += test_a_ui32_z_f64.o
433 TF_OBJS_TEST += test_a_ui32_z_extF80.o
434 TF_OBJS_TEST += test_a_ui32_z_f128.o
435 TF_OBJS_TEST += test_a_ui64_z_f16.o
436 TF_OBJS_TEST += test_a_ui64_z_f32.o
437 TF_OBJS_TEST += test_a_ui64_z_f64.o
438 TF_OBJS_TEST += test_a_ui64_z_extF80.o
439 TF_OBJS_TEST += test_a_ui64_z_f128.o
440 TF_OBJS_TEST += test_a_i32_z_f16.o
441 TF_OBJS_TEST += test_a_i32_z_f32.o
442 TF_OBJS_TEST += test_a_i32_z_f64.o
443 TF_OBJS_TEST += test_a_i32_z_extF80.o
444 TF_OBJS_TEST += test_a_i32_z_f128.o
445 TF_OBJS_TEST += test_a_i64_z_f16.o
446 TF_OBJS_TEST += test_a_i64_z_f32.o
447 TF_OBJS_TEST += test_a_i64_z_f64.o
448 TF_OBJS_TEST += test_a_i64_z_extF80.o
449 TF_OBJS_TEST += test_a_i64_z_f128.o
450 TF_OBJS_TEST += test_a_f16_z_ui32_rx.o
451 TF_OBJS_TEST += test_a_f16_z_ui64_rx.o
452 TF_OBJS_TEST += test_a_f16_z_i32_rx.o
453 TF_OBJS_TEST += test_a_f16_z_i64_rx.o
454 TF_OBJS_TEST += test_a_f16_z_ui32_x.o
455 TF_OBJS_TEST += test_a_f16_z_ui64_x.o
456 TF_OBJS_TEST += test_a_f16_z_i32_x.o
457 TF_OBJS_TEST += test_a_f16_z_i64_x.o
458 TF_OBJS_TEST += test_a_f16_z_f32.o
459 TF_OBJS_TEST += test_a_f16_z_f64.o
460 TF_OBJS_TEST += test_a_f16_z_extF80.o
461 TF_OBJS_TEST += test_a_f16_z_f128.o
462 TF_OBJS_TEST += test_az_f16.o
463 TF_OBJS_TEST += test_az_f16_rx.o
464 TF_OBJS_TEST += test_abz_f16.o
465 TF_OBJS_TEST += test_abcz_f16.o
466 TF_OBJS_TEST += test_ab_f16_z_bool.o
467 TF_OBJS_TEST += test_a_f32_z_ui32_rx.o
468 TF_OBJS_TEST += test_a_f32_z_ui64_rx.o
469 TF_OBJS_TEST += test_a_f32_z_i32_rx.o
470 TF_OBJS_TEST += test_a_f32_z_i64_rx.o
471 TF_OBJS_TEST += test_a_f32_z_ui32_x.o
472 TF_OBJS_TEST += test_a_f32_z_ui64_x.o
473 TF_OBJS_TEST += test_a_f32_z_i32_x.o
474 TF_OBJS_TEST += test_a_f32_z_i64_x.o
475 TF_OBJS_TEST += test_a_f32_z_f16.o
476 TF_OBJS_TEST += test_a_f32_z_f64.o
477 TF_OBJS_TEST += test_a_f32_z_extF80.o
478 TF_OBJS_TEST += test_a_f32_z_f128.o
479 TF_OBJS_TEST += test_az_f32.o
480 TF_OBJS_TEST += test_az_f32_rx.o
481 TF_OBJS_TEST += test_abz_f32.o
482 TF_OBJS_TEST += test_abcz_f32.o
483 TF_OBJS_TEST += test_ab_f32_z_bool.o
484 TF_OBJS_TEST += test_a_f64_z_ui32_rx.o
485 TF_OBJS_TEST += test_a_f64_z_ui64_rx.o
486 TF_OBJS_TEST += test_a_f64_z_i32_rx.o
487 TF_OBJS_TEST += test_a_f64_z_i64_rx.o
488 TF_OBJS_TEST += test_a_f64_z_ui32_x.o
489 TF_OBJS_TEST += test_a_f64_z_ui64_x.o
490 TF_OBJS_TEST += test_a_f64_z_i32_x.o
491 TF_OBJS_TEST += test_a_f64_z_i64_x.o
492 TF_OBJS_TEST += test_a_f64_z_f16.o
493 TF_OBJS_TEST += test_a_f64_z_f32.o
494 TF_OBJS_TEST += test_a_f64_z_extF80.o
495 TF_OBJS_TEST += test_a_f64_z_f128.o
496 TF_OBJS_TEST += test_az_f64.o
497 TF_OBJS_TEST += test_az_f64_rx.o
498 TF_OBJS_TEST += test_abz_f64.o
499 TF_OBJS_TEST += test_abcz_f64.o
500 TF_OBJS_TEST += test_ab_f64_z_bool.o
501 TF_OBJS_TEST += test_a_extF80_z_ui32_rx.o
502 TF_OBJS_TEST += test_a_extF80_z_ui64_rx.o
503 TF_OBJS_TEST += test_a_extF80_z_i32_rx.o
504 TF_OBJS_TEST += test_a_extF80_z_i64_rx.o
505 TF_OBJS_TEST += test_a_extF80_z_ui32_x.o
506 TF_OBJS_TEST += test_a_extF80_z_ui64_x.o
507 TF_OBJS_TEST += test_a_extF80_z_i32_x.o
508 TF_OBJS_TEST += test_a_extF80_z_i64_x.o
509 TF_OBJS_TEST += test_a_extF80_z_f16.o
510 TF_OBJS_TEST += test_a_extF80_z_f32.o
511 TF_OBJS_TEST += test_a_extF80_z_f64.o
512 TF_OBJS_TEST += test_a_extF80_z_f128.o
513 TF_OBJS_TEST += test_az_extF80.o
514 TF_OBJS_TEST += test_az_extF80_rx.o
515 TF_OBJS_TEST += test_abz_extF80.o
516 TF_OBJS_TEST += test_ab_extF80_z_bool.o
517 TF_OBJS_TEST += test_a_f128_z_ui32_rx.o
518 TF_OBJS_TEST += test_a_f128_z_ui64_rx.o
519 TF_OBJS_TEST += test_a_f128_z_i32_rx.o
520 TF_OBJS_TEST += test_a_f128_z_i64_rx.o
521 TF_OBJS_TEST += test_a_f128_z_ui32_x.o
522 TF_OBJS_TEST += test_a_f128_z_ui64_x.o
523 TF_OBJS_TEST += test_a_f128_z_i32_x.o
524 TF_OBJS_TEST += test_a_f128_z_i64_x.o
525 TF_OBJS_TEST += test_a_f128_z_f16.o
526 TF_OBJS_TEST += test_a_f128_z_f32.o
527 TF_OBJS_TEST += test_a_f128_z_f64.o
528 TF_OBJS_TEST += test_a_f128_z_extF80.o
529 TF_OBJS_TEST += test_az_f128.o
530 TF_OBJS_TEST += test_az_f128_rx.o
531 TF_OBJS_TEST += test_abz_f128.o
532 TF_OBJS_TEST += test_abcz_f128.o
533 TF_OBJS_TEST += test_ab_f128_z_bool.o
535 TF_OBJS_LIB :=
536 TF_OBJS_LIB += uint128_inline.o
537 TF_OBJS_LIB += uint128.o
538 TF_OBJS_LIB += fail.o
539 TF_OBJS_LIB += functions_common.o
540 TF_OBJS_LIB += functionInfos.o
541 TF_OBJS_LIB += standardFunctionInfos.o
542 TF_OBJS_LIB += random.o
543 TF_OBJS_LIB += genCases_common.o
544 TF_OBJS_LIB += $(TF_OBJS_GENCASES)
545 TF_OBJS_LIB += genCases_writeTestsTotal.o
546 TF_OBJS_LIB += verCases_inline.o
547 TF_OBJS_LIB += verCases_common.o
548 TF_OBJS_LIB += verCases_writeFunctionName.o
549 TF_OBJS_LIB += readHex.o
550 TF_OBJS_LIB += writeHex.o
551 TF_OBJS_LIB += $(TF_OBJS_WRITECASE)
552 TF_OBJS_LIB += testLoops_common.o
553 TF_OBJS_LIB += $(TF_OBJS_TEST)
555 BINARIES := fp-test$(EXESUF) fp-bench$(EXESUF)
557 # We require artefacts from the main build including config-host.h
558 # because platform.h includes it. Rather than re-invoking the main
559 # build we just error out if things aren't there.
560 $(LIBQEMUUTIL) $(BUILD_DIR)/config-host.h:
561 $(error $@ missing, re-run parent build)
563 all: $(BUILD_DIR)/config-host.h $(BINARIES)
565 # libtestfloat.a depends on libsoftfloat.a, so specify it first
566 FP_TEST_LIBS := libtestfloat.a libsoftfloat.a $(LIBQEMUUTIL)
568 fp-test$(EXESUF): fp-test.o slowfloat.o $(QEMU_SOFTFLOAT_OBJ) $(FP_TEST_LIBS)
570 # Custom rule to build with SF_CFLAGS
571 SF_BUILD = $(call quiet-command,$(CC) $(QEMU_LOCAL_INCLUDES) $(QEMU_INCLUDES) \
572 $(QEMU_CFLAGS) $(SF_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) \
573 $($@-cflags) -c -o $@ $<,"CC","$(TARGET_DIR)$@")
575 $(SF_OBJS_ALL_NOSPEC): %.o: $(SF_SOURCE_DIR)/%.c
576 $(SF_BUILD)
577 $(SF_OBJS_SPECIALIZE): %.o: $(SF_SPECIALIZE_DIR)/%.c
578 $(SF_BUILD)
580 libsoftfloat.a: $(SF_OBJS_ALL)
582 # Custom rule to build with TF_CFLAGS
583 $(TF_OBJS_LIB) slowfloat.o: %.o: $(TF_SOURCE_DIR)/%.c
584 $(call quiet-command,$(CC) $(QEMU_LOCAL_INCLUDES) $(QEMU_INCLUDES) \
585 $(QEMU_CFLAGS) $(TF_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) \
586 $($@-cflags) -c -o $@ $<,"CC","$(TARGET_DIR)$@")
588 libtestfloat.a: $(TF_OBJS_LIB)
590 fp-bench$(EXESUF): fp-bench.o $(QEMU_SOFTFLOAT_OBJ) $(LIBQEMUUTIL)
592 clean:
593 rm -f *.o *.d $(BINARIES)
594 rm -f *.gcno *.gcda *.gcov
595 rm -f fp-test$(EXESUF)
596 rm -f fp-bench$(EXESUF)
597 rm -f libsoftfloat.a
598 rm -f libtestfloat.a
600 -include $(wildcard *.d)