diff options
author | John Hauser <jhauser@eecs.berkeley.edu> | 2014-12-11 14:38:33 -0800 |
---|---|---|
committer | John Hauser <jhauser@eecs.berkeley.edu> | 2014-12-11 14:38:33 -0800 |
commit | 57c49a74f9f4baf3ba864bbce35d975efd18a8e3 (patch) | |
tree | ba1b661fe576d24652f6611d60734901ccf63d7f /build/Linux-386-GCC | |
parent | ccc47aef4a2db923e7cfed2f5aab2363ecf6ff0e (diff) | |
download | berkeley-testfloat-3-57c49a74f9f4baf3ba864bbce35d975efd18a8e3.zip berkeley-testfloat-3-57c49a74f9f4baf3ba864bbce35d975efd18a8e3.tar.gz berkeley-testfloat-3-57c49a74f9f4baf3ba864bbce35d975efd18a8e3.tar.bz2 |
Update in RC for Release 3, fixing some bugs and improving the documentation.
Diffstat (limited to 'build/Linux-386-GCC')
-rw-r--r-- | build/Linux-386-GCC/Makefile | 70 | ||||
-rw-r--r-- | build/Linux-386-GCC/platform.h | 56 |
2 files changed, 77 insertions, 49 deletions
diff --git a/build/Linux-386-GCC/Makefile b/build/Linux-386-GCC/Makefile index ceaebb2..e543382 100644 --- a/build/Linux-386-GCC/Makefile +++ b/build/Linux-386-GCC/Makefile @@ -1,4 +1,37 @@ +#============================================================================= +# +# This Makefile is part of TestFloat, Release 3, a package of programs for +# testing the correctness of floating-point arithmetic complying with the IEEE +# Standard for Floating-Point, by John R. Hauser. +# +# Copyright 2011, 2012, 2013, 2014 The Regents of the University of California +# (Regents). All Rights Reserved. Redistribution and use in source and +# binary forms, with or without modification, are permitted provided that the +# following conditions are met: +# +# Redistributions of source code must retain the above copyright notice, +# this list of conditions, and the following two paragraphs of disclaimer. +# Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions, and the following two paragraphs of disclaimer in +# the documentation and/or other materials provided with the distribution. +# Neither the name of the Regents nor the names of its contributors may be +# used to endorse or promote products derived from this software without +# specific prior written permission. +# +# IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +# SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, +# ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF +# REGENTS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +# HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +# MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. +# +#============================================================================= + SOURCE_DIR = ../../source SUBJ_SOURCE_DIR = $(SOURCE_DIR)/subj-C SOFTFLOAT_DIR = ../../../berkeley-softfloat-rc3 @@ -10,19 +43,19 @@ SOFTFLOAT_H = \ $(SOFTFLOAT_INCLUDE_DIR)/softfloat.h SOFTFLOAT_LIB = $(SOFTFLOAT_DIR)/build/$(PLATFORM)/softfloat$(LIB) -TYPE_OPTS = -DEXTFLOAT80 -DFLOAT128 +TESTFLOAT_OPTS = -DEXTFLOAT80 -DFLOAT128 -DLONG_DOUBLE_IS_EXTFLOAT80 DELETE = rm -f C_INCLUDES = \ -I. -I$(SUBJ_SOURCE_DIR) -I$(SOURCE_DIR) -I$(SOFTFLOAT_INCLUDE_DIR) COMPILE_C = \ - gcc -c -Werror-implicit-function-declaration $(TYPE_OPTS) $(C_INCLUDES) -O2 \ - -o $@ + gcc -c -Werror-implicit-function-declaration $(TESTFLOAT_OPTS) \ + $(C_INCLUDES) -O2 -o $@ COMPILE_SLOWFLOAT_C = \ - gcc -c -Werror-implicit-function-declaration $(TYPE_OPTS) $(C_INCLUDES) -O3 \ - -o $@ + gcc -c -Werror-implicit-function-declaration $(TESTFLOAT_OPTS) \ + $(C_INCLUDES) -O3 -o $@ MAKELIB = ar crs $@ -LINK = gcc -o $@ +LINK = gcc -lm -o $@ OBJ = .o LIB = .a @@ -155,6 +188,7 @@ OBJS_LIB = \ fail$(OBJ) \ functions_common$(OBJ) \ functionInfos$(OBJ) \ + standardFunctionInfos$(OBJ) \ random$(OBJ) \ genCases_common$(OBJ) \ $(OBJS_GENCASES) \ @@ -166,11 +200,8 @@ OBJS_LIB = \ $(OBJS_WRITECASE) \ testLoops_common$(OBJ) \ $(OBJS_TEST) \ - standardFunctionInfos$(OBJ) \ - -#*** EVERYBODY SHOULD INCLUDE "platform.h", RIGHT? -uint128$(OBJ): platform.h $(SOURCE_DIR)/uint128.h +uint128$(OBJ): $(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 @@ -179,22 +210,19 @@ 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_f128$(OBJ): $(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 +writeHex$(OBJ): $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/writeHex.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 + $(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): platform.h $(SOURCE_DIR)/%.c $(COMPILE_C) $(SOURCE_DIR)/$*.c testfloat$(LIB): $(OBJS_LIB) $(MAKELIB) $^ @@ -261,11 +289,11 @@ testfloat_ver$(EXE): $(OBJS_TESTFLOAT_VER) testfloat$(LIB) $(SOFTFLOAT_LIB) OBJS_TESTFLOAT = subjfloat$(OBJ) subjfloat_functions$(OBJ) testfloat$(OBJ) subjfloat$(OBJ): \ - $(SOFTFLOAT_H) $(SUBJ_SOURCE_DIR)/subjfloat_config.h \ + platform.h $(SOFTFLOAT_H) $(SUBJ_SOURCE_DIR)/subjfloat_config.h \ $(SOURCE_DIR)/subjfloat.h $(SUBJ_SOURCE_DIR)/subjfloat.c $(COMPILE_C) $(SUBJ_SOURCE_DIR)/subjfloat.c subjfloat_functions$(OBJ): \ - $(SUBJ_SOURCE_DIR)/subjfloat_config.h $(SOURCE_DIR)/subjfloat.h \ + platform.h $(SUBJ_SOURCE_DIR)/subjfloat_config.h $(SOURCE_DIR)/subjfloat.h \ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/subjfloat_functions.c $(COMPILE_C) $(SOURCE_DIR)/subjfloat_functions.c testfloat$(OBJ): \ @@ -276,7 +304,7 @@ testfloat$(OBJ): \ $(COMPILE_C) $(SOURCE_DIR)/testfloat.c testfloat$(EXE): $(OBJS_TESTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB) - $(LINK) $^ -lm + $(LINK) $^ .PHONY: clean clean: diff --git a/build/Linux-386-GCC/platform.h b/build/Linux-386-GCC/platform.h index 2ea4f73..4b38236 100644 --- a/build/Linux-386-GCC/platform.h +++ b/build/Linux-386-GCC/platform.h @@ -1,34 +1,34 @@ /*============================================================================ -*** 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. +This C header file is part of TestFloat, Release 3, a package of programs for +testing the correctness of floating-point arithmetic complying with the IEEE +Standard for Floating-Point, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California +(Regents). All Rights Reserved. Redistribution and use in source and binary +forms, with or without modification, are permitted provided that the following +conditions are met: + +Redistributions of source code must retain the above copyright notice, +this list of conditions, and the following two paragraphs of disclaimer. +Redistributions in binary form must reproduce the above copyright notice, +this list of conditions, and the following two paragraphs of disclaimer in the +documentation and/or other materials provided with the distribution. Neither +the name of the Regents nor the names of its contributors may be used to +endorse or promote products derived from this software without specific prior +written permission. + +IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED +HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. =============================================================================*/ |