blob: b7d861f8fc040ac8af92240261a06b569e16191f [file] [log] [blame]
Andrew Geissler7f40b712020-05-15 14:09:53 -05001From 3503f7f3845caba454949fdf8408e85ca4fdb943 Mon Sep 17 00:00:00 2001
2From: Zong Li <zong.li@sifive.com>
3Date: Wed, 6 May 2020 01:25:55 -0700
4Subject: [PATCH] Makefile for cross compile TestFloat 3e
Patrick Williamsb48b7b42016-08-17 15:04:38 -05005
Andrew Geissler7f40b712020-05-15 14:09:53 -05006This commit adds a Makefile for cross compile on TestFloat
73e version. Almost implementation is based on meta-oe porting
8from Fabio Berton <fabio.berton@ossystems.com.br>.
Patrick Williamsb48b7b42016-08-17 15:04:38 -05009
Andrew Geissler7f40b712020-05-15 14:09:53 -050010Signed-off-by: Zong Li <zongbox@gmail.com>
Patrick Williamsb48b7b42016-08-17 15:04:38 -050011---
Andrew Geissler7f40b712020-05-15 14:09:53 -050012 TestFloat-3e/build/Linux-Cross-Compile/Makefile | 353 ++++++++++++++++++++++
13 TestFloat-3e/build/Linux-Cross-Compile/platform.h | 48 +++
14 2 files changed, 401 insertions(+)
15 create mode 100644 TestFloat-3e/build/Linux-Cross-Compile/Makefile
16 create mode 100644 TestFloat-3e/build/Linux-Cross-Compile/platform.h
Patrick Williamsb48b7b42016-08-17 15:04:38 -050017
Andrew Geissler7f40b712020-05-15 14:09:53 -050018diff --git a/TestFloat-3e/build/Linux-Cross-Compile/Makefile b/TestFloat-3e/build/Linux-Cross-Compile/Makefile
Patrick Williamsb48b7b42016-08-17 15:04:38 -050019new file mode 100644
Andrew Geissler7f40b712020-05-15 14:09:53 -050020index 0000000..d82b9ed
Patrick Williamsb48b7b42016-08-17 15:04:38 -050021--- /dev/null
Andrew Geissler7f40b712020-05-15 14:09:53 -050022+++ b/TestFloat-3e/build/Linux-Cross-Compile/Makefile
23@@ -0,0 +1,353 @@
Patrick Williamsb48b7b42016-08-17 15:04:38 -050024+
25+#=============================================================================
26+#
Andrew Geissler7f40b712020-05-15 14:09:53 -050027+# This Makefile template is part of TestFloat, Release 3b, a package of
28+# programs for testing the correctness of floating-point arithmetic complying
29+# with the IEEE Standard for Floating-Point, by John R. Hauser.
Patrick Williamsb48b7b42016-08-17 15:04:38 -050030+#
Andrew Geissler7f40b712020-05-15 14:09:53 -050031+# Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University
32+# of California. All rights reserved.
Patrick Williamsb48b7b42016-08-17 15:04:38 -050033+#
34+# Redistribution and use in source and binary forms, with or without
35+# modification, are permitted provided that the following conditions are met:
36+#
37+# 1. Redistributions of source code must retain the above copyright notice,
38+# this list of conditions, and the following disclaimer.
39+#
40+# 2. Redistributions in binary form must reproduce the above copyright
41+# notice, this list of conditions, and the following disclaimer in the
42+# documentation and/or other materials provided with the distribution.
43+#
44+# 3. Neither the name of the University nor the names of its contributors
45+# may be used to endorse or promote products derived from this software
46+# without specific prior written permission.
47+#
48+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
49+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
50+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
51+# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
52+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
53+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
54+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
55+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
56+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
57+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
58+#
59+#=============================================================================
60+
Andrew Geissler7f40b712020-05-15 14:09:53 -050061+SOURCE_DIR ?= ../../source
62+SOFTFLOAT_DIR ?= ../../../SoftFloat-3e
63+PLATFORM ?= Linux-Cross-Compile
64+
Patrick Williamsb48b7b42016-08-17 15:04:38 -050065+SUBJ_SOURCE_DIR = $(SOURCE_DIR)/subj-C
Patrick Williamsb48b7b42016-08-17 15:04:38 -050066+SOFTFLOAT_INCLUDE_DIR = $(SOFTFLOAT_DIR)/source/include
Patrick Williamsb48b7b42016-08-17 15:04:38 -050067+
68+SOFTFLOAT_H = \
69+ $(SOFTFLOAT_INCLUDE_DIR)/softfloat_types.h \
70+ $(SOFTFLOAT_INCLUDE_DIR)/softfloat.h
71+SOFTFLOAT_LIB = $(SOFTFLOAT_DIR)/build/$(PLATFORM)/softfloat$(LIB)
72+
Andrew Geissler7f40b712020-05-15 14:09:53 -050073+TESTFLOAT_OPTS ?= -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD
Patrick Williamsb48b7b42016-08-17 15:04:38 -050074+
75+DELETE = rm -f
76+C_INCLUDES = \
77+ -I. -I$(SUBJ_SOURCE_DIR) -I$(SOURCE_DIR) -I$(SOFTFLOAT_INCLUDE_DIR)
78+COMPILE_C = \
Andrew Geissler7f40b712020-05-15 14:09:53 -050079+ ${CC} -c -Werror-implicit-function-declaration \
80+ $(TESTFLOAT_OPTS) $(C_INCLUDES) -O2 -o $@
Patrick Williamsb48b7b42016-08-17 15:04:38 -050081+COMPILE_SLOWFLOAT_C = \
Andrew Geissler7f40b712020-05-15 14:09:53 -050082+ ${CC} -c -Werror-implicit-function-declaration \
83+ $(TESTFLOAT_OPTS) $(C_INCLUDES) -O3 -o $@
Patrick Williamsb48b7b42016-08-17 15:04:38 -050084+MAKELIB = ${AR} crs $@
Patrick Williamsddad1a12017-02-23 20:36:32 -060085+LINK = ${CC} -o $@ ${LDFLAGS}
Patrick Williamsb48b7b42016-08-17 15:04:38 -050086+OTHER_LIBS = -lm
87+
88+OBJ = .o
89+LIB = .a
90+EXE =
91+
92+.PHONY: all
93+all: \
94+ testsoftfloat$(EXE) \
95+ timesoftfloat$(EXE) \
96+ testfloat_gen$(EXE) \
97+ testfloat_ver$(EXE) \
98+ testfloat$(EXE) \
99+
100+OBJS_GENCASES = \
101+ genCases_ui32$(OBJ) \
102+ genCases_ui64$(OBJ) \
103+ genCases_i32$(OBJ) \
104+ genCases_i64$(OBJ) \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500105+ genCases_f16$(OBJ) \
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500106+ genCases_f32$(OBJ) \
107+ genCases_f64$(OBJ) \
108+ genCases_extF80$(OBJ) \
109+ genCases_f128$(OBJ) \
110+
111+OBJS_WRITECASE = \
112+ writeCase_a_ui32$(OBJ) \
113+ writeCase_a_ui64$(OBJ) \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500114+ writeCase_a_f16$(OBJ) \
115+ writeCase_ab_f16$(OBJ) \
116+ writeCase_abc_f16$(OBJ) \
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500117+ writeCase_a_f32$(OBJ) \
118+ writeCase_ab_f32$(OBJ) \
119+ writeCase_abc_f32$(OBJ) \
120+ writeCase_a_f64$(OBJ) \
121+ writeCase_ab_f64$(OBJ) \
122+ writeCase_abc_f64$(OBJ) \
123+ writeCase_a_extF80M$(OBJ) \
124+ writeCase_ab_extF80M$(OBJ) \
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500125+ writeCase_a_f128M$(OBJ) \
126+ writeCase_ab_f128M$(OBJ) \
127+ writeCase_abc_f128M$(OBJ) \
128+ writeCase_z_bool$(OBJ) \
129+ writeCase_z_ui32$(OBJ) \
130+ writeCase_z_ui64$(OBJ) \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500131+ writeCase_z_f16$(OBJ) \
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500132+ writeCase_z_f32$(OBJ) \
133+ writeCase_z_f64$(OBJ) \
134+ writeCase_z_extF80M$(OBJ) \
135+ writeCase_z_f128M$(OBJ) \
136+
137+OBJS_TEST = \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500138+ test_a_ui32_z_f16$(OBJ) \
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500139+ test_a_ui32_z_f32$(OBJ) \
140+ test_a_ui32_z_f64$(OBJ) \
141+ test_a_ui32_z_extF80$(OBJ) \
142+ test_a_ui32_z_f128$(OBJ) \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500143+ test_a_ui64_z_f16$(OBJ) \
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500144+ test_a_ui64_z_f32$(OBJ) \
145+ test_a_ui64_z_f64$(OBJ) \
146+ test_a_ui64_z_extF80$(OBJ) \
147+ test_a_ui64_z_f128$(OBJ) \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500148+ test_a_i32_z_f16$(OBJ) \
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500149+ test_a_i32_z_f32$(OBJ) \
150+ test_a_i32_z_f64$(OBJ) \
151+ test_a_i32_z_extF80$(OBJ) \
152+ test_a_i32_z_f128$(OBJ) \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500153+ test_a_i64_z_f16$(OBJ) \
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500154+ test_a_i64_z_f32$(OBJ) \
155+ test_a_i64_z_f64$(OBJ) \
156+ test_a_i64_z_extF80$(OBJ) \
157+ test_a_i64_z_f128$(OBJ) \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500158+ test_a_f16_z_ui32_rx$(OBJ) \
159+ test_a_f16_z_ui64_rx$(OBJ) \
160+ test_a_f16_z_i32_rx$(OBJ) \
161+ test_a_f16_z_i64_rx$(OBJ) \
162+ test_a_f16_z_ui32_x$(OBJ) \
163+ test_a_f16_z_ui64_x$(OBJ) \
164+ test_a_f16_z_i32_x$(OBJ) \
165+ test_a_f16_z_i64_x$(OBJ) \
166+ test_a_f16_z_f32$(OBJ) \
167+ test_a_f16_z_f64$(OBJ) \
168+ test_a_f16_z_extF80$(OBJ) \
169+ test_a_f16_z_f128$(OBJ) \
170+ test_az_f16$(OBJ) \
171+ test_az_f16_rx$(OBJ) \
172+ test_abz_f16$(OBJ) \
173+ test_abcz_f16$(OBJ) \
174+ test_ab_f16_z_bool$(OBJ) \
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500175+ test_a_f32_z_ui32_rx$(OBJ) \
176+ test_a_f32_z_ui64_rx$(OBJ) \
177+ test_a_f32_z_i32_rx$(OBJ) \
178+ test_a_f32_z_i64_rx$(OBJ) \
179+ test_a_f32_z_ui32_x$(OBJ) \
180+ test_a_f32_z_ui64_x$(OBJ) \
181+ test_a_f32_z_i32_x$(OBJ) \
182+ test_a_f32_z_i64_x$(OBJ) \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500183+ test_a_f32_z_f16$(OBJ) \
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500184+ test_a_f32_z_f64$(OBJ) \
185+ test_a_f32_z_extF80$(OBJ) \
186+ test_a_f32_z_f128$(OBJ) \
187+ test_az_f32$(OBJ) \
188+ test_az_f32_rx$(OBJ) \
189+ test_abz_f32$(OBJ) \
190+ test_abcz_f32$(OBJ) \
191+ test_ab_f32_z_bool$(OBJ) \
192+ test_a_f64_z_ui32_rx$(OBJ) \
193+ test_a_f64_z_ui64_rx$(OBJ) \
194+ test_a_f64_z_i32_rx$(OBJ) \
195+ test_a_f64_z_i64_rx$(OBJ) \
196+ test_a_f64_z_ui32_x$(OBJ) \
197+ test_a_f64_z_ui64_x$(OBJ) \
198+ test_a_f64_z_i32_x$(OBJ) \
199+ test_a_f64_z_i64_x$(OBJ) \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500200+ test_a_f64_z_f16$(OBJ) \
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500201+ test_a_f64_z_f32$(OBJ) \
202+ test_a_f64_z_extF80$(OBJ) \
203+ test_a_f64_z_f128$(OBJ) \
204+ test_az_f64$(OBJ) \
205+ test_az_f64_rx$(OBJ) \
206+ test_abz_f64$(OBJ) \
207+ test_abcz_f64$(OBJ) \
208+ test_ab_f64_z_bool$(OBJ) \
209+ test_a_extF80_z_ui32_rx$(OBJ) \
210+ test_a_extF80_z_ui64_rx$(OBJ) \
211+ test_a_extF80_z_i32_rx$(OBJ) \
212+ test_a_extF80_z_i64_rx$(OBJ) \
213+ test_a_extF80_z_ui32_x$(OBJ) \
214+ test_a_extF80_z_ui64_x$(OBJ) \
215+ test_a_extF80_z_i32_x$(OBJ) \
216+ test_a_extF80_z_i64_x$(OBJ) \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500217+ test_a_extF80_z_f16$(OBJ) \
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500218+ test_a_extF80_z_f32$(OBJ) \
219+ test_a_extF80_z_f64$(OBJ) \
220+ test_a_extF80_z_f128$(OBJ) \
221+ test_az_extF80$(OBJ) \
222+ test_az_extF80_rx$(OBJ) \
223+ test_abz_extF80$(OBJ) \
224+ test_ab_extF80_z_bool$(OBJ) \
225+ test_a_f128_z_ui32_rx$(OBJ) \
226+ test_a_f128_z_ui64_rx$(OBJ) \
227+ test_a_f128_z_i32_rx$(OBJ) \
228+ test_a_f128_z_i64_rx$(OBJ) \
229+ test_a_f128_z_ui32_x$(OBJ) \
230+ test_a_f128_z_ui64_x$(OBJ) \
231+ test_a_f128_z_i32_x$(OBJ) \
232+ test_a_f128_z_i64_x$(OBJ) \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500233+ test_a_f128_z_f16$(OBJ) \
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500234+ test_a_f128_z_f32$(OBJ) \
235+ test_a_f128_z_f64$(OBJ) \
236+ test_a_f128_z_extF80$(OBJ) \
237+ test_az_f128$(OBJ) \
238+ test_az_f128_rx$(OBJ) \
239+ test_abz_f128$(OBJ) \
240+ test_abcz_f128$(OBJ) \
241+ test_ab_f128_z_bool$(OBJ) \
242+
243+OBJS_LIB = \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500244+ uint128_inline$(OBJ) \
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500245+ uint128$(OBJ) \
246+ fail$(OBJ) \
247+ functions_common$(OBJ) \
248+ functionInfos$(OBJ) \
249+ standardFunctionInfos$(OBJ) \
250+ random$(OBJ) \
251+ genCases_common$(OBJ) \
252+ $(OBJS_GENCASES) \
253+ genCases_writeTestsTotal$(OBJ) \
Andrew Geissler7f40b712020-05-15 14:09:53 -0500254+ verCases_inline$(OBJ) \
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500255+ verCases_common$(OBJ) \
256+ verCases_writeFunctionName$(OBJ) \
257+ readHex$(OBJ) \
258+ writeHex$(OBJ) \
259+ $(OBJS_WRITECASE) \
260+ testLoops_common$(OBJ) \
261+ $(OBJS_TEST) \
262+
263+uint128$(OBJ): $(SOURCE_DIR)/uint128.h
264+fail$(OBJ): $(SOURCE_DIR)/fail.h
265+functions_common$(OBJ): $(SOFTFLOAT_H) $(SOURCE_DIR)/functions.h
266+functionInfos$(OBJ): $(SOURCE_DIR)/functions.h
267+standardFunctionInfos$(OBJ): $(SOURCE_DIR)/functions.h
268+random$(OBJ): $(SOURCE_DIR)/random.h
269+genCases_common$(OBJ): $(SOURCE_DIR)/fail.h $(SOURCE_DIR)/genCases.h
270+$(OBJS_GENCASES): \
271+ $(SOURCE_DIR)/random.h $(SOFTFLOAT_H) $(SOURCE_DIR)/genCases.h
272+genCases_f128$(OBJ): $(SOURCE_DIR)/uint128.h
273+genCases_writeTestsTotal$(OBJ): $(SOURCE_DIR)/genCases.h
274+verCases_common$(OBJ): $(SOURCE_DIR)/verCases.h
275+verCases_writeFunctionName$(OBJ): $(SOURCE_DIR)/verCases.h
276+readHex$(OBJ): $(SOURCE_DIR)/readHex.h
277+writeHex$(OBJ): $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/writeHex.h
278+$(OBJS_WRITECASE): \
279+ $(SOFTFLOAT_H) $(SOURCE_DIR)/writeHex.h $(SOURCE_DIR)/writeCase.h
280+testLoops_common$(OBJ): $(SOURCE_DIR)/testLoops.h
281+$(OBJS_TEST): \
282+ $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/genCases.h \
283+ $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h $(SOURCE_DIR)/testLoops.h
284+$(OBJS_LIB): %$(OBJ): platform.h $(SOURCE_DIR)/%.c
285+ $(COMPILE_C) $(SOURCE_DIR)/$*.c
286+testfloat$(LIB): $(OBJS_LIB)
287+ $(MAKELIB) $^
288+
289+OBJS_TESTSOFTFLOAT = slowfloat$(OBJ) testsoftfloat$(OBJ)
290+
291+slowfloat$(OBJ): \
292+ platform.h $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) \
293+ $(SOURCE_DIR)/slowfloat.h $(SOURCE_DIR)/slowfloat.c
294+ $(COMPILE_SLOWFLOAT_C) $(SOURCE_DIR)/slowfloat.c
295+testsoftfloat$(OBJ): \
296+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
297+ $(SOURCE_DIR)/slowfloat.h $(SOURCE_DIR)/functions.h \
298+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h \
299+ $(SOURCE_DIR)/testLoops.h $(SOURCE_DIR)/testsoftfloat.c
300+ $(COMPILE_C) $(SOURCE_DIR)/testsoftfloat.c
301+
302+testsoftfloat$(EXE): $(OBJS_TESTSOFTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
303+ $(LINK) $^ $(OTHER_LIBS)
304+
305+OBJS_TIMESOFTFLOAT = timesoftfloat$(OBJ)
306+
307+timesoftfloat$(OBJ): \
308+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
309+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/timesoftfloat.c
310+ $(COMPILE_C) $(SOURCE_DIR)/timesoftfloat.c
311+
312+timesoftfloat$(EXE): $(OBJS_TIMESOFTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
313+ $(LINK) $^ $(OTHER_LIBS)
314+
315+OBJS_TESTFLOAT_GEN = genLoops$(OBJ) testfloat_gen$(OBJ)
316+
317+genLoops$(OBJ): \
318+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
319+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/writeHex.h $(SOURCE_DIR)/genLoops.h \
320+ $(SOURCE_DIR)/genLoops.c
321+ $(COMPILE_C) $(SOURCE_DIR)/genLoops.c
322+testfloat_gen$(OBJ): \
323+ $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) $(SOURCE_DIR)/functions.h \
324+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/genLoops.h \
325+ $(SOURCE_DIR)/testfloat_gen.c
326+ $(COMPILE_C) $(SOURCE_DIR)/testfloat_gen.c
327+
328+testfloat_gen$(EXE): $(OBJS_TESTFLOAT_GEN) testfloat$(LIB) $(SOFTFLOAT_LIB)
329+ $(LINK) $^ $(OTHER_LIBS)
330+
331+OBJS_TESTFLOAT_VER = verLoops$(OBJ) testfloat_ver$(OBJ)
332+
333+verLoops$(OBJ): \
334+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
335+ $(SOURCE_DIR)/readHex.h $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h \
336+ $(SOURCE_DIR)/verLoops.h $(SOURCE_DIR)/verLoops.c
337+ $(COMPILE_C) $(SOURCE_DIR)/verLoops.c
338+testfloat_ver$(OBJ): \
339+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
340+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/verCases.h \
341+ $(SOURCE_DIR)/writeCase.h $(SOURCE_DIR)/verLoops.h \
342+ $(SOURCE_DIR)/testfloat_ver.c
343+ $(COMPILE_C) $(SOURCE_DIR)/testfloat_ver.c
344+
345+testfloat_ver$(EXE): $(OBJS_TESTFLOAT_VER) testfloat$(LIB) $(SOFTFLOAT_LIB)
346+ $(LINK) $^ $(OTHER_LIBS)
347+
348+OBJS_TESTFLOAT = subjfloat$(OBJ) subjfloat_functions$(OBJ) testfloat$(OBJ)
349+
350+subjfloat$(OBJ): \
351+ platform.h $(SOFTFLOAT_H) $(SUBJ_SOURCE_DIR)/subjfloat_config.h \
352+ $(SOURCE_DIR)/subjfloat.h $(SUBJ_SOURCE_DIR)/subjfloat.c
353+ $(COMPILE_C) $(SUBJ_SOURCE_DIR)/subjfloat.c
354+subjfloat_functions$(OBJ): \
355+ platform.h $(SUBJ_SOURCE_DIR)/subjfloat_config.h $(SOURCE_DIR)/subjfloat.h \
356+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/subjfloat_functions.c
357+ $(COMPILE_C) $(SOURCE_DIR)/subjfloat_functions.c
358+testfloat$(OBJ): \
359+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
360+ $(SUBJ_SOURCE_DIR)/subjfloat_config.h $(SOURCE_DIR)/subjfloat.h \
361+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/verCases.h \
362+ $(SOURCE_DIR)/testLoops.h $(SOURCE_DIR)/testfloat.c
363+ $(COMPILE_C) $(SOURCE_DIR)/testfloat.c
364+
365+testfloat$(EXE): $(OBJS_TESTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
366+ $(LINK) $^ $(OTHER_LIBS)
367+
368+.PHONY: clean
369+clean:
370+ $(DELETE) $(OBJS_LIB) testfloat$(LIB)
371+ $(DELETE) $(OBJS_TESTSOFTFLOAT) testsoftfloat$(EXE)
372+ $(DELETE) $(OBJS_TIMESOFTFLOAT) timesoftfloat$(EXE)
373+ $(DELETE) $(OBJS_TESTFLOAT_GEN) testfloat_gen$(EXE)
374+ $(DELETE) $(OBJS_TESTFLOAT_VER) testfloat_ver$(EXE)
375+ $(DELETE) $(OBJS_TESTFLOAT) testfloat$(EXE)
376+
Andrew Geissler7f40b712020-05-15 14:09:53 -0500377diff --git a/TestFloat-3e/build/Linux-Cross-Compile/platform.h b/TestFloat-3e/build/Linux-Cross-Compile/platform.h
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500378new file mode 100644
Andrew Geissler7f40b712020-05-15 14:09:53 -0500379index 0000000..487a43b
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500380--- /dev/null
Andrew Geissler7f40b712020-05-15 14:09:53 -0500381+++ b/TestFloat-3e/build/Linux-Cross-Compile/platform.h
382@@ -0,0 +1,48 @@
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500383+
384+/*============================================================================
385+
Andrew Geissler7f40b712020-05-15 14:09:53 -0500386+This C header template is part of TestFloat, Release 3e, a package of programs
387+for testing the correctness of floating-point arithmetic complying with the
388+IEEE Standard for Floating-Point, by John R. Hauser.
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500389+
Andrew Geissler7f40b712020-05-15 14:09:53 -0500390+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
391+California. All rights reserved.
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500392+
393+Redistribution and use in source and binary forms, with or without
394+modification, are permitted provided that the following conditions are met:
395+
396+ 1. Redistributions of source code must retain the above copyright notice,
397+ this list of conditions, and the following disclaimer.
398+
399+ 2. Redistributions in binary form must reproduce the above copyright notice,
400+ this list of conditions, and the following disclaimer in the documentation
401+ and/or other materials provided with the distribution.
402+
403+ 3. Neither the name of the University nor the names of its contributors may
404+ be used to endorse or promote products derived from this software without
405+ specific prior written permission.
406+
407+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
408+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
409+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
410+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
411+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
412+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
413+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
414+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
415+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
416+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
417+
418+=============================================================================*/
419+
420+/*----------------------------------------------------------------------------
421+*----------------------------------------------------------------------------*/
422+#define LITTLEENDIAN 1
423+
424+/*----------------------------------------------------------------------------
425+*----------------------------------------------------------------------------*/
Andrew Geissler7f40b712020-05-15 14:09:53 -0500426+#ifdef __GNUC_STDC_INLINE__
427+#define INLINE inline
428+#else
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500429+#define INLINE extern inline
Andrew Geissler7f40b712020-05-15 14:09:53 -0500430+#endif
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500431--
Andrew Geissler7f40b712020-05-15 14:09:53 -05004322.7.4
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500433