aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorJohn Hauser <jhauser@eecs.berkeley.edu>2014-11-28 21:07:26 -0800
committerJohn Hauser <jhauser@eecs.berkeley.edu>2014-11-28 21:07:26 -0800
commitd6feb3fa41c6b7ba1b5444ad147d8623138512c2 (patch)
tree09dd66c114bcc759fd86de0279c91a21d356235b /build
downloadberkeley-testfloat-3-d6feb3fa41c6b7ba1b5444ad147d8623138512c2.zip
berkeley-testfloat-3-d6feb3fa41c6b7ba1b5444ad147d8623138512c2.tar.gz
berkeley-testfloat-3-d6feb3fa41c6b7ba1b5444ad147d8623138512c2.tar.bz2
First draft of RC for Release 3, to start review process.
Diffstat (limited to 'build')
-rw-r--r--build/Linux-386-GCC/Makefile285
-rw-r--r--build/Linux-386-GCC/platform.h42
2 files changed, 327 insertions, 0 deletions
diff --git a/build/Linux-386-GCC/Makefile b/build/Linux-386-GCC/Makefile
new file mode 100644
index 0000000..3108628
--- /dev/null
+++ b/build/Linux-386-GCC/Makefile
@@ -0,0 +1,285 @@
+
+SOURCE_DIR = ../../source
+SOFTFLOAT_DIR = ../../../berkeley-softfloat-rc3
+SOFTFLOAT_INCLUDE_DIR = $(SOFTFLOAT_DIR)/source/include
+PLATFORM = Linux-386-GCC
+
+SOFTFLOAT_H = \
+ $(SOFTFLOAT_INCLUDE_DIR)/softfloat_types.h \
+ $(SOFTFLOAT_INCLUDE_DIR)/softfloat.h
+SOFTFLOAT_LIB = $(SOFTFLOAT_DIR)/build/$(PLATFORM)/softfloat$(LIB)
+
+TYPE_OPTS = -DEXTFLOAT80 -DFLOAT128
+
+DELETE = rm -f
+C_INCLUDES = -I. -I$(SOURCE_DIR) -I$(SOFTFLOAT_INCLUDE_DIR)
+COMPILE_C = \
+ gcc -c -Werror-implicit-function-declaration $(TYPE_OPTS) $(C_INCLUDES) -O2 \
+ -o $@
+COMPILE_SLOWFLOAT_C = \
+ gcc -c -Werror-implicit-function-declaration $(TYPE_OPTS) $(C_INCLUDES) -O3 \
+ -o $@
+MAKELIB = ar crs $@
+LINK = gcc -o $@
+
+OBJ = .o
+LIB = .a
+EXE =
+
+.PHONY: all
+all: \
+ testsoftfloat$(EXE) \
+ timesoftfloat$(EXE) \
+ testfloat_gen$(EXE) \
+ testfloat_ver$(EXE) \
+ testfloat$(EXE) \
+
+OBJS_GENCASES = \
+ genCases_ui32$(OBJ) \
+ genCases_ui64$(OBJ) \
+ genCases_i32$(OBJ) \
+ genCases_i64$(OBJ) \
+ genCases_f32$(OBJ) \
+ genCases_f64$(OBJ) \
+ genCases_extF80$(OBJ) \
+ genCases_f128$(OBJ) \
+
+OBJS_WRITECASE = \
+ writeCase_a_ui32$(OBJ) \
+ writeCase_a_ui64$(OBJ) \
+ writeCase_a_f32$(OBJ) \
+ writeCase_ab_f32$(OBJ) \
+ writeCase_abc_f32$(OBJ) \
+ writeCase_a_f64$(OBJ) \
+ writeCase_ab_f64$(OBJ) \
+ writeCase_abc_f64$(OBJ) \
+ writeCase_a_extF80M$(OBJ) \
+ writeCase_ab_extF80M$(OBJ) \
+ writeCase_abc_extF80M$(OBJ) \
+ writeCase_a_f128M$(OBJ) \
+ writeCase_ab_f128M$(OBJ) \
+ writeCase_abc_f128M$(OBJ) \
+ writeCase_z_bool$(OBJ) \
+ writeCase_z_ui32$(OBJ) \
+ writeCase_z_ui64$(OBJ) \
+ writeCase_z_f32$(OBJ) \
+ writeCase_z_f64$(OBJ) \
+ writeCase_z_extF80M$(OBJ) \
+ writeCase_z_f128M$(OBJ) \
+
+OBJS_TEST = \
+ test_a_ui32_z_f32$(OBJ) \
+ test_a_ui32_z_f64$(OBJ) \
+ test_a_ui32_z_extF80$(OBJ) \
+ test_a_ui32_z_f128$(OBJ) \
+ test_a_ui64_z_f32$(OBJ) \
+ test_a_ui64_z_f64$(OBJ) \
+ test_a_ui64_z_extF80$(OBJ) \
+ test_a_ui64_z_f128$(OBJ) \
+ test_a_i32_z_f32$(OBJ) \
+ test_a_i32_z_f64$(OBJ) \
+ test_a_i32_z_extF80$(OBJ) \
+ test_a_i32_z_f128$(OBJ) \
+ test_a_i64_z_f32$(OBJ) \
+ test_a_i64_z_f64$(OBJ) \
+ test_a_i64_z_extF80$(OBJ) \
+ test_a_i64_z_f128$(OBJ) \
+ test_a_f32_z_ui32_rx$(OBJ) \
+ test_a_f32_z_ui64_rx$(OBJ) \
+ test_a_f32_z_i32_rx$(OBJ) \
+ test_a_f32_z_i64_rx$(OBJ) \
+ test_a_f32_z_ui32_x$(OBJ) \
+ test_a_f32_z_ui64_x$(OBJ) \
+ test_a_f32_z_i32_x$(OBJ) \
+ test_a_f32_z_i64_x$(OBJ) \
+ test_a_f32_z_f64$(OBJ) \
+ test_a_f32_z_extF80$(OBJ) \
+ test_a_f32_z_f128$(OBJ) \
+ test_az_f32$(OBJ) \
+ test_az_f32_rx$(OBJ) \
+ test_abz_f32$(OBJ) \
+ test_abcz_f32$(OBJ) \
+ test_ab_f32_z_bool$(OBJ) \
+ test_a_f64_z_ui32_rx$(OBJ) \
+ test_a_f64_z_ui64_rx$(OBJ) \
+ test_a_f64_z_i32_rx$(OBJ) \
+ test_a_f64_z_i64_rx$(OBJ) \
+ test_a_f64_z_ui32_x$(OBJ) \
+ test_a_f64_z_ui64_x$(OBJ) \
+ test_a_f64_z_i32_x$(OBJ) \
+ test_a_f64_z_i64_x$(OBJ) \
+ test_a_f64_z_f32$(OBJ) \
+ test_a_f64_z_extF80$(OBJ) \
+ test_a_f64_z_f128$(OBJ) \
+ test_az_f64$(OBJ) \
+ test_az_f64_rx$(OBJ) \
+ test_abz_f64$(OBJ) \
+ test_abcz_f64$(OBJ) \
+ test_ab_f64_z_bool$(OBJ) \
+ test_a_extF80_z_ui32_rx$(OBJ) \
+ test_a_extF80_z_ui64_rx$(OBJ) \
+ test_a_extF80_z_i32_rx$(OBJ) \
+ test_a_extF80_z_i64_rx$(OBJ) \
+ test_a_extF80_z_ui32_x$(OBJ) \
+ test_a_extF80_z_ui64_x$(OBJ) \
+ test_a_extF80_z_i32_x$(OBJ) \
+ test_a_extF80_z_i64_x$(OBJ) \
+ test_a_extF80_z_f32$(OBJ) \
+ test_a_extF80_z_f64$(OBJ) \
+ test_a_extF80_z_f128$(OBJ) \
+ test_az_extF80$(OBJ) \
+ test_az_extF80_rx$(OBJ) \
+ test_abz_extF80$(OBJ) \
+ test_ab_extF80_z_bool$(OBJ) \
+ test_a_f128_z_ui32_rx$(OBJ) \
+ test_a_f128_z_ui64_rx$(OBJ) \
+ test_a_f128_z_i32_rx$(OBJ) \
+ test_a_f128_z_i64_rx$(OBJ) \
+ test_a_f128_z_ui32_x$(OBJ) \
+ test_a_f128_z_ui64_x$(OBJ) \
+ test_a_f128_z_i32_x$(OBJ) \
+ test_a_f128_z_i64_x$(OBJ) \
+ test_a_f128_z_f32$(OBJ) \
+ test_a_f128_z_f64$(OBJ) \
+ test_a_f128_z_extF80$(OBJ) \
+ test_az_f128$(OBJ) \
+ test_az_f128_rx$(OBJ) \
+ test_abz_f128$(OBJ) \
+ test_abcz_f128$(OBJ) \
+ test_ab_f128_z_bool$(OBJ) \
+
+OBJS_LIB = \
+ uint128$(OBJ) \
+ fail$(OBJ) \
+ functions_common$(OBJ) \
+ functionInfos$(OBJ) \
+ standardFunctionInfos$(OBJ) \
+ random$(OBJ) \
+ genCases_common$(OBJ) \
+ $(OBJS_GENCASES) \
+ genCases_writeTestsTotal$(OBJ) \
+ verCases_common$(OBJ) \
+ verCases_writeFunctionName$(OBJ) \
+ readHex$(OBJ) \
+ writeHex$(OBJ) \
+ $(OBJS_WRITECASE) \
+ testLoops_common$(OBJ) \
+ $(OBJS_TEST) \
+
+uint128$(OBJ): platform.h $(SOURCE_DIR)/uint128.h
+fail$(OBJ): $(SOURCE_DIR)/fail.h
+functions_common$(OBJ): $(SOFTFLOAT_H) $(SOURCE_DIR)/functions.h
+functionInfos$(OBJ): $(SOURCE_DIR)/functions.h
+random$(OBJ): $(SOURCE_DIR)/random.h
+genCases_common$(OBJ): $(SOURCE_DIR)/fail.h $(SOURCE_DIR)/genCases.h
+$(OBJS_GENCASES): \
+ $(SOURCE_DIR)/random.h $(SOFTFLOAT_H) $(SOURCE_DIR)/genCases.h
+genCases_f128$(OBJ): platform.h $(SOURCE_DIR)/uint128.h
+genCases_writeTestsTotal$(OBJ): $(SOURCE_DIR)/genCases.h
+verCases_common$(OBJ): $(SOURCE_DIR)/verCases.h
+verCases_writeFunctionName$(OBJ): $(SOURCE_DIR)/verCases.h
+readHex$(OBJ): $(SOURCE_DIR)/readHex.h
+writeHex$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/writeHex.h
+writeCase_common$(OBJ): $(SOURCE_DIR)/writeCase.h
+$(OBJS_WRITECASE): \
+ $(SOFTFLOAT_H) $(SOURCE_DIR)/writeHex.h $(SOURCE_DIR)/writeCase.h
+testLoops_common$(OBJ): $(SOURCE_DIR)/testLoops.h
+$(OBJS_TEST): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/genCases.h \
+ $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h $(SOURCE_DIR)/testLoops.h
+$(OBJS_LIB): %$(OBJ): $(SOURCE_DIR)/%.c
+ $(COMPILE_C) $(SOURCE_DIR)/$*.c
+testfloat$(LIB): $(OBJS_LIB)
+ $(MAKELIB) $^
+#*** RESTORE:
+# standardFunctionInfos$(OBJ): $(SOURCE_DIR)/functions.h
+
+OBJS_TESTSOFTFLOAT = slowfloat$(OBJ) testsoftfloat$(OBJ)
+
+slowfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/slowfloat.h \
+ $(SOURCE_DIR)/slowfloat.c
+ $(COMPILE_SLOWFLOAT_C) $(SOURCE_DIR)/slowfloat.c
+testsoftfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/slowfloat.h $(SOURCE_DIR)/functions.h \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h \
+ $(SOURCE_DIR)/testLoops.h $(SOURCE_DIR)/testsoftfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/testsoftfloat.c
+
+testsoftfloat$(EXE): $(OBJS_TESTSOFTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^
+
+OBJS_TIMESOFTFLOAT = timesoftfloat$(OBJ)
+
+timesoftfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/timesoftfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/timesoftfloat.c
+
+timesoftfloat$(EXE): $(OBJS_TIMESOFTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^
+
+OBJS_TESTFLOAT_GEN = genLoops$(OBJ) testfloat_gen$(OBJ)
+
+genLoops$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/writeHex.h $(SOURCE_DIR)/genLoops.h \
+ $(SOURCE_DIR)/genLoops.c
+ $(COMPILE_C) $(SOURCE_DIR)/genLoops.c
+testfloat_gen$(OBJ): \
+ $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) $(SOURCE_DIR)/functions.h \
+ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/genLoops.h \
+ $(SOURCE_DIR)/testfloat_gen.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat_gen.c
+
+testfloat_gen$(EXE): $(OBJS_TESTFLOAT_GEN) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^
+
+OBJS_TESTFLOAT_VER = verLoops$(OBJ) testfloat_ver$(OBJ)
+
+verLoops$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/readHex.h $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h \
+ $(SOURCE_DIR)/verLoops.h $(SOURCE_DIR)/verLoops.c
+ $(COMPILE_C) $(SOURCE_DIR)/verLoops.c
+testfloat_ver$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/verCases.h \
+ $(SOURCE_DIR)/writeCase.h $(SOURCE_DIR)/verLoops.h \
+ $(SOURCE_DIR)/testfloat_ver.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat_ver.c
+
+testfloat_ver$(EXE): $(OBJS_TESTFLOAT_VER) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^
+
+OBJS_TESTFLOAT = systfloat$(OBJ) systfloat_functions$(OBJ) testfloat$(OBJ)
+
+systfloat$(OBJ): \
+ $(SOFTFLOAT_H) $(SOURCE_DIR)/systfloat_config.h $(SOURCE_DIR)/systfloat.h \
+ $(SOURCE_DIR)/systfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/systfloat.c
+systfloat_functions$(OBJ): \
+ $(SOURCE_DIR)/systfloat_config.h $(SOURCE_DIR)/systfloat.h \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/systfloat_functions.c
+ $(COMPILE_C) $(SOURCE_DIR)/systfloat_functions.c
+testfloat$(OBJ): \
+ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \
+ $(SOURCE_DIR)/systfloat_config.h $(SOURCE_DIR)/systfloat.h \
+ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/verCases.h \
+ $(SOURCE_DIR)/writeCase.h $(SOURCE_DIR)/testLoops.h $(SOURCE_DIR)/testfloat.c
+ $(COMPILE_C) $(SOURCE_DIR)/testfloat.c
+
+testfloat$(EXE): $(OBJS_TESTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB)
+ $(LINK) $^ -lm
+
+.PHONY: clean
+clean:
+ $(DELETE) $(OBJS_LIB) testfloat$(LIB)
+ $(DELETE) $(OBJS_TESTSOFTFLOAT) testsoftfloat$(EXE)
+ $(DELETE) $(OBJS_TIMESOFTFLOAT) timesoftfloat$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT_GEN) testfloat_gen$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT_VER) testfloat_ver$(EXE)
+ $(DELETE) $(OBJS_TESTFLOAT) testfloat$(EXE)
+
diff --git a/build/Linux-386-GCC/platform.h b/build/Linux-386-GCC/platform.h
new file mode 100644
index 0000000..2ea4f73
--- /dev/null
+++ b/build/Linux-386-GCC/platform.h
@@ -0,0 +1,42 @@
+
+/*============================================================================
+
+*** FIX.
+
+This C source fragment is part of the SoftFloat IEC/IEEE Floating-point
+Arithmetic Package, Release 2b.
+
+Written by John R. Hauser. This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704. Funding was partially provided by the
+National Science Foundation under grant MIP-9311980. The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek. More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html'.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define LITTLEENDIAN 1
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#define INLINE extern inline
+