From 06b20075dd3c1a5d0dd007a93643282832221612 Mon Sep 17 00:00:00 2001 From: John Hauser Date: Fri, 26 Jan 2018 12:52:36 -0800 Subject: Release 3e. See "doc/TestFloat-history.html". --- COPYING.txt | 8 +- README.html | 4 +- README.md | 4 +- README.txt | 4 +- build/Linux-386-GCC/Makefile | 2 +- build/Linux-386-GCC/platform.h | 2 +- build/Linux-386-SSE2-GCC/Makefile | 2 +- build/Linux-386-SSE2-GCC/platform.h | 2 +- build/Linux-ARM-VFPv2-GCC/Makefile | 353 +++++++++++++++++++++++++++++++++++ build/Linux-ARM-VFPv2-GCC/platform.h | 49 +++++ build/Linux-x86_64-GCC/Makefile | 2 +- build/Linux-x86_64-GCC/platform.h | 2 +- build/Win32-MinGW/Makefile | 2 +- build/Win32-MinGW/platform.h | 2 +- build/Win32-SSE2-MinGW/Makefile | 2 +- build/Win32-SSE2-MinGW/platform.h | 2 +- build/Win64-MinGW-w64/Makefile | 2 +- build/Win64-MinGW-w64/platform.h | 2 +- build/template/Makefile | 2 +- build/template/platform.h | 2 +- doc/TestFloat-general.html | 60 +++--- doc/TestFloat-history.html | 34 +++- doc/TestFloat-source.html | 23 +-- doc/testfloat.html | 21 ++- doc/testfloat_gen.html | 4 +- doc/testfloat_ver.html | 21 ++- doc/testsoftfloat.html | 4 +- doc/timesoftfloat.html | 4 +- source/fail.c | 2 +- source/fail.h | 2 +- source/functionInfos.c | 2 +- source/functions.h | 2 +- source/functions_common.c | 2 +- source/genCases.h | 2 +- source/genCases_common.c | 2 +- source/genCases_extF80.c | 2 +- source/genCases_f128.c | 2 +- source/genCases_f16.c | 2 +- source/genCases_f32.c | 2 +- source/genCases_f64.c | 2 +- source/genCases_i32.c | 2 +- source/genCases_i64.c | 2 +- source/genCases_ui32.c | 2 +- source/genCases_ui64.c | 2 +- source/genCases_writeTestsTotal.c | 2 +- source/genLoops.c | 2 +- source/genLoops.h | 2 +- source/random.c | 2 +- source/random.h | 2 +- source/readHex.c | 2 +- source/readHex.h | 2 +- source/slowfloat.c | 99 +++++----- source/slowfloat.h | 2 +- source/standardFunctionInfos.c | 2 +- source/subj-C/subjfloat.c | 2 +- source/subjfloat.h | 2 +- source/subjfloat_functions.c | 2 +- source/testLoops.h | 2 +- source/testLoops_common.c | 2 +- source/test_a_extF80_z_f128.c | 2 +- source/test_a_extF80_z_f16.c | 2 +- source/test_a_extF80_z_f32.c | 2 +- source/test_a_extF80_z_f64.c | 2 +- source/test_a_extF80_z_i32_rx.c | 18 +- source/test_a_extF80_z_i32_x.c | 18 +- source/test_a_extF80_z_i64_rx.c | 19 +- source/test_a_extF80_z_i64_x.c | 19 +- source/test_a_extF80_z_ui32_rx.c | 16 +- source/test_a_extF80_z_ui32_x.c | 16 +- source/test_a_extF80_z_ui64_rx.c | 16 +- source/test_a_extF80_z_ui64_x.c | 16 +- source/test_a_f128_z_extF80.c | 2 +- source/test_a_f128_z_f16.c | 2 +- source/test_a_f128_z_f32.c | 2 +- source/test_a_f128_z_f64.c | 2 +- source/test_a_f128_z_i32_rx.c | 17 +- source/test_a_f128_z_i32_x.c | 17 +- source/test_a_f128_z_i64_rx.c | 18 +- source/test_a_f128_z_i64_x.c | 18 +- source/test_a_f128_z_ui32_rx.c | 16 +- source/test_a_f128_z_ui32_x.c | 16 +- source/test_a_f128_z_ui64_rx.c | 16 +- source/test_a_f128_z_ui64_x.c | 16 +- source/test_a_f16_z_extF80.c | 2 +- source/test_a_f16_z_f128.c | 2 +- source/test_a_f16_z_f32.c | 2 +- source/test_a_f16_z_f64.c | 2 +- source/test_a_f16_z_i32_rx.c | 14 +- source/test_a_f16_z_i32_x.c | 14 +- source/test_a_f16_z_i64_rx.c | 16 +- source/test_a_f16_z_i64_x.c | 16 +- source/test_a_f16_z_ui32_rx.c | 13 +- source/test_a_f16_z_ui32_x.c | 13 +- source/test_a_f16_z_ui64_rx.c | 13 +- source/test_a_f16_z_ui64_x.c | 13 +- source/test_a_f32_z_extF80.c | 2 +- source/test_a_f32_z_f128.c | 2 +- source/test_a_f32_z_f16.c | 2 +- source/test_a_f32_z_f64.c | 2 +- source/test_a_f32_z_i32_rx.c | 16 +- source/test_a_f32_z_i32_x.c | 16 +- source/test_a_f32_z_i64_rx.c | 18 +- source/test_a_f32_z_i64_x.c | 18 +- source/test_a_f32_z_ui32_rx.c | 15 +- source/test_a_f32_z_ui32_x.c | 15 +- source/test_a_f32_z_ui64_rx.c | 15 +- source/test_a_f32_z_ui64_x.c | 15 +- source/test_a_f64_z_extF80.c | 2 +- source/test_a_f64_z_f128.c | 2 +- source/test_a_f64_z_f16.c | 2 +- source/test_a_f64_z_f32.c | 2 +- source/test_a_f64_z_i32_rx.c | 14 +- source/test_a_f64_z_i32_x.c | 14 +- source/test_a_f64_z_i64_rx.c | 16 +- source/test_a_f64_z_i64_x.c | 16 +- source/test_a_f64_z_ui32_rx.c | 13 +- source/test_a_f64_z_ui32_x.c | 13 +- source/test_a_f64_z_ui64_rx.c | 13 +- source/test_a_f64_z_ui64_x.c | 13 +- source/test_a_i32_z_extF80.c | 2 +- source/test_a_i32_z_f128.c | 2 +- source/test_a_i32_z_f16.c | 2 +- source/test_a_i32_z_f32.c | 2 +- source/test_a_i32_z_f64.c | 2 +- source/test_a_i64_z_extF80.c | 2 +- source/test_a_i64_z_f128.c | 2 +- source/test_a_i64_z_f16.c | 2 +- source/test_a_i64_z_f32.c | 2 +- source/test_a_i64_z_f64.c | 2 +- source/test_a_ui32_z_extF80.c | 2 +- source/test_a_ui32_z_f128.c | 2 +- source/test_a_ui32_z_f16.c | 2 +- source/test_a_ui32_z_f32.c | 2 +- source/test_a_ui32_z_f64.c | 2 +- source/test_a_ui64_z_extF80.c | 2 +- source/test_a_ui64_z_f128.c | 2 +- source/test_a_ui64_z_f16.c | 2 +- source/test_a_ui64_z_f32.c | 2 +- source/test_a_ui64_z_f64.c | 2 +- source/test_ab_extF80_z_bool.c | 2 +- source/test_ab_f128_z_bool.c | 2 +- source/test_ab_f16_z_bool.c | 2 +- source/test_ab_f32_z_bool.c | 2 +- source/test_ab_f64_z_bool.c | 2 +- source/test_abcz_f128.c | 2 +- source/test_abcz_f16.c | 2 +- source/test_abcz_f32.c | 2 +- source/test_abcz_f64.c | 2 +- source/test_abz_extF80.c | 2 +- source/test_abz_f128.c | 2 +- source/test_abz_f16.c | 2 +- source/test_abz_f32.c | 2 +- source/test_abz_f64.c | 2 +- source/test_az_extF80.c | 2 +- source/test_az_extF80_rx.c | 2 +- source/test_az_f128.c | 2 +- source/test_az_f128_rx.c | 2 +- source/test_az_f16.c | 2 +- source/test_az_f16_rx.c | 2 +- source/test_az_f32.c | 2 +- source/test_az_f32_rx.c | 2 +- source/test_az_f64.c | 2 +- source/test_az_f64_rx.c | 2 +- source/testfloat.c | 76 ++++---- source/testfloat_gen.c | 2 +- source/testfloat_ver.c | 18 +- source/testsoftfloat.c | 45 ++--- source/timesoftfloat.c | 2 +- source/uint128.c | 2 +- source/uint128.h | 2 +- source/uint128_inline.c | 2 +- source/verCases.h | 6 +- source/verCases_common.c | 5 +- source/verCases_inline.c | 2 +- source/verCases_writeFunctionName.c | 2 +- source/verLoops.c | 324 +++++++++++--------------------- source/verLoops.h | 2 +- source/writeCase.h | 2 +- source/writeCase_a_extF80M.c | 2 +- source/writeCase_a_f128M.c | 2 +- source/writeCase_a_f16.c | 2 +- source/writeCase_a_f32.c | 2 +- source/writeCase_a_f64.c | 2 +- source/writeCase_a_ui32.c | 2 +- source/writeCase_a_ui64.c | 2 +- source/writeCase_ab_extF80M.c | 2 +- source/writeCase_ab_f128M.c | 2 +- source/writeCase_ab_f16.c | 2 +- source/writeCase_ab_f32.c | 2 +- source/writeCase_ab_f64.c | 2 +- source/writeCase_abc_f128M.c | 2 +- source/writeCase_abc_f16.c | 2 +- source/writeCase_abc_f32.c | 2 +- source/writeCase_abc_f64.c | 2 +- source/writeCase_z_bool.c | 2 +- source/writeCase_z_extF80M.c | 2 +- source/writeCase_z_f128M.c | 2 +- source/writeCase_z_f16.c | 2 +- source/writeCase_z_f32.c | 2 +- source/writeCase_z_f64.c | 2 +- source/writeCase_z_ui32.c | 2 +- source/writeCase_z_ui64.c | 2 +- source/writeHex.c | 2 +- source/writeHex.h | 2 +- 204 files changed, 1112 insertions(+), 964 deletions(-) create mode 100644 build/Linux-ARM-VFPv2-GCC/Makefile create mode 100644 build/Linux-ARM-VFPv2-GCC/platform.h diff --git a/COPYING.txt b/COPYING.txt index faf2001..196f34d 100644 --- a/COPYING.txt +++ b/COPYING.txt @@ -1,13 +1,13 @@ -License for Berkeley TestFloat Release 3d +License for Berkeley TestFloat Release 3e John R. Hauser -2017 August 18 +2018 January 20 -The following applies to the whole of TestFloat Release 3d as well as to +The following applies to the whole of TestFloat Release 3e as well as to each source file individually. -Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the University of California. All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/README.html b/README.html index 80c645c..131968e 100644 --- a/README.html +++ b/README.html @@ -7,11 +7,11 @@ -

Package Overview for Berkeley TestFloat Release 3d

+

Package Overview for Berkeley TestFloat Release 3e

John R. Hauser
-2017 August 18
+2018 January 20

diff --git a/README.md b/README.md index d4cee62..e87a854 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -Package Overview for Berkeley TestFloat Release 3d +Package Overview for Berkeley TestFloat Release 3e ================================================== John R. Hauser
-2017 August 18 +2018 January 20 Berkeley TestFloat is a small collection of programs for testing that an diff --git a/README.txt b/README.txt index e736084..9bbda57 100644 --- a/README.txt +++ b/README.txt @@ -1,8 +1,8 @@ -Package Overview for Berkeley TestFloat Release 3d +Package Overview for Berkeley TestFloat Release 3e John R. Hauser -2017 August 18 +2018 January 20 Berkeley TestFloat is a small collection of programs for testing that an implementation of binary floating-point conforms to the IEEE Standard for diff --git a/build/Linux-386-GCC/Makefile b/build/Linux-386-GCC/Makefile index 9c3ffbe..4c420e0 100644 --- a/build/Linux-386-GCC/Makefile +++ b/build/Linux-386-GCC/Makefile @@ -1,7 +1,7 @@ #============================================================================= # -# This Makefile is part of TestFloat, Release 3d, a package of programs for +# This Makefile is part of TestFloat, Release 3e, a package of programs for # testing the correctness of floating-point arithmetic complying with the IEEE # Standard for Floating-Point, by John R. Hauser. # diff --git a/build/Linux-386-GCC/platform.h b/build/Linux-386-GCC/platform.h index 802bc4c..8b0de31 100644 --- a/build/Linux-386-GCC/platform.h +++ b/build/Linux-386-GCC/platform.h @@ -1,7 +1,7 @@ /*============================================================================ -This C header file is part of TestFloat, Release 3d, a package of programs for +This C header file is part of TestFloat, Release 3e, a package of programs for testing the correctness of floating-point arithmetic complying with the IEEE Standard for Floating-Point, by John R. Hauser. diff --git a/build/Linux-386-SSE2-GCC/Makefile b/build/Linux-386-SSE2-GCC/Makefile index 42f579d..b98d6b9 100644 --- a/build/Linux-386-SSE2-GCC/Makefile +++ b/build/Linux-386-SSE2-GCC/Makefile @@ -1,7 +1,7 @@ #============================================================================= # -# This Makefile is part of TestFloat, Release 3d, a package of programs for +# This Makefile is part of TestFloat, Release 3e, a package of programs for # testing the correctness of floating-point arithmetic complying with the IEEE # Standard for Floating-Point, by John R. Hauser. # diff --git a/build/Linux-386-SSE2-GCC/platform.h b/build/Linux-386-SSE2-GCC/platform.h index 802bc4c..8b0de31 100644 --- a/build/Linux-386-SSE2-GCC/platform.h +++ b/build/Linux-386-SSE2-GCC/platform.h @@ -1,7 +1,7 @@ /*============================================================================ -This C header file is part of TestFloat, Release 3d, a package of programs for +This C header file is part of TestFloat, Release 3e, a package of programs for testing the correctness of floating-point arithmetic complying with the IEEE Standard for Floating-Point, by John R. Hauser. diff --git a/build/Linux-ARM-VFPv2-GCC/Makefile b/build/Linux-ARM-VFPv2-GCC/Makefile new file mode 100644 index 0000000..2c47a5b --- /dev/null +++ b/build/Linux-ARM-VFPv2-GCC/Makefile @@ -0,0 +1,353 @@ + +#============================================================================= +# +# This Makefile is part of TestFloat, Release 3e, 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, 2015, 2016, 2017 The Regents of the +# University of California. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions, and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions, and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# 3. Neither the name of the University nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +#============================================================================= + +SOURCE_DIR ?= ../../source +SOFTFLOAT_DIR ?= ../../../berkeley-softfloat-3 +PLATFORM ?= Linux-ARM-VFPv2-GCC + +SUBJ_SOURCE_DIR = $(SOURCE_DIR)/subj-C +SOFTFLOAT_INCLUDE_DIR = $(SOFTFLOAT_DIR)/source/include + +SOFTFLOAT_H = \ + $(SOFTFLOAT_INCLUDE_DIR)/softfloat_types.h \ + $(SOFTFLOAT_INCLUDE_DIR)/softfloat.h +SOFTFLOAT_LIB = $(SOFTFLOAT_DIR)/build/$(PLATFORM)/softfloat$(LIB) + +TESTFLOAT_OPTS ?= -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD + +DELETE = rm -f +C_INCLUDES = \ + -I. -I$(SUBJ_SOURCE_DIR) -I$(SOURCE_DIR) -I$(SOFTFLOAT_INCLUDE_DIR) +COMPILE_C = \ + gcc -std=c99 -c -Werror-implicit-function-declaration $(TESTFLOAT_OPTS) \ + $(C_INCLUDES) -O2 -o $@ +COMPILE_SLOWFLOAT_C = \ + gcc -std=c99 -c -Werror-implicit-function-declaration $(TESTFLOAT_OPTS) \ + $(C_INCLUDES) -O3 -o $@ +MAKELIB = ar crs $@ +LINK = gcc -o $@ +OTHER_LIBS = -lm + +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_f16$(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_f16$(OBJ) \ + writeCase_ab_f16$(OBJ) \ + writeCase_abc_f16$(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_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_f16$(OBJ) \ + writeCase_z_f32$(OBJ) \ + writeCase_z_f64$(OBJ) \ + writeCase_z_extF80M$(OBJ) \ + writeCase_z_f128M$(OBJ) \ + +OBJS_TEST = \ + test_a_ui32_z_f16$(OBJ) \ + 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_f16$(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_f16$(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_f16$(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_f16_z_ui32_rx$(OBJ) \ + test_a_f16_z_ui64_rx$(OBJ) \ + test_a_f16_z_i32_rx$(OBJ) \ + test_a_f16_z_i64_rx$(OBJ) \ + test_a_f16_z_ui32_x$(OBJ) \ + test_a_f16_z_ui64_x$(OBJ) \ + test_a_f16_z_i32_x$(OBJ) \ + test_a_f16_z_i64_x$(OBJ) \ + test_a_f16_z_f32$(OBJ) \ + test_a_f16_z_f64$(OBJ) \ + test_a_f16_z_extF80$(OBJ) \ + test_a_f16_z_f128$(OBJ) \ + test_az_f16$(OBJ) \ + test_az_f16_rx$(OBJ) \ + test_abz_f16$(OBJ) \ + test_abcz_f16$(OBJ) \ + test_ab_f16_z_bool$(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_f16$(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_f16$(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_f16$(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_f16$(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_inline$(OBJ) \ + uint128$(OBJ) \ + fail$(OBJ) \ + functions_common$(OBJ) \ + functionInfos$(OBJ) \ + standardFunctionInfos$(OBJ) \ + random$(OBJ) \ + genCases_common$(OBJ) \ + $(OBJS_GENCASES) \ + genCases_writeTestsTotal$(OBJ) \ + verCases_inline$(OBJ) \ + verCases_common$(OBJ) \ + verCases_writeFunctionName$(OBJ) \ + readHex$(OBJ) \ + writeHex$(OBJ) \ + $(OBJS_WRITECASE) \ + testLoops_common$(OBJ) \ + $(OBJS_TEST) \ + +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 +standardFunctionInfos$(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): $(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): $(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): \ + $(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) $^ + +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) $^ $(OTHER_LIBS) + +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) $^ $(OTHER_LIBS) + +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) $^ $(OTHER_LIBS) + +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) $^ $(OTHER_LIBS) + +OBJS_TESTFLOAT = subjfloat$(OBJ) subjfloat_functions$(OBJ) testfloat$(OBJ) + +subjfloat$(OBJ): \ + 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): \ + 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): \ + platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \ + $(SUBJ_SOURCE_DIR)/subjfloat_config.h $(SOURCE_DIR)/subjfloat.h \ + $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/verCases.h \ + $(SOURCE_DIR)/testLoops.h $(SOURCE_DIR)/testfloat.c + $(COMPILE_C) $(SOURCE_DIR)/testfloat.c + +testfloat$(EXE): $(OBJS_TESTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB) + $(LINK) $^ $(OTHER_LIBS) + +.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-ARM-VFPv2-GCC/platform.h b/build/Linux-ARM-VFPv2-GCC/platform.h new file mode 100644 index 0000000..8b0de31 --- /dev/null +++ b/build/Linux-ARM-VFPv2-GCC/platform.h @@ -0,0 +1,49 @@ + +/*============================================================================ + +This C header file is part of TestFloat, Release 3e, 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, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +/*---------------------------------------------------------------------------- +*----------------------------------------------------------------------------*/ +#define LITTLEENDIAN 1 + +/*---------------------------------------------------------------------------- +*----------------------------------------------------------------------------*/ +#ifdef __GNUC_STDC_INLINE__ +#define INLINE inline +#else +#define INLINE extern inline +#endif + diff --git a/build/Linux-x86_64-GCC/Makefile b/build/Linux-x86_64-GCC/Makefile index ffccb0d..49726fd 100644 --- a/build/Linux-x86_64-GCC/Makefile +++ b/build/Linux-x86_64-GCC/Makefile @@ -1,7 +1,7 @@ #============================================================================= # -# This Makefile is part of TestFloat, Release 3d, a package of programs for +# This Makefile is part of TestFloat, Release 3e, a package of programs for # testing the correctness of floating-point arithmetic complying with the IEEE # Standard for Floating-Point, by John R. Hauser. # diff --git a/build/Linux-x86_64-GCC/platform.h b/build/Linux-x86_64-GCC/platform.h index 802bc4c..8b0de31 100644 --- a/build/Linux-x86_64-GCC/platform.h +++ b/build/Linux-x86_64-GCC/platform.h @@ -1,7 +1,7 @@ /*============================================================================ -This C header file is part of TestFloat, Release 3d, a package of programs for +This C header file is part of TestFloat, Release 3e, a package of programs for testing the correctness of floating-point arithmetic complying with the IEEE Standard for Floating-Point, by John R. Hauser. diff --git a/build/Win32-MinGW/Makefile b/build/Win32-MinGW/Makefile index 34f0ce8..662d20b 100644 --- a/build/Win32-MinGW/Makefile +++ b/build/Win32-MinGW/Makefile @@ -1,7 +1,7 @@ #============================================================================= # -# This Makefile is part of TestFloat, Release 3d, a package of programs for +# This Makefile is part of TestFloat, Release 3e, a package of programs for # testing the correctness of floating-point arithmetic complying with the IEEE # Standard for Floating-Point, by John R. Hauser. # diff --git a/build/Win32-MinGW/platform.h b/build/Win32-MinGW/platform.h index 802bc4c..8b0de31 100644 --- a/build/Win32-MinGW/platform.h +++ b/build/Win32-MinGW/platform.h @@ -1,7 +1,7 @@ /*============================================================================ -This C header file is part of TestFloat, Release 3d, a package of programs for +This C header file is part of TestFloat, Release 3e, a package of programs for testing the correctness of floating-point arithmetic complying with the IEEE Standard for Floating-Point, by John R. Hauser. diff --git a/build/Win32-SSE2-MinGW/Makefile b/build/Win32-SSE2-MinGW/Makefile index cf02838..76ccce8 100644 --- a/build/Win32-SSE2-MinGW/Makefile +++ b/build/Win32-SSE2-MinGW/Makefile @@ -1,7 +1,7 @@ #============================================================================= # -# This Makefile is part of TestFloat, Release 3d, a package of programs for +# This Makefile is part of TestFloat, Release 3e, a package of programs for # testing the correctness of floating-point arithmetic complying with the IEEE # Standard for Floating-Point, by John R. Hauser. # diff --git a/build/Win32-SSE2-MinGW/platform.h b/build/Win32-SSE2-MinGW/platform.h index 802bc4c..8b0de31 100644 --- a/build/Win32-SSE2-MinGW/platform.h +++ b/build/Win32-SSE2-MinGW/platform.h @@ -1,7 +1,7 @@ /*============================================================================ -This C header file is part of TestFloat, Release 3d, a package of programs for +This C header file is part of TestFloat, Release 3e, a package of programs for testing the correctness of floating-point arithmetic complying with the IEEE Standard for Floating-Point, by John R. Hauser. diff --git a/build/Win64-MinGW-w64/Makefile b/build/Win64-MinGW-w64/Makefile index 4339beb..7e1d07e 100644 --- a/build/Win64-MinGW-w64/Makefile +++ b/build/Win64-MinGW-w64/Makefile @@ -1,7 +1,7 @@ #============================================================================= # -# This Makefile is part of TestFloat, Release 3d, a package of programs for +# This Makefile is part of TestFloat, Release 3e, a package of programs for # testing the correctness of floating-point arithmetic complying with the IEEE # Standard for Floating-Point, by John R. Hauser. # diff --git a/build/Win64-MinGW-w64/platform.h b/build/Win64-MinGW-w64/platform.h index 802bc4c..8b0de31 100644 --- a/build/Win64-MinGW-w64/platform.h +++ b/build/Win64-MinGW-w64/platform.h @@ -1,7 +1,7 @@ /*============================================================================ -This C header file is part of TestFloat, Release 3d, a package of programs for +This C header file is part of TestFloat, Release 3e, a package of programs for testing the correctness of floating-point arithmetic complying with the IEEE Standard for Floating-Point, by John R. Hauser. diff --git a/build/template/Makefile b/build/template/Makefile index 30c18fd..ba6652e 100644 --- a/build/template/Makefile +++ b/build/template/Makefile @@ -1,7 +1,7 @@ #============================================================================= # -# This Makefile template is part of TestFloat, Release 3d, a package of +# This Makefile template is part of TestFloat, Release 3e, a package of # programs for testing the correctness of floating-point arithmetic complying # with the IEEE Standard for Floating-Point, by John R. Hauser. # diff --git a/build/template/platform.h b/build/template/platform.h index d0cb069..45042e6 100644 --- a/build/template/platform.h +++ b/build/template/platform.h @@ -1,7 +1,7 @@ /*============================================================================ -This C header template is part of TestFloat, Release 3d, a package of programs +This C header template is part of TestFloat, Release 3e, a package of programs for testing the correctness of floating-point arithmetic complying with the IEEE Standard for Floating-Point, by John R. Hauser. diff --git a/doc/TestFloat-general.html b/doc/TestFloat-general.html index c82f06e..55f67d7 100644 --- a/doc/TestFloat-general.html +++ b/doc/TestFloat-general.html @@ -7,11 +7,11 @@ -

Berkeley TestFloat Release 3d: General Documentation

+

Berkeley TestFloat Release 3e: General Documentation

John R. Hauser
-2017 August 18
+2018 January 20

@@ -78,16 +78,24 @@ Details about the standard are available elsewhere.

-The current version of TestFloat is Release 3d. -This version differs from earlier releases 3b and 3c in only minor -ways. -Compared to the original Release 3, Release 3b added -the ability to test the 16-bit half-precision format, while +The current version of TestFloat is Release 3e. +This version differs from earlier releases 3b through 3d in only minor ways. +Compared to the original Release 3: +

+This release adds a few more small improvements, including modifying the +expected behavior of rounding mode odd and fixing a minor bug in +the all-in-one testfloat program.

@@ -124,7 +132,7 @@ bugs can be found through links posted on the TestFloat Web page, The TestFloat package was written by me, John R. Hauser. Release 3 of TestFloat was a completely new implementation supplanting earlier releases. -The project to create Release 3 (now through 3d) was +The project to create Release 3 (now through 3e) was done in the employ of the University of California, Berkeley, within the Department of Electrical Engineering and Computer Sciences, first for the Parallel Computing Laboratory (Par Lab) and then for the ASPIRE Lab. @@ -158,12 +166,12 @@ Oracle, and Samsung.

-The following applies to the whole of TestFloat Release 3d as well +The following applies to the whole of TestFloat Release 3e as well as to each source file individually.

-Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the University of California. All rights reserved.

@@ -280,8 +288,9 @@ Any NaN is considered as good a result as another. This laxness can be overridden so that TestFloat checks for particular bit patterns within NaN results. See section 8 below, Variations Allowed by the IEEE -Floating-Point Standard, plus the -checkNaNs option documented -for programs testfloat_ver and testfloat. +Floating-Point Standard, plus the -checkNaNs and +-checkInvInts options documented for programs +testfloat_ver and testfloat.

@@ -585,13 +594,6 @@ Conversions to integer types are expected never to raise the overflow exception.

-

-When converting to an integer, if the rounding mode is odd -(possible only when the rounding mode is not in the function name), TestFloat -expects the result to be rounded not to an odd integer but rather to -minimum magnitude, the same as when the rounding mode is minMag. -

-

6.2. Basic Arithmetic Operations

@@ -691,13 +693,6 @@ This irregular system follows the IEEE Standard’s particular specification for the round-to-integer operations.

-

-If the rounding mode is odd (possible only when the rounding mode -is not in the function name), TestFloat expects the result to be rounded -not to an odd integer but rather to minimum magnitude, the same as -when the rounding mode is minMag. -

-

6.6. Comparison Operations

@@ -1131,7 +1126,12 @@ exception if the source value cannot be rounded to a representable integer. In such cases, TestFloat expects the result value to be the largest-magnitude positive or negative integer or zero, as detailed earlier in section 6.1, Conversion Operations. -The current version of TestFloat provides no means to alter these expectations. +If option -checkInvInts is selected with programs +testfloat_ver and testfloat, integer results of +invalid operations are checked for an exact match. +In order for this option to be sensible, TestFloat must have been compiled so +that its internal floating-point implementation (SoftFloat) generates the +proper integer results for the system being tested.

diff --git a/doc/TestFloat-history.html b/doc/TestFloat-history.html index ed34043..1c247de 100644 --- a/doc/TestFloat-history.html +++ b/doc/TestFloat-history.html @@ -7,11 +7,11 @@ -

History of Berkeley TestFloat, to Release 3d

+

History of Berkeley TestFloat, to Release 3e

John R. Hauser
-2017 August 18
+2018 January 20

@@ -23,13 +23,41 @@ corresponding release of SoftFloat.

+

Release 3e (2018 January)

+ + + +

Release 3d (2017 August)