Package Overview for Berkeley TestFloat Release 3e
+
+
+John R. Hauser
+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
+Floating-Point Arithmetic.
+TestFloat is distributed in the form of C source code.
+
+
+
+The TestFloat package is documented in the following files in the
+doc subdirectory:
+
+Other files in the package comprise the source code for TestFloat.
+
+
+
+
diff --git a/src/libs/softfloat-3e/testfloat/README.txt b/src/libs/softfloat-3e/testfloat/README.txt
new file mode 100644
index 00000000..9bbda571
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/README.txt
@@ -0,0 +1,26 @@
+
+Package Overview for Berkeley TestFloat Release 3e
+
+John R. Hauser
+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
+Floating-Point Arithmetic. TestFloat is distributed in the form of C source
+code.
+
+The TestFloat package is documented in the following files in the "doc"
+subdirectory:
+
+ TestFloat-general.html General documentation for understanding and using
+ the TestFloat programs.
+ testfloat_gen.html \
+ testfloat_ver.html | Specific documentation for each TestFloat
+ testfloat.html | program.
+ testsoftfloat.html |
+ timesoftfloat.html /
+ TestFloat-source.html Documentation for building TestFloat.
+ TestFloat-history.html History of the major changes to TestFloat.
+
+Other files in the package comprise the source code for TestFloat.
+
diff --git a/src/libs/softfloat-3e/testfloat/build/Linux-386-GCC/Makefile b/src/libs/softfloat-3e/testfloat/build/Linux-386-GCC/Makefile
new file mode 100644
index 00000000..8f36554a
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Linux-386-GCC/Makefile
@@ -0,0 +1,355 @@
+
+#=============================================================================
+#
+# 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 ?= ../../../SoftFloat-3e
+PLATFORM ?= Linux-386-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 \
+ -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 $(TESTFLOAT_OPTS) \
+ $(C_INCLUDES) -O2 -o $@
+COMPILE_SLOWFLOAT_C = \
+ gcc -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/src/libs/softfloat-3e/testfloat/build/Linux-386-GCC/platform.h b/src/libs/softfloat-3e/testfloat/build/Linux-386-GCC/platform.h
new file mode 100644
index 00000000..8b0de318
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Linux-386-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/src/libs/softfloat-3e/testfloat/build/Linux-386-SSE2-GCC/Makefile b/src/libs/softfloat-3e/testfloat/build/Linux-386-SSE2-GCC/Makefile
new file mode 100644
index 00000000..f9ae0689
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Linux-386-SSE2-GCC/Makefile
@@ -0,0 +1,355 @@
+
+#=============================================================================
+#
+# 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 ?= ../../../SoftFloat-3e
+PLATFORM ?= Linux-386-SSE2-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 \
+ -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 -msse2 -mfpmath=sse \
+ $(TESTFLOAT_OPTS) $(C_INCLUDES) -O2 -o $@
+COMPILE_SLOWFLOAT_C = \
+ gcc -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/src/libs/softfloat-3e/testfloat/build/Linux-386-SSE2-GCC/platform.h b/src/libs/softfloat-3e/testfloat/build/Linux-386-SSE2-GCC/platform.h
new file mode 100644
index 00000000..8b0de318
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Linux-386-SSE2-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/src/libs/softfloat-3e/testfloat/build/Linux-ARM-VFPv2-GCC/Makefile b/src/libs/softfloat-3e/testfloat/build/Linux-ARM-VFPv2-GCC/Makefile
new file mode 100644
index 00000000..2f0698d7
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/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 ?= ../../../SoftFloat-3e
+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/src/libs/softfloat-3e/testfloat/build/Linux-ARM-VFPv2-GCC/platform.h b/src/libs/softfloat-3e/testfloat/build/Linux-ARM-VFPv2-GCC/platform.h
new file mode 100644
index 00000000..8b0de318
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/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/src/libs/softfloat-3e/testfloat/build/Linux-x86_64-GCC/Makefile b/src/libs/softfloat-3e/testfloat/build/Linux-x86_64-GCC/Makefile
new file mode 100644
index 00000000..73eca95b
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Linux-x86_64-GCC/Makefile
@@ -0,0 +1,355 @@
+
+#=============================================================================
+#
+# 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 ?= ../../../SoftFloat-3e
+PLATFORM ?= Linux-x86_64-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 \
+ -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 $(TESTFLOAT_OPTS) \
+ $(C_INCLUDES) -O2 -o $@
+COMPILE_SLOWFLOAT_C = \
+ gcc -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/src/libs/softfloat-3e/testfloat/build/Linux-x86_64-GCC/platform.h b/src/libs/softfloat-3e/testfloat/build/Linux-x86_64-GCC/platform.h
new file mode 100644
index 00000000..8b0de318
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Linux-x86_64-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/src/libs/softfloat-3e/testfloat/build/Win32-MinGW/Makefile b/src/libs/softfloat-3e/testfloat/build/Win32-MinGW/Makefile
new file mode 100644
index 00000000..ca6e9625
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Win32-MinGW/Makefile
@@ -0,0 +1,355 @@
+
+#=============================================================================
+#
+# 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 ?= ../../../SoftFloat-3e
+PLATFORM ?= Win32-MinGW
+
+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 \
+ -DLONG_DOUBLE_IS_EXTFLOAT80
+
+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 = .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/src/libs/softfloat-3e/testfloat/build/Win32-MinGW/platform.h b/src/libs/softfloat-3e/testfloat/build/Win32-MinGW/platform.h
new file mode 100644
index 00000000..8b0de318
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Win32-MinGW/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/src/libs/softfloat-3e/testfloat/build/Win32-SSE2-MinGW/Makefile b/src/libs/softfloat-3e/testfloat/build/Win32-SSE2-MinGW/Makefile
new file mode 100644
index 00000000..a8a2894b
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Win32-SSE2-MinGW/Makefile
@@ -0,0 +1,355 @@
+
+#=============================================================================
+#
+# 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 ?= ../../../SoftFloat-3e
+PLATFORM ?= Win32-SSE2-MinGW
+
+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 \
+ -DLONG_DOUBLE_IS_EXTFLOAT80
+
+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 -msse2 -mfpmath=sse \
+ $(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 = .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/src/libs/softfloat-3e/testfloat/build/Win32-SSE2-MinGW/platform.h b/src/libs/softfloat-3e/testfloat/build/Win32-SSE2-MinGW/platform.h
new file mode 100644
index 00000000..8b0de318
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Win32-SSE2-MinGW/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/src/libs/softfloat-3e/testfloat/build/Win64-MinGW-w64/Makefile b/src/libs/softfloat-3e/testfloat/build/Win64-MinGW-w64/Makefile
new file mode 100644
index 00000000..5c46a71e
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Win64-MinGW-w64/Makefile
@@ -0,0 +1,355 @@
+
+#=============================================================================
+#
+# 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 ?= ../../../SoftFloat-3e
+PLATFORM ?= Win64-MinGW-w64
+
+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 \
+ -DLONG_DOUBLE_IS_EXTFLOAT80
+
+DELETE = rm -f
+C_INCLUDES = \
+ -I. -I$(SUBJ_SOURCE_DIR) -I$(SOURCE_DIR) -I$(SOFTFLOAT_INCLUDE_DIR)
+COMPILE_C = \
+ x86_64-w64-mingw32-gcc -std=c99 -c -Werror-implicit-function-declaration \
+ $(TESTFLOAT_OPTS) $(C_INCLUDES) -O2 -o $@
+COMPILE_SLOWFLOAT_C = \
+ x86_64-w64-mingw32-gcc -std=c99 -c -Werror-implicit-function-declaration \
+ $(TESTFLOAT_OPTS) $(C_INCLUDES) -O3 -o $@
+MAKELIB = x86_64-w64-mingw32-ar crs $@
+LINK = x86_64-w64-mingw32-gcc -o $@
+OTHER_LIBS = -lm
+
+OBJ = .o
+LIB = .a
+EXE = .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/src/libs/softfloat-3e/testfloat/build/Win64-MinGW-w64/platform.h b/src/libs/softfloat-3e/testfloat/build/Win64-MinGW-w64/platform.h
new file mode 100644
index 00000000..8b0de318
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/Win64-MinGW-w64/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/src/libs/softfloat-3e/testfloat/build/template/Makefile b/src/libs/softfloat-3e/testfloat/build/template/Makefile
new file mode 100644
index 00000000..5ec8f849
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/template/Makefile
@@ -0,0 +1,353 @@
+
+#=============================================================================
+#
+# 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.
+#
+# 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.
+#
+#=============================================================================
+
+# Edit lines marked with `==>'. See "TestFloat-source.html".
+
+==> SOURCE_DIR ?= ../../source
+==> SOFTFLOAT_DIR ?= ../../../SoftFloat-3e
+==> PLATFORM ?= Win32-MinGW
+
+==> 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 \
+==> -DLONG_DOUBLE_IS_EXTFLOAT80
+
+==> DELETE = rm -f
+==> C_INCLUDES = \
+==> -I. -I$(SUBJ_SOURCE_DIR) -I$(SOURCE_DIR) -I$(SOFTFLOAT_INCLUDE_DIR)
+==> COMPILE_C = cc -c $(TESTFLOAT_OPTS) $(C_INCLUDES) -O2 -o $@
+==> COMPILE_SLOWFLOAT_C = cc -c $(TESTFLOAT_OPTS) $(C_INCLUDES) -O3 -o $@
+==> MAKELIB = ar crs $@
+==> LINK = ld -o $@
+==> OTHER_LIBS = -lm
+
+==> OBJ = .o
+==> LIB = .a
+==> EXE = .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/src/libs/softfloat-3e/testfloat/build/template/platform.h b/src/libs/softfloat-3e/testfloat/build/template/platform.h
new file mode 100644
index 00000000..45042e64
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/build/template/platform.h
@@ -0,0 +1,51 @@
+
+/*============================================================================
+
+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.
+
+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.
+
+=============================================================================*/
+
+// Edit lines marked with `==>'. See "TestFloat-source.html".
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+==> #define LITTLEENDIAN 1
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+==> #define INLINE inline
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+==> #define THREAD_LOCAL _Thread_local
+
diff --git a/src/libs/softfloat-3e/testfloat/doc/TestFloat-general.html b/src/libs/softfloat-3e/testfloat/doc/TestFloat-general.html
new file mode 100644
index 00000000..55f67d71
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/doc/TestFloat-general.html
@@ -0,0 +1,1148 @@
+
+
+
+
+Berkeley TestFloat General Documentation
+
+
+
+
+
Berkeley TestFloat Release 3e: General Documentation
+
+
+John R. Hauser
+2018 January 20
+
+
+
+
Contents
+
+
+
+
+
+
1. Introduction
+
2. Limitations
+
3. Acknowledgments and License
+
4. What TestFloat Does
+
5. Executing TestFloat
+
6. Operations Tested by TestFloat
+
6.1. Conversion Operations
+
6.2. Basic Arithmetic Operations
+
6.3. Fused Multiply-Add Operations
+
6.4. Remainder Operations
+
6.5. Round-to-Integer Operations
+
6.6. Comparison Operations
+
7. Interpreting TestFloat Output
+
+
8. Variations Allowed by the IEEE Floating-Point Standard
+
+
8.1. Underflow
+
8.2. NaNs
+
8.3. Conversions to Integer
+
9. Contact Information
+
+
+
+
+
1. Introduction
+
+
+Berkeley TestFloat is a small collection of programs for testing that an
+implementation of binary floating-point conforms to the IEEE Standard for
+Floating-Point Arithmetic.
+All operations required by the original 1985 version of the IEEE Floating-Point
+Standard can be tested, except for conversions to and from decimal.
+With the current release, the following binary formats can be tested:
+16-bit half-precision, 32-bit single-precision,
+64-bit double-precision, 80-bit
+double-extended-precision, and/or 128-bit quadruple-precision.
+TestFloat cannot test decimal floating-point.
+
+
+
+Included in the TestFloat package are the testsoftfloat and
+timesoftfloat programs for testing the Berkeley SoftFloat software
+implementation of floating-point and for measuring its speed.
+Information about SoftFloat can be found at the SoftFloat Web page,
+http://www.jhauser.us/arithmetic/SoftFloat.html.
+The testsoftfloat and timesoftfloat programs are
+expected to be of interest only to people compiling the SoftFloat sources.
+
+
+
+This document explains how to use the TestFloat programs.
+It does not attempt to define or explain much of the IEEE Floating-Point
+Standard.
+Details about the standard are available elsewhere.
+
+
+
+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:
+
+
+Release 3b added the ability to test the 16-bit
+half-precision format.
+
+Release 3c added the ability to test a rarely used rounding mode,
+round to odd, also known as jamming.
+
+Release 3d modified the code for testing C arithmetic to
+potentially include testing newer library functions sqrtf,
+sqrtl, fmaf, fma, and fmal.
+
+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.
+
+
+
+Compared to Release 2c and earlier, the set of TestFloat programs, as well as
+the programs’ arguments and behavior, changed some with
+Release 3.
+For more about the evolution of TestFloat releases, see
+TestFloat-history.html.
+
+
+
+
2. Limitations
+
+
+TestFloat output is not always easily interpreted.
+Detailed knowledge of the IEEE Floating-Point Standard and its vagaries is
+needed to use TestFloat responsibly.
+
+
+
+TestFloat performs relatively simple tests designed to check the fundamental
+soundness of the floating-point under test.
+TestFloat may also at times manage to find rarer and more subtle bugs, but it
+will probably only find such bugs by chance.
+Software that purposefully seeks out various kinds of subtle floating-point
+bugs can be found through links posted on the TestFloat Web page,
+http://www.jhauser.us/arithmetic/TestFloat.html.
+
+
+
+
3. Acknowledgments and License
+
+
+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 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.
+The work was officially overseen by Prof. Krste Asanovic, with funding provided
+by these sources:
+
+
+
+
+
+
+
Par Lab:
+
+
+Microsoft (Award #024263), Intel (Award #024894), and U.C. Discovery
+(Award #DIG07-10227), with additional support from Par Lab affiliates Nokia,
+NVIDIA, Oracle, and Samsung.
+
+
+
+
ASPIRE Lab:
+
+
+DARPA PERFECT program (Award #HR0011-12-2-0016), with additional support from
+ASPIRE industrial sponsor Intel and ASPIRE affiliates Google, Nokia, NVIDIA,
+Oracle, and Samsung.
+
+
+
+
+
+
+
+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, 2018 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:
+
+
+
+
+Redistributions of source code must retain the above copyright notice, this
+list of conditions, and the following disclaimer.
+
+
+
+
+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.
+
+
+
+
+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.
+
+
+
+
4. What TestFloat Does
+
+
+TestFloat is designed to test a floating-point implementation by comparing its
+behavior with that of TestFloat’s own internal floating-point implemented
+in software.
+For each operation to be tested, the TestFloat programs can generate a large
+number of test cases, made up of simple pattern tests intermixed with weighted
+random inputs.
+The cases generated should be adequate for testing carry chain propagations,
+and the rounding of addition, subtraction, multiplication, and simple
+operations like conversions.
+TestFloat makes a point of checking all boundary cases of the arithmetic,
+including underflows, overflows, invalid operations, subnormal inputs, zeros
+(positive and negative), infinities, and NaNs.
+For the interesting operations like addition and multiplication, millions of
+test cases may be checked.
+
+
+
+TestFloat is not remarkably good at testing difficult rounding cases for
+division and square root.
+It also makes no attempt to find bugs specific to SRT division and the like
+(such as the infamous Pentium division bug).
+Software that tests for such failures can be found through links on the
+TestFloat Web page,
+http://www.jhauser.us/arithmetic/TestFloat.html.
+
+
+
+NOTE!
+It is the responsibility of the user to verify that the discrepancies TestFloat
+finds actually represent faults in the implementation being tested.
+Advice to help with this task is provided later in this document.
+Furthermore, even if TestFloat finds no fault with a floating-point
+implementation, that in no way guarantees that the implementation is bug-free.
+
+
+
+For each operation, TestFloat can test all five rounding modes defined by the
+IEEE Floating-Point Standard, plus possibly a sixth mode, round to odd
+(depending on the options selected when TestFloat was built).
+TestFloat verifies not only that the numeric results of an operation are
+correct, but also that the proper floating-point exception flags are raised.
+All five exception flags are tested, including the inexact flag.
+TestFloat does not attempt to verify that the floating-point exception flags
+are actually implemented as sticky flags.
+
+
+
+For the 80-bit double-extended-precision format, TestFloat can
+test the addition, subtraction, multiplication, division, and square root
+operations at all three of the standard rounding precisions.
+The rounding precision can be set to 32 bits, equivalent to
+single-precision, to 64 bits, equivalent to double-precision, or
+to the full 80 bits of the double-extended-precision.
+Rounding precision control can be applied only to the double-extended-precision
+format and only for the five basic arithmetic operations: addition,
+subtraction, multiplication, division, and square root.
+Other operations can be tested only at full precision.
+
+
+
+As a rule, TestFloat is not particular about the bit patterns of NaNs that
+appear as operation results.
+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 and
+-checkInvInts options documented for programs
+testfloat_ver and testfloat.
+
+
+
+TestFloat normally compares an implementation of floating-point against the
+Berkeley SoftFloat software implementation of floating-point, also created by
+me.
+The SoftFloat functions are linked into each TestFloat program’s
+executable.
+Information about SoftFloat can be found at the Web page
+http://www.jhauser.us/arithmetic/SoftFloat.html.
+
+
+
+For testing SoftFloat itself, the TestFloat package includes a
+testsoftfloat program that compares SoftFloat’s
+floating-point against another software floating-point implementation.
+The second software floating-point is simpler and slower than SoftFloat, and is
+completely independent of SoftFloat.
+Although the second software floating-point cannot be guaranteed to be
+bug-free, the chance that it would mimic any of SoftFloat’s bugs is low.
+Consequently, an error in one or the other floating-point version should appear
+as an unexpected difference between the two implementations.
+Note that testing SoftFloat should be necessary only when compiling a new
+TestFloat executable or when compiling SoftFloat for some other reason.
+
+
+
+
5. Executing TestFloat
+
+
+The TestFloat package consists of five programs, all intended to be executed
+from a command-line interpreter:
+
+A program for measuring the speed of SoftFloat (included in the TestFloat
+package for convenience).
+
+
+
+
+Each program has its own page of documentation that can be opened through the
+links in the table above.
+
+
+
+To test a floating-point implementation other than SoftFloat, one of three
+different methods can be used.
+The first method pipes output from testfloat_gen to a program
+that:
+(a) reads the incoming test cases, (b) invokes the
+floating-point operation being tested, and (c) writes the
+operation results to output.
+These results can then be piped to testfloat_ver to be checked for
+correctness.
+Assuming a vertical bar (|) indicates a pipe between programs, the
+complete process could be written as a single command like so:
+
+The program in the middle is not supplied by TestFloat but must be created
+independently.
+If for some reason this program cannot take command-line arguments, the
+-prefix option of testfloat_gen can communicate
+parameters through the pipe.
+
+
+
+A second method for running TestFloat is similar but has
+testfloat_gen supply not only the test inputs but also the
+expected results for each case.
+With this additional information, the job done by testfloat_ver
+can be folded into the invoking program to give the following command:
+
+Again, the program that actually invokes the floating-point operation is not
+supplied by TestFloat but must be created independently.
+Depending on circumstance, it may be preferable either to let
+testfloat_ver check and report suspected errors (first method) or
+to include this step in the invoking program (second method).
+
+
+
+The third way to use TestFloat is the all-in-one testfloat
+program.
+This program can perform all the steps of creating test cases, invoking the
+floating-point operation, checking the results, and reporting suspected errors.
+However, for this to be possible, testfloat must be compiled to
+contain the method for invoking the floating-point operations to test.
+Each build of testfloat is therefore capable of testing
+only the floating-point implementation it was built to invoke.
+To test a new implementation of floating-point, a new testfloat
+must be created, linked to that specific implementation.
+By comparison, the testfloat_gen and testfloat_ver
+programs are entirely generic;
+one instance is usable for testing any floating-point implementation, because
+implementation-specific details are segregated in the custom program that
+follows testfloat_gen.
+
+
+
+Program testsoftfloat is another all-in-one program specifically
+for testing SoftFloat.
+
+
+
+Programs testfloat_ver, testfloat, and
+testsoftfloat all report status and error information in a common
+way.
+As it executes, each of these programs writes status information to the
+standard error output, which should be the screen by default.
+In order for this status to be displayed properly, the standard error stream
+should not be redirected to a file.
+Any discrepancies that are found are written to the standard output stream,
+which is easily redirected to a file if desired.
+Unless redirected, reported errors will appear intermixed with the ongoing
+status information in the output.
+
+
+
+
6. Operations Tested by TestFloat
+
+
+TestFloat can test all operations required by the original 1985 IEEE
+Floating-Point Standard except for conversions to and from decimal.
+These operations are:
+
+
+conversions among the supported floating-point formats, and also between
+integers (32-bit and 64-bit, signed and unsigned) and
+any of the floating-point formats;
+
+for each floating-point format, the usual addition, subtraction,
+multiplication, division, and square root operations;
+
+for each format, the floating-point remainder operation defined by the IEEE
+Standard;
+
+for each format, a “round to integer” operation that rounds to the
+nearest integer value in the same format; and
+
+comparisons between two values in the same floating-point format.
+
+In addition, TestFloat can also test
+
+
+for each floating-point format except 80-bit
+double-extended-precision, the fused multiply-add operation defined by the 2008
+IEEE Standard.
+
+
+
+
+More information about all these operations is given below.
+In the operation names used by TestFloat, 16-bit half-precision is
+called f16, 32-bit single-precision is
+f32, 64-bit double-precision is f64,
+80-bit double-extended-precision is extF80, and
+128-bit quadruple-precision is f128.
+TestFloat generally uses the same names for operations as Berkeley SoftFloat,
+except that TestFloat’s names never include the M that
+SoftFloat uses to indicate that values are passed through pointers.
+
+
+
6.1. Conversion Operations
+
+
+All conversions among the floating-point formats and all conversions between a
+floating-point format and 32-bit and 64-bit integers
+can be tested.
+The conversion operations are:
+
+Abbreviations ui32 and ui64 indicate
+32-bit and 64-bit unsigned integer types, while
+i32 and i64 indicate their signed counterparts.
+These conversions all round according to the current rounding mode as relevant.
+Conversions from a smaller to a larger floating-point format are always exact
+and so require no rounding.
+Likewise, conversions from 32-bit integers to 64-bit
+double-precision or to any larger floating-point format are also exact, as are
+conversions from 64-bit integers to 80-bit
+double-extended-precision and 128-bit quadruple-precision.
+
+
+
+For the all-in-one testfloat program, this list of conversion
+operations requires amendment.
+For testfloat only, conversions to an integer type have names that
+explicitly specify the rounding mode and treatment of inexactness.
+Thus, instead of
+
+
+<float>_to_<int>
+
+
+as listed above, operations converting to integer type have names of these
+forms:
+
+The <round> component is one of
+‘near_even’, ‘near_maxMag’,
+‘minMag’, ‘min’, or
+‘max’, choosing the rounding mode.
+Any other indication of rounding mode is ignored.
+The operations with ‘_r_’ in their names never raise
+the inexact exception, while those with ‘_rx_’
+raise the inexact exception whenever the result is not exact.
+
+
+
+TestFloat assumes that conversions from floating-point to an integer type
+should raise the invalid exception if the input cannot be rounded to an
+integer representable in the result format.
+In such a circumstance:
+
+
+
+
+If the result type is an unsigned integer, TestFloat normally expects the
+result of the operation to be the type’s largest integer value.
+In the case that the input is a negative number (not a NaN), a zero result may
+also be accepted.
+
+
+
+
+If the result type is a signed integer and the input is a number (not a NaN),
+TestFloat expects the result to be the largest-magnitude integer with the same
+sign as the input.
+When a NaN is converted to a signed integer type, TestFloat allows either the
+largest postive or largest-magnitude negative integer to be returned.
+
+
+
+Conversions to integer types are expected never to raise the overflow
+exception.
+
+
+
6.2. Basic Arithmetic Operations
+
+
+The following standard arithmetic operations can be tested:
+
+The double-extended-precision (extF80) operations can be rounded
+to reduced precision under rounding precision control.
+
+
+
6.3. Fused Multiply-Add Operations
+
+
+For all floating-point formats except 80-bit
+double-extended-precision, TestFloat can test the fused multiply-add operation
+defined by the 2008 IEEE Floating-Point Standard.
+The fused multiply-add operations are:
+
+If one of the multiplication operands is infinite and the other is zero,
+TestFloat expects the fused multiply-add operation to raise the invalid
+exception even if the third operand is a quiet NaN.
+
+
+
6.4. Remainder Operations
+
+
+For each format, TestFloat can test the IEEE Standard’s remainder
+operation.
+These operations are:
+
+Just as for conversions to integer types (section 6.1 above), the
+all-in-one testfloat program is again an exception.
+For testfloat only, the round-to-integer operations have names of
+these forms:
+
+For the ‘_r_’ versions, the inexact exception
+is never raised, and the <round> component specifies
+the rounding mode as one of ‘near_even’,
+‘near_maxMag’, ‘minMag’,
+‘min’, or ‘max’.
+The usual indication of rounding mode is ignored.
+In contrast, the ‘_x’ versions accept the usual
+indication of rounding mode and raise the inexact exception whenever the
+result is not exact.
+This irregular system follows the IEEE Standard’s particular
+specification for the round-to-integer operations.
+
+
+
6.6. Comparison Operations
+
+
+The following floating-point comparison operations can be tested:
+
+The abbreviation eq stands for “equal” (=),
+le stands for “less than or equal” (≤), and
+lt stands for “less than” (<).
+
+
+
+The IEEE Standard specifies that, by default, the less-than-or-equal and
+less-than comparisons raise the invalid exception if either input is any
+kind of NaN.
+The equality comparisons, on the other hand, are defined by default to raise
+the invalid exception only for signaling NaNs, not for quiet NaNs.
+For completeness, the following additional operations can be tested if
+supported:
+
+The signaling equality comparisons are identical to the standard
+operations except that the invalid exception should be raised for any
+NaN input.
+Similarly, the quiet comparison operations should be identical to
+their counterparts except that the invalid exception is not raised for
+quiet NaNs.
+
+
+
+Obviously, no comparison operations ever require rounding.
+Any rounding mode is ignored.
+
+
+
+
7. Interpreting TestFloat Output
+
+
+The “errors” reported by TestFloat programs may or may not really
+represent errors in the system being tested.
+For each test case tried, the results from the floating-point implementation
+being tested could differ from the expected results for several reasons:
+
+
+The IEEE Floating-Point Standard allows for some variation in how conforming
+floating-point behaves.
+Two implementations can sometimes give different results without either being
+incorrect.
+
+The trusted floating-point emulation could be faulty.
+This could be because there is a bug in the way the emulation is coded, or
+because a mistake was made when the code was compiled for the current system.
+
+The TestFloat program may not work properly, reporting differences that do not
+exist.
+
+Lastly, the floating-point being tested could actually be faulty.
+
+It is the responsibility of the user to determine the causes for the
+discrepancies that are reported.
+Making this determination can require detailed knowledge about the IEEE
+Standard.
+Assuming TestFloat is working properly, any differences found will be due to
+either the first or last of the reasons above.
+Variations in the IEEE Standard that could lead to false error reports are
+discussed in section 8, Variations Allowed by the IEEE
+Floating-Point Standard.
+
+
+
+For each reported error (or apparent error), a line of text is written to the
+default output.
+If a line would be longer than 79 characters, it is divided.
+The first part of each error line begins in the leftmost column, and any
+subsequent “continuation” lines are indented with a tab.
+
+The <inputs> are the inputs to the operation.
+Each output (observed or expected) is shown as a pair: the result value first,
+followed by the exception flags.
+
+
+
+In the first line, the inputs are -00.7FFF00 and
+-7F.000100, and the observed result is +01.000000
+with flags ...ux.
+The trusted emulation result is the same but with different flags,
+....x.
+Items such as -00.7FFF00 composed of a sign character
+(+/-), hexadecimal digits, and a single
+period represent floating-point values (here 32-bit
+single-precision).
+The two instances above were reported as errors because the exception flag
+results differ.
+
+
+
+Aside from the exception flags, there are ten data types that may be
+represented.
+Five are floating-point types: 16-bit half-precision,
+32-bit single-precision, 64-bit double-precision,
+80-bit double-extended-precision, and 128-bit
+quadruple-precision.
+The remaining five types are 32-bit and 64-bit
+unsigned integers, 32-bit and 64-bit
+two’s-complement signed integers, and Boolean values (the results of
+comparison operations).
+Boolean values are represented as a single character, either a 0
+(false) or a 1 (true).
+A 32-bit integer is represented as 8 hexadecimal digits.
+Thus, for a signed 32-bit integer, FFFFFFFF is
+−1, and 7FFFFFFF is the largest positive value.
+64-bit integers are the same except with 16 hexadecimal digits.
+
+
+
+Floating-point values are written decomposed into their sign, encoded exponent,
+and encoded significand.
+First is the sign character (+ or -),
+followed by the encoded exponent in hexadecimal, then a period
+(.), and lastly the encoded significand in hexadecimal.
+
minimum finite value (largest magnitude, but negative)
+
+
-1F.000
−infinity
+
+
+Certain categories are easily distinguished (assuming the xs are
+not all 0):
+
+
+
+
+00.xxx
+
positive subnormal numbers
+
+
+1F.xxx
positive NaNs
+
-00.xxx
negative subnormal numbers
+
-1F.xxx
negative NaNs
+
+
+
+
+
+Likewise for other formats:
+
+
+
32-bit single
64-bit double
128-bit quadruple
+
+
+
+00.000000
+
+000.0000000000000
+
+0000.0000000000000000000000000000
+
+0
+
+
+
+7F.000000
+
+3FF.0000000000000
+
+3FFF.0000000000000000000000000000
+
1
+
+
+
+80.000000
+
+400.0000000000000
+
+4000.0000000000000000000000000000
+
2
+
+
+
+FE.7FFFFF
+
+7FE.FFFFFFFFFFFFF
+
+7FFE.FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+
maximum finite value
+
+
+
+FF.000000
+
+7FF.0000000000000
+
+7FFF.0000000000000000000000000000
+
+infinity
+
+
+
+
-00.000000
+
-000.0000000000000
+
-0000.0000000000000000000000000000
+
−0
+
+
+
-7F.000000
+
-3FF.0000000000000
+
-3FFF.0000000000000000000000000000
+
−1
+
+
+
-80.000000
+
-400.0000000000000
+
-4000.0000000000000000000000000000
+
−2
+
+
+
-FE.7FFFFF
+
-7FE.FFFFFFFFFFFFF
+
-7FFE.FFFFFFFFFFFFFFFFFFFFFFFFFFFF
+
minimum finite value
+
+
+
-FF.000000
+
-7FF.0000000000000
+
-7FFF.0000000000000000000000000000
+
−infinity
+
+
+
+
+00.xxxxxx
+
+000.xxxxxxxxxxxxx
+
+0000.xxxxxxxxxxxxxxxxxxxxxxxxxxxx
+
positive subnormals
+
+
+
+FF.xxxxxx
+
+7FF.xxxxxxxxxxxxx
+
+7FFF.xxxxxxxxxxxxxxxxxxxxxxxxxxxx
+
positive NaNs
+
+
+
-00.xxxxxx
+
-000.xxxxxxxxxxxxx
+
-0000.xxxxxxxxxxxxxxxxxxxxxxxxxxxx
+
negative subnormals
+
+
+
-FF.xxxxxx
+
-7FF.xxxxxxxxxxxxx
+
-7FFF.xxxxxxxxxxxxxxxxxxxxxxxxxxxx
+
negative NaNs
+
+
+
+
+
+
+The 80-bit double-extended-precision values are a little unusual
+in that the leading bit of precision is not hidden as with other formats.
+When canonically encoded, the leading significand bit of an 80-bit
+double-extended-precision value will be 0 if the value is zero or subnormal,
+and will be 1 otherwise.
+Hence, the same values listed above appear in 80-bit
+double-extended-precision as follows (note the leading 8 digit in
+the significands):
+
+
+
+
+0000.0000000000000000
+
+0
+
+
+3FFF.8000000000000000
1
+
+4000.8000000000000000
2
+
+
+7FFE.FFFFFFFFFFFFFFFF
+
maximum finite value
+
+
+7FFF.8000000000000000
+infinity
+
+
-0000.0000000000000000
−0
+
-3FFF.8000000000000000
−1
+
-4000.8000000000000000
−2
+
+
-7FFE.FFFFFFFFFFFFFFFF
+
minimum finite value
+
+
-7FFF.8000000000000000
−infinity
+
+
+
+
+
+Lastly, exception flag values are represented by five characters, one character
+per flag.
+Each flag is written as either a letter or a period (.) according
+to whether the flag was set or not by the operation.
+A period indicates the flag was not set.
+The letter used to indicate a set flag depends on the flag:
+
+
+
+
v
+
invalid exception
+
+
+
i
+
infinite exception (“divide by zero”)
+
+
o
overflow exception
+
u
underflow exception
+
x
inexact exception
+
+
+For example, the notation ...ux indicates that the
+underflow and inexact exception flags were set and that the other
+three flags (invalid, infinite, and overflow) were not
+set.
+The exception flags are always written following the value returned as the
+result of the operation.
+
+
+
+
8. Variations Allowed by the IEEE Floating-Point Standard
+
+
+The IEEE Floating-Point Standard admits some variation among conforming
+implementations.
+Because TestFloat expects the two implementations being compared to deliver
+bit-for-bit identical results under most circumstances, this leeway in the
+standard can result in false errors being reported if the two implementations
+do not make the same choices everywhere the standard provides an option.
+
+
+
8.1. Underflow
+
+
+The standard specifies that the underflow exception flag is to be raised
+when two conditions are met simultaneously:
+(1) tininess and (2) loss of accuracy.
+
+
+
+A result is tiny when its magnitude is nonzero yet smaller than any normalized
+floating-point number.
+The standard allows tininess to be determined either before or after a result
+is rounded to the destination precision.
+If tininess is detected before rounding, some borderline cases will be flagged
+as underflows even though the result after rounding actually lies within the
+normal floating-point range.
+By detecting tininess after rounding, a system can avoid some unnecessary
+signaling of underflow.
+All the TestFloat programs support options -tininessbefore and
+-tininessafter to control whether TestFloat expects tininess on
+underflow to be detected before or after rounding.
+One or the other is selected as the default when TestFloat is compiled, but
+these command options allow the default to be overridden.
+
+
+
+Loss of accuracy occurs when the subnormal format is not sufficient to
+represent an underflowed result accurately.
+The original 1985 version of the IEEE Standard allowed loss of accuracy to be
+detected either as an inexact result or as a
+denormalization loss;
+however, few if any systems ever chose the latter.
+The latest standard requires that loss of accuracy be detected as an inexact
+result, and TestFloat can test only for this case.
+
+
+
8.2. NaNs
+
+
+The IEEE Standard gives the floating-point formats a large number of NaN
+encodings and specifies that NaNs are to be returned as results under certain
+conditions.
+However, the standard allows an implementation almost complete freedom over
+which NaN to return in each situation.
+
+
+
+By default, TestFloat does not check the bit patterns of NaN results.
+When the result of an operation should be a NaN, any NaN is considered as good
+as another.
+This laxness can be overridden with the -checkNaNs option of
+programs testfloat_ver and testfloat.
+In order for this option to be sensible, TestFloat must have been compiled so
+that its internal floating-point implementation (SoftFloat) generates the
+proper NaN results for the system being tested.
+
+
+
8.3. Conversions to Integer
+
+
+Conversion of a floating-point value to an integer format will fail if the
+source value is a NaN or if it is too large.
+The IEEE Standard does not specify what value should be returned as the integer
+result in these cases.
+Moreover, according to the standard, the invalid exception can be raised
+or an unspecified alternative mechanism may be used to signal such cases.
+
+
+
+TestFloat assumes that conversions to integer will raise the invalid
+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.
+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.
+
+Releases of Berkeley TestFloat normally parallel those of Berkeley SoftFloat,
+on which TestFloat is based.
+Each TestFloat release necessarily incorporates all bug fixes from the
+corresponding release of SoftFloat.
+
+
+
+
Release 3e (2018 January)
+
+
+
+
+Fixed a problem with the all-in-one testfloat program whereby
+function set -all1 incorrectly also tested the three-operand fused
+multiply-add operations.
+
+
+Modified the expected behavior of rounding mode odd (jamming) when
+rounding to an integer value (either conversion to an integer format or a
+‘roundToInt’ function).
+Previously, for those cases only, rounding mode odd was expected
+to act the same as rounding to minimum magnitude.
+Now, when rounding to an integer value, the nearest odd integer is expected,
+consistent with the round-to-odd result of other operations.
+
+
+Added options -checkInvInts and -checkAll to programs
+testfloat_ver and testfloat.
+
+
+Improved the checking of integer results of invalid operations.
+
+
+
+
+
Release 3d (2017 August)
+
+
+
+
+When the all-in-one testfloat program is compiled to test the C
+language’s arithmetic, added the ability to test library functions
+sqrtf, sqrtl, fmaf, fma,
+and fmal, which were added to the C Standard in 1999.
+
+
+
+
+
Release 3c (2017 February)
+
+
+
+
+Added support for testing rounding mode odd (jamming).
+
+
+Made support for testing 64-bit double-precistion floating-point
+be subject to macro FLOAT64 (akin to macros FLOAT16,
+EXTFLOAT80, and FLOAT128 from before).
+
+
+Fixed some bugs that caused compilation to fail with certain combinations of
+option macro settings.
+
+
+Corrected the types of two internal variables to be sig_atomic_t
+instead of bool.
+
+
+Improved the formatting of some error reports (concerning where lines are
+broken when they exceed 79 characters in length).
+
+
+
+
+
Release 3b (2016 July)
+
+
+
+
+Added the ability to test the common 16-bit
+“half-precision” floating-point format.
+
+
+Added a -seed option to programs testfloat_gen,
+testfloat, and testsoftfloat for setting the seed for
+the pseudo-random number generator used to generate test cases.
+
+
+Where a specific choice is needed for how tininess is detected on underflow,
+changed the default to be the detection of tininess after rounding
+(-tininessafter) instead of before rounding
+(-tininessbefore).
+
+
+Modified the format of reported discrepancies to show the signs of
+floating-point values using + and - characters.
+
+
+Documented the use of the INLINE macro, and fixed the sources for
+the case that function inlining is not supported by the C compiler.
+
+
+Documented the possible need to define macro THREAD_LOCAL to match
+how the SoftFloat library was built.
+
+
+Modified the provided Makefiles to allow some options to be overridden from the
+make command.
+
+
+
+
+
Release 3a (2015 October)
+
+
+
+
+Replaced the license text supplied by the University of California, Berkeley,
+and fixed some minor build problems.
+
+
+
+
+
Release 3 (2015 February)
+
+
+
+
+Complete rewrite, funded by the University of California, Berkeley, and
+consequently having a different use license than earlier releases.
+Visible changes included different names for testable functions and command
+options.
+
+
+Reinstated separate programs for generating test cases
+(testfloat_ver) and verifying test results
+(testfloat_gen), as alternatives to the all-in-one
+testfloat program (which remained supported).
+
+
+Added support for testing conversions between floating-point and unsigned
+integers, both 32-bit and 64-bit.
+
+
+Added support for testing a fused multiply-add operation, for all testable
+floating-point formats except 80-bit double-extended-precision.
+
+
+Added support for testing a fifth rounding mode, near_maxMag
+(round to nearest, with ties to maximum magnitude, away from zero).
+
+
+Added timesoftfloat (previously found in the Berkeley SoftFloat
+package).
+
+
+
+
+
Release 2c (2015 January)
+
+
+
+
+Fixed mistakes affecting some 64-bit processors.
+
+
+Made minor updates to the documentation, including improved wording for the
+legal restrictions on using TestFloat releases through 2c (not
+applicable to Release 3 or later).
+
+
+
+
+
+There was never a Release 2b.
+
+
+
+
Release 2a (1998 December)
+
+
+
+
+Added support for testing conversions between floating-point and
+64-bit signed integers.
+
+
+Improved the Makefiles.
+
+
+
+
+
Release 2 (1997 June)
+
+
+
+
+Integrated the generation of test cases and the checking of system results into
+a single program.
+(Before they were separate programs, normally joined by explicit command-line
+pipes.)
+
+
+Improved the sequence of test cases.
+
+
+Added support for testing 80-bit double-extended-precision and
+128-bit quadruple precision.
+
+
+Made program output more readable, and added new command arguments.
+
+
+Reduced dependence on the quality of the standard rand function
+for generating test cases.
+(Previously naively expected rand to be able to generate good
+random bits for the entire machine word width.)
+
+
+Created testsoftfloat, with its own simpler complete software
+floating-point (“slowfloat”) for comparison purposes.
+
+
+Made some changes to the source file structure, including renaming
+environment.h to milieu.h (to avoid confusion with
+environment variables).
+
+
+
+
+
Release 1a (1996 July)
+
+
+
+
+Added the -tininessbefore and -tininessafter options
+to control whether tininess should be detected before or after rounding.
+
+
6.1. Standard Headers <stdbool.h> and
+ <stdint.h>
+
+
6.2. Standard Header <fenv.h>
+
6.3. Macros for Build Options
+
6.4. Specializing the testfloat Program
+
6.5. Improving the Random Number Functions
+
7. Contact Information
+
+
+
+
+
1. Introduction
+
+
+This document gives information needed for compiling and/or porting Berkeley
+TestFloat, a small collection of programs for testing that an implementation of
+binary floating-point conforms to the IEEE Standard for Floating-Point
+Arithmetic.
+For basic documentation about TestFloat refer to
+TestFloat-general.html.
+
+
+
+The source code for TestFloat is intended to be relatively machine-independent.
+Most programs in the TestFloat package should be compilable with any
+ISO-Standard C compiler that also supports 64-bit integers.
+If the all-in-one testfloat program will be used to test a new
+floating-point implementation, additional effort will likely be required to
+retarget that program to invoke the new floating-point operations.
+TestFloat has been successfully compiled with the GNU C Compiler
+(gcc) for several platforms.
+
+
+
+Release 3 of TestFloat was a complete rewrite relative to
+Release 2c or earlier.
+The current version of TestFloat is Release 3e.
+
+
+
+TestFloat depends on Berkeley SoftFloat, which is a software implementation of
+binary floating-point that conforms to the IEEE Standard for Floating-Point
+Arithmetic.
+SoftFloat is not included with the TestFloat sources.
+It can be obtained from the Web page
+http://www.jhauser.us/arithmetic/SoftFloat.html.
+
+
+
+
2. Limitations
+
+
+TestFloat assumes the computer has an addressable byte size of either 8 or
+16 bits.
+(Nearly all computers in use today have 8-bit bytes.)
+
+
+
+TestFloat is written entirely in C.
+The C compiler used must conform at a minimum to the 1989 ANSI standard for the
+C language (same as the 1990 ISO standard) and must in addition support basic
+arithmetic on 64-bit integers.
+Earlier releases of TestFloat were capable of testing 32-bit
+single-precision and 64-bit double-precision floating-point
+without requiring compiler support for 64-bit integers, but this
+option is not supported starting with Release 3.
+Since 1999, ISO standards for C have mandated compiler support for
+64-bit integers.
+A compiler conforming to the 1999 C Standard or later is recommended but not
+strictly required.
+
+
+
+C Standard header files <stdbool.h> and
+<stdint.h> are required for defining standard Boolean and
+integer types.
+If these headers are not supplied with the C compiler, minimal substitutes must
+be provided.
+TestFloat’s dependence on these headers is detailed later in
+section 6.1, Standard Headers <stdbool.h>
+and <stdint.h>.
+
+
+
+
3. Acknowledgments and License
+
+
+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 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.
+The work was officially overseen by Prof. Krste Asanovic, with funding provided
+by these sources:
+
+
+
+
+
+
+
Par Lab:
+
+
+Microsoft (Award #024263), Intel (Award #024894), and U.C. Discovery
+(Award #DIG07-10227), with additional support from Par Lab affiliates Nokia,
+NVIDIA, Oracle, and Samsung.
+
+
+
+
ASPIRE Lab:
+
+
+DARPA PERFECT program (Award #HR0011-12-2-0016), with additional support from
+ASPIRE industrial sponsor Intel and ASPIRE affiliates Google, Nokia, NVIDIA,
+Oracle, and Samsung.
+
+
+
+
+
+
+
+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, 2018 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:
+
+
+
+
+Redistributions of source code must retain the above copyright notice, this
+list of conditions, and the following disclaimer.
+
+
+
+
+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.
+
+
+
+
+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.
+
+
+
+
4. TestFloat Package Directory Structure
+
+
+Because TestFloat is targeted to multiple platforms, its source code is
+slightly scattered between target-specific and target-independent directories
+and files.
+The supplied directory structure is as follows:
+
+The majority of the TestFloat sources are provided in the source
+directory.
+The subj-C subdirectory contains the sources that
+configure the all-in-one testfloat program to test the C
+compiler’s implementation of the standard C types float,
+double, and possibly longdouble.
+The ‘subj’ in subj-C is an
+abbreviation of subject, referring to the floating-point that is the
+subject of the test.
+If testfloat is retargeted to test other floating-point
+implementations, the corresponding source files would be expected to be in
+other subdirectories alongside subj-C, with names of
+the form subj-<target>.
+More about retargeting testfloat is found in
+section 6.4, Specializing the testfloat
+Program.
+
+
+
+The build directory is intended to contain a subdirectory for each
+target platform for which builds of the TestFloat programs may be created.
+For each build target, the target’s subdirectory is where all derived
+object files and the completed TestFloat executables are created.
+The template subdirectory is not an actual build target but
+contains sample files for creating new target directories.
+
+
+
+Ignoring the template directory, the supplied target directories
+are intended to follow a naming system of
+<execution-environment>-<compiler>.
+For the example targets,
+<execution-environment> is
+Linux-386, Linux-386-SSE2,
+Linux-x86_64,
+Linux-ARM-VFPv2, Win32,
+Win32-SSE2, or Win64, and
+<compiler> is GCC,
+MinGW, or MinGW-w64.
+
+
+
+All of the supplied target directories are merely examples that may or may not
+be correct for compiling on any particular system.
+There are currently no plans to include and maintain in the TestFloat package
+the build files needed for a great many users’ compilation environments,
+which can span a huge range of operating systems, compilers, and other tools.
+
+
+
+As supplied, each target directory contains two files:
+
+
+Makefile
+platform.h
+
+
+The provided Makefile is written for GNU make.
+A build of TestFloat for the specific target is begun by executing the
+make command with the target directory as the current directory.
+A completely different build tool can be used if an appropriate
+Makefile equivalent is created.
+
+
+
+The platform.h header file exists to provide a location for
+additional C declarations specific to the build target.
+Every C source file of TestFloat contains a #include for
+platform.h.
+In many cases, the contents of platform.h can be as simple as one
+or two lines of code.
+If the target’s compiler or library has bugs or other shortcomings,
+workarounds for these issues may be possible with target-specific declarations
+in platform.h, without the need to modify the main TestFloat
+sources.
+
+
+
+It may not be necessary to build all of the TestFloat programs.
+For testing a floating-point implementation, typically
+testfloat_gen and testfloat will not both be used,
+and testfloat_ver may not be needed either.
+The Makefile (or equivalent) can be modified not to create unneeded programs.
+This may be especially relevant for the all-in-one test program
+testfloat, which might not build without special attention.
+
+
+
+
5. Dependence on Berkeley SoftFloat
+
+
+In addition to the distributed sources, TestFloat depends on the existence of a
+compatible Berkeley SoftFloat library and the corresponding header file
+softfloat.h.
+As mentioned earlier, SoftFloat is a separate package available at Web page
+http://www.jhauser.us/arithmetic/SoftFloat.html.
+The SoftFloat library must be compiled before the TestFloat programs can be
+built.
+In the example Makefiles, the locations of the SoftFloat header files and
+pre-compiled library are specified by these macros:
+
+
+
SOFTFLOAT_INCLUDE_DIR
+
+The path of the directory containing softfloat.h, as well as other
+nonstandard header files referenced by softfloat.h, if any.
+
SOFTFLOAT_H
+
+A list of the full paths of all SoftFloat header files needed by SoftFloat
+clients. This list must include softfloat.h and may also include
+other header files referenced by softfloat.h, such as
+softfloat_types.h.
+This macro is used only to establish build dependencies between the SoftFloat
+header files and TestFloat’s source files, in case the SoftFloat header
+files are changed.
+
SOFTFLOAT_LIB
+
+The full path of the compiled SoftFloat library (usually
+softfloat.a or libsoftfloat.a).
+
+
+
+
+
+
6. Issues for Porting TestFloat to a New Target
+
+
6.1. Standard Headers <stdbool.h> and <stdint.h>
+
+
+The TestFloat sources make use of standard headers
+<stdbool.h> and <stdint.h>, which have
+been part of the ISO C Standard Library since 1999.
+With any recent compiler, these standard headers are likely to be supported,
+even if the compiler does not claim complete conformance to the latest ISO C
+Standard.
+For older or nonstandard compilers, substitutes for
+<stdbool.h> and <stdint.h> may need to be
+created.
+TestFloat depends on these names from <stdbool.h>:
+
+Because the supplied all-in-one testfloat program tests the
+floating-point operations of the C language, it uses the facilities provided by
+standard C header <fenv.h> to access the floating-point
+environment of C, in particular to set the rounding mode and to access the
+floating-point exception flags.
+Like <stdbool.h> and <stdint.h>,
+<fenv.h> has been part of the ISO C Standard Library since
+1999, but older or nonstandard C compilers may not support it.
+
+
+
+Some form of standard header <fenv.h> is needed only if the
+testfloat program is wanted and the program will not be
+retargeted to invoke a floating-point implementation in a way that bypasses the
+standard C environment.
+Typically, if testfloat is wanted, it will be retargeted to invoke
+a new floating-point implementation directly, making
+<fenv.h> irrelevant.
+For more about retargeting testfloat, see section 6.4
+below, Specializing the testfloat Program.
+
+
+
+
6.3. Macros for Build Options
+
+
+The TestFloat source files are affected by several C preprocessor macros:
+
+
+
LITTLEENDIAN
+
+Must be defined for little-endian machines;
+must not be defined for big-endian machines.
+
INLINE
+
+Can be defined to a sequence of tokens used to indicate that a C function
+should be inlined.
+If the compiler does not support the inlining of functions, this macro must not
+be defined.
+For compilers that conform to the C Standard’s rules for inline
+functions, this macro can be defined as the single keyword inline.
+For other compilers that follow a convention pre-dating the standardization of
+inline, this macro may need to be defined to extern
+inline.
+
THREAD_LOCAL
+
+Can be defined to a sequence of tokens that, when appearing at the start of a
+variable declaration, indicates to the C compiler that the variable is
+per-thread, meaning that each execution thread gets its own separate
+instance of the variable.
+This macro is used in the supplied version of Berkeley SoftFloat’s header
+softfloat.h, in the declarations of variables
+softfloat_roundingMode, softfloat_detectTininess,
+extF80_roundingPrecision, and
+softfloat_exceptionFlags.
+To use the supplied, unmodified header softfloat.h, this macro
+must be defined (or not defined) the same as when the SoftFloat library was
+built.
+
+
+
FLOAT16
+
+Must be defined if the TestFloat programs are to support the
+16-bit half-precision floating-point format.
+
FLOAT64
+
+Must be defined if the TestFloat programs are to support the
+64-bit double-precision floating-point format.
+
EXTFLOAT80
+
+Must be defined if the TestFloat programs are to support the
+80-bit double-extended-precision floating-point format.
+
FLOAT128
+
+Must be defined if the TestFloat programs are to support the
+128-bit quadruple-precision floating-point format.
+
FLOAT_ROUND_ODD
+
+Must be defined if the TestFloat programs are to support rounding to odd
+(jamming).
+To be useful, this option also requires that the Berkeley SoftFloat library was
+compiled with macro SOFTFLOAT_ROUND_ODD defined.
+
+
+Following the usual custom for C, for all the macros except
+INLINE and THREAD_LOCAL, the content of a
+macro’s definition is irrelevant;
+what matters is a macro’s effect on #ifdef directives.
+
+
+
+It is recommended that any definition of macros LITTLEENDIAN,
+INLINE, and THREAD_LOCAL be made in a build
+target’s platform.h header file, because these macros are
+expected to be determined inflexibly by the target machine and compiler.
+The other five macros select build options, and hence might be better located
+in the target’s Makefile (or its equivalent).
+
+
+
+
6.4. Specializing the testfloat Program
+
+
+The supplied sources for the all-in-one testfloat program cause
+testfloat to test the C compiler’s float and
+double types for C operations +, -,
+*, /, etc.
+The supplied version is also capable of testing C type long
+double if the sources are compiled with one of these macros
+defined:
+
+
+
LONG_DOUBLE_IS_EXTFLOAT80
+
+Indicates that type longdouble is
+80-bit double-extended-precision floating-point.
+
LONG_DOUBLE_IS_FLOAT128
+
+Indicates that type longdouble is
+128-bit quadruple-precision floating-point.
+
+
+By default, testfloat assumes that only the IEEE Standard’s
+original four rounding modes (near_even, minMag,
+min, and max) are supported by the floating-point
+being tested.
+For other rounding modes, additional macro can be defined:
+
+
+
SUBJFLOAT_ROUND_NEAR_MAXMAG
+
+Indicates that the subject floating-point supports rounding mode
+near_maxMag (nearest/away).
+
SUBJFLOAT_ROUND_ODD
+
+Indicates that the subject floating-point supports rounding mode
+odd (jamming).
+
+
+
+
+
+To test a new and/or different implementation of floating-point,
+testfloat must normally be retargeted to invoke this other
+floating-point instead of C’s floating-point.
+Two source files define the functions that testfloat uses to
+invoke floating-point operations for testing:
+
+
+subjfloat_config.h
+subjfloat.c
+
+
+For the default target of testing C’s floating-point, these files are
+contained in directory source/subj-C as discussed
+earlier.
+For a different subject floating-point, it is recommended that appropriate
+versions of subjfloat_config.h and subjfloat.c be
+stored in a sibling subj-<target>
+directory, where <target> names the particular
+target.
+
+
+
+Header file subjfloat_config.h defines a macro of the form
+SUBJ_* for each subject function supported.
+For example, if function subj_f32_add exists to perform
+32-bit floating-point addition, then
+subjfloat_config.h should have a definition for macro
+SUBJ_F32_ADD.
+The actual function subj_f32_add is expected to be defined in
+subjfloat.c, along with all other subject functions.
+A common header file, subjfloat.h, (not target-specific) provides
+prototype declarations for all possible subject functions that
+testfloat may be compiled to test, whether actually existing or
+not.
+(There is no penalty for the header to declare prototypes of nonexistent
+functions that are never called.)
+For a specific build of testfloat, the -list option
+will list all subject functions that the testfloat program is able
+to invoke and thus test.
+
+
+
+In the source code as supplied, macros LONG_DOUBLE_IS_EXTFLOAT80
+and LONG_DOUBLE_IS_FLOAT128 affect only the target-specific source
+files in source/subj-C, so these macros can be
+ignored for any other subject floating-point that does not depend on them.
+On the other hand, macros SUBJFLOAT_ROUND_NEAR_MAXMAG and
+SUBJFLOAT_ROUND_ODD always determine whether the
+testfloat program attempts to test rounding modes
+near_maxMag and odd, regardless of the subject
+floating-point.
+
+
+
+
6.5. Improving the Random Number Functions
+
+
+If you are serious about using TestFloat for testing floating-point, you should
+consider replacing the random number functions in random.c.
+The supplied random number functions are built on top of the standard C
+rand function.
+Because function rand is rather poor on some systems, the
+functions in random.c assume very little about the quality of
+rand.
+As a result, rand is called more frequently than it might need to
+be, shortening the time before random number sequences repeat, and possibly
+wasting time as well.
+If rand is better on a given target platform, or if another,
+better random number generator is available (such as rand48 on
+UNIX-derived systems), TestFloat can be improved by overriding the given
+random.c with a target-specific one.
+
+
+
+Rather than modifying the supplied file random.c, it is
+recommended instead that a new, alternate file be created and the
+target’s Makefile be modified to refer to that alternate file in place of
+random.c.
+
+The testfloat program tests an implementation of floating-point
+arithmetic for conformity to the IEEE Standard for Binary Floating-Point
+Arithmetic.
+testfloat is part of the Berkeley TestFloat package, a small
+collection of programs for performing such tests.
+For general information about TestFloat, see file
+TestFloat-general.html.
+
+
+
+The testfloat program is an all-in-one tool for testing
+floating-point arithmetic.
+It generates test operand values, invokes a floating-point operation with the
+generated operands, and examines the corresponding computed results, reporting
+unexpected results as likely errors.
+While the processes of generating inputs and examining results are generic, a
+particular build of testfloat is limited to testing only the one
+implementation of floating-point it has been compiled to invoke.
+For example, while one instance of testfloat might be compiled to
+execute a computer’s hardware instruction for floating-point addition, a
+different version might be compiled to call a subroutine called
+myAddFloat that is linked into the testfloat program.
+To test a new implementation of floating-point (a new set of machine
+instructions or a new set of subroutines), a new testfloat must be
+compiled containing the code needed to invoke the new floating-point.
+
+
+
+The default build of testfloat assumes that C types
+float and double are 32-bit and
+64-bit binary floating-point types conforming to the IEEE
+Standard, and tests the C operations of +, -,
+*, /, type conversions, etc.
+This tests the floating-point arithmetic seen by C programs.
+Depending on the compiler and the options selected during compilation, this may
+or may not be the same as the computer’s floating-point hardware, if any.
+
+
+
+The testfloat program will ordinarily test an operation for all
+five rounding modes defined by the IEEE Floating-Point Standard, one after the
+other, plus possibly a sixth mode, round to odd (depending on the
+options selected when testfloat was compiled).
+If the rounding mode is not supposed to have any affect on the
+results—for instance, some operations do not require rounding—only
+the nearest/even rounding mode is checked.
+For double-extended-precision operations affected by rounding precision
+control, testfloat also tests all three rounding precision modes,
+one after the other.
+Testing can be limited to a single rounding mode and/or rounding precision with
+appropriate command-line options.
+
+
+
+For more about the operation of testfloat and how to interpret its
+output, refer to
+TestFloat-general.html.
+
+
+
+
Command Syntax
+
+
+The testfloat program is executed as a command with this syntax:
+
+
+testfloat [<option>...] <function>
+
+
+Square brackets ([ ]) denote optional arguments,
+<option> is a supported option, and
+<function> is the name of either a testable operation
+or a function set.
+The available options and function sets are documented below.
+The -list option can be used to obtain a list of all testable
+operations for a given build of testfloat.
+If testfloat is executed without any arguments, a summary of usage
+is written.
+
+
+
+
Options
+
+
+The testfloat program accepts several command options.
+If mutually contradictory options are given, the last one has priority.
+
+
+
-help
+
+
+The -help option causes a summary of program usage to be written,
+after which the program exits.
+
+
+
-list
+
+
+The -list option causes a list of testable operations to be
+written, after which the program exits.
+An operation is testable by testfloat if the program knows some
+way to invoke the operation.
+
+
+
-seed <num>
+
+
+The -seed option sets the seed for the pseudo-random number
+generator used for generating test cases.
+The argument to -seed is a nonnegative integer.
+Executing the same compiled testfloat program with the same
+arguments (including the same pseudo-random number seed) should always perform
+the same sequence of tests, whereas changing the pseudo-random number seed
+should result in a different sequence of tests.
+The default seed number is 1.
+
+
+
-level <num>
+
+
+The -level option sets the level of testing.
+The argument to -level can be either 1 or 2.
+The default is level 1.
+Level 2 performs many more tests than level 1 and thus can reveal
+bugs not found by level 1.
+
+
+
-errors <num>
+
+
+The -errors option instructs testfloat to report no
+more than the specified number of errors for any combination of operation,
+rounding mode, etc.
+The argument to -errors must be a nonnegative decimal integer.
+Once the specified number of error reports has been generated,
+testfloat ends the current test and begins the next one, if any.
+The default is -errors20.
+
+
+
+Against intuition, -errors0 causes
+testfloat to report every error it finds.
+
+
+
-errorstop
+
+
+The -errorstop option causes the program to exit after the first
+operation for which any errors are reported.
+
+
+
-forever
+
+
+The -forever option causes a single operation to be repeatedly
+tested.
+Only one rounding mode and/or rounding precision can be tested in a single
+execution.
+If not specified, the rounding mode defaults to nearest/even.
+For 80-bit double-extended-precision operations, the rounding
+precision defaults to full double-extended precision.
+The testing level is set to 2 by this option.
+
+
+
-checkNaNs
+
+
+The -checkNaNs option causes testfloat to verify the
+bitwise correctness of NaN results.
+In order for this option to be sensible, testfloat must have been
+compiled so that its internal reference implementation of floating-point
+(Berkeley SoftFloat) generates the proper NaN results for the system being
+tested.
+
+
+
-checkInvInts
+
+
+The -checkInvInts option causes testfloat to verify
+the bitwise correctness of integer results of invalid operations.
+In order for this option to be sensible, testfloat must have been
+compiled so that its internal reference implementation of floating-point
+(Berkeley SoftFloat) generates the proper integer results for the system being
+tested.
+
+
+
-checkAll
+
+
+Enables both -checkNaNs and -checkInvInts.
+
+
+
-precision32, -precision64, -precision80
+
+
+For 80-bit double-extended-precision operations affected by
+rounding precision control, the -precision32 option restricts
+testing to only the cases in which the rounding precision is
+32 bits, equivalent to 32-bit single-precision.
+The other rounding precision choices are not tested.
+Likewise, -precision64 fixes the rounding precision to
+64 bits, equivalent to 64-bit double-precision, and
+-precision80 fixes the rounding precision to the full
+80 bits of the double-extended-precision format.
+All these options are ignored for operations not affected by rounding precision
+control.
+
+
+
+The precision-control options may not be supported at all if no
+double-extended-precision operations are testable.
+
+The -rnear_even option restricts testing to only the cases in
+which the rounding mode is nearest/even.
+The other rounding mode choices are not tested.
+Likewise, -rnear_maxMag forces rounding to nearest/maximum
+magnitude (nearest-away), -rminMag forces rounding to minimum
+magnitude (toward zero), -rmin forces rounding to minimum (down,
+toward negative infinity), -rmax forces rounding to maximum (up,
+toward positive infinity), and -rodd, if supported, forces
+rounding to odd.
+These options are ignored for operations that are exact and thus do not round,
+or that have the rounding mode included in the function name (such as
+f32_to_i32_r_near_maxMag).
+
+
+
-tininessbefore, -tininessafter
+
+
+The -tininessbefore option indicates that the floating-point
+implementation being tested detects tininess on underflow before rounding.
+The -tininessafter option indicates that tininess is detected
+after rounding.
+The testfloat program alters its expectations accordingly.
+These options override the default selected when testfloat was
+compiled.
+Choosing the wrong one of these two options should cause error reports for some
+(but not all) operations.
+
+
+
+
Function Sets
+
+
+Just as testfloat can test an operation for all five or six
+rounding modes in sequence, multiple operations can be tested with a single
+execution of testfloat.
+Two sets are recognized: -all1 and -all2.
+The set -all1 is all one-operand operations, while
+-all2 is all two-operand operations.
+A function set is used in place of an operation name in the
+testfloat command line, such as
+
+The testfloat_gen program generates test cases for testing that an
+implementation of floating-point arithmetic conforms to the IEEE Standard for
+Binary Floating-Point Arithmetic.
+testfloat_gen is part of the Berkeley TestFloat package, a small
+collection of programs for performing such tests.
+For general information about TestFloat, see file
+TestFloat-general.html.
+
+
+
+A single execution of testfloat_gen generates test cases for only
+a single floating-point operation and associated options.
+The testfloat_gen program must be repeatedly executed to generate
+test cases for each operation to be tested.
+
+
+
+The testfloat_gen program writes the test cases it generates to
+standard output.
+This output can either be captured in a file through redirection, or be piped
+to another program that exercises a floating-point operation using the test
+cases as they are supplied.
+Depending on use, the total output from testfloat_gen can be
+large, so piping to another program may be the best choice to avoid using
+inordinate file space.
+The format of testfloat_gen’s output is raw hexadecimal
+text, described in the section below titled Output Format.
+
+
+
+
Command Syntax
+
+
+The testfloat_gen program is executed as a command in one of these
+forms:
+
+Square brackets ([ ]) denote optional arguments, and
+<option> is a supported option, documented below.
+A testfloat_gen command expects either a
+<type> specifying the type and number of outputs or a
+<function> naming a floating-point operation.
+If testfloat_gen is executed without any arguments, a summary of
+usage is written.
+
+
+
+A <type> can be one of the following:
+
+
+
+
ui32
+
unsigned 32-bit integers
+
+
+
ui64
+
unsigned 64-bit integers
+
+
+
i32
+
signed 32-bit integers
+
+
+
i64
+
signed 64-bit integers
+
+
+
f16 [<num>]
+
one or more 16-bit half-precision floating-point values
+
+
+
f32 [<num>]
+
one or more 32-bit single-precision floating-point values
+
+
+
f64 [<num>]
+
one or more 64-bit double-precision floating-point values
+
+
+
extF80 [<num>]
+
one or more 80-bit double-extended-precision floating-point
+values
+
+
+
f128 [<num>]
+
one or more 128-bit quadruple-precision floating-point
+values
+
+
+
+Optional <num> is one of 1, 2, or 3.
+If a <type> is given without
+<num> (such as ui32 or
+f64), testfloat_gen outputs a list of values of the
+specified type, one value per line, appropriate for testing a floating-point
+operation with exactly one operand of the given type.
+If a floating-point type and number are given (such as
+f322 or
+extF801), testfloat_gen
+outputs the specified number of values per line, appropriate for testing a
+floating-point operation with that number of operands.
+Although the exact operation being tested is not specified, the test cases
+output by testfloat_gen cover all standard floating-point
+operations, to the degree explained in
+TestFloat-general.html.
+
+
+
+If a <function> operation name is given, then each
+line of output from testfloat_gen contains not only the operands
+for that operation (as would be generated by an appropriate
+<type> argument) but also the expected results as
+determined by testfloat_gen’s internal floating-point
+emulation (Berkeley SoftFloat).
+The available operation names are listed in
+TestFloat-general.html.
+In all cases, floating-point operations have two results:
+first, a value, which may be floating-point, integer, or Boolean, and, second,
+the floating-point exception flags raised by the operation.
+If the output from a tested floating-point operation does not match the
+expected output specified by testfloat_gen, this may or may not
+indicate an error in the floating-point operation.
+For further explanation, see
+TestFloat-general.html,
+especially the section titled Variations Allowed by the IEEE Floating-Point
+Standard.
+
+
+
+
Options
+
+
+The testfloat_gen program accepts several command options.
+If mutually contradictory options are given, the last one has priority.
+
+
+
-help
+
+
+The -help option causes a summary of program usage to be written,
+after which the program exits.
+
+
+
-prefix <text>
+
+
+The -prefix option causes testfloat_gen to write the
+supplied text argument verbatim as the first line of output before any test
+cases.
+This can be used, for example, to indicate to a downstream program what kind of
+test to perform for the test cases that follow.
+
+
+
-seed <num>
+
+
+The -seed option sets the seed for the pseudo-random number
+generator used for generating test cases.
+The argument to -seed is a nonnegative integer.
+Executing the same testfloat_gen program with the same arguments
+(including the same pseudo-random number seed) should always generate the same
+sequence of test cases, whereas changing the pseudo-random number seed should
+result in a different sequence of test cases.
+The default seed number is 1.
+
+
+
-level <num>
+
+
+The -level option sets the level of testing.
+The argument to -level can be either 1 or 2.
+The default is level 1.
+Level 2 causes many more test cases to be generated, with better
+coverage, than level 1.
+
+
+
-n <num>
+
+
+Option -n specifies the number of test cases to generate.
+For each <type> or
+<function> and each testing level (set by
+-level), there is a minimum value that testfloat_gen
+will accept for <num>.
+If no -n option is given, the number of test cases generated by
+testfloat_gen equals the minimum value acceptable for the
+-n argument.
+Option -n cannot be used to reduce this number, but can increase
+it, without changing the testing level.
+
+
+
-forever
+
+
+The -forever option causes test cases to be generated
+indefinitely, without limit (until the program is terminated by some external
+cause).
+The testing level is set to 2 by this option.
+
+
+
-precision32, -precision64, -precision80
+
+
+When a <function> is specified that is an
+80-bit double-extended-precision operation affected by rounding
+precision control, the -precision32 option sets the rounding
+precision to 32 bits, equivalent to 32-bit
+single-precision.
+Likewise, -precision64 sets the rounding precision to
+64 bits, equivalent to 64-bit double-precision, and
+-precision80 sets the rounding precision to the full
+80 bits of the double-extended-precision format.
+All these options are ignored for operations not affected by rounding precision
+control.
+When rounding precision is applicable but not specified, the default is the
+full 80 bits, same as -precision80.
+
+When a <function> is specified that requires
+rounding, the -rnear_even option sets the rounding mode to
+nearest/even;
+-rnear_maxMag sets rounding to nearest/maximum magnitude
+(nearest-away);
+-rminMag sets rounding to minimum magnitude (toward zero);
+-rmin sets rounding to minimum (down, toward negative infinity);
+-rmax sets rounding to maximum (up, toward positive infinity);
+and -rodd, if supported, sets rounding to odd.
+These options are ignored for operations that are exact and thus do not round.
+When rounding mode is relevant but not specified, the default is to round to
+nearest/even, same as -rnear_even.
+
+
+
-tininessbefore, -tininessafter
+
+
+When a <function> is specified that requires
+rounding, the -tininessbefore option indicates that tininess on
+underflow will be detected before rounding, while -tininessafter
+indicates that tininess on underflow will be detected after rounding.
+These options are ignored for operations that are exact and thus do not round.
+When the method of tininess detection matters but is not specified, the default
+is to detect tininess on underflow after rounding, same as
+-tininessafter.
+
+
+
-notexact, -exact
+
+
+When a <function> is specified that rounds to an
+integer (either conversion to an integer type or a roundToInt
+operation), the -notexact option indicates that the inexact
+exception flag is never raised, while -exact indicates that the
+inexact exception flag is to be raised if the result is inexact.
+For other operations, these options are ignored.
+If neither option is specified, the default is not to raise the inexact
+exception flag when rounding to an integer, same as -notexact.
+
+
+
+
Output Format
+
+
+For each test case generated, testfloat_gen writes a single line
+of text to standard output.
+When the testfloat_gen command is given a
+<type> argument, each test case consists of either
+one integer value or one, two, or three floating-point values.
+Each value is written to output as a raw hexadecimal number.
+When there is more than one value per line, they are separated by spaces.
+For example, output from executing
+
+with each hexadecimal number being one 64-bit floating-point
+value.
+Note that, for floating-point values, the sign and exponent are at the
+most-significant end of the number.
+Thus, for the first number on the first line above, the leading hexadecimal
+digits 3F9 are the sign and encoded exponent of the
+64-bit floating-point value, and the remaining digits are the
+encoded significand.
+
+
+
+When testfloat_gen is given a <function>
+operation name, each line of output has not only the operands for the operation
+but also the expected output, consisting of a result value and the exception
+flags that are raised.
+For example, the output from
+
+On each line, the first two numbers are the operands for the floating-point
+addition, and the third and fourth numbers are the expected floating-point
+result (the sum) and the exception flags raised.
+Exception flags are encoded with one bit per flag as follows:
+
+The testfloat_ver program accepts test-case results obtained from
+exercising an implementation of floating-point arithmetic and verifies that
+those results conform to the IEEE Standard for Binary Floating-Point
+Arithmetic.
+testfloat_ver is part of the Berkeley TestFloat package, a small
+collection of programs for performing such tests.
+For general information about TestFloat, see file
+TestFloat-general.html.
+
+
+
+A single execution of testfloat_ver verifies results for only a
+single floating-point operation and associated options.
+The testfloat_ver program must be repeatedly executed to verify
+results for each operation to be tested.
+
+
+
+The test cases to be verified are read by testfloat_ver from
+standard input.
+This input will typically be piped from another program that, for each test
+case, invokes the floating-point operation and writes out the results.
+The format of testfloat_ver’s input is raw hexadecimal text,
+described in the section below titled Input Format.
+
+
+
+For each test case given to it, testfloat_ver examines the
+computed results and reports any unexpected results as likely errors.
+
+For more about the operation of testfloat_ver and how to interpret
+its output, refer to
+TestFloat-general.html.
+
+
+
+
Command Syntax
+
+
+The testfloat_ver program is executed as a command with this
+syntax:
+
+
+testfloat_ver [<option>...] <function>
+
+
+Square brackets ([ ]) denote optional arguments,
+<option> is a supported option, and
+<function> is the name of a testable operation.
+The available options are documented below.
+The testable operation names are listed in
+TestFloat-general.html.
+If testfloat_ver is executed without any arguments, a summary of
+usage is written.
+
+
+
+
Options
+
+
+The testfloat_ver program accepts several command options.
+If mutually contradictory options are given, the last one has priority.
+
+
+
-help
+
+
+The -help option causes a summary of program usage to be written,
+after which the program exits.
+
+
+
-errors <num>
+
+
+The -errors option instructs testfloat_ver to report
+no more than the specified number of errors.
+The argument to -errors must be a nonnegative decimal integer.
+Once the specified number of error reports has been generated, the program
+exits.
+The default is -errors20.
+
+
+
+Against intuition, -errors0 causes
+testfloat_ver to continue for any number of errors.
+
+
+
-checkNaNs
+
+
+The -checkNaNs option causes testfloat_ver to verify
+the bitwise correctness of NaN results.
+In order for this option to be sensible, testfloat_ver must have
+been compiled so that its internal reference implementation of floating-point
+(Berkeley SoftFloat) generates the proper NaN results for the system being
+tested.
+
+
+
-checkInvInts
+
+
+The -checkInvInts option causes testfloat_ver to
+verify the bitwise correctness of integer results of invalid operations.
+In order for this option to be sensible, testfloat_ver must have
+been compiled so that its internal reference implementation of floating-point
+(Berkeley SoftFloat) generates the proper integer results for the system being
+tested.
+
+
+
-checkAll
+
+
+Enables both -checkNaNs and -checkInvInts.
+
+
+
-precision32, -precision64, -precision80
+
+
+When <function> is an 80-bit
+double-extended-precision operation affected by rounding precision control, the
+-precision32 option indicates that the rounding precision should
+be 32 bits, equivalent to 32-bit single-precision.
+Likewise, -precision64 indicates that the rounding precision
+should be 64 bits, equivalent to 64-bit
+double-precision, and -precision80 indicates that the rounding
+precision should be the full 80 bits of the
+double-extended-precision format.
+All these options are ignored for operations not affected by rounding precision
+control.
+When rounding precision is applicable but not specified, the default assumption
+is the full 80 bits, same as -precision80.
+
+When <function> is an operation that requires
+rounding, the -rnear_even option indicates that rounding should be
+to nearest/even, -rnear_maxMag indicates rounding to
+nearest/maximum magnitude (nearest-away), -rminMag indicates
+rounding to minimum magnitude (toward zero), -rmin indicates
+rounding to minimum (down, toward negative infinity), -rmax
+indicates rounding to maximum (up, toward positive infinity), and
+-rodd, if supported, indicates rounding to odd.
+These options are ignored for operations that are exact and thus do not round.
+When rounding mode is relevant but not specified, the default assumption is
+rounding to nearest/even, same as -rnear_even.
+
+
+
-tininessbefore, -tininessafter
+
+
+When <function> is an operation that requires
+rounding, the -tininessbefore option indicates that tininess on
+underflow should be detected before rounding, while -tininessafter
+indicates that tininess on underflow should be detected after rounding.
+These options are ignored for operations that are exact and thus do not round.
+When the method of tininess detection matters but is not specified, the default
+assumption is that tininess should be detected after rounding, same as
+-tininessafter.
+
+
+
-notexact, -exact
+
+
+When <function> is an operation that rounds to an
+integer (either conversion to an integer type or a roundToInt
+operation), the -notexact option indicates that the inexact
+exception flag should never be raised, while -exact indicates that
+the inexact exception flag should be raised when the result is inexact.
+For other operations, these options are ignored.
+If neither option is specified, the default assumption is that the
+inexact exception flag should not be raised when rounding to an integer,
+same as -notexact.
+
+
+
+
Input Format
+
+
+For a given <function> argument, the input format
+expected by testfloat_ver is the same as the output generated by
+program
+testfloat_gen for
+the same argument.
+
+
+
+Input to testfloat_ver is expected to be text, with each line
+containing the data for one test case.
+The number of input lines thus equals the number of test cases.
+A single test case is organized as follows: first are the operands for the
+operation, next is the result value obtained, and last is a number indicating
+the exception flags that were raised.
+These values are all expected to be provided as raw hexadecimal numbers
+separated on the line by spaces.
+For example, for the command
+
+On each line above, the first two hexadecimal numbers represent the
+64-bit floating-point operands, the third hexadecimal number is
+the 64-bit floating-point result of the operation (the sum), and
+the last hexadecimal number gives the exception flags that were raised by the
+operation.
+
+
+
+Note that, for floating-point values, the sign and exponent are at the
+most-significant end of the number.
+Thus, for the first number on the first line above, the leading hexadecimal
+digits 3F9 are the sign and encoded exponent of the
+64-bit floating-point value, and the remaining digits are the
+encoded significand.
+
+
+
+Exception flags are encoded with one bit per flag as follows:
+
+The testsoftfloat program tests that a build of the Berkeley
+SoftFloat library conforms to the IEEE Standard for Binary Floating-Point
+Arithmetic as expected.
+Program testsoftfloat is part of the Berkeley TestFloat package, a
+small collection of programs for performing such tests.
+For general information about TestFloat, as well as for basics about the
+operation of testsoftfloat and how to interpret its output, see
+file
+TestFloat-general.html.
+
+
+
+Note that, even if there are no bugs in the source code for SoftFloat (not
+guaranteed), a build of SoftFloat might still fail due to an issue with the
+build process, such as an incompatible compiler option or a compiler bug.
+
+
+
+The testsoftfloat program will ordinarily test a function for all
+five rounding modes defined by the IEEE Floating-Point Standard, one after the
+other, plus possibly a sixth mode, round to odd (depending on the
+options selected when testsoftfloat was compiled).
+If an operation is not supposed to require rounding, it will by default be
+tested only with the rounding mode set to near_even
+(nearest/even).
+In the same way, if an operation is affected by the way in which underflow
+tininess is detected, testsoftfloat tests the function with
+tininess detected both before rounding and after rounding.
+For 80-bit double-extended-precision operations affected by
+rounding precision control, testsoftfloat also tests the function
+for all three rounding precision modes, one after the other.
+Testing can be limited to a single rounding mode, a single tininess mode,
+and/or a single rounding precision with appropriate command-line options.
+
+
+
+
Command Syntax
+
+
+The testsoftfloat program is executed as a command with this
+syntax:
+
+
+testsoftfloat [<option>...] <function>
+
+
+Square brackets ([ ]) denote optional arguments,
+<option> is a supported option, and
+<function> is the name of either a testable function
+or a function set.
+The available options and function sets are documented below.
+If testsoftfloat is executed without any arguments, a summary of
+usage is written.
+
+
+
+
Options
+
+
+The testsoftfloat program accepts several command options.
+If mutually contradictory options are given, the last one has priority.
+
+
+
-help
+
+
+The -help option causes a summary of program usage to be written,
+after which the program exits.
+
+
+
-seed <num>
+
+
+The -seed option sets the seed for the pseudo-random number
+generator used for generating test cases.
+The argument to -seed is a nonnegative integer.
+Executing the same testsoftfloat program with the same arguments
+(including the same pseudo-random number seed) should always perform the same
+sequence of tests, whereas changing the pseudo-random number seed should result
+in a different sequence of tests.
+The default seed number is 1.
+
+
+
-level <num>
+
+
+The -level option sets the level of testing.
+The argument to -level can be either 1 or 2.
+The default is level 1.
+Level 2 performs many more tests than level 1 and thus can reveal
+bugs not found by level 1.
+
+
+
-errors <num>
+
+
+The -errors option instructs testsoftfloat to report
+no more than the specified number of errors for any combination of function,
+rounding mode, etc.
+The argument to -errors must be a nonnegative decimal integer.
+Once the specified number of error reports has been generated,
+testsoftfloat ends the current test and begins the next one, if
+any.
+The default is -errors20.
+
+
+
+Against intuition, -errors0 causes
+testsoftfloat to report every error it finds.
+
+
+
-errorstop
+
+
+The -errorstop option causes the program to exit after the first
+function for which any errors are reported.
+
+
+
-forever
+
+
+The -forever option causes a single function to be repeatedly
+tested.
+Only one rounding mode and/or rounding precision can be tested in a single
+execution.
+If not specified, the rounding mode defaults to nearest/even.
+For 80-bit double-extended-precision functions, the rounding
+precision defaults to full double-extended precision.
+The testing level is set to 2 by this option.
+
+
+
-precision32, -precision64, -precision80
+
+
+For 80-bit double-extended-precision funcions affected by
+rounding precision control, the -precision32 option restricts
+testing to only the cases in which the rounding precision is
+32 bits, equivalent to 32-bit single-precision.
+The other rounding precision choices are not tested.
+Likewise, -precision64 fixes the rounding precision to
+64 bits, equivalent to 64-bit double-precision;
+and -precision80 fixes the rounding precision to the full
+80 bits of the double-extended-precision format.
+All these options are ignored for operations not affected by rounding precision
+control.
+
+The -rnear_even option restricts testing to only the cases in
+which the rounding mode is nearest/even.
+The other rounding mode choices are not tested.
+Likewise, -rnear_maxMag forces rounding to nearest/maximum
+magnitude (nearest-away), -rminMag forces rounding to minimum
+magnitude (toward zero), -rmin forces rounding to minimum (down,
+toward negative infinity), -rmax forces rounding to maximum (up,
+toward positive infinity), and -rodd, if supported, forces
+rounding to odd.
+These options are ignored for operations that are exact and thus do not round.
+
+
+
-tininessbefore, -tininessafter
+
+
+The -tininessbefore option restricts testing to only the cases in
+which tininess on underflow is detected before rounding.
+Likewise, -tininessafter restricts testing to only the cases in
+which tininess on underflow is detected after rounding.
+
+
+
-notexact, -exact
+
+
+For functions that round to an integer (conversions to integer types and the
+roundToInt functions), the -notexact option restricts
+testing to only the cases for which the exact operand
+(specifying whether the inexact exception flag may be raised) is
+false.
+Likewise, the -exact option restricts testing to only the cases
+for which the exact operand is true.
+
+
+
+
Function Sets
+
+
+Just as testsoftfloat can test a function for all five or six
+rounding modes in sequence, multiple functions can be tested with a single
+execution of testsoftfloat.
+Two sets are recognized: -all1 and -all2.
+The set -all1 is all one-operand operations, while
+-all2 is all two-operand operations.
+A function set is used in place of a function name in the
+testsoftfloat command line, such as
+
+
+testsoftfloat [<option>...] -all1
+
+
+
+
+
+For the purpose of deciding the number of operands of an operation, any
+roundingMode and exact arguments are
+ignored.
+(Such arguments specify the rounding mode and whether the inexact
+exception flag may be raised, respectively.)
+Thus, functions that convert to integer type and the roundToInt
+functions are included in the set of one-operand operations tested by
+-all1.
+
+The timesoftfloat program provides a simple way to evaluate the
+speed of the floating-point operations of the Berkeley SoftFloat library.
+Program timesoftfloat is included with the Berkeley TestFloat
+package, a small collection of programs for testing that an implementation of
+floating-point conforms to the IEEE Standard for Binary Floating-Point
+Arithmetic.
+Although timesoftfloat does not test floating-point correctness
+like the other TestFloat programs, nevertheless timesoftfloat is a
+partner to TestFloat’s testsoftfloat program.
+For more about TestFloat generally and testsoftfloat specifically,
+see file
+TestFloat-general.html.
+
+
+
+Ordinarily, timesoftfloat will measure a function’s speed
+separately for each of the five rounding modes defined by the IEEE
+Floating-Point Standard, one after the other, plus possibly a sixth mode,
+round to odd (depending on the options selected when
+timesoftfloat was compiled).
+If an operation is not supposed to require rounding, it will by default be
+timed only with the rounding mode set to near_even (nearest/even).
+In the same way, if an operation is affected by the way in which underflow
+tininess is detected, timesoftfloat times the function with
+tininess detected both before rounding and after rounding.
+For 80-bit double-extended-precision operations affected by
+rounding precision control, timesoftfloat also times the function
+for each of the three rounding precision modes, one after the other.
+Evaluation of a function can be limited to a single rounding mode, a single
+tininess mode, and/or a single rounding precision with appropriate command-line
+options.
+
+
+
+For each function and mode evaluated, timesoftfloat reports the
+measured speed of the function in Mop/s, or “millions of operations per
+second”.
+The speeds reported by timesoftfloat may be affected somewhat by
+other software executing at the same time as timesoftfloat.
+Be aware also that the exact execution time of any SoftFloat function depends
+partly on the values of arguments and the state of the processor’s caches
+at the time the function is called.
+Your actual experience with SoftFloat may differ from the speeds reported by
+timesoftfloat for all these reasons.
+
+
+
+Note that the remainder operations for larger formats (f64_rem,
+extF80_rem, and f128_rem) can be markedly slower than
+other operations, particularly for double-extended-precision
+(extF80_rem) and quadruple precision (f128_rem).
+This is inherent to the remainder operation itself and is not a failing of the
+SoftFloat implementation.
+
+
+
+
Command Syntax
+
+
+The timesoftfloat program is executed as a command with this
+syntax:
+
+
+timesoftfloat [<option>...] <function>
+
+
+Square brackets ([ ]) denote optional arguments,
+<option> is a supported option, and
+<function> is the name of either a testable function
+or a function set.
+The available options and function sets are documented below.
+If timesoftfloat is executed without any arguments, a summary of
+usage is written.
+
+
+
+
Options
+
+
+The timesoftfloat program accepts several command options.
+If mutually contradictory options are given, the last one has priority.
+
+
+
-help
+
+
+The -help option causes a summary of program usage to be written,
+after which the program exits.
+
+
+
-precision32, -precision64, -precision80
+
+
+For 80-bit double-extended-precision funcions affected by
+rounding precision control, the -precision32 option restricts
+timing of an operation to only the cases in which the rounding precision is
+32 bits, equivalent to 32-bit single-precision.
+Other rounding precision choices are not timed.
+Likewise, -precision64 fixes the rounding precision to
+64 bits, equivalent to 64-bit double-precision;
+and -precision80 fixes the rounding precision to the full
+80 bits of the double-extended-precision format.
+All these options are ignored for operations not affected by rounding precision
+control.
+
+The -rnear_even option restricts timing of an operation to only
+the cases in which the rounding mode is nearest/even.
+Other rounding mode choices are not timed.
+Likewise, -rnear_maxMag forces rounding to nearest/maximum
+magnitude (nearest-away), -rminMag forces rounding to minimum
+magnitude (toward zero), -rmin forces rounding to minimum (down,
+toward negative infinity), -rmax forces rounding to maximum (up,
+toward positive infinity), and -rodd, if supported, forces
+rounding to odd.
+These options are ignored for operations that are exact and thus do not round.
+
+
+
-tininessbefore, -tininessafter
+
+
+The -tininessbefore option restricts timing of an operation to
+only the cases in which tininess on underflow is detected before rounding.
+Likewise, -tininessafter restricts measurement to only the cases
+in which tininess on underflow is detected after rounding.
+
+
+
-notexact, -exact
+
+
+For functions that round to an integer (conversions to integer types and the
+roundToInt functions), the -notexact option restricts
+timing of an operation to only the cases for which the
+exact operand (specifying whether the inexact
+exception flag may be raised) is false.
+Likewise, the -exact option restricts measurement to only the
+cases for which the exact operand is true.
+
+
+
+
Function Sets
+
+
+Just as timesoftfloat can time a function for all five or six
+rounding modes in sequence, multiple functions can be timed with a single
+execution of timesoftfloat.
+Three sets are recognized:
+-all1, -all2, and -all.
+The set -all1 is all one-operand operations, -all2 is
+all two-operand operations, and -all is obviously all operations.
+A function set is used in place of a function name in the
+timesoftfloat command line, such as
+
+
+timesoftfloat [<option>...] -all1
+
+
+
+
+
+For the purpose of deciding the number of operands of an operation, any
+roundingMode and exact arguments are
+ignored.
+(Such arguments specify the rounding mode and whether the inexact
+exception flag may be raised, respectively.)
+Thus, functions that convert to integer type and the roundToInt
+functions are included in the set of one-operand operations timed by
+-all1.
+
+
+
+
+
diff --git a/src/libs/softfloat-3e/testfloat/source/fail.c b/src/libs/softfloat-3e/testfloat/source/fail.c
new file mode 100644
index 00000000..f68e941f
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/fail.c
@@ -0,0 +1,59 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include
+#include
+#include "platform.h"
+#include "fail.h"
+
+char *fail_programName = "";
+
+void fail( const char *messagePtr, ... )
+{
+ va_list varArgs;
+
+ fflush( 0 );
+ fprintf( stderr, "%s: ", fail_programName );
+ va_start( varArgs, messagePtr );
+ vfprintf( stderr, messagePtr, varArgs );
+ va_end( varArgs );
+ fputs( ".\n", stderr );
+ exit( EXIT_FAILURE );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/fail.h b/src/libs/softfloat-3e/testfloat/source/fail.h
new file mode 100644
index 00000000..e981473c
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/fail.h
@@ -0,0 +1,41 @@
+
+/*============================================================================
+
+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 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.
+
+=============================================================================*/
+
+extern char *fail_programName;
+
+void fail( const char *, ... );
+
diff --git a/src/libs/softfloat-3e/testfloat/source/functionInfos.c b/src/libs/softfloat-3e/testfloat/source/functionInfos.c
new file mode 100644
index 00000000..8e401068
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/functionInfos.c
@@ -0,0 +1,290 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "functions.h"
+
+#define ARG_1 FUNC_ARG_UNARY
+#define ARG_2 FUNC_ARG_BINARY
+#define ARG_R FUNC_ARG_ROUNDINGMODE
+#define ARG_E FUNC_ARG_EXACT
+#define EFF_P FUNC_EFF_ROUNDINGPRECISION
+#define EFF_R FUNC_EFF_ROUNDINGMODE
+#define EFF_T FUNC_EFF_TININESSMODE
+#define EFF_T_REDP FUNC_EFF_TININESSMODE_REDUCEDPREC
+
+/*----------------------------------------------------------------------------
+| Warning: This array must match the list of macros defined in "functions.h".
+*----------------------------------------------------------------------------*/
+const struct functionInfo functionInfos[NUM_FUNCTIONS] = {
+ { 0, 0 },
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT16
+ { "ui32_to_f16", ARG_1 | EFF_R },
+#endif
+ { "ui32_to_f32", ARG_1 | EFF_R },
+#ifdef FLOAT64
+ { "ui32_to_f64", ARG_1 },
+#endif
+#ifdef EXTFLOAT80
+ { "ui32_to_extF80", ARG_1 },
+#endif
+#ifdef FLOAT128
+ { "ui32_to_f128", ARG_1 },
+#endif
+#ifdef FLOAT16
+ { "ui64_to_f16", ARG_1 | EFF_R },
+#endif
+ { "ui64_to_f32", ARG_1 | EFF_R },
+#ifdef FLOAT64
+ { "ui64_to_f64", ARG_1 | EFF_R },
+#endif
+#ifdef EXTFLOAT80
+ { "ui64_to_extF80", ARG_1 },
+#endif
+#ifdef FLOAT128
+ { "ui64_to_f128", ARG_1 },
+#endif
+#ifdef FLOAT16
+ { "i32_to_f16", ARG_1 | EFF_R },
+#endif
+ { "i32_to_f32", ARG_1 | EFF_R },
+#ifdef FLOAT64
+ { "i32_to_f64", ARG_1 },
+#endif
+#ifdef EXTFLOAT80
+ { "i32_to_extF80", ARG_1 },
+#endif
+#ifdef FLOAT128
+ { "i32_to_f128", ARG_1 },
+#endif
+#ifdef FLOAT16
+ { "i64_to_f16", ARG_1 | EFF_R },
+#endif
+ { "i64_to_f32", ARG_1 | EFF_R },
+#ifdef FLOAT64
+ { "i64_to_f64", ARG_1 | EFF_R },
+#endif
+#ifdef EXTFLOAT80
+ { "i64_to_extF80", ARG_1 },
+#endif
+#ifdef FLOAT128
+ { "i64_to_f128", ARG_1 },
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT16
+ { "f16_to_ui32", ARG_1 | ARG_R | ARG_E },
+ { "f16_to_ui64", ARG_1 | ARG_R | ARG_E },
+ { "f16_to_i32", ARG_1 | ARG_R | ARG_E },
+ { "f16_to_i64", ARG_1 | ARG_R | ARG_E },
+ { "f16_to_ui32_r_minMag", ARG_1 | ARG_E },
+ { "f16_to_ui64_r_minMag", ARG_1 | ARG_E },
+ { "f16_to_i32_r_minMag", ARG_1 | ARG_E },
+ { "f16_to_i64_r_minMag", ARG_1 | ARG_E },
+ { "f16_to_f32", ARG_1 },
+#ifdef FLOAT64
+ { "f16_to_f64", ARG_1 },
+#endif
+#ifdef EXTFLOAT80
+ { "f16_to_extF80", ARG_1 },
+#endif
+#ifdef FLOAT128
+ { "f16_to_f128", ARG_1 },
+#endif
+ { "f16_roundToInt", ARG_1 | ARG_R | ARG_E },
+ { "f16_add", ARG_2 | EFF_R },
+ { "f16_sub", ARG_2 | EFF_R },
+ { "f16_mul", ARG_2 | EFF_R | EFF_T },
+ { "f16_mulAdd", EFF_R | EFF_T },
+ { "f16_div", ARG_2 | EFF_R },
+ { "f16_rem", ARG_2 },
+ { "f16_sqrt", ARG_1 | EFF_R },
+ { "f16_eq", ARG_2 },
+ { "f16_le", ARG_2 },
+ { "f16_lt", ARG_2 },
+ { "f16_eq_signaling", ARG_2 },
+ { "f16_le_quiet", ARG_2 },
+ { "f16_lt_quiet", ARG_2 },
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ { "f32_to_ui32", ARG_1 | ARG_R | ARG_E },
+ { "f32_to_ui64", ARG_1 | ARG_R | ARG_E },
+ { "f32_to_i32", ARG_1 | ARG_R | ARG_E },
+ { "f32_to_i64", ARG_1 | ARG_R | ARG_E },
+ { "f32_to_ui32_r_minMag", ARG_1 | ARG_E },
+ { "f32_to_ui64_r_minMag", ARG_1 | ARG_E },
+ { "f32_to_i32_r_minMag", ARG_1 | ARG_E },
+ { "f32_to_i64_r_minMag", ARG_1 | ARG_E },
+#ifdef FLOAT16
+ { "f32_to_f16", ARG_1 | EFF_R | EFF_T },
+#endif
+#ifdef FLOAT64
+ { "f32_to_f64", ARG_1 },
+#endif
+#ifdef EXTFLOAT80
+ { "f32_to_extF80", ARG_1 },
+#endif
+#ifdef FLOAT128
+ { "f32_to_f128", ARG_1 },
+#endif
+ { "f32_roundToInt", ARG_1 | ARG_R | ARG_E },
+ { "f32_add", ARG_2 | EFF_R },
+ { "f32_sub", ARG_2 | EFF_R },
+ { "f32_mul", ARG_2 | EFF_R | EFF_T },
+ { "f32_mulAdd", EFF_R | EFF_T },
+ { "f32_div", ARG_2 | EFF_R },
+ { "f32_rem", ARG_2 },
+ { "f32_sqrt", ARG_1 | EFF_R },
+ { "f32_eq", ARG_2 },
+ { "f32_le", ARG_2 },
+ { "f32_lt", ARG_2 },
+ { "f32_eq_signaling", ARG_2 },
+ { "f32_le_quiet", ARG_2 },
+ { "f32_lt_quiet", ARG_2 },
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT64
+ { "f64_to_ui32", ARG_1 | ARG_R | ARG_E },
+ { "f64_to_ui64", ARG_1 | ARG_R | ARG_E },
+ { "f64_to_i32", ARG_1 | ARG_R | ARG_E },
+ { "f64_to_i64", ARG_1 | ARG_R | ARG_E },
+ { "f64_to_ui32_r_minMag", ARG_1 | ARG_E },
+ { "f64_to_ui64_r_minMag", ARG_1 | ARG_E },
+ { "f64_to_i32_r_minMag", ARG_1 | ARG_E },
+ { "f64_to_i64_r_minMag", ARG_1 | ARG_E },
+#ifdef FLOAT16
+ { "f64_to_f16", ARG_1 | EFF_R | EFF_T },
+#endif
+ { "f64_to_f32", ARG_1 | EFF_R | EFF_T },
+#ifdef EXTFLOAT80
+ { "f64_to_extF80", ARG_1 },
+#endif
+#ifdef FLOAT128
+ { "f64_to_f128", ARG_1 },
+#endif
+ { "f64_roundToInt", ARG_1 | ARG_R | ARG_E },
+ { "f64_add", ARG_2 | EFF_R },
+ { "f64_sub", ARG_2 | EFF_R },
+ { "f64_mul", ARG_2 | EFF_R | EFF_T },
+ { "f64_mulAdd", EFF_R | EFF_T },
+ { "f64_div", ARG_2 | EFF_R },
+ { "f64_rem", ARG_2 },
+ { "f64_sqrt", ARG_1 | EFF_R },
+ { "f64_eq", ARG_2 },
+ { "f64_le", ARG_2 },
+ { "f64_lt", ARG_2 },
+ { "f64_eq_signaling", ARG_2 },
+ { "f64_le_quiet", ARG_2 },
+ { "f64_lt_quiet", ARG_2 },
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef EXTFLOAT80
+ { "extF80_to_ui32", ARG_1 | ARG_R | ARG_E },
+ { "extF80_to_ui64", ARG_1 | ARG_R | ARG_E },
+ { "extF80_to_i32", ARG_1 | ARG_R | ARG_E },
+ { "extF80_to_i64", ARG_1 | ARG_R | ARG_E },
+ { "extF80_to_ui32_r_minMag", ARG_1 | ARG_E },
+ { "extF80_to_ui64_r_minMag", ARG_1 | ARG_E },
+ { "extF80_to_i32_r_minMag", ARG_1 | ARG_E },
+ { "extF80_to_i64_r_minMag", ARG_1 | ARG_E },
+#ifdef FLOAT16
+ { "extF80_to_f16", ARG_1 | EFF_R | EFF_T },
+#endif
+ { "extF80_to_f32", ARG_1 | EFF_R | EFF_T },
+#ifdef FLOAT64
+ { "extF80_to_f64", ARG_1 | EFF_R | EFF_T },
+#endif
+#ifdef FLOAT128
+ { "extF80_to_f128", ARG_1 },
+#endif
+ { "extF80_roundToInt", ARG_1 | ARG_R | ARG_E },
+ { "extF80_add", ARG_2 | EFF_P | EFF_R | EFF_T_REDP },
+ { "extF80_sub", ARG_2 | EFF_P | EFF_R | EFF_T_REDP },
+ { "extF80_mul", ARG_2 | EFF_P | EFF_R | EFF_T | EFF_T_REDP },
+ { "extF80_div", ARG_2 | EFF_P | EFF_R | EFF_T_REDP },
+ { "extF80_rem", ARG_2 },
+ { "extF80_sqrt", ARG_1 | EFF_P | EFF_R },
+ { "extF80_eq", ARG_2 },
+ { "extF80_le", ARG_2 },
+ { "extF80_lt", ARG_2 },
+ { "extF80_eq_signaling", ARG_2 },
+ { "extF80_le_quiet", ARG_2 },
+ { "extF80_lt_quiet", ARG_2 },
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT128
+ { "f128_to_ui32", ARG_1 | ARG_R | ARG_E },
+ { "f128_to_ui64", ARG_1 | ARG_R | ARG_E },
+ { "f128_to_i32", ARG_1 | ARG_R | ARG_E },
+ { "f128_to_i64", ARG_1 | ARG_R | ARG_E },
+ { "f128_to_ui32_r_minMag", ARG_1 | ARG_E },
+ { "f128_to_ui64_r_minMag", ARG_1 | ARG_E },
+ { "f128_to_i32_r_minMag", ARG_1 | ARG_E },
+ { "f128_to_i64_r_minMag", ARG_1 | ARG_E },
+#ifdef FLOAT16
+ { "f128_to_f16", ARG_1 | EFF_R | EFF_T },
+#endif
+ { "f128_to_f32", ARG_1 | EFF_R | EFF_T },
+#ifdef FLOAT64
+ { "f128_to_f64", ARG_1 | EFF_R | EFF_T },
+#endif
+#ifdef EXTFLOAT80
+ { "f128_to_extF80", ARG_1 | EFF_R | EFF_T },
+#endif
+ { "f128_roundToInt", ARG_1 | ARG_R | ARG_E },
+ { "f128_add", ARG_2 | EFF_R },
+ { "f128_sub", ARG_2 | EFF_R },
+ { "f128_mul", ARG_2 | EFF_R | EFF_T },
+ { "f128_mulAdd", EFF_R | EFF_T },
+ { "f128_div", ARG_2 | EFF_R },
+ { "f128_rem", ARG_2 },
+ { "f128_sqrt", ARG_1 | EFF_R },
+ { "f128_eq", ARG_2 },
+ { "f128_le", ARG_2 },
+ { "f128_lt", ARG_2 },
+ { "f128_eq_signaling", ARG_2 },
+ { "f128_le_quiet", ARG_2 },
+ { "f128_lt_quiet", ARG_2 },
+#endif
+};
+
diff --git a/src/libs/softfloat-3e/testfloat/source/functions.h b/src/libs/softfloat-3e/testfloat/source/functions.h
new file mode 100644
index 00000000..ee66bbd2
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/functions.h
@@ -0,0 +1,324 @@
+
+/*============================================================================
+
+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, 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.
+
+=============================================================================*/
+
+#include
+
+/*----------------------------------------------------------------------------
+| Warning: This list must match the contents of "functionInfos.c".
+*----------------------------------------------------------------------------*/
+enum {
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT16
+ UI32_TO_F16 = 1,
+ UI32_TO_F32,
+#else
+ UI32_TO_F32 = 1,
+#endif
+#ifdef FLOAT64
+ UI32_TO_F64,
+#endif
+#ifdef EXTFLOAT80
+ UI32_TO_EXTF80,
+#endif
+#ifdef FLOAT128
+ UI32_TO_F128,
+#endif
+#ifdef FLOAT16
+ UI64_TO_F16,
+#endif
+ UI64_TO_F32,
+#ifdef FLOAT64
+ UI64_TO_F64,
+#endif
+#ifdef EXTFLOAT80
+ UI64_TO_EXTF80,
+#endif
+#ifdef FLOAT128
+ UI64_TO_F128,
+#endif
+#ifdef FLOAT16
+ I32_TO_F16,
+#endif
+ I32_TO_F32,
+#ifdef FLOAT64
+ I32_TO_F64,
+#endif
+#ifdef EXTFLOAT80
+ I32_TO_EXTF80,
+#endif
+#ifdef FLOAT128
+ I32_TO_F128,
+#endif
+#ifdef FLOAT16
+ I64_TO_F16,
+#endif
+ I64_TO_F32,
+#ifdef FLOAT64
+ I64_TO_F64,
+#endif
+#ifdef EXTFLOAT80
+ I64_TO_EXTF80,
+#endif
+#ifdef FLOAT128
+ I64_TO_F128,
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT16
+ F16_TO_UI32,
+ F16_TO_UI64,
+ F16_TO_I32,
+ F16_TO_I64,
+ F16_TO_UI32_R_MINMAG,
+ F16_TO_UI64_R_MINMAG,
+ F16_TO_I32_R_MINMAG,
+ F16_TO_I64_R_MINMAG,
+ F16_TO_F32,
+#ifdef FLOAT64
+ F16_TO_F64,
+#endif
+#ifdef EXTFLOAT80
+ F16_TO_EXTF80,
+#endif
+#ifdef FLOAT128
+ F16_TO_F128,
+#endif
+ F16_ROUNDTOINT,
+ F16_ADD,
+ F16_SUB,
+ F16_MUL,
+ F16_MULADD,
+ F16_DIV,
+ F16_REM,
+ F16_SQRT,
+ F16_EQ,
+ F16_LE,
+ F16_LT,
+ F16_EQ_SIGNALING,
+ F16_LE_QUIET,
+ F16_LT_QUIET,
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ F32_TO_UI32,
+ F32_TO_UI64,
+ F32_TO_I32,
+ F32_TO_I64,
+ F32_TO_UI32_R_MINMAG,
+ F32_TO_UI64_R_MINMAG,
+ F32_TO_I32_R_MINMAG,
+ F32_TO_I64_R_MINMAG,
+#ifdef FLOAT16
+ F32_TO_F16,
+#endif
+#ifdef FLOAT64
+ F32_TO_F64,
+#endif
+#ifdef EXTFLOAT80
+ F32_TO_EXTF80,
+#endif
+#ifdef FLOAT128
+ F32_TO_F128,
+#endif
+ F32_ROUNDTOINT,
+ F32_ADD,
+ F32_SUB,
+ F32_MUL,
+ F32_MULADD,
+ F32_DIV,
+ F32_REM,
+ F32_SQRT,
+ F32_EQ,
+ F32_LE,
+ F32_LT,
+ F32_EQ_SIGNALING,
+ F32_LE_QUIET,
+ F32_LT_QUIET,
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT64
+ F64_TO_UI32,
+ F64_TO_UI64,
+ F64_TO_I32,
+ F64_TO_I64,
+ F64_TO_UI32_R_MINMAG,
+ F64_TO_UI64_R_MINMAG,
+ F64_TO_I32_R_MINMAG,
+ F64_TO_I64_R_MINMAG,
+#ifdef FLOAT16
+ F64_TO_F16,
+#endif
+ F64_TO_F32,
+#ifdef EXTFLOAT80
+ F64_TO_EXTF80,
+#endif
+#ifdef FLOAT128
+ F64_TO_F128,
+#endif
+ F64_ROUNDTOINT,
+ F64_ADD,
+ F64_SUB,
+ F64_MUL,
+ F64_MULADD,
+ F64_DIV,
+ F64_REM,
+ F64_SQRT,
+ F64_EQ,
+ F64_LE,
+ F64_LT,
+ F64_EQ_SIGNALING,
+ F64_LE_QUIET,
+ F64_LT_QUIET,
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef EXTFLOAT80
+ EXTF80_TO_UI32,
+ EXTF80_TO_UI64,
+ EXTF80_TO_I32,
+ EXTF80_TO_I64,
+ EXTF80_TO_UI32_R_MINMAG,
+ EXTF80_TO_UI64_R_MINMAG,
+ EXTF80_TO_I32_R_MINMAG,
+ EXTF80_TO_I64_R_MINMAG,
+#ifdef FLOAT16
+ EXTF80_TO_F16,
+#endif
+ EXTF80_TO_F32,
+#ifdef FLOAT64
+ EXTF80_TO_F64,
+#endif
+#ifdef FLOAT128
+ EXTF80_TO_F128,
+#endif
+ EXTF80_ROUNDTOINT,
+ EXTF80_ADD,
+ EXTF80_SUB,
+ EXTF80_MUL,
+ EXTF80_DIV,
+ EXTF80_REM,
+ EXTF80_SQRT,
+ EXTF80_EQ,
+ EXTF80_LE,
+ EXTF80_LT,
+ EXTF80_EQ_SIGNALING,
+ EXTF80_LE_QUIET,
+ EXTF80_LT_QUIET,
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT128
+ F128_TO_UI32,
+ F128_TO_UI64,
+ F128_TO_I32,
+ F128_TO_I64,
+ F128_TO_UI32_R_MINMAG,
+ F128_TO_UI64_R_MINMAG,
+ F128_TO_I32_R_MINMAG,
+ F128_TO_I64_R_MINMAG,
+#ifdef FLOAT16
+ F128_TO_F16,
+#endif
+ F128_TO_F32,
+#ifdef FLOAT64
+ F128_TO_F64,
+#endif
+#ifdef EXTFLOAT80
+ F128_TO_EXTF80,
+#endif
+ F128_ROUNDTOINT,
+ F128_ADD,
+ F128_SUB,
+ F128_MUL,
+ F128_MULADD,
+ F128_DIV,
+ F128_REM,
+ F128_SQRT,
+ F128_EQ,
+ F128_LE,
+ F128_LT,
+ F128_EQ_SIGNALING,
+ F128_LE_QUIET,
+ F128_LT_QUIET,
+#endif
+ NUM_FUNCTIONS
+};
+
+enum {
+ ROUND_NEAR_EVEN = 1,
+ ROUND_MINMAG,
+ ROUND_MIN,
+ ROUND_MAX,
+ ROUND_NEAR_MAXMAG,
+#ifdef FLOAT_ROUND_ODD
+ ROUND_ODD,
+#endif
+ NUM_ROUNDINGMODES
+};
+enum {
+ TININESS_BEFORE_ROUNDING = 1,
+ TININESS_AFTER_ROUNDING,
+ NUM_TININESSMODES
+};
+
+extern const uint_fast8_t roundingModes[NUM_ROUNDINGMODES];
+extern const uint_fast8_t tininessModes[NUM_TININESSMODES];
+
+enum {
+ FUNC_ARG_UNARY = 0x01,
+ FUNC_ARG_BINARY = 0x02,
+ FUNC_ARG_ROUNDINGMODE = 0x04,
+ FUNC_ARG_EXACT = 0x08,
+ FUNC_EFF_ROUNDINGPRECISION = 0x10,
+ FUNC_EFF_ROUNDINGMODE = 0x20,
+ FUNC_EFF_TININESSMODE = 0x40,
+ FUNC_EFF_TININESSMODE_REDUCEDPREC = 0x80
+};
+struct functionInfo {
+ const char *namePtr;
+ unsigned char attribs;
+};
+extern const struct functionInfo functionInfos[NUM_FUNCTIONS];
+
+struct standardFunctionInfo {
+ const char *namePtr;
+ unsigned char functionCode;
+ char roundingCode, exact;
+};
+extern const struct standardFunctionInfo standardFunctionInfos[];
+
diff --git a/src/libs/softfloat-3e/testfloat/source/functions_common.c b/src/libs/softfloat-3e/testfloat/source/functions_common.c
new file mode 100644
index 00000000..71bcde3a
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/functions_common.c
@@ -0,0 +1,60 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "functions.h"
+
+const uint_fast8_t roundingModes[NUM_ROUNDINGMODES] = {
+ 0,
+ softfloat_round_near_even,
+ softfloat_round_minMag,
+ softfloat_round_min,
+ softfloat_round_max,
+ softfloat_round_near_maxMag,
+#ifdef FLOAT_ROUND_ODD
+ softfloat_round_odd
+#endif
+};
+
+const uint_fast8_t tininessModes[NUM_TININESSMODES] = {
+ 0,
+ softfloat_tininess_beforeRounding,
+ softfloat_tininess_afterRounding
+};
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genCases.h b/src/libs/softfloat-3e/testfloat/source/genCases.h
new file mode 100644
index 00000000..e7100918
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genCases.h
@@ -0,0 +1,114 @@
+
+/*============================================================================
+
+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, 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "softfloat.h"
+
+extern int genCases_level;
+
+void genCases_setLevel( int );
+
+extern uint_fast64_t genCases_total;
+extern bool genCases_done;
+
+void genCases_ui32_a_init( void );
+void genCases_ui32_a_next( void );
+extern uint32_t genCases_ui32_a;
+
+void genCases_ui64_a_init( void );
+void genCases_ui64_a_next( void );
+extern uint64_t genCases_ui64_a;
+
+void genCases_i32_a_init( void );
+void genCases_i32_a_next( void );
+extern int32_t genCases_i32_a;
+
+void genCases_i64_a_init( void );
+void genCases_i64_a_next( void );
+extern int64_t genCases_i64_a;
+
+#ifdef FLOAT16
+void genCases_f16_a_init( void );
+void genCases_f16_a_next( void );
+void genCases_f16_ab_init( void );
+void genCases_f16_ab_next( void );
+void genCases_f16_abc_init( void );
+void genCases_f16_abc_next( void );
+extern float16_t genCases_f16_a, genCases_f16_b, genCases_f16_c;
+#endif
+
+void genCases_f32_a_init( void );
+void genCases_f32_a_next( void );
+void genCases_f32_ab_init( void );
+void genCases_f32_ab_next( void );
+void genCases_f32_abc_init( void );
+void genCases_f32_abc_next( void );
+extern float32_t genCases_f32_a, genCases_f32_b, genCases_f32_c;
+
+#ifdef FLOAT64
+void genCases_f64_a_init( void );
+void genCases_f64_a_next( void );
+void genCases_f64_ab_init( void );
+void genCases_f64_ab_next( void );
+void genCases_f64_abc_init( void );
+void genCases_f64_abc_next( void );
+extern float64_t genCases_f64_a, genCases_f64_b, genCases_f64_c;
+#endif
+
+#ifdef EXTFLOAT80
+void genCases_extF80_a_init( void );
+void genCases_extF80_a_next( void );
+void genCases_extF80_ab_init( void );
+void genCases_extF80_ab_next( void );
+void genCases_extF80_abc_init( void );
+void genCases_extF80_abc_next( void );
+extern extFloat80_t genCases_extF80_a, genCases_extF80_b, genCases_extF80_c;
+#endif
+
+#ifdef FLOAT128
+void genCases_f128_a_init( void );
+void genCases_f128_a_next( void );
+void genCases_f128_ab_init( void );
+void genCases_f128_ab_next( void );
+void genCases_f128_abc_init( void );
+void genCases_f128_abc_next( void );
+extern float128_t genCases_f128_a, genCases_f128_b, genCases_f128_c;
+#endif
+
+void genCases_writeTestsTotal( bool );
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genCases_common.c b/src/libs/softfloat-3e/testfloat/source/genCases_common.c
new file mode 100644
index 00000000..b358b498
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genCases_common.c
@@ -0,0 +1,58 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "fail.h"
+#include "genCases.h"
+
+int genCases_level = 0;
+
+void genCases_setLevel( int newLevel )
+{
+
+ if ( (newLevel < 1) || (2 < newLevel) ) {
+ fail( "Invalid testing level %d", newLevel );
+ }
+ genCases_level = newLevel;
+
+}
+
+uint_fast64_t genCases_total;
+bool genCases_done;
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genCases_extF80.c b/src/libs/softfloat-3e/testfloat/source/genCases_extF80.c
new file mode 100644
index 00000000..0e0109d1
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genCases_extF80.c
@@ -0,0 +1,920 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "random.h"
+#include "softfloat.h"
+#include "genCases.h"
+
+#ifdef EXTFLOAT80
+
+struct sequence {
+ int expNum, term1Num, term2Num;
+ bool done;
+};
+
+enum {
+ extF80NumQIn = 22,
+ extF80NumQOut = 76,
+ extF80NumP1 = 4,
+ extF80NumP2 = 248
+};
+static const uint16_t extF80QIn[extF80NumQIn] = {
+ 0x0000, /* positive, subnormal */
+ 0x0001, /* positive, -16382 */
+ 0x3FBF, /* positive, -64 */
+ 0x3FFD, /* positive, -2 */
+ 0x3FFE, /* positive, -1 */
+ 0x3FFF, /* positive, 0 */
+ 0x4000, /* positive, 1 */
+ 0x4001, /* positive, 2 */
+ 0x403F, /* positive, 64 */
+ 0x7FFE, /* positive, 16383 */
+ 0x7FFF, /* positive, infinity or NaN */
+ 0x8000, /* negative, subnormal */
+ 0x8001, /* negative, -16382 */
+ 0xBFBF, /* negative, -64 */
+ 0xBFFD, /* negative, -2 */
+ 0xBFFE, /* negative, -1 */
+ 0xBFFF, /* negative, 0 */
+ 0xC000, /* negative, 1 */
+ 0xC001, /* negative, 2 */
+ 0xC03F, /* negative, 64 */
+ 0xFFFE, /* negative, 16383 */
+ 0xFFFF /* negative, infinity or NaN */
+};
+static const uint16_t extF80QOut[extF80NumQOut] = {
+ 0x0000, /* positive, subnormal */
+ 0x0001, /* positive, -16382 */
+ 0x0002, /* positive, -16381 */
+ 0x3BFE, /* positive, -1025 */
+ 0x3BFF, /* positive, -1024 */
+ 0x3C00, /* positive, -1023 */
+ 0x3C01, /* positive, -1022 */
+ 0x3F7E, /* positive, -129 */
+ 0x3F7F, /* positive, -128 */
+ 0x3F80, /* positive, -127 */
+ 0x3F81, /* positive, -126 */
+ 0x3FBF, /* positive, -64 */
+ 0x3FFB, /* positive, -4 */
+ 0x3FFC, /* positive, -3 */
+ 0x3FFD, /* positive, -2 */
+ 0x3FFE, /* positive, -1 */
+ 0x3FFF, /* positive, 0 */
+ 0x4000, /* positive, 1 */
+ 0x4001, /* positive, 2 */
+ 0x4002, /* positive, 3 */
+ 0x4003, /* positive, 4 */
+ 0x401C, /* positive, 29 */
+ 0x401D, /* positive, 30 */
+ 0x401E, /* positive, 31 */
+ 0x401F, /* positive, 32 */
+ 0x403C, /* positive, 61 */
+ 0x403D, /* positive, 62 */
+ 0x403E, /* positive, 63 */
+ 0x403F, /* positive, 64 */
+ 0x407E, /* positive, 127 */
+ 0x407F, /* positive, 128 */
+ 0x4080, /* positive, 129 */
+ 0x43FE, /* positive, 1023 */
+ 0x43FF, /* positive, 1024 */
+ 0x4400, /* positive, 1025 */
+ 0x7FFD, /* positive, 16382 */
+ 0x7FFE, /* positive, 16383 */
+ 0x7FFF, /* positive, infinity or NaN */
+ 0x8000, /* negative, subnormal */
+ 0x8001, /* negative, -16382 */
+ 0x8002, /* negative, -16381 */
+ 0xBBFE, /* negative, -1025 */
+ 0xBBFF, /* negative, -1024 */
+ 0xBC00, /* negative, -1023 */
+ 0xBC01, /* negative, -1022 */
+ 0xBF7E, /* negative, -129 */
+ 0xBF7F, /* negative, -128 */
+ 0xBF80, /* negative, -127 */
+ 0xBF81, /* negative, -126 */
+ 0xBFBF, /* negative, -64 */
+ 0xBFFB, /* negative, -4 */
+ 0xBFFC, /* negative, -3 */
+ 0xBFFD, /* negative, -2 */
+ 0xBFFE, /* negative, -1 */
+ 0xBFFF, /* negative, 0 */
+ 0xC000, /* negative, 1 */
+ 0xC001, /* negative, 2 */
+ 0xC002, /* negative, 3 */
+ 0xC003, /* negative, 4 */
+ 0xC01C, /* negative, 29 */
+ 0xC01D, /* negative, 30 */
+ 0xC01E, /* negative, 31 */
+ 0xC01F, /* negative, 32 */
+ 0xC03C, /* negative, 61 */
+ 0xC03D, /* negative, 62 */
+ 0xC03E, /* negative, 63 */
+ 0xC03F, /* negative, 64 */
+ 0xC07E, /* negative, 127 */
+ 0xC07F, /* negative, 128 */
+ 0xC080, /* negative, 129 */
+ 0xC3FE, /* negative, 1023 */
+ 0xC3FF, /* negative, 1024 */
+ 0xC400, /* negative, 1025 */
+ 0xFFFD, /* negative, 16382 */
+ 0xFFFE, /* negative, 16383 */
+ 0xFFFF /* negative, infinity or NaN */
+};
+static const uint64_t extF80P1[extF80NumP1] = {
+ UINT64_C( 0x0000000000000000 ),
+ UINT64_C( 0x0000000000000001 ),
+ UINT64_C( 0x7FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x7FFFFFFFFFFFFFFE )
+};
+static const uint64_t extF80P2[extF80NumP2] = {
+ UINT64_C( 0x0000000000000000 ),
+ UINT64_C( 0x0000000000000001 ),
+ UINT64_C( 0x0000000000000002 ),
+ UINT64_C( 0x0000000000000004 ),
+ UINT64_C( 0x0000000000000008 ),
+ UINT64_C( 0x0000000000000010 ),
+ UINT64_C( 0x0000000000000020 ),
+ UINT64_C( 0x0000000000000040 ),
+ UINT64_C( 0x0000000000000080 ),
+ UINT64_C( 0x0000000000000100 ),
+ UINT64_C( 0x0000000000000200 ),
+ UINT64_C( 0x0000000000000400 ),
+ UINT64_C( 0x0000000000000800 ),
+ UINT64_C( 0x0000000000001000 ),
+ UINT64_C( 0x0000000000002000 ),
+ UINT64_C( 0x0000000000004000 ),
+ UINT64_C( 0x0000000000008000 ),
+ UINT64_C( 0x0000000000010000 ),
+ UINT64_C( 0x0000000000020000 ),
+ UINT64_C( 0x0000000000040000 ),
+ UINT64_C( 0x0000000000080000 ),
+ UINT64_C( 0x0000000000100000 ),
+ UINT64_C( 0x0000000000200000 ),
+ UINT64_C( 0x0000000000400000 ),
+ UINT64_C( 0x0000000000800000 ),
+ UINT64_C( 0x0000000001000000 ),
+ UINT64_C( 0x0000000002000000 ),
+ UINT64_C( 0x0000000004000000 ),
+ UINT64_C( 0x0000000008000000 ),
+ UINT64_C( 0x0000000010000000 ),
+ UINT64_C( 0x0000000020000000 ),
+ UINT64_C( 0x0000000040000000 ),
+ UINT64_C( 0x0000000080000000 ),
+ UINT64_C( 0x0000000100000000 ),
+ UINT64_C( 0x0000000200000000 ),
+ UINT64_C( 0x0000000400000000 ),
+ UINT64_C( 0x0000000800000000 ),
+ UINT64_C( 0x0000001000000000 ),
+ UINT64_C( 0x0000002000000000 ),
+ UINT64_C( 0x0000004000000000 ),
+ UINT64_C( 0x0000008000000000 ),
+ UINT64_C( 0x0000010000000000 ),
+ UINT64_C( 0x0000020000000000 ),
+ UINT64_C( 0x0000040000000000 ),
+ UINT64_C( 0x0000080000000000 ),
+ UINT64_C( 0x0000100000000000 ),
+ UINT64_C( 0x0000200000000000 ),
+ UINT64_C( 0x0000400000000000 ),
+ UINT64_C( 0x0000800000000000 ),
+ UINT64_C( 0x0001000000000000 ),
+ UINT64_C( 0x0002000000000000 ),
+ UINT64_C( 0x0004000000000000 ),
+ UINT64_C( 0x0008000000000000 ),
+ UINT64_C( 0x0010000000000000 ),
+ UINT64_C( 0x0020000000000000 ),
+ UINT64_C( 0x0040000000000000 ),
+ UINT64_C( 0x0080000000000000 ),
+ UINT64_C( 0x0100000000000000 ),
+ UINT64_C( 0x0200000000000000 ),
+ UINT64_C( 0x0400000000000000 ),
+ UINT64_C( 0x0800000000000000 ),
+ UINT64_C( 0x1000000000000000 ),
+ UINT64_C( 0x2000000000000000 ),
+ UINT64_C( 0x4000000000000000 ),
+ UINT64_C( 0x6000000000000000 ),
+ UINT64_C( 0x7000000000000000 ),
+ UINT64_C( 0x7800000000000000 ),
+ UINT64_C( 0x7C00000000000000 ),
+ UINT64_C( 0x7E00000000000000 ),
+ UINT64_C( 0x7F00000000000000 ),
+ UINT64_C( 0x7F80000000000000 ),
+ UINT64_C( 0x7FC0000000000000 ),
+ UINT64_C( 0x7FE0000000000000 ),
+ UINT64_C( 0x7FF0000000000000 ),
+ UINT64_C( 0x7FF8000000000000 ),
+ UINT64_C( 0x7FFC000000000000 ),
+ UINT64_C( 0x7FFE000000000000 ),
+ UINT64_C( 0x7FFF000000000000 ),
+ UINT64_C( 0x7FFF800000000000 ),
+ UINT64_C( 0x7FFFC00000000000 ),
+ UINT64_C( 0x7FFFE00000000000 ),
+ UINT64_C( 0x7FFFF00000000000 ),
+ UINT64_C( 0x7FFFF80000000000 ),
+ UINT64_C( 0x7FFFFC0000000000 ),
+ UINT64_C( 0x7FFFFE0000000000 ),
+ UINT64_C( 0x7FFFFF0000000000 ),
+ UINT64_C( 0x7FFFFF8000000000 ),
+ UINT64_C( 0x7FFFFFC000000000 ),
+ UINT64_C( 0x7FFFFFE000000000 ),
+ UINT64_C( 0x7FFFFFF000000000 ),
+ UINT64_C( 0x7FFFFFF800000000 ),
+ UINT64_C( 0x7FFFFFFC00000000 ),
+ UINT64_C( 0x7FFFFFFE00000000 ),
+ UINT64_C( 0x7FFFFFFF00000000 ),
+ UINT64_C( 0x7FFFFFFF80000000 ),
+ UINT64_C( 0x7FFFFFFFC0000000 ),
+ UINT64_C( 0x7FFFFFFFE0000000 ),
+ UINT64_C( 0x7FFFFFFFF0000000 ),
+ UINT64_C( 0x7FFFFFFFF8000000 ),
+ UINT64_C( 0x7FFFFFFFFC000000 ),
+ UINT64_C( 0x7FFFFFFFFE000000 ),
+ UINT64_C( 0x7FFFFFFFFF000000 ),
+ UINT64_C( 0x7FFFFFFFFF800000 ),
+ UINT64_C( 0x7FFFFFFFFFC00000 ),
+ UINT64_C( 0x7FFFFFFFFFE00000 ),
+ UINT64_C( 0x7FFFFFFFFFF00000 ),
+ UINT64_C( 0x7FFFFFFFFFF80000 ),
+ UINT64_C( 0x7FFFFFFFFFFC0000 ),
+ UINT64_C( 0x7FFFFFFFFFFE0000 ),
+ UINT64_C( 0x7FFFFFFFFFFF0000 ),
+ UINT64_C( 0x7FFFFFFFFFFF8000 ),
+ UINT64_C( 0x7FFFFFFFFFFFC000 ),
+ UINT64_C( 0x7FFFFFFFFFFFE000 ),
+ UINT64_C( 0x7FFFFFFFFFFFF000 ),
+ UINT64_C( 0x7FFFFFFFFFFFF800 ),
+ UINT64_C( 0x7FFFFFFFFFFFFC00 ),
+ UINT64_C( 0x7FFFFFFFFFFFFE00 ),
+ UINT64_C( 0x7FFFFFFFFFFFFF00 ),
+ UINT64_C( 0x7FFFFFFFFFFFFF80 ),
+ UINT64_C( 0x7FFFFFFFFFFFFFC0 ),
+ UINT64_C( 0x7FFFFFFFFFFFFFE0 ),
+ UINT64_C( 0x7FFFFFFFFFFFFFF0 ),
+ UINT64_C( 0x7FFFFFFFFFFFFFF8 ),
+ UINT64_C( 0x7FFFFFFFFFFFFFFC ),
+ UINT64_C( 0x7FFFFFFFFFFFFFFE ),
+ UINT64_C( 0x7FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x7FFFFFFFFFFFFFFD ),
+ UINT64_C( 0x7FFFFFFFFFFFFFFB ),
+ UINT64_C( 0x7FFFFFFFFFFFFFF7 ),
+ UINT64_C( 0x7FFFFFFFFFFFFFEF ),
+ UINT64_C( 0x7FFFFFFFFFFFFFDF ),
+ UINT64_C( 0x7FFFFFFFFFFFFFBF ),
+ UINT64_C( 0x7FFFFFFFFFFFFF7F ),
+ UINT64_C( 0x7FFFFFFFFFFFFEFF ),
+ UINT64_C( 0x7FFFFFFFFFFFFDFF ),
+ UINT64_C( 0x7FFFFFFFFFFFFBFF ),
+ UINT64_C( 0x7FFFFFFFFFFFF7FF ),
+ UINT64_C( 0x7FFFFFFFFFFFEFFF ),
+ UINT64_C( 0x7FFFFFFFFFFFDFFF ),
+ UINT64_C( 0x7FFFFFFFFFFFBFFF ),
+ UINT64_C( 0x7FFFFFFFFFFF7FFF ),
+ UINT64_C( 0x7FFFFFFFFFFEFFFF ),
+ UINT64_C( 0x7FFFFFFFFFFDFFFF ),
+ UINT64_C( 0x7FFFFFFFFFFBFFFF ),
+ UINT64_C( 0x7FFFFFFFFFF7FFFF ),
+ UINT64_C( 0x7FFFFFFFFFEFFFFF ),
+ UINT64_C( 0x7FFFFFFFFFDFFFFF ),
+ UINT64_C( 0x7FFFFFFFFFBFFFFF ),
+ UINT64_C( 0x7FFFFFFFFF7FFFFF ),
+ UINT64_C( 0x7FFFFFFFFEFFFFFF ),
+ UINT64_C( 0x7FFFFFFFFDFFFFFF ),
+ UINT64_C( 0x7FFFFFFFFBFFFFFF ),
+ UINT64_C( 0x7FFFFFFFF7FFFFFF ),
+ UINT64_C( 0x7FFFFFFFEFFFFFFF ),
+ UINT64_C( 0x7FFFFFFFDFFFFFFF ),
+ UINT64_C( 0x7FFFFFFFBFFFFFFF ),
+ UINT64_C( 0x7FFFFFFF7FFFFFFF ),
+ UINT64_C( 0x7FFFFFFEFFFFFFFF ),
+ UINT64_C( 0x7FFFFFFDFFFFFFFF ),
+ UINT64_C( 0x7FFFFFFBFFFFFFFF ),
+ UINT64_C( 0x7FFFFFF7FFFFFFFF ),
+ UINT64_C( 0x7FFFFFEFFFFFFFFF ),
+ UINT64_C( 0x7FFFFFDFFFFFFFFF ),
+ UINT64_C( 0x7FFFFFBFFFFFFFFF ),
+ UINT64_C( 0x7FFFFF7FFFFFFFFF ),
+ UINT64_C( 0x7FFFFEFFFFFFFFFF ),
+ UINT64_C( 0x7FFFFDFFFFFFFFFF ),
+ UINT64_C( 0x7FFFFBFFFFFFFFFF ),
+ UINT64_C( 0x7FFFF7FFFFFFFFFF ),
+ UINT64_C( 0x7FFFEFFFFFFFFFFF ),
+ UINT64_C( 0x7FFFDFFFFFFFFFFF ),
+ UINT64_C( 0x7FFFBFFFFFFFFFFF ),
+ UINT64_C( 0x7FFF7FFFFFFFFFFF ),
+ UINT64_C( 0x7FFEFFFFFFFFFFFF ),
+ UINT64_C( 0x7FFDFFFFFFFFFFFF ),
+ UINT64_C( 0x7FFBFFFFFFFFFFFF ),
+ UINT64_C( 0x7FF7FFFFFFFFFFFF ),
+ UINT64_C( 0x7FEFFFFFFFFFFFFF ),
+ UINT64_C( 0x7FDFFFFFFFFFFFFF ),
+ UINT64_C( 0x7FBFFFFFFFFFFFFF ),
+ UINT64_C( 0x7F7FFFFFFFFFFFFF ),
+ UINT64_C( 0x7EFFFFFFFFFFFFFF ),
+ UINT64_C( 0x7DFFFFFFFFFFFFFF ),
+ UINT64_C( 0x7BFFFFFFFFFFFFFF ),
+ UINT64_C( 0x77FFFFFFFFFFFFFF ),
+ UINT64_C( 0x6FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x5FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x3FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x1FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x0FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x07FFFFFFFFFFFFFF ),
+ UINT64_C( 0x03FFFFFFFFFFFFFF ),
+ UINT64_C( 0x01FFFFFFFFFFFFFF ),
+ UINT64_C( 0x00FFFFFFFFFFFFFF ),
+ UINT64_C( 0x007FFFFFFFFFFFFF ),
+ UINT64_C( 0x003FFFFFFFFFFFFF ),
+ UINT64_C( 0x001FFFFFFFFFFFFF ),
+ UINT64_C( 0x000FFFFFFFFFFFFF ),
+ UINT64_C( 0x0007FFFFFFFFFFFF ),
+ UINT64_C( 0x0003FFFFFFFFFFFF ),
+ UINT64_C( 0x0001FFFFFFFFFFFF ),
+ UINT64_C( 0x0000FFFFFFFFFFFF ),
+ UINT64_C( 0x00007FFFFFFFFFFF ),
+ UINT64_C( 0x00003FFFFFFFFFFF ),
+ UINT64_C( 0x00001FFFFFFFFFFF ),
+ UINT64_C( 0x00000FFFFFFFFFFF ),
+ UINT64_C( 0x000007FFFFFFFFFF ),
+ UINT64_C( 0x000003FFFFFFFFFF ),
+ UINT64_C( 0x000001FFFFFFFFFF ),
+ UINT64_C( 0x000000FFFFFFFFFF ),
+ UINT64_C( 0x0000007FFFFFFFFF ),
+ UINT64_C( 0x0000003FFFFFFFFF ),
+ UINT64_C( 0x0000001FFFFFFFFF ),
+ UINT64_C( 0x0000000FFFFFFFFF ),
+ UINT64_C( 0x00000007FFFFFFFF ),
+ UINT64_C( 0x00000003FFFFFFFF ),
+ UINT64_C( 0x00000001FFFFFFFF ),
+ UINT64_C( 0x00000000FFFFFFFF ),
+ UINT64_C( 0x000000007FFFFFFF ),
+ UINT64_C( 0x000000003FFFFFFF ),
+ UINT64_C( 0x000000001FFFFFFF ),
+ UINT64_C( 0x000000000FFFFFFF ),
+ UINT64_C( 0x0000000007FFFFFF ),
+ UINT64_C( 0x0000000003FFFFFF ),
+ UINT64_C( 0x0000000001FFFFFF ),
+ UINT64_C( 0x0000000000FFFFFF ),
+ UINT64_C( 0x00000000007FFFFF ),
+ UINT64_C( 0x00000000003FFFFF ),
+ UINT64_C( 0x00000000001FFFFF ),
+ UINT64_C( 0x00000000000FFFFF ),
+ UINT64_C( 0x000000000007FFFF ),
+ UINT64_C( 0x000000000003FFFF ),
+ UINT64_C( 0x000000000001FFFF ),
+ UINT64_C( 0x000000000000FFFF ),
+ UINT64_C( 0x0000000000007FFF ),
+ UINT64_C( 0x0000000000003FFF ),
+ UINT64_C( 0x0000000000001FFF ),
+ UINT64_C( 0x0000000000000FFF ),
+ UINT64_C( 0x00000000000007FF ),
+ UINT64_C( 0x00000000000003FF ),
+ UINT64_C( 0x00000000000001FF ),
+ UINT64_C( 0x00000000000000FF ),
+ UINT64_C( 0x000000000000007F ),
+ UINT64_C( 0x000000000000003F ),
+ UINT64_C( 0x000000000000001F ),
+ UINT64_C( 0x000000000000000F ),
+ UINT64_C( 0x0000000000000007 ),
+ UINT64_C( 0x0000000000000003 )
+};
+
+static const uint_fast32_t extF80NumQInP1 = extF80NumQIn * extF80NumP1;
+static const uint_fast32_t extF80NumQOutP1 = extF80NumQOut * extF80NumP1;
+
+static void extF80NextQInP1( struct sequence *sequencePtr, extFloat80_t *zPtr )
+{
+ struct extFloat80M *zSPtr;
+ int expNum, sigNum;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+
+ zSPtr = (struct extFloat80M *) zPtr;
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uiZ64 = extF80QIn[expNum];
+ uiZ0 = extF80P1[sigNum];
+ if ( uiZ64 & 0x7FFF ) uiZ0 |= UINT64_C( 0x8000000000000000 );
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = uiZ0;
+ ++sigNum;
+ if ( extF80NumP1 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( extF80NumQIn <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+
+}
+
+static
+ void extF80NextQOutP1( struct sequence *sequencePtr, extFloat80_t *zPtr )
+{
+ struct extFloat80M *zSPtr;
+ int expNum, sigNum;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+
+ zSPtr = (struct extFloat80M *) zPtr;
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uiZ64 = extF80QOut[expNum];
+ uiZ0 = extF80P1[sigNum];
+ if ( uiZ64 & 0x7FFF ) uiZ0 |= UINT64_C( 0x8000000000000000 );
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = uiZ0;
+ ++sigNum;
+ if ( extF80NumP1 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( extF80NumQOut <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+
+}
+
+static const uint_fast32_t extF80NumQInP2 = extF80NumQIn * extF80NumP2;
+static const uint_fast32_t extF80NumQOutP2 = extF80NumQOut * extF80NumP2;
+
+static void extF80NextQInP2( struct sequence *sequencePtr, extFloat80_t *zPtr )
+{
+ struct extFloat80M *zSPtr;
+ int expNum, sigNum;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+
+ zSPtr = (struct extFloat80M *) zPtr;
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uiZ64 = extF80QIn[expNum];
+ uiZ0 = extF80P2[sigNum];
+ if ( uiZ64 & 0x7FFF ) uiZ0 |= UINT64_C( 0x8000000000000000 );
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = uiZ0;
+ ++sigNum;
+ if ( extF80NumP2 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( extF80NumQIn <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+
+}
+
+static
+ void extF80NextQOutP2( struct sequence *sequencePtr, extFloat80_t *zPtr )
+{
+ struct extFloat80M *zSPtr;
+ int expNum, sigNum;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+
+ zSPtr = (struct extFloat80M *) zPtr;
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uiZ64 = extF80QOut[expNum];
+ uiZ0 = extF80P2[sigNum];
+ if ( uiZ64 & 0x7FFF ) uiZ0 |= UINT64_C( 0x8000000000000000 );
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = uiZ0;
+ ++sigNum;
+ if ( extF80NumP2 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( extF80NumQOut <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+
+}
+
+static void extF80RandomQOutP3( extFloat80_t *zPtr )
+{
+ struct extFloat80M *zSPtr;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+
+ zSPtr = (struct extFloat80M *) zPtr;
+ uiZ64 = extF80QOut[randomN_ui8( extF80NumQOut )];
+ uiZ0 =
+ (extF80P2[randomN_ui8( extF80NumP2 )]
+ + extF80P2[randomN_ui8( extF80NumP2 )])
+ & UINT64_C( 0x7FFFFFFFFFFFFFFF );
+ if ( uiZ64 & 0x7FFF ) uiZ0 |= UINT64_C( 0x8000000000000000 );
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = uiZ0;
+
+}
+
+static void extF80RandomQOutPInf( extFloat80_t *zPtr )
+{
+ struct extFloat80M *zSPtr;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+
+ zSPtr = (struct extFloat80M *) zPtr;
+ uiZ64 = extF80QOut[randomN_ui8( extF80NumQOut )];
+ uiZ0 = random_ui64() & UINT64_C( 0x7FFFFFFFFFFFFFFF );
+ if ( uiZ64 & 0x7FFF ) uiZ0 |= UINT64_C( 0x8000000000000000 );
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = uiZ0;
+
+}
+
+enum { extF80NumQInfWeightMasks = 14 };
+static const uint16_t extF80QInfWeightMasks[extF80NumQInfWeightMasks] = {
+ 0xFFFF,
+ 0xFFFF,
+ 0xBFFF,
+ 0x9FFF,
+ 0x87FF,
+ 0x87FF,
+ 0x83FF,
+ 0x81FF,
+ 0x80FF,
+ 0x807F,
+ 0x803F,
+ 0x801F,
+ 0x800F,
+ 0x8007
+};
+static const uint16_t extF80QInfWeightOffsets[extF80NumQInfWeightMasks] = {
+ 0x0000,
+ 0x0000,
+ 0x2000,
+ 0x3000,
+ 0x3800,
+ 0x3C00,
+ 0x3E00,
+ 0x3F00,
+ 0x3F80,
+ 0x3FC0,
+ 0x3FE0,
+ 0x3FF0,
+ 0x3FF8,
+ 0x3FFC
+};
+
+static void extF80RandomQInfP3( extFloat80_t *zPtr )
+{
+ struct extFloat80M *zSPtr;
+ int weightMaskNum;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+
+ zSPtr = (struct extFloat80M *) zPtr;
+ weightMaskNum = randomN_ui8( extF80NumQInfWeightMasks );
+ uiZ64 =
+ (random_ui16() & extF80QInfWeightMasks[weightMaskNum])
+ + extF80QInfWeightOffsets[weightMaskNum];
+ uiZ0 =
+ (extF80P2[randomN_ui8( extF80NumP2 )]
+ + extF80P2[randomN_ui8( extF80NumP2 )])
+ & UINT64_C( 0x7FFFFFFFFFFFFFFF );
+ if ( uiZ64 & 0x7FFF ) uiZ0 |= UINT64_C( 0x8000000000000000 );
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = uiZ0;
+
+}
+
+static void extF80RandomQInfPInf( extFloat80_t *zPtr )
+{
+ struct extFloat80M *zSPtr;
+ int weightMaskNum;
+ uint_fast16_t uiZ64;
+ uint_fast64_t uiZ0;
+
+ zSPtr = (struct extFloat80M *) zPtr;
+ weightMaskNum = randomN_ui8( extF80NumQInfWeightMasks );
+ uiZ64 =
+ (random_ui16() & extF80QInfWeightMasks[weightMaskNum])
+ + extF80QInfWeightOffsets[weightMaskNum];
+ uiZ0 = random_ui64() & UINT64_C( 0x7FFFFFFFFFFFFFFF );
+ if ( uiZ64 & 0x7FFF ) uiZ0 |= UINT64_C( 0x8000000000000000 );
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = uiZ0;
+
+}
+
+static void extF80Random( extFloat80_t *zPtr )
+{
+
+ switch ( random_ui8() & 7 ) {
+ case 0:
+ case 1:
+ case 2:
+ extF80RandomQOutP3( zPtr );
+ break;
+ case 3:
+ extF80RandomQOutPInf( zPtr );
+ break;
+ case 4:
+ case 5:
+ case 6:
+ extF80RandomQInfP3( zPtr );
+ break;
+ case 7:
+ extF80RandomQInfPInf( zPtr );
+ break;
+ }
+
+}
+
+static struct sequence sequenceA, sequenceB, sequenceC;
+static extFloat80_t currentA, currentB, currentC;
+static int subcase;
+
+extFloat80_t genCases_extF80_a, genCases_extF80_b, genCases_extF80_c;
+
+void genCases_extF80_a_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ subcase = 0;
+ genCases_total =
+ (genCases_level == 1) ? 3 * extF80NumQOutP1 : 2 * extF80NumQOutP2;
+ genCases_done = false;
+
+}
+
+void genCases_extF80_a_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ case 1:
+ extF80Random( &genCases_extF80_a );
+ break;
+ case 2:
+ extF80NextQOutP1( &sequenceA, &genCases_extF80_a );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ extF80Random( &genCases_extF80_a );
+ break;
+ case 1:
+ extF80NextQOutP2( &sequenceA, &genCases_extF80_a );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+void genCases_extF80_ab_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ sequenceB.expNum = 0;
+ sequenceB.term1Num = 0;
+ sequenceB.term2Num = 0;
+ sequenceB.done = false;
+ subcase = 0;
+ if ( genCases_level == 1 ) {
+ genCases_total = 6 * extF80NumQInP1 * extF80NumQInP1;
+ extF80NextQInP1( &sequenceA, ¤tA );
+ } else {
+ genCases_total = 2 * extF80NumQInP2 * extF80NumQInP2;
+ extF80NextQInP2( &sequenceA, ¤tA );
+ }
+ genCases_done = false;
+
+}
+
+void genCases_extF80_ab_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ extF80NextQInP1( &sequenceA, ¤tA );
+ }
+ extF80NextQInP1( &sequenceB, ¤tB );
+ case 2:
+ case 4:
+ extF80Random( &genCases_extF80_a );
+ extF80Random( &genCases_extF80_b );
+ break;
+ case 1:
+ genCases_extF80_a = currentA;
+ extF80Random( &genCases_extF80_b );
+ break;
+ case 3:
+ extF80Random( &genCases_extF80_a );
+ genCases_extF80_b = currentB;
+ break;
+ case 5:
+ genCases_extF80_a = currentA;
+ genCases_extF80_b = currentB;
+ genCases_done = sequenceA.done & sequenceB.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ extF80Random( &genCases_extF80_a );
+ extF80Random( &genCases_extF80_b );
+ break;
+ case 1:
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ extF80NextQInP2( &sequenceA, ¤tA );
+ }
+ genCases_extF80_a = currentA;
+ extF80NextQInP2( &sequenceB, &genCases_extF80_b );
+ genCases_done = sequenceA.done & sequenceB.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+void genCases_extF80_abc_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ sequenceB.expNum = 0;
+ sequenceB.term1Num = 0;
+ sequenceB.term2Num = 0;
+ sequenceB.done = false;
+ sequenceC.expNum = 0;
+ sequenceC.term1Num = 0;
+ sequenceC.term2Num = 0;
+ sequenceC.done = false;
+ subcase = 0;
+ if ( genCases_level == 1 ) {
+ genCases_total = 9 * extF80NumQInP1 * extF80NumQInP1 * extF80NumQInP1;
+ extF80NextQInP1( &sequenceA, ¤tA );
+ extF80NextQInP1( &sequenceB, ¤tB );
+ } else {
+ genCases_total = 2 * extF80NumQInP2 * extF80NumQInP2 * extF80NumQInP2;
+ extF80NextQInP2( &sequenceA, ¤tA );
+ extF80NextQInP2( &sequenceB, ¤tB );
+ }
+ genCases_done = false;
+
+}
+
+void genCases_extF80_abc_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ if ( sequenceC.done ) {
+ sequenceC.done = false;
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ extF80NextQInP1( &sequenceA, ¤tA );
+ }
+ extF80NextQInP1( &sequenceB, ¤tB );
+ }
+ extF80NextQInP1( &sequenceC, ¤tC );
+ extF80Random( &genCases_extF80_a );
+ extF80Random( &genCases_extF80_b );
+ genCases_extF80_c = currentC;
+ break;
+ case 1:
+ genCases_extF80_a = currentA;
+ genCases_extF80_b = currentB;
+ extF80Random( &genCases_extF80_c );
+ break;
+ case 2:
+ extF80Random( &genCases_extF80_a );
+ extF80Random( &genCases_extF80_b );
+ extF80Random( &genCases_extF80_c );
+ break;
+ case 3:
+ extF80Random( &genCases_extF80_a );
+ genCases_extF80_b = currentB;
+ genCases_extF80_c = currentC;
+ break;
+ case 4:
+ genCases_extF80_a = currentA;
+ extF80Random( &genCases_extF80_b );
+ extF80Random( &genCases_extF80_c );
+ break;
+ case 5:
+ extF80Random( &genCases_extF80_a );
+ genCases_extF80_b = currentB;
+ extF80Random( &genCases_extF80_c );
+ break;
+ case 6:
+ genCases_extF80_a = currentA;
+ extF80Random( &genCases_extF80_b );
+ genCases_extF80_c = currentC;
+ break;
+ case 7:
+ extF80Random( &genCases_extF80_a );
+ extF80Random( &genCases_extF80_b );
+ extF80Random( &genCases_extF80_c );
+ break;
+ case 8:
+ genCases_extF80_a = currentA;
+ genCases_extF80_b = currentB;
+ genCases_extF80_c = currentC;
+ genCases_done = sequenceA.done & sequenceB.done & sequenceC.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ extF80Random( &genCases_extF80_a );
+ extF80Random( &genCases_extF80_b );
+ extF80Random( &genCases_extF80_c );
+ break;
+ case 1:
+ if ( sequenceC.done ) {
+ sequenceC.done = false;
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ extF80NextQInP2( &sequenceA, ¤tA );
+ }
+ extF80NextQInP2( &sequenceB, ¤tB );
+ }
+ genCases_extF80_a = currentA;
+ genCases_extF80_b = currentB;
+ extF80NextQInP2( &sequenceC, &genCases_extF80_c );
+ genCases_done = sequenceA.done & sequenceB.done & sequenceC.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genCases_f128.c b/src/libs/softfloat-3e/testfloat/source/genCases_f128.c
new file mode 100644
index 00000000..839da228
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genCases_f128.c
@@ -0,0 +1,1090 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "uint128.h"
+#include "random.h"
+#include "softfloat.h"
+#include "genCases.h"
+
+#ifdef FLOAT128
+
+struct sequence {
+ int expNum, term1Num, term2Num;
+ bool done;
+};
+
+enum {
+ f128NumQIn = 22,
+ f128NumQOut = 78,
+ f128NumP1 = 4,
+ f128NumP2 = 443
+};
+static const uint64_t f128QIn[f128NumQIn] = {
+ UINT64_C( 0x0000000000000000 ), /* positive, subnormal */
+ UINT64_C( 0x0001000000000000 ), /* positive, -16382 */
+ UINT64_C( 0x3F8E000000000000 ), /* positive, -113 */
+ UINT64_C( 0x3FFD000000000000 ), /* positive, -2 */
+ UINT64_C( 0x3FFE000000000000 ), /* positive, -1 */
+ UINT64_C( 0x3FFF000000000000 ), /* positive, 0 */
+ UINT64_C( 0x4000000000000000 ), /* positive, 1 */
+ UINT64_C( 0x4001000000000000 ), /* positive, 2 */
+ UINT64_C( 0x4070000000000000 ), /* positive, 113 */
+ UINT64_C( 0x7FFE000000000000 ), /* positive, 16383 */
+ UINT64_C( 0x7FFF000000000000 ), /* positive, infinity or NaN */
+ UINT64_C( 0x8000000000000000 ), /* negative, subnormal */
+ UINT64_C( 0x8001000000000000 ), /* negative, -16382 */
+ UINT64_C( 0xBF8E000000000000 ), /* negative, -113 */
+ UINT64_C( 0xBFFD000000000000 ), /* negative, -2 */
+ UINT64_C( 0xBFFE000000000000 ), /* negative, -1 */
+ UINT64_C( 0xBFFF000000000000 ), /* negative, 0 */
+ UINT64_C( 0xC000000000000000 ), /* negative, 1 */
+ UINT64_C( 0xC001000000000000 ), /* negative, 2 */
+ UINT64_C( 0xC070000000000000 ), /* negative, 113 */
+ UINT64_C( 0xFFFE000000000000 ), /* negative, 16383 */
+ UINT64_C( 0xFFFF000000000000 ) /* negative, infinity or NaN */
+};
+static const uint64_t f128QOut[f128NumQOut] = {
+ UINT64_C( 0x0000000000000000 ), /* positive, subnormal */
+ UINT64_C( 0x0001000000000000 ), /* positive, -16382 */
+ UINT64_C( 0x0002000000000000 ), /* positive, -16381 */
+ UINT64_C( 0x3BFE000000000000 ), /* positive, -1025 */
+ UINT64_C( 0x3BFF000000000000 ), /* positive, -1024 */
+ UINT64_C( 0x3C00000000000000 ), /* positive, -1023 */
+ UINT64_C( 0x3C01000000000000 ), /* positive, -1022 */
+ UINT64_C( 0x3F7E000000000000 ), /* positive, -129 */
+ UINT64_C( 0x3F7F000000000000 ), /* positive, -128 */
+ UINT64_C( 0x3F80000000000000 ), /* positive, -127 */
+ UINT64_C( 0x3F81000000000000 ), /* positive, -126 */
+ UINT64_C( 0x3F8E000000000000 ), /* positive, -113 */
+ UINT64_C( 0x3FFB000000000000 ), /* positive, -4 */
+ UINT64_C( 0x3FFC000000000000 ), /* positive, -3 */
+ UINT64_C( 0x3FFD000000000000 ), /* positive, -2 */
+ UINT64_C( 0x3FFE000000000000 ), /* positive, -1 */
+ UINT64_C( 0x3FFF000000000000 ), /* positive, 0 */
+ UINT64_C( 0x4000000000000000 ), /* positive, 1 */
+ UINT64_C( 0x4001000000000000 ), /* positive, 2 */
+ UINT64_C( 0x4002000000000000 ), /* positive, 3 */
+ UINT64_C( 0x4003000000000000 ), /* positive, 4 */
+ UINT64_C( 0x401C000000000000 ), /* positive, 29 */
+ UINT64_C( 0x401D000000000000 ), /* positive, 30 */
+ UINT64_C( 0x401E000000000000 ), /* positive, 31 */
+ UINT64_C( 0x401F000000000000 ), /* positive, 32 */
+ UINT64_C( 0x403C000000000000 ), /* positive, 61 */
+ UINT64_C( 0x403D000000000000 ), /* positive, 62 */
+ UINT64_C( 0x403E000000000000 ), /* positive, 63 */
+ UINT64_C( 0x403F000000000000 ), /* positive, 64 */
+ UINT64_C( 0x4070000000000000 ), /* positive, 113 */
+ UINT64_C( 0x407E000000000000 ), /* positive, 127 */
+ UINT64_C( 0x407F000000000000 ), /* positive, 128 */
+ UINT64_C( 0x4080000000000000 ), /* positive, 129 */
+ UINT64_C( 0x43FE000000000000 ), /* positive, 1023 */
+ UINT64_C( 0x43FF000000000000 ), /* positive, 1024 */
+ UINT64_C( 0x4400000000000000 ), /* positive, 1025 */
+ UINT64_C( 0x7FFD000000000000 ), /* positive, 16382 */
+ UINT64_C( 0x7FFE000000000000 ), /* positive, 16383 */
+ UINT64_C( 0x7FFF000000000000 ), /* positive, infinity or NaN */
+ UINT64_C( 0x8000000000000000 ), /* negative, subnormal */
+ UINT64_C( 0x8001000000000000 ), /* negative, -16382 */
+ UINT64_C( 0x8002000000000000 ), /* negative, -16381 */
+ UINT64_C( 0xBBFE000000000000 ), /* negative, -1025 */
+ UINT64_C( 0xBBFF000000000000 ), /* negative, -1024 */
+ UINT64_C( 0xBC00000000000000 ), /* negative, -1023 */
+ UINT64_C( 0xBC01000000000000 ), /* negative, -1022 */
+ UINT64_C( 0xBF7E000000000000 ), /* negative, -129 */
+ UINT64_C( 0xBF7F000000000000 ), /* negative, -128 */
+ UINT64_C( 0xBF80000000000000 ), /* negative, -127 */
+ UINT64_C( 0xBF81000000000000 ), /* negative, -126 */
+ UINT64_C( 0xBF8E000000000000 ), /* negative, -113 */
+ UINT64_C( 0xBFFB000000000000 ), /* negative, -4 */
+ UINT64_C( 0xBFFC000000000000 ), /* negative, -3 */
+ UINT64_C( 0xBFFD000000000000 ), /* negative, -2 */
+ UINT64_C( 0xBFFE000000000000 ), /* negative, -1 */
+ UINT64_C( 0xBFFF000000000000 ), /* negative, 0 */
+ UINT64_C( 0xC000000000000000 ), /* negative, 1 */
+ UINT64_C( 0xC001000000000000 ), /* negative, 2 */
+ UINT64_C( 0xC002000000000000 ), /* negative, 3 */
+ UINT64_C( 0xC003000000000000 ), /* negative, 4 */
+ UINT64_C( 0xC01C000000000000 ), /* negative, 29 */
+ UINT64_C( 0xC01D000000000000 ), /* negative, 30 */
+ UINT64_C( 0xC01E000000000000 ), /* negative, 31 */
+ UINT64_C( 0xC01F000000000000 ), /* negative, 32 */
+ UINT64_C( 0xC03C000000000000 ), /* negative, 61 */
+ UINT64_C( 0xC03D000000000000 ), /* negative, 62 */
+ UINT64_C( 0xC03E000000000000 ), /* negative, 63 */
+ UINT64_C( 0xC03F000000000000 ), /* negative, 64 */
+ UINT64_C( 0xC070000000000000 ), /* negative, 113 */
+ UINT64_C( 0xC07E000000000000 ), /* negative, 127 */
+ UINT64_C( 0xC07F000000000000 ), /* negative, 128 */
+ UINT64_C( 0xC080000000000000 ), /* negative, 129 */
+ UINT64_C( 0xC3FE000000000000 ), /* negative, 1023 */
+ UINT64_C( 0xC3FF000000000000 ), /* negative, 1024 */
+ UINT64_C( 0xC400000000000000 ), /* negative, 1025 */
+ UINT64_C( 0xFFFD000000000000 ), /* negative, 16382 */
+ UINT64_C( 0xFFFE000000000000 ), /* negative, 16383 */
+ UINT64_C( 0xFFFF000000000000 ) /* negative, infinity or NaN */
+};
+static const struct { uint64_t v64, v0; } f128P1[f128NumP1] = {
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000001 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFE ) }
+};
+static const struct { uint64_t v64, v0; } f128P2[f128NumP2] = {
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000001 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000002 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000004 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000008 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000010 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000020 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000040 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000080 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000100 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000200 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000400 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000800 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000001000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000002000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000004000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000008000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000010000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000020000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000040000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000080000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000100000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000200000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000400000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000800000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000001000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000002000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000004000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000008000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000010000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000020000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000040000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000080000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000100000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000200000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000400000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000800000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000001000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000002000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000004000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000008000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000010000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000020000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000040000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000080000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000100000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000200000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000400000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000800000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0001000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0002000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0004000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0008000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0010000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0020000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0040000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0080000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0100000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0200000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0400000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0800000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x1000000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x2000000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x4000000000000000 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x8000000000000000 ) },
+ { UINT64_C( 0x0000000000000001 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000002 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000004 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000008 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000010 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000020 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000040 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000080 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000100 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000200 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000400 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000000800 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000001000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000002000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000004000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000008000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000010000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000020000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000040000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000080000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000100000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000200000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000400000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000000800000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000001000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000002000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000004000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000008000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000010000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000020000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000040000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000080000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000100000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000200000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000400000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000000800000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000001000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000002000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000004000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000008000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000010000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000020000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000040000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000080000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000100000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000200000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000400000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000800000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000C00000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000E00000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000F00000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000F80000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FC0000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FE0000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FF0000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FF8000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFC000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFE000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFF000000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFF800000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFC00000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFE00000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFF00000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFF80000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFC0000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFE0000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFF0000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFF8000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFC000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFE000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFF000000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFF800000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFC00000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFE00000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFF00000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFF80000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFC0000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFE0000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFF0000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFF8000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFC000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFE000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFF000 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFF800 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFC00 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFE00 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFF00 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFF80 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFC0 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFE0 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFF0 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFF8 ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFC ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFE ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0x0000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0x8000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xC000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xE000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xF000000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xF800000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFC00000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFE00000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFF00000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFF80000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFC0000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFE0000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFF0000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFF8000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFC000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFE000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFF000000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFF800000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFC00000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFE00000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFF00000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFF80000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFC0000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFE0000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFF0000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFF8000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFC000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFE000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFF000000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFF800000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFC00000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFE00000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFF00000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFF80000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFC0000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFE0000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFF0000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFF8000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFC000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFE000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFF000000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFF800000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFC00000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFE00000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFF00000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFF80000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFC0000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFE0000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFF0000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFF8000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFC000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFE000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFF000 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFF800 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFC00 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFE00 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFF00 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFF80 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFC0 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFE0 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFF0 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFF8 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFC ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFE ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFD ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFB ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFF7 ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFEF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFDF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFBF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFF7F ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFEFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFDFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFBFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFF7FF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFEFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFDFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFBFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFF7FFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFEFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFDFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFBFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFF7FFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFEFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFDFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFBFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFF7FFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFEFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFDFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFBFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFF7FFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFEFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFDFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFBFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFF7FFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFEFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFDFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFBFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFF7FFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFEFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFDFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFFBFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFF7FFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFEFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFDFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFFBFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFF7FFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFEFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFDFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFFBFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFF7FFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFEFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFDFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFFBFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFF7FFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFEFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFDFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFFBFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFF7FFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFEFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFDFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xFBFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xF7FFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xEFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xDFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0xBFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFF ), UINT64_C( 0x7FFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFD ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFFB ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFF7 ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFEF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFDF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFFBF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFF7F ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFEFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFDFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFFBFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFF7FF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFEFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFDFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFFBFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFF7FFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFEFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFDFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFFBFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFF7FFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFEFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFDFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFFBFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFF7FFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFEFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFDFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFFBFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFF7FFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFEFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFDFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFFBFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFF7FFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFEFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFDFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFFBFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFF7FFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFEFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFDFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FFBFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FF7FFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FEFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FDFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000FBFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000F7FFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000EFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000DFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000BFFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00007FFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00003FFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00001FFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000FFFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000007FFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000003FFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000001FFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000FFFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000007FFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000003FFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000001FFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000FFFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000007FFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000003FFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000001FFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000000FFFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000007FFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000003FFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000001FFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000000FFFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000007FFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000003FFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000001FFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000FFFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000000007FFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000000003FFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000000001FFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000000000FFFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000000007FFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000000003FFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000000001FFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000000000FFFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000007FFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000003FFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000001FFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000FFF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000000000007FF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000000000003FF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000000000001FF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x00000000000000FF ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000000000007F ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000000000003F ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000000000001F ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x000000000000000F ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000007 ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000003 ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000001 ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0xFFFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x7FFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x3FFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x1FFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0FFFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x07FFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x03FFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x01FFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00FFFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x007FFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x003FFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x001FFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000FFFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0007FFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0003FFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0001FFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000FFFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00007FFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00003FFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00001FFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000FFFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000007FFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000003FFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000001FFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000FFFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000007FFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000003FFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000001FFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000FFFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000007FFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000003FFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000001FFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000000FFFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000007FFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000003FFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000001FFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000000FFFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000007FFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000003FFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000001FFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000FFFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000000007FFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000000003FFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000000001FFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000000000FFFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000000007FFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000000003FFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000000001FFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000000000FFFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000007FFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000003FFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000001FFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000FFF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000000000007FF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000000000003FF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000000000001FF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x00000000000000FF ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000000000007F ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000000000003F ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000000000001F ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x000000000000000F ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000007 ) },
+ { UINT64_C( 0x0000000000000000 ), UINT64_C( 0x0000000000000003 ) }
+};
+
+static const uint_fast64_t f128NumQInP1 = f128NumQIn * f128NumP1;
+static const uint_fast64_t f128NumQOutP1 = f128NumQOut * f128NumP1;
+
+static void f128NextQInP1( struct sequence *sequencePtr, float128_t *zPtr )
+{
+ struct uint128 *uiZPtr;
+ int expNum, sigNum;
+
+ uiZPtr = (struct uint128 *) zPtr;
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uiZPtr->v64 = f128QIn[expNum] | f128P1[sigNum].v64;
+ uiZPtr->v0 = f128P1[sigNum].v0;
+ ++sigNum;
+ if ( f128NumP1 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f128NumQIn <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+
+}
+
+static void f128NextQOutP1( struct sequence *sequencePtr, float128_t *zPtr )
+{
+ struct uint128 *uiZPtr;
+ int expNum, sigNum;
+
+ uiZPtr = (struct uint128 *) zPtr;
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uiZPtr->v64 = f128QOut[expNum] | f128P1[sigNum].v64;
+ uiZPtr->v0 = f128P1[sigNum].v0;
+ ++sigNum;
+ if ( f128NumP1 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f128NumQOut <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+
+}
+
+static const uint_fast64_t f128NumQInP2 = f128NumQIn * f128NumP2;
+static const uint_fast64_t f128NumQOutP2 = f128NumQOut * f128NumP2;
+
+static void f128NextQInP2( struct sequence *sequencePtr, float128_t *zPtr )
+{
+ struct uint128 *uiZPtr;
+ int expNum, sigNum;
+
+ uiZPtr = (struct uint128 *) zPtr;
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uiZPtr->v64 = f128QIn[expNum] | f128P2[sigNum].v64;
+ uiZPtr->v0 = f128P2[sigNum].v0;
+ ++sigNum;
+ if ( f128NumP2 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f128NumQIn <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+
+}
+
+static void f128NextQOutP2( struct sequence *sequencePtr, float128_t *zPtr )
+{
+ struct uint128 *uiZPtr;
+ int expNum, sigNum;
+
+ uiZPtr = (struct uint128 *) zPtr;
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uiZPtr->v64 = f128QOut[expNum] | f128P2[sigNum].v64;
+ uiZPtr->v0 = f128P2[sigNum].v0;
+ ++sigNum;
+ if ( f128NumP2 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f128NumQOut <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+
+}
+
+static void f128RandomQOutP3( float128_t *zPtr )
+{
+ struct uint128 *uiZPtr;
+ int sigNum1, sigNum2;
+ uint_fast64_t sig1_0;
+
+ uiZPtr = (struct uint128 *) zPtr;
+ sigNum1 = randomN_ui16( f128NumP2 );
+ sigNum2 = randomN_ui16( f128NumP2 );
+ sig1_0 = f128P2[sigNum1].v0;
+ uiZPtr->v0 = sig1_0 + f128P2[sigNum2].v0;
+ uiZPtr->v64 =
+ f128QOut[randomN_ui8( f128NumQOut )]
+ | ((f128P2[sigNum1].v64 + f128P2[sigNum2].v64 + (uiZPtr->v0 < sig1_0))
+ & UINT64_C( 0x0000FFFFFFFFFFFF ));
+
+}
+
+static void f128RandomQOutPInf( float128_t *zPtr )
+{
+ struct uint128 *uiZPtr;
+
+ uiZPtr = (struct uint128 *) zPtr;
+ uiZPtr->v64 =
+ f128QOut[randomN_ui8( f128NumQOut )]
+ | (random_ui64() & UINT64_C( 0x0000FFFFFFFFFFFF ));
+ uiZPtr->v0 = random_ui64();
+
+}
+
+enum { f128NumQInfWeightMasks = 14 };
+static const uint64_t f128QInfWeightMasks[f128NumQInfWeightMasks] = {
+ UINT64_C( 0xFFFF000000000000 ),
+ UINT64_C( 0xFFFF000000000000 ),
+ UINT64_C( 0xBFFF000000000000 ),
+ UINT64_C( 0x9FFF000000000000 ),
+ UINT64_C( 0x87FF000000000000 ),
+ UINT64_C( 0x87FF000000000000 ),
+ UINT64_C( 0x83FF000000000000 ),
+ UINT64_C( 0x81FF000000000000 ),
+ UINT64_C( 0x80FF000000000000 ),
+ UINT64_C( 0x807F000000000000 ),
+ UINT64_C( 0x803F000000000000 ),
+ UINT64_C( 0x801F000000000000 ),
+ UINT64_C( 0x800F000000000000 ),
+ UINT64_C( 0x8007000000000000 )
+};
+static const uint64_t f128QInfWeightOffsets[f128NumQInfWeightMasks] = {
+ UINT64_C( 0x0000000000000000 ),
+ UINT64_C( 0x0000000000000000 ),
+ UINT64_C( 0x2000000000000000 ),
+ UINT64_C( 0x3000000000000000 ),
+ UINT64_C( 0x3800000000000000 ),
+ UINT64_C( 0x3C00000000000000 ),
+ UINT64_C( 0x3E00000000000000 ),
+ UINT64_C( 0x3F00000000000000 ),
+ UINT64_C( 0x3F80000000000000 ),
+ UINT64_C( 0x3FC0000000000000 ),
+ UINT64_C( 0x3FE0000000000000 ),
+ UINT64_C( 0x3FF0000000000000 ),
+ UINT64_C( 0x3FF8000000000000 ),
+ UINT64_C( 0x3FFC000000000000 )
+};
+
+static void f128RandomQInfP3( float128_t *zPtr )
+{
+ struct uint128 *uiZPtr;
+ int sigNum1, sigNum2;
+ uint_fast64_t sig1_0;
+ int weightMaskNum;
+
+ uiZPtr = (struct uint128 *) zPtr;
+ sigNum1 = randomN_ui16( f128NumP2 );
+ sigNum2 = randomN_ui16( f128NumP2 );
+ sig1_0 = f128P2[sigNum1].v0;
+ uiZPtr->v0 = sig1_0 + f128P2[sigNum2].v0;
+ weightMaskNum = randomN_ui8( f128NumQInfWeightMasks );
+ uiZPtr->v64 =
+ (((uint_fast64_t) random_ui16()<<48
+ & f128QInfWeightMasks[weightMaskNum])
+ + f128QInfWeightOffsets[weightMaskNum])
+ | ((f128P2[sigNum1].v64 + f128P2[sigNum2].v64 + (uiZPtr->v0 < sig1_0))
+ & UINT64_C( 0x0000FFFFFFFFFFFF ));
+
+}
+
+static void f128RandomQInfPInf( float128_t *zPtr )
+{
+ struct uint128 *uiZPtr;
+ int weightMaskNum;
+
+ uiZPtr = (struct uint128 *) zPtr;
+ weightMaskNum = randomN_ui8( f128NumQInfWeightMasks );
+ uiZPtr->v64 =
+ (random_ui64()
+ & (f128QInfWeightMasks[weightMaskNum]
+ | UINT64_C( 0x0000FFFFFFFFFFFF )))
+ + f128QInfWeightOffsets[weightMaskNum];
+ uiZPtr->v0 = random_ui64();
+
+}
+
+static void f128Random( float128_t *zPtr )
+{
+
+ switch ( random_ui8() & 7 ) {
+ case 0:
+ case 1:
+ case 2:
+ f128RandomQOutP3( zPtr );
+ break;
+ case 3:
+ f128RandomQOutPInf( zPtr );
+ break;
+ case 4:
+ case 5:
+ case 6:
+ f128RandomQInfP3( zPtr );
+ break;
+ case 7:
+ f128RandomQInfPInf( zPtr );
+ break;
+ }
+
+}
+
+static struct sequence sequenceA, sequenceB, sequenceC;
+static float128_t currentA, currentB, currentC;
+static int subcase;
+
+float128_t genCases_f128_a, genCases_f128_b, genCases_f128_c;
+
+void genCases_f128_a_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ subcase = 0;
+ genCases_total =
+ (genCases_level == 1) ? 3 * f128NumQOutP1 : 2 * f128NumQOutP2;
+ genCases_done = false;
+
+}
+
+void genCases_f128_a_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ case 1:
+ f128Random( &genCases_f128_a );
+ break;
+ case 2:
+ f128NextQOutP1( &sequenceA, &genCases_f128_a );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ f128Random( &genCases_f128_a );
+ break;
+ case 1:
+ f128NextQOutP2( &sequenceA, &genCases_f128_a );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+void genCases_f128_ab_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ sequenceB.expNum = 0;
+ sequenceB.term1Num = 0;
+ sequenceB.term2Num = 0;
+ sequenceB.done = false;
+ subcase = 0;
+ if ( genCases_level == 1 ) {
+ genCases_total = 6 * f128NumQInP1 * f128NumQInP1;
+ f128NextQInP1( &sequenceA, ¤tA );
+ } else {
+ genCases_total = 2 * f128NumQInP2 * f128NumQInP2;
+ f128NextQInP2( &sequenceA, ¤tA );
+ }
+ genCases_done = false;
+
+}
+
+void genCases_f128_ab_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ f128NextQInP1( &sequenceA, ¤tA );
+ }
+ f128NextQInP1( &sequenceB, ¤tB );
+ case 2:
+ case 4:
+ f128Random( &genCases_f128_a );
+ f128Random( &genCases_f128_b );
+ break;
+ case 1:
+ genCases_f128_a = currentA;
+ f128Random( &genCases_f128_b );
+ break;
+ case 3:
+ f128Random( &genCases_f128_a );
+ genCases_f128_b = currentB;
+ break;
+ case 5:
+ genCases_f128_a = currentA;
+ genCases_f128_b = currentB;
+ genCases_done = sequenceA.done & sequenceB.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ f128Random( &genCases_f128_a );
+ f128Random( &genCases_f128_b );
+ break;
+ case 1:
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ f128NextQInP2( &sequenceA, ¤tA );
+ }
+ genCases_f128_a = currentA;
+ f128NextQInP2( &sequenceB, &genCases_f128_b );
+ genCases_done = sequenceA.done & sequenceB.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+void genCases_f128_abc_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ sequenceB.expNum = 0;
+ sequenceB.term1Num = 0;
+ sequenceB.term2Num = 0;
+ sequenceB.done = false;
+ sequenceC.expNum = 0;
+ sequenceC.term1Num = 0;
+ sequenceC.term2Num = 0;
+ sequenceC.done = false;
+ subcase = 0;
+ if ( genCases_level == 1 ) {
+ genCases_total = 9 * f128NumQInP1 * f128NumQInP1 * f128NumQInP1;
+ f128NextQInP1( &sequenceA, ¤tA );
+ f128NextQInP1( &sequenceB, ¤tB );
+ } else {
+ genCases_total = 2 * f128NumQInP2 * f128NumQInP2 * f128NumQInP2;
+ f128NextQInP2( &sequenceA, ¤tA );
+ f128NextQInP2( &sequenceB, ¤tB );
+ }
+ genCases_done = false;
+
+}
+
+void genCases_f128_abc_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ if ( sequenceC.done ) {
+ sequenceC.done = false;
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ f128NextQInP1( &sequenceA, ¤tA );
+ }
+ f128NextQInP1( &sequenceB, ¤tB );
+ }
+ f128NextQInP1( &sequenceC, ¤tC );
+ f128Random( &genCases_f128_a );
+ f128Random( &genCases_f128_b );
+ genCases_f128_c = currentC;
+ break;
+ case 1:
+ genCases_f128_a = currentA;
+ genCases_f128_b = currentB;
+ f128Random( &genCases_f128_c );
+ break;
+ case 2:
+ f128Random( &genCases_f128_a );
+ f128Random( &genCases_f128_b );
+ f128Random( &genCases_f128_c );
+ break;
+ case 3:
+ f128Random( &genCases_f128_a );
+ genCases_f128_b = currentB;
+ genCases_f128_c = currentC;
+ break;
+ case 4:
+ genCases_f128_a = currentA;
+ f128Random( &genCases_f128_b );
+ f128Random( &genCases_f128_c );
+ break;
+ case 5:
+ f128Random( &genCases_f128_a );
+ genCases_f128_b = currentB;
+ f128Random( &genCases_f128_c );
+ break;
+ case 6:
+ genCases_f128_a = currentA;
+ f128Random( &genCases_f128_b );
+ genCases_f128_c = currentC;
+ break;
+ case 7:
+ f128Random( &genCases_f128_a );
+ f128Random( &genCases_f128_b );
+ f128Random( &genCases_f128_c );
+ break;
+ case 8:
+ genCases_f128_a = currentA;
+ genCases_f128_b = currentB;
+ genCases_f128_c = currentC;
+ genCases_done = sequenceA.done & sequenceB.done & sequenceC.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ f128Random( &genCases_f128_a );
+ f128Random( &genCases_f128_b );
+ f128Random( &genCases_f128_c );
+ break;
+ case 1:
+ if ( sequenceC.done ) {
+ sequenceC.done = false;
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ f128NextQInP2( &sequenceA, ¤tA );
+ }
+ f128NextQInP2( &sequenceB, ¤tB );
+ }
+ genCases_f128_a = currentA;
+ genCases_f128_b = currentB;
+ f128NextQInP2( &sequenceC, &genCases_f128_c );
+ genCases_done = sequenceA.done & sequenceB.done & sequenceC.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genCases_f16.c b/src/libs/softfloat-3e/testfloat/source/genCases_f16.c
new file mode 100644
index 00000000..ea4c0253
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genCases_f16.c
@@ -0,0 +1,585 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "random.h"
+#include "softfloat.h"
+#include "genCases.h"
+
+#ifdef FLOAT16
+
+struct sequence {
+ int expNum, term1Num, term2Num;
+ bool done;
+};
+
+union ui16_f16 { uint16_t ui; float16_t f; };
+
+enum {
+ f16NumQIn = 22,
+ f16NumQOut = 34,
+ f16NumP1 = 4,
+ f16NumP2 = 36
+};
+static const uint16_t f16QIn[f16NumQIn] = {
+ 0x0000, /* positive, subnormal */
+ 0x0400, /* positive, -14 */
+ 0x1000, /* positive, -11 */
+ 0x3400, /* positive, -2 */
+ 0x3800, /* positive, -1 */
+ 0x3C00, /* positive, 0 */
+ 0x4000, /* positive, 1 */
+ 0x4400, /* positive, 2 */
+ 0x6800, /* positive, 11 */
+ 0x7800, /* positive, 15 */
+ 0x7C00, /* positive, infinity or NaN */
+ 0x8000, /* negative, subnormal */
+ 0x8400, /* negative, -14 */
+ 0x9000, /* negative, -11 */
+ 0xB400, /* negative, -2 */
+ 0xB800, /* negative, -1 */
+ 0xBC00, /* negative, 0 */
+ 0xC000, /* negative, 1 */
+ 0xC400, /* negative, 2 */
+ 0xE800, /* negative, 11 */
+ 0xF800, /* negative, 15 */
+ 0xFC00 /* negative, infinity or NaN */
+};
+static const uint16_t f16QOut[f16NumQOut] = {
+ 0x0000, /* positive, subnormal */
+ 0x0400, /* positive, -14 */
+ 0x0800, /* positive, -13 */
+ 0x1000, /* positive, -11 */
+ 0x2C00, /* positive, -4 */
+ 0x3000, /* positive, -3 */
+ 0x3400, /* positive, -2 */
+ 0x3800, /* positive, -1 */
+ 0x3C00, /* positive, 0 */
+ 0x4000, /* positive, 1 */
+ 0x4400, /* positive, 2 */
+ 0x4800, /* positive, 3 */
+ 0x4C00, /* positive, 4 */
+ 0x6800, /* positive, 11 */
+ 0x7400, /* positive, 14 */
+ 0x7800, /* positive, 15 */
+ 0x7C00, /* positive, infinity or NaN */
+ 0x8000, /* negative, subnormal */
+ 0x8400, /* negative, -14 */
+ 0x8800, /* negative, -13 */
+ 0x9000, /* negative, -11 */
+ 0xAC00, /* negative, -4 */
+ 0xB000, /* negative, -3 */
+ 0xB400, /* negative, -2 */
+ 0xB800, /* negative, -1 */
+ 0xBC00, /* negative, 0 */
+ 0xC000, /* negative, 1 */
+ 0xC400, /* negative, 2 */
+ 0xC800, /* negative, 3 */
+ 0xCC00, /* negative, 4 */
+ 0xE800, /* negative, 11 */
+ 0xF400, /* negative, 14 */
+ 0xF800, /* negative, 15 */
+ 0xFC00 /* negative, infinity or NaN */
+};
+static const uint16_t f16P1[f16NumP1] = {
+ 0x0000,
+ 0x0001,
+ 0x03FF,
+ 0x03FE
+};
+static const uint16_t f16P2[f16NumP2] = {
+ 0x0000,
+ 0x0001,
+ 0x0002,
+ 0x0004,
+ 0x0008,
+ 0x0010,
+ 0x0020,
+ 0x0040,
+ 0x0080,
+ 0x0100,
+ 0x0200,
+ 0x0300,
+ 0x0380,
+ 0x03C0,
+ 0x03E0,
+ 0x03F0,
+ 0x03F8,
+ 0x03FC,
+ 0x03FE,
+ 0x03FF,
+ 0x03FD,
+ 0x03FB,
+ 0x03F7,
+ 0x03EF,
+ 0x03DF,
+ 0x03BF,
+ 0x037F,
+ 0x02FF,
+ 0x01FF,
+ 0x00FF,
+ 0x007F,
+ 0x003F,
+ 0x001F,
+ 0x000F,
+ 0x0007,
+ 0x0003
+};
+
+static const uint_fast64_t f16NumQInP1 = f16NumQIn * f16NumP1;
+static const uint_fast64_t f16NumQOutP1 = f16NumQOut * f16NumP1;
+
+static float16_t f16NextQInP1( struct sequence *sequencePtr )
+{
+ int expNum, sigNum;
+ union ui16_f16 uZ;
+
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uZ.ui = f16QIn[expNum] | f16P1[sigNum];
+ ++sigNum;
+ if ( f16NumP1 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f16NumQIn <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+ return uZ.f;
+
+}
+
+static float16_t f16NextQOutP1( struct sequence *sequencePtr )
+{
+ int expNum, sigNum;
+ union ui16_f16 uZ;
+
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uZ.ui = f16QOut[expNum] | f16P1[sigNum];
+ ++sigNum;
+ if ( f16NumP1 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f16NumQOut <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+ return uZ.f;
+
+}
+
+static const uint_fast64_t f16NumQInP2 = f16NumQIn * f16NumP2;
+static const uint_fast64_t f16NumQOutP2 = f16NumQOut * f16NumP2;
+
+static float16_t f16NextQInP2( struct sequence *sequencePtr )
+{
+ int expNum, sigNum;
+ union ui16_f16 uZ;
+
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uZ.ui = f16QIn[expNum] | f16P2[sigNum];
+ ++sigNum;
+ if ( f16NumP2 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f16NumQIn <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+ return uZ.f;
+
+}
+
+static float16_t f16NextQOutP2( struct sequence *sequencePtr )
+{
+ int expNum, sigNum;
+ union ui16_f16 uZ;
+
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uZ.ui = f16QOut[expNum] | f16P2[sigNum];
+ ++sigNum;
+ if ( f16NumP2 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f16NumQOut <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+ return uZ.f;
+
+}
+
+static float16_t f16RandomQOutP3( void )
+{
+ union ui16_f16 uZ;
+
+ uZ.ui =
+ f16QOut[randomN_ui8( f16NumQOut )]
+ | ((f16P2[randomN_ui8( f16NumP2 )] + f16P2[randomN_ui8( f16NumP2 )])
+ & 0x03FF);
+ return uZ.f;
+
+}
+
+static float16_t f16RandomQOutPInf( void )
+{
+ union ui16_f16 uZ;
+
+ uZ.ui = f16QOut[randomN_ui8( f16NumQOut )] | (random_ui16() & 0x03FF);
+ return uZ.f;
+
+}
+
+enum { f16NumQInfWeightMasks = 4 };
+static const uint16_t f16QInfWeightMasks[f16NumQInfWeightMasks] =
+ { 0xFC00, 0xFC00, 0xBC00, 0x9C00 };
+static const uint16_t f16QInfWeightOffsets[f16NumQInfWeightMasks] =
+ { 0x0000, 0x0000, 0x2000, 0x3000 };
+
+static float16_t f16RandomQInfP3( void )
+{
+ int weightMaskNum;
+ union ui16_f16 uZ;
+
+ weightMaskNum = randomN_ui8( f16NumQInfWeightMasks );
+ uZ.ui =
+ ((random_ui16() & f16QInfWeightMasks[weightMaskNum])
+ + f16QInfWeightOffsets[weightMaskNum])
+ | ((f16P2[randomN_ui8( f16NumP2 )] + f16P2[randomN_ui8( f16NumP2 )])
+ & 0x03FF);
+ return uZ.f;
+
+}
+
+static float16_t f16RandomQInfPInf( void )
+{
+ int weightMaskNum;
+ union ui16_f16 uZ;
+
+ weightMaskNum = randomN_ui8( f16NumQInfWeightMasks );
+ uZ.ui =
+ (random_ui16() & (f16QInfWeightMasks[weightMaskNum] | 0x03FF))
+ + f16QInfWeightOffsets[weightMaskNum];
+ return uZ.f;
+
+}
+
+static float16_t f16Random( void )
+{
+
+ switch ( random_ui8() & 7 ) {
+ case 0:
+ case 1:
+ case 2:
+ return f16RandomQOutP3();
+ case 3:
+ return f16RandomQOutPInf();
+ case 4:
+ case 5:
+ case 6:
+ return f16RandomQInfP3();
+ case 7:
+ return f16RandomQInfPInf();
+ }
+
+}
+
+static struct sequence sequenceA, sequenceB, sequenceC;
+static float16_t currentA, currentB, currentC;
+static int subcase;
+
+float16_t genCases_f16_a, genCases_f16_b, genCases_f16_c;
+
+void genCases_f16_a_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ subcase = 0;
+ genCases_total =
+ (genCases_level == 1) ? 3 * f16NumQOutP1 : 2 * f16NumQOutP2;
+ genCases_done = false;
+
+}
+
+void genCases_f16_a_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ case 1:
+ genCases_f16_a = f16Random();
+ break;
+ case 2:
+ genCases_f16_a = f16NextQOutP1( &sequenceA );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_f16_a = f16Random();
+ break;
+ case 1:
+ genCases_f16_a = f16NextQOutP2( &sequenceA );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+void genCases_f16_ab_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ sequenceB.expNum = 0;
+ sequenceB.term1Num = 0;
+ sequenceB.term2Num = 0;
+ sequenceB.done = false;
+ subcase = 0;
+ if ( genCases_level == 1 ) {
+ genCases_total = 6 * f16NumQInP1 * f16NumQInP1;
+ currentA = f16NextQInP1( &sequenceA );
+ } else {
+ genCases_total = 2 * f16NumQInP2 * f16NumQInP2;
+ currentA = f16NextQInP2( &sequenceA );
+ }
+ genCases_done = false;
+
+}
+
+void genCases_f16_ab_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ currentA = f16NextQInP1( &sequenceA );
+ }
+ currentB = f16NextQInP1( &sequenceB );
+ case 2:
+ case 4:
+ genCases_f16_a = f16Random();
+ genCases_f16_b = f16Random();
+ break;
+ case 1:
+ genCases_f16_a = currentA;
+ genCases_f16_b = f16Random();
+ break;
+ case 3:
+ genCases_f16_a = f16Random();
+ genCases_f16_b = currentB;
+ break;
+ case 5:
+ genCases_f16_a = currentA;
+ genCases_f16_b = currentB;
+ genCases_done = sequenceA.done & sequenceB.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_f16_a = f16Random();
+ genCases_f16_b = f16Random();
+ break;
+ case 1:
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ currentA = f16NextQInP2( &sequenceA );
+ }
+ genCases_f16_a = currentA;
+ genCases_f16_b = f16NextQInP2( &sequenceB );
+ genCases_done = sequenceA.done & sequenceB.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+void genCases_f16_abc_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ sequenceB.expNum = 0;
+ sequenceB.term1Num = 0;
+ sequenceB.term2Num = 0;
+ sequenceB.done = false;
+ sequenceC.expNum = 0;
+ sequenceC.term1Num = 0;
+ sequenceC.term2Num = 0;
+ sequenceC.done = false;
+ subcase = 0;
+ if ( genCases_level == 1 ) {
+ genCases_total = 9 * f16NumQInP1 * f16NumQInP1 * f16NumQInP1;
+ currentA = f16NextQInP1( &sequenceA );
+ currentB = f16NextQInP1( &sequenceB );
+ } else {
+ genCases_total = 2 * f16NumQInP2 * f16NumQInP2 * f16NumQInP2;
+ currentA = f16NextQInP2( &sequenceA );
+ currentB = f16NextQInP2( &sequenceB );
+ }
+ genCases_done = false;
+
+}
+
+void genCases_f16_abc_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ if ( sequenceC.done ) {
+ sequenceC.done = false;
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ currentA = f16NextQInP1( &sequenceA );
+ }
+ currentB = f16NextQInP1( &sequenceB );
+ }
+ currentC = f16NextQInP1( &sequenceC );
+ genCases_f16_a = f16Random();
+ genCases_f16_b = f16Random();
+ genCases_f16_c = currentC;
+ break;
+ case 1:
+ genCases_f16_a = currentA;
+ genCases_f16_b = currentB;
+ genCases_f16_c = f16Random();
+ break;
+ case 2:
+ genCases_f16_a = f16Random();
+ genCases_f16_b = f16Random();
+ genCases_f16_c = f16Random();
+ break;
+ case 3:
+ genCases_f16_a = f16Random();
+ genCases_f16_b = currentB;
+ genCases_f16_c = currentC;
+ break;
+ case 4:
+ genCases_f16_a = currentA;
+ genCases_f16_b = f16Random();
+ genCases_f16_c = f16Random();
+ break;
+ case 5:
+ genCases_f16_a = f16Random();
+ genCases_f16_b = currentB;
+ genCases_f16_c = f16Random();
+ break;
+ case 6:
+ genCases_f16_a = currentA;
+ genCases_f16_b = f16Random();
+ genCases_f16_c = currentC;
+ break;
+ case 7:
+ genCases_f16_a = f16Random();
+ genCases_f16_b = f16Random();
+ genCases_f16_c = f16Random();
+ break;
+ case 8:
+ genCases_f16_a = currentA;
+ genCases_f16_b = currentB;
+ genCases_f16_c = currentC;
+ genCases_done = sequenceA.done & sequenceB.done & sequenceC.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_f16_a = f16Random();
+ genCases_f16_b = f16Random();
+ genCases_f16_c = f16Random();
+ break;
+ case 1:
+ if ( sequenceC.done ) {
+ sequenceC.done = false;
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ currentA = f16NextQInP2( &sequenceA );
+ }
+ currentB = f16NextQInP2( &sequenceB );
+ }
+ genCases_f16_a = currentA;
+ genCases_f16_b = currentB;
+ genCases_f16_c = f16NextQInP2( &sequenceC );
+ genCases_done = sequenceA.done & sequenceB.done & sequenceC.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genCases_f32.c b/src/libs/softfloat-3e/testfloat/source/genCases_f32.c
new file mode 100644
index 00000000..3da3a298
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genCases_f32.c
@@ -0,0 +1,664 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "random.h"
+#include "softfloat.h"
+#include "genCases.h"
+
+struct sequence {
+ int expNum, term1Num, term2Num;
+ bool done;
+};
+
+union ui32_f32 { uint32_t ui; float32_t f; };
+
+enum {
+ f32NumQIn = 22,
+ f32NumQOut = 50,
+ f32NumP1 = 4,
+ f32NumP2 = 88
+};
+static const uint32_t f32QIn[f32NumQIn] = {
+ 0x00000000, /* positive, subnormal */
+ 0x00800000, /* positive, -126 */
+ 0x33800000, /* positive, -24 */
+ 0x3E800000, /* positive, -2 */
+ 0x3F000000, /* positive, -1 */
+ 0x3F800000, /* positive, 0 */
+ 0x40000000, /* positive, 1 */
+ 0x40800000, /* positive, 2 */
+ 0x4B800000, /* positive, 24 */
+ 0x7F000000, /* positive, 127 */
+ 0x7F800000, /* positive, infinity or NaN */
+ 0x80000000, /* negative, subnormal */
+ 0x80800000, /* negative, -126 */
+ 0xB3800000, /* negative, -24 */
+ 0xBE800000, /* negative, -2 */
+ 0xBF000000, /* negative, -1 */
+ 0xBF800000, /* negative, 0 */
+ 0xC0000000, /* negative, 1 */
+ 0xC0800000, /* negative, 2 */
+ 0xCB800000, /* negative, 24 */
+ 0xFE800000, /* negative, 126 */
+ 0xFF800000 /* negative, infinity or NaN */
+};
+static const uint32_t f32QOut[f32NumQOut] = {
+ 0x00000000, /* positive, subnormal */
+ 0x00800000, /* positive, -126 */
+ 0x01000000, /* positive, -125 */
+ 0x33800000, /* positive, -24 */
+ 0x3D800000, /* positive, -4 */
+ 0x3E000000, /* positive, -3 */
+ 0x3E800000, /* positive, -2 */
+ 0x3F000000, /* positive, -1 */
+ 0x3F800000, /* positive, 0 */
+ 0x40000000, /* positive, 1 */
+ 0x40800000, /* positive, 2 */
+ 0x41000000, /* positive, 3 */
+ 0x41800000, /* positive, 4 */
+ 0x4B800000, /* positive, 24 */
+ 0x4E000000, /* positive, 29 */
+ 0x4E800000, /* positive, 30 */
+ 0x4F000000, /* positive, 31 */
+ 0x4F800000, /* positive, 32 */
+ 0x5E000000, /* positive, 61 */
+ 0x5E800000, /* positive, 62 */
+ 0x5F000000, /* positive, 63 */
+ 0x5F800000, /* positive, 64 */
+ 0x7E800000, /* positive, 126 */
+ 0x7F000000, /* positive, 127 */
+ 0x7F800000, /* positive, infinity or NaN */
+ 0x80000000, /* negative, subnormal */
+ 0x80800000, /* negative, -126 */
+ 0x81000000, /* negative, -125 */
+ 0xB3800000, /* negative, -24 */
+ 0xBD800000, /* negative, -4 */
+ 0xBE000000, /* negative, -3 */
+ 0xBE800000, /* negative, -2 */
+ 0xBF000000, /* negative, -1 */
+ 0xBF800000, /* negative, 0 */
+ 0xC0000000, /* negative, 1 */
+ 0xC0800000, /* negative, 2 */
+ 0xC1000000, /* negative, 3 */
+ 0xC1800000, /* negative, 4 */
+ 0xCB800000, /* negative, 24 */
+ 0xCE000000, /* negative, 29 */
+ 0xCE800000, /* negative, 30 */
+ 0xCF000000, /* negative, 31 */
+ 0xCF800000, /* negative, 32 */
+ 0xDE000000, /* negative, 61 */
+ 0xDE800000, /* negative, 62 */
+ 0xDF000000, /* negative, 63 */
+ 0xDF800000, /* negative, 64 */
+ 0xFE800000, /* negative, 126 */
+ 0xFF000000, /* negative, 127 */
+ 0xFF800000 /* negative, infinity or NaN */
+};
+static const uint32_t f32P1[f32NumP1] = {
+ 0x00000000,
+ 0x00000001,
+ 0x007FFFFF,
+ 0x007FFFFE
+};
+static const uint32_t f32P2[f32NumP2] = {
+ 0x00000000,
+ 0x00000001,
+ 0x00000002,
+ 0x00000004,
+ 0x00000008,
+ 0x00000010,
+ 0x00000020,
+ 0x00000040,
+ 0x00000080,
+ 0x00000100,
+ 0x00000200,
+ 0x00000400,
+ 0x00000800,
+ 0x00001000,
+ 0x00002000,
+ 0x00004000,
+ 0x00008000,
+ 0x00010000,
+ 0x00020000,
+ 0x00040000,
+ 0x00080000,
+ 0x00100000,
+ 0x00200000,
+ 0x00400000,
+ 0x00600000,
+ 0x00700000,
+ 0x00780000,
+ 0x007C0000,
+ 0x007E0000,
+ 0x007F0000,
+ 0x007F8000,
+ 0x007FC000,
+ 0x007FE000,
+ 0x007FF000,
+ 0x007FF800,
+ 0x007FFC00,
+ 0x007FFE00,
+ 0x007FFF00,
+ 0x007FFF80,
+ 0x007FFFC0,
+ 0x007FFFE0,
+ 0x007FFFF0,
+ 0x007FFFF8,
+ 0x007FFFFC,
+ 0x007FFFFE,
+ 0x007FFFFF,
+ 0x007FFFFD,
+ 0x007FFFFB,
+ 0x007FFFF7,
+ 0x007FFFEF,
+ 0x007FFFDF,
+ 0x007FFFBF,
+ 0x007FFF7F,
+ 0x007FFEFF,
+ 0x007FFDFF,
+ 0x007FFBFF,
+ 0x007FF7FF,
+ 0x007FEFFF,
+ 0x007FDFFF,
+ 0x007FBFFF,
+ 0x007F7FFF,
+ 0x007EFFFF,
+ 0x007DFFFF,
+ 0x007BFFFF,
+ 0x0077FFFF,
+ 0x006FFFFF,
+ 0x005FFFFF,
+ 0x003FFFFF,
+ 0x001FFFFF,
+ 0x000FFFFF,
+ 0x0007FFFF,
+ 0x0003FFFF,
+ 0x0001FFFF,
+ 0x0000FFFF,
+ 0x00007FFF,
+ 0x00003FFF,
+ 0x00001FFF,
+ 0x00000FFF,
+ 0x000007FF,
+ 0x000003FF,
+ 0x000001FF,
+ 0x000000FF,
+ 0x0000007F,
+ 0x0000003F,
+ 0x0000001F,
+ 0x0000000F,
+ 0x00000007,
+ 0x00000003
+};
+
+static const uint_fast64_t f32NumQInP1 = f32NumQIn * f32NumP1;
+static const uint_fast64_t f32NumQOutP1 = f32NumQOut * f32NumP1;
+
+static float32_t f32NextQInP1( struct sequence *sequencePtr )
+{
+ int expNum, sigNum;
+ union ui32_f32 uZ;
+
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uZ.ui = f32QIn[expNum] | f32P1[sigNum];
+ ++sigNum;
+ if ( f32NumP1 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f32NumQIn <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+ return uZ.f;
+
+}
+
+static float32_t f32NextQOutP1( struct sequence *sequencePtr )
+{
+ int expNum, sigNum;
+ union ui32_f32 uZ;
+
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uZ.ui = f32QOut[expNum] | f32P1[sigNum];
+ ++sigNum;
+ if ( f32NumP1 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f32NumQOut <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+ return uZ.f;
+
+}
+
+static const uint_fast64_t f32NumQInP2 = f32NumQIn * f32NumP2;
+static const uint_fast64_t f32NumQOutP2 = f32NumQOut * f32NumP2;
+
+static float32_t f32NextQInP2( struct sequence *sequencePtr )
+{
+ int expNum, sigNum;
+ union ui32_f32 uZ;
+
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uZ.ui = f32QIn[expNum] | f32P2[sigNum];
+ ++sigNum;
+ if ( f32NumP2 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f32NumQIn <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+ return uZ.f;
+
+}
+
+static float32_t f32NextQOutP2( struct sequence *sequencePtr )
+{
+ int expNum, sigNum;
+ union ui32_f32 uZ;
+
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uZ.ui = f32QOut[expNum] | f32P2[sigNum];
+ ++sigNum;
+ if ( f32NumP2 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f32NumQOut <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+ return uZ.f;
+
+}
+
+static float32_t f32RandomQOutP3( void )
+{
+ union ui32_f32 uZ;
+
+ uZ.ui =
+ f32QOut[randomN_ui8( f32NumQOut )]
+ | ((f32P2[randomN_ui8( f32NumP2 )] + f32P2[randomN_ui8( f32NumP2 )])
+ & 0x007FFFFF);
+ return uZ.f;
+
+}
+
+static float32_t f32RandomQOutPInf( void )
+{
+ union ui32_f32 uZ;
+
+ uZ.ui = f32QOut[randomN_ui8( f32NumQOut )] | (random_ui32() & 0x007FFFFF);
+ return uZ.f;
+
+}
+
+enum { f32NumQInfWeightMasks = 7 };
+static const uint32_t f32QInfWeightMasks[f32NumQInfWeightMasks] = {
+ 0xFF800000,
+ 0xFF800000,
+ 0xBF800000,
+ 0x9F800000,
+ 0x8F800000,
+ 0x87800000,
+ 0x83800000
+};
+static const uint32_t f32QInfWeightOffsets[f32NumQInfWeightMasks] = {
+ 0x00000000,
+ 0x00000000,
+ 0x20000000,
+ 0x30000000,
+ 0x38000000,
+ 0x3C000000,
+ 0x3E000000
+};
+
+static float32_t f32RandomQInfP3( void )
+{
+ int weightMaskNum;
+ union ui32_f32 uZ;
+
+ weightMaskNum = randomN_ui8( f32NumQInfWeightMasks );
+ uZ.ui =
+ (((uint_fast32_t) random_ui16()<<16
+ & f32QInfWeightMasks[weightMaskNum])
+ + f32QInfWeightOffsets[weightMaskNum])
+ | ((f32P2[randomN_ui8( f32NumP2 )] + f32P2[randomN_ui8( f32NumP2 )])
+ & 0x007FFFFF);
+ return uZ.f;
+
+}
+
+static float32_t f32RandomQInfPInf( void )
+{
+ int weightMaskNum;
+ union ui32_f32 uZ;
+
+ weightMaskNum = randomN_ui8( f32NumQInfWeightMasks );
+ uZ.ui =
+ (random_ui32() & (f32QInfWeightMasks[weightMaskNum] | 0x007FFFFF))
+ + f32QInfWeightOffsets[weightMaskNum];
+ return uZ.f;
+
+}
+
+static float32_t f32Random( void )
+{
+
+ switch ( random_ui8() & 7 ) {
+ case 0:
+ case 1:
+ case 2:
+ return f32RandomQOutP3();
+ case 3:
+ return f32RandomQOutPInf();
+ case 4:
+ case 5:
+ case 6:
+ return f32RandomQInfP3();
+ case 7:
+ return f32RandomQInfPInf();
+ }
+
+}
+
+static struct sequence sequenceA, sequenceB, sequenceC;
+static float32_t currentA, currentB, currentC;
+static int subcase;
+
+float32_t genCases_f32_a, genCases_f32_b, genCases_f32_c;
+
+void genCases_f32_a_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ subcase = 0;
+ genCases_total =
+ (genCases_level == 1) ? 3 * f32NumQOutP1 : 2 * f32NumQOutP2;
+ genCases_done = false;
+
+}
+
+void genCases_f32_a_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ case 1:
+ genCases_f32_a = f32Random();
+ break;
+ case 2:
+ genCases_f32_a = f32NextQOutP1( &sequenceA );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_f32_a = f32Random();
+ break;
+ case 1:
+ genCases_f32_a = f32NextQOutP2( &sequenceA );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+void genCases_f32_ab_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ sequenceB.expNum = 0;
+ sequenceB.term1Num = 0;
+ sequenceB.term2Num = 0;
+ sequenceB.done = false;
+ subcase = 0;
+ if ( genCases_level == 1 ) {
+ genCases_total = 6 * f32NumQInP1 * f32NumQInP1;
+ currentA = f32NextQInP1( &sequenceA );
+ } else {
+ genCases_total = 2 * f32NumQInP2 * f32NumQInP2;
+ currentA = f32NextQInP2( &sequenceA );
+ }
+ genCases_done = false;
+
+}
+
+void genCases_f32_ab_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ currentA = f32NextQInP1( &sequenceA );
+ }
+ currentB = f32NextQInP1( &sequenceB );
+ case 2:
+ case 4:
+ genCases_f32_a = f32Random();
+ genCases_f32_b = f32Random();
+ break;
+ case 1:
+ genCases_f32_a = currentA;
+ genCases_f32_b = f32Random();
+ break;
+ case 3:
+ genCases_f32_a = f32Random();
+ genCases_f32_b = currentB;
+ break;
+ case 5:
+ genCases_f32_a = currentA;
+ genCases_f32_b = currentB;
+ genCases_done = sequenceA.done & sequenceB.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_f32_a = f32Random();
+ genCases_f32_b = f32Random();
+ break;
+ case 1:
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ currentA = f32NextQInP2( &sequenceA );
+ }
+ genCases_f32_a = currentA;
+ genCases_f32_b = f32NextQInP2( &sequenceB );
+ genCases_done = sequenceA.done & sequenceB.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+void genCases_f32_abc_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ sequenceB.expNum = 0;
+ sequenceB.term1Num = 0;
+ sequenceB.term2Num = 0;
+ sequenceB.done = false;
+ sequenceC.expNum = 0;
+ sequenceC.term1Num = 0;
+ sequenceC.term2Num = 0;
+ sequenceC.done = false;
+ subcase = 0;
+ if ( genCases_level == 1 ) {
+ genCases_total = 9 * f32NumQInP1 * f32NumQInP1 * f32NumQInP1;
+ currentA = f32NextQInP1( &sequenceA );
+ currentB = f32NextQInP1( &sequenceB );
+ } else {
+ genCases_total = 2 * f32NumQInP2 * f32NumQInP2 * f32NumQInP2;
+ currentA = f32NextQInP2( &sequenceA );
+ currentB = f32NextQInP2( &sequenceB );
+ }
+ genCases_done = false;
+
+}
+
+void genCases_f32_abc_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ if ( sequenceC.done ) {
+ sequenceC.done = false;
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ currentA = f32NextQInP1( &sequenceA );
+ }
+ currentB = f32NextQInP1( &sequenceB );
+ }
+ currentC = f32NextQInP1( &sequenceC );
+ genCases_f32_a = f32Random();
+ genCases_f32_b = f32Random();
+ genCases_f32_c = currentC;
+ break;
+ case 1:
+ genCases_f32_a = currentA;
+ genCases_f32_b = currentB;
+ genCases_f32_c = f32Random();
+ break;
+ case 2:
+ genCases_f32_a = f32Random();
+ genCases_f32_b = f32Random();
+ genCases_f32_c = f32Random();
+ break;
+ case 3:
+ genCases_f32_a = f32Random();
+ genCases_f32_b = currentB;
+ genCases_f32_c = currentC;
+ break;
+ case 4:
+ genCases_f32_a = currentA;
+ genCases_f32_b = f32Random();
+ genCases_f32_c = f32Random();
+ break;
+ case 5:
+ genCases_f32_a = f32Random();
+ genCases_f32_b = currentB;
+ genCases_f32_c = f32Random();
+ break;
+ case 6:
+ genCases_f32_a = currentA;
+ genCases_f32_b = f32Random();
+ genCases_f32_c = currentC;
+ break;
+ case 7:
+ genCases_f32_a = f32Random();
+ genCases_f32_b = f32Random();
+ genCases_f32_c = f32Random();
+ break;
+ case 8:
+ genCases_f32_a = currentA;
+ genCases_f32_b = currentB;
+ genCases_f32_c = currentC;
+ genCases_done = sequenceA.done & sequenceB.done & sequenceC.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_f32_a = f32Random();
+ genCases_f32_b = f32Random();
+ genCases_f32_c = f32Random();
+ break;
+ case 1:
+ if ( sequenceC.done ) {
+ sequenceC.done = false;
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ currentA = f32NextQInP2( &sequenceA );
+ }
+ currentB = f32NextQInP2( &sequenceB );
+ }
+ genCases_f32_a = currentA;
+ genCases_f32_b = currentB;
+ genCases_f32_c = f32NextQInP2( &sequenceC );
+ genCases_done = sequenceA.done & sequenceB.done & sequenceC.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genCases_f64.c b/src/libs/softfloat-3e/testfloat/source/genCases_f64.c
new file mode 100644
index 00000000..5229e894
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genCases_f64.c
@@ -0,0 +1,808 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "random.h"
+#include "softfloat.h"
+#include "genCases.h"
+
+#ifdef FLOAT64
+
+struct sequence {
+ int expNum, term1Num, term2Num;
+ bool done;
+};
+
+union ui64_f64 { uint64_t ui; float64_t f; };
+
+enum {
+ f64NumQIn = 22,
+ f64NumQOut = 64,
+ f64NumP1 = 4,
+ f64NumP2 = 204
+};
+static const uint64_t f64QIn[f64NumQIn] = {
+ UINT64_C( 0x0000000000000000 ), /* positive, subnormal */
+ UINT64_C( 0x0010000000000000 ), /* positive, -1022 */
+ UINT64_C( 0x3CA0000000000000 ), /* positive, -53 */
+ UINT64_C( 0x3FD0000000000000 ), /* positive, -2 */
+ UINT64_C( 0x3FE0000000000000 ), /* positive, -1 */
+ UINT64_C( 0x3FF0000000000000 ), /* positive, 0 */
+ UINT64_C( 0x4000000000000000 ), /* positive, 1 */
+ UINT64_C( 0x4010000000000000 ), /* positive, 2 */
+ UINT64_C( 0x4340000000000000 ), /* positive, 53 */
+ UINT64_C( 0x7FE0000000000000 ), /* positive, 1023 */
+ UINT64_C( 0x7FF0000000000000 ), /* positive, infinity or NaN */
+ UINT64_C( 0x8000000000000000 ), /* negative, subnormal */
+ UINT64_C( 0x8010000000000000 ), /* negative, -1022 */
+ UINT64_C( 0xBCA0000000000000 ), /* negative, -53 */
+ UINT64_C( 0xBFD0000000000000 ), /* negative, -2 */
+ UINT64_C( 0xBFE0000000000000 ), /* negative, -1 */
+ UINT64_C( 0xBFF0000000000000 ), /* negative, 0 */
+ UINT64_C( 0xC000000000000000 ), /* negative, 1 */
+ UINT64_C( 0xC010000000000000 ), /* negative, 2 */
+ UINT64_C( 0xC340000000000000 ), /* negative, 53 */
+ UINT64_C( 0xFFE0000000000000 ), /* negative, 1023 */
+ UINT64_C( 0xFFF0000000000000 ) /* negative, infinity or NaN */
+};
+static const uint64_t f64QOut[f64NumQOut] = {
+ UINT64_C( 0x0000000000000000 ), /* positive, subnormal */
+ UINT64_C( 0x0010000000000000 ), /* positive, -1022 */
+ UINT64_C( 0x0020000000000000 ), /* positive, -1021 */
+ UINT64_C( 0x37E0000000000000 ), /* positive, -129 */
+ UINT64_C( 0x37F0000000000000 ), /* positive, -128 */
+ UINT64_C( 0x3800000000000000 ), /* positive, -127 */
+ UINT64_C( 0x3810000000000000 ), /* positive, -126 */
+ UINT64_C( 0x3CA0000000000000 ), /* positive, -53 */
+ UINT64_C( 0x3FB0000000000000 ), /* positive, -4 */
+ UINT64_C( 0x3FC0000000000000 ), /* positive, -3 */
+ UINT64_C( 0x3FD0000000000000 ), /* positive, -2 */
+ UINT64_C( 0x3FE0000000000000 ), /* positive, -1 */
+ UINT64_C( 0x3FF0000000000000 ), /* positive, 0 */
+ UINT64_C( 0x4000000000000000 ), /* positive, 1 */
+ UINT64_C( 0x4010000000000000 ), /* positive, 2 */
+ UINT64_C( 0x4020000000000000 ), /* positive, 3 */
+ UINT64_C( 0x4030000000000000 ), /* positive, 4 */
+ UINT64_C( 0x41C0000000000000 ), /* positive, 29 */
+ UINT64_C( 0x41D0000000000000 ), /* positive, 30 */
+ UINT64_C( 0x41E0000000000000 ), /* positive, 31 */
+ UINT64_C( 0x41F0000000000000 ), /* positive, 32 */
+ UINT64_C( 0x4340000000000000 ), /* positive, 53 */
+ UINT64_C( 0x43C0000000000000 ), /* positive, 61 */
+ UINT64_C( 0x43D0000000000000 ), /* positive, 62 */
+ UINT64_C( 0x43E0000000000000 ), /* positive, 63 */
+ UINT64_C( 0x43F0000000000000 ), /* positive, 64 */
+ UINT64_C( 0x47E0000000000000 ), /* positive, 127 */
+ UINT64_C( 0x47F0000000000000 ), /* positive, 128 */
+ UINT64_C( 0x4800000000000000 ), /* positive, 129 */
+ UINT64_C( 0x7FD0000000000000 ), /* positive, 1022 */
+ UINT64_C( 0x7FE0000000000000 ), /* positive, 1023 */
+ UINT64_C( 0x7FF0000000000000 ), /* positive, infinity or NaN */
+ UINT64_C( 0x8000000000000000 ), /* negative, subnormal */
+ UINT64_C( 0x8010000000000000 ), /* negative, -1022 */
+ UINT64_C( 0x8020000000000000 ), /* negative, -1021 */
+ UINT64_C( 0xB7E0000000000000 ), /* negative, -129 */
+ UINT64_C( 0xB7F0000000000000 ), /* negative, -128 */
+ UINT64_C( 0xB800000000000000 ), /* negative, -127 */
+ UINT64_C( 0xB810000000000000 ), /* negative, -126 */
+ UINT64_C( 0xBCA0000000000000 ), /* negative, -53 */
+ UINT64_C( 0xBFB0000000000000 ), /* negative, -4 */
+ UINT64_C( 0xBFC0000000000000 ), /* negative, -3 */
+ UINT64_C( 0xBFD0000000000000 ), /* negative, -2 */
+ UINT64_C( 0xBFE0000000000000 ), /* negative, -1 */
+ UINT64_C( 0xBFF0000000000000 ), /* negative, 0 */
+ UINT64_C( 0xC000000000000000 ), /* negative, 1 */
+ UINT64_C( 0xC010000000000000 ), /* negative, 2 */
+ UINT64_C( 0xC020000000000000 ), /* negative, 3 */
+ UINT64_C( 0xC030000000000000 ), /* negative, 4 */
+ UINT64_C( 0xC1C0000000000000 ), /* negative, 29 */
+ UINT64_C( 0xC1D0000000000000 ), /* negative, 30 */
+ UINT64_C( 0xC1E0000000000000 ), /* negative, 31 */
+ UINT64_C( 0xC1F0000000000000 ), /* negative, 32 */
+ UINT64_C( 0xC340000000000000 ), /* negative, 53 */
+ UINT64_C( 0xC3C0000000000000 ), /* negative, 61 */
+ UINT64_C( 0xC3D0000000000000 ), /* negative, 62 */
+ UINT64_C( 0xC3E0000000000000 ), /* negative, 63 */
+ UINT64_C( 0xC3F0000000000000 ), /* negative, 64 */
+ UINT64_C( 0xC7E0000000000000 ), /* negative, 127 */
+ UINT64_C( 0xC7F0000000000000 ), /* negative, 128 */
+ UINT64_C( 0xC800000000000000 ), /* negative, 129 */
+ UINT64_C( 0xFFD0000000000000 ), /* negative, 1022 */
+ UINT64_C( 0xFFE0000000000000 ), /* negative, 1023 */
+ UINT64_C( 0xFFF0000000000000 ) /* negative, infinity or NaN */
+};
+static const uint64_t f64P1[f64NumP1] = {
+ UINT64_C( 0x0000000000000000 ),
+ UINT64_C( 0x0000000000000001 ),
+ UINT64_C( 0x000FFFFFFFFFFFFF ),
+ UINT64_C( 0x000FFFFFFFFFFFFE )
+};
+static const uint64_t f64P2[f64NumP2] = {
+ UINT64_C( 0x0000000000000000 ),
+ UINT64_C( 0x0000000000000001 ),
+ UINT64_C( 0x0000000000000002 ),
+ UINT64_C( 0x0000000000000004 ),
+ UINT64_C( 0x0000000000000008 ),
+ UINT64_C( 0x0000000000000010 ),
+ UINT64_C( 0x0000000000000020 ),
+ UINT64_C( 0x0000000000000040 ),
+ UINT64_C( 0x0000000000000080 ),
+ UINT64_C( 0x0000000000000100 ),
+ UINT64_C( 0x0000000000000200 ),
+ UINT64_C( 0x0000000000000400 ),
+ UINT64_C( 0x0000000000000800 ),
+ UINT64_C( 0x0000000000001000 ),
+ UINT64_C( 0x0000000000002000 ),
+ UINT64_C( 0x0000000000004000 ),
+ UINT64_C( 0x0000000000008000 ),
+ UINT64_C( 0x0000000000010000 ),
+ UINT64_C( 0x0000000000020000 ),
+ UINT64_C( 0x0000000000040000 ),
+ UINT64_C( 0x0000000000080000 ),
+ UINT64_C( 0x0000000000100000 ),
+ UINT64_C( 0x0000000000200000 ),
+ UINT64_C( 0x0000000000400000 ),
+ UINT64_C( 0x0000000000800000 ),
+ UINT64_C( 0x0000000001000000 ),
+ UINT64_C( 0x0000000002000000 ),
+ UINT64_C( 0x0000000004000000 ),
+ UINT64_C( 0x0000000008000000 ),
+ UINT64_C( 0x0000000010000000 ),
+ UINT64_C( 0x0000000020000000 ),
+ UINT64_C( 0x0000000040000000 ),
+ UINT64_C( 0x0000000080000000 ),
+ UINT64_C( 0x0000000100000000 ),
+ UINT64_C( 0x0000000200000000 ),
+ UINT64_C( 0x0000000400000000 ),
+ UINT64_C( 0x0000000800000000 ),
+ UINT64_C( 0x0000001000000000 ),
+ UINT64_C( 0x0000002000000000 ),
+ UINT64_C( 0x0000004000000000 ),
+ UINT64_C( 0x0000008000000000 ),
+ UINT64_C( 0x0000010000000000 ),
+ UINT64_C( 0x0000020000000000 ),
+ UINT64_C( 0x0000040000000000 ),
+ UINT64_C( 0x0000080000000000 ),
+ UINT64_C( 0x0000100000000000 ),
+ UINT64_C( 0x0000200000000000 ),
+ UINT64_C( 0x0000400000000000 ),
+ UINT64_C( 0x0000800000000000 ),
+ UINT64_C( 0x0001000000000000 ),
+ UINT64_C( 0x0002000000000000 ),
+ UINT64_C( 0x0004000000000000 ),
+ UINT64_C( 0x0008000000000000 ),
+ UINT64_C( 0x000C000000000000 ),
+ UINT64_C( 0x000E000000000000 ),
+ UINT64_C( 0x000F000000000000 ),
+ UINT64_C( 0x000F800000000000 ),
+ UINT64_C( 0x000FC00000000000 ),
+ UINT64_C( 0x000FE00000000000 ),
+ UINT64_C( 0x000FF00000000000 ),
+ UINT64_C( 0x000FF80000000000 ),
+ UINT64_C( 0x000FFC0000000000 ),
+ UINT64_C( 0x000FFE0000000000 ),
+ UINT64_C( 0x000FFF0000000000 ),
+ UINT64_C( 0x000FFF8000000000 ),
+ UINT64_C( 0x000FFFC000000000 ),
+ UINT64_C( 0x000FFFE000000000 ),
+ UINT64_C( 0x000FFFF000000000 ),
+ UINT64_C( 0x000FFFF800000000 ),
+ UINT64_C( 0x000FFFFC00000000 ),
+ UINT64_C( 0x000FFFFE00000000 ),
+ UINT64_C( 0x000FFFFF00000000 ),
+ UINT64_C( 0x000FFFFF80000000 ),
+ UINT64_C( 0x000FFFFFC0000000 ),
+ UINT64_C( 0x000FFFFFE0000000 ),
+ UINT64_C( 0x000FFFFFF0000000 ),
+ UINT64_C( 0x000FFFFFF8000000 ),
+ UINT64_C( 0x000FFFFFFC000000 ),
+ UINT64_C( 0x000FFFFFFE000000 ),
+ UINT64_C( 0x000FFFFFFF000000 ),
+ UINT64_C( 0x000FFFFFFF800000 ),
+ UINT64_C( 0x000FFFFFFFC00000 ),
+ UINT64_C( 0x000FFFFFFFE00000 ),
+ UINT64_C( 0x000FFFFFFFF00000 ),
+ UINT64_C( 0x000FFFFFFFF80000 ),
+ UINT64_C( 0x000FFFFFFFFC0000 ),
+ UINT64_C( 0x000FFFFFFFFE0000 ),
+ UINT64_C( 0x000FFFFFFFFF0000 ),
+ UINT64_C( 0x000FFFFFFFFF8000 ),
+ UINT64_C( 0x000FFFFFFFFFC000 ),
+ UINT64_C( 0x000FFFFFFFFFE000 ),
+ UINT64_C( 0x000FFFFFFFFFF000 ),
+ UINT64_C( 0x000FFFFFFFFFF800 ),
+ UINT64_C( 0x000FFFFFFFFFFC00 ),
+ UINT64_C( 0x000FFFFFFFFFFE00 ),
+ UINT64_C( 0x000FFFFFFFFFFF00 ),
+ UINT64_C( 0x000FFFFFFFFFFF80 ),
+ UINT64_C( 0x000FFFFFFFFFFFC0 ),
+ UINT64_C( 0x000FFFFFFFFFFFE0 ),
+ UINT64_C( 0x000FFFFFFFFFFFF0 ),
+ UINT64_C( 0x000FFFFFFFFFFFF8 ),
+ UINT64_C( 0x000FFFFFFFFFFFFC ),
+ UINT64_C( 0x000FFFFFFFFFFFFE ),
+ UINT64_C( 0x000FFFFFFFFFFFFF ),
+ UINT64_C( 0x000FFFFFFFFFFFFD ),
+ UINT64_C( 0x000FFFFFFFFFFFFB ),
+ UINT64_C( 0x000FFFFFFFFFFFF7 ),
+ UINT64_C( 0x000FFFFFFFFFFFEF ),
+ UINT64_C( 0x000FFFFFFFFFFFDF ),
+ UINT64_C( 0x000FFFFFFFFFFFBF ),
+ UINT64_C( 0x000FFFFFFFFFFF7F ),
+ UINT64_C( 0x000FFFFFFFFFFEFF ),
+ UINT64_C( 0x000FFFFFFFFFFDFF ),
+ UINT64_C( 0x000FFFFFFFFFFBFF ),
+ UINT64_C( 0x000FFFFFFFFFF7FF ),
+ UINT64_C( 0x000FFFFFFFFFEFFF ),
+ UINT64_C( 0x000FFFFFFFFFDFFF ),
+ UINT64_C( 0x000FFFFFFFFFBFFF ),
+ UINT64_C( 0x000FFFFFFFFF7FFF ),
+ UINT64_C( 0x000FFFFFFFFEFFFF ),
+ UINT64_C( 0x000FFFFFFFFDFFFF ),
+ UINT64_C( 0x000FFFFFFFFBFFFF ),
+ UINT64_C( 0x000FFFFFFFF7FFFF ),
+ UINT64_C( 0x000FFFFFFFEFFFFF ),
+ UINT64_C( 0x000FFFFFFFDFFFFF ),
+ UINT64_C( 0x000FFFFFFFBFFFFF ),
+ UINT64_C( 0x000FFFFFFF7FFFFF ),
+ UINT64_C( 0x000FFFFFFEFFFFFF ),
+ UINT64_C( 0x000FFFFFFDFFFFFF ),
+ UINT64_C( 0x000FFFFFFBFFFFFF ),
+ UINT64_C( 0x000FFFFFF7FFFFFF ),
+ UINT64_C( 0x000FFFFFEFFFFFFF ),
+ UINT64_C( 0x000FFFFFDFFFFFFF ),
+ UINT64_C( 0x000FFFFFBFFFFFFF ),
+ UINT64_C( 0x000FFFFF7FFFFFFF ),
+ UINT64_C( 0x000FFFFEFFFFFFFF ),
+ UINT64_C( 0x000FFFFDFFFFFFFF ),
+ UINT64_C( 0x000FFFFBFFFFFFFF ),
+ UINT64_C( 0x000FFFF7FFFFFFFF ),
+ UINT64_C( 0x000FFFEFFFFFFFFF ),
+ UINT64_C( 0x000FFFDFFFFFFFFF ),
+ UINT64_C( 0x000FFFBFFFFFFFFF ),
+ UINT64_C( 0x000FFF7FFFFFFFFF ),
+ UINT64_C( 0x000FFEFFFFFFFFFF ),
+ UINT64_C( 0x000FFDFFFFFFFFFF ),
+ UINT64_C( 0x000FFBFFFFFFFFFF ),
+ UINT64_C( 0x000FF7FFFFFFFFFF ),
+ UINT64_C( 0x000FEFFFFFFFFFFF ),
+ UINT64_C( 0x000FDFFFFFFFFFFF ),
+ UINT64_C( 0x000FBFFFFFFFFFFF ),
+ UINT64_C( 0x000F7FFFFFFFFFFF ),
+ UINT64_C( 0x000EFFFFFFFFFFFF ),
+ UINT64_C( 0x000DFFFFFFFFFFFF ),
+ UINT64_C( 0x000BFFFFFFFFFFFF ),
+ UINT64_C( 0x0007FFFFFFFFFFFF ),
+ UINT64_C( 0x0003FFFFFFFFFFFF ),
+ UINT64_C( 0x0001FFFFFFFFFFFF ),
+ UINT64_C( 0x0000FFFFFFFFFFFF ),
+ UINT64_C( 0x00007FFFFFFFFFFF ),
+ UINT64_C( 0x00003FFFFFFFFFFF ),
+ UINT64_C( 0x00001FFFFFFFFFFF ),
+ UINT64_C( 0x00000FFFFFFFFFFF ),
+ UINT64_C( 0x000007FFFFFFFFFF ),
+ UINT64_C( 0x000003FFFFFFFFFF ),
+ UINT64_C( 0x000001FFFFFFFFFF ),
+ UINT64_C( 0x000000FFFFFFFFFF ),
+ UINT64_C( 0x0000007FFFFFFFFF ),
+ UINT64_C( 0x0000003FFFFFFFFF ),
+ UINT64_C( 0x0000001FFFFFFFFF ),
+ UINT64_C( 0x0000000FFFFFFFFF ),
+ UINT64_C( 0x00000007FFFFFFFF ),
+ UINT64_C( 0x00000003FFFFFFFF ),
+ UINT64_C( 0x00000001FFFFFFFF ),
+ UINT64_C( 0x00000000FFFFFFFF ),
+ UINT64_C( 0x000000007FFFFFFF ),
+ UINT64_C( 0x000000003FFFFFFF ),
+ UINT64_C( 0x000000001FFFFFFF ),
+ UINT64_C( 0x000000000FFFFFFF ),
+ UINT64_C( 0x0000000007FFFFFF ),
+ UINT64_C( 0x0000000003FFFFFF ),
+ UINT64_C( 0x0000000001FFFFFF ),
+ UINT64_C( 0x0000000000FFFFFF ),
+ UINT64_C( 0x00000000007FFFFF ),
+ UINT64_C( 0x00000000003FFFFF ),
+ UINT64_C( 0x00000000001FFFFF ),
+ UINT64_C( 0x00000000000FFFFF ),
+ UINT64_C( 0x000000000007FFFF ),
+ UINT64_C( 0x000000000003FFFF ),
+ UINT64_C( 0x000000000001FFFF ),
+ UINT64_C( 0x000000000000FFFF ),
+ UINT64_C( 0x0000000000007FFF ),
+ UINT64_C( 0x0000000000003FFF ),
+ UINT64_C( 0x0000000000001FFF ),
+ UINT64_C( 0x0000000000000FFF ),
+ UINT64_C( 0x00000000000007FF ),
+ UINT64_C( 0x00000000000003FF ),
+ UINT64_C( 0x00000000000001FF ),
+ UINT64_C( 0x00000000000000FF ),
+ UINT64_C( 0x000000000000007F ),
+ UINT64_C( 0x000000000000003F ),
+ UINT64_C( 0x000000000000001F ),
+ UINT64_C( 0x000000000000000F ),
+ UINT64_C( 0x0000000000000007 ),
+ UINT64_C( 0x0000000000000003 )
+};
+
+static const uint_fast64_t f64NumQInP1 = f64NumQIn * f64NumP1;
+static const uint_fast64_t f64NumQOutP1 = f64NumQOut * f64NumP1;
+
+static float64_t f64NextQInP1( struct sequence *sequencePtr )
+{
+ int expNum, sigNum;
+ union ui64_f64 uZ;
+
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uZ.ui = f64QIn[expNum] | f64P1[sigNum];
+ ++sigNum;
+ if ( f64NumP1 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f64NumQIn <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+ return uZ.f;
+
+}
+
+static float64_t f64NextQOutP1( struct sequence *sequencePtr )
+{
+ int expNum, sigNum;
+ union ui64_f64 uZ;
+
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uZ.ui = f64QOut[expNum] | f64P1[sigNum];
+ ++sigNum;
+ if ( f64NumP1 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f64NumQOut <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+ return uZ.f;
+
+}
+
+static const uint_fast64_t f64NumQInP2 = f64NumQIn * f64NumP2;
+static const uint_fast64_t f64NumQOutP2 = f64NumQOut * f64NumP2;
+
+static float64_t f64NextQInP2( struct sequence *sequencePtr )
+{
+ int expNum, sigNum;
+ union ui64_f64 uZ;
+
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uZ.ui = f64QIn[expNum] | f64P2[sigNum];
+ ++sigNum;
+ if ( f64NumP2 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f64NumQIn <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+ return uZ.f;
+
+}
+
+static float64_t f64NextQOutP2( struct sequence *sequencePtr )
+{
+ int expNum, sigNum;
+ union ui64_f64 uZ;
+
+ expNum = sequencePtr->expNum;
+ sigNum = sequencePtr->term1Num;
+ uZ.ui = f64QOut[expNum] | f64P2[sigNum];
+ ++sigNum;
+ if ( f64NumP2 <= sigNum ) {
+ sigNum = 0;
+ ++expNum;
+ if ( f64NumQOut <= expNum ) {
+ expNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->expNum = expNum;
+ }
+ sequencePtr->term1Num = sigNum;
+ return uZ.f;
+
+}
+
+static float64_t f64RandomQOutP3( void )
+{
+ union ui64_f64 uZ;
+
+ uZ.ui =
+ f64QOut[randomN_ui8( f64NumQOut )]
+ | ((f64P2[randomN_ui8( f64NumP2 )] + f64P2[randomN_ui8( f64NumP2 )])
+ & UINT64_C( 0x000FFFFFFFFFFFFF ));
+ return uZ.f;
+
+}
+
+static float64_t f64RandomQOutPInf( void )
+{
+ union ui64_f64 uZ;
+
+ uZ.ui =
+ f64QOut[randomN_ui8( f64NumQOut )]
+ | (random_ui64() & UINT64_C( 0x000FFFFFFFFFFFFF ));
+ return uZ.f;
+
+}
+
+enum { f64NumQInfWeightMasks = 10 };
+static const uint64_t f64QInfWeightMasks[f64NumQInfWeightMasks] = {
+ UINT64_C( 0xFFF0000000000000 ),
+ UINT64_C( 0xFFF0000000000000 ),
+ UINT64_C( 0xBFF0000000000000 ),
+ UINT64_C( 0x9FF0000000000000 ),
+ UINT64_C( 0x8FF0000000000000 ),
+ UINT64_C( 0x87F0000000000000 ),
+ UINT64_C( 0x83F0000000000000 ),
+ UINT64_C( 0x81F0000000000000 ),
+ UINT64_C( 0x80F0000000000000 ),
+ UINT64_C( 0x8070000000000000 )
+};
+static const uint64_t f64QInfWeightOffsets[f64NumQInfWeightMasks] = {
+ UINT64_C( 0x0000000000000000 ),
+ UINT64_C( 0x0000000000000000 ),
+ UINT64_C( 0x2000000000000000 ),
+ UINT64_C( 0x3000000000000000 ),
+ UINT64_C( 0x3800000000000000 ),
+ UINT64_C( 0x3C00000000000000 ),
+ UINT64_C( 0x3E00000000000000 ),
+ UINT64_C( 0x3F00000000000000 ),
+ UINT64_C( 0x3F80000000000000 ),
+ UINT64_C( 0x3FC0000000000000 )
+};
+
+static float64_t f64RandomQInfP3( void )
+{
+ int weightMaskNum;
+ union ui64_f64 uZ;
+
+ weightMaskNum = randomN_ui8( f64NumQInfWeightMasks );
+ uZ.ui =
+ (((uint_fast64_t) random_ui16()<<48
+ & f64QInfWeightMasks[weightMaskNum])
+ + f64QInfWeightOffsets[weightMaskNum])
+ | ((f64P2[randomN_ui8( f64NumP2 )] + f64P2[randomN_ui8( f64NumP2 )])
+ & UINT64_C( 0x000FFFFFFFFFFFFF ));
+ return uZ.f;
+
+}
+
+static float64_t f64RandomQInfPInf( void )
+{
+ int weightMaskNum;
+ union ui64_f64 uZ;
+
+ weightMaskNum = randomN_ui8( f64NumQInfWeightMasks );
+ uZ.ui =
+ (random_ui64()
+ & (f64QInfWeightMasks[weightMaskNum]
+ | UINT64_C( 0x000FFFFFFFFFFFFF )))
+ + f64QInfWeightOffsets[weightMaskNum];
+ return uZ.f;
+
+}
+
+static float64_t f64Random( void )
+{
+
+ switch ( random_ui8() & 7 ) {
+ case 0:
+ case 1:
+ case 2:
+ return f64RandomQOutP3();
+ case 3:
+ return f64RandomQOutPInf();
+ case 4:
+ case 5:
+ case 6:
+ return f64RandomQInfP3();
+ case 7:
+ return f64RandomQInfPInf();
+ }
+
+}
+
+static struct sequence sequenceA, sequenceB, sequenceC;
+static float64_t currentA, currentB, currentC;
+static int subcase;
+
+float64_t genCases_f64_a, genCases_f64_b, genCases_f64_c;
+
+void genCases_f64_a_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ subcase = 0;
+ genCases_total =
+ (genCases_level == 1) ? 3 * f64NumQOutP1 : 2 * f64NumQOutP2;
+ genCases_done = false;
+
+}
+
+void genCases_f64_a_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ case 1:
+ genCases_f64_a = f64Random();
+ break;
+ case 2:
+ genCases_f64_a = f64NextQOutP1( &sequenceA );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_f64_a = f64Random();
+ break;
+ case 1:
+ genCases_f64_a = f64NextQOutP2( &sequenceA );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+void genCases_f64_ab_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ sequenceB.expNum = 0;
+ sequenceB.term1Num = 0;
+ sequenceB.term2Num = 0;
+ sequenceB.done = false;
+ subcase = 0;
+ if ( genCases_level == 1 ) {
+ genCases_total = 6 * f64NumQInP1 * f64NumQInP1;
+ currentA = f64NextQInP1( &sequenceA );
+ } else {
+ genCases_total = 2 * f64NumQInP2 * f64NumQInP2;
+ currentA = f64NextQInP2( &sequenceA );
+ }
+ genCases_done = false;
+
+}
+
+void genCases_f64_ab_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ currentA = f64NextQInP1( &sequenceA );
+ }
+ currentB = f64NextQInP1( &sequenceB );
+ case 2:
+ case 4:
+ genCases_f64_a = f64Random();
+ genCases_f64_b = f64Random();
+ break;
+ case 1:
+ genCases_f64_a = currentA;
+ genCases_f64_b = f64Random();
+ break;
+ case 3:
+ genCases_f64_a = f64Random();
+ genCases_f64_b = currentB;
+ break;
+ case 5:
+ genCases_f64_a = currentA;
+ genCases_f64_b = currentB;
+ genCases_done = sequenceA.done & sequenceB.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_f64_a = f64Random();
+ genCases_f64_b = f64Random();
+ break;
+ case 1:
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ currentA = f64NextQInP2( &sequenceA );
+ }
+ genCases_f64_a = currentA;
+ genCases_f64_b = f64NextQInP2( &sequenceB );
+ genCases_done = sequenceA.done & sequenceB.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+void genCases_f64_abc_init( void )
+{
+
+ sequenceA.expNum = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ sequenceB.expNum = 0;
+ sequenceB.term1Num = 0;
+ sequenceB.term2Num = 0;
+ sequenceB.done = false;
+ sequenceC.expNum = 0;
+ sequenceC.term1Num = 0;
+ sequenceC.term2Num = 0;
+ sequenceC.done = false;
+ subcase = 0;
+ if ( genCases_level == 1 ) {
+ genCases_total = 9 * f64NumQInP1 * f64NumQInP1 * f64NumQInP1;
+ currentA = f64NextQInP1( &sequenceA );
+ currentB = f64NextQInP1( &sequenceB );
+ } else {
+ genCases_total = 2 * f64NumQInP2 * f64NumQInP2 * f64NumQInP2;
+ currentA = f64NextQInP2( &sequenceA );
+ currentB = f64NextQInP2( &sequenceB );
+ }
+ genCases_done = false;
+
+}
+
+void genCases_f64_abc_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ if ( sequenceC.done ) {
+ sequenceC.done = false;
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ currentA = f64NextQInP1( &sequenceA );
+ }
+ currentB = f64NextQInP1( &sequenceB );
+ }
+ currentC = f64NextQInP1( &sequenceC );
+ genCases_f64_a = f64Random();
+ genCases_f64_b = f64Random();
+ genCases_f64_c = currentC;
+ break;
+ case 1:
+ genCases_f64_a = currentA;
+ genCases_f64_b = currentB;
+ genCases_f64_c = f64Random();
+ break;
+ case 2:
+ genCases_f64_a = f64Random();
+ genCases_f64_b = f64Random();
+ genCases_f64_c = f64Random();
+ break;
+ case 3:
+ genCases_f64_a = f64Random();
+ genCases_f64_b = currentB;
+ genCases_f64_c = currentC;
+ break;
+ case 4:
+ genCases_f64_a = currentA;
+ genCases_f64_b = f64Random();
+ genCases_f64_c = f64Random();
+ break;
+ case 5:
+ genCases_f64_a = f64Random();
+ genCases_f64_b = currentB;
+ genCases_f64_c = f64Random();
+ break;
+ case 6:
+ genCases_f64_a = currentA;
+ genCases_f64_b = f64Random();
+ genCases_f64_c = currentC;
+ break;
+ case 7:
+ genCases_f64_a = f64Random();
+ genCases_f64_b = f64Random();
+ genCases_f64_c = f64Random();
+ break;
+ case 8:
+ genCases_f64_a = currentA;
+ genCases_f64_b = currentB;
+ genCases_f64_c = currentC;
+ genCases_done = sequenceA.done & sequenceB.done & sequenceC.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_f64_a = f64Random();
+ genCases_f64_b = f64Random();
+ genCases_f64_c = f64Random();
+ break;
+ case 1:
+ if ( sequenceC.done ) {
+ sequenceC.done = false;
+ if ( sequenceB.done ) {
+ sequenceB.done = false;
+ currentA = f64NextQInP2( &sequenceA );
+ }
+ currentB = f64NextQInP2( &sequenceB );
+ }
+ genCases_f64_a = currentA;
+ genCases_f64_b = currentB;
+ genCases_f64_c = f64NextQInP2( &sequenceC );
+ genCases_done = sequenceA.done & sequenceB.done & sequenceC.done;
+ subcase = -1;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genCases_i32.c b/src/libs/softfloat-3e/testfloat/source/genCases_i32.c
new file mode 100644
index 00000000..94c4db02
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genCases_i32.c
@@ -0,0 +1,362 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "random.h"
+#include "genCases.h"
+
+struct sequence {
+ int term1Num, term2Num;
+ bool done;
+};
+
+union ui32_i32 { uint32_t ui; int32_t i; };
+
+enum { i32NumP1 = 124 };
+static const uint32_t i32P1[i32NumP1] = {
+ 0x00000000,
+ 0x00000001,
+ 0x00000002,
+ 0x00000004,
+ 0x00000008,
+ 0x00000010,
+ 0x00000020,
+ 0x00000040,
+ 0x00000080,
+ 0x00000100,
+ 0x00000200,
+ 0x00000400,
+ 0x00000800,
+ 0x00001000,
+ 0x00002000,
+ 0x00004000,
+ 0x00008000,
+ 0x00010000,
+ 0x00020000,
+ 0x00040000,
+ 0x00080000,
+ 0x00100000,
+ 0x00200000,
+ 0x00400000,
+ 0x00800000,
+ 0x01000000,
+ 0x02000000,
+ 0x04000000,
+ 0x08000000,
+ 0x10000000,
+ 0x20000000,
+ 0x40000000,
+ 0x80000000,
+ 0xC0000000,
+ 0xE0000000,
+ 0xF0000000,
+ 0xF8000000,
+ 0xFC000000,
+ 0xFE000000,
+ 0xFF000000,
+ 0xFF800000,
+ 0xFFC00000,
+ 0xFFE00000,
+ 0xFFF00000,
+ 0xFFF80000,
+ 0xFFFC0000,
+ 0xFFFE0000,
+ 0xFFFF0000,
+ 0xFFFF8000,
+ 0xFFFFC000,
+ 0xFFFFE000,
+ 0xFFFFF000,
+ 0xFFFFF800,
+ 0xFFFFFC00,
+ 0xFFFFFE00,
+ 0xFFFFFF00,
+ 0xFFFFFF80,
+ 0xFFFFFFC0,
+ 0xFFFFFFE0,
+ 0xFFFFFFF0,
+ 0xFFFFFFF8,
+ 0xFFFFFFFC,
+ 0xFFFFFFFE,
+ 0xFFFFFFFF,
+ 0xFFFFFFFD,
+ 0xFFFFFFFB,
+ 0xFFFFFFF7,
+ 0xFFFFFFEF,
+ 0xFFFFFFDF,
+ 0xFFFFFFBF,
+ 0xFFFFFF7F,
+ 0xFFFFFEFF,
+ 0xFFFFFDFF,
+ 0xFFFFFBFF,
+ 0xFFFFF7FF,
+ 0xFFFFEFFF,
+ 0xFFFFDFFF,
+ 0xFFFFBFFF,
+ 0xFFFF7FFF,
+ 0xFFFEFFFF,
+ 0xFFFDFFFF,
+ 0xFFFBFFFF,
+ 0xFFF7FFFF,
+ 0xFFEFFFFF,
+ 0xFFDFFFFF,
+ 0xFFBFFFFF,
+ 0xFF7FFFFF,
+ 0xFEFFFFFF,
+ 0xFDFFFFFF,
+ 0xFBFFFFFF,
+ 0xF7FFFFFF,
+ 0xEFFFFFFF,
+ 0xDFFFFFFF,
+ 0xBFFFFFFF,
+ 0x7FFFFFFF,
+ 0x3FFFFFFF,
+ 0x1FFFFFFF,
+ 0x0FFFFFFF,
+ 0x07FFFFFF,
+ 0x03FFFFFF,
+ 0x01FFFFFF,
+ 0x00FFFFFF,
+ 0x007FFFFF,
+ 0x003FFFFF,
+ 0x001FFFFF,
+ 0x000FFFFF,
+ 0x0007FFFF,
+ 0x0003FFFF,
+ 0x0001FFFF,
+ 0x0000FFFF,
+ 0x00007FFF,
+ 0x00003FFF,
+ 0x00001FFF,
+ 0x00000FFF,
+ 0x000007FF,
+ 0x000003FF,
+ 0x000001FF,
+ 0x000000FF,
+ 0x0000007F,
+ 0x0000003F,
+ 0x0000001F,
+ 0x0000000F,
+ 0x00000007,
+ 0x00000003
+};
+
+static int32_t i32NextP1( struct sequence *sequencePtr )
+{
+ int termNum;
+ union ui32_i32 uZ;
+
+ termNum = sequencePtr->term1Num;
+ uZ.ui = i32P1[termNum];
+ ++termNum;
+ if ( i32NumP1 <= termNum ) {
+ termNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->term1Num = termNum;
+ return uZ.i;
+
+}
+
+static const int_fast32_t i32NumP2 = (i32NumP1 * i32NumP1 + i32NumP1) / 2;
+
+static int32_t i32NextP2( struct sequence *sequencePtr )
+{
+ int term1Num, term2Num;
+ union ui32_i32 uZ;
+
+ term2Num = sequencePtr->term2Num;
+ term1Num = sequencePtr->term1Num;
+ uZ.ui = i32P1[term1Num] + i32P1[term2Num];
+ ++term2Num;
+ if ( i32NumP1 <= term2Num ) {
+ ++term1Num;
+ if ( i32NumP1 <= term1Num ) {
+ term1Num = 0;
+ sequencePtr->done = true;
+ }
+ term2Num = term1Num;
+ sequencePtr->term1Num = term1Num;
+ }
+ sequencePtr->term2Num = term2Num;
+ return uZ.i;
+
+}
+
+static int32_t i32RandomP3( void )
+{
+ union ui32_i32 uZ;
+
+ uZ.ui =
+ i32P1[randomN_ui8( i32NumP1 )] + i32P1[randomN_ui8( i32NumP1 )]
+ + i32P1[randomN_ui8( i32NumP1 )];
+ return uZ.i;
+
+}
+
+enum { i32NumPInfWeightMasks = 29 };
+static const uint32_t i32PInfWeightMasks[i32NumPInfWeightMasks] = {
+ 0xFFFFFFFF,
+ 0x7FFFFFFF,
+ 0x3FFFFFFF,
+ 0x1FFFFFFF,
+ 0x0FFFFFFF,
+ 0x07FFFFFF,
+ 0x03FFFFFF,
+ 0x01FFFFFF,
+ 0x00FFFFFF,
+ 0x007FFFFF,
+ 0x003FFFFF,
+ 0x001FFFFF,
+ 0x000FFFFF,
+ 0x0007FFFF,
+ 0x0003FFFF,
+ 0x0001FFFF,
+ 0x0000FFFF,
+ 0x00007FFF,
+ 0x00003FFF,
+ 0x00001FFF,
+ 0x00000FFF,
+ 0x000007FF,
+ 0x000003FF,
+ 0x000001FF,
+ 0x000000FF,
+ 0x0000007F,
+ 0x0000003F,
+ 0x0000001F,
+ 0x0000000F
+};
+static const uint32_t i32PInfWeightOffsets[i32NumPInfWeightMasks] = {
+ 0x00000000,
+ 0xC0000000,
+ 0xE0000000,
+ 0xF0000000,
+ 0xF8000000,
+ 0xFC000000,
+ 0xFE000000,
+ 0xFF000000,
+ 0xFF800000,
+ 0xFFC00000,
+ 0xFFE00000,
+ 0xFFF00000,
+ 0xFFF80000,
+ 0xFFFC0000,
+ 0xFFFE0000,
+ 0xFFFF0000,
+ 0xFFFF8000,
+ 0xFFFFC000,
+ 0xFFFFE000,
+ 0xFFFFF000,
+ 0xFFFFF800,
+ 0xFFFFFC00,
+ 0xFFFFFE00,
+ 0xFFFFFF00,
+ 0xFFFFFF80,
+ 0xFFFFFFC0,
+ 0xFFFFFFE0,
+ 0xFFFFFFF0,
+ 0xFFFFFFF8
+};
+
+static int32_t i32RandomPInf( void )
+{
+ int weightMaskNum;
+ union ui32_i32 uZ;
+
+ weightMaskNum = randomN_ui8( i32NumPInfWeightMasks );
+ uZ.ui =
+ (random_ui32() & i32PInfWeightMasks[weightMaskNum])
+ + i32PInfWeightOffsets[weightMaskNum];
+ return uZ.i;
+
+}
+
+static struct sequence sequenceA;
+static int subcase;
+
+int32_t genCases_i32_a;
+
+void genCases_i32_a_init( void )
+{
+
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ subcase = 0;
+ genCases_total = (genCases_level == 1) ? 3 * i32NumP1 : 2 * i32NumP2;
+ genCases_done = false;
+
+}
+
+void genCases_i32_a_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ genCases_i32_a = i32RandomP3();
+ break;
+ case 1:
+ genCases_i32_a = i32RandomPInf();
+ break;
+ case 2:
+ genCases_i32_a = i32NextP1( &sequenceA );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_i32_a = i32RandomP3();
+ break;
+ case 2:
+ genCases_i32_a = i32RandomPInf();
+ break;
+ case 3:
+ subcase = -1;
+ case 1:
+ genCases_i32_a = i32NextP2( &sequenceA );
+ genCases_done = sequenceA.done;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genCases_i64.c b/src/libs/softfloat-3e/testfloat/source/genCases_i64.c
new file mode 100644
index 00000000..10f0716a
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genCases_i64.c
@@ -0,0 +1,554 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "random.h"
+#include "genCases.h"
+
+struct sequence {
+ int term1Num, term2Num;
+ bool done;
+};
+
+union ui64_i64 { uint64_t ui; int64_t i; };
+
+enum { i64NumP1 = 252 };
+static const uint64_t i64P1[i64NumP1] = {
+ UINT64_C( 0x0000000000000000 ),
+ UINT64_C( 0x0000000000000001 ),
+ UINT64_C( 0x0000000000000002 ),
+ UINT64_C( 0x0000000000000004 ),
+ UINT64_C( 0x0000000000000008 ),
+ UINT64_C( 0x0000000000000010 ),
+ UINT64_C( 0x0000000000000020 ),
+ UINT64_C( 0x0000000000000040 ),
+ UINT64_C( 0x0000000000000080 ),
+ UINT64_C( 0x0000000000000100 ),
+ UINT64_C( 0x0000000000000200 ),
+ UINT64_C( 0x0000000000000400 ),
+ UINT64_C( 0x0000000000000800 ),
+ UINT64_C( 0x0000000000001000 ),
+ UINT64_C( 0x0000000000002000 ),
+ UINT64_C( 0x0000000000004000 ),
+ UINT64_C( 0x0000000000008000 ),
+ UINT64_C( 0x0000000000010000 ),
+ UINT64_C( 0x0000000000020000 ),
+ UINT64_C( 0x0000000000040000 ),
+ UINT64_C( 0x0000000000080000 ),
+ UINT64_C( 0x0000000000100000 ),
+ UINT64_C( 0x0000000000200000 ),
+ UINT64_C( 0x0000000000400000 ),
+ UINT64_C( 0x0000000000800000 ),
+ UINT64_C( 0x0000000001000000 ),
+ UINT64_C( 0x0000000002000000 ),
+ UINT64_C( 0x0000000004000000 ),
+ UINT64_C( 0x0000000008000000 ),
+ UINT64_C( 0x0000000010000000 ),
+ UINT64_C( 0x0000000020000000 ),
+ UINT64_C( 0x0000000040000000 ),
+ UINT64_C( 0x0000000080000000 ),
+ UINT64_C( 0x0000000100000000 ),
+ UINT64_C( 0x0000000200000000 ),
+ UINT64_C( 0x0000000400000000 ),
+ UINT64_C( 0x0000000800000000 ),
+ UINT64_C( 0x0000001000000000 ),
+ UINT64_C( 0x0000002000000000 ),
+ UINT64_C( 0x0000004000000000 ),
+ UINT64_C( 0x0000008000000000 ),
+ UINT64_C( 0x0000010000000000 ),
+ UINT64_C( 0x0000020000000000 ),
+ UINT64_C( 0x0000040000000000 ),
+ UINT64_C( 0x0000080000000000 ),
+ UINT64_C( 0x0000100000000000 ),
+ UINT64_C( 0x0000200000000000 ),
+ UINT64_C( 0x0000400000000000 ),
+ UINT64_C( 0x0000800000000000 ),
+ UINT64_C( 0x0001000000000000 ),
+ UINT64_C( 0x0002000000000000 ),
+ UINT64_C( 0x0004000000000000 ),
+ UINT64_C( 0x0008000000000000 ),
+ UINT64_C( 0x0010000000000000 ),
+ UINT64_C( 0x0020000000000000 ),
+ UINT64_C( 0x0040000000000000 ),
+ UINT64_C( 0x0080000000000000 ),
+ UINT64_C( 0x0100000000000000 ),
+ UINT64_C( 0x0200000000000000 ),
+ UINT64_C( 0x0400000000000000 ),
+ UINT64_C( 0x0800000000000000 ),
+ UINT64_C( 0x1000000000000000 ),
+ UINT64_C( 0x2000000000000000 ),
+ UINT64_C( 0x4000000000000000 ),
+ UINT64_C( 0x8000000000000000 ),
+ UINT64_C( 0xC000000000000000 ),
+ UINT64_C( 0xE000000000000000 ),
+ UINT64_C( 0xF000000000000000 ),
+ UINT64_C( 0xF800000000000000 ),
+ UINT64_C( 0xFC00000000000000 ),
+ UINT64_C( 0xFE00000000000000 ),
+ UINT64_C( 0xFF00000000000000 ),
+ UINT64_C( 0xFF80000000000000 ),
+ UINT64_C( 0xFFC0000000000000 ),
+ UINT64_C( 0xFFE0000000000000 ),
+ UINT64_C( 0xFFF0000000000000 ),
+ UINT64_C( 0xFFF8000000000000 ),
+ UINT64_C( 0xFFFC000000000000 ),
+ UINT64_C( 0xFFFE000000000000 ),
+ UINT64_C( 0xFFFF000000000000 ),
+ UINT64_C( 0xFFFF800000000000 ),
+ UINT64_C( 0xFFFFC00000000000 ),
+ UINT64_C( 0xFFFFE00000000000 ),
+ UINT64_C( 0xFFFFF00000000000 ),
+ UINT64_C( 0xFFFFF80000000000 ),
+ UINT64_C( 0xFFFFFC0000000000 ),
+ UINT64_C( 0xFFFFFE0000000000 ),
+ UINT64_C( 0xFFFFFF0000000000 ),
+ UINT64_C( 0xFFFFFF8000000000 ),
+ UINT64_C( 0xFFFFFFC000000000 ),
+ UINT64_C( 0xFFFFFFE000000000 ),
+ UINT64_C( 0xFFFFFFF000000000 ),
+ UINT64_C( 0xFFFFFFF800000000 ),
+ UINT64_C( 0xFFFFFFFC00000000 ),
+ UINT64_C( 0xFFFFFFFE00000000 ),
+ UINT64_C( 0xFFFFFFFF00000000 ),
+ UINT64_C( 0xFFFFFFFF80000000 ),
+ UINT64_C( 0xFFFFFFFFC0000000 ),
+ UINT64_C( 0xFFFFFFFFE0000000 ),
+ UINT64_C( 0xFFFFFFFFF0000000 ),
+ UINT64_C( 0xFFFFFFFFF8000000 ),
+ UINT64_C( 0xFFFFFFFFFC000000 ),
+ UINT64_C( 0xFFFFFFFFFE000000 ),
+ UINT64_C( 0xFFFFFFFFFF000000 ),
+ UINT64_C( 0xFFFFFFFFFF800000 ),
+ UINT64_C( 0xFFFFFFFFFFC00000 ),
+ UINT64_C( 0xFFFFFFFFFFE00000 ),
+ UINT64_C( 0xFFFFFFFFFFF00000 ),
+ UINT64_C( 0xFFFFFFFFFFF80000 ),
+ UINT64_C( 0xFFFFFFFFFFFC0000 ),
+ UINT64_C( 0xFFFFFFFFFFFE0000 ),
+ UINT64_C( 0xFFFFFFFFFFFF0000 ),
+ UINT64_C( 0xFFFFFFFFFFFF8000 ),
+ UINT64_C( 0xFFFFFFFFFFFFC000 ),
+ UINT64_C( 0xFFFFFFFFFFFFE000 ),
+ UINT64_C( 0xFFFFFFFFFFFFF000 ),
+ UINT64_C( 0xFFFFFFFFFFFFF800 ),
+ UINT64_C( 0xFFFFFFFFFFFFFC00 ),
+ UINT64_C( 0xFFFFFFFFFFFFFE00 ),
+ UINT64_C( 0xFFFFFFFFFFFFFF00 ),
+ UINT64_C( 0xFFFFFFFFFFFFFF80 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFC0 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFE0 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFF0 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFF8 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFFC ),
+ UINT64_C( 0xFFFFFFFFFFFFFFFE ),
+ UINT64_C( 0xFFFFFFFFFFFFFFFF ),
+ UINT64_C( 0xFFFFFFFFFFFFFFFD ),
+ UINT64_C( 0xFFFFFFFFFFFFFFFB ),
+ UINT64_C( 0xFFFFFFFFFFFFFFF7 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFEF ),
+ UINT64_C( 0xFFFFFFFFFFFFFFDF ),
+ UINT64_C( 0xFFFFFFFFFFFFFFBF ),
+ UINT64_C( 0xFFFFFFFFFFFFFF7F ),
+ UINT64_C( 0xFFFFFFFFFFFFFEFF ),
+ UINT64_C( 0xFFFFFFFFFFFFFDFF ),
+ UINT64_C( 0xFFFFFFFFFFFFFBFF ),
+ UINT64_C( 0xFFFFFFFFFFFFF7FF ),
+ UINT64_C( 0xFFFFFFFFFFFFEFFF ),
+ UINT64_C( 0xFFFFFFFFFFFFDFFF ),
+ UINT64_C( 0xFFFFFFFFFFFFBFFF ),
+ UINT64_C( 0xFFFFFFFFFFFF7FFF ),
+ UINT64_C( 0xFFFFFFFFFFFEFFFF ),
+ UINT64_C( 0xFFFFFFFFFFFDFFFF ),
+ UINT64_C( 0xFFFFFFFFFFFBFFFF ),
+ UINT64_C( 0xFFFFFFFFFFF7FFFF ),
+ UINT64_C( 0xFFFFFFFFFFEFFFFF ),
+ UINT64_C( 0xFFFFFFFFFFDFFFFF ),
+ UINT64_C( 0xFFFFFFFFFFBFFFFF ),
+ UINT64_C( 0xFFFFFFFFFF7FFFFF ),
+ UINT64_C( 0xFFFFFFFFFEFFFFFF ),
+ UINT64_C( 0xFFFFFFFFFDFFFFFF ),
+ UINT64_C( 0xFFFFFFFFFBFFFFFF ),
+ UINT64_C( 0xFFFFFFFFF7FFFFFF ),
+ UINT64_C( 0xFFFFFFFFEFFFFFFF ),
+ UINT64_C( 0xFFFFFFFFDFFFFFFF ),
+ UINT64_C( 0xFFFFFFFFBFFFFFFF ),
+ UINT64_C( 0xFFFFFFFF7FFFFFFF ),
+ UINT64_C( 0xFFFFFFFEFFFFFFFF ),
+ UINT64_C( 0xFFFFFFFDFFFFFFFF ),
+ UINT64_C( 0xFFFFFFFBFFFFFFFF ),
+ UINT64_C( 0xFFFFFFF7FFFFFFFF ),
+ UINT64_C( 0xFFFFFFEFFFFFFFFF ),
+ UINT64_C( 0xFFFFFFDFFFFFFFFF ),
+ UINT64_C( 0xFFFFFFBFFFFFFFFF ),
+ UINT64_C( 0xFFFFFF7FFFFFFFFF ),
+ UINT64_C( 0xFFFFFEFFFFFFFFFF ),
+ UINT64_C( 0xFFFFFDFFFFFFFFFF ),
+ UINT64_C( 0xFFFFFBFFFFFFFFFF ),
+ UINT64_C( 0xFFFFF7FFFFFFFFFF ),
+ UINT64_C( 0xFFFFEFFFFFFFFFFF ),
+ UINT64_C( 0xFFFFDFFFFFFFFFFF ),
+ UINT64_C( 0xFFFFBFFFFFFFFFFF ),
+ UINT64_C( 0xFFFF7FFFFFFFFFFF ),
+ UINT64_C( 0xFFFEFFFFFFFFFFFF ),
+ UINT64_C( 0xFFFDFFFFFFFFFFFF ),
+ UINT64_C( 0xFFFBFFFFFFFFFFFF ),
+ UINT64_C( 0xFFF7FFFFFFFFFFFF ),
+ UINT64_C( 0xFFEFFFFFFFFFFFFF ),
+ UINT64_C( 0xFFDFFFFFFFFFFFFF ),
+ UINT64_C( 0xFFBFFFFFFFFFFFFF ),
+ UINT64_C( 0xFF7FFFFFFFFFFFFF ),
+ UINT64_C( 0xFEFFFFFFFFFFFFFF ),
+ UINT64_C( 0xFDFFFFFFFFFFFFFF ),
+ UINT64_C( 0xFBFFFFFFFFFFFFFF ),
+ UINT64_C( 0xF7FFFFFFFFFFFFFF ),
+ UINT64_C( 0xEFFFFFFFFFFFFFFF ),
+ UINT64_C( 0xDFFFFFFFFFFFFFFF ),
+ UINT64_C( 0xBFFFFFFFFFFFFFFF ),
+ UINT64_C( 0x7FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x3FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x1FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x0FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x07FFFFFFFFFFFFFF ),
+ UINT64_C( 0x03FFFFFFFFFFFFFF ),
+ UINT64_C( 0x01FFFFFFFFFFFFFF ),
+ UINT64_C( 0x00FFFFFFFFFFFFFF ),
+ UINT64_C( 0x007FFFFFFFFFFFFF ),
+ UINT64_C( 0x003FFFFFFFFFFFFF ),
+ UINT64_C( 0x001FFFFFFFFFFFFF ),
+ UINT64_C( 0x000FFFFFFFFFFFFF ),
+ UINT64_C( 0x0007FFFFFFFFFFFF ),
+ UINT64_C( 0x0003FFFFFFFFFFFF ),
+ UINT64_C( 0x0001FFFFFFFFFFFF ),
+ UINT64_C( 0x0000FFFFFFFFFFFF ),
+ UINT64_C( 0x00007FFFFFFFFFFF ),
+ UINT64_C( 0x00003FFFFFFFFFFF ),
+ UINT64_C( 0x00001FFFFFFFFFFF ),
+ UINT64_C( 0x00000FFFFFFFFFFF ),
+ UINT64_C( 0x000007FFFFFFFFFF ),
+ UINT64_C( 0x000003FFFFFFFFFF ),
+ UINT64_C( 0x000001FFFFFFFFFF ),
+ UINT64_C( 0x000000FFFFFFFFFF ),
+ UINT64_C( 0x0000007FFFFFFFFF ),
+ UINT64_C( 0x0000003FFFFFFFFF ),
+ UINT64_C( 0x0000001FFFFFFFFF ),
+ UINT64_C( 0x0000000FFFFFFFFF ),
+ UINT64_C( 0x00000007FFFFFFFF ),
+ UINT64_C( 0x00000003FFFFFFFF ),
+ UINT64_C( 0x00000001FFFFFFFF ),
+ UINT64_C( 0x00000000FFFFFFFF ),
+ UINT64_C( 0x000000007FFFFFFF ),
+ UINT64_C( 0x000000003FFFFFFF ),
+ UINT64_C( 0x000000001FFFFFFF ),
+ UINT64_C( 0x000000000FFFFFFF ),
+ UINT64_C( 0x0000000007FFFFFF ),
+ UINT64_C( 0x0000000003FFFFFF ),
+ UINT64_C( 0x0000000001FFFFFF ),
+ UINT64_C( 0x0000000000FFFFFF ),
+ UINT64_C( 0x00000000007FFFFF ),
+ UINT64_C( 0x00000000003FFFFF ),
+ UINT64_C( 0x00000000001FFFFF ),
+ UINT64_C( 0x00000000000FFFFF ),
+ UINT64_C( 0x000000000007FFFF ),
+ UINT64_C( 0x000000000003FFFF ),
+ UINT64_C( 0x000000000001FFFF ),
+ UINT64_C( 0x000000000000FFFF ),
+ UINT64_C( 0x0000000000007FFF ),
+ UINT64_C( 0x0000000000003FFF ),
+ UINT64_C( 0x0000000000001FFF ),
+ UINT64_C( 0x0000000000000FFF ),
+ UINT64_C( 0x00000000000007FF ),
+ UINT64_C( 0x00000000000003FF ),
+ UINT64_C( 0x00000000000001FF ),
+ UINT64_C( 0x00000000000000FF ),
+ UINT64_C( 0x000000000000007F ),
+ UINT64_C( 0x000000000000003F ),
+ UINT64_C( 0x000000000000001F ),
+ UINT64_C( 0x000000000000000F ),
+ UINT64_C( 0x0000000000000007 ),
+ UINT64_C( 0x0000000000000003 )
+};
+
+static int64_t i64NextP1( struct sequence *sequencePtr )
+{
+ int termNum;
+ union ui64_i64 uZ;
+
+ termNum = sequencePtr->term1Num;
+ uZ.ui = i64P1[termNum];
+ ++termNum;
+ if ( i64NumP1 <= termNum ) {
+ termNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->term1Num = termNum;
+ return uZ.i;
+
+}
+
+static const int_fast64_t i64NumP2 = (i64NumP1 * i64NumP1 + i64NumP1) / 2;
+
+static int64_t i64NextP2( struct sequence *sequencePtr )
+{
+ int term1Num, term2Num;
+ union ui64_i64 uZ;
+
+ term2Num = sequencePtr->term2Num;
+ term1Num = sequencePtr->term1Num;
+ uZ.ui = i64P1[term1Num] + i64P1[term2Num];
+ ++term2Num;
+ if ( i64NumP1 <= term2Num ) {
+ ++term1Num;
+ if ( i64NumP1 <= term1Num ) {
+ term1Num = 0;
+ sequencePtr->done = true;
+ }
+ term2Num = term1Num;
+ sequencePtr->term1Num = term1Num;
+ }
+ sequencePtr->term2Num = term2Num;
+ return uZ.i;
+
+}
+
+static int64_t i64RandomP3( void )
+{
+ union ui64_i64 uZ;
+
+ uZ.ui =
+ i64P1[randomN_ui8( i64NumP1 )] + i64P1[randomN_ui8( i64NumP1 )]
+ + i64P1[randomN_ui8( i64NumP1 )];
+ return uZ.i;
+
+}
+
+enum { i64NumPInfWeightMasks = 61 };
+static const uint64_t i64PInfWeightMasks[i64NumPInfWeightMasks] = {
+ UINT64_C( 0xFFFFFFFFFFFFFFFF ),
+ UINT64_C( 0x7FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x3FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x1FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x0FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x07FFFFFFFFFFFFFF ),
+ UINT64_C( 0x03FFFFFFFFFFFFFF ),
+ UINT64_C( 0x01FFFFFFFFFFFFFF ),
+ UINT64_C( 0x00FFFFFFFFFFFFFF ),
+ UINT64_C( 0x007FFFFFFFFFFFFF ),
+ UINT64_C( 0x003FFFFFFFFFFFFF ),
+ UINT64_C( 0x001FFFFFFFFFFFFF ),
+ UINT64_C( 0x000FFFFFFFFFFFFF ),
+ UINT64_C( 0x0007FFFFFFFFFFFF ),
+ UINT64_C( 0x0003FFFFFFFFFFFF ),
+ UINT64_C( 0x0001FFFFFFFFFFFF ),
+ UINT64_C( 0x0000FFFFFFFFFFFF ),
+ UINT64_C( 0x00007FFFFFFFFFFF ),
+ UINT64_C( 0x00003FFFFFFFFFFF ),
+ UINT64_C( 0x00001FFFFFFFFFFF ),
+ UINT64_C( 0x00000FFFFFFFFFFF ),
+ UINT64_C( 0x000007FFFFFFFFFF ),
+ UINT64_C( 0x000003FFFFFFFFFF ),
+ UINT64_C( 0x000001FFFFFFFFFF ),
+ UINT64_C( 0x000000FFFFFFFFFF ),
+ UINT64_C( 0x0000007FFFFFFFFF ),
+ UINT64_C( 0x0000003FFFFFFFFF ),
+ UINT64_C( 0x0000001FFFFFFFFF ),
+ UINT64_C( 0x0000000FFFFFFFFF ),
+ UINT64_C( 0x00000007FFFFFFFF ),
+ UINT64_C( 0x00000003FFFFFFFF ),
+ UINT64_C( 0x00000001FFFFFFFF ),
+ UINT64_C( 0x00000000FFFFFFFF ),
+ UINT64_C( 0x000000007FFFFFFF ),
+ UINT64_C( 0x000000003FFFFFFF ),
+ UINT64_C( 0x000000001FFFFFFF ),
+ UINT64_C( 0x000000000FFFFFFF ),
+ UINT64_C( 0x0000000007FFFFFF ),
+ UINT64_C( 0x0000000003FFFFFF ),
+ UINT64_C( 0x0000000001FFFFFF ),
+ UINT64_C( 0x0000000000FFFFFF ),
+ UINT64_C( 0x00000000007FFFFF ),
+ UINT64_C( 0x00000000003FFFFF ),
+ UINT64_C( 0x00000000001FFFFF ),
+ UINT64_C( 0x00000000000FFFFF ),
+ UINT64_C( 0x000000000007FFFF ),
+ UINT64_C( 0x000000000003FFFF ),
+ UINT64_C( 0x000000000001FFFF ),
+ UINT64_C( 0x000000000000FFFF ),
+ UINT64_C( 0x0000000000007FFF ),
+ UINT64_C( 0x0000000000003FFF ),
+ UINT64_C( 0x0000000000001FFF ),
+ UINT64_C( 0x0000000000000FFF ),
+ UINT64_C( 0x00000000000007FF ),
+ UINT64_C( 0x00000000000003FF ),
+ UINT64_C( 0x00000000000001FF ),
+ UINT64_C( 0x00000000000000FF ),
+ UINT64_C( 0x000000000000007F ),
+ UINT64_C( 0x000000000000003F ),
+ UINT64_C( 0x000000000000001F ),
+ UINT64_C( 0x000000000000000F )
+};
+static const uint64_t i64PInfWeightOffsets[i64NumPInfWeightMasks] = {
+ UINT64_C( 0x0000000000000000 ),
+ UINT64_C( 0xC000000000000000 ),
+ UINT64_C( 0xE000000000000000 ),
+ UINT64_C( 0xF000000000000000 ),
+ UINT64_C( 0xF800000000000000 ),
+ UINT64_C( 0xFC00000000000000 ),
+ UINT64_C( 0xFE00000000000000 ),
+ UINT64_C( 0xFF00000000000000 ),
+ UINT64_C( 0xFF80000000000000 ),
+ UINT64_C( 0xFFC0000000000000 ),
+ UINT64_C( 0xFFE0000000000000 ),
+ UINT64_C( 0xFFF0000000000000 ),
+ UINT64_C( 0xFFF8000000000000 ),
+ UINT64_C( 0xFFFC000000000000 ),
+ UINT64_C( 0xFFFE000000000000 ),
+ UINT64_C( 0xFFFF000000000000 ),
+ UINT64_C( 0xFFFF800000000000 ),
+ UINT64_C( 0xFFFFC00000000000 ),
+ UINT64_C( 0xFFFFE00000000000 ),
+ UINT64_C( 0xFFFFF00000000000 ),
+ UINT64_C( 0xFFFFF80000000000 ),
+ UINT64_C( 0xFFFFFC0000000000 ),
+ UINT64_C( 0xFFFFFE0000000000 ),
+ UINT64_C( 0xFFFFFF0000000000 ),
+ UINT64_C( 0xFFFFFF8000000000 ),
+ UINT64_C( 0xFFFFFFC000000000 ),
+ UINT64_C( 0xFFFFFFE000000000 ),
+ UINT64_C( 0xFFFFFFF000000000 ),
+ UINT64_C( 0xFFFFFFF800000000 ),
+ UINT64_C( 0xFFFFFFFC00000000 ),
+ UINT64_C( 0xFFFFFFFE00000000 ),
+ UINT64_C( 0xFFFFFFFF00000000 ),
+ UINT64_C( 0xFFFFFFFF80000000 ),
+ UINT64_C( 0xFFFFFFFFC0000000 ),
+ UINT64_C( 0xFFFFFFFFE0000000 ),
+ UINT64_C( 0xFFFFFFFFF0000000 ),
+ UINT64_C( 0xFFFFFFFFF8000000 ),
+ UINT64_C( 0xFFFFFFFFFC000000 ),
+ UINT64_C( 0xFFFFFFFFFE000000 ),
+ UINT64_C( 0xFFFFFFFFFF000000 ),
+ UINT64_C( 0xFFFFFFFFFF800000 ),
+ UINT64_C( 0xFFFFFFFFFFC00000 ),
+ UINT64_C( 0xFFFFFFFFFFE00000 ),
+ UINT64_C( 0xFFFFFFFFFFF00000 ),
+ UINT64_C( 0xFFFFFFFFFFF80000 ),
+ UINT64_C( 0xFFFFFFFFFFFC0000 ),
+ UINT64_C( 0xFFFFFFFFFFFE0000 ),
+ UINT64_C( 0xFFFFFFFFFFFF0000 ),
+ UINT64_C( 0xFFFFFFFFFFFF8000 ),
+ UINT64_C( 0xFFFFFFFFFFFFC000 ),
+ UINT64_C( 0xFFFFFFFFFFFFE000 ),
+ UINT64_C( 0xFFFFFFFFFFFFF000 ),
+ UINT64_C( 0xFFFFFFFFFFFFF800 ),
+ UINT64_C( 0xFFFFFFFFFFFFFC00 ),
+ UINT64_C( 0xFFFFFFFFFFFFFE00 ),
+ UINT64_C( 0xFFFFFFFFFFFFFF00 ),
+ UINT64_C( 0xFFFFFFFFFFFFFF80 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFC0 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFE0 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFF0 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFF8 )
+};
+
+static int64_t i64RandomPInf( void )
+{
+ int weightMaskNum;
+ union ui64_i64 uZ;
+
+ weightMaskNum = randomN_ui8( i64NumPInfWeightMasks );
+ uZ.ui =
+ (random_ui64() & i64PInfWeightMasks[weightMaskNum])
+ + i64PInfWeightOffsets[weightMaskNum];
+ return uZ.i;
+
+}
+
+static struct sequence sequenceA;
+static int subcase;
+
+int64_t genCases_i64_a;
+
+void genCases_i64_a_init( void )
+{
+
+ sequenceA.term2Num = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.done = false;
+ subcase = 0;
+ genCases_total = (genCases_level == 1) ? 3 * i64NumP1 : 2 * i64NumP2;
+ genCases_done = false;
+
+}
+
+void genCases_i64_a_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ genCases_i64_a = i64RandomP3();
+ break;
+ case 1:
+ genCases_i64_a = i64RandomPInf();
+ break;
+ case 2:
+ genCases_i64_a = i64NextP1( &sequenceA );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_i64_a = i64RandomP3();
+ break;
+ case 2:
+ genCases_i64_a = i64RandomPInf();
+ break;
+ case 3:
+ subcase = -1;
+ case 1:
+ genCases_i64_a = i64NextP2( &sequenceA );
+ genCases_done = sequenceA.done;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genCases_ui32.c b/src/libs/softfloat-3e/testfloat/source/genCases_ui32.c
new file mode 100644
index 00000000..bc897827
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genCases_ui32.c
@@ -0,0 +1,323 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "random.h"
+#include "genCases.h"
+
+struct sequence {
+ int term1Num, term2Num;
+ bool done;
+};
+
+enum { ui32NumP1 = 124 };
+static const uint32_t ui32P1[ui32NumP1] = {
+ 0x00000000,
+ 0x00000001,
+ 0x00000002,
+ 0x00000004,
+ 0x00000008,
+ 0x00000010,
+ 0x00000020,
+ 0x00000040,
+ 0x00000080,
+ 0x00000100,
+ 0x00000200,
+ 0x00000400,
+ 0x00000800,
+ 0x00001000,
+ 0x00002000,
+ 0x00004000,
+ 0x00008000,
+ 0x00010000,
+ 0x00020000,
+ 0x00040000,
+ 0x00080000,
+ 0x00100000,
+ 0x00200000,
+ 0x00400000,
+ 0x00800000,
+ 0x01000000,
+ 0x02000000,
+ 0x04000000,
+ 0x08000000,
+ 0x10000000,
+ 0x20000000,
+ 0x40000000,
+ 0x80000000,
+ 0xC0000000,
+ 0xE0000000,
+ 0xF0000000,
+ 0xF8000000,
+ 0xFC000000,
+ 0xFE000000,
+ 0xFF000000,
+ 0xFF800000,
+ 0xFFC00000,
+ 0xFFE00000,
+ 0xFFF00000,
+ 0xFFF80000,
+ 0xFFFC0000,
+ 0xFFFE0000,
+ 0xFFFF0000,
+ 0xFFFF8000,
+ 0xFFFFC000,
+ 0xFFFFE000,
+ 0xFFFFF000,
+ 0xFFFFF800,
+ 0xFFFFFC00,
+ 0xFFFFFE00,
+ 0xFFFFFF00,
+ 0xFFFFFF80,
+ 0xFFFFFFC0,
+ 0xFFFFFFE0,
+ 0xFFFFFFF0,
+ 0xFFFFFFF8,
+ 0xFFFFFFFC,
+ 0xFFFFFFFE,
+ 0xFFFFFFFF,
+ 0xFFFFFFFD,
+ 0xFFFFFFFB,
+ 0xFFFFFFF7,
+ 0xFFFFFFEF,
+ 0xFFFFFFDF,
+ 0xFFFFFFBF,
+ 0xFFFFFF7F,
+ 0xFFFFFEFF,
+ 0xFFFFFDFF,
+ 0xFFFFFBFF,
+ 0xFFFFF7FF,
+ 0xFFFFEFFF,
+ 0xFFFFDFFF,
+ 0xFFFFBFFF,
+ 0xFFFF7FFF,
+ 0xFFFEFFFF,
+ 0xFFFDFFFF,
+ 0xFFFBFFFF,
+ 0xFFF7FFFF,
+ 0xFFEFFFFF,
+ 0xFFDFFFFF,
+ 0xFFBFFFFF,
+ 0xFF7FFFFF,
+ 0xFEFFFFFF,
+ 0xFDFFFFFF,
+ 0xFBFFFFFF,
+ 0xF7FFFFFF,
+ 0xEFFFFFFF,
+ 0xDFFFFFFF,
+ 0xBFFFFFFF,
+ 0x7FFFFFFF,
+ 0x3FFFFFFF,
+ 0x1FFFFFFF,
+ 0x0FFFFFFF,
+ 0x07FFFFFF,
+ 0x03FFFFFF,
+ 0x01FFFFFF,
+ 0x00FFFFFF,
+ 0x007FFFFF,
+ 0x003FFFFF,
+ 0x001FFFFF,
+ 0x000FFFFF,
+ 0x0007FFFF,
+ 0x0003FFFF,
+ 0x0001FFFF,
+ 0x0000FFFF,
+ 0x00007FFF,
+ 0x00003FFF,
+ 0x00001FFF,
+ 0x00000FFF,
+ 0x000007FF,
+ 0x000003FF,
+ 0x000001FF,
+ 0x000000FF,
+ 0x0000007F,
+ 0x0000003F,
+ 0x0000001F,
+ 0x0000000F,
+ 0x00000007,
+ 0x00000003
+};
+
+static uint32_t ui32NextP1( struct sequence *sequencePtr )
+{
+ int termNum;
+ uint32_t z;
+
+ termNum = sequencePtr->term1Num;
+ z = ui32P1[termNum];
+ ++termNum;
+ if ( ui32NumP1 <= termNum ) {
+ termNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->term1Num = termNum;
+ return z;
+
+}
+
+static const uint_fast32_t ui32NumP2 = (ui32NumP1 * ui32NumP1 + ui32NumP1) / 2;
+
+static uint32_t ui32NextP2( struct sequence *sequencePtr )
+{
+ int term1Num, term2Num;
+ uint32_t z;
+
+ term2Num = sequencePtr->term2Num;
+ term1Num = sequencePtr->term1Num;
+ z = ui32P1[term1Num] + ui32P1[term2Num];
+ ++term2Num;
+ if ( ui32NumP1 <= term2Num ) {
+ ++term1Num;
+ if ( ui32NumP1 <= term1Num ) {
+ term1Num = 0;
+ sequencePtr->done = true;
+ }
+ term2Num = term1Num;
+ sequencePtr->term1Num = term1Num;
+ }
+ sequencePtr->term2Num = term2Num;
+ return z;
+
+}
+
+static uint32_t ui32RandomP3( void )
+{
+
+ return
+ ui32P1[randomN_ui8( ui32NumP1 )] + ui32P1[randomN_ui8( ui32NumP1 )]
+ + ui32P1[randomN_ui8( ui32NumP1 )];
+
+}
+
+enum { ui32NumPInfWeightMasks = 29 };
+static const uint32_t ui32PInfWeightMasks[ui32NumPInfWeightMasks] = {
+ 0xFFFFFFFF,
+ 0x7FFFFFFF,
+ 0x3FFFFFFF,
+ 0x1FFFFFFF,
+ 0x0FFFFFFF,
+ 0x07FFFFFF,
+ 0x03FFFFFF,
+ 0x01FFFFFF,
+ 0x00FFFFFF,
+ 0x007FFFFF,
+ 0x003FFFFF,
+ 0x001FFFFF,
+ 0x000FFFFF,
+ 0x0007FFFF,
+ 0x0003FFFF,
+ 0x0001FFFF,
+ 0x0000FFFF,
+ 0x00007FFF,
+ 0x00003FFF,
+ 0x00001FFF,
+ 0x00000FFF,
+ 0x000007FF,
+ 0x000003FF,
+ 0x000001FF,
+ 0x000000FF,
+ 0x0000007F,
+ 0x0000003F,
+ 0x0000001F,
+ 0x0000000F
+};
+
+static uint32_t ui32RandomPInf( void )
+{
+ int weightMaskNum;
+
+ weightMaskNum = randomN_ui8( ui32NumPInfWeightMasks );
+ return random_ui32() & ui32PInfWeightMasks[weightMaskNum];
+
+}
+
+static struct sequence sequenceA;
+static int subcase;
+
+uint32_t genCases_ui32_a;
+
+void genCases_ui32_a_init( void )
+{
+
+ sequenceA.term1Num = 0;
+ sequenceA.term2Num = 0;
+ sequenceA.done = false;
+ subcase = 0;
+ genCases_total = (genCases_level == 1) ? 3 * ui32NumP1 : 2 * ui32NumP2;
+ genCases_done = false;
+
+}
+
+void genCases_ui32_a_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ genCases_ui32_a = ui32RandomP3();
+ break;
+ case 1:
+ genCases_ui32_a = ui32RandomPInf();
+ break;
+ case 2:
+ genCases_ui32_a = ui32NextP1( &sequenceA );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_ui32_a = ui32RandomP3();
+ break;
+ case 2:
+ genCases_ui32_a = ui32RandomPInf();
+ break;
+ case 3:
+ subcase = -1;
+ case 1:
+ genCases_ui32_a = ui32NextP2( &sequenceA );
+ genCases_done = sequenceA.done;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genCases_ui64.c b/src/libs/softfloat-3e/testfloat/source/genCases_ui64.c
new file mode 100644
index 00000000..915df78f
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genCases_ui64.c
@@ -0,0 +1,483 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "random.h"
+#include "genCases.h"
+
+struct sequence {
+ int term1Num, term2Num;
+ bool done;
+};
+
+enum { ui64NumP1 = 252 };
+static const uint64_t ui64P1[ui64NumP1] = {
+ UINT64_C( 0x0000000000000000 ),
+ UINT64_C( 0x0000000000000001 ),
+ UINT64_C( 0x0000000000000002 ),
+ UINT64_C( 0x0000000000000004 ),
+ UINT64_C( 0x0000000000000008 ),
+ UINT64_C( 0x0000000000000010 ),
+ UINT64_C( 0x0000000000000020 ),
+ UINT64_C( 0x0000000000000040 ),
+ UINT64_C( 0x0000000000000080 ),
+ UINT64_C( 0x0000000000000100 ),
+ UINT64_C( 0x0000000000000200 ),
+ UINT64_C( 0x0000000000000400 ),
+ UINT64_C( 0x0000000000000800 ),
+ UINT64_C( 0x0000000000001000 ),
+ UINT64_C( 0x0000000000002000 ),
+ UINT64_C( 0x0000000000004000 ),
+ UINT64_C( 0x0000000000008000 ),
+ UINT64_C( 0x0000000000010000 ),
+ UINT64_C( 0x0000000000020000 ),
+ UINT64_C( 0x0000000000040000 ),
+ UINT64_C( 0x0000000000080000 ),
+ UINT64_C( 0x0000000000100000 ),
+ UINT64_C( 0x0000000000200000 ),
+ UINT64_C( 0x0000000000400000 ),
+ UINT64_C( 0x0000000000800000 ),
+ UINT64_C( 0x0000000001000000 ),
+ UINT64_C( 0x0000000002000000 ),
+ UINT64_C( 0x0000000004000000 ),
+ UINT64_C( 0x0000000008000000 ),
+ UINT64_C( 0x0000000010000000 ),
+ UINT64_C( 0x0000000020000000 ),
+ UINT64_C( 0x0000000040000000 ),
+ UINT64_C( 0x0000000080000000 ),
+ UINT64_C( 0x0000000100000000 ),
+ UINT64_C( 0x0000000200000000 ),
+ UINT64_C( 0x0000000400000000 ),
+ UINT64_C( 0x0000000800000000 ),
+ UINT64_C( 0x0000001000000000 ),
+ UINT64_C( 0x0000002000000000 ),
+ UINT64_C( 0x0000004000000000 ),
+ UINT64_C( 0x0000008000000000 ),
+ UINT64_C( 0x0000010000000000 ),
+ UINT64_C( 0x0000020000000000 ),
+ UINT64_C( 0x0000040000000000 ),
+ UINT64_C( 0x0000080000000000 ),
+ UINT64_C( 0x0000100000000000 ),
+ UINT64_C( 0x0000200000000000 ),
+ UINT64_C( 0x0000400000000000 ),
+ UINT64_C( 0x0000800000000000 ),
+ UINT64_C( 0x0001000000000000 ),
+ UINT64_C( 0x0002000000000000 ),
+ UINT64_C( 0x0004000000000000 ),
+ UINT64_C( 0x0008000000000000 ),
+ UINT64_C( 0x0010000000000000 ),
+ UINT64_C( 0x0020000000000000 ),
+ UINT64_C( 0x0040000000000000 ),
+ UINT64_C( 0x0080000000000000 ),
+ UINT64_C( 0x0100000000000000 ),
+ UINT64_C( 0x0200000000000000 ),
+ UINT64_C( 0x0400000000000000 ),
+ UINT64_C( 0x0800000000000000 ),
+ UINT64_C( 0x1000000000000000 ),
+ UINT64_C( 0x2000000000000000 ),
+ UINT64_C( 0x4000000000000000 ),
+ UINT64_C( 0x8000000000000000 ),
+ UINT64_C( 0xC000000000000000 ),
+ UINT64_C( 0xE000000000000000 ),
+ UINT64_C( 0xF000000000000000 ),
+ UINT64_C( 0xF800000000000000 ),
+ UINT64_C( 0xFC00000000000000 ),
+ UINT64_C( 0xFE00000000000000 ),
+ UINT64_C( 0xFF00000000000000 ),
+ UINT64_C( 0xFF80000000000000 ),
+ UINT64_C( 0xFFC0000000000000 ),
+ UINT64_C( 0xFFE0000000000000 ),
+ UINT64_C( 0xFFF0000000000000 ),
+ UINT64_C( 0xFFF8000000000000 ),
+ UINT64_C( 0xFFFC000000000000 ),
+ UINT64_C( 0xFFFE000000000000 ),
+ UINT64_C( 0xFFFF000000000000 ),
+ UINT64_C( 0xFFFF800000000000 ),
+ UINT64_C( 0xFFFFC00000000000 ),
+ UINT64_C( 0xFFFFE00000000000 ),
+ UINT64_C( 0xFFFFF00000000000 ),
+ UINT64_C( 0xFFFFF80000000000 ),
+ UINT64_C( 0xFFFFFC0000000000 ),
+ UINT64_C( 0xFFFFFE0000000000 ),
+ UINT64_C( 0xFFFFFF0000000000 ),
+ UINT64_C( 0xFFFFFF8000000000 ),
+ UINT64_C( 0xFFFFFFC000000000 ),
+ UINT64_C( 0xFFFFFFE000000000 ),
+ UINT64_C( 0xFFFFFFF000000000 ),
+ UINT64_C( 0xFFFFFFF800000000 ),
+ UINT64_C( 0xFFFFFFFC00000000 ),
+ UINT64_C( 0xFFFFFFFE00000000 ),
+ UINT64_C( 0xFFFFFFFF00000000 ),
+ UINT64_C( 0xFFFFFFFF80000000 ),
+ UINT64_C( 0xFFFFFFFFC0000000 ),
+ UINT64_C( 0xFFFFFFFFE0000000 ),
+ UINT64_C( 0xFFFFFFFFF0000000 ),
+ UINT64_C( 0xFFFFFFFFF8000000 ),
+ UINT64_C( 0xFFFFFFFFFC000000 ),
+ UINT64_C( 0xFFFFFFFFFE000000 ),
+ UINT64_C( 0xFFFFFFFFFF000000 ),
+ UINT64_C( 0xFFFFFFFFFF800000 ),
+ UINT64_C( 0xFFFFFFFFFFC00000 ),
+ UINT64_C( 0xFFFFFFFFFFE00000 ),
+ UINT64_C( 0xFFFFFFFFFFF00000 ),
+ UINT64_C( 0xFFFFFFFFFFF80000 ),
+ UINT64_C( 0xFFFFFFFFFFFC0000 ),
+ UINT64_C( 0xFFFFFFFFFFFE0000 ),
+ UINT64_C( 0xFFFFFFFFFFFF0000 ),
+ UINT64_C( 0xFFFFFFFFFFFF8000 ),
+ UINT64_C( 0xFFFFFFFFFFFFC000 ),
+ UINT64_C( 0xFFFFFFFFFFFFE000 ),
+ UINT64_C( 0xFFFFFFFFFFFFF000 ),
+ UINT64_C( 0xFFFFFFFFFFFFF800 ),
+ UINT64_C( 0xFFFFFFFFFFFFFC00 ),
+ UINT64_C( 0xFFFFFFFFFFFFFE00 ),
+ UINT64_C( 0xFFFFFFFFFFFFFF00 ),
+ UINT64_C( 0xFFFFFFFFFFFFFF80 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFC0 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFE0 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFF0 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFF8 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFFC ),
+ UINT64_C( 0xFFFFFFFFFFFFFFFE ),
+ UINT64_C( 0xFFFFFFFFFFFFFFFF ),
+ UINT64_C( 0xFFFFFFFFFFFFFFFD ),
+ UINT64_C( 0xFFFFFFFFFFFFFFFB ),
+ UINT64_C( 0xFFFFFFFFFFFFFFF7 ),
+ UINT64_C( 0xFFFFFFFFFFFFFFEF ),
+ UINT64_C( 0xFFFFFFFFFFFFFFDF ),
+ UINT64_C( 0xFFFFFFFFFFFFFFBF ),
+ UINT64_C( 0xFFFFFFFFFFFFFF7F ),
+ UINT64_C( 0xFFFFFFFFFFFFFEFF ),
+ UINT64_C( 0xFFFFFFFFFFFFFDFF ),
+ UINT64_C( 0xFFFFFFFFFFFFFBFF ),
+ UINT64_C( 0xFFFFFFFFFFFFF7FF ),
+ UINT64_C( 0xFFFFFFFFFFFFEFFF ),
+ UINT64_C( 0xFFFFFFFFFFFFDFFF ),
+ UINT64_C( 0xFFFFFFFFFFFFBFFF ),
+ UINT64_C( 0xFFFFFFFFFFFF7FFF ),
+ UINT64_C( 0xFFFFFFFFFFFEFFFF ),
+ UINT64_C( 0xFFFFFFFFFFFDFFFF ),
+ UINT64_C( 0xFFFFFFFFFFFBFFFF ),
+ UINT64_C( 0xFFFFFFFFFFF7FFFF ),
+ UINT64_C( 0xFFFFFFFFFFEFFFFF ),
+ UINT64_C( 0xFFFFFFFFFFDFFFFF ),
+ UINT64_C( 0xFFFFFFFFFFBFFFFF ),
+ UINT64_C( 0xFFFFFFFFFF7FFFFF ),
+ UINT64_C( 0xFFFFFFFFFEFFFFFF ),
+ UINT64_C( 0xFFFFFFFFFDFFFFFF ),
+ UINT64_C( 0xFFFFFFFFFBFFFFFF ),
+ UINT64_C( 0xFFFFFFFFF7FFFFFF ),
+ UINT64_C( 0xFFFFFFFFEFFFFFFF ),
+ UINT64_C( 0xFFFFFFFFDFFFFFFF ),
+ UINT64_C( 0xFFFFFFFFBFFFFFFF ),
+ UINT64_C( 0xFFFFFFFF7FFFFFFF ),
+ UINT64_C( 0xFFFFFFFEFFFFFFFF ),
+ UINT64_C( 0xFFFFFFFDFFFFFFFF ),
+ UINT64_C( 0xFFFFFFFBFFFFFFFF ),
+ UINT64_C( 0xFFFFFFF7FFFFFFFF ),
+ UINT64_C( 0xFFFFFFEFFFFFFFFF ),
+ UINT64_C( 0xFFFFFFDFFFFFFFFF ),
+ UINT64_C( 0xFFFFFFBFFFFFFFFF ),
+ UINT64_C( 0xFFFFFF7FFFFFFFFF ),
+ UINT64_C( 0xFFFFFEFFFFFFFFFF ),
+ UINT64_C( 0xFFFFFDFFFFFFFFFF ),
+ UINT64_C( 0xFFFFFBFFFFFFFFFF ),
+ UINT64_C( 0xFFFFF7FFFFFFFFFF ),
+ UINT64_C( 0xFFFFEFFFFFFFFFFF ),
+ UINT64_C( 0xFFFFDFFFFFFFFFFF ),
+ UINT64_C( 0xFFFFBFFFFFFFFFFF ),
+ UINT64_C( 0xFFFF7FFFFFFFFFFF ),
+ UINT64_C( 0xFFFEFFFFFFFFFFFF ),
+ UINT64_C( 0xFFFDFFFFFFFFFFFF ),
+ UINT64_C( 0xFFFBFFFFFFFFFFFF ),
+ UINT64_C( 0xFFF7FFFFFFFFFFFF ),
+ UINT64_C( 0xFFEFFFFFFFFFFFFF ),
+ UINT64_C( 0xFFDFFFFFFFFFFFFF ),
+ UINT64_C( 0xFFBFFFFFFFFFFFFF ),
+ UINT64_C( 0xFF7FFFFFFFFFFFFF ),
+ UINT64_C( 0xFEFFFFFFFFFFFFFF ),
+ UINT64_C( 0xFDFFFFFFFFFFFFFF ),
+ UINT64_C( 0xFBFFFFFFFFFFFFFF ),
+ UINT64_C( 0xF7FFFFFFFFFFFFFF ),
+ UINT64_C( 0xEFFFFFFFFFFFFFFF ),
+ UINT64_C( 0xDFFFFFFFFFFFFFFF ),
+ UINT64_C( 0xBFFFFFFFFFFFFFFF ),
+ UINT64_C( 0x7FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x3FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x1FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x0FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x07FFFFFFFFFFFFFF ),
+ UINT64_C( 0x03FFFFFFFFFFFFFF ),
+ UINT64_C( 0x01FFFFFFFFFFFFFF ),
+ UINT64_C( 0x00FFFFFFFFFFFFFF ),
+ UINT64_C( 0x007FFFFFFFFFFFFF ),
+ UINT64_C( 0x003FFFFFFFFFFFFF ),
+ UINT64_C( 0x001FFFFFFFFFFFFF ),
+ UINT64_C( 0x000FFFFFFFFFFFFF ),
+ UINT64_C( 0x0007FFFFFFFFFFFF ),
+ UINT64_C( 0x0003FFFFFFFFFFFF ),
+ UINT64_C( 0x0001FFFFFFFFFFFF ),
+ UINT64_C( 0x0000FFFFFFFFFFFF ),
+ UINT64_C( 0x00007FFFFFFFFFFF ),
+ UINT64_C( 0x00003FFFFFFFFFFF ),
+ UINT64_C( 0x00001FFFFFFFFFFF ),
+ UINT64_C( 0x00000FFFFFFFFFFF ),
+ UINT64_C( 0x000007FFFFFFFFFF ),
+ UINT64_C( 0x000003FFFFFFFFFF ),
+ UINT64_C( 0x000001FFFFFFFFFF ),
+ UINT64_C( 0x000000FFFFFFFFFF ),
+ UINT64_C( 0x0000007FFFFFFFFF ),
+ UINT64_C( 0x0000003FFFFFFFFF ),
+ UINT64_C( 0x0000001FFFFFFFFF ),
+ UINT64_C( 0x0000000FFFFFFFFF ),
+ UINT64_C( 0x00000007FFFFFFFF ),
+ UINT64_C( 0x00000003FFFFFFFF ),
+ UINT64_C( 0x00000001FFFFFFFF ),
+ UINT64_C( 0x00000000FFFFFFFF ),
+ UINT64_C( 0x000000007FFFFFFF ),
+ UINT64_C( 0x000000003FFFFFFF ),
+ UINT64_C( 0x000000001FFFFFFF ),
+ UINT64_C( 0x000000000FFFFFFF ),
+ UINT64_C( 0x0000000007FFFFFF ),
+ UINT64_C( 0x0000000003FFFFFF ),
+ UINT64_C( 0x0000000001FFFFFF ),
+ UINT64_C( 0x0000000000FFFFFF ),
+ UINT64_C( 0x00000000007FFFFF ),
+ UINT64_C( 0x00000000003FFFFF ),
+ UINT64_C( 0x00000000001FFFFF ),
+ UINT64_C( 0x00000000000FFFFF ),
+ UINT64_C( 0x000000000007FFFF ),
+ UINT64_C( 0x000000000003FFFF ),
+ UINT64_C( 0x000000000001FFFF ),
+ UINT64_C( 0x000000000000FFFF ),
+ UINT64_C( 0x0000000000007FFF ),
+ UINT64_C( 0x0000000000003FFF ),
+ UINT64_C( 0x0000000000001FFF ),
+ UINT64_C( 0x0000000000000FFF ),
+ UINT64_C( 0x00000000000007FF ),
+ UINT64_C( 0x00000000000003FF ),
+ UINT64_C( 0x00000000000001FF ),
+ UINT64_C( 0x00000000000000FF ),
+ UINT64_C( 0x000000000000007F ),
+ UINT64_C( 0x000000000000003F ),
+ UINT64_C( 0x000000000000001F ),
+ UINT64_C( 0x000000000000000F ),
+ UINT64_C( 0x0000000000000007 ),
+ UINT64_C( 0x0000000000000003 )
+};
+
+static uint64_t ui64NextP1( struct sequence *sequencePtr )
+{
+ int termNum;
+ uint64_t z;
+
+ termNum = sequencePtr->term1Num;
+ z = ui64P1[termNum];
+ ++termNum;
+ if ( ui64NumP1 <= termNum ) {
+ termNum = 0;
+ sequencePtr->done = true;
+ }
+ sequencePtr->term1Num = termNum;
+ return z;
+
+}
+
+static const uint_fast64_t ui64NumP2 = (ui64NumP1 * ui64NumP1 + ui64NumP1) / 2;
+
+static uint64_t ui64NextP2( struct sequence *sequencePtr )
+{
+ int term1Num, term2Num;
+ uint64_t z;
+
+ term2Num = sequencePtr->term2Num;
+ term1Num = sequencePtr->term1Num;
+ z = ui64P1[term1Num] + ui64P1[term2Num];
+ ++term2Num;
+ if ( ui64NumP1 <= term2Num ) {
+ ++term1Num;
+ if ( ui64NumP1 <= term1Num ) {
+ term1Num = 0;
+ sequencePtr->done = true;
+ }
+ term2Num = term1Num;
+ sequencePtr->term1Num = term1Num;
+ }
+ sequencePtr->term2Num = term2Num;
+ return z;
+
+}
+
+static uint64_t ui64RandomP3( void )
+{
+
+ return
+ ui64P1[randomN_ui8( ui64NumP1 )] + ui64P1[randomN_ui8( ui64NumP1 )]
+ + ui64P1[randomN_ui8( ui64NumP1 )];
+
+}
+
+enum { ui64NumPInfWeightMasks = 61 };
+static const uint64_t ui64PInfWeightMasks[ui64NumPInfWeightMasks] = {
+ UINT64_C( 0xFFFFFFFFFFFFFFFF ),
+ UINT64_C( 0x7FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x3FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x1FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x0FFFFFFFFFFFFFFF ),
+ UINT64_C( 0x07FFFFFFFFFFFFFF ),
+ UINT64_C( 0x03FFFFFFFFFFFFFF ),
+ UINT64_C( 0x01FFFFFFFFFFFFFF ),
+ UINT64_C( 0x00FFFFFFFFFFFFFF ),
+ UINT64_C( 0x007FFFFFFFFFFFFF ),
+ UINT64_C( 0x003FFFFFFFFFFFFF ),
+ UINT64_C( 0x001FFFFFFFFFFFFF ),
+ UINT64_C( 0x000FFFFFFFFFFFFF ),
+ UINT64_C( 0x0007FFFFFFFFFFFF ),
+ UINT64_C( 0x0003FFFFFFFFFFFF ),
+ UINT64_C( 0x0001FFFFFFFFFFFF ),
+ UINT64_C( 0x0000FFFFFFFFFFFF ),
+ UINT64_C( 0x00007FFFFFFFFFFF ),
+ UINT64_C( 0x00003FFFFFFFFFFF ),
+ UINT64_C( 0x00001FFFFFFFFFFF ),
+ UINT64_C( 0x00000FFFFFFFFFFF ),
+ UINT64_C( 0x000007FFFFFFFFFF ),
+ UINT64_C( 0x000003FFFFFFFFFF ),
+ UINT64_C( 0x000001FFFFFFFFFF ),
+ UINT64_C( 0x000000FFFFFFFFFF ),
+ UINT64_C( 0x0000007FFFFFFFFF ),
+ UINT64_C( 0x0000003FFFFFFFFF ),
+ UINT64_C( 0x0000001FFFFFFFFF ),
+ UINT64_C( 0x0000000FFFFFFFFF ),
+ UINT64_C( 0x00000007FFFFFFFF ),
+ UINT64_C( 0x00000003FFFFFFFF ),
+ UINT64_C( 0x00000001FFFFFFFF ),
+ UINT64_C( 0x00000000FFFFFFFF ),
+ UINT64_C( 0x000000007FFFFFFF ),
+ UINT64_C( 0x000000003FFFFFFF ),
+ UINT64_C( 0x000000001FFFFFFF ),
+ UINT64_C( 0x000000000FFFFFFF ),
+ UINT64_C( 0x0000000007FFFFFF ),
+ UINT64_C( 0x0000000003FFFFFF ),
+ UINT64_C( 0x0000000001FFFFFF ),
+ UINT64_C( 0x0000000000FFFFFF ),
+ UINT64_C( 0x00000000007FFFFF ),
+ UINT64_C( 0x00000000003FFFFF ),
+ UINT64_C( 0x00000000001FFFFF ),
+ UINT64_C( 0x00000000000FFFFF ),
+ UINT64_C( 0x000000000007FFFF ),
+ UINT64_C( 0x000000000003FFFF ),
+ UINT64_C( 0x000000000001FFFF ),
+ UINT64_C( 0x000000000000FFFF ),
+ UINT64_C( 0x0000000000007FFF ),
+ UINT64_C( 0x0000000000003FFF ),
+ UINT64_C( 0x0000000000001FFF ),
+ UINT64_C( 0x0000000000000FFF ),
+ UINT64_C( 0x00000000000007FF ),
+ UINT64_C( 0x00000000000003FF ),
+ UINT64_C( 0x00000000000001FF ),
+ UINT64_C( 0x00000000000000FF ),
+ UINT64_C( 0x000000000000007F ),
+ UINT64_C( 0x000000000000003F ),
+ UINT64_C( 0x000000000000001F ),
+ UINT64_C( 0x000000000000000F )
+};
+
+static uint64_t ui64RandomPInf( void )
+{
+ int weightMaskNum;
+
+ weightMaskNum = randomN_ui8( ui64NumPInfWeightMasks );
+ return random_ui64() & ui64PInfWeightMasks[weightMaskNum];
+
+}
+
+static struct sequence sequenceA;
+static int subcase;
+
+uint64_t genCases_ui64_a;
+
+void genCases_ui64_a_init( void )
+{
+
+ sequenceA.term2Num = 0;
+ sequenceA.term1Num = 0;
+ sequenceA.done = false;
+ subcase = 0;
+ genCases_total = (genCases_level == 1) ? 3 * ui64NumP1 : 2 * ui64NumP2;
+ genCases_done = false;
+
+}
+
+void genCases_ui64_a_next( void )
+{
+
+ if ( genCases_level == 1 ) {
+ switch ( subcase ) {
+ case 0:
+ genCases_ui64_a = ui64RandomP3();
+ break;
+ case 1:
+ genCases_ui64_a = ui64RandomPInf();
+ break;
+ case 2:
+ genCases_ui64_a = ui64NextP1( &sequenceA );
+ genCases_done = sequenceA.done;
+ subcase = -1;
+ break;
+ }
+ } else {
+ switch ( subcase ) {
+ case 0:
+ genCases_ui64_a = ui64RandomP3();
+ break;
+ case 2:
+ genCases_ui64_a = ui64RandomPInf();
+ break;
+ case 3:
+ subcase = -1;
+ case 1:
+ genCases_ui64_a = ui64NextP2( &sequenceA );
+ genCases_done = sequenceA.done;
+ break;
+ }
+ }
+ ++subcase;
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genCases_writeTestsTotal.c b/src/libs/softfloat-3e/testfloat/source/genCases_writeTestsTotal.c
new file mode 100644
index 00000000..8ad6f91e
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genCases_writeTestsTotal.c
@@ -0,0 +1,63 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "genCases.h"
+
+void genCases_writeTestsTotal( bool forever )
+{
+
+ if ( forever ) {
+ fputs( "Unbounded tests.\n", stderr );
+ } else {
+ if ( 2000000000 <= genCases_total ) {
+ fprintf(
+ stderr,
+ "\r%lu%09lu tests total.\n",
+ (long unsigned) (genCases_total / 1000000000),
+ (long unsigned) (genCases_total % 1000000000)
+ );
+ } else {
+ fprintf(
+ stderr, "\r%lu tests total.\n", (long unsigned) genCases_total
+ );
+ }
+ }
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genLoops.c b/src/libs/softfloat-3e/testfloat/source/genLoops.c
new file mode 100644
index 00000000..913391a0
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genLoops.c
@@ -0,0 +1,2890 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include
+#include
+#include
+#include "platform.h"
+#include "uint128.h"
+#include "fail.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "writeHex.h"
+#include "genLoops.h"
+
+volatile sig_atomic_t genLoops_stop = false;
+
+bool genLoops_forever;
+bool genLoops_givenCount;
+uint_fast64_t genLoops_count;
+uint_fast8_t *genLoops_trueFlagsPtr;
+
+#ifdef FLOAT16
+union ui16_f16 { uint16_t ui; float16_t f; };
+#endif
+union ui32_f32 { uint32_t ui; float32_t f; };
+#ifdef FLOAT64
+union ui64_f64 { uint64_t ui; float64_t f; };
+#endif
+
+static void checkEnoughCases( void )
+{
+
+ if ( genLoops_givenCount && (genLoops_count < genCases_total) ) {
+ if ( 2000000000 <= genCases_total ) {
+ fail(
+ "Too few cases; minimum is %lu%09lu",
+ (unsigned long) (genCases_total / 1000000000),
+ (unsigned long) (genCases_total % 1000000000)
+ );
+ } else {
+ fail(
+ "Too few cases; minimum is %lu", (unsigned long) genCases_total
+ );
+ }
+ }
+
+}
+
+static void writeGenOutput_flags( uint_fast8_t flags )
+{
+ uint_fast8_t commonFlags;
+
+ commonFlags = 0;
+ if ( flags & softfloat_flag_invalid ) commonFlags |= 0x10;
+ if ( flags & softfloat_flag_infinite ) commonFlags |= 0x08;
+ if ( flags & softfloat_flag_overflow ) commonFlags |= 0x04;
+ if ( flags & softfloat_flag_underflow ) commonFlags |= 0x02;
+ if ( flags & softfloat_flag_inexact ) commonFlags |= 0x01;
+ writeHex_ui8( commonFlags, '\n' );
+
+}
+
+static bool writeGenOutputs_bool( bool z, uint_fast8_t flags )
+{
+
+ writeHex_bool( z, ' ' );
+ writeGenOutput_flags( flags );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) return true;
+ }
+ return false;
+
+}
+
+#ifdef FLOAT16
+
+static bool writeGenOutputs_ui16( uint_fast16_t z, uint_fast8_t flags )
+{
+
+ writeHex_ui16( z, ' ' );
+ writeGenOutput_flags( flags );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) return true;
+ }
+ return false;
+
+}
+
+#endif
+
+static bool writeGenOutputs_ui32( uint_fast32_t z, uint_fast8_t flags )
+{
+
+ writeHex_ui32( z, ' ' );
+ writeGenOutput_flags( flags );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) return true;
+ }
+ return false;
+
+}
+
+static bool writeGenOutputs_ui64( uint_fast64_t z, uint_fast8_t flags )
+{
+
+ writeHex_ui64( z, ' ' );
+ writeGenOutput_flags( flags );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) return true;
+ }
+ return false;
+
+}
+
+#ifdef EXTFLOAT80
+
+static void writeHex_uiExtF80M( const extFloat80_t *aPtr, char sepChar )
+{
+ const struct extFloat80M *aSPtr;
+
+ aSPtr = (const struct extFloat80M *) aPtr;
+ writeHex_ui16( aSPtr->signExp, 0 );
+ writeHex_ui64( aSPtr->signif, sepChar );
+
+}
+
+static
+bool writeGenOutputs_extF80M( const extFloat80_t *aPtr, uint_fast8_t flags )
+{
+
+ writeHex_uiExtF80M( aPtr, ' ' );
+ writeGenOutput_flags( flags );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) return true;
+ }
+ return false;
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+static void writeHex_uiF128M( const float128_t *aPtr, char sepChar )
+{
+ const struct uint128 *uiAPtr;
+
+ uiAPtr = (const struct uint128 *) aPtr;
+ writeHex_ui64( uiAPtr->v64, 0 );
+ writeHex_ui64( uiAPtr->v0, sepChar );
+
+}
+
+static bool writeGenOutputs_f128M( const float128_t *aPtr, uint_fast8_t flags )
+{
+
+ writeHex_uiF128M( aPtr, ' ' );
+ writeGenOutput_flags( flags );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) return true;
+ }
+ return false;
+
+}
+
+#endif
+
+void gen_a_ui32( void )
+{
+
+ genCases_ui32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_ui32_a_next();
+ writeHex_ui32( genCases_ui32_a, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_a_ui64( void )
+{
+
+ genCases_ui64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_ui64_a_next();
+ writeHex_ui64( genCases_ui64_a, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_a_i32( void )
+{
+
+ genCases_i32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_i32_a_next();
+ writeHex_ui32( genCases_i32_a, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_a_i64( void )
+{
+
+ genCases_i64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_i64_a_next();
+ writeHex_ui64( genCases_i64_a, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+#ifdef FLOAT16
+
+void gen_a_f16( void )
+{
+ union ui16_f16 uA;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_ab_f16( void )
+{
+ union ui16_f16 u;
+
+ genCases_f16_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_ab_next();
+ u.f = genCases_f16_a;
+ writeHex_ui16( u.ui, ' ' );
+ u.f = genCases_f16_b;
+ writeHex_ui16( u.ui, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_abc_f16( void )
+{
+ union ui16_f16 u;
+
+ genCases_f16_abc_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_abc_next();
+ u.f = genCases_f16_a;
+ writeHex_ui16( u.ui, ' ' );
+ u.f = genCases_f16_b;
+ writeHex_ui16( u.ui, ' ' );
+ u.f = genCases_f16_c;
+ writeHex_ui16( u.ui, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+#endif
+
+void gen_a_f32( void )
+{
+ union ui32_f32 uA;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_ab_f32( void )
+{
+ union ui32_f32 u;
+
+ genCases_f32_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_ab_next();
+ u.f = genCases_f32_a;
+ writeHex_ui32( u.ui, ' ' );
+ u.f = genCases_f32_b;
+ writeHex_ui32( u.ui, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_abc_f32( void )
+{
+ union ui32_f32 u;
+
+ genCases_f32_abc_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_abc_next();
+ u.f = genCases_f32_a;
+ writeHex_ui32( u.ui, ' ' );
+ u.f = genCases_f32_b;
+ writeHex_ui32( u.ui, ' ' );
+ u.f = genCases_f32_c;
+ writeHex_ui32( u.ui, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+#ifdef FLOAT64
+
+void gen_a_f64( void )
+{
+ union ui64_f64 uA;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_ab_f64( void )
+{
+ union ui64_f64 u;
+
+ genCases_f64_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_ab_next();
+ u.f = genCases_f64_a;
+ writeHex_ui64( u.ui, ' ' );
+ u.f = genCases_f64_b;
+ writeHex_ui64( u.ui, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_abc_f64( void )
+{
+ union ui64_f64 u;
+
+ genCases_f64_abc_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_abc_next();
+ u.f = genCases_f64_a;
+ writeHex_ui64( u.ui, ' ' );
+ u.f = genCases_f64_b;
+ writeHex_ui64( u.ui, ' ' );
+ u.f = genCases_f64_c;
+ writeHex_ui64( u.ui, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void gen_a_extF80( void )
+{
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_ab_extF80( void )
+{
+
+ genCases_extF80_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_ab_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ writeHex_uiExtF80M( &genCases_extF80_b, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_abc_extF80( void )
+{
+
+ genCases_extF80_abc_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_abc_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ writeHex_uiExtF80M( &genCases_extF80_b, ' ' );
+ writeHex_uiExtF80M( &genCases_extF80_c, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void gen_a_f128( void )
+{
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_ab_f128( void )
+{
+
+ genCases_f128_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_ab_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ writeHex_uiF128M( &genCases_f128_b, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+void gen_abc_f128( void )
+{
+
+ genCases_f128_abc_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_abc_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ writeHex_uiF128M( &genCases_f128_b, ' ' );
+ writeHex_uiF128M( &genCases_f128_c, '\n' );
+ if ( genLoops_givenCount ) {
+ --genLoops_count;
+ if ( ! genLoops_count ) break;
+ }
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT16
+
+void gen_a_ui32_z_f16( float16_t trueFunction( uint32_t ) )
+{
+ union ui16_f16 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_ui32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_ui32_a_next();
+ writeHex_ui32( genCases_ui32_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_ui32_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui16( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void gen_a_ui32_z_f32( float32_t trueFunction( uint32_t ) )
+{
+ union ui32_f32 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_ui32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_ui32_a_next();
+ writeHex_ui32( genCases_ui32_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_ui32_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef FLOAT64
+
+void gen_a_ui32_z_f64( float64_t trueFunction( uint32_t ) )
+{
+ union ui64_f64 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_ui32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_ui32_a_next();
+ writeHex_ui32( genCases_ui32_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_ui32_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void gen_a_ui32_z_extF80( void trueFunction( uint32_t, extFloat80_t * ) )
+{
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_ui32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_ui32_a_next();
+ writeHex_ui32( genCases_ui32_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_ui32_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_extF80M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void gen_a_ui32_z_f128( void trueFunction( uint32_t, float128_t * ) )
+{
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_ui32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_ui32_a_next();
+ writeHex_ui32( genCases_ui32_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_ui32_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_f128M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT16
+
+void gen_a_ui64_z_f16( float16_t trueFunction( uint64_t ) )
+{
+ union ui16_f16 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_ui64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_ui64_a_next();
+ writeHex_ui64( genCases_ui64_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_ui64_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui16( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void gen_a_ui64_z_f32( float32_t trueFunction( uint64_t ) )
+{
+ union ui32_f32 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_ui64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_ui64_a_next();
+ writeHex_ui64( genCases_ui64_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_ui64_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef FLOAT64
+
+void gen_a_ui64_z_f64( float64_t trueFunction( uint64_t ) )
+{
+ union ui64_f64 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_ui64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_ui64_a_next();
+ writeHex_ui64( genCases_ui64_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_ui64_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void gen_a_ui64_z_extF80( void trueFunction( uint64_t, extFloat80_t * ) )
+{
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_ui64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_ui64_a_next();
+ writeHex_ui64( genCases_ui64_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_ui64_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_extF80M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void gen_a_ui64_z_f128( void trueFunction( uint64_t, float128_t * ) )
+{
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_ui64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_ui64_a_next();
+ writeHex_ui64( genCases_ui64_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_ui64_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_f128M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT16
+
+void gen_a_i32_z_f16( float16_t trueFunction( int32_t ) )
+{
+ union ui16_f16 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_i32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_i32_a_next();
+ writeHex_ui32( genCases_i32_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_i32_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui16( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void gen_a_i32_z_f32( float32_t trueFunction( int32_t ) )
+{
+ union ui32_f32 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_i32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_i32_a_next();
+ writeHex_ui32( genCases_i32_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_i32_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef FLOAT64
+
+void gen_a_i32_z_f64( float64_t trueFunction( int32_t ) )
+{
+ union ui64_f64 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_i32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_i32_a_next();
+ writeHex_ui32( genCases_i32_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_i32_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void gen_a_i32_z_extF80( void trueFunction( int32_t, extFloat80_t * ) )
+{
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_i32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_i32_a_next();
+ writeHex_ui32( genCases_i32_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_i32_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_extF80M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void gen_a_i32_z_f128( void trueFunction( int32_t, float128_t * ) )
+{
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_i32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_i32_a_next();
+ writeHex_ui32( genCases_i32_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_i32_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_f128M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT16
+
+void gen_a_i64_z_f16( float16_t trueFunction( int64_t ) )
+{
+ union ui16_f16 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_i64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_i64_a_next();
+ writeHex_ui64( genCases_i64_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_i64_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui16( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void gen_a_i64_z_f32( float32_t trueFunction( int64_t ) )
+{
+ union ui32_f32 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_i64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_i64_a_next();
+ writeHex_ui64( genCases_i64_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_i64_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef FLOAT64
+
+void gen_a_i64_z_f64( float64_t trueFunction( int64_t ) )
+{
+ union ui64_f64 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_i64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_i64_a_next();
+ writeHex_ui64( genCases_i64_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_i64_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void gen_a_i64_z_extF80( void trueFunction( int64_t, extFloat80_t * ) )
+{
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_i64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_i64_a_next();
+ writeHex_ui64( genCases_i64_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_i64_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_extF80M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void gen_a_i64_z_f128( void trueFunction( int64_t, float128_t * ) )
+{
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_i64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_i64_a_next();
+ writeHex_ui64( genCases_i64_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_i64_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_f128M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT16
+
+void
+ gen_a_f16_z_ui32_rx(
+ uint_fast32_t trueFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui16_f16 uA;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f16_z_ui64_rx(
+ uint_fast64_t trueFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui16_f16 uA;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f16_z_i32_rx(
+ int_fast32_t trueFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui16_f16 uA;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f16_z_i64_rx(
+ int_fast64_t trueFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui16_f16 uA;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f16_z_ui32_x(
+ uint_fast32_t trueFunction( float16_t, bool ), bool exact )
+{
+ union ui16_f16 uA;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f16_z_ui64_x(
+ uint_fast64_t trueFunction( float16_t, bool ), bool exact )
+{
+ union ui16_f16 uA;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f16_z_i32_x( int_fast32_t trueFunction( float16_t, bool ), bool exact )
+{
+ union ui16_f16 uA;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f16_z_i64_x( int_fast64_t trueFunction( float16_t, bool ), bool exact )
+{
+ union ui16_f16 uA;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void gen_a_f16_z_f32( float32_t trueFunction( float16_t ) )
+{
+ union ui16_f16 uA;
+ union ui32_f32 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_f16_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef FLOAT64
+
+void gen_a_f16_z_f64( float64_t trueFunction( float16_t ) )
+{
+ union ui16_f16 uA;
+ union ui64_f64 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_f16_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void gen_a_f16_z_extF80( void trueFunction( float16_t, extFloat80_t * ) )
+{
+ union ui16_f16 uA;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_f16_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_extF80M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void gen_a_f16_z_f128( void trueFunction( float16_t, float128_t * ) )
+{
+ union ui16_f16 uA;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ uA.f = genCases_f16_a;
+ writeHex_ui16( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_f16_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_f128M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void gen_az_f16( float16_t trueFunction( float16_t ) )
+{
+ union ui16_f16 u;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ u.f = genCases_f16_a;
+ writeHex_ui16( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ u.f = trueFunction( genCases_f16_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui16( u.ui, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_az_f16_rx(
+ float16_t trueFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui16_f16 u;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_a_next();
+ u.f = genCases_f16_a;
+ writeHex_ui16( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ u.f = trueFunction( genCases_f16_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui16( u.ui, trueFlags ) ) break;
+ }
+
+}
+
+void gen_abz_f16( float16_t trueFunction( float16_t, float16_t ) )
+{
+ union ui16_f16 u;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_ab_next();
+ u.f = genCases_f16_a;
+ writeHex_ui16( u.ui, ' ' );
+ u.f = genCases_f16_b;
+ writeHex_ui16( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ u.f = trueFunction( genCases_f16_a, genCases_f16_b );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui16( u.ui, trueFlags ) ) break;
+ }
+
+}
+
+void gen_abcz_f16( float16_t trueFunction( float16_t, float16_t, float16_t ) )
+{
+ union ui16_f16 u;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_abc_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_abc_next();
+ u.f = genCases_f16_a;
+ writeHex_ui16( u.ui, ' ' );
+ u.f = genCases_f16_b;
+ writeHex_ui16( u.ui, ' ' );
+ u.f = genCases_f16_c;
+ writeHex_ui16( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ u.f = trueFunction( genCases_f16_a, genCases_f16_b, genCases_f16_c );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui16( u.ui, trueFlags ) ) break;
+ }
+
+}
+
+void gen_ab_f16_z_bool( bool trueFunction( float16_t, float16_t ) )
+{
+ union ui16_f16 u;
+ bool trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f16_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f16_ab_next();
+ u.f = genCases_f16_a;
+ writeHex_ui16( u.ui, ' ' );
+ u.f = genCases_f16_b;
+ writeHex_ui16( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, genCases_f16_b );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_bool( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void
+ gen_a_f32_z_ui32_rx(
+ uint_fast32_t trueFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui32_f32 uA;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f32_z_ui64_rx(
+ uint_fast64_t trueFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui32_f32 uA;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f32_z_i32_rx(
+ int_fast32_t trueFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui32_f32 uA;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f32_z_i64_rx(
+ int_fast64_t trueFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui32_f32 uA;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f32_z_ui32_x(
+ uint_fast32_t trueFunction( float32_t, bool ), bool exact )
+{
+ union ui32_f32 uA;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f32_z_ui64_x(
+ uint_fast64_t trueFunction( float32_t, bool ), bool exact )
+{
+ union ui32_f32 uA;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f32_z_i32_x( int_fast32_t trueFunction( float32_t, bool ), bool exact )
+{
+ union ui32_f32 uA;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f32_z_i64_x( int_fast64_t trueFunction( float32_t, bool ), bool exact )
+{
+ union ui32_f32 uA;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef FLOAT16
+
+void gen_a_f32_z_f16( float16_t trueFunction( float32_t ) )
+{
+ union ui32_f32 uA;
+ union ui16_f16 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_f32_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui16( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT64
+
+void gen_a_f32_z_f64( float64_t trueFunction( float32_t ) )
+{
+ union ui32_f32 uA;
+ union ui64_f64 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_f32_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void gen_a_f32_z_extF80( void trueFunction( float32_t, extFloat80_t * ) )
+{
+ union ui32_f32 uA;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_f32_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_extF80M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void gen_a_f32_z_f128( void trueFunction( float32_t, float128_t * ) )
+{
+ union ui32_f32 uA;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ uA.f = genCases_f32_a;
+ writeHex_ui32( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_f32_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_f128M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void gen_az_f32( float32_t trueFunction( float32_t ) )
+{
+ union ui32_f32 u;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ u.f = genCases_f32_a;
+ writeHex_ui32( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ u.f = trueFunction( genCases_f32_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( u.ui, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_az_f32_rx(
+ float32_t trueFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui32_f32 u;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_a_next();
+ u.f = genCases_f32_a;
+ writeHex_ui32( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ u.f = trueFunction( genCases_f32_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( u.ui, trueFlags ) ) break;
+ }
+
+}
+
+void gen_abz_f32( float32_t trueFunction( float32_t, float32_t ) )
+{
+ union ui32_f32 u;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_ab_next();
+ u.f = genCases_f32_a;
+ writeHex_ui32( u.ui, ' ' );
+ u.f = genCases_f32_b;
+ writeHex_ui32( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ u.f = trueFunction( genCases_f32_a, genCases_f32_b );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( u.ui, trueFlags ) ) break;
+ }
+
+}
+
+void gen_abcz_f32( float32_t trueFunction( float32_t, float32_t, float32_t ) )
+{
+ union ui32_f32 u;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_abc_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_abc_next();
+ u.f = genCases_f32_a;
+ writeHex_ui32( u.ui, ' ' );
+ u.f = genCases_f32_b;
+ writeHex_ui32( u.ui, ' ' );
+ u.f = genCases_f32_c;
+ writeHex_ui32( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ u.f = trueFunction( genCases_f32_a, genCases_f32_b, genCases_f32_c );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( u.ui, trueFlags ) ) break;
+ }
+
+}
+
+void gen_ab_f32_z_bool( bool trueFunction( float32_t, float32_t ) )
+{
+ union ui32_f32 u;
+ bool trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f32_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f32_ab_next();
+ u.f = genCases_f32_a;
+ writeHex_ui32( u.ui, ' ' );
+ u.f = genCases_f32_b;
+ writeHex_ui32( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, genCases_f32_b );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_bool( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef FLOAT64
+
+void
+ gen_a_f64_z_ui32_rx(
+ uint_fast32_t trueFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui64_f64 uA;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f64_z_ui64_rx(
+ uint_fast64_t trueFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui64_f64 uA;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f64_z_i32_rx(
+ int_fast32_t trueFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui64_f64 uA;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f64_z_i64_rx(
+ int_fast64_t trueFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui64_f64 uA;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f64_z_ui32_x(
+ uint_fast32_t trueFunction( float64_t, bool ), bool exact )
+{
+ union ui64_f64 uA;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f64_z_ui64_x(
+ uint_fast64_t trueFunction( float64_t, bool ), bool exact )
+{
+ union ui64_f64 uA;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f64_z_i32_x( int_fast32_t trueFunction( float64_t, bool ), bool exact )
+{
+ union ui64_f64 uA;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f64_z_i64_x( int_fast64_t trueFunction( float64_t, bool ), bool exact )
+{
+ union ui64_f64 uA;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef FLOAT16
+
+void gen_a_f64_z_f16( float16_t trueFunction( float64_t ) )
+{
+ union ui64_f64 uA;
+ union ui16_f16 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_f64_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui16( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void gen_a_f64_z_f32( float32_t trueFunction( float64_t ) )
+{
+ union ui64_f64 uA;
+ union ui32_f32 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( genCases_f64_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef EXTFLOAT80
+
+void gen_a_f64_z_extF80( void trueFunction( float64_t, extFloat80_t * ) )
+{
+ union ui64_f64 uA;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_f64_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_extF80M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void gen_a_f64_z_f128( void trueFunction( float64_t, float128_t * ) )
+{
+ union ui64_f64 uA;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ uA.f = genCases_f64_a;
+ writeHex_ui64( uA.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_f64_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_f128M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void gen_az_f64( float64_t trueFunction( float64_t ) )
+{
+ union ui64_f64 u;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ u.f = genCases_f64_a;
+ writeHex_ui64( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ u.f = trueFunction( genCases_f64_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( u.ui, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_az_f64_rx(
+ float64_t trueFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ union ui64_f64 u;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_a_next();
+ u.f = genCases_f64_a;
+ writeHex_ui64( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ u.f = trueFunction( genCases_f64_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( u.ui, trueFlags ) ) break;
+ }
+
+}
+
+void gen_abz_f64( float64_t trueFunction( float64_t, float64_t ) )
+{
+ union ui64_f64 u;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_ab_next();
+ u.f = genCases_f64_a;
+ writeHex_ui64( u.ui, ' ' );
+ u.f = genCases_f64_b;
+ writeHex_ui64( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ u.f = trueFunction( genCases_f64_a, genCases_f64_b );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( u.ui, trueFlags ) ) break;
+ }
+
+}
+
+void gen_abcz_f64( float64_t trueFunction( float64_t, float64_t, float64_t ) )
+{
+ union ui64_f64 u;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_abc_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_abc_next();
+ u.f = genCases_f64_a;
+ writeHex_ui64( u.ui, ' ' );
+ u.f = genCases_f64_b;
+ writeHex_ui64( u.ui, ' ' );
+ u.f = genCases_f64_c;
+ writeHex_ui64( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ u.f = trueFunction( genCases_f64_a, genCases_f64_b, genCases_f64_c );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( u.ui, trueFlags ) ) break;
+ }
+
+}
+
+void gen_ab_f64_z_bool( bool trueFunction( float64_t, float64_t ) )
+{
+ union ui64_f64 u;
+ bool trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f64_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f64_ab_next();
+ u.f = genCases_f64_a;
+ writeHex_ui64( u.ui, ' ' );
+ u.f = genCases_f64_b;
+ writeHex_ui64( u.ui, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, genCases_f64_b );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_bool( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void
+ gen_a_extF80_z_ui32_rx(
+ uint_fast32_t trueFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_extF80_z_ui64_rx(
+ uint_fast64_t trueFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_extF80_z_i32_rx(
+ int_fast32_t trueFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_extF80_z_i64_rx(
+ int_fast64_t trueFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_extF80_z_ui32_x(
+ uint_fast32_t trueFunction( const extFloat80_t *, bool ), bool exact )
+{
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_extF80_z_ui64_x(
+ uint_fast64_t trueFunction( const extFloat80_t *, bool ), bool exact )
+{
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_extF80_z_i32_x(
+ int_fast32_t trueFunction( const extFloat80_t *, bool ), bool exact )
+{
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_extF80_z_i64_x(
+ int_fast64_t trueFunction( const extFloat80_t *, bool ), bool exact )
+{
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef FLOAT16
+
+void gen_a_extF80_z_f16( float16_t trueFunction( const extFloat80_t * ) )
+{
+ union ui16_f16 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( &genCases_extF80_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui16( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void gen_a_extF80_z_f32( float32_t trueFunction( const extFloat80_t * ) )
+{
+ union ui32_f32 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( &genCases_extF80_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef FLOAT64
+
+void gen_a_extF80_z_f64( float64_t trueFunction( const extFloat80_t * ) )
+{
+ union ui64_f64 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( &genCases_extF80_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void
+ gen_a_extF80_z_f128( void trueFunction( const extFloat80_t *, float128_t * ) )
+{
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_extF80_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_f128M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void gen_az_extF80( void trueFunction( const extFloat80_t *, extFloat80_t * ) )
+{
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_extF80_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_extF80M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_az_extF80_rx(
+ void
+ trueFunction( const extFloat80_t *, uint_fast8_t, bool, extFloat80_t * ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_a_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_extF80_a, roundingMode, exact, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_extF80M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_abz_extF80(
+ void
+ trueFunction(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * )
+ )
+{
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_ab_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ writeHex_uiExtF80M( &genCases_extF80_b, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_extF80_a, &genCases_extF80_b, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_extF80M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_ab_extF80_z_bool(
+ bool trueFunction( const extFloat80_t *, const extFloat80_t * ) )
+{
+ bool trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_extF80_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_extF80_ab_next();
+ writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
+ writeHex_uiExtF80M( &genCases_extF80_b, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, &genCases_extF80_b );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_bool( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void
+ gen_a_f128_z_ui32_rx(
+ uint_fast32_t trueFunction( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f128_z_ui64_rx(
+ uint_fast64_t trueFunction( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f128_z_i32_rx(
+ int_fast32_t trueFunction( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f128_z_i64_rx(
+ int_fast64_t trueFunction( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, roundingMode, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f128_z_ui32_x(
+ uint_fast32_t trueFunction( const float128_t *, bool ), bool exact )
+{
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f128_z_ui64_x(
+ uint_fast64_t trueFunction( const float128_t *, bool ), bool exact )
+{
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f128_z_i32_x(
+ int_fast32_t trueFunction( const float128_t *, bool ), bool exact )
+{
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_a_f128_z_i64_x(
+ int_fast64_t trueFunction( const float128_t *, bool ), bool exact )
+{
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, exact );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef FLOAT16
+
+void gen_a_f128_z_f16( float16_t trueFunction( const float128_t * ) )
+{
+ union ui16_f16 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( &genCases_f128_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui16( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void gen_a_f128_z_f32( float32_t trueFunction( const float128_t * ) )
+{
+ union ui32_f32 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( &genCases_f128_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui32( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#ifdef FLOAT64
+
+void gen_a_f128_z_f64( float64_t trueFunction( const float128_t * ) )
+{
+ union ui64_f64 uTrueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ uTrueZ.f = trueFunction( &genCases_f128_a );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_ui64( uTrueZ.ui, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void
+ gen_a_f128_z_extF80( void trueFunction( const float128_t *, extFloat80_t * ) )
+{
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_f128_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_extF80M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
+void gen_az_f128( void trueFunction( const float128_t *, float128_t * ) )
+{
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_f128_a, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_f128M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_az_f128_rx(
+ void trueFunction( const float128_t *, uint_fast8_t, bool, float128_t * ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_a_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_a_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_f128_a, roundingMode, exact, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_f128M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_abz_f128(
+ void trueFunction( const float128_t *, const float128_t *, float128_t * )
+ )
+{
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_ab_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ writeHex_uiF128M( &genCases_f128_b, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_f128_a, &genCases_f128_b, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_f128M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_abcz_f128(
+ void
+ trueFunction(
+ const float128_t *,
+ const float128_t *,
+ const float128_t *,
+ float128_t *
+ )
+ )
+{
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_abc_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_abc_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ writeHex_uiF128M( &genCases_f128_b, ' ' );
+ writeHex_uiF128M( &genCases_f128_c, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueFunction(
+ &genCases_f128_a, &genCases_f128_b, &genCases_f128_c, &trueZ );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_f128M( &trueZ, trueFlags ) ) break;
+ }
+
+}
+
+void
+ gen_ab_f128_z_bool(
+ bool trueFunction( const float128_t *, const float128_t * ) )
+{
+ bool trueZ;
+ uint_fast8_t trueFlags;
+
+ genCases_f128_ab_init();
+ checkEnoughCases();
+ while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
+ genCases_f128_ab_next();
+ writeHex_uiF128M( &genCases_f128_a, ' ' );
+ writeHex_uiF128M( &genCases_f128_b, ' ' );
+ *genLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, &genCases_f128_b );
+ trueFlags = *genLoops_trueFlagsPtr;
+ if ( writeGenOutputs_bool( trueZ, trueFlags ) ) break;
+ }
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/genLoops.h b/src/libs/softfloat-3e/testfloat/source/genLoops.h
new file mode 100644
index 00000000..2ca88c7b
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/genLoops.h
@@ -0,0 +1,354 @@
+
+/*============================================================================
+
+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, 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.
+
+=============================================================================*/
+
+#include
+#include
+#include
+#include "softfloat.h"
+
+extern volatile sig_atomic_t genLoops_stop;
+
+extern bool genLoops_forever;
+extern bool genLoops_givenCount;
+extern uint_fast64_t genLoops_count;
+extern uint_fast8_t *genLoops_trueFlagsPtr;
+
+void gen_a_ui32( void );
+void gen_a_ui64( void );
+void gen_a_i32( void );
+void gen_a_i64( void );
+#ifdef FLOAT16
+void gen_a_f16( void );
+void gen_ab_f16( void );
+void gen_abc_f16( void );
+#endif
+void gen_a_f32( void );
+void gen_ab_f32( void );
+void gen_abc_f32( void );
+#ifdef FLOAT64
+void gen_a_f64( void );
+void gen_ab_f64( void );
+void gen_abc_f64( void );
+#endif
+#ifdef EXTFLOAT80
+void gen_a_extF80( void );
+void gen_ab_extF80( void );
+void gen_abc_extF80( void );
+#endif
+#ifdef FLOAT128
+void gen_a_f128( void );
+void gen_ab_f128( void );
+void gen_abc_f128( void );
+#endif
+
+#ifdef FLOAT16
+void gen_a_ui32_z_f16( float16_t ( uint32_t ) );
+#endif
+void gen_a_ui32_z_f32( float32_t ( uint32_t ) );
+#ifdef FLOAT64
+void gen_a_ui32_z_f64( float64_t ( uint32_t ) );
+#endif
+#ifdef EXTFLOAT80
+void gen_a_ui32_z_extF80( void ( uint32_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void gen_a_ui32_z_f128( void ( uint32_t, float128_t * ) );
+#endif
+#ifdef FLOAT16
+void gen_a_ui64_z_f16( float16_t ( uint64_t ) );
+#endif
+void gen_a_ui64_z_f32( float32_t ( uint64_t ) );
+#ifdef FLOAT64
+void gen_a_ui64_z_f64( float64_t ( uint64_t ) );
+#endif
+#ifdef EXTFLOAT80
+void gen_a_ui64_z_extF80( void ( uint64_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void gen_a_ui64_z_f128( void ( uint64_t, float128_t * ) );
+#endif
+#ifdef FLOAT16
+void gen_a_i32_z_f16( float16_t ( int32_t ) );
+#endif
+void gen_a_i32_z_f32( float32_t ( int32_t ) );
+#ifdef FLOAT64
+void gen_a_i32_z_f64( float64_t ( int32_t ) );
+#endif
+#ifdef EXTFLOAT80
+void gen_a_i32_z_extF80( void ( int32_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void gen_a_i32_z_f128( void ( int32_t, float128_t * ) );
+#endif
+#ifdef FLOAT16
+void gen_a_i64_z_f16( float16_t ( int64_t ) );
+#endif
+void gen_a_i64_z_f32( float32_t ( int64_t ) );
+#ifdef FLOAT64
+void gen_a_i64_z_f64( float64_t ( int64_t ) );
+#endif
+#ifdef EXTFLOAT80
+void gen_a_i64_z_extF80( void ( int64_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void gen_a_i64_z_f128( void ( int64_t, float128_t * ) );
+#endif
+
+#ifdef FLOAT16
+void
+ gen_a_f16_z_ui32_rx(
+ uint_fast32_t ( float16_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ gen_a_f16_z_ui64_rx(
+ uint_fast64_t ( float16_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ gen_a_f16_z_i32_rx(
+ int_fast32_t ( float16_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ gen_a_f16_z_i64_rx(
+ int_fast64_t ( float16_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void gen_a_f16_z_ui32_x( uint_fast32_t ( float16_t, bool ), bool );
+void gen_a_f16_z_ui64_x( uint_fast64_t ( float16_t, bool ), bool );
+void gen_a_f16_z_i32_x( int_fast32_t ( float16_t, bool ), bool );
+void gen_a_f16_z_i64_x( int_fast64_t ( float16_t, bool ), bool );
+void gen_a_f16_z_f32( float32_t ( float16_t ) );
+#ifdef FLOAT64
+void gen_a_f16_z_f64( float64_t ( float16_t ) );
+#endif
+#ifdef EXTFLOAT80
+void gen_a_f16_z_extF80( void ( float16_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void gen_a_f16_z_f128( void ( float16_t, float128_t * ) );
+#endif
+void gen_az_f16( float16_t ( float16_t ) );
+void
+ gen_az_f16_rx(
+ float16_t ( float16_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void gen_abz_f16( float16_t ( float16_t, float16_t ) );
+void gen_abcz_f16( float16_t ( float16_t, float16_t, float16_t ) );
+void gen_ab_f16_z_bool( bool ( float16_t, float16_t ) );
+#endif
+
+void
+ gen_a_f32_z_ui32_rx(
+ uint_fast32_t ( float32_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ gen_a_f32_z_ui64_rx(
+ uint_fast64_t ( float32_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ gen_a_f32_z_i32_rx(
+ int_fast32_t ( float32_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ gen_a_f32_z_i64_rx(
+ int_fast64_t ( float32_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void gen_a_f32_z_ui32_x( uint_fast32_t ( float32_t, bool ), bool );
+void gen_a_f32_z_ui64_x( uint_fast64_t ( float32_t, bool ), bool );
+void gen_a_f32_z_i32_x( int_fast32_t ( float32_t, bool ), bool );
+void gen_a_f32_z_i64_x( int_fast64_t ( float32_t, bool ), bool );
+#ifdef FLOAT16
+void gen_a_f32_z_f16( float16_t ( float32_t ) );
+#endif
+#ifdef FLOAT64
+void gen_a_f32_z_f64( float64_t ( float32_t ) );
+#endif
+#ifdef EXTFLOAT80
+void gen_a_f32_z_extF80( void ( float32_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void gen_a_f32_z_f128( void ( float32_t, float128_t * ) );
+#endif
+void gen_az_f32( float32_t ( float32_t ) );
+void
+ gen_az_f32_rx(
+ float32_t ( float32_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void gen_abz_f32( float32_t ( float32_t, float32_t ) );
+void gen_abcz_f32( float32_t ( float32_t, float32_t, float32_t ) );
+void gen_ab_f32_z_bool( bool ( float32_t, float32_t ) );
+
+#ifdef FLOAT64
+void
+ gen_a_f64_z_ui32_rx(
+ uint_fast32_t ( float64_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ gen_a_f64_z_ui64_rx(
+ uint_fast64_t ( float64_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ gen_a_f64_z_i32_rx(
+ int_fast32_t ( float64_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void
+ gen_a_f64_z_i64_rx(
+ int_fast64_t ( float64_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void gen_a_f64_z_ui32_x( uint_fast32_t ( float64_t, bool ), bool );
+void gen_a_f64_z_ui64_x( uint_fast64_t ( float64_t, bool ), bool );
+void gen_a_f64_z_i32_x( int_fast32_t ( float64_t, bool ), bool );
+void gen_a_f64_z_i64_x( int_fast64_t ( float64_t, bool ), bool );
+#ifdef FLOAT16
+void gen_a_f64_z_f16( float16_t ( float64_t ) );
+#endif
+void gen_a_f64_z_f32( float32_t ( float64_t ) );
+#ifdef EXTFLOAT80
+void gen_a_f64_z_extF80( void ( float64_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void gen_a_f64_z_f128( void ( float64_t, float128_t * ) );
+#endif
+void gen_az_f64( float64_t ( float64_t ) );
+void
+ gen_az_f64_rx(
+ float64_t ( float64_t, uint_fast8_t, bool ), uint_fast8_t, bool );
+void gen_abz_f64( float64_t ( float64_t, float64_t ) );
+void gen_abcz_f64( float64_t ( float64_t, float64_t, float64_t ) );
+void gen_ab_f64_z_bool( bool ( float64_t, float64_t ) );
+#endif
+
+#ifdef EXTFLOAT80
+void
+ gen_a_extF80_z_ui32_rx(
+ uint_fast32_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ gen_a_extF80_z_ui64_rx(
+ uint_fast64_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ gen_a_extF80_z_i32_rx(
+ int_fast32_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ gen_a_extF80_z_i64_rx(
+ int_fast64_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ gen_a_extF80_z_ui32_x( uint_fast32_t ( const extFloat80_t *, bool ), bool );
+void
+ gen_a_extF80_z_ui64_x( uint_fast64_t ( const extFloat80_t *, bool ), bool );
+void gen_a_extF80_z_i32_x( int_fast32_t ( const extFloat80_t *, bool ), bool );
+void gen_a_extF80_z_i64_x( int_fast64_t ( const extFloat80_t *, bool ), bool );
+#ifdef FLOAT16
+void gen_a_extF80_z_f16( float16_t ( const extFloat80_t * ) );
+#endif
+void gen_a_extF80_z_f32( float32_t ( const extFloat80_t * ) );
+#ifdef FLOAT64
+void gen_a_extF80_z_f64( float64_t ( const extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void gen_a_extF80_z_f128( void ( const extFloat80_t *, float128_t * ) );
+#endif
+void gen_az_extF80( void ( const extFloat80_t *, extFloat80_t * ) );
+void
+ gen_az_extF80_rx(
+ void ( const extFloat80_t *, uint_fast8_t, bool, extFloat80_t * ),
+ uint_fast8_t,
+ bool
+ );
+void
+ gen_abz_extF80(
+ void ( const extFloat80_t *, const extFloat80_t *, extFloat80_t * ) );
+void
+ gen_ab_extF80_z_bool( bool ( const extFloat80_t *, const extFloat80_t * ) );
+#endif
+
+#ifdef FLOAT128
+void
+ gen_a_f128_z_ui32_rx(
+ uint_fast32_t ( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ gen_a_f128_z_ui64_rx(
+ uint_fast64_t ( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ gen_a_f128_z_i32_rx(
+ int_fast32_t ( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ gen_a_f128_z_i64_rx(
+ int_fast64_t ( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void gen_a_f128_z_ui32_x( uint_fast32_t ( const float128_t *, bool ), bool );
+void gen_a_f128_z_ui64_x( uint_fast64_t ( const float128_t *, bool ), bool );
+void gen_a_f128_z_i32_x( int_fast32_t ( const float128_t *, bool ), bool );
+void gen_a_f128_z_i64_x( int_fast64_t ( const float128_t *, bool ), bool );
+#ifdef FLOAT16
+void gen_a_f128_z_f16( float16_t ( const float128_t * ) );
+#endif
+void gen_a_f128_z_f32( float32_t ( const float128_t * ) );
+#ifdef FLOAT64
+void gen_a_f128_z_f64( float64_t ( const float128_t * ) );
+#endif
+#ifdef EXTFLOAT80
+void gen_a_f128_z_extF80( void ( const float128_t *, extFloat80_t * ) );
+#endif
+void gen_az_f128( void ( const float128_t *, float128_t * ) );
+void
+ gen_az_f128_rx(
+ void ( const float128_t *, uint_fast8_t, bool, float128_t * ),
+ uint_fast8_t,
+ bool
+ );
+void
+ gen_abz_f128( void ( const float128_t *, const float128_t *, float128_t * ) );
+void
+ gen_abcz_f128(
+ void
+ (
+ const float128_t *,
+ const float128_t *,
+ const float128_t *,
+ float128_t *
+ )
+ );
+void gen_ab_f128_z_bool( bool ( const float128_t *, const float128_t * ) );
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/random.c b/src/libs/softfloat-3e/testfloat/source/random.c
new file mode 100644
index 00000000..715c8cc1
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/random.c
@@ -0,0 +1,138 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "random.h"
+
+uint_fast8_t random_ui8( void )
+{
+
+ return rand()>>4 & 0xFF;
+
+}
+
+uint_fast16_t random_ui16( void )
+{
+
+ return (rand() & 0x0FF0)<<4 | (rand()>>4 & 0xFF);
+
+}
+
+uint_fast32_t random_ui32( void )
+{
+
+ return
+ (uint_fast32_t) (rand() & 0x0FF0)<<20
+ | (uint_fast32_t) (rand() & 0x0FF0)<<12
+ | (rand() & 0x0FF0)<<4
+ | (rand()>>4 & 0xFF);
+
+}
+
+uint_fast64_t random_ui64( void )
+{
+
+ return (uint_fast64_t) random_ui32()<<32 | random_ui32();
+
+}
+
+uint_fast8_t randomN_ui8( uint_fast8_t N )
+{
+ uint_fast8_t scale, z;
+
+ scale = 0;
+ while ( N < 0x80 ) {
+ ++scale;
+ N <<= 1;
+ }
+ do {
+ z = random_ui8();
+ } while ( N <= z );
+ return z>>scale;
+
+}
+
+uint_fast16_t randomN_ui16( uint_fast16_t N )
+{
+ uint_fast16_t scale, z;
+
+ scale = 0;
+ while ( N < 0x8000 ) {
+ ++scale;
+ N <<= 1;
+ }
+ do {
+ z = random_ui16();
+ } while ( N <= z );
+ return z>>scale;
+
+}
+
+uint_fast32_t randomN_ui32( uint_fast32_t N )
+{
+ uint_fast32_t scale, z;
+
+ scale = 0;
+ while ( N < 0x8000 ) {
+ ++scale;
+ N <<= 1;
+ }
+ do {
+ z = random_ui32();
+ } while ( N <= z );
+ return z>>scale;
+
+}
+
+uint_fast64_t randomN_ui64( uint_fast64_t N )
+{
+ uint_fast64_t scale, z;
+
+ scale = 0;
+ while ( N < 0x8000 ) {
+ ++scale;
+ N <<= 1;
+ }
+ do {
+ z = random_ui64();
+ } while ( N <= z );
+ return z>>scale;
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/random.h b/src/libs/softfloat-3e/testfloat/source/random.h
new file mode 100644
index 00000000..08c8cd27
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/random.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 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.
+
+=============================================================================*/
+
+#include
+
+uint_fast8_t random_ui8( void );
+uint_fast16_t random_ui16( void );
+uint_fast32_t random_ui32( void );
+uint_fast64_t random_ui64( void );
+
+uint_fast8_t randomN_ui8( uint_fast8_t );
+uint_fast16_t randomN_ui16( uint_fast16_t );
+uint_fast32_t randomN_ui32( uint_fast32_t );
+uint_fast64_t randomN_ui64( uint_fast64_t );
+
diff --git a/src/libs/softfloat-3e/testfloat/source/readHex.c b/src/libs/softfloat-3e/testfloat/source/readHex.c
new file mode 100644
index 00000000..0e1b50c7
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/readHex.c
@@ -0,0 +1,190 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include
+#include
+#include "platform.h"
+#include "readHex.h"
+
+bool readHex_bool( bool *aPtr, char sepChar )
+{
+ int i;
+ bool a;
+
+ i = fgetc( stdin );
+ if ( (i == EOF) || (i < '0') || ('1' < i) ) return false;
+ a = i - '0';
+ if ( sepChar ) {
+ i = fgetc( stdin );
+ if ( (sepChar != '\n') || (i != '\r') ) {
+ if ( i != sepChar ) return false;
+ }
+ }
+ *aPtr = a;
+ return true;
+
+}
+
+bool readHex_ui8( uint_least8_t *aPtr, char sepChar )
+{
+ int i;
+ uint_fast8_t a;
+
+ i = fgetc( stdin );
+ if ( i == EOF ) return false;
+ if ( ('0' <= i) && (i <= '9') ) {
+ i -= '0';
+ } else if ( ('A' <= i) && (i <= 'F') ) {
+ i -= 'A' - 10;
+ } else if ( ('a' <= i) && (i <= 'f') ) {
+ i -= 'a' - 10;
+ } else {
+ return false;
+ }
+ a = i<<4;
+ i = fgetc( stdin );
+ if ( i == EOF ) return false;
+ if ( ('0' <= i) && (i <= '9') ) {
+ i -= '0';
+ } else if ( ('A' <= i) && (i <= 'F') ) {
+ i -= 'A' - 10;
+ } else if ( ('a' <= i) && (i <= 'f') ) {
+ i -= 'a' - 10;
+ } else {
+ return false;
+ }
+ a |= i;
+ if ( sepChar ) {
+ i = fgetc( stdin );
+ if ( (sepChar != '\n') || (i != '\r') ) {
+ if ( i != sepChar ) return false;
+ }
+ }
+ *aPtr = a;
+ return true;
+
+}
+
+bool readHex_ui16( uint16_t *aPtr, char sepChar )
+{
+ int i;
+ uint_fast16_t a;
+
+ i = fgetc( stdin );
+ if ( i == EOF ) return false;
+ if ( ('0' <= i) && (i <= '9') ) {
+ i -= '0';
+ } else if ( ('A' <= i) && (i <= 'F') ) {
+ i -= 'A' - 10;
+ } else if ( ('a' <= i) && (i <= 'f') ) {
+ i -= 'a' - 10;
+ } else {
+ return false;
+ }
+ a = (uint_fast16_t) i<<12;
+ i = fgetc( stdin );
+ if ( i == EOF ) return false;
+ if ( ('0' <= i) && (i <= '9') ) {
+ i -= '0';
+ } else if ( ('A' <= i) && (i <= 'F') ) {
+ i -= 'A' - 10;
+ } else if ( ('a' <= i) && (i <= 'f') ) {
+ i -= 'a' - 10;
+ } else {
+ return false;
+ }
+ a |= (uint_fast16_t) i<<8;
+ i = fgetc( stdin );
+ if ( i == EOF ) return false;
+ if ( ('0' <= i) && (i <= '9') ) {
+ i -= '0';
+ } else if ( ('A' <= i) && (i <= 'F') ) {
+ i -= 'A' - 10;
+ } else if ( ('a' <= i) && (i <= 'f') ) {
+ i -= 'a' - 10;
+ } else {
+ return false;
+ }
+ a |= (uint_fast16_t) i<<4;
+ i = fgetc( stdin );
+ if ( i == EOF ) return false;
+ if ( ('0' <= i) && (i <= '9') ) {
+ i -= '0';
+ } else if ( ('A' <= i) && (i <= 'F') ) {
+ i -= 'A' - 10;
+ } else if ( ('a' <= i) && (i <= 'f') ) {
+ i -= 'a' - 10;
+ } else {
+ return false;
+ }
+ a |= i;
+ if ( sepChar ) {
+ i = fgetc( stdin );
+ if ( (sepChar != '\n') || (i != '\r') ) {
+ if ( i != sepChar ) return false;
+ }
+ }
+ *aPtr = a;
+ return true;
+
+}
+
+bool readHex_ui32( uint32_t *aPtr, char sepChar )
+{
+ uint16_t v16, v0;
+
+ if ( ! readHex_ui16( &v16, 0 ) || ! readHex_ui16( &v0, sepChar ) ) {
+ return false;
+ }
+ *aPtr = (uint_fast32_t) v16<<16 | v0;
+ return true;
+
+}
+
+bool readHex_ui64( uint64_t *aPtr, char sepChar )
+{
+ uint32_t v32, v0;
+
+ if ( ! readHex_ui32( &v32, 0 ) || ! readHex_ui32( &v0, sepChar ) ) {
+ return false;
+ }
+ *aPtr = (uint_fast64_t) v32<<32 | v0;
+ return true;
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/readHex.h b/src/libs/softfloat-3e/testfloat/source/readHex.h
new file mode 100644
index 00000000..ff323812
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/readHex.h
@@ -0,0 +1,46 @@
+
+/*============================================================================
+
+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 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.
+
+=============================================================================*/
+
+#include
+#include
+
+bool readHex_bool( bool *, char );
+bool readHex_ui8( uint_least8_t *, char );
+bool readHex_ui16( uint16_t *, char );
+bool readHex_ui32( uint32_t *, char );
+bool readHex_ui64( uint64_t *, char );
+
diff --git a/src/libs/softfloat-3e/testfloat/source/slowfloat.c b/src/libs/softfloat-3e/testfloat/source/slowfloat.c
new file mode 100644
index 00000000..4e84656b
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/slowfloat.c
@@ -0,0 +1,3749 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "uint128.h"
+#include "softfloat.h"
+#include "slowfloat.h"
+
+uint_fast8_t slowfloat_roundingMode;
+uint_fast8_t slowfloat_detectTininess;
+uint_fast8_t slowfloat_exceptionFlags;
+#ifdef EXTFLOAT80
+uint_fast8_t slow_extF80_roundingPrecision;
+#endif
+
+#ifdef FLOAT16
+union ui16_f16 { uint16_t ui; float16_t f; };
+#endif
+union ui32_f32 { uint32_t ui; float32_t f; };
+#ifdef FLOAT64
+union ui64_f64 { uint64_t ui; float64_t f; };
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+struct floatX {
+ bool isNaN;
+ bool isInf;
+ bool isZero;
+ bool sign;
+ int_fast32_t exp;
+ struct uint128 sig;
+};
+
+static const struct floatX floatXNaN =
+ { true, false, false, false, 0, { 0, 0 } };
+static const struct floatX floatXPositiveZero =
+ { false, false, true, false, 0, { 0, 0 } };
+static const struct floatX floatXNegativeZero =
+ { false, false, true, true, 0, { 0, 0 } };
+
+static
+void
+ roundFloatXTo11(
+ bool isTiny, struct floatX *xPtr, uint_fast8_t roundingMode, bool exact )
+{
+ uint_fast64_t roundBits, sigX64;
+
+ sigX64 = xPtr->sig.v64;
+ roundBits = (sigX64 & UINT64_C( 0x1FFFFFFFFFFF )) | (xPtr->sig.v0 != 0);
+ if ( roundBits ) {
+ sigX64 &= UINT64_C( 0xFFFFE00000000000 );
+ if ( exact ) slowfloat_exceptionFlags |= softfloat_flag_inexact;
+ if ( isTiny ) slowfloat_exceptionFlags |= softfloat_flag_underflow;
+ switch ( roundingMode ) {
+ case softfloat_round_near_even:
+ if ( roundBits < UINT64_C( 0x100000000000 ) ) goto noIncrement;
+ if (
+ (roundBits == UINT64_C( 0x100000000000 ))
+ && !(sigX64 & UINT64_C( 0x200000000000 ))
+ ) {
+ goto noIncrement;
+ }
+ break;
+ case softfloat_round_minMag:
+ goto noIncrement;
+ case softfloat_round_min:
+ if ( !xPtr->sign ) goto noIncrement;
+ break;
+ case softfloat_round_max:
+ if ( xPtr->sign ) goto noIncrement;
+ break;
+ case softfloat_round_near_maxMag:
+ if ( roundBits < UINT64_C( 0x100000000000 ) ) goto noIncrement;
+ break;
+#ifdef FLOAT_ROUND_ODD
+ case softfloat_round_odd:
+ sigX64 |= UINT64_C( 0x200000000000 );
+ goto noIncrement;
+#endif
+ }
+ sigX64 += UINT64_C( 0x200000000000 );
+ if ( sigX64 == UINT64_C( 0x0100000000000000 ) ) {
+ ++xPtr->exp;
+ sigX64 = UINT64_C( 0x0080000000000000 );
+ }
+ noIncrement:
+ xPtr->sig.v64 = sigX64;
+ xPtr->sig.v0 = 0;
+ }
+
+}
+
+static
+void
+ roundFloatXTo24(
+ bool isTiny, struct floatX *xPtr, uint_fast8_t roundingMode, bool exact )
+{
+ uint_fast64_t sigX64;
+ uint_fast32_t roundBits;
+
+ sigX64 = xPtr->sig.v64;
+ roundBits = (uint32_t) sigX64 | (xPtr->sig.v0 != 0);
+ if ( roundBits ) {
+ sigX64 &= UINT64_C( 0xFFFFFFFF00000000 );
+ if ( exact ) slowfloat_exceptionFlags |= softfloat_flag_inexact;
+ if ( isTiny ) slowfloat_exceptionFlags |= softfloat_flag_underflow;
+ switch ( roundingMode ) {
+ case softfloat_round_near_even:
+ if ( roundBits < 0x80000000 ) goto noIncrement;
+ if (
+ (roundBits == 0x80000000)
+ && !(sigX64 & UINT64_C( 0x100000000 ))
+ ) {
+ goto noIncrement;
+ }
+ break;
+ case softfloat_round_minMag:
+ goto noIncrement;
+ case softfloat_round_min:
+ if ( !xPtr->sign ) goto noIncrement;
+ break;
+ case softfloat_round_max:
+ if ( xPtr->sign ) goto noIncrement;
+ break;
+ case softfloat_round_near_maxMag:
+ if ( roundBits < 0x80000000 ) goto noIncrement;
+ break;
+#ifdef FLOAT_ROUND_ODD
+ case softfloat_round_odd:
+ sigX64 |= UINT64_C( 0x100000000 );
+ goto noIncrement;
+#endif
+ }
+ sigX64 += UINT64_C( 0x100000000 );
+ if ( sigX64 == UINT64_C( 0x0100000000000000 ) ) {
+ ++xPtr->exp;
+ sigX64 = UINT64_C( 0x0080000000000000 );
+ }
+ noIncrement:
+ xPtr->sig.v64 = sigX64;
+ xPtr->sig.v0 = 0;
+ }
+
+}
+
+static
+void
+ roundFloatXTo53(
+ bool isTiny, struct floatX *xPtr, uint_fast8_t roundingMode, bool exact )
+{
+ uint_fast64_t sigX64;
+ uint_fast8_t roundBits;
+
+ sigX64 = xPtr->sig.v64;
+ roundBits = (sigX64 & 7) | (xPtr->sig.v0 != 0);
+ if ( roundBits ) {
+ sigX64 &= UINT64_C( 0xFFFFFFFFFFFFFFF8 );
+ if ( exact ) slowfloat_exceptionFlags |= softfloat_flag_inexact;
+ if ( isTiny ) slowfloat_exceptionFlags |= softfloat_flag_underflow;
+ switch ( roundingMode ) {
+ case softfloat_round_near_even:
+ if ( roundBits < 4 ) goto noIncrement;
+ if ( (roundBits == 4) && !(sigX64 & 8) ) goto noIncrement;
+ break;
+ case softfloat_round_minMag:
+ goto noIncrement;
+ case softfloat_round_min:
+ if ( !xPtr->sign ) goto noIncrement;
+ break;
+ case softfloat_round_max:
+ if ( xPtr->sign ) goto noIncrement;
+ break;
+ case softfloat_round_near_maxMag:
+ if ( roundBits < 4 ) goto noIncrement;
+ break;
+#ifdef FLOAT_ROUND_ODD
+ case softfloat_round_odd:
+ sigX64 |= 8;
+ goto noIncrement;
+#endif
+ }
+ sigX64 += 8;
+ if ( sigX64 == UINT64_C( 0x0100000000000000 ) ) {
+ ++xPtr->exp;
+ sigX64 = UINT64_C( 0x0080000000000000 );
+ }
+ noIncrement:
+ xPtr->sig.v64 = sigX64;
+ xPtr->sig.v0 = 0;
+ }
+
+}
+
+static
+void
+ roundFloatXTo64(
+ bool isTiny, struct floatX *xPtr, uint_fast8_t roundingMode, bool exact )
+{
+ uint_fast64_t sigX0, roundBits, sigX64;
+
+ sigX0 = xPtr->sig.v0;
+ roundBits = sigX0 & UINT64_C( 0x00FFFFFFFFFFFFFF );
+ if ( roundBits ) {
+ sigX0 &= UINT64_C( 0xFF00000000000000 );
+ if ( exact ) slowfloat_exceptionFlags |= softfloat_flag_inexact;
+ if ( isTiny ) slowfloat_exceptionFlags |= softfloat_flag_underflow;
+ switch ( roundingMode ) {
+ case softfloat_round_near_even:
+ if ( roundBits < UINT64_C( 0x0080000000000000 ) ) goto noIncrement;
+ if (
+ (roundBits == UINT64_C( 0x0080000000000000 ))
+ && !(sigX0 & UINT64_C( 0x0100000000000000 ))
+ ) {
+ goto noIncrement;
+ }
+ break;
+ case softfloat_round_minMag:
+ goto noIncrement;
+ case softfloat_round_min:
+ if ( !xPtr->sign ) goto noIncrement;
+ break;
+ case softfloat_round_max:
+ if ( xPtr->sign ) goto noIncrement;
+ break;
+ case softfloat_round_near_maxMag:
+ if ( roundBits < UINT64_C( 0x0080000000000000 ) ) goto noIncrement;
+ break;
+#ifdef FLOAT_ROUND_ODD
+ case softfloat_round_odd:
+ sigX0 |= UINT64_C( 0x100000000000000 );
+ goto noIncrement;
+#endif
+ }
+ sigX0 += UINT64_C( 0x100000000000000 );
+ sigX64 = xPtr->sig.v64 + !sigX0;
+ if ( sigX64 == UINT64_C( 0x0100000000000000 ) ) {
+ ++xPtr->exp;
+ sigX64 = UINT64_C( 0x0080000000000000 );
+ }
+ xPtr->sig.v64 = sigX64;
+ noIncrement:
+ xPtr->sig.v0 = sigX0;
+ }
+
+}
+
+static
+void
+ roundFloatXTo113(
+ bool isTiny, struct floatX *xPtr, uint_fast8_t roundingMode, bool exact )
+{
+ uint_fast64_t sigX0;
+ uint_fast8_t roundBits;
+ uint_fast64_t sigX64;
+
+ sigX0 = xPtr->sig.v0;
+ roundBits = sigX0 & 0x7F;
+ if ( roundBits ) {
+ sigX0 &= UINT64_C( 0xFFFFFFFFFFFFFF80 );
+ if ( exact ) slowfloat_exceptionFlags |= softfloat_flag_inexact;
+ if ( isTiny ) slowfloat_exceptionFlags |= softfloat_flag_underflow;
+ switch ( roundingMode ) {
+ case softfloat_round_near_even:
+ if ( roundBits < 0x40 ) goto noIncrement;
+ if ( (roundBits == 0x40) && !(sigX0 & 0x80) ) goto noIncrement;
+ break;
+ case softfloat_round_minMag:
+ goto noIncrement;
+ case softfloat_round_min:
+ if ( !xPtr->sign ) goto noIncrement;
+ break;
+ case softfloat_round_max:
+ if ( xPtr->sign ) goto noIncrement;
+ break;
+ case softfloat_round_near_maxMag:
+ if ( roundBits < 0x40 ) goto noIncrement;
+ break;
+#ifdef FLOAT_ROUND_ODD
+ case softfloat_round_odd:
+ sigX0 |= 0x80;
+ goto noIncrement;
+#endif
+ }
+ sigX0 += 0x80;
+ sigX64 = xPtr->sig.v64 + !sigX0;
+ if ( sigX64 == UINT64_C( 0x0100000000000000 ) ) {
+ ++xPtr->exp;
+ sigX64 = UINT64_C( 0x0080000000000000 );
+ }
+ xPtr->sig.v64 = sigX64;
+ noIncrement:
+ xPtr->sig.v0 = sigX0;
+ }
+
+}
+
+static void ui32ToFloatX( uint_fast32_t a, struct floatX *xPtr )
+{
+ uint_fast64_t sig64;
+ int_fast32_t exp;
+
+ xPtr->isNaN = false;
+ xPtr->isInf = false;
+ xPtr->sign = false;
+ sig64 = a;
+ if ( a ) {
+ xPtr->isZero = false;
+ exp = 31;
+ sig64 <<= 24;
+ while ( sig64 < UINT64_C( 0x0080000000000000 ) ) {
+ --exp;
+ sig64 <<= 1;
+ }
+ xPtr->exp = exp;
+ } else {
+ xPtr->isZero = true;
+ }
+ xPtr->sig.v64 = sig64;
+ xPtr->sig.v0 = 0;
+
+}
+
+static
+uint_fast32_t
+ floatXToUI32(
+ const struct floatX *xPtr, uint_fast8_t roundingMode, bool exact )
+{
+ uint_fast8_t savedExceptionFlags;
+ struct floatX x;
+ int_fast32_t shiftDist;
+ uint_fast32_t z;
+
+ if ( xPtr->isInf || xPtr->isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ return (xPtr->isInf && xPtr->sign) ? 0 : 0xFFFFFFFF;
+ }
+ if ( xPtr->isZero ) return 0;
+ savedExceptionFlags = slowfloat_exceptionFlags;
+ x = *xPtr;
+ shiftDist = 52 - x.exp;
+ if ( 56 < shiftDist ) {
+ x.sig.v64 = 0;
+ x.sig.v0 = 1;
+ } else {
+ while ( 0 < shiftDist ) {
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ --shiftDist;
+ }
+ }
+ roundFloatXTo53( false, &x, roundingMode, exact );
+ x.sig = shortShiftRightJam128( x.sig, 3 );
+ z = x.sig.v64;
+ if ( (shiftDist < 0) || x.sig.v64>>32 || (x.sign && z) ) {
+ slowfloat_exceptionFlags =
+ savedExceptionFlags | softfloat_flag_invalid;
+ return x.sign ? 0 : 0xFFFFFFFF;
+ }
+ return z;
+
+}
+
+static void ui64ToFloatX( uint_fast64_t a, struct floatX *xPtr )
+{
+ struct uint128 sig;
+ int_fast32_t exp;
+
+ xPtr->isNaN = false;
+ xPtr->isInf = false;
+ xPtr->sign = false;
+ sig.v64 = 0;
+ sig.v0 = a;
+ if ( a ) {
+ xPtr->isZero = false;
+ exp = 63;
+ sig = shortShiftLeft128( sig, 56 );
+ while ( sig.v64 < UINT64_C( 0x0080000000000000 ) ) {
+ --exp;
+ sig = shortShiftLeft128( sig, 1 );
+ }
+ xPtr->exp = exp;
+ } else {
+ xPtr->isZero = true;
+ }
+ xPtr->sig = sig;
+
+}
+
+static
+uint_fast64_t
+ floatXToUI64(
+ const struct floatX *xPtr, uint_fast8_t roundingMode, bool exact )
+{
+ uint_fast8_t savedExceptionFlags;
+ struct floatX x;
+ int_fast32_t shiftDist;
+ uint_fast64_t z;
+
+ if ( xPtr->isInf || xPtr->isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ return
+ (xPtr->isInf && xPtr->sign) ? 0 : UINT64_C( 0xFFFFFFFFFFFFFFFF );
+ }
+ if ( xPtr->isZero ) return 0;
+ savedExceptionFlags = slowfloat_exceptionFlags;
+ x = *xPtr;
+ shiftDist = 112 - x.exp;
+ if ( 116 < shiftDist ) {
+ x.sig.v64 = 0;
+ x.sig.v0 = 1;
+ } else {
+ while ( 0 < shiftDist ) {
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ --shiftDist;
+ }
+ }
+ roundFloatXTo113( false, &x, roundingMode, exact );
+ x.sig = shortShiftRightJam128( x.sig, 7 );
+ z = x.sig.v0;
+ if ( (shiftDist < 0) || x.sig.v64 || (x.sign && z) ) {
+ slowfloat_exceptionFlags =
+ savedExceptionFlags | softfloat_flag_invalid;
+ return x.sign ? 0 : UINT64_C( 0xFFFFFFFFFFFFFFFF );
+ }
+ return z;
+
+}
+
+static void i32ToFloatX( int_fast32_t a, struct floatX *xPtr )
+{
+ bool sign;
+ uint_fast64_t sig64;
+ int_fast32_t exp;
+
+ xPtr->isNaN = false;
+ xPtr->isInf = false;
+ sign = (a < 0);
+ xPtr->sign = sign;
+ sig64 = sign ? -(uint64_t) a : a;
+ if ( a ) {
+ xPtr->isZero = false;
+ exp = 31;
+ sig64 <<= 24;
+ while ( sig64 < UINT64_C( 0x0080000000000000 ) ) {
+ --exp;
+ sig64 <<= 1;
+ }
+ xPtr->exp = exp;
+ } else {
+ xPtr->isZero = true;
+ }
+ xPtr->sig.v64 = sig64;
+ xPtr->sig.v0 = 0;
+
+}
+
+static
+int_fast32_t
+ floatXToI32(
+ const struct floatX *xPtr, uint_fast8_t roundingMode, bool exact )
+{
+ uint_fast8_t savedExceptionFlags;
+ struct floatX x;
+ int_fast32_t shiftDist;
+ union { uint32_t ui; int32_t i; } uZ;
+
+ if ( xPtr->isInf || xPtr->isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ return (xPtr->isInf && xPtr->sign) ? -0x7FFFFFFF - 1 : 0x7FFFFFFF;
+ }
+ if ( xPtr->isZero ) return 0;
+ savedExceptionFlags = slowfloat_exceptionFlags;
+ x = *xPtr;
+ shiftDist = 52 - x.exp;
+ if ( 56 < shiftDist ) {
+ x.sig.v64 = 0;
+ x.sig.v0 = 1;
+ } else {
+ while ( 0 < shiftDist ) {
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ --shiftDist;
+ }
+ }
+ roundFloatXTo53( false, &x, roundingMode, exact );
+ x.sig = shortShiftRightJam128( x.sig, 3 );
+ uZ.ui = x.sig.v64;
+ if ( x.sign ) uZ.ui = -uZ.ui;
+ if (
+ (shiftDist < 0) || x.sig.v64>>32
+ || ((uZ.i != 0) && (x.sign != (uZ.i < 0)))
+ ) {
+ slowfloat_exceptionFlags =
+ savedExceptionFlags | softfloat_flag_invalid;
+ return x.sign ? -0x7FFFFFFF - 1 : 0x7FFFFFFF;
+ }
+ return uZ.i;
+
+}
+
+static void i64ToFloatX( int_fast64_t a, struct floatX *xPtr )
+{
+ bool sign;
+ struct uint128 sig;
+ int_fast32_t exp;
+
+ xPtr->isNaN = false;
+ xPtr->isInf = false;
+ sign = (a < 0);
+ xPtr->sign = sign;
+ sig.v64 = 0;
+ sig.v0 = sign ? -(uint_fast64_t) a : a;
+ if ( a ) {
+ xPtr->isZero = false;
+ exp = 63;
+ sig = shortShiftLeft128( sig, 56 );
+ while ( sig.v64 < UINT64_C( 0x0080000000000000 ) ) {
+ --exp;
+ sig = shortShiftLeft128( sig, 1 );
+ }
+ xPtr->exp = exp;
+ } else {
+ xPtr->isZero = true;
+ }
+ xPtr->sig = sig;
+
+}
+
+static
+int_fast64_t
+ floatXToI64(
+ const struct floatX *xPtr, uint_fast8_t roundingMode, bool exact )
+{
+ uint_fast8_t savedExceptionFlags;
+ struct floatX x;
+ int_fast32_t shiftDist;
+ union { uint64_t ui; int64_t i; } uZ;
+
+ if ( xPtr->isInf || xPtr->isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ return
+ (xPtr->isInf && xPtr->sign) ? -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1
+ : INT64_C( 0x7FFFFFFFFFFFFFFF );
+ }
+ if ( xPtr->isZero ) return 0;
+ savedExceptionFlags = slowfloat_exceptionFlags;
+ x = *xPtr;
+ shiftDist = 112 - x.exp;
+ if ( 116 < shiftDist ) {
+ x.sig.v64 = 0;
+ x.sig.v0 = 1;
+ } else {
+ while ( 0 < shiftDist ) {
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ --shiftDist;
+ }
+ }
+ roundFloatXTo113( false, &x, roundingMode, exact );
+ x.sig = shortShiftRightJam128( x.sig, 7 );
+ uZ.ui = x.sig.v0;
+ if ( x.sign ) uZ.ui = -uZ.ui;
+ if (
+ (shiftDist < 0) || x.sig.v64 || ((uZ.i != 0) && (x.sign != (uZ.i < 0)))
+ ) {
+ slowfloat_exceptionFlags =
+ savedExceptionFlags | softfloat_flag_invalid;
+ return
+ x.sign ? -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1
+ : INT64_C( 0x7FFFFFFFFFFFFFFF );
+ }
+ return uZ.i;
+
+}
+
+#ifdef FLOAT16
+
+static void f16ToFloatX( float16_t a, struct floatX *xPtr )
+{
+ union ui16_f16 uA;
+ uint_fast16_t uiA;
+ int_fast8_t exp;
+ uint_fast64_t sig64;
+
+ uA.f = a;
+ uiA = uA.ui;
+ xPtr->isNaN = false;
+ xPtr->isInf = false;
+ xPtr->isZero = false;
+ xPtr->sign = ((uiA & 0x8000) != 0);
+ exp = uiA>>10 & 0x1F;
+ sig64 = uiA & 0x03FF;
+ sig64 <<= 45;
+ if ( exp == 0x1F ) {
+ if ( sig64 ) {
+ xPtr->isNaN = true;
+ } else {
+ xPtr->isInf = true;
+ }
+ } else if ( !exp ) {
+ if ( !sig64 ) {
+ xPtr->isZero = true;
+ } else {
+ exp = 1 - 0xF;
+ do {
+ --exp;
+ sig64 <<= 1;
+ } while ( sig64 < UINT64_C( 0x0080000000000000 ) );
+ xPtr->exp = exp;
+ }
+ } else {
+ xPtr->exp = exp - 0xF;
+ sig64 |= UINT64_C( 0x0080000000000000 );
+ }
+ xPtr->sig.v64 = sig64;
+ xPtr->sig.v0 = 0;
+
+}
+
+static float16_t floatXToF16( const struct floatX *xPtr )
+{
+ uint_fast16_t uiZ;
+ struct floatX x, savedX;
+ bool isTiny;
+ int_fast32_t exp;
+ union ui16_f16 uZ;
+
+ if ( xPtr->isNaN ) {
+ uiZ = 0xFFFF;
+ goto uiZ;
+ }
+ if ( xPtr->isInf ) {
+ uiZ = xPtr->sign ? 0xFC00 : 0x7C00;
+ goto uiZ;
+ }
+ if ( xPtr->isZero ) {
+ uiZ = xPtr->sign ? 0x8000 : 0;
+ goto uiZ;
+ }
+ x = *xPtr;
+ while ( UINT64_C( 0x0100000000000000 ) <= x.sig.v64 ) {
+ ++x.exp;
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ }
+ while ( x.sig.v64 < UINT64_C( 0x0080000000000000 ) ) {
+ --x.exp;
+ x.sig = shortShiftLeft128( x.sig, 1 );
+ }
+ savedX = x;
+ isTiny =
+ (slowfloat_detectTininess == softfloat_tininess_beforeRounding)
+ && (x.exp + 0xF <= 0);
+ roundFloatXTo11( isTiny, &x, slowfloat_roundingMode, true );
+ exp = x.exp + 0xF;
+ if ( 0x1F <= exp ) {
+ slowfloat_exceptionFlags |=
+ softfloat_flag_overflow | softfloat_flag_inexact;
+ if ( x.sign ) {
+ switch ( slowfloat_roundingMode ) {
+ case softfloat_round_near_even:
+ case softfloat_round_min:
+ case softfloat_round_near_maxMag:
+ uiZ = 0xFC00;
+ break;
+ case softfloat_round_minMag:
+ case softfloat_round_max:
+ case softfloat_round_odd:
+ uiZ = 0xFBFF;
+ break;
+ }
+ } else {
+ switch ( slowfloat_roundingMode ) {
+ case softfloat_round_near_even:
+ case softfloat_round_max:
+ case softfloat_round_near_maxMag:
+ uiZ = 0x7C00;
+ break;
+ case softfloat_round_minMag:
+ case softfloat_round_min:
+ case softfloat_round_odd:
+ uiZ = 0x7BFF;
+ break;
+ }
+ }
+ goto uiZ;
+ }
+ if ( exp <= 0 ) {
+ isTiny = true;
+ x = savedX;
+ exp = x.exp + 0xF;
+ if ( exp < -14 ) {
+ x.sig.v0 = (x.sig.v64 != 0) || (x.sig.v0 != 0);
+ x.sig.v64 = 0;
+ } else {
+ while ( exp <= 0 ) {
+ ++exp;
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ }
+ }
+ roundFloatXTo11( isTiny, &x, slowfloat_roundingMode, true );
+ exp = (UINT64_C( 0x0080000000000000 ) <= x.sig.v64) ? 1 : 0;
+ }
+ uiZ = (uint_fast16_t) exp<<10;
+ if ( x.sign ) uiZ |= 0x8000;
+ uiZ |= x.sig.v64>>45 & 0x03FF;
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
+#endif
+
+static void f32ToFloatX( float32_t a, struct floatX *xPtr )
+{
+ union ui32_f32 uA;
+ uint_fast32_t uiA;
+ int_fast16_t exp;
+ uint_fast64_t sig64;
+
+ uA.f = a;
+ uiA = uA.ui;
+ xPtr->isNaN = false;
+ xPtr->isInf = false;
+ xPtr->isZero = false;
+ xPtr->sign = ((uiA & 0x80000000) != 0);
+ exp = uiA>>23 & 0xFF;
+ sig64 = uiA & 0x007FFFFF;
+ sig64 <<= 32;
+ if ( exp == 0xFF ) {
+ if ( sig64 ) {
+ xPtr->isNaN = true;
+ } else {
+ xPtr->isInf = true;
+ }
+ } else if ( !exp ) {
+ if ( !sig64 ) {
+ xPtr->isZero = true;
+ } else {
+ exp = 1 - 0x7F;
+ do {
+ --exp;
+ sig64 <<= 1;
+ } while ( sig64 < UINT64_C( 0x0080000000000000 ) );
+ xPtr->exp = exp;
+ }
+ } else {
+ xPtr->exp = exp - 0x7F;
+ sig64 |= UINT64_C( 0x0080000000000000 );
+ }
+ xPtr->sig.v64 = sig64;
+ xPtr->sig.v0 = 0;
+
+}
+
+static float32_t floatXToF32( const struct floatX *xPtr )
+{
+ uint_fast32_t uiZ;
+ struct floatX x, savedX;
+ bool isTiny;
+ int_fast32_t exp;
+ union ui32_f32 uZ;
+
+ if ( xPtr->isNaN ) {
+ uiZ = 0xFFFFFFFF;
+ goto uiZ;
+ }
+ if ( xPtr->isInf ) {
+ uiZ = xPtr->sign ? 0xFF800000 : 0x7F800000;
+ goto uiZ;
+ }
+ if ( xPtr->isZero ) {
+ uiZ = xPtr->sign ? 0x80000000 : 0;
+ goto uiZ;
+ }
+ x = *xPtr;
+ while ( UINT64_C( 0x0100000000000000 ) <= x.sig.v64 ) {
+ ++x.exp;
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ }
+ while ( x.sig.v64 < UINT64_C( 0x0080000000000000 ) ) {
+ --x.exp;
+ x.sig = shortShiftLeft128( x.sig, 1 );
+ }
+ savedX = x;
+ isTiny =
+ (slowfloat_detectTininess == softfloat_tininess_beforeRounding)
+ && (x.exp + 0x7F <= 0);
+ roundFloatXTo24( isTiny, &x, slowfloat_roundingMode, true );
+ exp = x.exp + 0x7F;
+ if ( 0xFF <= exp ) {
+ slowfloat_exceptionFlags |=
+ softfloat_flag_overflow | softfloat_flag_inexact;
+ if ( x.sign ) {
+ switch ( slowfloat_roundingMode ) {
+ case softfloat_round_near_even:
+ case softfloat_round_min:
+ case softfloat_round_near_maxMag:
+ uiZ = 0xFF800000;
+ break;
+ case softfloat_round_minMag:
+ case softfloat_round_max:
+ case softfloat_round_odd:
+ uiZ = 0xFF7FFFFF;
+ break;
+ }
+ } else {
+ switch ( slowfloat_roundingMode ) {
+ case softfloat_round_near_even:
+ case softfloat_round_max:
+ case softfloat_round_near_maxMag:
+ uiZ = 0x7F800000;
+ break;
+ case softfloat_round_minMag:
+ case softfloat_round_min:
+ case softfloat_round_odd:
+ uiZ = 0x7F7FFFFF;
+ break;
+ }
+ }
+ goto uiZ;
+ }
+ if ( exp <= 0 ) {
+ isTiny = true;
+ x = savedX;
+ exp = x.exp + 0x7F;
+ if ( exp < -27 ) {
+ x.sig.v0 = (x.sig.v64 != 0) || (x.sig.v0 != 0);
+ x.sig.v64 = 0;
+ } else {
+ while ( exp <= 0 ) {
+ ++exp;
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ }
+ }
+ roundFloatXTo24( isTiny, &x, slowfloat_roundingMode, true );
+ exp = (UINT64_C( 0x0080000000000000 ) <= x.sig.v64) ? 1 : 0;
+ }
+ uiZ = (uint_fast32_t) exp<<23;
+ if ( x.sign ) uiZ |= 0x80000000;
+ uiZ |= x.sig.v64>>32 & 0x007FFFFF;
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
+#ifdef FLOAT64
+
+static void f64ToFloatX( float64_t a, struct floatX *xPtr )
+{
+ union ui64_f64 uA;
+ uint_fast64_t uiA;
+ int_fast16_t exp;
+ uint_fast64_t sig64;
+
+ uA.f = a;
+ uiA = uA.ui;
+ xPtr->isNaN = false;
+ xPtr->isInf = false;
+ xPtr->isZero = false;
+ xPtr->sign = ((uiA & UINT64_C( 0x8000000000000000 )) != 0);
+ exp = uiA>>52 & 0x7FF;
+ sig64 = uiA & UINT64_C( 0x000FFFFFFFFFFFFF );
+ if ( exp == 0x7FF ) {
+ if ( sig64 ) {
+ xPtr->isNaN = true;
+ } else {
+ xPtr->isInf = true;
+ }
+ } else if ( !exp ) {
+ if ( !sig64 ) {
+ xPtr->isZero = true;
+ } else {
+ exp = 1 - 0x3FF;
+ do {
+ --exp;
+ sig64 <<= 1;
+ } while ( sig64 < UINT64_C( 0x0010000000000000 ) );
+ xPtr->exp = exp;
+ }
+ } else {
+ xPtr->exp = exp - 0x3FF;
+ sig64 |= UINT64_C( 0x0010000000000000 );
+ }
+ xPtr->sig.v64 = sig64<<3;
+ xPtr->sig.v0 = 0;
+
+}
+
+static float64_t floatXToF64( const struct floatX *xPtr )
+{
+ uint_fast64_t uiZ;
+ struct floatX x, savedX;
+ bool isTiny;
+ int_fast32_t exp;
+ union ui64_f64 uZ;
+
+ if ( xPtr->isNaN ) {
+ uiZ = UINT64_C( 0xFFFFFFFFFFFFFFFF );
+ goto uiZ;
+ }
+ if ( xPtr->isInf ) {
+ uiZ =
+ xPtr->sign ? UINT64_C( 0xFFF0000000000000 )
+ : UINT64_C( 0x7FF0000000000000 );
+ goto uiZ;
+ }
+ if ( xPtr->isZero ) {
+ uiZ = xPtr->sign ? UINT64_C( 0x8000000000000000 ) : 0;
+ goto uiZ;
+ }
+ x = *xPtr;
+ while ( UINT64_C( 0x0100000000000000 ) <= x.sig.v64 ) {
+ ++x.exp;
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ }
+ while ( x.sig.v64 < UINT64_C( 0x0080000000000000 ) ) {
+ --x.exp;
+ x.sig = shortShiftLeft128( x.sig, 1 );
+ }
+ savedX = x;
+ isTiny =
+ (slowfloat_detectTininess == softfloat_tininess_beforeRounding)
+ && (x.exp + 0x3FF <= 0);
+ roundFloatXTo53( isTiny, &x, slowfloat_roundingMode, true );
+ exp = x.exp + 0x3FF;
+ if ( 0x7FF <= exp ) {
+ slowfloat_exceptionFlags |=
+ softfloat_flag_overflow | softfloat_flag_inexact;
+ if ( x.sign ) {
+ switch ( slowfloat_roundingMode ) {
+ case softfloat_round_near_even:
+ case softfloat_round_min:
+ case softfloat_round_near_maxMag:
+ uiZ = UINT64_C( 0xFFF0000000000000 );
+ break;
+ case softfloat_round_minMag:
+ case softfloat_round_max:
+ case softfloat_round_odd:
+ uiZ = UINT64_C( 0xFFEFFFFFFFFFFFFF );
+ break;
+ }
+ } else {
+ switch ( slowfloat_roundingMode ) {
+ case softfloat_round_near_even:
+ case softfloat_round_max:
+ case softfloat_round_near_maxMag:
+ uiZ = UINT64_C( 0x7FF0000000000000 );
+ break;
+ case softfloat_round_minMag:
+ case softfloat_round_min:
+ case softfloat_round_odd:
+ uiZ = UINT64_C( 0x7FEFFFFFFFFFFFFF );
+ break;
+ }
+ }
+ goto uiZ;
+ }
+ if ( exp <= 0 ) {
+ isTiny = true;
+ x = savedX;
+ exp = x.exp + 0x3FF;
+ if ( exp < -56 ) {
+ x.sig.v0 = (x.sig.v64 != 0) || (x.sig.v0 != 0);
+ x.sig.v64 = 0;
+ } else {
+ while ( exp <= 0 ) {
+ ++exp;
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ }
+ }
+ roundFloatXTo53( isTiny, &x, slowfloat_roundingMode, true );
+ exp = (UINT64_C( 0x0080000000000000 ) <= x.sig.v64) ? 1 : 0;
+ }
+ uiZ = (uint_fast64_t) exp<<52;
+ if ( x.sign ) uiZ |= UINT64_C( 0x8000000000000000 );
+ uiZ |= x.sig.v64>>3 & UINT64_C( 0x000FFFFFFFFFFFFF );
+ uiZ:
+ uZ.ui = uiZ;
+ return uZ.f;
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+static void extF80MToFloatX( const extFloat80_t *aPtr, struct floatX *xPtr )
+{
+ const struct extFloat80M *aSPtr;
+ uint_fast16_t uiA64;
+ int_fast32_t exp;
+ struct uint128 sig;
+
+ aSPtr = (const struct extFloat80M *) aPtr;
+ xPtr->isNaN = false;
+ xPtr->isInf = false;
+ xPtr->isZero = false;
+ uiA64 = aSPtr->signExp;
+ xPtr->sign = ((uiA64 & 0x8000) != 0);
+ exp = uiA64 & 0x7FFF;
+ sig.v64 = 0;
+ sig.v0 = aSPtr->signif;
+ if ( exp == 0x7FFF ) {
+ if ( sig.v0 & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) {
+ xPtr->isNaN = true;
+ } else {
+ xPtr->isInf = true;
+ }
+ } else {
+ if ( !exp ) ++exp;
+ exp -= 0x3FFF;
+ if ( !(sig.v0 & UINT64_C( 0x8000000000000000 )) ) {
+ if ( !sig.v0 ) {
+ xPtr->isZero = true;
+ } else {
+ do {
+ --exp;
+ sig.v0 <<= 1;
+ } while ( sig.v0 < UINT64_C( 0x8000000000000000 ) );
+ }
+ }
+ xPtr->exp = exp;
+ }
+ xPtr->sig = shortShiftLeft128( sig, 56 );
+
+}
+
+static void floatXToExtF80M( const struct floatX *xPtr, extFloat80_t *zPtr )
+{
+ struct extFloat80M *zSPtr;
+ struct floatX x, savedX;
+ bool isTiny;
+ int_fast32_t exp;
+ uint_fast64_t uiZ0;
+ uint_fast16_t uiZ64;
+
+ zSPtr = (struct extFloat80M *) zPtr;
+ if ( xPtr->isNaN ) {
+ zSPtr->signExp = 0xFFFF;
+ zSPtr->signif = UINT64_C( 0xFFFFFFFFFFFFFFFF );
+ return;
+ }
+ if ( xPtr->isInf ) {
+ zSPtr->signExp = xPtr->sign ? 0xFFFF : 0x7FFF;
+ zSPtr->signif = UINT64_C( 0x8000000000000000 );
+ return;
+ }
+ if ( xPtr->isZero ) {
+ zSPtr->signExp = xPtr->sign ? 0x8000 : 0;
+ zSPtr->signif = 0;
+ return;
+ }
+ x = *xPtr;
+ while ( UINT64_C( 0x0100000000000000 ) <= x.sig.v64 ) {
+ ++x.exp;
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ }
+ while ( x.sig.v64 < UINT64_C( 0x0080000000000000 ) ) {
+ --x.exp;
+ x.sig = shortShiftLeft128( x.sig, 1 );
+ }
+ savedX = x;
+ isTiny =
+ (slowfloat_detectTininess == softfloat_tininess_beforeRounding)
+ && (x.exp + 0x3FFF <= 0);
+ switch ( slow_extF80_roundingPrecision ) {
+ case 32:
+ roundFloatXTo24( isTiny, &x, slowfloat_roundingMode, true );
+ break;
+ case 64:
+ roundFloatXTo53( isTiny, &x, slowfloat_roundingMode, true );
+ break;
+ default:
+ roundFloatXTo64( isTiny, &x, slowfloat_roundingMode, true );
+ break;
+ }
+ exp = x.exp + 0x3FFF;
+ if ( 0x7FFF <= exp ) {
+ slowfloat_exceptionFlags |=
+ softfloat_flag_overflow | softfloat_flag_inexact;
+ if ( x.sign ) {
+ switch ( slowfloat_roundingMode ) {
+ case softfloat_round_near_even:
+ case softfloat_round_min:
+ case softfloat_round_near_maxMag:
+ zSPtr->signExp = 0xFFFF;
+ zSPtr->signif = UINT64_C( 0x8000000000000000 );
+ break;
+ case softfloat_round_minMag:
+ case softfloat_round_max:
+ case softfloat_round_odd:
+ switch ( slow_extF80_roundingPrecision ) {
+ case 32:
+ uiZ0 = UINT64_C( 0xFFFFFF0000000000 );
+ break;
+ case 64:
+ uiZ0 = UINT64_C( 0xFFFFFFFFFFFFF800 );
+ break;
+ default:
+ uiZ0 = UINT64_C( 0xFFFFFFFFFFFFFFFF );
+ break;
+ }
+ zSPtr->signExp = 0xFFFE;
+ zSPtr->signif = uiZ0;
+ break;
+ }
+ } else {
+ switch ( slowfloat_roundingMode ) {
+ case softfloat_round_near_even:
+ case softfloat_round_max:
+ case softfloat_round_near_maxMag:
+ zSPtr->signExp = 0x7FFF;
+ zSPtr->signif = UINT64_C( 0x8000000000000000 );
+ break;
+ case softfloat_round_minMag:
+ case softfloat_round_min:
+ case softfloat_round_odd:
+ switch ( slow_extF80_roundingPrecision ) {
+ case 32:
+ uiZ0 = UINT64_C( 0xFFFFFF0000000000 );
+ break;
+ case 64:
+ uiZ0 = UINT64_C( 0xFFFFFFFFFFFFF800 );
+ break;
+ default:
+ uiZ0 = UINT64_C( 0xFFFFFFFFFFFFFFFF );
+ break;
+ }
+ zSPtr->signExp = 0x7FFE;
+ zSPtr->signif = uiZ0;
+ break;
+ }
+ }
+ return;
+ }
+ if ( exp <= 0 ) {
+ isTiny = true;
+ x = savedX;
+ exp = x.exp + 0x3FFF;
+ if ( exp < -70 ) {
+ x.sig.v0 = (x.sig.v64 != 0) || (x.sig.v0 != 0);
+ x.sig.v64 = 0;
+ } else {
+ while ( exp <= 0 ) {
+ ++exp;
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ }
+ }
+ switch ( slow_extF80_roundingPrecision ) {
+ case 32:
+ roundFloatXTo24( isTiny, &x, slowfloat_roundingMode, true );
+ break;
+ case 64:
+ roundFloatXTo53( isTiny, &x, slowfloat_roundingMode, true );
+ break;
+ default:
+ roundFloatXTo64( isTiny, &x, slowfloat_roundingMode, true );
+ break;
+ }
+ exp = (UINT64_C( 0x0080000000000000 ) <= x.sig.v64) ? 1 : 0;
+ }
+ uiZ64 = exp;
+ if ( x.sign ) uiZ64 |= 0x8000;
+ zSPtr->signExp = uiZ64;
+ zSPtr->signif = shortShiftRightJam128( x.sig, 56 ).v0;
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+static void f128MToFloatX( const float128_t *aPtr, struct floatX *xPtr )
+{
+ const struct uint128 *uiAPtr;
+ uint_fast64_t uiA64;
+ int_fast32_t exp;
+ struct uint128 sig;
+
+ uiAPtr = (const struct uint128 *) aPtr;
+ xPtr->isNaN = false;
+ xPtr->isInf = false;
+ xPtr->isZero = false;
+ uiA64 = uiAPtr->v64;
+ xPtr->sign = ((uiA64 & UINT64_C( 0x8000000000000000 )) != 0);
+ exp = uiA64>>48 & 0x7FFF;
+ sig.v64 = uiA64 & UINT64_C( 0x0000FFFFFFFFFFFF );
+ sig.v0 = uiAPtr->v0;
+ if ( exp == 0x7FFF ) {
+ if ( sig.v64 || sig.v0 ) {
+ xPtr->isNaN = true;
+ } else {
+ xPtr->isInf = true;
+ }
+ } else if ( !exp ) {
+ if ( !sig.v64 && !sig.v0 ) {
+ xPtr->isZero = true;
+ } else {
+ exp = 1 - 0x3FFF;
+ do {
+ --exp;
+ sig = shortShiftLeft128( sig, 1 );
+ } while ( sig.v64 < UINT64_C( 0x0001000000000000 ) );
+ xPtr->exp = exp;
+ }
+ } else {
+ xPtr->exp = exp - 0x3FFF;
+ sig.v64 |= UINT64_C( 0x0001000000000000 );
+ }
+ xPtr->sig = shortShiftLeft128( sig, 7 );
+
+}
+
+static void floatXToF128M( const struct floatX *xPtr, float128_t *zPtr )
+{
+ struct uint128 *uiZPtr;
+ struct floatX x, savedX;
+ bool isTiny;
+ int_fast32_t exp;
+ uint_fast64_t uiZ64;
+
+ uiZPtr = (struct uint128 *) zPtr;
+ if ( xPtr->isNaN ) {
+ uiZPtr->v64 = uiZPtr->v0 = UINT64_C( 0xFFFFFFFFFFFFFFFF );
+ return;
+ }
+ if ( xPtr->isInf ) {
+ uiZPtr->v64 =
+ xPtr->sign ? UINT64_C( 0xFFFF000000000000 )
+ : UINT64_C( 0x7FFF000000000000 );
+ uiZPtr->v0 = 0;
+ return;
+ }
+ if ( xPtr->isZero ) {
+ uiZPtr->v64 = xPtr->sign ? UINT64_C( 0x8000000000000000 ) : 0;
+ uiZPtr->v0 = 0;
+ return;
+ }
+ x = *xPtr;
+ while ( UINT64_C( 0x0100000000000000 ) <= x.sig.v64 ) {
+ ++x.exp;
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ }
+ while ( x.sig.v64 < UINT64_C( 0x0080000000000000 ) ) {
+ --x.exp;
+ x.sig = shortShiftLeft128( x.sig, 1 );
+ }
+ savedX = x;
+ isTiny =
+ (slowfloat_detectTininess == softfloat_tininess_beforeRounding)
+ && (x.exp + 0x3FFF <= 0);
+ roundFloatXTo113( isTiny, &x, slowfloat_roundingMode, true );
+ exp = x.exp + 0x3FFF;
+ if ( 0x7FFF <= exp ) {
+ slowfloat_exceptionFlags |=
+ softfloat_flag_overflow | softfloat_flag_inexact;
+ if ( x.sign ) {
+ switch ( slowfloat_roundingMode ) {
+ case softfloat_round_near_even:
+ case softfloat_round_min:
+ case softfloat_round_near_maxMag:
+ uiZPtr->v64 = UINT64_C( 0xFFFF000000000000 );
+ uiZPtr->v0 = 0;
+ break;
+ case softfloat_round_minMag:
+ case softfloat_round_max:
+ case softfloat_round_odd:
+ uiZPtr->v64 = UINT64_C( 0xFFFEFFFFFFFFFFFF );
+ uiZPtr->v0 = UINT64_C( 0xFFFFFFFFFFFFFFFF );
+ break;
+ }
+ } else {
+ switch ( slowfloat_roundingMode ) {
+ case softfloat_round_near_even:
+ case softfloat_round_max:
+ case softfloat_round_near_maxMag:
+ uiZPtr->v64 = UINT64_C( 0x7FFF000000000000 );
+ uiZPtr->v0 = 0;
+ break;
+ case softfloat_round_minMag:
+ case softfloat_round_min:
+ case softfloat_round_odd:
+ uiZPtr->v64 = UINT64_C( 0x7FFEFFFFFFFFFFFF );
+ uiZPtr->v0 = UINT64_C( 0xFFFFFFFFFFFFFFFF );
+ break;
+ }
+ }
+ return;
+ }
+ if ( exp <= 0 ) {
+ isTiny = true;
+ x = savedX;
+ exp = x.exp + 0x3FFF;
+ if ( exp < -120 ) {
+ x.sig.v0 = (x.sig.v64 != 0) || (x.sig.v0 != 0);
+ x.sig.v64 = 0;
+ } else {
+ while ( exp <= 0 ) {
+ ++exp;
+ x.sig = shortShiftRightJam128( x.sig, 1 );
+ }
+ }
+ roundFloatXTo113( isTiny, &x, slowfloat_roundingMode, true );
+ exp = (UINT64_C( 0x0080000000000000 ) <= x.sig.v64) ? 1 : 0;
+ }
+ uiZ64 = (uint_fast64_t) exp<<48;
+ if ( x.sign ) uiZ64 |= UINT64_C( 0x8000000000000000 );
+ x.sig = shortShiftRightJam128( x.sig, 7 );
+ uiZPtr->v64 = uiZ64 | (x.sig.v64 & UINT64_C( 0x0000FFFFFFFFFFFF ));
+ uiZPtr->v0 = x.sig.v0;
+
+}
+
+#endif
+
+static void floatXInvalid( struct floatX *xPtr )
+{
+
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ *xPtr = floatXNaN;
+
+}
+
+static
+void
+ floatXRoundToInt( struct floatX *xPtr, uint_fast8_t roundingMode, bool exact )
+{
+ int_fast32_t exp, shiftDist;
+ struct uint128 sig;
+
+ if ( xPtr->isNaN || xPtr->isInf ) return;
+ exp = xPtr->exp;
+ shiftDist = 112 - exp;
+ if ( shiftDist <= 0 ) return;
+ if ( 119 < shiftDist ) {
+ xPtr->exp = 112;
+ xPtr->sig.v64 = 0;
+ xPtr->sig.v0 = !xPtr->isZero;
+ } else {
+ sig = xPtr->sig;
+ while ( 0 < shiftDist ) {
+ ++exp;
+ sig = shortShiftRightJam128( sig, 1 );
+ --shiftDist;
+ }
+ xPtr->exp = exp;
+ xPtr->sig = sig;
+ }
+ roundFloatXTo113( false, xPtr, roundingMode, exact );
+ if ( !xPtr->sig.v64 && !xPtr->sig.v0 ) xPtr->isZero = true;
+
+}
+
+static void floatXAdd( struct floatX *xPtr, const struct floatX *yPtr )
+{
+ int_fast32_t expX, expY, expDiff;
+ struct uint128 sigY;
+
+ if ( xPtr->isNaN ) return;
+ if ( yPtr->isNaN ) goto copyY;
+ if ( xPtr->isInf && yPtr->isInf ) {
+ if ( xPtr->sign != yPtr->sign ) floatXInvalid( xPtr );
+ return;
+ }
+ if ( xPtr->isInf ) return;
+ if ( yPtr->isInf ) goto copyY;
+ if ( xPtr->isZero && yPtr->isZero ) {
+ if ( xPtr->sign == yPtr->sign ) return;
+ goto completeCancellation;
+ }
+ expX = xPtr->exp;
+ expY = yPtr->exp;
+ if (
+ (xPtr->sign != yPtr->sign) && (expX == expY)
+ && eq128( xPtr->sig, yPtr->sig )
+ ) {
+ completeCancellation:
+ if (slowfloat_roundingMode == softfloat_round_min) {
+ *xPtr = floatXNegativeZero;
+ } else {
+ *xPtr = floatXPositiveZero;
+ }
+ return;
+ }
+ if ( xPtr->isZero ) goto copyY;
+ if ( yPtr->isZero ) return;
+ expDiff = expX - expY;
+ if ( expDiff < 0 ) {
+ xPtr->exp = expY;
+ if ( expDiff < -120 ) {
+ xPtr->sig.v64 = 0;
+ xPtr->sig.v0 = 1;
+ } else {
+ while ( expDiff < 0 ) {
+ ++expDiff;
+ xPtr->sig = shortShiftRightJam128( xPtr->sig, 1 );
+ }
+ }
+ if ( xPtr->sign != yPtr->sign ) xPtr->sig = neg128( xPtr->sig );
+ xPtr->sign = yPtr->sign;
+ xPtr->sig = add128( xPtr->sig, yPtr->sig );
+ } else {
+ sigY = yPtr->sig;
+ if ( 120 < expDiff ) {
+ sigY.v64 = 0;
+ sigY.v0 = 1;
+ } else {
+ while ( 0 < expDiff ) {
+ --expDiff;
+ sigY = shortShiftRightJam128( sigY, 1 );
+ }
+ }
+ if ( xPtr->sign != yPtr->sign ) sigY = neg128( sigY );
+ xPtr->sig = add128( xPtr->sig, sigY );
+ }
+ if ( xPtr->sig.v64 & UINT64_C( 0x8000000000000000 ) ) {
+ xPtr->sign = !xPtr->sign;
+ xPtr->sig = neg128( xPtr->sig );
+ }
+ return;
+ copyY:
+ *xPtr = *yPtr;
+
+}
+
+static void floatXMul( struct floatX *xPtr, const struct floatX *yPtr )
+{
+ struct uint128 sig;
+ int bitNum;
+
+ if ( xPtr->isNaN ) return;
+ if ( yPtr->isNaN ) {
+ xPtr->isNaN = true;
+ xPtr->isInf = false;
+ xPtr->isZero = false;
+ xPtr->sign = yPtr->sign;
+ return;
+ }
+ if ( yPtr->sign ) xPtr->sign = !xPtr->sign;
+ if ( xPtr->isInf ) {
+ if ( yPtr->isZero ) floatXInvalid( xPtr );
+ return;
+ }
+ if ( yPtr->isInf ) {
+ if ( xPtr->isZero ) {
+ floatXInvalid( xPtr );
+ return;
+ }
+ xPtr->isInf = true;
+ return;
+ }
+ if ( xPtr->isZero || yPtr->isZero ) {
+ if ( xPtr->sign ) {
+ *xPtr = floatXNegativeZero;
+ } else {
+ *xPtr = floatXPositiveZero;
+ }
+ return;
+ }
+ xPtr->exp += yPtr->exp;
+ sig.v64 = 0;
+ sig.v0 = 0;
+ for ( bitNum = 0; bitNum < 120; ++bitNum ) {
+ sig = shortShiftRightJam128( sig, 1 );
+ if ( xPtr->sig.v0 & 1 ) sig = add128( sig, yPtr->sig );
+ xPtr->sig = shortShiftRight128( xPtr->sig, 1 );
+ }
+ if ( UINT64_C( 0x0100000000000000 ) <= sig.v64 ) {
+ ++xPtr->exp;
+ sig = shortShiftRightJam128( sig, 1 );
+ }
+ xPtr->sig = sig;
+
+}
+
+static void floatXDiv( struct floatX *xPtr, const struct floatX *yPtr )
+{
+ struct uint128 sig, negSigY;
+ int bitNum;
+
+ if ( xPtr->isNaN ) return;
+ if ( yPtr->isNaN ) {
+ xPtr->isNaN = true;
+ xPtr->isInf = false;
+ xPtr->isZero = false;
+ xPtr->sign = yPtr->sign;
+ return;
+ }
+ if ( yPtr->sign ) xPtr->sign = !xPtr->sign;
+ if ( xPtr->isInf ) {
+ if ( yPtr->isInf ) floatXInvalid( xPtr );
+ return;
+ }
+ if ( yPtr->isZero ) {
+ if ( xPtr->isZero ) {
+ floatXInvalid( xPtr );
+ return;
+ }
+ slowfloat_exceptionFlags |= softfloat_flag_infinite;
+ xPtr->isInf = true;
+ return;
+ }
+ if ( xPtr->isZero || yPtr->isInf ) {
+ if ( xPtr->sign ) {
+ *xPtr = floatXNegativeZero;
+ } else {
+ *xPtr = floatXPositiveZero;
+ }
+ return;
+ }
+ xPtr->exp -= yPtr->exp + 1;
+ sig.v64 = 0;
+ sig.v0 = 0;
+ negSigY = neg128( yPtr->sig );
+ for ( bitNum = 0; bitNum < 120; ++bitNum ) {
+ if ( le128( yPtr->sig, xPtr->sig ) ) {
+ sig.v0 |= 1;
+ xPtr->sig = add128( xPtr->sig, negSigY );
+ }
+ xPtr->sig = shortShiftLeft128( xPtr->sig, 1 );
+ sig = shortShiftLeft128( sig, 1 );
+ }
+ if ( xPtr->sig.v64 || xPtr->sig.v0 ) sig.v0 |= 1;
+ xPtr->sig = sig;
+
+}
+
+static void floatXRem( struct floatX *xPtr, const struct floatX *yPtr )
+{
+ int_fast32_t expX, expY;
+ struct uint128 sigY, negSigY;
+ bool lastQuotientBit;
+ struct uint128 savedSigX;
+
+ if ( xPtr->isNaN ) return;
+ if ( yPtr->isNaN ) {
+ xPtr->isNaN = true;
+ xPtr->isInf = false;
+ xPtr->isZero = false;
+ xPtr->sign = yPtr->sign;
+ return;
+ }
+ if ( xPtr->isInf || yPtr->isZero ) {
+ floatXInvalid( xPtr );
+ return;
+ }
+ if ( xPtr->isZero || yPtr->isInf ) return;
+ expX = xPtr->exp;
+ expY = yPtr->exp - 1;
+ if ( expX < expY ) return;
+ sigY = shortShiftLeft128( yPtr->sig, 1 );
+ negSigY = neg128( sigY );
+ while ( expY < expX ) {
+ --expX;
+ if ( le128( sigY, xPtr->sig ) ) {
+ xPtr->sig = add128( xPtr->sig, negSigY );
+ }
+ xPtr->sig = shortShiftLeft128( xPtr->sig, 1 );
+ }
+ xPtr->exp = expX;
+ lastQuotientBit = le128( sigY, xPtr->sig );
+ if ( lastQuotientBit ) xPtr->sig = add128( xPtr->sig, negSigY );
+ savedSigX = xPtr->sig;
+ xPtr->sig = neg128( add128( xPtr->sig, negSigY ) );
+ if ( lt128( xPtr->sig, savedSigX ) ) {
+ xPtr->sign = !xPtr->sign;
+ } else if ( lt128( savedSigX, xPtr->sig ) ) {
+ goto restoreSavedSigX;
+ } else {
+ if ( lastQuotientBit ) {
+ xPtr->sign = !xPtr->sign;
+ } else {
+ restoreSavedSigX:
+ xPtr->sig = savedSigX;
+ }
+ }
+ if ( !xPtr->sig.v64 && !xPtr->sig.v0 ) xPtr->isZero = true;
+
+}
+
+static void floatXSqrt( struct floatX *xPtr )
+{
+ struct uint128 sig, bitSig;
+ int bitNum;
+ struct uint128 savedSigX;
+
+ if ( xPtr->isNaN || xPtr->isZero ) return;
+ if ( xPtr->sign ) {
+ floatXInvalid( xPtr );
+ return;
+ }
+ if ( xPtr->isInf ) return;
+ if ( !(xPtr->exp & 1) ) xPtr->sig = shortShiftRightJam128( xPtr->sig, 1 );
+ xPtr->exp >>= 1;
+ sig.v64 = 0;
+ sig.v0 = 0;
+ bitSig.v64 = UINT64_C( 0x0080000000000000 );
+ bitSig.v0 = 0;
+ for ( bitNum = 0; bitNum < 120; ++bitNum ) {
+ savedSigX = xPtr->sig;
+ xPtr->sig = add128( xPtr->sig, neg128( sig ) );
+ xPtr->sig = shortShiftLeft128( xPtr->sig, 1 );
+ xPtr->sig = add128( xPtr->sig, neg128( bitSig ) );
+ if ( xPtr->sig.v64 & UINT64_C( 0x8000000000000000 ) ) {
+ xPtr->sig = shortShiftLeft128( savedSigX, 1 );
+ } else {
+ sig.v64 |= bitSig.v64;
+ sig.v0 |= bitSig.v0;
+ }
+ bitSig = shortShiftRightJam128( bitSig, 1 );
+ }
+ if ( xPtr->sig.v64 || xPtr->sig.v0 ) sig.v0 |= 1;
+ xPtr->sig = sig;
+
+}
+
+static bool floatXEq( const struct floatX *xPtr, const struct floatX *yPtr )
+{
+
+ if ( xPtr->isNaN || yPtr->isNaN ) return false;
+ if ( xPtr->isZero && yPtr->isZero ) return true;
+ if ( xPtr->sign != yPtr->sign ) return false;
+ if ( xPtr->isInf || yPtr->isInf ) return xPtr->isInf && yPtr->isInf;
+ return ( xPtr->exp == yPtr->exp ) && eq128( xPtr->sig, yPtr->sig );
+
+}
+
+static bool floatXLe( const struct floatX *xPtr, const struct floatX *yPtr )
+{
+
+ if ( xPtr->isNaN || yPtr->isNaN ) return false;
+ if ( xPtr->isZero && yPtr->isZero ) return true;
+ if ( xPtr->sign != yPtr->sign ) return xPtr->sign;
+ if ( xPtr->sign ) {
+ if ( xPtr->isInf || yPtr->isZero ) return true;
+ if ( yPtr->isInf || xPtr->isZero ) return false;
+ if ( yPtr->exp < xPtr->exp ) return true;
+ if ( xPtr->exp < yPtr->exp ) return false;
+ return le128( yPtr->sig, xPtr->sig );
+ } else {
+ if ( yPtr->isInf || xPtr->isZero ) return true;
+ if ( xPtr->isInf || yPtr->isZero ) return false;
+ if ( xPtr->exp < yPtr->exp ) return true;
+ if ( yPtr->exp < xPtr->exp ) return false;
+ return le128( xPtr->sig, yPtr->sig );
+ }
+
+}
+
+static bool floatXLt( const struct floatX *xPtr, const struct floatX *yPtr )
+{
+
+ if ( xPtr->isNaN || yPtr->isNaN ) return false;
+ if ( xPtr->isZero && yPtr->isZero ) return false;
+ if ( xPtr->sign != yPtr->sign ) return xPtr->sign;
+ if ( xPtr->isInf && yPtr->isInf ) return false;
+ if ( xPtr->sign ) {
+ if ( xPtr->isInf || yPtr->isZero ) return true;
+ if ( yPtr->isInf || xPtr->isZero ) return false;
+ if ( yPtr->exp < xPtr->exp ) return true;
+ if ( xPtr->exp < yPtr->exp ) return false;
+ return lt128( yPtr->sig, xPtr->sig );
+ } else {
+ if ( yPtr->isInf || xPtr->isZero ) return true;
+ if ( xPtr->isInf || yPtr->isZero ) return false;
+ if ( xPtr->exp < yPtr->exp ) return true;
+ if ( yPtr->exp < xPtr->exp ) return false;
+ return lt128( xPtr->sig, yPtr->sig );
+ }
+
+}
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+#if defined EXTFLOAT80 || defined FLOAT128
+
+#ifdef LITTLEENDIAN
+struct uint256 { uint64_t v0, v64, v128, v192; };
+#else
+struct uint256 { uint64_t v192, v128, v64, v0; };
+#endif
+
+static bool eq256M( const struct uint256 *aPtr, const struct uint256 *bPtr )
+{
+
+ return
+ (aPtr->v192 == bPtr->v192) && (aPtr->v128 == bPtr->v128)
+ && (aPtr->v64 == bPtr->v64) && (aPtr->v0 == bPtr->v0);
+
+}
+
+static void shiftLeft1256M( struct uint256 *ptr )
+{
+ uint64_t dword1, dword2;
+
+ dword1 = ptr->v128;
+ ptr->v192 = ptr->v192<<1 | dword1>>63;
+ dword2 = ptr->v64;
+ ptr->v128 = dword1<<1 | dword2>>63;
+ dword1 = ptr->v0;
+ ptr->v64 = dword2<<1 | dword1>>63;
+ ptr->v0 = dword1<<1;
+
+}
+
+static void shiftRight1256M( struct uint256 *ptr )
+{
+ uint64_t dword1, dword2;
+
+ dword1 = ptr->v64;
+ ptr->v0 = dword1<<63 | ptr->v0>>1;
+ dword2 = ptr->v128;
+ ptr->v64 = dword2<<63 | dword1>>1;
+ dword1 = ptr->v192;
+ ptr->v128 = dword1<<63 | dword2>>1;
+ ptr->v192 = dword1>>1;
+
+}
+
+static void shiftRight1Jam256M( struct uint256 *ptr )
+{
+ int extra;
+
+ extra = ptr->v0 & 1;
+ shiftRight1256M( ptr );
+ ptr->v0 |= extra;
+
+}
+
+static void neg256M( struct uint256 *ptr )
+{
+ uint64_t v64, v0, v128;
+
+ v64 = ptr->v64;
+ v0 = ptr->v0;
+ if ( v64 | v0 ) {
+ ptr->v192 = ~ptr->v192;
+ ptr->v128 = ~ptr->v128;
+ if ( v0 ) {
+ ptr->v64 = ~v64;
+ ptr->v0 = -v0;
+ } else {
+ ptr->v64 = -v64;
+ }
+ } else {
+ v128 = ptr->v128;
+ if ( v128 ) {
+ ptr->v192 = ~ptr->v192;
+ ptr->v128 = -v128;
+ } else {
+ ptr->v192 = -ptr->v192;
+ }
+ }
+
+}
+
+static void add256M( struct uint256 *aPtr, const struct uint256 *bPtr )
+{
+ uint64_t dwordA, dwordZ;
+ unsigned int carry1, carry2;
+
+ dwordA = aPtr->v0;
+ dwordZ = dwordA + bPtr->v0;
+ carry1 = (dwordZ < dwordA);
+ aPtr->v0 = dwordZ;
+ dwordA = aPtr->v64;
+ dwordZ = dwordA + bPtr->v64;
+ carry2 = (dwordZ < dwordA);
+ dwordZ += carry1;
+ carry2 += (dwordZ < carry1);
+ aPtr->v64 = dwordZ;
+ dwordA = aPtr->v128;
+ dwordZ = dwordA + bPtr->v128;
+ carry1 = (dwordZ < dwordA);
+ dwordZ += carry2;
+ carry1 += (dwordZ < carry2);
+ aPtr->v128 = dwordZ;
+ aPtr->v192 = aPtr->v192 + bPtr->v192 + carry1;
+
+}
+
+struct floatX256 {
+ bool isNaN;
+ bool isInf;
+ bool isZero;
+ bool sign;
+ int_fast32_t exp;
+ struct uint256 sig;
+};
+
+static const struct floatX256 floatX256NaN =
+ { true, false, false, false, 0, { 0, 0, 0, 0 } };
+static const struct floatX256 floatX256PositiveZero =
+ { false, false, true, false, 0, { 0, 0, 0, 0 } };
+static const struct floatX256 floatX256NegativeZero =
+ { false, false, true, true, 0, { 0, 0, 0, 0 } };
+
+#ifdef FLOAT128
+
+static void f128MToFloatX256( const float128_t *aPtr, struct floatX256 *xPtr )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ xPtr->isNaN = x.isNaN;
+ xPtr->isInf = x.isInf;
+ xPtr->isZero = x.isZero;
+ xPtr->sign = x.sign;
+ xPtr->exp = x.exp;
+ xPtr->sig.v192 = x.sig.v64;
+ xPtr->sig.v128 = x.sig.v0;
+ xPtr->sig.v64 = 0;
+ xPtr->sig.v0 = 0;
+
+}
+
+static void floatX256ToF128M( const struct floatX256 *xPtr, float128_t *zPtr )
+{
+ struct floatX x;
+ int_fast32_t expZ;
+ struct uint256 sig;
+
+ x.isNaN = xPtr->isNaN;
+ x.isInf = xPtr->isInf;
+ x.isZero = xPtr->isZero;
+ x.sign = xPtr->sign;
+ if ( !(x.isNaN | x.isInf | x.isZero) ) {
+ expZ = xPtr->exp;
+ sig = xPtr->sig;
+ while ( !sig.v192 ) {
+ expZ -= 64;
+ sig.v192 = sig.v128;
+ sig.v128 = sig.v64;
+ sig.v64 = sig.v0;
+ sig.v0 = 0;
+ }
+ while ( sig.v192 < UINT64_C( 0x0100000000000000 ) ) {
+ --expZ;
+ shiftLeft1256M( &sig );
+ }
+ x.exp = expZ;
+ x.sig.v64 = sig.v192;
+ x.sig.v0 = sig.v128 | ((sig.v64 | sig.v0) != 0);
+ }
+ floatXToF128M( &x, zPtr );
+
+}
+
+#endif
+
+static void floatX256Invalid( struct floatX256 *xPtr )
+{
+
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ *xPtr = floatX256NaN;
+
+}
+
+static
+void floatX256Add( struct floatX256 *xPtr, const struct floatX256 *yPtr )
+{
+ int_fast32_t expX, expY, expDiff;
+ struct uint256 sigY;
+
+ if ( xPtr->isNaN ) return;
+ if ( yPtr->isNaN ) goto copyY;
+ if ( xPtr->isInf && yPtr->isInf ) {
+ if ( xPtr->sign != yPtr->sign ) floatX256Invalid( xPtr );
+ return;
+ }
+ if ( xPtr->isInf ) return;
+ if ( yPtr->isInf ) goto copyY;
+ if ( xPtr->isZero && yPtr->isZero ) {
+ if ( xPtr->sign == yPtr->sign ) return;
+ goto completeCancellation;
+ }
+ expX = xPtr->exp;
+ expY = yPtr->exp;
+ if (
+ (xPtr->sign != yPtr->sign) && (expX == expY)
+ && eq256M( &xPtr->sig, &yPtr->sig )
+ ) {
+ completeCancellation:
+ if (slowfloat_roundingMode == softfloat_round_min) {
+ *xPtr = floatX256NegativeZero;
+ } else {
+ *xPtr = floatX256PositiveZero;
+ }
+ return;
+ }
+ if ( xPtr->isZero ) goto copyY;
+ if ( yPtr->isZero ) return;
+ expDiff = expX - expY;
+ if ( expDiff < 0 ) {
+ xPtr->exp = expY;
+ if ( expDiff < -248 ) {
+ xPtr->sig.v192 = 0;
+ xPtr->sig.v128 = 0;
+ xPtr->sig.v64 = 0;
+ xPtr->sig.v0 = 1;
+ } else {
+ while ( expDiff < 0 ) {
+ ++expDiff;
+ shiftRight1Jam256M( &xPtr->sig );
+ }
+ }
+ if ( xPtr->sign != yPtr->sign ) neg256M( &xPtr->sig );
+ xPtr->sign = yPtr->sign;
+ add256M( &xPtr->sig, &yPtr->sig );
+ } else {
+ sigY = yPtr->sig;
+ if ( 248 < expDiff ) {
+ sigY.v192 = 0;
+ sigY.v128 = 0;
+ sigY.v64 = 0;
+ sigY.v0 = 1;
+ } else {
+ while ( 0 < expDiff ) {
+ --expDiff;
+ shiftRight1Jam256M( &sigY );
+ }
+ }
+ if ( xPtr->sign != yPtr->sign ) neg256M( &sigY );
+ add256M( &xPtr->sig, &sigY );
+ }
+ if ( xPtr->sig.v192 & UINT64_C( 0x8000000000000000 ) ) {
+ xPtr->sign = !xPtr->sign;
+ neg256M( &xPtr->sig );
+ }
+ return;
+ copyY:
+ *xPtr = *yPtr;
+
+}
+
+static
+void floatX256Mul( struct floatX256 *xPtr, const struct floatX256 *yPtr )
+{
+ struct uint256 sig;
+ int bitNum;
+
+ if ( xPtr->isNaN ) return;
+ if ( yPtr->isNaN ) {
+ xPtr->isNaN = true;
+ xPtr->isInf = false;
+ xPtr->isZero = false;
+ xPtr->sign = yPtr->sign;
+ return;
+ }
+ if ( yPtr->sign ) xPtr->sign = !xPtr->sign;
+ if ( xPtr->isInf ) {
+ if ( yPtr->isZero ) floatX256Invalid( xPtr );
+ return;
+ }
+ if ( yPtr->isInf ) {
+ if ( xPtr->isZero ) {
+ floatX256Invalid( xPtr );
+ return;
+ }
+ xPtr->isInf = true;
+ return;
+ }
+ if ( xPtr->isZero || yPtr->isZero ) {
+ if ( xPtr->sign ) {
+ *xPtr = floatX256NegativeZero;
+ } else {
+ *xPtr = floatX256PositiveZero;
+ }
+ return;
+ }
+ xPtr->exp += yPtr->exp;
+ sig.v192 = 0;
+ sig.v128 = 0;
+ sig.v64 = 0;
+ sig.v0 = 0;
+ for ( bitNum = 0; bitNum < 248; ++bitNum ) {
+ shiftRight1Jam256M( &sig );
+ if ( xPtr->sig.v0 & 1 ) add256M( &sig, &yPtr->sig );
+ shiftRight1256M( &xPtr->sig );
+ }
+ if ( UINT64_C( 0x0100000000000000 ) <= sig.v192 ) {
+ ++xPtr->exp;
+ shiftRight1Jam256M( &sig );
+ }
+ xPtr->sig = sig;
+
+}
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+#ifdef FLOAT16
+
+float16_t slow_ui32_to_f16( uint32_t a )
+{
+ struct floatX x;
+
+ ui32ToFloatX( a, &x );
+ return floatXToF16( &x );
+
+}
+
+#endif
+
+float32_t slow_ui32_to_f32( uint32_t a )
+{
+ struct floatX x;
+
+ ui32ToFloatX( a, &x );
+ return floatXToF32( &x );
+
+}
+
+#ifdef FLOAT64
+
+float64_t slow_ui32_to_f64( uint32_t a )
+{
+ struct floatX x;
+
+ ui32ToFloatX( a, &x );
+ return floatXToF64( &x );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void slow_ui32_to_extF80M( uint32_t a, extFloat80_t *zPtr )
+{
+ struct floatX x;
+
+ ui32ToFloatX( a, &x );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void slow_ui32_to_f128M( uint32_t a, float128_t *zPtr )
+{
+ struct floatX x;
+
+ ui32ToFloatX( a, &x );
+ floatXToF128M( &x, zPtr );
+
+}
+
+#endif
+
+#ifdef FLOAT16
+
+float16_t slow_ui64_to_f16( uint64_t a )
+{
+ struct floatX x;
+
+ ui64ToFloatX( a, &x );
+ return floatXToF16( &x );
+
+}
+
+#endif
+
+float32_t slow_ui64_to_f32( uint64_t a )
+{
+ struct floatX x;
+
+ ui64ToFloatX( a, &x );
+ return floatXToF32( &x );
+
+}
+
+#ifdef FLOAT64
+
+float64_t slow_ui64_to_f64( uint64_t a )
+{
+ struct floatX x;
+
+ ui64ToFloatX( a, &x );
+ return floatXToF64( &x );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void slow_ui64_to_extF80M( uint64_t a, extFloat80_t *zPtr )
+{
+ struct floatX x;
+
+ ui64ToFloatX( a, &x );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void slow_ui64_to_f128M( uint64_t a, float128_t *zPtr )
+{
+ struct floatX x;
+
+ ui64ToFloatX( a, &x );
+ floatXToF128M( &x, zPtr );
+
+}
+
+#endif
+
+#ifdef FLOAT16
+
+float16_t slow_i32_to_f16( int32_t a )
+{
+ struct floatX x;
+
+ i32ToFloatX( a, &x );
+ return floatXToF16( &x );
+
+}
+
+#endif
+
+float32_t slow_i32_to_f32( int32_t a )
+{
+ struct floatX x;
+
+ i32ToFloatX( a, &x );
+ return floatXToF32( &x );
+
+}
+
+#ifdef FLOAT64
+
+float64_t slow_i32_to_f64( int32_t a )
+{
+ struct floatX x;
+
+ i32ToFloatX( a, &x );
+ return floatXToF64( &x );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void slow_i32_to_extF80M( int32_t a, extFloat80_t *zPtr )
+{
+ struct floatX x;
+
+ i32ToFloatX( a, &x );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void slow_i32_to_f128M( int32_t a, float128_t *zPtr )
+{
+ struct floatX x;
+
+ i32ToFloatX( a, &x );
+ floatXToF128M( &x, zPtr );
+
+}
+
+#endif
+
+#ifdef FLOAT16
+
+float16_t slow_i64_to_f16( int64_t a )
+{
+ struct floatX x;
+
+ i64ToFloatX( a, &x );
+ return floatXToF16( &x );
+
+}
+
+#endif
+
+float32_t slow_i64_to_f32( int64_t a )
+{
+ struct floatX x;
+
+ i64ToFloatX( a, &x );
+ return floatXToF32( &x );
+
+}
+
+#ifdef FLOAT64
+
+float64_t slow_i64_to_f64( int64_t a )
+{
+ struct floatX x;
+
+ i64ToFloatX( a, &x );
+ return floatXToF64( &x );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void slow_i64_to_extF80M( int64_t a, extFloat80_t *zPtr )
+{
+ struct floatX x;
+
+ i64ToFloatX( a, &x );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void slow_i64_to_f128M( int64_t a, float128_t *zPtr )
+{
+ struct floatX x;
+
+ i64ToFloatX( a, &x );
+ floatXToF128M( &x, zPtr );
+
+}
+
+#endif
+
+#ifdef FLOAT16
+
+uint_fast32_t
+ slow_f16_to_ui32( float16_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ return floatXToUI32( &x, roundingMode, exact );
+
+}
+
+uint_fast64_t
+ slow_f16_to_ui64( float16_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ return floatXToUI64( &x, roundingMode, exact );
+
+}
+
+int_fast32_t
+ slow_f16_to_i32( float16_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ return floatXToI32( &x, roundingMode, exact );
+
+}
+
+int_fast64_t
+ slow_f16_to_i64( float16_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ return floatXToI64( &x, roundingMode, exact );
+
+}
+
+uint_fast32_t slow_f16_to_ui32_r_minMag( float16_t a, bool exact )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ return floatXToUI32( &x, softfloat_round_minMag, exact );
+
+}
+
+uint_fast64_t slow_f16_to_ui64_r_minMag( float16_t a, bool exact )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ return floatXToUI64( &x, softfloat_round_minMag, exact );
+
+}
+
+int_fast32_t slow_f16_to_i32_r_minMag( float16_t a, bool exact )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ return floatXToI32( &x, softfloat_round_minMag, exact );
+
+}
+
+int_fast64_t slow_f16_to_i64_r_minMag( float16_t a, bool exact )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ return floatXToI64( &x, softfloat_round_minMag, exact );
+
+}
+
+float32_t slow_f16_to_f32( float16_t a )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ return floatXToF32( &x );
+
+}
+
+#ifdef FLOAT64
+
+float64_t slow_f16_to_f64( float16_t a )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ return floatXToF64( &x );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void slow_f16_to_extF80M( float16_t a, extFloat80_t *zPtr )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void slow_f16_to_f128M( float16_t a, float128_t *zPtr )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ floatXToF128M( &x, zPtr );
+
+}
+
+#endif
+
+float16_t
+ slow_f16_roundToInt( float16_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ floatXRoundToInt( &x, roundingMode, exact );
+ return floatXToF16( &x );
+
+}
+
+float16_t slow_f16_add( float16_t a, float16_t b )
+{
+ struct floatX x, y;
+
+ f16ToFloatX( a, &x );
+ f16ToFloatX( b, &y );
+ floatXAdd( &x, &y );
+ return floatXToF16( &x );
+
+}
+
+float16_t slow_f16_sub( float16_t a, float16_t b )
+{
+ struct floatX x, y;
+
+ f16ToFloatX( a, &x );
+ f16ToFloatX( b, &y );
+ y.sign = !y.sign;
+ floatXAdd( &x, &y );
+ return floatXToF16( &x );
+
+
+}
+
+float16_t slow_f16_mul( float16_t a, float16_t b )
+{
+ struct floatX x, y;
+
+ f16ToFloatX( a, &x );
+ f16ToFloatX( b, &y );
+ floatXMul( &x, &y );
+ return floatXToF16( &x );
+
+}
+
+float16_t slow_f16_mulAdd( float16_t a, float16_t b, float16_t c )
+{
+ struct floatX x, y;
+
+ f16ToFloatX( a, &x );
+ f16ToFloatX( b, &y );
+ floatXMul( &x, &y );
+ f16ToFloatX( c, &y );
+ floatXAdd( &x, &y );
+ return floatXToF16( &x );
+
+}
+
+float16_t slow_f16_div( float16_t a, float16_t b )
+{
+ struct floatX x, y;
+
+ f16ToFloatX( a, &x );
+ f16ToFloatX( b, &y );
+ floatXDiv( &x, &y );
+ return floatXToF16( &x );
+
+}
+
+float16_t slow_f16_rem( float16_t a, float16_t b )
+{
+ struct floatX x, y;
+
+ f16ToFloatX( a, &x );
+ f16ToFloatX( b, &y );
+ floatXRem( &x, &y );
+ return floatXToF16( &x );
+
+}
+
+float16_t slow_f16_sqrt( float16_t a )
+{
+ struct floatX x;
+
+ f16ToFloatX( a, &x );
+ floatXSqrt( &x );
+ return floatXToF16( &x );
+
+}
+
+bool slow_f16_eq( float16_t a, float16_t b )
+{
+ struct floatX x, y;
+
+ f16ToFloatX( a, &x );
+ f16ToFloatX( b, &y );
+ return floatXEq( &x, &y );
+
+}
+
+bool slow_f16_le( float16_t a, float16_t b )
+{
+ struct floatX x, y;
+
+ f16ToFloatX( a, &x );
+ f16ToFloatX( b, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXLe( &x, &y );
+
+}
+
+bool slow_f16_lt( float16_t a, float16_t b )
+{
+ struct floatX x, y;
+
+ f16ToFloatX( a, &x );
+ f16ToFloatX( b, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXLt( &x, &y );
+
+}
+
+bool slow_f16_eq_signaling( float16_t a, float16_t b )
+{
+ struct floatX x, y;
+
+ f16ToFloatX( a, &x );
+ f16ToFloatX( b, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXEq( &x, &y );
+
+}
+
+bool slow_f16_le_quiet( float16_t a, float16_t b )
+{
+ struct floatX x, y;
+
+ f16ToFloatX( a, &x );
+ f16ToFloatX( b, &y );
+ return floatXLe( &x, &y );
+
+}
+
+bool slow_f16_lt_quiet( float16_t a, float16_t b )
+{
+ struct floatX x, y;
+
+ f16ToFloatX( a, &x );
+ f16ToFloatX( b, &y );
+ return floatXLt( &x, &y );
+
+}
+
+#endif
+
+uint_fast32_t
+ slow_f32_to_ui32( float32_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ return floatXToUI32( &x, roundingMode, exact );
+
+}
+
+uint_fast64_t
+ slow_f32_to_ui64( float32_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ return floatXToUI64( &x, roundingMode, exact );
+
+}
+
+int_fast32_t
+ slow_f32_to_i32( float32_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ return floatXToI32( &x, roundingMode, exact );
+
+}
+
+int_fast64_t
+ slow_f32_to_i64( float32_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ return floatXToI64( &x, roundingMode, exact );
+
+}
+
+uint_fast32_t slow_f32_to_ui32_r_minMag( float32_t a, bool exact )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ return floatXToUI32( &x, softfloat_round_minMag, exact );
+
+}
+
+uint_fast64_t slow_f32_to_ui64_r_minMag( float32_t a, bool exact )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ return floatXToUI64( &x, softfloat_round_minMag, exact );
+
+}
+
+int_fast32_t slow_f32_to_i32_r_minMag( float32_t a, bool exact )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ return floatXToI32( &x, softfloat_round_minMag, exact );
+
+}
+
+int_fast64_t slow_f32_to_i64_r_minMag( float32_t a, bool exact )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ return floatXToI64( &x, softfloat_round_minMag, exact );
+
+}
+
+#ifdef FLOAT16
+
+float16_t slow_f32_to_f16( float32_t a )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ return floatXToF16( &x );
+
+}
+
+#endif
+
+#ifdef FLOAT64
+
+float64_t slow_f32_to_f64( float32_t a )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ return floatXToF64( &x );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void slow_f32_to_extF80M( float32_t a, extFloat80_t *zPtr )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void slow_f32_to_f128M( float32_t a, float128_t *zPtr )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ floatXToF128M( &x, zPtr );
+
+}
+
+#endif
+
+float32_t
+ slow_f32_roundToInt( float32_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ floatXRoundToInt( &x, roundingMode, exact );
+ return floatXToF32( &x );
+
+}
+
+float32_t slow_f32_add( float32_t a, float32_t b )
+{
+ struct floatX x, y;
+
+ f32ToFloatX( a, &x );
+ f32ToFloatX( b, &y );
+ floatXAdd( &x, &y );
+ return floatXToF32( &x );
+
+}
+
+float32_t slow_f32_sub( float32_t a, float32_t b )
+{
+ struct floatX x, y;
+
+ f32ToFloatX( a, &x );
+ f32ToFloatX( b, &y );
+ y.sign = !y.sign;
+ floatXAdd( &x, &y );
+ return floatXToF32( &x );
+
+
+}
+
+float32_t slow_f32_mul( float32_t a, float32_t b )
+{
+ struct floatX x, y;
+
+ f32ToFloatX( a, &x );
+ f32ToFloatX( b, &y );
+ floatXMul( &x, &y );
+ return floatXToF32( &x );
+
+}
+
+float32_t slow_f32_mulAdd( float32_t a, float32_t b, float32_t c )
+{
+ struct floatX x, y;
+
+ f32ToFloatX( a, &x );
+ f32ToFloatX( b, &y );
+ floatXMul( &x, &y );
+ f32ToFloatX( c, &y );
+ floatXAdd( &x, &y );
+ return floatXToF32( &x );
+
+}
+
+float32_t slow_f32_div( float32_t a, float32_t b )
+{
+ struct floatX x, y;
+
+ f32ToFloatX( a, &x );
+ f32ToFloatX( b, &y );
+ floatXDiv( &x, &y );
+ return floatXToF32( &x );
+
+}
+
+float32_t slow_f32_rem( float32_t a, float32_t b )
+{
+ struct floatX x, y;
+
+ f32ToFloatX( a, &x );
+ f32ToFloatX( b, &y );
+ floatXRem( &x, &y );
+ return floatXToF32( &x );
+
+}
+
+float32_t slow_f32_sqrt( float32_t a )
+{
+ struct floatX x;
+
+ f32ToFloatX( a, &x );
+ floatXSqrt( &x );
+ return floatXToF32( &x );
+
+}
+
+bool slow_f32_eq( float32_t a, float32_t b )
+{
+ struct floatX x, y;
+
+ f32ToFloatX( a, &x );
+ f32ToFloatX( b, &y );
+ return floatXEq( &x, &y );
+
+}
+
+bool slow_f32_le( float32_t a, float32_t b )
+{
+ struct floatX x, y;
+
+ f32ToFloatX( a, &x );
+ f32ToFloatX( b, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXLe( &x, &y );
+
+}
+
+bool slow_f32_lt( float32_t a, float32_t b )
+{
+ struct floatX x, y;
+
+ f32ToFloatX( a, &x );
+ f32ToFloatX( b, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXLt( &x, &y );
+
+}
+
+bool slow_f32_eq_signaling( float32_t a, float32_t b )
+{
+ struct floatX x, y;
+
+ f32ToFloatX( a, &x );
+ f32ToFloatX( b, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXEq( &x, &y );
+
+}
+
+bool slow_f32_le_quiet( float32_t a, float32_t b )
+{
+ struct floatX x, y;
+
+ f32ToFloatX( a, &x );
+ f32ToFloatX( b, &y );
+ return floatXLe( &x, &y );
+
+}
+
+bool slow_f32_lt_quiet( float32_t a, float32_t b )
+{
+ struct floatX x, y;
+
+ f32ToFloatX( a, &x );
+ f32ToFloatX( b, &y );
+ return floatXLt( &x, &y );
+
+}
+
+#ifdef FLOAT64
+
+uint_fast32_t
+ slow_f64_to_ui32( float64_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ return floatXToUI32( &x, roundingMode, exact );
+
+}
+
+uint_fast64_t
+ slow_f64_to_ui64( float64_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ return floatXToUI64( &x, roundingMode, exact );
+
+}
+
+int_fast32_t
+ slow_f64_to_i32( float64_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ return floatXToI32( &x, roundingMode, exact );
+
+}
+
+int_fast64_t
+ slow_f64_to_i64( float64_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ return floatXToI64( &x, roundingMode, exact );
+
+}
+
+uint_fast32_t slow_f64_to_ui32_r_minMag( float64_t a, bool exact )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ return floatXToUI32( &x, softfloat_round_minMag, exact );
+
+}
+
+uint_fast64_t slow_f64_to_ui64_r_minMag( float64_t a, bool exact )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ return floatXToUI64( &x, softfloat_round_minMag, exact );
+
+}
+
+int_fast32_t slow_f64_to_i32_r_minMag( float64_t a, bool exact )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ return floatXToI32( &x, softfloat_round_minMag, exact );
+
+}
+
+int_fast64_t slow_f64_to_i64_r_minMag( float64_t a, bool exact )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ return floatXToI64( &x, softfloat_round_minMag, exact );
+
+}
+
+#ifdef FLOAT16
+
+float16_t slow_f64_to_f16( float64_t a )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ return floatXToF16( &x );
+
+}
+
+#endif
+
+float32_t slow_f64_to_f32( float64_t a )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ return floatXToF32( &x );
+
+}
+
+#ifdef EXTFLOAT80
+
+void slow_f64_to_extF80M( float64_t a, extFloat80_t *zPtr )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void slow_f64_to_f128M( float64_t a, float128_t *zPtr )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ floatXToF128M( &x, zPtr );
+
+}
+
+#endif
+
+float64_t
+ slow_f64_roundToInt( float64_t a, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ floatXRoundToInt( &x, roundingMode, exact );
+ return floatXToF64( &x );
+
+}
+
+float64_t slow_f64_add( float64_t a, float64_t b )
+{
+ struct floatX x, y;
+
+ f64ToFloatX( a, &x );
+ f64ToFloatX( b, &y );
+ floatXAdd( &x, &y );
+ return floatXToF64( &x );
+
+}
+
+float64_t slow_f64_sub( float64_t a, float64_t b )
+{
+ struct floatX x, y;
+
+ f64ToFloatX( a, &x );
+ f64ToFloatX( b, &y );
+ y.sign = !y.sign;
+ floatXAdd( &x, &y );
+ return floatXToF64( &x );
+
+}
+
+float64_t slow_f64_mul( float64_t a, float64_t b )
+{
+ struct floatX x, y;
+
+ f64ToFloatX( a, &x );
+ f64ToFloatX( b, &y );
+ floatXMul( &x, &y );
+ return floatXToF64( &x );
+
+}
+
+float64_t slow_f64_mulAdd( float64_t a, float64_t b, float64_t c )
+{
+ struct floatX x, y;
+
+ f64ToFloatX( a, &x );
+ f64ToFloatX( b, &y );
+ floatXMul( &x, &y );
+ f64ToFloatX( c, &y );
+ floatXAdd( &x, &y );
+ return floatXToF64( &x );
+
+}
+
+float64_t slow_f64_div( float64_t a, float64_t b )
+{
+ struct floatX x, y;
+
+ f64ToFloatX( a, &x );
+ f64ToFloatX( b, &y );
+ floatXDiv( &x, &y );
+ return floatXToF64( &x );
+
+}
+
+float64_t slow_f64_rem( float64_t a, float64_t b )
+{
+ struct floatX x, y;
+
+ f64ToFloatX( a, &x );
+ f64ToFloatX( b, &y );
+ floatXRem( &x, &y );
+ return floatXToF64( &x );
+
+}
+
+float64_t slow_f64_sqrt( float64_t a )
+{
+ struct floatX x;
+
+ f64ToFloatX( a, &x );
+ floatXSqrt( &x );
+ return floatXToF64( &x );
+
+}
+
+bool slow_f64_eq( float64_t a, float64_t b )
+{
+ struct floatX x, y;
+
+ f64ToFloatX( a, &x );
+ f64ToFloatX( b, &y );
+ return floatXEq( &x, &y );
+
+}
+
+bool slow_f64_le( float64_t a, float64_t b )
+{
+ struct floatX x, y;
+
+ f64ToFloatX( a, &x );
+ f64ToFloatX( b, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXLe( &x, &y );
+
+}
+
+bool slow_f64_lt( float64_t a, float64_t b )
+{
+ struct floatX x, y;
+
+ f64ToFloatX( a, &x );
+ f64ToFloatX( b, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXLt( &x, &y );
+
+}
+
+bool slow_f64_eq_signaling( float64_t a, float64_t b )
+{
+ struct floatX x, y;
+
+ f64ToFloatX( a, &x );
+ f64ToFloatX( b, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXEq( &x, &y );
+
+}
+
+bool slow_f64_le_quiet( float64_t a, float64_t b )
+{
+ struct floatX x, y;
+
+ f64ToFloatX( a, &x );
+ f64ToFloatX( b, &y );
+ return floatXLe( &x, &y );
+
+}
+
+bool slow_f64_lt_quiet( float64_t a, float64_t b )
+{
+ struct floatX x, y;
+
+ f64ToFloatX( a, &x );
+ f64ToFloatX( b, &y );
+ return floatXLt( &x, &y );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+uint_fast32_t
+ slow_extF80M_to_ui32(
+ const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ return floatXToUI32( &x, roundingMode, exact );
+
+}
+
+uint_fast64_t
+ slow_extF80M_to_ui64(
+ const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ return floatXToUI64( &x, roundingMode, exact );
+
+}
+
+int_fast32_t
+ slow_extF80M_to_i32(
+ const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ return floatXToI32( &x, roundingMode, exact );
+
+}
+
+int_fast64_t
+ slow_extF80M_to_i64(
+ const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ return floatXToI64( &x, roundingMode, exact );
+
+}
+
+uint_fast32_t
+ slow_extF80M_to_ui32_r_minMag( const extFloat80_t *aPtr, bool exact )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ return floatXToUI32( &x, softfloat_round_minMag, exact );
+
+}
+
+uint_fast64_t
+ slow_extF80M_to_ui64_r_minMag( const extFloat80_t *aPtr, bool exact )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ return floatXToUI64( &x, softfloat_round_minMag, exact );
+
+}
+
+int_fast32_t
+ slow_extF80M_to_i32_r_minMag( const extFloat80_t *aPtr, bool exact )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ return floatXToI32( &x, softfloat_round_minMag, exact );
+
+}
+
+int_fast64_t
+ slow_extF80M_to_i64_r_minMag( const extFloat80_t *aPtr, bool exact )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ return floatXToI64( &x, softfloat_round_minMag, exact );
+
+}
+
+#ifdef FLOAT16
+
+float16_t slow_extF80M_to_f16( const extFloat80_t *aPtr )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ return floatXToF16( &x );
+
+}
+
+#endif
+
+float32_t slow_extF80M_to_f32( const extFloat80_t *aPtr )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ return floatXToF32( &x );
+
+}
+
+#ifdef FLOAT64
+
+float64_t slow_extF80M_to_f64( const extFloat80_t *aPtr )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ return floatXToF64( &x );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+void slow_extF80M_to_f128M( const extFloat80_t *aPtr, float128_t *zPtr )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ floatXToF128M( &x, zPtr );
+
+}
+
+#endif
+
+void
+ slow_extF80M_roundToInt(
+ const extFloat80_t *aPtr,
+ uint_fast8_t roundingMode,
+ bool exact,
+ extFloat80_t *zPtr
+ )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ floatXRoundToInt( &x, roundingMode, exact );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+void
+ slow_extF80M_add(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr )
+{
+ struct floatX x, y;
+
+ extF80MToFloatX( aPtr, &x );
+ extF80MToFloatX( bPtr, &y );
+ floatXAdd( &x, &y );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+void
+ slow_extF80M_sub(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr )
+{
+ struct floatX x, y;
+
+ extF80MToFloatX( aPtr, &x );
+ extF80MToFloatX( bPtr, &y );
+ y.sign = !y.sign;
+ floatXAdd( &x, &y );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+void
+ slow_extF80M_mul(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr )
+{
+ struct floatX x, y;
+
+ extF80MToFloatX( aPtr, &x );
+ extF80MToFloatX( bPtr, &y );
+ floatXMul( &x, &y );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+void
+ slow_extF80M_div(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr )
+{
+ struct floatX x, y;
+
+ extF80MToFloatX( aPtr, &x );
+ extF80MToFloatX( bPtr, &y );
+ floatXDiv( &x, &y );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+void
+ slow_extF80M_rem(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr )
+{
+ struct floatX x, y;
+
+ extF80MToFloatX( aPtr, &x );
+ extF80MToFloatX( bPtr, &y );
+ floatXRem( &x, &y );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+void slow_extF80M_sqrt( const extFloat80_t *aPtr, extFloat80_t *zPtr )
+{
+ struct floatX x;
+
+ extF80MToFloatX( aPtr, &x );
+ floatXSqrt( &x );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+bool slow_extF80M_eq( const extFloat80_t *aPtr, const extFloat80_t *bPtr )
+{
+ struct floatX x, y;
+
+ extF80MToFloatX( aPtr, &x );
+ extF80MToFloatX( bPtr, &y );
+ return floatXEq( &x, &y );
+
+}
+
+bool slow_extF80M_le( const extFloat80_t *aPtr, const extFloat80_t *bPtr )
+{
+ struct floatX x, y;
+
+ extF80MToFloatX( aPtr, &x );
+ extF80MToFloatX( bPtr, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXLe( &x, &y );
+
+}
+
+bool slow_extF80M_lt( const extFloat80_t *aPtr, const extFloat80_t *bPtr )
+{
+ struct floatX x, y;
+
+ extF80MToFloatX( aPtr, &x );
+ extF80MToFloatX( bPtr, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXLt( &x, &y );
+
+}
+
+bool
+ slow_extF80M_eq_signaling(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr )
+{
+ struct floatX x, y;
+
+ extF80MToFloatX( aPtr, &x );
+ extF80MToFloatX( bPtr, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXEq( &x, &y );
+
+}
+
+bool slow_extF80M_le_quiet( const extFloat80_t *aPtr, const extFloat80_t *bPtr )
+{
+ struct floatX x, y;
+
+ extF80MToFloatX( aPtr, &x );
+ extF80MToFloatX( bPtr, &y );
+ return floatXLe( &x, &y );
+
+}
+
+bool slow_extF80M_lt_quiet( const extFloat80_t *aPtr, const extFloat80_t *bPtr )
+{
+ struct floatX x, y;
+
+ extF80MToFloatX( aPtr, &x );
+ extF80MToFloatX( bPtr, &y );
+ return floatXLt( &x, &y );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+uint_fast32_t
+ slow_f128M_to_ui32(
+ const float128_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ return floatXToUI32( &x, roundingMode, exact );
+
+}
+
+uint_fast64_t
+ slow_f128M_to_ui64(
+ const float128_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ return floatXToUI64( &x, roundingMode, exact );
+
+}
+
+int_fast32_t
+ slow_f128M_to_i32(
+ const float128_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ return floatXToI32( &x, roundingMode, exact );
+
+}
+
+int_fast64_t
+ slow_f128M_to_i64(
+ const float128_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ return floatXToI64( &x, roundingMode, exact );
+
+}
+
+uint_fast32_t slow_f128M_to_ui32_r_minMag( const float128_t *aPtr, bool exact )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ return floatXToUI32( &x, softfloat_round_minMag, exact );
+
+}
+
+uint_fast64_t slow_f128M_to_ui64_r_minMag( const float128_t *aPtr, bool exact )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ return floatXToUI64( &x, softfloat_round_minMag, exact );
+
+}
+
+int_fast32_t slow_f128M_to_i32_r_minMag( const float128_t *aPtr, bool exact )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ return floatXToI32( &x, softfloat_round_minMag, exact );
+
+}
+
+int_fast64_t slow_f128M_to_i64_r_minMag( const float128_t *aPtr, bool exact )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ return floatXToI64( &x, softfloat_round_minMag, exact );
+
+}
+
+#ifdef FLOAT16
+
+float16_t slow_f128M_to_f16( const float128_t *aPtr )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ return floatXToF16( &x );
+
+}
+
+#endif
+
+float32_t slow_f128M_to_f32( const float128_t *aPtr )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ return floatXToF32( &x );
+
+}
+
+#ifdef FLOAT64
+
+float64_t slow_f128M_to_f64( const float128_t *aPtr )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ return floatXToF64( &x );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+void slow_f128M_to_extF80M( const float128_t *aPtr, extFloat80_t *zPtr )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ floatXToExtF80M( &x, zPtr );
+
+}
+
+#endif
+
+void
+ slow_f128M_roundToInt(
+ const float128_t *aPtr,
+ uint_fast8_t roundingMode,
+ bool exact,
+ float128_t *zPtr
+ )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ floatXRoundToInt( &x, roundingMode, exact );
+ floatXToF128M( &x, zPtr );
+
+}
+
+void
+ slow_f128M_add(
+ const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr )
+{
+ struct floatX x, y;
+
+ f128MToFloatX( aPtr, &x );
+ f128MToFloatX( bPtr, &y );
+ floatXAdd( &x, &y );
+ floatXToF128M( &x, zPtr );
+
+}
+
+void
+ slow_f128M_sub(
+ const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr )
+{
+ struct floatX x, y;
+
+ f128MToFloatX( aPtr, &x );
+ f128MToFloatX( bPtr, &y );
+ y.sign = !y.sign;
+ floatXAdd( &x, &y );
+ floatXToF128M( &x, zPtr );
+
+}
+
+void
+ slow_f128M_mul(
+ const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr )
+{
+ struct floatX x, y;
+
+ f128MToFloatX( aPtr, &x );
+ f128MToFloatX( bPtr, &y );
+ floatXMul( &x, &y );
+ floatXToF128M( &x, zPtr );
+
+}
+
+void
+ slow_f128M_mulAdd(
+ const float128_t *aPtr,
+ const float128_t *bPtr,
+ const float128_t *cPtr,
+ float128_t *zPtr
+ )
+{
+ struct floatX256 x, y;
+
+ f128MToFloatX256( aPtr, &x );
+ f128MToFloatX256( bPtr, &y );
+ floatX256Mul( &x, &y );
+ f128MToFloatX256( cPtr, &y );
+ floatX256Add( &x, &y );
+ floatX256ToF128M( &x, zPtr );
+
+}
+
+void
+ slow_f128M_div(
+ const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr )
+{
+ struct floatX x, y;
+
+ f128MToFloatX( aPtr, &x );
+ f128MToFloatX( bPtr, &y );
+ floatXDiv( &x, &y );
+ floatXToF128M( &x, zPtr );
+
+}
+
+void
+ slow_f128M_rem(
+ const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr )
+{
+ struct floatX x, y;
+
+ f128MToFloatX( aPtr, &x );
+ f128MToFloatX( bPtr, &y );
+ floatXRem( &x, &y );
+ floatXToF128M( &x, zPtr );
+
+}
+
+void slow_f128M_sqrt( const float128_t *aPtr, float128_t *zPtr )
+{
+ struct floatX x;
+
+ f128MToFloatX( aPtr, &x );
+ floatXSqrt( &x );
+ floatXToF128M( &x, zPtr );
+
+}
+
+bool slow_f128M_eq( const float128_t *aPtr, const float128_t *bPtr )
+{
+ struct floatX x, y;
+
+ f128MToFloatX( aPtr, &x );
+ f128MToFloatX( bPtr, &y );
+ return floatXEq( &x, &y );
+
+}
+
+bool slow_f128M_le( const float128_t *aPtr, const float128_t *bPtr )
+{
+ struct floatX x, y;
+
+ f128MToFloatX( aPtr, &x );
+ f128MToFloatX( bPtr, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXLe( &x, &y );
+
+}
+
+bool slow_f128M_lt( const float128_t *aPtr, const float128_t *bPtr )
+{
+ struct floatX x, y;
+
+ f128MToFloatX( aPtr, &x );
+ f128MToFloatX( bPtr, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXLt( &x, &y );
+
+}
+
+bool slow_f128M_eq_signaling( const float128_t *aPtr, const float128_t *bPtr )
+{
+ struct floatX x, y;
+
+ f128MToFloatX( aPtr, &x );
+ f128MToFloatX( bPtr, &y );
+ if ( x.isNaN || y.isNaN ) {
+ slowfloat_exceptionFlags |= softfloat_flag_invalid;
+ }
+ return floatXEq( &x, &y );
+
+}
+
+bool slow_f128M_le_quiet( const float128_t *aPtr, const float128_t *bPtr )
+{
+ struct floatX x, y;
+
+ f128MToFloatX( aPtr, &x );
+ f128MToFloatX( bPtr, &y );
+ return floatXLe( &x, &y );
+
+}
+
+bool slow_f128M_lt_quiet( const float128_t *aPtr, const float128_t *bPtr )
+{
+ struct floatX x, y;
+
+ f128MToFloatX( aPtr, &x );
+ f128MToFloatX( bPtr, &y );
+ return floatXLt( &x, &y );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/slowfloat.h b/src/libs/softfloat-3e/testfloat/source/slowfloat.h
new file mode 100644
index 00000000..b2240e77
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/slowfloat.h
@@ -0,0 +1,298 @@
+
+/*============================================================================
+
+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, 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "softfloat.h"
+
+extern uint_fast8_t slowfloat_roundingMode;
+extern uint_fast8_t slowfloat_detectTininess;
+extern uint_fast8_t slowfloat_exceptionFlags;
+#ifdef EXTFLOAT80
+extern uint_fast8_t slow_extF80_roundingPrecision;
+#endif
+
+#ifdef FLOAT16
+float16_t slow_ui32_to_f16( uint32_t );
+#endif
+float32_t slow_ui32_to_f32( uint32_t );
+#ifdef FLOAT64
+float64_t slow_ui32_to_f64( uint32_t );
+#endif
+#ifdef EXTFLOAT80
+void slow_ui32_to_extF80M( uint32_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void slow_ui32_to_f128M( uint32_t, float128_t * );
+#endif
+#ifdef FLOAT16
+float16_t slow_ui64_to_f16( uint64_t );
+#endif
+float32_t slow_ui64_to_f32( uint64_t );
+#ifdef FLOAT64
+float64_t slow_ui64_to_f64( uint64_t );
+#endif
+#ifdef EXTFLOAT80
+void slow_ui64_to_extF80M( uint64_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void slow_ui64_to_f128M( uint64_t, float128_t * );
+#endif
+#ifdef FLOAT16
+float16_t slow_i32_to_f16( int32_t );
+#endif
+float32_t slow_i32_to_f32( int32_t );
+#ifdef FLOAT64
+float64_t slow_i32_to_f64( int32_t );
+#endif
+#ifdef EXTFLOAT80
+void slow_i32_to_extF80M( int32_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void slow_i32_to_f128M( int32_t, float128_t * );
+#endif
+#ifdef FLOAT16
+float16_t slow_i64_to_f16( int64_t );
+#endif
+float32_t slow_i64_to_f32( int64_t );
+#ifdef FLOAT64
+float64_t slow_i64_to_f64( int64_t );
+#endif
+#ifdef EXTFLOAT80
+void slow_i64_to_extF80M( int64_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void slow_i64_to_f128M( int64_t, float128_t * );
+#endif
+
+#ifdef FLOAT16
+uint_fast32_t slow_f16_to_ui32( float16_t, uint_fast8_t, bool );
+uint_fast64_t slow_f16_to_ui64( float16_t, uint_fast8_t, bool );
+int_fast32_t slow_f16_to_i32( float16_t, uint_fast8_t, bool );
+int_fast64_t slow_f16_to_i64( float16_t, uint_fast8_t, bool );
+uint_fast32_t slow_f16_to_ui32_r_minMag( float16_t, bool );
+uint_fast64_t slow_f16_to_ui64_r_minMag( float16_t, bool );
+int_fast32_t slow_f16_to_i32_r_minMag( float16_t, bool );
+int_fast64_t slow_f16_to_i64_r_minMag( float16_t, bool );
+float32_t slow_f16_to_f32( float16_t );
+#ifdef FLOAT64
+float64_t slow_f16_to_f64( float16_t );
+#endif
+#ifdef EXTFLOAT80
+void slow_f16_to_extF80M( float16_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void slow_f16_to_f128M( float16_t, float128_t * );
+#endif
+float16_t slow_f16_roundToInt( float16_t, uint_fast8_t, bool );
+float16_t slow_f16_add( float16_t, float16_t );
+float16_t slow_f16_sub( float16_t, float16_t );
+float16_t slow_f16_mul( float16_t, float16_t );
+float16_t slow_f16_mulAdd( float16_t, float16_t, float16_t );
+float16_t slow_f16_div( float16_t, float16_t );
+float16_t slow_f16_rem( float16_t, float16_t );
+float16_t slow_f16_sqrt( float16_t );
+bool slow_f16_eq( float16_t, float16_t );
+bool slow_f16_le( float16_t, float16_t );
+bool slow_f16_lt( float16_t, float16_t );
+bool slow_f16_eq_signaling( float16_t, float16_t );
+bool slow_f16_le_quiet( float16_t, float16_t );
+bool slow_f16_lt_quiet( float16_t, float16_t );
+#endif
+
+uint_fast32_t slow_f32_to_ui32( float32_t, uint_fast8_t, bool );
+uint_fast64_t slow_f32_to_ui64( float32_t, uint_fast8_t, bool );
+int_fast32_t slow_f32_to_i32( float32_t, uint_fast8_t, bool );
+int_fast64_t slow_f32_to_i64( float32_t, uint_fast8_t, bool );
+uint_fast32_t slow_f32_to_ui32_r_minMag( float32_t, bool );
+uint_fast64_t slow_f32_to_ui64_r_minMag( float32_t, bool );
+int_fast32_t slow_f32_to_i32_r_minMag( float32_t, bool );
+int_fast64_t slow_f32_to_i64_r_minMag( float32_t, bool );
+#ifdef FLOAT16
+float16_t slow_f32_to_f16( float32_t );
+#endif
+#ifdef FLOAT64
+float64_t slow_f32_to_f64( float32_t );
+#endif
+#ifdef EXTFLOAT80
+void slow_f32_to_extF80M( float32_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void slow_f32_to_f128M( float32_t, float128_t * );
+#endif
+float32_t slow_f32_roundToInt( float32_t, uint_fast8_t, bool );
+float32_t slow_f32_add( float32_t, float32_t );
+float32_t slow_f32_sub( float32_t, float32_t );
+float32_t slow_f32_mul( float32_t, float32_t );
+float32_t slow_f32_mulAdd( float32_t, float32_t, float32_t );
+float32_t slow_f32_div( float32_t, float32_t );
+float32_t slow_f32_rem( float32_t, float32_t );
+float32_t slow_f32_sqrt( float32_t );
+bool slow_f32_eq( float32_t, float32_t );
+bool slow_f32_le( float32_t, float32_t );
+bool slow_f32_lt( float32_t, float32_t );
+bool slow_f32_eq_signaling( float32_t, float32_t );
+bool slow_f32_le_quiet( float32_t, float32_t );
+bool slow_f32_lt_quiet( float32_t, float32_t );
+
+#ifdef FLOAT64
+uint_fast32_t slow_f64_to_ui32( float64_t, uint_fast8_t, bool );
+uint_fast64_t slow_f64_to_ui64( float64_t, uint_fast8_t, bool );
+int_fast32_t slow_f64_to_i32( float64_t, uint_fast8_t, bool );
+int_fast64_t slow_f64_to_i64( float64_t, uint_fast8_t, bool );
+uint_fast32_t slow_f64_to_ui32_r_minMag( float64_t, bool );
+uint_fast64_t slow_f64_to_ui64_r_minMag( float64_t, bool );
+int_fast32_t slow_f64_to_i32_r_minMag( float64_t, bool );
+int_fast64_t slow_f64_to_i64_r_minMag( float64_t, bool );
+#ifdef FLOAT16
+float16_t slow_f64_to_f16( float64_t );
+#endif
+float32_t slow_f64_to_f32( float64_t );
+#ifdef EXTFLOAT80
+void slow_f64_to_extF80M( float64_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void slow_f64_to_f128M( float64_t, float128_t * );
+#endif
+float64_t slow_f64_roundToInt( float64_t, uint_fast8_t, bool );
+float64_t slow_f64_add( float64_t, float64_t );
+float64_t slow_f64_sub( float64_t, float64_t );
+float64_t slow_f64_mul( float64_t, float64_t );
+float64_t slow_f64_mulAdd( float64_t, float64_t, float64_t );
+float64_t slow_f64_div( float64_t, float64_t );
+float64_t slow_f64_rem( float64_t, float64_t );
+float64_t slow_f64_sqrt( float64_t );
+bool slow_f64_eq( float64_t, float64_t );
+bool slow_f64_le( float64_t, float64_t );
+bool slow_f64_lt( float64_t, float64_t );
+bool slow_f64_eq_signaling( float64_t, float64_t );
+bool slow_f64_le_quiet( float64_t, float64_t );
+bool slow_f64_lt_quiet( float64_t, float64_t );
+#endif
+
+#ifdef EXTFLOAT80
+uint_fast32_t slow_extF80M_to_ui32( const extFloat80_t *, uint_fast8_t, bool );
+uint_fast64_t slow_extF80M_to_ui64( const extFloat80_t *, uint_fast8_t, bool );
+int_fast32_t slow_extF80M_to_i32( const extFloat80_t *, uint_fast8_t, bool );
+int_fast64_t slow_extF80M_to_i64( const extFloat80_t *, uint_fast8_t, bool );
+uint_fast32_t slow_extF80M_to_ui32_r_minMag( const extFloat80_t *, bool );
+uint_fast64_t slow_extF80M_to_ui64_r_minMag( const extFloat80_t *, bool );
+int_fast32_t slow_extF80M_to_i32_r_minMag( const extFloat80_t *, bool );
+int_fast64_t slow_extF80M_to_i64_r_minMag( const extFloat80_t *, bool );
+#ifdef FLOAT16
+float16_t slow_extF80M_to_f16( const extFloat80_t * );
+#endif
+float32_t slow_extF80M_to_f32( const extFloat80_t * );
+#ifdef FLOAT64
+float64_t slow_extF80M_to_f64( const extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void slow_extF80M_to_f128M( const extFloat80_t *, float128_t * );
+#endif
+void
+ slow_extF80M_roundToInt(
+ const extFloat80_t *, uint_fast8_t, bool, extFloat80_t * );
+void
+ slow_extF80M_add(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+void
+ slow_extF80M_sub(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+void
+ slow_extF80M_mul(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+void
+ slow_extF80M_mulAdd(
+ const extFloat80_t *,
+ const extFloat80_t *,
+ const extFloat80_t *,
+ extFloat80_t *
+ );
+void
+ slow_extF80M_div(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+void
+ slow_extF80M_rem(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+void slow_extF80M_sqrt( const extFloat80_t *, extFloat80_t * );
+bool slow_extF80M_eq( const extFloat80_t *, const extFloat80_t * );
+bool slow_extF80M_le( const extFloat80_t *, const extFloat80_t * );
+bool slow_extF80M_lt( const extFloat80_t *, const extFloat80_t * );
+bool slow_extF80M_eq_signaling( const extFloat80_t *, const extFloat80_t * );
+bool slow_extF80M_le_quiet( const extFloat80_t *, const extFloat80_t * );
+bool slow_extF80M_lt_quiet( const extFloat80_t *, const extFloat80_t * );
+#endif
+
+#ifdef FLOAT128
+uint_fast32_t slow_f128M_to_ui32( const float128_t *, uint_fast8_t, bool );
+uint_fast64_t slow_f128M_to_ui64( const float128_t *, uint_fast8_t, bool );
+int_fast32_t slow_f128M_to_i32( const float128_t *, uint_fast8_t, bool );
+int_fast64_t slow_f128M_to_i64( const float128_t *, uint_fast8_t, bool );
+uint_fast32_t slow_f128M_to_ui32_r_minMag( const float128_t *, bool );
+uint_fast64_t slow_f128M_to_ui64_r_minMag( const float128_t *, bool );
+int_fast32_t slow_f128M_to_i32_r_minMag( const float128_t *, bool );
+int_fast64_t slow_f128M_to_i64_r_minMag( const float128_t *, bool );
+#ifdef FLOAT16
+float16_t slow_f128M_to_f16( const float128_t * );
+#endif
+float32_t slow_f128M_to_f32( const float128_t * );
+#ifdef FLOAT64
+float64_t slow_f128M_to_f64( const float128_t * );
+#endif
+#ifdef EXTFLOAT80
+void slow_f128M_to_extF80M( const float128_t *, extFloat80_t * );
+#endif
+void
+ slow_f128M_roundToInt( const float128_t *, uint_fast8_t, bool, float128_t * );
+void slow_f128M_add( const float128_t *, const float128_t *, float128_t * );
+void slow_f128M_sub( const float128_t *, const float128_t *, float128_t * );
+void slow_f128M_mul( const float128_t *, const float128_t *, float128_t * );
+void
+ slow_f128M_mulAdd(
+ const float128_t *, const float128_t *, const float128_t *, float128_t *
+ );
+void slow_f128M_div( const float128_t *, const float128_t *, float128_t * );
+void slow_f128M_rem( const float128_t *, const float128_t *, float128_t * );
+void slow_f128M_sqrt( const float128_t *, float128_t * );
+bool slow_f128M_eq( const float128_t *, const float128_t * );
+bool slow_f128M_le( const float128_t *, const float128_t * );
+bool slow_f128M_lt( const float128_t *, const float128_t * );
+bool slow_f128M_eq_signaling( const float128_t *, const float128_t * );
+bool slow_f128M_le_quiet( const float128_t *, const float128_t * );
+bool slow_f128M_lt_quiet( const float128_t *, const float128_t * );
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/standardFunctionInfos.c b/src/libs/softfloat-3e/testfloat/source/standardFunctionInfos.c
new file mode 100644
index 00000000..2ccc0011
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/standardFunctionInfos.c
@@ -0,0 +1,471 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "functions.h"
+
+#define RNEVEN ROUND_NEAR_EVEN
+#define RMINM ROUND_MINMAG
+#define RMIN ROUND_MIN
+#define RMAX ROUND_MAX
+#define RNMAXM ROUND_NEAR_MAXMAG
+
+const struct standardFunctionInfo standardFunctionInfos[] = {
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT16
+ { "ui32_to_f16", UI32_TO_F16, 0, 0 },
+#endif
+ { "ui32_to_f32", UI32_TO_F32, 0, 0 },
+#ifdef FLOAT64
+ { "ui32_to_f64", UI32_TO_F64, 0, 0 },
+#endif
+#ifdef EXTFLOAT80
+ { "ui32_to_extF80", UI32_TO_EXTF80, 0, 0 },
+#endif
+#ifdef FLOAT128
+ { "ui32_to_f128", UI32_TO_F128, 0, 0 },
+#endif
+#ifdef FLOAT16
+ { "ui64_to_f16", UI64_TO_F16, 0, 0 },
+#endif
+ { "ui64_to_f32", UI64_TO_F32, 0, 0 },
+#ifdef FLOAT64
+ { "ui64_to_f64", UI64_TO_F64, 0, 0 },
+#endif
+#ifdef EXTFLOAT80
+ { "ui64_to_extF80", UI64_TO_EXTF80, 0, 0 },
+#endif
+#ifdef FLOAT128
+ { "ui64_to_f128", UI64_TO_F128, 0, 0 },
+#endif
+#ifdef FLOAT16
+ { "i32_to_f16", I32_TO_F16, 0, 0 },
+#endif
+ { "i32_to_f32", I32_TO_F32, 0, 0 },
+#ifdef FLOAT64
+ { "i32_to_f64", I32_TO_F64, 0, 0 },
+#endif
+#ifdef EXTFLOAT80
+ { "i32_to_extF80", I32_TO_EXTF80, 0, 0 },
+#endif
+#ifdef FLOAT128
+ { "i32_to_f128", I32_TO_F128, 0, 0 },
+#endif
+#ifdef FLOAT16
+ { "i64_to_f16", I64_TO_F16, 0, 0 },
+#endif
+ { "i64_to_f32", I64_TO_F32, 0, 0 },
+#ifdef FLOAT64
+ { "i64_to_f64", I64_TO_F64, 0, 0 },
+#endif
+#ifdef EXTFLOAT80
+ { "i64_to_extF80", I64_TO_EXTF80, 0, 0 },
+#endif
+#ifdef FLOAT128
+ { "i64_to_f128", I64_TO_F128, 0, 0 },
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT16
+ { "f16_to_ui32_r_near_even", F16_TO_UI32, RNEVEN, false },
+ { "f16_to_ui32_r_minMag", F16_TO_UI32, RMINM, false },
+ { "f16_to_ui32_r_min", F16_TO_UI32, RMIN, false },
+ { "f16_to_ui32_r_max", F16_TO_UI32, RMAX, false },
+ { "f16_to_ui32_r_near_maxMag", F16_TO_UI32, RNMAXM, false },
+ { "f16_to_ui64_r_near_even", F16_TO_UI64, RNEVEN, false },
+ { "f16_to_ui64_r_minMag", F16_TO_UI64, RMINM, false },
+ { "f16_to_ui64_r_min", F16_TO_UI64, RMIN, false },
+ { "f16_to_ui64_r_max", F16_TO_UI64, RMAX, false },
+ { "f16_to_ui64_r_near_maxMag", F16_TO_UI64, RNMAXM, false },
+ { "f16_to_i32_r_near_even", F16_TO_I32, RNEVEN, false },
+ { "f16_to_i32_r_minMag", F16_TO_I32, RMINM, false },
+ { "f16_to_i32_r_min", F16_TO_I32, RMIN, false },
+ { "f16_to_i32_r_max", F16_TO_I32, RMAX, false },
+ { "f16_to_i32_r_near_maxMag", F16_TO_I32, RNMAXM, false },
+ { "f16_to_i64_r_near_even", F16_TO_I64, RNEVEN, false },
+ { "f16_to_i64_r_minMag", F16_TO_I64, RMINM, false },
+ { "f16_to_i64_r_min", F16_TO_I64, RMIN, false },
+ { "f16_to_i64_r_max", F16_TO_I64, RMAX, false },
+ { "f16_to_i64_r_near_maxMag", F16_TO_I64, RNMAXM, false },
+ { "f16_to_ui32_rx_near_even", F16_TO_UI32, RNEVEN, true },
+ { "f16_to_ui32_rx_minMag", F16_TO_UI32, RMINM, true },
+ { "f16_to_ui32_rx_min", F16_TO_UI32, RMIN, true },
+ { "f16_to_ui32_rx_max", F16_TO_UI32, RMAX, true },
+ { "f16_to_ui32_rx_near_maxMag", F16_TO_UI32, RNMAXM, true },
+ { "f16_to_ui64_rx_near_even", F16_TO_UI64, RNEVEN, true },
+ { "f16_to_ui64_rx_minMag", F16_TO_UI64, RMINM, true },
+ { "f16_to_ui64_rx_min", F16_TO_UI64, RMIN, true },
+ { "f16_to_ui64_rx_max", F16_TO_UI64, RMAX, true },
+ { "f16_to_ui64_rx_near_maxMag", F16_TO_UI64, RNMAXM, true },
+ { "f16_to_i32_rx_near_even", F16_TO_I32, RNEVEN, true },
+ { "f16_to_i32_rx_minMag", F16_TO_I32, RMINM, true },
+ { "f16_to_i32_rx_min", F16_TO_I32, RMIN, true },
+ { "f16_to_i32_rx_max", F16_TO_I32, RMAX, true },
+ { "f16_to_i32_rx_near_maxMag", F16_TO_I32, RNMAXM, true },
+ { "f16_to_i64_rx_near_even", F16_TO_I64, RNEVEN, true },
+ { "f16_to_i64_rx_minMag", F16_TO_I64, RMINM, true },
+ { "f16_to_i64_rx_min", F16_TO_I64, RMIN, true },
+ { "f16_to_i64_rx_max", F16_TO_I64, RMAX, true },
+ { "f16_to_i64_rx_near_maxMag", F16_TO_I64, RNMAXM, true },
+ { "f16_to_f32", F16_TO_F32, 0, 0 },
+#ifdef FLOAT64
+ { "f16_to_f64", F16_TO_F64, 0, 0 },
+#endif
+#ifdef EXTFLOAT80
+ { "f16_to_extF80", F16_TO_EXTF80, 0, 0 },
+#endif
+#ifdef FLOAT128
+ { "f16_to_f128", F16_TO_F128, 0, 0 },
+#endif
+ { "f16_roundToInt_r_near_even", F16_ROUNDTOINT, RNEVEN, false },
+ { "f16_roundToInt_r_minMag", F16_ROUNDTOINT, RMINM, false },
+ { "f16_roundToInt_r_min", F16_ROUNDTOINT, RMIN, false },
+ { "f16_roundToInt_r_max", F16_ROUNDTOINT, RMAX, false },
+ { "f16_roundToInt_r_near_maxMag", F16_ROUNDTOINT, RNMAXM, false },
+ { "f16_roundToInt_x", F16_ROUNDTOINT, 0, true },
+ { "f16_add", F16_ADD, 0, 0 },
+ { "f16_sub", F16_SUB, 0, 0 },
+ { "f16_mul", F16_MUL, 0, 0 },
+ { "f16_mulAdd", F16_MULADD, 0, 0 },
+ { "f16_div", F16_DIV, 0, 0 },
+ { "f16_rem", F16_REM, 0, 0 },
+ { "f16_sqrt", F16_SQRT, 0, 0 },
+ { "f16_eq", F16_EQ, 0, 0 },
+ { "f16_le", F16_LE, 0, 0 },
+ { "f16_lt", F16_LT, 0, 0 },
+ { "f16_eq_signaling", F16_EQ_SIGNALING, 0, 0 },
+ { "f16_le_quiet", F16_LE_QUIET, 0, 0 },
+ { "f16_lt_quiet", F16_LT_QUIET, 0, 0 },
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ { "f32_to_ui32_r_near_even", F32_TO_UI32, RNEVEN, false },
+ { "f32_to_ui32_r_minMag", F32_TO_UI32, RMINM, false },
+ { "f32_to_ui32_r_min", F32_TO_UI32, RMIN, false },
+ { "f32_to_ui32_r_max", F32_TO_UI32, RMAX, false },
+ { "f32_to_ui32_r_near_maxMag", F32_TO_UI32, RNMAXM, false },
+ { "f32_to_ui64_r_near_even", F32_TO_UI64, RNEVEN, false },
+ { "f32_to_ui64_r_minMag", F32_TO_UI64, RMINM, false },
+ { "f32_to_ui64_r_min", F32_TO_UI64, RMIN, false },
+ { "f32_to_ui64_r_max", F32_TO_UI64, RMAX, false },
+ { "f32_to_ui64_r_near_maxMag", F32_TO_UI64, RNMAXM, false },
+ { "f32_to_i32_r_near_even", F32_TO_I32, RNEVEN, false },
+ { "f32_to_i32_r_minMag", F32_TO_I32, RMINM, false },
+ { "f32_to_i32_r_min", F32_TO_I32, RMIN, false },
+ { "f32_to_i32_r_max", F32_TO_I32, RMAX, false },
+ { "f32_to_i32_r_near_maxMag", F32_TO_I32, RNMAXM, false },
+ { "f32_to_i64_r_near_even", F32_TO_I64, RNEVEN, false },
+ { "f32_to_i64_r_minMag", F32_TO_I64, RMINM, false },
+ { "f32_to_i64_r_min", F32_TO_I64, RMIN, false },
+ { "f32_to_i64_r_max", F32_TO_I64, RMAX, false },
+ { "f32_to_i64_r_near_maxMag", F32_TO_I64, RNMAXM, false },
+ { "f32_to_ui32_rx_near_even", F32_TO_UI32, RNEVEN, true },
+ { "f32_to_ui32_rx_minMag", F32_TO_UI32, RMINM, true },
+ { "f32_to_ui32_rx_min", F32_TO_UI32, RMIN, true },
+ { "f32_to_ui32_rx_max", F32_TO_UI32, RMAX, true },
+ { "f32_to_ui32_rx_near_maxMag", F32_TO_UI32, RNMAXM, true },
+ { "f32_to_ui64_rx_near_even", F32_TO_UI64, RNEVEN, true },
+ { "f32_to_ui64_rx_minMag", F32_TO_UI64, RMINM, true },
+ { "f32_to_ui64_rx_min", F32_TO_UI64, RMIN, true },
+ { "f32_to_ui64_rx_max", F32_TO_UI64, RMAX, true },
+ { "f32_to_ui64_rx_near_maxMag", F32_TO_UI64, RNMAXM, true },
+ { "f32_to_i32_rx_near_even", F32_TO_I32, RNEVEN, true },
+ { "f32_to_i32_rx_minMag", F32_TO_I32, RMINM, true },
+ { "f32_to_i32_rx_min", F32_TO_I32, RMIN, true },
+ { "f32_to_i32_rx_max", F32_TO_I32, RMAX, true },
+ { "f32_to_i32_rx_near_maxMag", F32_TO_I32, RNMAXM, true },
+ { "f32_to_i64_rx_near_even", F32_TO_I64, RNEVEN, true },
+ { "f32_to_i64_rx_minMag", F32_TO_I64, RMINM, true },
+ { "f32_to_i64_rx_min", F32_TO_I64, RMIN, true },
+ { "f32_to_i64_rx_max", F32_TO_I64, RMAX, true },
+ { "f32_to_i64_rx_near_maxMag", F32_TO_I64, RNMAXM, true },
+#ifdef FLOAT16
+ { "f32_to_f16", F32_TO_F16, 0, 0 },
+#endif
+#ifdef FLOAT64
+ { "f32_to_f64", F32_TO_F64, 0, 0 },
+#endif
+#ifdef EXTFLOAT80
+ { "f32_to_extF80", F32_TO_EXTF80, 0, 0 },
+#endif
+#ifdef FLOAT128
+ { "f32_to_f128", F32_TO_F128, 0, 0 },
+#endif
+ { "f32_roundToInt_r_near_even", F32_ROUNDTOINT, RNEVEN, false },
+ { "f32_roundToInt_r_minMag", F32_ROUNDTOINT, RMINM, false },
+ { "f32_roundToInt_r_min", F32_ROUNDTOINT, RMIN, false },
+ { "f32_roundToInt_r_max", F32_ROUNDTOINT, RMAX, false },
+ { "f32_roundToInt_r_near_maxMag", F32_ROUNDTOINT, RNMAXM, false },
+ { "f32_roundToInt_x", F32_ROUNDTOINT, 0, true },
+ { "f32_add", F32_ADD, 0, 0 },
+ { "f32_sub", F32_SUB, 0, 0 },
+ { "f32_mul", F32_MUL, 0, 0 },
+ { "f32_mulAdd", F32_MULADD, 0, 0 },
+ { "f32_div", F32_DIV, 0, 0 },
+ { "f32_rem", F32_REM, 0, 0 },
+ { "f32_sqrt", F32_SQRT, 0, 0 },
+ { "f32_eq", F32_EQ, 0, 0 },
+ { "f32_le", F32_LE, 0, 0 },
+ { "f32_lt", F32_LT, 0, 0 },
+ { "f32_eq_signaling", F32_EQ_SIGNALING, 0, 0 },
+ { "f32_le_quiet", F32_LE_QUIET, 0, 0 },
+ { "f32_lt_quiet", F32_LT_QUIET, 0, 0 },
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT64
+ { "f64_to_ui32_r_near_even", F64_TO_UI32, RNEVEN, false },
+ { "f64_to_ui32_r_minMag", F64_TO_UI32, RMINM, false },
+ { "f64_to_ui32_r_min", F64_TO_UI32, RMIN, false },
+ { "f64_to_ui32_r_max", F64_TO_UI32, RMAX, false },
+ { "f64_to_ui32_r_near_maxMag", F64_TO_UI32, RNMAXM, false },
+ { "f64_to_ui64_r_near_even", F64_TO_UI64, RNEVEN, false },
+ { "f64_to_ui64_r_minMag", F64_TO_UI64, RMINM, false },
+ { "f64_to_ui64_r_min", F64_TO_UI64, RMIN, false },
+ { "f64_to_ui64_r_max", F64_TO_UI64, RMAX, false },
+ { "f64_to_ui64_r_near_maxMag", F64_TO_UI64, RNMAXM, false },
+ { "f64_to_i32_r_near_even", F64_TO_I32, RNEVEN, false },
+ { "f64_to_i32_r_minMag", F64_TO_I32, RMINM, false },
+ { "f64_to_i32_r_min", F64_TO_I32, RMIN, false },
+ { "f64_to_i32_r_max", F64_TO_I32, RMAX, false },
+ { "f64_to_i32_r_near_maxMag", F64_TO_I32, RNMAXM, false },
+ { "f64_to_i64_r_near_even", F64_TO_I64, RNEVEN, false },
+ { "f64_to_i64_r_minMag", F64_TO_I64, RMINM, false },
+ { "f64_to_i64_r_min", F64_TO_I64, RMIN, false },
+ { "f64_to_i64_r_max", F64_TO_I64, RMAX, false },
+ { "f64_to_i64_r_near_maxMag", F64_TO_I64, RNMAXM, false },
+ { "f64_to_ui32_rx_near_even", F64_TO_UI32, RNEVEN, true },
+ { "f64_to_ui32_rx_minMag", F64_TO_UI32, RMINM, true },
+ { "f64_to_ui32_rx_min", F64_TO_UI32, RMIN, true },
+ { "f64_to_ui32_rx_max", F64_TO_UI32, RMAX, true },
+ { "f64_to_ui32_rx_near_maxMag", F64_TO_UI32, RNMAXM, true },
+ { "f64_to_ui64_rx_near_even", F64_TO_UI64, RNEVEN, true },
+ { "f64_to_ui64_rx_minMag", F64_TO_UI64, RMINM, true },
+ { "f64_to_ui64_rx_min", F64_TO_UI64, RMIN, true },
+ { "f64_to_ui64_rx_max", F64_TO_UI64, RMAX, true },
+ { "f64_to_ui64_rx_near_maxMag", F64_TO_UI64, RNMAXM, true },
+ { "f64_to_i32_rx_near_even", F64_TO_I32, RNEVEN, true },
+ { "f64_to_i32_rx_minMag", F64_TO_I32, RMINM, true },
+ { "f64_to_i32_rx_min", F64_TO_I32, RMIN, true },
+ { "f64_to_i32_rx_max", F64_TO_I32, RMAX, true },
+ { "f64_to_i32_rx_near_maxMag", F64_TO_I32, RNMAXM, true },
+ { "f64_to_i64_rx_near_even", F64_TO_I64, RNEVEN, true },
+ { "f64_to_i64_rx_minMag", F64_TO_I64, RMINM, true },
+ { "f64_to_i64_rx_min", F64_TO_I64, RMIN, true },
+ { "f64_to_i64_rx_max", F64_TO_I64, RMAX, true },
+ { "f64_to_i64_rx_near_maxMag", F64_TO_I64, RNMAXM, true },
+#ifdef FLOAT16
+ { "f64_to_f16", F64_TO_F16, 0, 0 },
+#endif
+ { "f64_to_f32", F64_TO_F32, 0, 0 },
+#ifdef EXTFLOAT80
+ { "f64_to_extF80", F64_TO_EXTF80, 0, 0 },
+#endif
+#ifdef FLOAT128
+ { "f64_to_f128", F64_TO_F128, 0, 0 },
+#endif
+ { "f64_roundToInt_r_near_even", F64_ROUNDTOINT, RNEVEN, false },
+ { "f64_roundToInt_r_minMag", F64_ROUNDTOINT, RMINM, false },
+ { "f64_roundToInt_r_min", F64_ROUNDTOINT, RMIN, false },
+ { "f64_roundToInt_r_max", F64_ROUNDTOINT, RMAX, false },
+ { "f64_roundToInt_r_near_maxMag", F64_ROUNDTOINT, RNMAXM, false },
+ { "f64_roundToInt_x", F64_ROUNDTOINT, 0, true },
+ { "f64_add", F64_ADD, 0, 0 },
+ { "f64_sub", F64_SUB, 0, 0 },
+ { "f64_mul", F64_MUL, 0, 0 },
+ { "f64_mulAdd", F64_MULADD, 0, 0 },
+ { "f64_div", F64_DIV, 0, 0 },
+ { "f64_rem", F64_REM, 0, 0 },
+ { "f64_sqrt", F64_SQRT, 0, 0 },
+ { "f64_eq", F64_EQ, 0, 0 },
+ { "f64_le", F64_LE, 0, 0 },
+ { "f64_lt", F64_LT, 0, 0 },
+ { "f64_eq_signaling", F64_EQ_SIGNALING, 0, 0 },
+ { "f64_le_quiet", F64_LE_QUIET, 0, 0 },
+ { "f64_lt_quiet", F64_LT_QUIET, 0, 0 },
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef EXTFLOAT80
+ { "extF80_to_ui32_r_near_even", EXTF80_TO_UI32, RNEVEN, false },
+ { "extF80_to_ui32_r_minMag", EXTF80_TO_UI32, RMINM, false },
+ { "extF80_to_ui32_r_min", EXTF80_TO_UI32, RMIN, false },
+ { "extF80_to_ui32_r_max", EXTF80_TO_UI32, RMAX, false },
+ { "extF80_to_ui32_r_near_maxMag", EXTF80_TO_UI32, RNMAXM, false },
+ { "extF80_to_ui64_r_near_even", EXTF80_TO_UI64, RNEVEN, false },
+ { "extF80_to_ui64_r_minMag", EXTF80_TO_UI64, RMINM, false },
+ { "extF80_to_ui64_r_min", EXTF80_TO_UI64, RMIN, false },
+ { "extF80_to_ui64_r_max", EXTF80_TO_UI64, RMAX, false },
+ { "extF80_to_ui64_r_near_maxMag", EXTF80_TO_UI64, RNMAXM, false },
+ { "extF80_to_i32_r_near_even", EXTF80_TO_I32, RNEVEN, false },
+ { "extF80_to_i32_r_minMag", EXTF80_TO_I32, RMINM, false },
+ { "extF80_to_i32_r_min", EXTF80_TO_I32, RMIN, false },
+ { "extF80_to_i32_r_max", EXTF80_TO_I32, RMAX, false },
+ { "extF80_to_i32_r_near_maxMag", EXTF80_TO_I32, RNMAXM, false },
+ { "extF80_to_i64_r_near_even", EXTF80_TO_I64, RNEVEN, false },
+ { "extF80_to_i64_r_minMag", EXTF80_TO_I64, RMINM, false },
+ { "extF80_to_i64_r_min", EXTF80_TO_I64, RMIN, false },
+ { "extF80_to_i64_r_max", EXTF80_TO_I64, RMAX, false },
+ { "extF80_to_i64_r_near_maxMag", EXTF80_TO_I64, RNMAXM, false },
+ { "extF80_to_ui32_rx_near_even", EXTF80_TO_UI32, RNEVEN, true },
+ { "extF80_to_ui32_rx_minMag", EXTF80_TO_UI32, RMINM, true },
+ { "extF80_to_ui32_rx_min", EXTF80_TO_UI32, RMIN, true },
+ { "extF80_to_ui32_rx_max", EXTF80_TO_UI32, RMAX, true },
+ { "extF80_to_ui32_rx_near_maxMag", EXTF80_TO_UI32, RNMAXM, true },
+ { "extF80_to_ui64_rx_near_even", EXTF80_TO_UI64, RNEVEN, true },
+ { "extF80_to_ui64_rx_minMag", EXTF80_TO_UI64, RMINM, true },
+ { "extF80_to_ui64_rx_min", EXTF80_TO_UI64, RMIN, true },
+ { "extF80_to_ui64_rx_max", EXTF80_TO_UI64, RMAX, true },
+ { "extF80_to_ui64_rx_near_maxMag", EXTF80_TO_UI64, RNMAXM, true },
+ { "extF80_to_i32_rx_near_even", EXTF80_TO_I32, RNEVEN, true },
+ { "extF80_to_i32_rx_minMag", EXTF80_TO_I32, RMINM, true },
+ { "extF80_to_i32_rx_min", EXTF80_TO_I32, RMIN, true },
+ { "extF80_to_i32_rx_max", EXTF80_TO_I32, RMAX, true },
+ { "extF80_to_i32_rx_near_maxMag", EXTF80_TO_I32, RNMAXM, true },
+ { "extF80_to_i64_rx_near_even", EXTF80_TO_I64, RNEVEN, true },
+ { "extF80_to_i64_rx_minMag", EXTF80_TO_I64, RMINM, true },
+ { "extF80_to_i64_rx_min", EXTF80_TO_I64, RMIN, true },
+ { "extF80_to_i64_rx_max", EXTF80_TO_I64, RMAX, true },
+ { "extF80_to_i64_rx_near_maxMag", EXTF80_TO_I64, RNMAXM, true },
+#ifdef FLOAT16
+ { "extF80_to_f16", EXTF80_TO_F16, 0, 0 },
+#endif
+ { "extF80_to_f32", EXTF80_TO_F32, 0, 0 },
+#ifdef FLOAT64
+ { "extF80_to_f64", EXTF80_TO_F64, 0, 0 },
+#endif
+#ifdef FLOAT128
+ { "extF80_to_f128", EXTF80_TO_F128, 0, 0 },
+#endif
+ { "extF80_roundToInt_r_near_even", EXTF80_ROUNDTOINT, RNEVEN, false },
+ { "extF80_roundToInt_r_minMag", EXTF80_ROUNDTOINT, RMINM, false },
+ { "extF80_roundToInt_r_min", EXTF80_ROUNDTOINT, RMIN, false },
+ { "extF80_roundToInt_r_max", EXTF80_ROUNDTOINT, RMAX, false },
+ { "extF80_roundToInt_r_near_maxMag", EXTF80_ROUNDTOINT, RNMAXM, false },
+ { "extF80_roundToInt_x", EXTF80_ROUNDTOINT, 0, true },
+ { "extF80_add", EXTF80_ADD, 0, 0 },
+ { "extF80_sub", EXTF80_SUB, 0, 0 },
+ { "extF80_mul", EXTF80_MUL, 0, 0 },
+ { "extF80_div", EXTF80_DIV, 0, 0 },
+ { "extF80_rem", EXTF80_REM, 0, 0 },
+ { "extF80_sqrt", EXTF80_SQRT, 0, 0 },
+ { "extF80_eq", EXTF80_EQ, 0, 0 },
+ { "extF80_le", EXTF80_LE, 0, 0 },
+ { "extF80_lt", EXTF80_LT, 0, 0 },
+ { "extF80_eq_signaling", EXTF80_EQ_SIGNALING, 0, 0 },
+ { "extF80_le_quiet", EXTF80_LE_QUIET, 0, 0 },
+ { "extF80_lt_quiet", EXTF80_LT_QUIET, 0, 0 },
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT128
+ { "f128_to_ui32_r_near_even", F128_TO_UI32, RNEVEN, false },
+ { "f128_to_ui32_r_minMag", F128_TO_UI32, RMINM, false },
+ { "f128_to_ui32_r_min", F128_TO_UI32, RMIN, false },
+ { "f128_to_ui32_r_max", F128_TO_UI32, RMAX, false },
+ { "f128_to_ui32_r_near_maxMag", F128_TO_UI32, RNMAXM, false },
+ { "f128_to_ui64_r_near_even", F128_TO_UI64, RNEVEN, false },
+ { "f128_to_ui64_r_minMag", F128_TO_UI64, RMINM, false },
+ { "f128_to_ui64_r_min", F128_TO_UI64, RMIN, false },
+ { "f128_to_ui64_r_max", F128_TO_UI64, RMAX, false },
+ { "f128_to_ui64_r_near_maxMag", F128_TO_UI64, RNMAXM, false },
+ { "f128_to_i32_r_near_even", F128_TO_I32, RNEVEN, false },
+ { "f128_to_i32_r_minMag", F128_TO_I32, RMINM, false },
+ { "f128_to_i32_r_min", F128_TO_I32, RMIN, false },
+ { "f128_to_i32_r_max", F128_TO_I32, RMAX, false },
+ { "f128_to_i32_r_near_maxMag", F128_TO_I32, RNMAXM, false },
+ { "f128_to_i64_r_near_even", F128_TO_I64, RNEVEN, false },
+ { "f128_to_i64_r_minMag", F128_TO_I64, RMINM, false },
+ { "f128_to_i64_r_min", F128_TO_I64, RMIN, false },
+ { "f128_to_i64_r_max", F128_TO_I64, RMAX, false },
+ { "f128_to_i64_r_near_maxMag", F128_TO_I64, RNMAXM, false },
+ { "f128_to_ui32_rx_near_even", F128_TO_UI32, RNEVEN, true },
+ { "f128_to_ui32_rx_minMag", F128_TO_UI32, RMINM, true },
+ { "f128_to_ui32_rx_min", F128_TO_UI32, RMIN, true },
+ { "f128_to_ui32_rx_max", F128_TO_UI32, RMAX, true },
+ { "f128_to_ui32_rx_near_maxMag", F128_TO_UI32, RNMAXM, true },
+ { "f128_to_ui64_rx_near_even", F128_TO_UI64, RNEVEN, true },
+ { "f128_to_ui64_rx_minMag", F128_TO_UI64, RMINM, true },
+ { "f128_to_ui64_rx_min", F128_TO_UI64, RMIN, true },
+ { "f128_to_ui64_rx_max", F128_TO_UI64, RMAX, true },
+ { "f128_to_ui64_rx_near_maxMag", F128_TO_UI64, RNMAXM, true },
+ { "f128_to_i32_rx_near_even", F128_TO_I32, RNEVEN, true },
+ { "f128_to_i32_rx_minMag", F128_TO_I32, RMINM, true },
+ { "f128_to_i32_rx_min", F128_TO_I32, RMIN, true },
+ { "f128_to_i32_rx_max", F128_TO_I32, RMAX, true },
+ { "f128_to_i32_rx_near_maxMag", F128_TO_I32, RNMAXM, true },
+ { "f128_to_i64_rx_near_even", F128_TO_I64, RNEVEN, true },
+ { "f128_to_i64_rx_minMag", F128_TO_I64, RMINM, true },
+ { "f128_to_i64_rx_min", F128_TO_I64, RMIN, true },
+ { "f128_to_i64_rx_max", F128_TO_I64, RMAX, true },
+ { "f128_to_i64_rx_near_maxMag", F128_TO_I64, RNMAXM, true },
+#ifdef FLOAT16
+ { "f128_to_f16", F128_TO_F16, 0, 0 },
+#endif
+ { "f128_to_f32", F128_TO_F32, 0, 0 },
+#ifdef FLOAT64
+ { "f128_to_f64", F128_TO_F64, 0, 0 },
+#endif
+#ifdef EXTFLOAT80
+ { "f128_to_extF80", F128_TO_EXTF80, 0, 0 },
+#endif
+ { "f128_roundToInt_r_near_even", F128_ROUNDTOINT, RNEVEN, false },
+ { "f128_roundToInt_r_minMag", F128_ROUNDTOINT, RMINM, false },
+ { "f128_roundToInt_r_min", F128_ROUNDTOINT, RMIN, false },
+ { "f128_roundToInt_r_max", F128_ROUNDTOINT, RMAX, false },
+ { "f128_roundToInt_r_near_maxMag", F128_ROUNDTOINT, RNMAXM, false },
+ { "f128_roundToInt_x", F128_ROUNDTOINT, 0, true },
+ { "f128_add", F128_ADD, 0, 0 },
+ { "f128_sub", F128_SUB, 0, 0 },
+ { "f128_mul", F128_MUL, 0, 0 },
+ { "f128_mulAdd", F128_MULADD, 0, 0 },
+ { "f128_div", F128_DIV, 0, 0 },
+ { "f128_rem", F128_REM, 0, 0 },
+ { "f128_sqrt", F128_SQRT, 0, 0 },
+ { "f128_eq", F128_EQ, 0, 0 },
+ { "f128_le", F128_LE, 0, 0 },
+ { "f128_lt", F128_LT, 0, 0 },
+ { "f128_eq_signaling", F128_EQ_SIGNALING, 0, 0 },
+ { "f128_le_quiet", F128_LE_QUIET, 0, 0 },
+ { "f128_lt_quiet", F128_LT_QUIET, 0, 0 },
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ { 0, 0, 0, 0 }
+};
+
diff --git a/src/libs/softfloat-3e/testfloat/source/subj-C/subjfloat.c b/src/libs/softfloat-3e/testfloat/source/subj-C/subjfloat.c
new file mode 100644
index 00000000..f6526d16
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/subj-C/subjfloat.c
@@ -0,0 +1,856 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "subjfloat_config.h"
+#include "subjfloat.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void subjfloat_setRoundingMode( uint_fast8_t roundingMode )
+{
+
+ fesetround(
+ (roundingMode == softfloat_round_near_even) ? FE_TONEAREST
+ : (roundingMode == softfloat_round_minMag) ? FE_TOWARDZERO
+ : (roundingMode == softfloat_round_min) ? FE_DOWNWARD
+ : FE_UPWARD
+ );
+
+}
+
+void subjfloat_setExtF80RoundingPrecision( uint_fast8_t roundingPrecision )
+{
+
+}
+
+uint_fast8_t subjfloat_clearExceptionFlags( void )
+{
+ int subjExceptionFlags;
+ uint_fast8_t exceptionFlags;
+
+ subjExceptionFlags =
+ fetestexcept(
+ FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT
+ );
+ feclearexcept(
+ FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT );
+ exceptionFlags = 0;
+ if ( subjExceptionFlags & FE_INVALID ) {
+ exceptionFlags |= softfloat_flag_invalid;
+ }
+ if ( subjExceptionFlags & FE_DIVBYZERO ) {
+ exceptionFlags |= softfloat_flag_infinite;
+ }
+ if ( subjExceptionFlags & FE_OVERFLOW ) {
+ exceptionFlags |= softfloat_flag_overflow;
+ }
+ if ( subjExceptionFlags & FE_UNDERFLOW ) {
+ exceptionFlags |= softfloat_flag_underflow;
+ }
+ if ( subjExceptionFlags & FE_INEXACT ) {
+ exceptionFlags |= softfloat_flag_inexact;
+ }
+ return exceptionFlags;
+
+}
+
+union f32_f { float32_t f32; float f; };
+
+float32_t subj_ui32_to_f32( uint32_t a )
+{
+ union f32_f uZ;
+
+ uZ.f = a;
+ return uZ.f32;
+
+}
+
+float32_t subj_ui64_to_f32( uint64_t a )
+{
+ union f32_f uZ;
+
+ uZ.f = a;
+ return uZ.f32;
+
+}
+
+float32_t subj_i32_to_f32( int32_t a )
+{
+ union f32_f uZ;
+
+ uZ.f = a;
+ return uZ.f32;
+
+}
+
+float32_t subj_i64_to_f32( int64_t a )
+{
+ union f32_f uZ;
+
+ uZ.f = a;
+ return uZ.f32;
+
+}
+
+uint_fast32_t subj_f32_to_ui32_rx_minMag( float32_t a )
+{
+ union f32_f uA;
+
+ uA.f32 = a;
+ return (uint32_t) uA.f;
+
+}
+
+uint_fast64_t subj_f32_to_ui64_rx_minMag( float32_t a )
+{
+ union f32_f uA;
+
+ uA.f32 = a;
+ return (uint64_t) uA.f;
+
+}
+
+int_fast32_t subj_f32_to_i32_rx_minMag( float32_t a )
+{
+ union f32_f uA;
+
+ uA.f32 = a;
+ return (int32_t) uA.f;
+
+}
+
+int_fast64_t subj_f32_to_i64_rx_minMag( float32_t a )
+{
+ union f32_f uA;
+
+ uA.f32 = a;
+ return (int64_t) uA.f;
+
+}
+
+float32_t subj_f32_add( float32_t a, float32_t b )
+{
+ union f32_f uA, uB, uZ;
+
+ uA.f32 = a;
+ uB.f32 = b;
+ uZ.f = uA.f + uB.f;
+ return uZ.f32;
+
+}
+
+float32_t subj_f32_sub( float32_t a, float32_t b )
+{
+ union f32_f uA, uB, uZ;
+
+ uA.f32 = a;
+ uB.f32 = b;
+ uZ.f = uA.f - uB.f;
+ return uZ.f32;
+
+}
+
+float32_t subj_f32_mul( float32_t a, float32_t b )
+{
+ union f32_f uA, uB, uZ;
+
+ uA.f32 = a;
+ uB.f32 = b;
+ uZ.f = uA.f * uB.f;
+ return uZ.f32;
+
+}
+
+#ifdef __STDC_VERSION__
+#if 199901L <= __STDC_VERSION__
+
+float32_t subj_f32_mulAdd( float32_t a, float32_t b, float32_t c )
+{
+ union f32_f uA, uB, uC, uZ;
+
+ uA.f32 = a;
+ uB.f32 = b;
+ uC.f32 = c;
+ uZ.f = fmaf( uA.f, uB.f, uC.f );
+ return uZ.f32;
+
+}
+
+#endif
+#endif
+
+float32_t subj_f32_div( float32_t a, float32_t b )
+{
+ union f32_f uA, uB, uZ;
+
+ uA.f32 = a;
+ uB.f32 = b;
+ uZ.f = uA.f / uB.f;
+ return uZ.f32;
+
+}
+
+#ifdef __STDC_VERSION__
+#if 199901L <= __STDC_VERSION__
+
+float32_t subj_f32_sqrt( float32_t a )
+{
+ union f32_f uA, uZ;
+
+ uA.f32 = a;
+ uZ.f = sqrtf( uA.f );
+ return uZ.f32;
+
+}
+
+#endif
+#endif
+
+bool subj_f32_eq( float32_t a, float32_t b )
+{
+ union f32_f uA, uB;
+
+ uA.f32 = a;
+ uB.f32 = b;
+ return (uA.f == uB.f);
+
+}
+
+bool subj_f32_le( float32_t a, float32_t b )
+{
+ union f32_f uA, uB;
+
+ uA.f32 = a;
+ uB.f32 = b;
+ return (uA.f <= uB.f);
+
+}
+
+bool subj_f32_lt( float32_t a, float32_t b )
+{
+ union f32_f uA, uB;
+
+ uA.f32 = a;
+ uB.f32 = b;
+ return (uA.f < uB.f);
+
+}
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+#ifdef FLOAT64
+
+union f64_d { float64_t f64; double d; };
+
+float64_t subj_ui32_to_f64( uint32_t a )
+{
+ union f64_d uZ;
+
+ uZ.d = a;
+ return uZ.f64;
+
+}
+
+float64_t subj_ui64_to_f64( uint64_t a )
+{
+ union f64_d uZ;
+
+ uZ.d = a;
+ return uZ.f64;
+
+}
+
+float64_t subj_i32_to_f64( int32_t a )
+{
+ union f64_d uZ;
+
+ uZ.d = a;
+ return uZ.f64;
+
+}
+
+float64_t subj_i64_to_f64( int64_t a )
+{
+ union f64_d uZ;
+
+ uZ.d = a;
+ return uZ.f64;
+
+}
+
+float64_t subj_f32_to_f64( float32_t a )
+{
+ union f32_f uA;
+ union f64_d uZ;
+
+ uA.f32 = a;
+ uZ.d = uA.f;
+ return uZ.f64;
+
+}
+
+uint_fast32_t subj_f64_to_ui32_rx_minMag( float64_t a )
+{
+ union f64_d uA;
+
+ uA.f64 = a;
+ return (uint32_t) uA.d;
+
+}
+
+uint_fast64_t subj_f64_to_ui64_rx_minMag( float64_t a )
+{
+ union f64_d uA;
+
+ uA.f64 = a;
+ return (uint64_t) uA.d;
+
+}
+
+int_fast32_t subj_f64_to_i32_rx_minMag( float64_t a )
+{
+ union f64_d uA;
+
+ uA.f64 = a;
+ return (int32_t) uA.d;
+
+}
+
+int_fast64_t subj_f64_to_i64_rx_minMag( float64_t a )
+{
+ union f64_d uA;
+
+ uA.f64 = a;
+ return (int64_t) uA.d;
+
+}
+
+float32_t subj_f64_to_f32( float64_t a )
+{
+ union f64_d uA;
+ union f32_f uZ;
+
+ uA.f64 = a;
+ uZ.f = uA.d;
+ return uZ.f32;
+
+}
+
+float64_t subj_f64_add( float64_t a, float64_t b )
+{
+ union f64_d uA, uB, uZ;
+
+ uA.f64 = a;
+ uB.f64 = b;
+ uZ.d = uA.d + uB.d;
+ return uZ.f64;
+
+}
+
+float64_t subj_f64_sub( float64_t a, float64_t b )
+{
+ union f64_d uA, uB, uZ;
+
+ uA.f64 = a;
+ uB.f64 = b;
+ uZ.d = uA.d - uB.d;
+ return uZ.f64;
+
+}
+
+float64_t subj_f64_mul( float64_t a, float64_t b )
+{
+ union f64_d uA, uB, uZ;
+
+ uA.f64 = a;
+ uB.f64 = b;
+ uZ.d = uA.d * uB.d;
+ return uZ.f64;
+
+}
+
+#ifdef __STDC_VERSION__
+#if 199901L <= __STDC_VERSION__
+
+float64_t subj_f64_mulAdd( float64_t a, float64_t b, float64_t c )
+{
+ union f64_d uA, uB, uC, uZ;
+
+ uA.f64 = a;
+ uB.f64 = b;
+ uC.f64 = c;
+ uZ.d = fma( uA.d, uB.d, uC.d );
+ return uZ.f64;
+
+}
+
+#endif
+#endif
+
+float64_t subj_f64_div( float64_t a, float64_t b )
+{
+ union f64_d uA, uB, uZ;
+
+ uA.f64 = a;
+ uB.f64 = b;
+ uZ.d = uA.d / uB.d;
+ return uZ.f64;
+
+}
+
+float64_t subj_f64_sqrt( float64_t a )
+{
+ union f64_d uA, uZ;
+
+ uA.f64 = a;
+ uZ.d = sqrt( uA.d );
+ return uZ.f64;
+
+}
+
+bool subj_f64_eq( float64_t a, float64_t b )
+{
+ union f64_d uA, uB;
+
+ uA.f64 = a;
+ uB.f64 = b;
+ return (uA.d == uB.d);
+
+}
+
+bool subj_f64_le( float64_t a, float64_t b )
+{
+ union f64_d uA, uB;
+
+ uA.f64 = a;
+ uB.f64 = b;
+ return (uA.d <= uB.d);
+
+}
+
+bool subj_f64_lt( float64_t a, float64_t b )
+{
+ union f64_d uA, uB;
+
+ uA.f64 = a;
+ uB.f64 = b;
+ return (uA.d < uB.d);
+
+}
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+#if defined EXTFLOAT80 && defined LONG_DOUBLE_IS_EXTFLOAT80
+
+void subj_ui32_to_extF80M( uint32_t a, extFloat80_t *zPtr )
+{
+
+ *((long double *) zPtr) = a;
+
+}
+
+void subj_ui64_to_extF80M( uint64_t a, extFloat80_t *zPtr )
+{
+
+ *((long double *) zPtr) = a;
+
+}
+
+void subj_i32_to_extF80M( int32_t a, extFloat80_t *zPtr )
+{
+
+ *((long double *) zPtr) = a;
+
+}
+
+void subj_i64_to_extF80M( int64_t a, extFloat80_t *zPtr )
+{
+
+ *((long double *) zPtr) = a;
+
+}
+
+void subj_f32_to_extF80M( float32_t a, extFloat80_t *zPtr )
+{
+ union f32_f uA;
+
+ uA.f32 = a;
+ *((long double *) zPtr) = uA.f;
+
+}
+
+#ifdef FLOAT64
+
+void subj_f64_to_extF80M( float64_t a, extFloat80_t *zPtr )
+{
+ union f64_d uA;
+
+ uA.f64 = a;
+ *((long double *) zPtr) = uA.d;
+
+}
+
+#endif
+
+uint_fast32_t subj_extF80M_to_ui32_rx_minMag( const extFloat80_t *aPtr )
+{
+
+ return *((const long double *) aPtr);
+
+}
+
+uint_fast64_t subj_extF80M_to_ui64_rx_minMag( const extFloat80_t *aPtr )
+{
+
+ return *((const long double *) aPtr);
+
+}
+
+int_fast32_t subj_extF80M_to_i32_rx_minMag( const extFloat80_t *aPtr )
+{
+
+ return *((const long double *) aPtr);
+
+}
+
+int_fast64_t subj_extF80M_to_i64_rx_minMag( const extFloat80_t *aPtr )
+{
+
+ return *((const long double *) aPtr);
+
+}
+
+float32_t subj_extF80M_to_f32( const extFloat80_t *aPtr )
+{
+ union f32_f uZ;
+
+ uZ.f = *((const long double *) aPtr);
+ return uZ.f32;
+
+}
+
+#ifdef FLOAT64
+
+float64_t subj_extF80M_to_f64( const extFloat80_t *aPtr )
+{
+ union f64_d uZ;
+
+ uZ.d = *((const long double *) aPtr);
+ return uZ.f64;
+
+}
+
+#endif
+
+void
+ subj_extF80M_add(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr )
+{
+
+ *((long double *) zPtr) =
+ *((const long double *) aPtr) + *((const long double *) bPtr);
+
+}
+
+void
+ subj_extF80M_sub(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr )
+{
+
+ *((long double *) zPtr) =
+ *((const long double *) aPtr) - *((const long double *) bPtr);
+
+}
+
+void
+ subj_extF80M_mul(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr )
+{
+
+ *((long double *) zPtr) =
+ *((const long double *) aPtr) * *((const long double *) bPtr);
+
+}
+
+void
+ subj_extF80M_div(
+ const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr )
+{
+
+ *((long double *) zPtr) =
+ *((const long double *) aPtr) / *((const long double *) bPtr);
+
+}
+
+bool subj_extF80M_eq( const extFloat80_t *aPtr, const extFloat80_t *bPtr )
+{
+
+ return (*((const long double *) aPtr) == *((const long double *) bPtr));
+
+}
+
+bool subj_extF80M_le( const extFloat80_t *aPtr, const extFloat80_t *bPtr )
+{
+
+ return (*((const long double *) aPtr) <= *((const long double *) bPtr));
+
+}
+
+bool subj_extF80M_lt( const extFloat80_t *aPtr, const extFloat80_t *bPtr )
+{
+
+ return (*((const long double *) aPtr) < *((const long double *) bPtr));
+
+}
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+#if defined FLOAT128 && defined LONG_DOUBLE_IS_FLOAT128
+
+void subj_ui32_to_f128M( uint32_t a, float128_t *zPtr )
+{
+
+ *((long double *) zPtr) = a;
+
+}
+
+void subj_ui64_to_f128M( uint64_t a, float128_t *zPtr )
+{
+
+ *((long double *) zPtr) = a;
+
+}
+
+void subj_i32_to_f128M( int32_t a, float128_t *zPtr )
+{
+
+ *((long double *) zPtr) = a;
+
+}
+
+void subj_i64_to_f128M( int64_t a, float128_t *zPtr )
+{
+
+ *((long double *) zPtr) = a;
+
+}
+
+void subj_f32_to_f128M( float32_t a, float128_t *zPtr )
+{
+ union f32_f uA;
+
+ uA.f32 = a;
+ *((long double *) zPtr) = uA.f;
+
+}
+
+#ifdef FLOAT64
+
+void subj_f64_to_f128M( float64_t a, float128_t *zPtr )
+{
+ union f64_d uA;
+
+ uA.f64 = a;
+ *((long double *) zPtr) = uA.d;
+
+}
+
+#endif
+
+uint_fast32_t subj_f128M_to_ui32_rx_minMag( const float128_t *aPtr )
+{
+
+ return *((const long double *) aPtr);
+
+}
+
+uint_fast64_t subj_f128M_to_ui64_rx_minMag( const float128_t *aPtr )
+{
+
+ return *((const long double *) aPtr);
+
+}
+
+int_fast32_t subj_f128M_to_i32_rx_minMag( const float128_t *aPtr )
+{
+
+ return *((const long double *) aPtr);
+
+}
+
+int_fast64_t subj_f128M_to_i64_rx_minMag( const float128_t *aPtr )
+{
+
+ return *((const long double *) aPtr);
+
+}
+
+float32_t subj_f128M_to_f32( const float128_t *aPtr )
+{
+ union f32_f uZ;
+
+ uZ.f = *((const long double *) aPtr);
+ return uZ.f32;
+
+}
+
+#ifdef FLOAT64
+
+float64_t subj_f128M_to_f64( const float128_t *aPtr )
+{
+ union f64_d uZ;
+
+ uZ.d = *((const long double *) aPtr);
+ return uZ.f64;
+
+}
+
+#endif
+
+void
+ subj_f128M_add(
+ const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr )
+{
+
+ *((long double *) zPtr) =
+ *((const long double *) aPtr) + *((const long double *) bPtr);
+
+}
+
+void
+ subj_f128M_sub(
+ const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr )
+{
+
+ *((long double *) zPtr) =
+ *((const long double *) aPtr) - *((const long double *) bPtr);
+
+}
+
+void
+ subj_f128M_mul(
+ const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr )
+{
+
+ *((long double *) zPtr) =
+ *((const long double *) aPtr) * *((const long double *) bPtr);
+
+}
+
+#ifdef __STDC_VERSION__
+#if 199901L <= __STDC_VERSION__
+
+void
+ subj_f128M_mulAdd(
+ const float128_t *aPtr,
+ const float128_t *bPtr,
+ const float128_t *cPtr,
+ float128_t *zPtr
+ )
+{
+
+ *((long double *) zPtr) =
+ fmal(
+ *((const long double *) aPtr),
+ *((const long double *) bPtr),
+ *((const long double *) cPtr)
+ );
+
+}
+
+#endif
+#endif
+
+void
+ subj_f128M_div(
+ const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr )
+{
+
+ *((long double *) zPtr) =
+ *((const long double *) aPtr) / *((const long double *) bPtr);
+
+}
+
+#ifdef __STDC_VERSION__
+#if 199901L <= __STDC_VERSION__
+
+void subj_f128M_sqrt( const float128_t *aPtr, float128_t *zPtr )
+{
+
+ *((long double *) zPtr) = sqrtl( *((const long double *) aPtr) );
+
+}
+
+#endif
+#endif
+
+bool subj_f128M_eq( const float128_t *aPtr, const float128_t *bPtr )
+{
+
+ return (*((const long double *) aPtr) == *((const long double *) bPtr));
+
+}
+
+bool subj_f128M_le( const float128_t *aPtr, const float128_t *bPtr )
+{
+
+ return (*((const long double *) aPtr) <= *((const long double *) bPtr));
+
+}
+
+bool subj_f128M_lt( const float128_t *aPtr, const float128_t *bPtr )
+{
+
+ return (*((const long double *) aPtr) < *((const long double *) bPtr));
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/subj-C/subjfloat_config.h b/src/libs/softfloat-3e/testfloat/source/subj-C/subjfloat_config.h
new file mode 100644
index 00000000..3c2ed79d
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/subj-C/subjfloat_config.h
@@ -0,0 +1,133 @@
+
+/*----------------------------------------------------------------------------
+| The following macros are defined to indicate all the subject functions that
+| exist.
+*----------------------------------------------------------------------------*/
+
+#define SUBJ_UI32_TO_F32
+#define SUBJ_UI64_TO_F32
+#define SUBJ_I32_TO_F32
+#define SUBJ_I64_TO_F32
+
+#define SUBJ_F32_TO_UI32_RX_MINMAG
+#define SUBJ_F32_TO_UI64_RX_MINMAG
+#define SUBJ_F32_TO_I32_RX_MINMAG
+#define SUBJ_F32_TO_I64_RX_MINMAG
+#define SUBJ_F32_ADD
+#define SUBJ_F32_SUB
+#define SUBJ_F32_MUL
+#ifdef __STDC_VERSION__
+#if 199901L <= __STDC_VERSION__
+#define SUBJ_F32_MULADD
+#endif
+#endif
+#define SUBJ_F32_DIV
+#ifdef __STDC_VERSION__
+#if 199901L <= __STDC_VERSION__
+#define SUBJ_F32_SQRT
+#endif
+#endif
+#define SUBJ_F32_EQ
+#define SUBJ_F32_LE
+#define SUBJ_F32_LT
+
+#ifdef FLOAT64
+
+#define SUBJ_UI32_TO_F64
+#define SUBJ_UI64_TO_F64
+#define SUBJ_I32_TO_F64
+#define SUBJ_I64_TO_F64
+
+#define SUBJ_F32_TO_F64
+
+#define SUBJ_F64_TO_UI32_RX_MINMAG
+#define SUBJ_F64_TO_UI64_RX_MINMAG
+#define SUBJ_F64_TO_I32_RX_MINMAG
+#define SUBJ_F64_TO_I64_RX_MINMAG
+#define SUBJ_F64_TO_F32
+#define SUBJ_F64_ADD
+#define SUBJ_F64_SUB
+#define SUBJ_F64_MUL
+#ifdef __STDC_VERSION__
+#if 199901L <= __STDC_VERSION__
+#define SUBJ_F64_MULADD
+#endif
+#endif
+#define SUBJ_F64_DIV
+#define SUBJ_F64_SQRT
+#define SUBJ_F64_EQ
+#define SUBJ_F64_LE
+#define SUBJ_F64_LT
+
+#endif
+
+#if defined EXTFLOAT80 && defined LONG_DOUBLE_IS_EXTFLOAT80
+
+#define SUBJ_UI32_TO_EXTF80
+#define SUBJ_UI64_TO_EXTF80
+#define SUBJ_I32_TO_EXTF80
+#define SUBJ_I64_TO_EXTF80
+
+#define SUBJ_F32_TO_EXTF80
+#ifdef FLOAT64
+#define SUBJ_F64_TO_EXTF80
+#endif
+
+#define SUBJ_EXTF80_TO_UI32_RX_MINMAG
+#define SUBJ_EXTF80_TO_UI64_RX_MINMAG
+#define SUBJ_EXTF80_TO_I32_RX_MINMAG
+#define SUBJ_EXTF80_TO_I64_RX_MINMAG
+#define SUBJ_EXTF80_TO_F32
+#ifdef FLOAT64
+#define SUBJ_EXTF80_TO_F64
+#endif
+#define SUBJ_EXTF80_ADD
+#define SUBJ_EXTF80_SUB
+#define SUBJ_EXTF80_MUL
+#define SUBJ_EXTF80_DIV
+#define SUBJ_EXTF80_EQ
+#define SUBJ_EXTF80_LE
+#define SUBJ_EXTF80_LT
+
+#endif
+
+#if defined FLOAT128 && defined LONG_DOUBLE_IS_FLOAT128
+
+#define SUBJ_UI32_TO_F128
+#define SUBJ_UI64_TO_F128
+#define SUBJ_I32_TO_F128
+#define SUBJ_I64_TO_F128
+
+#define SUBJ_F32_TO_F128
+#ifdef FLOAT64
+#define SUBJ_F64_TO_F128
+#endif
+
+#define SUBJ_F128_TO_UI32_RX_MINMAG
+#define SUBJ_F128_TO_UI64_RX_MINMAG
+#define SUBJ_F128_TO_I32_RX_MINMAG
+#define SUBJ_F128_TO_I64_RX_MINMAG
+#define SUBJ_F128_TO_F32
+#ifdef FLOAT64
+#define SUBJ_F128_TO_F64
+#endif
+#define SUBJ_F128_ADD
+#define SUBJ_F128_SUB
+#define SUBJ_F128_MUL
+#ifdef __STDC_VERSION__
+#if 199901L <= __STDC_VERSION__
+#define SUBJ_F128_MULADD
+#endif
+#endif
+#define SUBJ_F128_DIV
+#ifdef __STDC_VERSION__
+#if 199901L <= __STDC_VERSION__
+#define SUBJ_F128_SQRT
+#endif
+#endif
+#define SUBJ_F128_EQ
+#define SUBJ_F128_LE
+#define SUBJ_F128_LT
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/subjfloat.h b/src/libs/softfloat-3e/testfloat/source/subjfloat.h
new file mode 100644
index 00000000..aaf9776b
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/subjfloat.h
@@ -0,0 +1,516 @@
+
+/*============================================================================
+
+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, 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "softfloat.h"
+
+extern void (*const subjfloat_functions[])();
+
+void subjfloat_setRoundingMode( uint_fast8_t );
+void subjfloat_setExtF80RoundingPrecision( uint_fast8_t );
+uint_fast8_t subjfloat_clearExceptionFlags( void );
+
+/*----------------------------------------------------------------------------
+| Subject function declarations. (Many of these functions may not exist.)
+| WARNING:
+| This file should not normally be modified. Use "subjfloat_config.h" to
+| specify which of these functions actually exist.
+*----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef FLOAT16
+float16_t subj_ui32_to_f16( uint32_t );
+#endif
+float32_t subj_ui32_to_f32( uint32_t );
+#ifdef FLOAT64
+float64_t subj_ui32_to_f64( uint32_t );
+#endif
+#ifdef EXTFLOAT80
+void subj_ui32_to_extF80M( uint32_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void subj_ui32_to_f128M( uint32_t, float128_t * );
+#endif
+#ifdef FLOAT16
+float16_t subj_ui64_to_f16( uint64_t );
+#endif
+float32_t subj_ui64_to_f32( uint64_t );
+#ifdef FLOAT64
+float64_t subj_ui64_to_f64( uint64_t );
+#endif
+#ifdef EXTFLOAT80
+void subj_ui64_to_extF80M( uint64_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void subj_ui64_to_f128M( uint64_t, float128_t * );
+#endif
+#ifdef FLOAT16
+float16_t subj_i32_to_f16( int32_t );
+#endif
+float32_t subj_i32_to_f32( int32_t );
+#ifdef FLOAT64
+float64_t subj_i32_to_f64( int32_t );
+#endif
+#ifdef EXTFLOAT80
+void subj_i32_to_extF80M( int32_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void subj_i32_to_f128M( int32_t, float128_t * );
+#endif
+#ifdef FLOAT16
+float16_t subj_i64_to_f16( int64_t );
+#endif
+float32_t subj_i64_to_f32( int64_t );
+#ifdef FLOAT64
+float64_t subj_i64_to_f64( int64_t );
+#endif
+#ifdef EXTFLOAT80
+void subj_i64_to_extF80M( int64_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void subj_i64_to_f128M( int64_t, float128_t * );
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef FLOAT16
+
+uint_fast32_t subj_f16_to_ui32_r_near_even( float16_t );
+uint_fast32_t subj_f16_to_ui32_r_minMag( float16_t );
+uint_fast32_t subj_f16_to_ui32_r_min( float16_t );
+uint_fast32_t subj_f16_to_ui32_r_max( float16_t );
+uint_fast32_t subj_f16_to_ui32_r_near_maxMag( float16_t );
+uint_fast64_t subj_f16_to_ui64_r_near_even( float16_t );
+uint_fast64_t subj_f16_to_ui64_r_minMag( float16_t );
+uint_fast64_t subj_f16_to_ui64_r_min( float16_t );
+uint_fast64_t subj_f16_to_ui64_r_max( float16_t );
+uint_fast64_t subj_f16_to_ui64_r_near_maxMag( float16_t );
+int_fast32_t subj_f16_to_i32_r_near_even( float16_t );
+int_fast32_t subj_f16_to_i32_r_minMag( float16_t );
+int_fast32_t subj_f16_to_i32_r_min( float16_t );
+int_fast32_t subj_f16_to_i32_r_max( float16_t );
+int_fast32_t subj_f16_to_i32_r_near_maxMag( float16_t );
+int_fast64_t subj_f16_to_i64_r_near_even( float16_t );
+int_fast64_t subj_f16_to_i64_r_minMag( float16_t );
+int_fast64_t subj_f16_to_i64_r_min( float16_t );
+int_fast64_t subj_f16_to_i64_r_max( float16_t );
+int_fast64_t subj_f16_to_i64_r_near_maxMag( float16_t );
+
+uint_fast32_t subj_f16_to_ui32_rx_near_even( float16_t );
+uint_fast32_t subj_f16_to_ui32_rx_minMag( float16_t );
+uint_fast32_t subj_f16_to_ui32_rx_min( float16_t );
+uint_fast32_t subj_f16_to_ui32_rx_max( float16_t );
+uint_fast32_t subj_f16_to_ui32_rx_near_maxMag( float16_t );
+uint_fast64_t subj_f16_to_ui64_rx_near_even( float16_t );
+uint_fast64_t subj_f16_to_ui64_rx_minMag( float16_t );
+uint_fast64_t subj_f16_to_ui64_rx_min( float16_t );
+uint_fast64_t subj_f16_to_ui64_rx_max( float16_t );
+uint_fast64_t subj_f16_to_ui64_rx_near_maxMag( float16_t );
+int_fast32_t subj_f16_to_i32_rx_near_even( float16_t );
+int_fast32_t subj_f16_to_i32_rx_minMag( float16_t );
+int_fast32_t subj_f16_to_i32_rx_min( float16_t );
+int_fast32_t subj_f16_to_i32_rx_max( float16_t );
+int_fast32_t subj_f16_to_i32_rx_near_maxMag( float16_t );
+int_fast64_t subj_f16_to_i64_rx_near_even( float16_t );
+int_fast64_t subj_f16_to_i64_rx_minMag( float16_t );
+int_fast64_t subj_f16_to_i64_rx_min( float16_t );
+int_fast64_t subj_f16_to_i64_rx_max( float16_t );
+int_fast64_t subj_f16_to_i64_rx_near_maxMag( float16_t );
+
+float32_t subj_f16_to_f32( float16_t );
+#ifdef FLOAT64
+float64_t subj_f16_to_f64( float16_t );
+#endif
+#ifdef EXTFLOAT80
+void subj_f16_to_extF80M( float16_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void subj_f16_to_f128M( float16_t, float128_t * );
+#endif
+
+float16_t subj_f16_roundToInt_r_near_even( float16_t );
+float16_t subj_f16_roundToInt_r_minMag( float16_t );
+float16_t subj_f16_roundToInt_r_min( float16_t );
+float16_t subj_f16_roundToInt_r_max( float16_t );
+float16_t subj_f16_roundToInt_r_near_maxMag( float16_t );
+float16_t subj_f16_roundToInt_x( float16_t );
+float16_t subj_f16_add( float16_t, float16_t );
+float16_t subj_f16_sub( float16_t, float16_t );
+float16_t subj_f16_mul( float16_t, float16_t );
+float16_t subj_f16_mulAdd( float16_t, float16_t, float16_t );
+float16_t subj_f16_div( float16_t, float16_t );
+float16_t subj_f16_rem( float16_t, float16_t );
+float16_t subj_f16_sqrt( float16_t );
+bool subj_f16_eq( float16_t, float16_t );
+bool subj_f16_le( float16_t, float16_t );
+bool subj_f16_lt( float16_t, float16_t );
+bool subj_f16_eq_signaling( float16_t, float16_t );
+bool subj_f16_le_quiet( float16_t, float16_t );
+bool subj_f16_lt_quiet( float16_t, float16_t );
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+uint_fast32_t subj_f32_to_ui32_r_near_even( float32_t );
+uint_fast32_t subj_f32_to_ui32_r_minMag( float32_t );
+uint_fast32_t subj_f32_to_ui32_r_min( float32_t );
+uint_fast32_t subj_f32_to_ui32_r_max( float32_t );
+uint_fast32_t subj_f32_to_ui32_r_near_maxMag( float32_t );
+uint_fast64_t subj_f32_to_ui64_r_near_even( float32_t );
+uint_fast64_t subj_f32_to_ui64_r_minMag( float32_t );
+uint_fast64_t subj_f32_to_ui64_r_min( float32_t );
+uint_fast64_t subj_f32_to_ui64_r_max( float32_t );
+uint_fast64_t subj_f32_to_ui64_r_near_maxMag( float32_t );
+int_fast32_t subj_f32_to_i32_r_near_even( float32_t );
+int_fast32_t subj_f32_to_i32_r_minMag( float32_t );
+int_fast32_t subj_f32_to_i32_r_min( float32_t );
+int_fast32_t subj_f32_to_i32_r_max( float32_t );
+int_fast32_t subj_f32_to_i32_r_near_maxMag( float32_t );
+int_fast64_t subj_f32_to_i64_r_near_even( float32_t );
+int_fast64_t subj_f32_to_i64_r_minMag( float32_t );
+int_fast64_t subj_f32_to_i64_r_min( float32_t );
+int_fast64_t subj_f32_to_i64_r_max( float32_t );
+int_fast64_t subj_f32_to_i64_r_near_maxMag( float32_t );
+
+uint_fast32_t subj_f32_to_ui32_rx_near_even( float32_t );
+uint_fast32_t subj_f32_to_ui32_rx_minMag( float32_t );
+uint_fast32_t subj_f32_to_ui32_rx_min( float32_t );
+uint_fast32_t subj_f32_to_ui32_rx_max( float32_t );
+uint_fast32_t subj_f32_to_ui32_rx_near_maxMag( float32_t );
+uint_fast64_t subj_f32_to_ui64_rx_near_even( float32_t );
+uint_fast64_t subj_f32_to_ui64_rx_minMag( float32_t );
+uint_fast64_t subj_f32_to_ui64_rx_min( float32_t );
+uint_fast64_t subj_f32_to_ui64_rx_max( float32_t );
+uint_fast64_t subj_f32_to_ui64_rx_near_maxMag( float32_t );
+int_fast32_t subj_f32_to_i32_rx_near_even( float32_t );
+int_fast32_t subj_f32_to_i32_rx_minMag( float32_t );
+int_fast32_t subj_f32_to_i32_rx_min( float32_t );
+int_fast32_t subj_f32_to_i32_rx_max( float32_t );
+int_fast32_t subj_f32_to_i32_rx_near_maxMag( float32_t );
+int_fast64_t subj_f32_to_i64_rx_near_even( float32_t );
+int_fast64_t subj_f32_to_i64_rx_minMag( float32_t );
+int_fast64_t subj_f32_to_i64_rx_min( float32_t );
+int_fast64_t subj_f32_to_i64_rx_max( float32_t );
+int_fast64_t subj_f32_to_i64_rx_near_maxMag( float32_t );
+
+#ifdef FLOAT16
+float16_t subj_f32_to_f16( float32_t );
+#endif
+#ifdef FLOAT64
+float64_t subj_f32_to_f64( float32_t );
+#endif
+#ifdef EXTFLOAT80
+void subj_f32_to_extF80M( float32_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void subj_f32_to_f128M( float32_t, float128_t * );
+#endif
+
+float32_t subj_f32_roundToInt_r_near_even( float32_t );
+float32_t subj_f32_roundToInt_r_minMag( float32_t );
+float32_t subj_f32_roundToInt_r_min( float32_t );
+float32_t subj_f32_roundToInt_r_max( float32_t );
+float32_t subj_f32_roundToInt_r_near_maxMag( float32_t );
+float32_t subj_f32_roundToInt_x( float32_t );
+float32_t subj_f32_add( float32_t, float32_t );
+float32_t subj_f32_sub( float32_t, float32_t );
+float32_t subj_f32_mul( float32_t, float32_t );
+float32_t subj_f32_mulAdd( float32_t, float32_t, float32_t );
+float32_t subj_f32_div( float32_t, float32_t );
+float32_t subj_f32_rem( float32_t, float32_t );
+float32_t subj_f32_sqrt( float32_t );
+bool subj_f32_eq( float32_t, float32_t );
+bool subj_f32_le( float32_t, float32_t );
+bool subj_f32_lt( float32_t, float32_t );
+bool subj_f32_eq_signaling( float32_t, float32_t );
+bool subj_f32_le_quiet( float32_t, float32_t );
+bool subj_f32_lt_quiet( float32_t, float32_t );
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef FLOAT64
+
+uint_fast32_t subj_f64_to_ui32_r_near_even( float64_t );
+uint_fast32_t subj_f64_to_ui32_r_minMag( float64_t );
+uint_fast32_t subj_f64_to_ui32_r_min( float64_t );
+uint_fast32_t subj_f64_to_ui32_r_max( float64_t );
+uint_fast32_t subj_f64_to_ui32_r_near_maxMag( float64_t );
+uint_fast64_t subj_f64_to_ui64_r_near_even( float64_t );
+uint_fast64_t subj_f64_to_ui64_r_minMag( float64_t );
+uint_fast64_t subj_f64_to_ui64_r_min( float64_t );
+uint_fast64_t subj_f64_to_ui64_r_max( float64_t );
+uint_fast64_t subj_f64_to_ui64_r_near_maxMag( float64_t );
+int_fast32_t subj_f64_to_i32_r_near_even( float64_t );
+int_fast32_t subj_f64_to_i32_r_minMag( float64_t );
+int_fast32_t subj_f64_to_i32_r_min( float64_t );
+int_fast32_t subj_f64_to_i32_r_max( float64_t );
+int_fast32_t subj_f64_to_i32_r_near_maxMag( float64_t );
+int_fast64_t subj_f64_to_i64_r_near_even( float64_t );
+int_fast64_t subj_f64_to_i64_r_minMag( float64_t );
+int_fast64_t subj_f64_to_i64_r_min( float64_t );
+int_fast64_t subj_f64_to_i64_r_max( float64_t );
+int_fast64_t subj_f64_to_i64_r_near_maxMag( float64_t );
+
+uint_fast32_t subj_f64_to_ui32_rx_near_even( float64_t );
+uint_fast32_t subj_f64_to_ui32_rx_minMag( float64_t );
+uint_fast32_t subj_f64_to_ui32_rx_min( float64_t );
+uint_fast32_t subj_f64_to_ui32_rx_max( float64_t );
+uint_fast32_t subj_f64_to_ui32_rx_near_maxMag( float64_t );
+uint_fast64_t subj_f64_to_ui64_rx_near_even( float64_t );
+uint_fast64_t subj_f64_to_ui64_rx_minMag( float64_t );
+uint_fast64_t subj_f64_to_ui64_rx_min( float64_t );
+uint_fast64_t subj_f64_to_ui64_rx_max( float64_t );
+uint_fast64_t subj_f64_to_ui64_rx_near_maxMag( float64_t );
+int_fast32_t subj_f64_to_i32_rx_near_even( float64_t );
+int_fast32_t subj_f64_to_i32_rx_minMag( float64_t );
+int_fast32_t subj_f64_to_i32_rx_min( float64_t );
+int_fast32_t subj_f64_to_i32_rx_max( float64_t );
+int_fast32_t subj_f64_to_i32_rx_near_maxMag( float64_t );
+int_fast64_t subj_f64_to_i64_rx_near_even( float64_t );
+int_fast64_t subj_f64_to_i64_rx_minMag( float64_t );
+int_fast64_t subj_f64_to_i64_rx_min( float64_t );
+int_fast64_t subj_f64_to_i64_rx_max( float64_t );
+int_fast64_t subj_f64_to_i64_rx_near_maxMag( float64_t );
+
+#ifdef FLOAT16
+float16_t subj_f64_to_f16( float64_t );
+#endif
+float32_t subj_f64_to_f32( float64_t );
+#ifdef EXTFLOAT80
+void subj_f64_to_extF80M( float64_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+void subj_f64_to_f128M( float64_t, float128_t * );
+#endif
+
+float64_t subj_f64_roundToInt_r_near_even( float64_t );
+float64_t subj_f64_roundToInt_r_minMag( float64_t );
+float64_t subj_f64_roundToInt_r_min( float64_t );
+float64_t subj_f64_roundToInt_r_max( float64_t );
+float64_t subj_f64_roundToInt_r_near_maxMag( float64_t );
+float64_t subj_f64_roundToInt_x( float64_t );
+float64_t subj_f64_add( float64_t, float64_t );
+float64_t subj_f64_sub( float64_t, float64_t );
+float64_t subj_f64_mul( float64_t, float64_t );
+float64_t subj_f64_mulAdd( float64_t, float64_t, float64_t );
+float64_t subj_f64_div( float64_t, float64_t );
+float64_t subj_f64_rem( float64_t, float64_t );
+float64_t subj_f64_sqrt( float64_t );
+bool subj_f64_eq( float64_t, float64_t );
+bool subj_f64_le( float64_t, float64_t );
+bool subj_f64_lt( float64_t, float64_t );
+bool subj_f64_eq_signaling( float64_t, float64_t );
+bool subj_f64_le_quiet( float64_t, float64_t );
+bool subj_f64_lt_quiet( float64_t, float64_t );
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef EXTFLOAT80
+
+uint_fast32_t subj_extF80M_to_ui32_r_near_even( const extFloat80_t * );
+uint_fast32_t subj_extF80M_to_ui32_r_minMag( const extFloat80_t * );
+uint_fast32_t subj_extF80M_to_ui32_r_min( const extFloat80_t * );
+uint_fast32_t subj_extF80M_to_ui32_r_max( const extFloat80_t * );
+uint_fast32_t subj_extF80M_to_ui32_r_near_maxMag( const extFloat80_t * );
+uint_fast64_t subj_extF80M_to_ui64_r_near_even( const extFloat80_t * );
+uint_fast64_t subj_extF80M_to_ui64_r_minMag( const extFloat80_t * );
+uint_fast64_t subj_extF80M_to_ui64_r_min( const extFloat80_t * );
+uint_fast64_t subj_extF80M_to_ui64_r_max( const extFloat80_t * );
+uint_fast64_t subj_extF80M_to_ui64_r_near_maxMag( const extFloat80_t * );
+int_fast32_t subj_extF80M_to_i32_r_near_even( const extFloat80_t * );
+int_fast32_t subj_extF80M_to_i32_r_minMag( const extFloat80_t * );
+int_fast32_t subj_extF80M_to_i32_r_min( const extFloat80_t * );
+int_fast32_t subj_extF80M_to_i32_r_max( const extFloat80_t * );
+int_fast32_t subj_extF80M_to_i32_r_near_maxMag( const extFloat80_t * );
+int_fast64_t subj_extF80M_to_i64_r_near_even( const extFloat80_t * );
+int_fast64_t subj_extF80M_to_i64_r_minMag( const extFloat80_t * );
+int_fast64_t subj_extF80M_to_i64_r_min( const extFloat80_t * );
+int_fast64_t subj_extF80M_to_i64_r_max( const extFloat80_t * );
+int_fast64_t subj_extF80M_to_i64_r_near_maxMag( const extFloat80_t * );
+
+uint_fast32_t subj_extF80M_to_ui32_rx_near_even( const extFloat80_t * );
+uint_fast32_t subj_extF80M_to_ui32_rx_minMag( const extFloat80_t * );
+uint_fast32_t subj_extF80M_to_ui32_rx_min( const extFloat80_t * );
+uint_fast32_t subj_extF80M_to_ui32_rx_max( const extFloat80_t * );
+uint_fast32_t subj_extF80M_to_ui32_rx_near_maxMag( const extFloat80_t * );
+uint_fast64_t subj_extF80M_to_ui64_rx_near_even( const extFloat80_t * );
+uint_fast64_t subj_extF80M_to_ui64_rx_minMag( const extFloat80_t * );
+uint_fast64_t subj_extF80M_to_ui64_rx_min( const extFloat80_t * );
+uint_fast64_t subj_extF80M_to_ui64_rx_max( const extFloat80_t * );
+uint_fast64_t subj_extF80M_to_ui64_rx_near_maxMag( const extFloat80_t * );
+int_fast32_t subj_extF80M_to_i32_rx_near_even( const extFloat80_t * );
+int_fast32_t subj_extF80M_to_i32_rx_minMag( const extFloat80_t * );
+int_fast32_t subj_extF80M_to_i32_rx_min( const extFloat80_t * );
+int_fast32_t subj_extF80M_to_i32_rx_max( const extFloat80_t * );
+int_fast32_t subj_extF80M_to_i32_rx_near_maxMag( const extFloat80_t * );
+int_fast64_t subj_extF80M_to_i64_rx_near_even( const extFloat80_t * );
+int_fast64_t subj_extF80M_to_i64_rx_minMag( const extFloat80_t * );
+int_fast64_t subj_extF80M_to_i64_rx_min( const extFloat80_t * );
+int_fast64_t subj_extF80M_to_i64_rx_max( const extFloat80_t * );
+int_fast64_t subj_extF80M_to_i64_rx_near_maxMag( const extFloat80_t * );
+
+#ifdef FLOAT16
+float16_t subj_extF80M_to_f16( const extFloat80_t * );
+#endif
+float32_t subj_extF80M_to_f32( const extFloat80_t * );
+#ifdef FLOAT64
+float64_t subj_extF80M_to_f64( const extFloat80_t * );
+#endif
+#ifdef EXTFLOAT80
+void subj_extF80M_to_f128M( const extFloat80_t *, float128_t * );
+#endif
+
+void
+ subj_extF80M_roundToInt_r_near_even( const extFloat80_t *, extFloat80_t * );
+void subj_extF80M_roundToInt_r_minMag( const extFloat80_t *, extFloat80_t * );
+void subj_extF80M_roundToInt_r_min( const extFloat80_t *, extFloat80_t * );
+void subj_extF80M_roundToInt_r_max( const extFloat80_t *, extFloat80_t * );
+void
+ subj_extF80M_roundToInt_r_near_maxMag( const extFloat80_t *, extFloat80_t * );
+void subj_extF80M_roundToInt_x( const extFloat80_t *, extFloat80_t * );
+void
+ subj_extF80M_add(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+void
+ subj_extF80M_sub(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+void
+ subj_extF80M_mul(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+void
+ subj_extF80M_div(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+void
+ subj_extF80M_rem(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+void subj_extF80M_sqrt( const extFloat80_t *, extFloat80_t * );
+bool subj_extF80M_eq( const extFloat80_t *, const extFloat80_t * );
+bool subj_extF80M_le( const extFloat80_t *, const extFloat80_t * );
+bool subj_extF80M_lt( const extFloat80_t *, const extFloat80_t * );
+bool subj_extF80M_eq_signaling( const extFloat80_t *, const extFloat80_t * );
+bool subj_extF80M_le_quiet( const extFloat80_t *, const extFloat80_t * );
+bool subj_extF80M_lt_quiet( const extFloat80_t *, const extFloat80_t * );
+
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef FLOAT128
+
+uint_fast32_t subj_f128M_to_ui32_r_near_even( const float128_t * );
+uint_fast32_t subj_f128M_to_ui32_r_minMag( const float128_t * );
+uint_fast32_t subj_f128M_to_ui32_r_min( const float128_t * );
+uint_fast32_t subj_f128M_to_ui32_r_max( const float128_t * );
+uint_fast32_t subj_f128M_to_ui32_r_near_maxMag( extFloat80_t * );
+uint_fast64_t subj_f128M_to_ui64_r_near_even( const float128_t * );
+uint_fast64_t subj_f128M_to_ui64_r_minMag( const float128_t * );
+uint_fast64_t subj_f128M_to_ui64_r_min( const float128_t * );
+uint_fast64_t subj_f128M_to_ui64_r_max( const float128_t * );
+uint_fast64_t subj_f128M_to_ui64_r_near_maxMag( extFloat80_t * );
+int_fast32_t subj_f128M_to_i32_r_near_even( const float128_t * );
+int_fast32_t subj_f128M_to_i32_r_minMag( const float128_t * );
+int_fast32_t subj_f128M_to_i32_r_min( const float128_t * );
+int_fast32_t subj_f128M_to_i32_r_max( const float128_t * );
+int_fast32_t subj_f128M_to_i32_r_near_maxMag( extFloat80_t * );
+int_fast64_t subj_f128M_to_i64_r_near_even( const float128_t * );
+int_fast64_t subj_f128M_to_i64_r_minMag( const float128_t * );
+int_fast64_t subj_f128M_to_i64_r_min( const float128_t * );
+int_fast64_t subj_f128M_to_i64_r_max( const float128_t * );
+int_fast64_t subj_f128M_to_i64_r_near_maxMag( extFloat80_t * );
+
+uint_fast32_t subj_f128M_to_ui32_rx_near_even( const float128_t * );
+uint_fast32_t subj_f128M_to_ui32_rx_minMag( const float128_t * );
+uint_fast32_t subj_f128M_to_ui32_rx_min( const float128_t * );
+uint_fast32_t subj_f128M_to_ui32_rx_max( const float128_t * );
+uint_fast32_t subj_f128M_to_ui32_rx_near_maxMag( extFloat80_t * );
+uint_fast64_t subj_f128M_to_ui64_rx_near_even( const float128_t * );
+uint_fast64_t subj_f128M_to_ui64_rx_minMag( const float128_t * );
+uint_fast64_t subj_f128M_to_ui64_rx_min( const float128_t * );
+uint_fast64_t subj_f128M_to_ui64_rx_max( const float128_t * );
+uint_fast64_t subj_f128M_to_ui64_rx_near_maxMag( extFloat80_t * );
+int_fast32_t subj_f128M_to_i32_rx_near_even( const float128_t * );
+int_fast32_t subj_f128M_to_i32_rx_minMag( const float128_t * );
+int_fast32_t subj_f128M_to_i32_rx_min( const float128_t * );
+int_fast32_t subj_f128M_to_i32_rx_max( const float128_t * );
+int_fast32_t subj_f128M_to_i32_rx_near_maxMag( extFloat80_t * );
+int_fast64_t subj_f128M_to_i64_rx_near_even( const float128_t * );
+int_fast64_t subj_f128M_to_i64_rx_minMag( const float128_t * );
+int_fast64_t subj_f128M_to_i64_rx_min( const float128_t * );
+int_fast64_t subj_f128M_to_i64_rx_max( const float128_t * );
+int_fast64_t subj_f128M_to_i64_rx_near_maxMag( extFloat80_t * );
+
+#ifdef FLOAT16
+float16_t subj_f128M_to_f16( const float128_t * );
+#endif
+float32_t subj_f128M_to_f32( const float128_t * );
+#ifdef FLOAT64
+float64_t subj_f128M_to_f64( const float128_t * );
+#endif
+#ifdef FLOAT128
+void subj_f128M_to_extF80M( const float128_t *, extFloat80_t * );
+#endif
+
+void subj_f128M_roundToInt_r_near_even( const float128_t, float128_t * );
+void subj_f128M_roundToInt_r_minMag( const float128_t, float128_t * );
+void subj_f128M_roundToInt_r_min( const float128_t, float128_t * );
+void subj_f128M_roundToInt_r_max( const float128_t, float128_t * );
+void subj_f128M_roundToInt_r_near_maxMag( const float128_t, float128_t * );
+void subj_f128M_roundToInt_x( const float128_t, float128_t * );
+void subj_f128M_add( const float128_t *, const float128_t *, float128_t * );
+void subj_f128M_sub( const float128_t *, const float128_t *, float128_t * );
+void subj_f128M_mul( const float128_t *, const float128_t *, float128_t * );
+void
+ subj_f128M_mulAdd(
+ const float128_t *, const float128_t *, const float128_t *, float128_t *
+ );
+void subj_f128M_div( const float128_t *, const float128_t *, float128_t * );
+void subj_f128M_rem( const float128_t *, const float128_t *, float128_t * );
+void subj_f128M_sqrt( const float128_t *, float128_t * );
+bool subj_f128M_eq( const float128_t *, const float128_t * );
+bool subj_f128M_le( const float128_t *, const float128_t * );
+bool subj_f128M_lt( const float128_t *, const float128_t * );
+bool subj_f128M_eq_signaling( const float128_t *, const float128_t * );
+bool subj_f128M_le_quiet( const float128_t *, const float128_t * );
+bool subj_f128M_lt_quiet( const float128_t *, const float128_t * );
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/subjfloat_functions.c b/src/libs/softfloat-3e/testfloat/source/subjfloat_functions.c
new file mode 100644
index 00000000..13b28960
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/subjfloat_functions.c
@@ -0,0 +1,1810 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "subjfloat_config.h"
+#include "subjfloat.h"
+#include "functions.h"
+
+typedef void genericFuncType();
+
+/*----------------------------------------------------------------------------
+| WARNING:
+| This file should not normally be modified. See "subjfloat_config.h"
+| instead.
+| The order of these array entries must match the order in the array
+| `standardFunctionInfos'. Be careful about making changes.
+*----------------------------------------------------------------------------*/
+
+genericFuncType *const subjfloat_functions[] = {
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT16
+#ifdef SUBJ_UI32_TO_F16
+ (genericFuncType *) subj_ui32_to_f16,
+#else
+ 0,
+#endif
+#endif
+#ifdef SUBJ_UI32_TO_F32
+ (genericFuncType *) subj_ui32_to_f32,
+#else
+ 0,
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_UI32_TO_F64
+ (genericFuncType *) subj_ui32_to_f64,
+#else
+ 0,
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_UI32_TO_EXTF80
+ (genericFuncType *) subj_ui32_to_extF80M,
+#else
+ 0,
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_UI32_TO_F128
+ (genericFuncType *) subj_ui32_to_f128M,
+#else
+ 0,
+#endif
+#endif
+#ifdef FLOAT16
+#ifdef SUBJ_UI64_TO_F16
+ (genericFuncType *) subj_ui64_to_f16,
+#else
+ 0,
+#endif
+#endif
+#ifdef SUBJ_UI64_TO_F32
+ (genericFuncType *) subj_ui64_to_f32,
+#else
+ 0,
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_UI64_TO_F64
+ (genericFuncType *) subj_ui64_to_f64,
+#else
+ 0,
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_UI64_TO_EXTF80
+ (genericFuncType *) subj_ui64_to_extF80M,
+#else
+ 0,
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_UI64_TO_F128
+ (genericFuncType *) subj_ui64_to_f128M,
+#else
+ 0,
+#endif
+#endif
+#ifdef FLOAT16
+#ifdef SUBJ_I32_TO_F16
+ (genericFuncType *) subj_i32_to_f16,
+#else
+ 0,
+#endif
+#endif
+#ifdef SUBJ_I32_TO_F32
+ (genericFuncType *) subj_i32_to_f32,
+#else
+ 0,
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_I32_TO_F64
+ (genericFuncType *) subj_i32_to_f64,
+#else
+ 0,
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_I32_TO_EXTF80
+ (genericFuncType *) subj_i32_to_extF80M,
+#else
+ 0,
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_I32_TO_F128
+ (genericFuncType *) subj_i32_to_f128M,
+#else
+ 0,
+#endif
+#endif
+#ifdef FLOAT16
+#ifdef SUBJ_I64_TO_F16
+ (genericFuncType *) subj_i64_to_f16,
+#else
+ 0,
+#endif
+#endif
+#ifdef SUBJ_I64_TO_F32
+ (genericFuncType *) subj_i64_to_f32,
+#else
+ 0,
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_I64_TO_F64
+ (genericFuncType *) subj_i64_to_f64,
+#else
+ 0,
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_I64_TO_EXTF80
+ (genericFuncType *) subj_i64_to_extF80M,
+#else
+ 0,
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_I64_TO_F128
+ (genericFuncType *) subj_i64_to_f128M,
+#else
+ 0,
+#endif
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT16
+#ifdef SUBJ_F16_TO_UI32_R_NEAR_EVEN
+ (genericFuncType *) subj_f16_to_ui32_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI32_R_MINMAG
+ (genericFuncType *) subj_f16_to_ui32_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI32_R_MIN
+ (genericFuncType *) subj_f16_to_ui32_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI32_R_MAX
+ (genericFuncType *) subj_f16_to_ui32_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI32_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f16_to_ui32_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI64_R_NEAR_EVEN
+ (genericFuncType *) subj_f16_to_ui64_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI64_R_MINMAG
+ (genericFuncType *) subj_f16_to_ui64_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI64_R_MIN
+ (genericFuncType *) subj_f16_to_ui64_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI64_R_MAX
+ (genericFuncType *) subj_f16_to_ui64_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI64_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f16_to_ui64_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I32_R_NEAR_EVEN
+ (genericFuncType *) subj_f16_to_i32_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I32_R_MINMAG
+ (genericFuncType *) subj_f16_to_i32_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I32_R_MIN
+ (genericFuncType *) subj_f16_to_i32_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I32_R_MAX
+ (genericFuncType *) subj_f16_to_i32_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I32_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f16_to_i32_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I64_R_NEAR_EVEN
+ (genericFuncType *) subj_f16_to_i64_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I64_R_MINMAG
+ (genericFuncType *) subj_f16_to_i64_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I64_R_MIN
+ (genericFuncType *) subj_f16_to_i64_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I64_R_MAX
+ (genericFuncType *) subj_f16_to_i64_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I64_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f16_to_i64_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI32_RX_NEAR_EVEN
+ (genericFuncType *) subj_f16_to_ui32_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI32_RX_MINMAG
+ (genericFuncType *) subj_f16_to_ui32_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI32_RX_MIN
+ (genericFuncType *) subj_f16_to_ui32_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI32_RX_MAX
+ (genericFuncType *) subj_f16_to_ui32_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI32_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f16_to_ui32_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI64_RX_NEAR_EVEN
+ (genericFuncType *) subj_f16_to_ui64_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI64_RX_MINMAG
+ (genericFuncType *) subj_f16_to_ui64_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI64_RX_MIN
+ (genericFuncType *) subj_f16_to_ui64_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI64_RX_MAX
+ (genericFuncType *) subj_f16_to_ui64_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_UI64_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f16_to_ui64_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I32_RX_NEAR_EVEN
+ (genericFuncType *) subj_f16_to_i32_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I32_RX_MINMAG
+ (genericFuncType *) subj_f16_to_i32_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I32_RX_MIN
+ (genericFuncType *) subj_f16_to_i32_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I32_RX_MAX
+ (genericFuncType *) subj_f16_to_i32_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I32_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f16_to_i32_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I64_RX_NEAR_EVEN
+ (genericFuncType *) subj_f16_to_i64_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I64_RX_MINMAG
+ (genericFuncType *) subj_f16_to_i64_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I64_RX_MIN
+ (genericFuncType *) subj_f16_to_i64_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I64_RX_MAX
+ (genericFuncType *) subj_f16_to_i64_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_I64_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f16_to_i64_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_TO_F32
+ (genericFuncType *) subj_f16_to_f32,
+#else
+ 0,
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_F16_TO_F64
+ (genericFuncType *) subj_f16_to_f64,
+#else
+ 0,
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_F16_TO_EXTF80
+ (genericFuncType *) subj_f16_to_extF80M,
+#else
+ 0,
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_F16_TO_F128
+ (genericFuncType *) subj_f16_to_f128M,
+#else
+ 0,
+#endif
+#endif
+#ifdef SUBJ_F16_ROUNDTOINT_R_NEAR_EVEN
+ (genericFuncType *) subj_f16_roundToInt_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_ROUNDTOINT_R_MINMAG
+ (genericFuncType *) subj_f16_roundToInt_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_ROUNDTOINT_R_MIN
+ (genericFuncType *) subj_f16_roundToInt_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_ROUNDTOINT_R_MAX
+ (genericFuncType *) subj_f16_roundToInt_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_ROUNDTOINT_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f16_roundToInt_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_ROUNDTOINT_X
+ (genericFuncType *) subj_f16_roundToInt_x,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_ADD
+ (genericFuncType *) subj_f16_add,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_SUB
+ (genericFuncType *) subj_f16_sub,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_MUL
+ (genericFuncType *) subj_f16_mul,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_MULADD
+ (genericFuncType *) subj_f16_mulAdd,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_DIV
+ (genericFuncType *) subj_f16_div,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_REM
+ (genericFuncType *) subj_f16_rem,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_SQRT
+ (genericFuncType *) subj_f16_sqrt,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_EQ
+ (genericFuncType *) subj_f16_eq,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_LE
+ (genericFuncType *) subj_f16_le,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_LT
+ (genericFuncType *) subj_f16_lt,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_EQ_SIGNALING
+ (genericFuncType *) subj_f16_eq_signaling,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_LE_QUIET
+ (genericFuncType *) subj_f16_le_quiet,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F16_LT_QUIET
+ (genericFuncType *) subj_f16_lt_quiet,
+#else
+ 0,
+#endif
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef SUBJ_F32_TO_UI32_R_NEAR_EVEN
+ (genericFuncType *) subj_f32_to_ui32_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI32_R_MINMAG
+ (genericFuncType *) subj_f32_to_ui32_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI32_R_MIN
+ (genericFuncType *) subj_f32_to_ui32_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI32_R_MAX
+ (genericFuncType *) subj_f32_to_ui32_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI32_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f32_to_ui32_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI64_R_NEAR_EVEN
+ (genericFuncType *) subj_f32_to_ui64_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI64_R_MINMAG
+ (genericFuncType *) subj_f32_to_ui64_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI64_R_MIN
+ (genericFuncType *) subj_f32_to_ui64_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI64_R_MAX
+ (genericFuncType *) subj_f32_to_ui64_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI64_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f32_to_ui64_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I32_R_NEAR_EVEN
+ (genericFuncType *) subj_f32_to_i32_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I32_R_MINMAG
+ (genericFuncType *) subj_f32_to_i32_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I32_R_MIN
+ (genericFuncType *) subj_f32_to_i32_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I32_R_MAX
+ (genericFuncType *) subj_f32_to_i32_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I32_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f32_to_i32_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I64_R_NEAR_EVEN
+ (genericFuncType *) subj_f32_to_i64_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I64_R_MINMAG
+ (genericFuncType *) subj_f32_to_i64_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I64_R_MIN
+ (genericFuncType *) subj_f32_to_i64_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I64_R_MAX
+ (genericFuncType *) subj_f32_to_i64_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I64_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f32_to_i64_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI32_RX_NEAR_EVEN
+ (genericFuncType *) subj_f32_to_ui32_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI32_RX_MINMAG
+ (genericFuncType *) subj_f32_to_ui32_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI32_RX_MIN
+ (genericFuncType *) subj_f32_to_ui32_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI32_RX_MAX
+ (genericFuncType *) subj_f32_to_ui32_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI32_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f32_to_ui32_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI64_RX_NEAR_EVEN
+ (genericFuncType *) subj_f32_to_ui64_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI64_RX_MINMAG
+ (genericFuncType *) subj_f32_to_ui64_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI64_RX_MIN
+ (genericFuncType *) subj_f32_to_ui64_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI64_RX_MAX
+ (genericFuncType *) subj_f32_to_ui64_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_UI64_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f32_to_ui64_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I32_RX_NEAR_EVEN
+ (genericFuncType *) subj_f32_to_i32_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I32_RX_MINMAG
+ (genericFuncType *) subj_f32_to_i32_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I32_RX_MIN
+ (genericFuncType *) subj_f32_to_i32_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I32_RX_MAX
+ (genericFuncType *) subj_f32_to_i32_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I32_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f32_to_i32_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I64_RX_NEAR_EVEN
+ (genericFuncType *) subj_f32_to_i64_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I64_RX_MINMAG
+ (genericFuncType *) subj_f32_to_i64_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I64_RX_MIN
+ (genericFuncType *) subj_f32_to_i64_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I64_RX_MAX
+ (genericFuncType *) subj_f32_to_i64_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_TO_I64_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f32_to_i64_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef FLOAT16
+#ifdef SUBJ_F32_TO_F16
+ (genericFuncType *) subj_f32_to_f16,
+#else
+ 0,
+#endif
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_F32_TO_F64
+ (genericFuncType *) subj_f32_to_f64,
+#else
+ 0,
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_F32_TO_EXTF80
+ (genericFuncType *) subj_f32_to_extF80M,
+#else
+ 0,
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_F32_TO_F128
+ (genericFuncType *) subj_f32_to_f128M,
+#else
+ 0,
+#endif
+#endif
+#ifdef SUBJ_F32_ROUNDTOINT_R_NEAR_EVEN
+ (genericFuncType *) subj_f32_roundToInt_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_ROUNDTOINT_R_MINMAG
+ (genericFuncType *) subj_f32_roundToInt_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_ROUNDTOINT_R_MIN
+ (genericFuncType *) subj_f32_roundToInt_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_ROUNDTOINT_R_MAX
+ (genericFuncType *) subj_f32_roundToInt_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_ROUNDTOINT_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f32_roundToInt_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_ROUNDTOINT_X
+ (genericFuncType *) subj_f32_roundToInt_x,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_ADD
+ (genericFuncType *) subj_f32_add,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_SUB
+ (genericFuncType *) subj_f32_sub,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_MUL
+ (genericFuncType *) subj_f32_mul,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_MULADD
+ (genericFuncType *) subj_f32_mulAdd,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_DIV
+ (genericFuncType *) subj_f32_div,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_REM
+ (genericFuncType *) subj_f32_rem,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_SQRT
+ (genericFuncType *) subj_f32_sqrt,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_EQ
+ (genericFuncType *) subj_f32_eq,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_LE
+ (genericFuncType *) subj_f32_le,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_LT
+ (genericFuncType *) subj_f32_lt,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_EQ_SIGNALING
+ (genericFuncType *) subj_f32_eq_signaling,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_LE_QUIET
+ (genericFuncType *) subj_f32_le_quiet,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F32_LT_QUIET
+ (genericFuncType *) subj_f32_lt_quiet,
+#else
+ 0,
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT64
+#ifdef SUBJ_F64_TO_UI32_R_NEAR_EVEN
+ (genericFuncType *) subj_f64_to_ui32_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI32_R_MINMAG
+ (genericFuncType *) subj_f64_to_ui32_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI32_R_MIN
+ (genericFuncType *) subj_f64_to_ui32_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI32_R_MAX
+ (genericFuncType *) subj_f64_to_ui32_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI32_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f64_to_ui32_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI64_R_NEAR_EVEN
+ (genericFuncType *) subj_f64_to_ui64_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI64_R_MINMAG
+ (genericFuncType *) subj_f64_to_ui64_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI64_R_MIN
+ (genericFuncType *) subj_f64_to_ui64_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI64_R_MAX
+ (genericFuncType *) subj_f64_to_ui64_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI64_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f64_to_ui64_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I32_R_NEAR_EVEN
+ (genericFuncType *) subj_f64_to_i32_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I32_R_MINMAG
+ (genericFuncType *) subj_f64_to_i32_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I32_R_MIN
+ (genericFuncType *) subj_f64_to_i32_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I32_R_MAX
+ (genericFuncType *) subj_f64_to_i32_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I32_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f64_to_i32_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I64_R_NEAR_EVEN
+ (genericFuncType *) subj_f64_to_i64_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I64_R_MINMAG
+ (genericFuncType *) subj_f64_to_i64_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I64_R_MIN
+ (genericFuncType *) subj_f64_to_i64_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I64_R_MAX
+ (genericFuncType *) subj_f64_to_i64_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I64_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f64_to_i64_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI32_RX_NEAR_EVEN
+ (genericFuncType *) subj_f64_to_ui32_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI32_RX_MINMAG
+ (genericFuncType *) subj_f64_to_ui32_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI32_RX_MIN
+ (genericFuncType *) subj_f64_to_ui32_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI32_RX_MAX
+ (genericFuncType *) subj_f64_to_ui32_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI32_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f64_to_ui32_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI64_RX_NEAR_EVEN
+ (genericFuncType *) subj_f64_to_ui64_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI64_RX_MINMAG
+ (genericFuncType *) subj_f64_to_ui64_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI64_RX_MIN
+ (genericFuncType *) subj_f64_to_ui64_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI64_RX_MAX
+ (genericFuncType *) subj_f64_to_ui64_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_UI64_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f64_to_ui64_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I32_RX_NEAR_EVEN
+ (genericFuncType *) subj_f64_to_i32_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I32_RX_MINMAG
+ (genericFuncType *) subj_f64_to_i32_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I32_RX_MIN
+ (genericFuncType *) subj_f64_to_i32_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I32_RX_MAX
+ (genericFuncType *) subj_f64_to_i32_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I32_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f64_to_i32_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I64_RX_NEAR_EVEN
+ (genericFuncType *) subj_f64_to_i64_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I64_RX_MINMAG
+ (genericFuncType *) subj_f64_to_i64_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I64_RX_MIN
+ (genericFuncType *) subj_f64_to_i64_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I64_RX_MAX
+ (genericFuncType *) subj_f64_to_i64_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_TO_I64_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f64_to_i64_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef FLOAT16
+#ifdef SUBJ_F64_TO_F16
+ (genericFuncType *) subj_f64_to_f16,
+#else
+ 0,
+#endif
+#endif
+#ifdef SUBJ_F64_TO_F32
+ (genericFuncType *) subj_f64_to_f32,
+#else
+ 0,
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_F64_TO_EXTF80
+ (genericFuncType *) subj_f64_to_extF80M,
+#else
+ 0,
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_F64_TO_F128
+ (genericFuncType *) subj_f64_to_f128M,
+#else
+ 0,
+#endif
+#endif
+#ifdef SUBJ_F64_ROUNDTOINT_R_NEAR_EVEN
+ (genericFuncType *) subj_f64_roundToInt_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_ROUNDTOINT_R_MINMAG
+ (genericFuncType *) subj_f64_roundToInt_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_ROUNDTOINT_R_MIN
+ (genericFuncType *) subj_f64_roundToInt_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_ROUNDTOINT_R_MAX
+ (genericFuncType *) subj_f64_roundToInt_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_ROUNDTOINT_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f64_roundToInt_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_ROUNDTOINT_X
+ (genericFuncType *) subj_f64_roundToInt_x,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_ADD
+ (genericFuncType *) subj_f64_add,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_SUB
+ (genericFuncType *) subj_f64_sub,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_MUL
+ (genericFuncType *) subj_f64_mul,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_MULADD
+ (genericFuncType *) subj_f64_mulAdd,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_DIV
+ (genericFuncType *) subj_f64_div,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_REM
+ (genericFuncType *) subj_f64_rem,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_SQRT
+ (genericFuncType *) subj_f64_sqrt,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_EQ
+ (genericFuncType *) subj_f64_eq,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_LE
+ (genericFuncType *) subj_f64_le,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_LT
+ (genericFuncType *) subj_f64_lt,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_EQ_SIGNALING
+ (genericFuncType *) subj_f64_eq_signaling,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_LE_QUIET
+ (genericFuncType *) subj_f64_le_quiet,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F64_LT_QUIET
+ (genericFuncType *) subj_f64_lt_quiet,
+#else
+ 0,
+#endif
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef EXTFLOAT80
+#ifdef SUBJ_EXTF80_TO_UI32_R_NEAR_EVEN
+ (genericFuncType *) subj_extF80M_to_ui32_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI32_R_MINMAG
+ (genericFuncType *) subj_extF80M_to_ui32_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI32_R_MIN
+ (genericFuncType *) subj_extF80M_to_ui32_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI32_R_MAX
+ (genericFuncType *) subj_extF80M_to_ui32_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI32_R_NEAR_MAXMAG
+ (genericFuncType *) subj_extF80M_to_ui32_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI64_R_NEAR_EVEN
+ (genericFuncType *) subj_extF80M_to_ui64_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI64_R_MINMAG
+ (genericFuncType *) subj_extF80M_to_ui64_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI64_R_MIN
+ (genericFuncType *) subj_extF80M_to_ui64_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI64_R_MAX
+ (genericFuncType *) subj_extF80M_to_ui64_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI64_R_NEAR_MAXMAG
+ (genericFuncType *) subj_extF80M_to_ui64_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I32_R_NEAR_EVEN
+ (genericFuncType *) subj_extF80M_to_i32_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I32_R_MINMAG
+ (genericFuncType *) subj_extF80M_to_i32_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I32_R_MIN
+ (genericFuncType *) subj_extF80M_to_i32_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I32_R_MAX
+ (genericFuncType *) subj_extF80M_to_i32_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I32_R_NEAR_MAXMAG
+ (genericFuncType *) subj_extF80M_to_i32_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I64_R_NEAR_EVEN
+ (genericFuncType *) subj_extF80M_to_i64_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I64_R_MINMAG
+ (genericFuncType *) subj_extF80M_to_i64_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I64_R_MIN
+ (genericFuncType *) subj_extF80M_to_i64_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I64_R_MAX
+ (genericFuncType *) subj_extF80M_to_i64_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I64_R_NEAR_MAXMAG
+ (genericFuncType *) subj_extF80M_to_i64_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI32_RX_NEAR_EVEN
+ (genericFuncType *) subj_extF80M_to_ui32_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI32_RX_MINMAG
+ (genericFuncType *) subj_extF80M_to_ui32_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI32_RX_MIN
+ (genericFuncType *) subj_extF80M_to_ui32_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI32_RX_MAX
+ (genericFuncType *) subj_extF80M_to_ui32_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI32_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_extF80M_to_ui32_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI64_RX_NEAR_EVEN
+ (genericFuncType *) subj_extF80M_to_ui64_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI64_RX_MINMAG
+ (genericFuncType *) subj_extF80M_to_ui64_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI64_RX_MIN
+ (genericFuncType *) subj_extF80M_to_ui64_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI64_RX_MAX
+ (genericFuncType *) subj_extF80M_to_ui64_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_UI64_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_extF80M_to_ui64_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I32_RX_NEAR_EVEN
+ (genericFuncType *) subj_extF80M_to_i32_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I32_RX_MINMAG
+ (genericFuncType *) subj_extF80M_to_i32_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I32_RX_MIN
+ (genericFuncType *) subj_extF80M_to_i32_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I32_RX_MAX
+ (genericFuncType *) subj_extF80M_to_i32_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I32_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_extF80M_to_i32_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I64_RX_NEAR_EVEN
+ (genericFuncType *) subj_extF80M_to_i64_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I64_RX_MINMAG
+ (genericFuncType *) subj_extF80M_to_i64_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I64_RX_MIN
+ (genericFuncType *) subj_extF80M_to_i64_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I64_RX_MAX
+ (genericFuncType *) subj_extF80M_to_i64_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_TO_I64_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_extF80M_to_i64_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef FLOAT16
+#ifdef SUBJ_EXTF80_TO_F16
+ (genericFuncType *) subj_extF80M_to_f16,
+#else
+ 0,
+#endif
+#endif
+#ifdef SUBJ_EXTF80_TO_F32
+ (genericFuncType *) subj_extF80M_to_f32,
+#else
+ 0,
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_EXTF80_TO_F64
+ (genericFuncType *) subj_extF80M_to_f64,
+#else
+ 0,
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_EXTF80_TO_F128
+ (genericFuncType *) subj_extF80M_to_f128M,
+#else
+ 0,
+#endif
+#endif
+#ifdef SUBJ_EXTF80_ROUNDTOINT_R_NEAR_EVEN
+ (genericFuncType *) subj_extF80M_roundToInt_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_ROUNDTOINT_R_MINMAG
+ (genericFuncType *) subj_extF80M_roundToInt_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_ROUNDTOINT_R_MIN
+ (genericFuncType *) subj_extF80M_roundToInt_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_ROUNDTOINT_R_MAX
+ (genericFuncType *) subj_extF80M_roundToInt_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_ROUNDTOINT_R_NEAR_MAXMAG
+ (genericFuncType *) subj_extF80M_roundToInt_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_ROUNDTOINT_X
+ (genericFuncType *) subj_extF80M_roundToInt_x,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_ADD
+ (genericFuncType *) subj_extF80M_add,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_SUB
+ (genericFuncType *) subj_extF80M_sub,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_MUL
+ (genericFuncType *) subj_extF80M_mul,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_DIV
+ (genericFuncType *) subj_extF80M_div,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_REM
+ (genericFuncType *) subj_extF80M_rem,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_SQRT
+ (genericFuncType *) subj_extF80M_sqrt,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_EQ
+ (genericFuncType *) subj_extF80M_eq,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_LE
+ (genericFuncType *) subj_extF80M_le,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_LT
+ (genericFuncType *) subj_extF80M_lt,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_EQ_SIGNALING
+ (genericFuncType *) subj_extF80M_eq_signaling,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_LE_QUIET
+ (genericFuncType *) subj_extF80M_le_quiet,
+#else
+ 0,
+#endif
+#ifdef SUBJ_EXTF80_LT_QUIET
+ (genericFuncType *) subj_extF80M_lt_quiet,
+#else
+ 0,
+#endif
+#endif
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+#ifdef FLOAT128
+#ifdef SUBJ_F128_TO_UI32_R_NEAR_EVEN
+ (genericFuncType *) subj_f128M_to_ui32_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI32_R_MINMAG
+ (genericFuncType *) subj_f128M_to_ui32_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI32_R_MIN
+ (genericFuncType *) subj_f128M_to_ui32_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI32_R_MAX
+ (genericFuncType *) subj_f128M_to_ui32_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI32_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f128M_to_ui32_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI64_R_NEAR_EVEN
+ (genericFuncType *) subj_f128M_to_ui64_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI64_R_MINMAG
+ (genericFuncType *) subj_f128M_to_ui64_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI64_R_MIN
+ (genericFuncType *) subj_f128M_to_ui64_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI64_R_MAX
+ (genericFuncType *) subj_f128M_to_ui64_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI64_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f128M_to_ui64_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I32_R_NEAR_EVEN
+ (genericFuncType *) subj_f128M_to_i32_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I32_R_MINMAG
+ (genericFuncType *) subj_f128M_to_i32_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I32_R_MIN
+ (genericFuncType *) subj_f128M_to_i32_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I32_R_MAX
+ (genericFuncType *) subj_f128M_to_i32_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I32_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f128M_to_i32_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I64_R_NEAR_EVEN
+ (genericFuncType *) subj_f128M_to_i64_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I64_R_MINMAG
+ (genericFuncType *) subj_f128M_to_i64_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I64_R_MIN
+ (genericFuncType *) subj_f128M_to_i64_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I64_R_MAX
+ (genericFuncType *) subj_f128M_to_i64_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I64_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f128M_to_i64_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI32_RX_NEAR_EVEN
+ (genericFuncType *) subj_f128M_to_ui32_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI32_RX_MINMAG
+ (genericFuncType *) subj_f128M_to_ui32_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI32_RX_MIN
+ (genericFuncType *) subj_f128M_to_ui32_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI32_RX_MAX
+ (genericFuncType *) subj_f128M_to_ui32_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI32_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f128M_to_ui32_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI64_RX_NEAR_EVEN
+ (genericFuncType *) subj_f128M_to_ui64_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI64_RX_MINMAG
+ (genericFuncType *) subj_f128M_to_ui64_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI64_RX_MIN
+ (genericFuncType *) subj_f128M_to_ui64_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI64_RX_MAX
+ (genericFuncType *) subj_f128M_to_ui64_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_UI64_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f128M_to_ui64_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I32_RX_NEAR_EVEN
+ (genericFuncType *) subj_f128M_to_i32_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I32_RX_MINMAG
+ (genericFuncType *) subj_f128M_to_i32_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I32_RX_MIN
+ (genericFuncType *) subj_f128M_to_i32_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I32_RX_MAX
+ (genericFuncType *) subj_f128M_to_i32_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I32_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f128M_to_i32_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I64_RX_NEAR_EVEN
+ (genericFuncType *) subj_f128M_to_i64_rx_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I64_RX_MINMAG
+ (genericFuncType *) subj_f128M_to_i64_rx_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I64_RX_MIN
+ (genericFuncType *) subj_f128M_to_i64_rx_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I64_RX_MAX
+ (genericFuncType *) subj_f128M_to_i64_rx_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_TO_I64_RX_NEAR_MAXMAG
+ (genericFuncType *) subj_f128M_to_i64_rx_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef FLOAT16
+#ifdef SUBJ_F128_TO_F16
+ (genericFuncType *) subj_f128M_to_f16,
+#else
+ 0,
+#endif
+#endif
+#ifdef SUBJ_F128_TO_F32
+ (genericFuncType *) subj_f128M_to_f32,
+#else
+ 0,
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_F128_TO_F64
+ (genericFuncType *) subj_f128M_to_f64,
+#else
+ 0,
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_F128_TO_EXTF80
+ (genericFuncType *) subj_f128M_to_extF80M,
+#else
+ 0,
+#endif
+#endif
+#ifdef SUBJ_F128_ROUNDTOINT_R_NEAR_EVEN
+ (genericFuncType *) subj_f128M_roundToInt_r_near_even,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_ROUNDTOINT_R_MINMAG
+ (genericFuncType *) subj_f128M_roundToInt_r_minMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_ROUNDTOINT_R_MIN
+ (genericFuncType *) subj_f128M_roundToInt_r_min,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_ROUNDTOINT_R_MAX
+ (genericFuncType *) subj_f128M_roundToInt_r_max,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_ROUNDTOINT_R_NEAR_MAXMAG
+ (genericFuncType *) subj_f128M_roundToInt_r_near_maxMag,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_ROUNDTOINT_X
+ (genericFuncType *) subj_f128M_roundToInt_x,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_ADD
+ (genericFuncType *) subj_f128M_add,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_SUB
+ (genericFuncType *) subj_f128M_sub,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_MUL
+ (genericFuncType *) subj_f128M_mul,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_MULADD
+ (genericFuncType *) subj_f128M_mulAdd,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_DIV
+ (genericFuncType *) subj_f128M_div,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_REM
+ (genericFuncType *) subj_f128M_rem,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_SQRT
+ (genericFuncType *) subj_f128M_sqrt,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_EQ
+ (genericFuncType *) subj_f128M_eq,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_LE
+ (genericFuncType *) subj_f128M_le,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_LT
+ (genericFuncType *) subj_f128M_lt,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_EQ_SIGNALING
+ (genericFuncType *) subj_f128M_eq_signaling,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_LE_QUIET
+ (genericFuncType *) subj_f128M_le_quiet,
+#else
+ 0,
+#endif
+#ifdef SUBJ_F128_LT_QUIET
+ (genericFuncType *) subj_f128M_lt_quiet,
+#else
+ 0,
+#endif
+#endif
+};
+
diff --git a/src/libs/softfloat-3e/testfloat/source/testLoops.h b/src/libs/softfloat-3e/testfloat/source/testLoops.h
new file mode 100644
index 00000000..f9b88d7d
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/testLoops.h
@@ -0,0 +1,578 @@
+
+/*============================================================================
+
+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, 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.
+
+=============================================================================*/
+
+#include
+#include
+#include
+#include "softfloat.h"
+
+extern bool testLoops_forever;
+
+extern uint_fast8_t *testLoops_trueFlagsPtr;
+extern uint_fast8_t (*testLoops_subjFlagsFunction)( void );
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef FLOAT16
+void test_a_ui32_z_f16( float16_t ( uint32_t ), float16_t ( uint32_t ) );
+#endif
+void test_a_ui32_z_f32( float32_t ( uint32_t ), float32_t ( uint32_t ) );
+#ifdef FLOAT64
+void test_a_ui32_z_f64( float64_t ( uint32_t ), float64_t ( uint32_t ) );
+#endif
+#ifdef EXTFLOAT80
+void
+ test_a_ui32_z_extF80(
+ void ( uint32_t, extFloat80_t * ), void ( uint32_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void
+ test_a_ui32_z_f128(
+ void ( uint32_t, float128_t * ), void ( uint32_t, float128_t * )
+ );
+#endif
+#ifdef FLOAT16
+void test_a_ui64_z_f16( float16_t ( uint64_t ), float16_t ( uint64_t ) );
+#endif
+void test_a_ui64_z_f32( float32_t ( uint64_t ), float32_t ( uint64_t ) );
+#ifdef FLOAT64
+void test_a_ui64_z_f64( float64_t ( uint64_t ), float64_t ( uint64_t ) );
+#endif
+#ifdef EXTFLOAT80
+void
+ test_a_ui64_z_extF80(
+ void ( uint64_t, extFloat80_t * ), void ( uint64_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void
+ test_a_ui64_z_f128(
+ void ( uint64_t, float128_t * ), void ( uint64_t, float128_t * ) );
+#endif
+#ifdef FLOAT16
+void test_a_i32_z_f16( float16_t ( int32_t ), float16_t ( int32_t ) );
+#endif
+void test_a_i32_z_f32( float32_t ( int32_t ), float32_t ( int32_t ) );
+#ifdef FLOAT64
+void test_a_i32_z_f64( float64_t ( int32_t ), float64_t ( int32_t ) );
+#endif
+#ifdef EXTFLOAT80
+void
+ test_a_i32_z_extF80(
+ void ( int32_t, extFloat80_t * ), void ( int32_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void
+ test_a_i32_z_f128(
+ void ( int32_t, float128_t * ), void ( int32_t, float128_t * ) );
+#endif
+#ifdef FLOAT16
+void test_a_i64_z_f16( float16_t ( int64_t ), float16_t ( int64_t ) );
+#endif
+void test_a_i64_z_f32( float32_t ( int64_t ), float32_t ( int64_t ) );
+#ifdef FLOAT64
+void test_a_i64_z_f64( float64_t ( int64_t ), float64_t ( int64_t ) );
+#endif
+#ifdef EXTFLOAT80
+void
+ test_a_i64_z_extF80(
+ void ( int64_t, extFloat80_t * ), void ( int64_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void
+ test_a_i64_z_f128(
+ void ( int64_t, float128_t * ), void ( int64_t, float128_t * ) );
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef FLOAT16
+void
+ test_a_f16_z_ui32_rx(
+ uint_fast32_t ( float16_t, uint_fast8_t, bool ),
+ uint_fast32_t ( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f16_z_ui64_rx(
+ uint_fast64_t ( float16_t, uint_fast8_t, bool ),
+ uint_fast64_t ( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f16_z_i32_rx(
+ int_fast32_t ( float16_t, uint_fast8_t, bool ),
+ int_fast32_t ( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f16_z_i64_rx(
+ int_fast64_t ( float16_t, uint_fast8_t, bool ),
+ int_fast64_t ( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f16_z_ui32_x(
+ uint_fast32_t ( float16_t, bool ), uint_fast32_t ( float16_t, bool ), bool
+ );
+void
+ test_a_f16_z_ui64_x(
+ uint_fast64_t ( float16_t, bool ), uint_fast64_t ( float16_t, bool ), bool
+ );
+void
+ test_a_f16_z_i32_x(
+ int_fast32_t ( float16_t, bool ), int_fast32_t ( float16_t, bool ), bool
+ );
+void
+ test_a_f16_z_i64_x(
+ int_fast64_t ( float16_t, bool ), int_fast64_t ( float16_t, bool ), bool
+ );
+void test_a_f16_z_f32( float32_t ( float16_t ), float32_t ( float16_t ) );
+#ifdef FLOAT64
+void test_a_f16_z_f64( float64_t ( float16_t ), float64_t ( float16_t ) );
+#endif
+#ifdef EXTFLOAT80
+void
+ test_a_f16_z_extF80(
+ void ( float16_t, extFloat80_t * ), void ( float16_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void
+ test_a_f16_z_f128(
+ void ( float16_t, float128_t * ), void ( float16_t, float128_t * ) );
+#endif
+void test_az_f16( float16_t ( float16_t ), float16_t ( float16_t ) );
+void
+ test_az_f16_rx(
+ float16_t ( float16_t, uint_fast8_t, bool ),
+ float16_t ( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_abz_f16(
+ float16_t ( float16_t, float16_t ), float16_t ( float16_t, float16_t ) );
+void
+ test_abcz_f16(
+ float16_t ( float16_t, float16_t, float16_t ),
+ float16_t ( float16_t, float16_t, float16_t )
+ );
+void
+ test_ab_f16_z_bool(
+ bool ( float16_t, float16_t ), bool ( float16_t, float16_t ) );
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+void
+ test_a_f32_z_ui32_rx(
+ uint_fast32_t ( float32_t, uint_fast8_t, bool ),
+ uint_fast32_t ( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f32_z_ui64_rx(
+ uint_fast64_t ( float32_t, uint_fast8_t, bool ),
+ uint_fast64_t ( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f32_z_i32_rx(
+ int_fast32_t ( float32_t, uint_fast8_t, bool ),
+ int_fast32_t ( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f32_z_i64_rx(
+ int_fast64_t ( float32_t, uint_fast8_t, bool ),
+ int_fast64_t ( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f32_z_ui32_x(
+ uint_fast32_t ( float32_t, bool ), uint_fast32_t ( float32_t, bool ), bool
+ );
+void
+ test_a_f32_z_ui64_x(
+ uint_fast64_t ( float32_t, bool ), uint_fast64_t ( float32_t, bool ), bool
+ );
+void
+ test_a_f32_z_i32_x(
+ int_fast32_t ( float32_t, bool ), int_fast32_t ( float32_t, bool ), bool
+ );
+void
+ test_a_f32_z_i64_x(
+ int_fast64_t ( float32_t, bool ), int_fast64_t ( float32_t, bool ), bool
+ );
+#ifdef FLOAT16
+void test_a_f32_z_f16( float16_t ( float32_t ), float16_t ( float32_t ) );
+#endif
+#ifdef FLOAT64
+void test_a_f32_z_f64( float64_t ( float32_t ), float64_t ( float32_t ) );
+#endif
+#ifdef EXTFLOAT80
+void
+ test_a_f32_z_extF80(
+ void ( float32_t, extFloat80_t * ), void ( float32_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void
+ test_a_f32_z_f128(
+ void ( float32_t, float128_t * ), void ( float32_t, float128_t * ) );
+#endif
+void test_az_f32( float32_t ( float32_t ), float32_t ( float32_t ) );
+void
+ test_az_f32_rx(
+ float32_t ( float32_t, uint_fast8_t, bool ),
+ float32_t ( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_abz_f32(
+ float32_t ( float32_t, float32_t ), float32_t ( float32_t, float32_t ) );
+void
+ test_abcz_f32(
+ float32_t ( float32_t, float32_t, float32_t ),
+ float32_t ( float32_t, float32_t, float32_t )
+ );
+void
+ test_ab_f32_z_bool(
+ bool ( float32_t, float32_t ), bool ( float32_t, float32_t ) );
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef FLOAT64
+void
+ test_a_f64_z_ui32_rx(
+ uint_fast32_t ( float64_t, uint_fast8_t, bool ),
+ uint_fast32_t ( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f64_z_ui64_rx(
+ uint_fast64_t ( float64_t, uint_fast8_t, bool ),
+ uint_fast64_t ( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f64_z_i32_rx(
+ int_fast32_t ( float64_t, uint_fast8_t, bool ),
+ int_fast32_t ( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f64_z_i64_rx(
+ int_fast64_t ( float64_t, uint_fast8_t, bool ),
+ int_fast64_t ( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f64_z_ui32_x(
+ uint_fast32_t ( float64_t, bool ), uint_fast32_t ( float64_t, bool ), bool
+ );
+void
+ test_a_f64_z_ui64_x(
+ uint_fast64_t ( float64_t, bool ), uint_fast64_t ( float64_t, bool ), bool
+ );
+void
+ test_a_f64_z_i32_x(
+ int_fast32_t ( float64_t, bool ), int_fast32_t ( float64_t, bool ), bool
+ );
+void
+ test_a_f64_z_i64_x(
+ int_fast64_t ( float64_t, bool ), int_fast64_t ( float64_t, bool ), bool
+ );
+#ifdef FLOAT16
+void test_a_f64_z_f16( float16_t ( float64_t ), float16_t ( float64_t ) );
+#endif
+void test_a_f64_z_f32( float32_t ( float64_t ), float32_t ( float64_t ) );
+#ifdef EXTFLOAT80
+void
+ test_a_f64_z_extF80(
+ void ( float64_t, extFloat80_t * ), void ( float64_t, extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void
+ test_a_f64_z_f128(
+ void ( float64_t, float128_t * ), void ( float64_t, float128_t * ) );
+#endif
+void test_az_f64( float64_t ( float64_t ), float64_t ( float64_t ) );
+void
+ test_az_f64_rx(
+ float64_t ( float64_t, uint_fast8_t, bool ),
+ float64_t ( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_abz_f64(
+ float64_t ( float64_t, float64_t ), float64_t ( float64_t, float64_t ) );
+void
+ test_abcz_f64(
+ float64_t ( float64_t, float64_t, float64_t ),
+ float64_t ( float64_t, float64_t, float64_t )
+ );
+void
+ test_ab_f64_z_bool(
+ bool ( float64_t, float64_t ), bool ( float64_t, float64_t ) );
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef EXTFLOAT80
+void
+ test_a_extF80_z_ui32_rx(
+ uint_fast32_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast32_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_extF80_z_ui64_rx(
+ uint_fast64_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast64_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_extF80_z_i32_rx(
+ int_fast32_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ int_fast32_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_extF80_z_i64_rx(
+ int_fast64_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ int_fast64_t ( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_extF80_z_ui32_x(
+ uint_fast32_t ( const extFloat80_t *, bool ),
+ uint_fast32_t ( const extFloat80_t *, bool ),
+ bool
+ );
+void
+ test_a_extF80_z_ui64_x(
+ uint_fast64_t ( const extFloat80_t *, bool ),
+ uint_fast64_t ( const extFloat80_t *, bool ),
+ bool
+ );
+void
+ test_a_extF80_z_i32_x(
+ int_fast32_t ( const extFloat80_t *, bool ),
+ int_fast32_t ( const extFloat80_t *, bool ),
+ bool
+ );
+void
+ test_a_extF80_z_i64_x(
+ int_fast64_t ( const extFloat80_t *, bool ),
+ int_fast64_t ( const extFloat80_t *, bool ),
+ bool
+ );
+#ifdef FLOAT16
+void
+ test_a_extF80_z_f16(
+ float16_t ( const extFloat80_t * ), float16_t ( const extFloat80_t * ) );
+#endif
+void
+ test_a_extF80_z_f32(
+ float32_t ( const extFloat80_t * ), float32_t ( const extFloat80_t * ) );
+#ifdef FLOAT64
+void
+ test_a_extF80_z_f64(
+ float64_t ( const extFloat80_t * ), float64_t ( const extFloat80_t * ) );
+#endif
+#ifdef FLOAT128
+void
+ test_a_extF80_z_f128(
+ void ( const extFloat80_t *, float128_t * ),
+ void ( const extFloat80_t *, float128_t * )
+ );
+#endif
+void
+ test_az_extF80(
+ void ( const extFloat80_t *, extFloat80_t * ),
+ void ( const extFloat80_t *, extFloat80_t * )
+ );
+void
+ test_az_extF80_rx(
+ void ( const extFloat80_t *, uint_fast8_t, bool, extFloat80_t * ),
+ void ( const extFloat80_t *, uint_fast8_t, bool, extFloat80_t * ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_abz_extF80(
+ void ( const extFloat80_t *, const extFloat80_t *, extFloat80_t * ),
+ void ( const extFloat80_t *, const extFloat80_t *, extFloat80_t * )
+ );
+void
+ test_ab_extF80_z_bool(
+ bool ( const extFloat80_t *, const extFloat80_t * ),
+ bool ( const extFloat80_t *, const extFloat80_t * )
+ );
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+#ifdef FLOAT128
+void
+ test_a_f128_z_ui32_rx(
+ uint_fast32_t ( const float128_t *, uint_fast8_t, bool ),
+ uint_fast32_t ( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f128_z_ui64_rx(
+ uint_fast64_t ( const float128_t *, uint_fast8_t, bool ),
+ uint_fast64_t ( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f128_z_i32_rx(
+ int_fast32_t ( const float128_t *, uint_fast8_t, bool ),
+ int_fast32_t ( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f128_z_i64_rx(
+ int_fast64_t ( const float128_t *, uint_fast8_t, bool ),
+ int_fast64_t ( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_a_f128_z_ui32_x(
+ uint_fast32_t ( const float128_t *, bool ),
+ uint_fast32_t ( const float128_t *, bool ),
+ bool
+ );
+void
+ test_a_f128_z_ui64_x(
+ uint_fast64_t ( const float128_t *, bool ),
+ uint_fast64_t ( const float128_t *, bool ),
+ bool
+ );
+void
+ test_a_f128_z_i32_x(
+ int_fast32_t ( const float128_t *, bool ),
+ int_fast32_t ( const float128_t *, bool ),
+ bool
+ );
+void
+ test_a_f128_z_i64_x(
+ int_fast64_t ( const float128_t *, bool ),
+ int_fast64_t ( const float128_t *, bool ),
+ bool
+ );
+#ifdef FLOAT16
+void
+ test_a_f128_z_f16(
+ float16_t ( const float128_t * ), float16_t ( const float128_t * ) );
+#endif
+void
+ test_a_f128_z_f32(
+ float32_t ( const float128_t * ), float32_t ( const float128_t * ) );
+#ifdef FLOAT64
+void
+ test_a_f128_z_f64(
+ float64_t ( const float128_t * ), float64_t ( const float128_t * ) );
+#endif
+#ifdef EXTFLOAT80
+void
+ test_a_f128_z_extF80(
+ void ( const float128_t *, extFloat80_t * ),
+ void ( const float128_t *, extFloat80_t * )
+ );
+#endif
+void
+ test_az_f128(
+ void ( const float128_t *, float128_t * ),
+ void ( const float128_t *, float128_t * )
+ );
+void
+ test_az_f128_rx(
+ void ( const float128_t *, uint_fast8_t, bool, float128_t * ),
+ void ( const float128_t *, uint_fast8_t, bool, float128_t * ),
+ uint_fast8_t,
+ bool
+ );
+void
+ test_abz_f128(
+ void ( const float128_t *, const float128_t *, float128_t * ),
+ void ( const float128_t *, const float128_t *, float128_t * )
+ );
+void
+ test_abcz_f128(
+ void
+ ( const float128_t *,
+ const float128_t *,
+ const float128_t *,
+ float128_t *
+ ),
+ void
+ ( const float128_t *,
+ const float128_t *,
+ const float128_t *,
+ float128_t *
+ )
+ );
+void
+ test_ab_f128_z_bool(
+ bool ( const float128_t *, const float128_t * ),
+ bool ( const float128_t *, const float128_t * )
+ );
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/testLoops_common.c b/src/libs/softfloat-3e/testfloat/source/testLoops_common.c
new file mode 100644
index 00000000..ea6a53d3
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/testLoops_common.c
@@ -0,0 +1,47 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "testLoops.h"
+
+bool testLoops_forever = false;
+
+uint_fast8_t *testLoops_trueFlagsPtr;
+uint_fast8_t (*testLoops_subjFlagsFunction)( void );
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f128.c b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f128.c
new file mode 100644
index 00000000..d4540952
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f128.c
@@ -0,0 +1,107 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#if defined EXTFLOAT80 && defined FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_extF80_z_f128(
+ void trueFunction( const extFloat80_t *, float128_t * ),
+ void subjFunction( const extFloat80_t *, float128_t * )
+ )
+{
+ int count;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_extF80_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( &genCases_extF80_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && extF80M_isSignalingNaN( &genCases_extF80_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f16.c b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f16.c
new file mode 100644
index 00000000..a1e4f8c1
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f16.c
@@ -0,0 +1,107 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#if defined FLOAT16 && defined EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_extF80_z_f16(
+ float16_t trueFunction( const extFloat80_t * ),
+ float16_t subjFunction( const extFloat80_t * )
+ )
+{
+ int count;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_extF80_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && extF80M_isSignalingNaN( &genCases_extF80_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, " " );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f32.c b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f32.c
new file mode 100644
index 00000000..ff0e31a5
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f32.c
@@ -0,0 +1,107 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_extF80_z_f32(
+ float32_t trueFunction( const extFloat80_t * ),
+ float32_t subjFunction( const extFloat80_t * )
+ )
+{
+ int count;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_extF80_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && extF80M_isSignalingNaN( &genCases_extF80_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, " " );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f64.c b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f64.c
new file mode 100644
index 00000000..b105228c
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_f64.c
@@ -0,0 +1,107 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#if defined FLOAT64 && defined EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_extF80_z_f64(
+ float64_t trueFunction( const extFloat80_t * ),
+ float64_t subjFunction( const extFloat80_t * )
+ )
+{
+ int count;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_extF80_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && extF80M_isSignalingNaN( &genCases_extF80_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, "\n\t" );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i32_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i32_rx.c
new file mode 100644
index 00000000..fa9fe98d
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i32_rx.c
@@ -0,0 +1,105 @@
+
+/*============================================================================
+
+This C source 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, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_extF80_z_i32_rx(
+ int_fast32_t trueFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ int_fast32_t subjFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_extF80_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! extF80M_isNaN( &genCases_extF80_a )
+ || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, " " );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i32_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i32_x.c
new file mode 100644
index 00000000..b3dc9c94
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i32_x.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source 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, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_extF80_z_i32_x(
+ int_fast32_t trueFunction( const extFloat80_t *, bool ),
+ int_fast32_t subjFunction( const extFloat80_t *, bool ),
+ bool exact
+ )
+{
+ int count;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_extF80_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! extF80M_isNaN( &genCases_extF80_a )
+ || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, " " );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i64_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i64_rx.c
new file mode 100644
index 00000000..0d711594
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i64_rx.c
@@ -0,0 +1,106 @@
+
+/*============================================================================
+
+This C source 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, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_extF80_z_i64_rx(
+ int_fast64_t trueFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ int_fast64_t subjFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_extF80_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! extF80M_isNaN( &genCases_extF80_a )
+ || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, "\n\t" );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i64_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i64_x.c
new file mode 100644
index 00000000..bfa9a6a5
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_i64_x.c
@@ -0,0 +1,105 @@
+
+/*============================================================================
+
+This C source 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, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_extF80_z_i64_x(
+ int_fast64_t trueFunction( const extFloat80_t *, bool ),
+ int_fast64_t subjFunction( const extFloat80_t *, bool ),
+ bool exact
+ )
+{
+ int count;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_extF80_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! extF80M_isNaN( &genCases_extF80_a )
+ || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, "\n\t" );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui32_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui32_rx.c
new file mode 100644
index 00000000..9fa9cff5
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui32_rx.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source 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, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_extF80_z_ui32_rx(
+ uint_fast32_t trueFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast32_t subjFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_extF80_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, " " );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui32_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui32_x.c
new file mode 100644
index 00000000..df7d8200
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui32_x.c
@@ -0,0 +1,102 @@
+
+/*============================================================================
+
+This C source 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, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_extF80_z_ui32_x(
+ uint_fast32_t trueFunction( const extFloat80_t *, bool ),
+ uint_fast32_t subjFunction( const extFloat80_t *, bool ),
+ bool exact
+ )
+{
+ int count;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_extF80_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, " " );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui64_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui64_rx.c
new file mode 100644
index 00000000..3a768d7a
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui64_rx.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source 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, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_extF80_z_ui64_rx(
+ uint_fast64_t trueFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast64_t subjFunction( const extFloat80_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_extF80_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, "\n\t" );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui64_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui64_x.c
new file mode 100644
index 00000000..48c59655
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_extF80_z_ui64_x.c
@@ -0,0 +1,102 @@
+
+/*============================================================================
+
+This C source 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, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_extF80_z_ui64_x(
+ uint_fast64_t trueFunction( const extFloat80_t *, bool ),
+ uint_fast64_t subjFunction( const extFloat80_t *, bool ),
+ bool exact
+ )
+{
+ int count;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_extF80_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, "\n\t" );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_extF80.c b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_extF80.c
new file mode 100644
index 00000000..ec7dfbbf
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_extF80.c
@@ -0,0 +1,107 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#if defined EXTFLOAT80 && defined FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f128_z_extF80(
+ void trueFunction( const float128_t *, extFloat80_t * ),
+ void subjFunction( const float128_t *, extFloat80_t * )
+ )
+{
+ int count;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_f128_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( &genCases_f128_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && f128M_isSignalingNaN( &genCases_f128_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_f16.c b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_f16.c
new file mode 100644
index 00000000..12540780
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_f16.c
@@ -0,0 +1,107 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#if defined FLOAT16 && defined FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f128_z_f16(
+ float16_t trueFunction( const float128_t * ),
+ float16_t subjFunction( const float128_t * )
+ )
+{
+ int count;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_f128_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && f128M_isSignalingNaN( &genCases_f128_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, " " );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_f32.c b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_f32.c
new file mode 100644
index 00000000..24cae7da
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_f32.c
@@ -0,0 +1,107 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f128_z_f32(
+ float32_t trueFunction( const float128_t * ),
+ float32_t subjFunction( const float128_t * )
+ )
+{
+ int count;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_f128_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && f128M_isSignalingNaN( &genCases_f128_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, "\n\t" );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_f64.c b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_f64.c
new file mode 100644
index 00000000..bcd91bcd
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_f64.c
@@ -0,0 +1,107 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#if defined FLOAT64 && defined FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f128_z_f64(
+ float64_t trueFunction( const float128_t * ),
+ float64_t subjFunction( const float128_t * )
+ )
+{
+ int count;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_f128_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && f128M_isSignalingNaN( &genCases_f128_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, "\n\t" );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i32_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i32_rx.c
new file mode 100644
index 00000000..90848337
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i32_rx.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source 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, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f128_z_i32_rx(
+ int_fast32_t trueFunction( const float128_t *, uint_fast8_t, bool ),
+ int_fast32_t subjFunction( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_f128_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! f128M_isNaN( &genCases_f128_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, " " );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i32_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i32_x.c
new file mode 100644
index 00000000..52951765
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i32_x.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source 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, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f128_z_i32_x(
+ int_fast32_t trueFunction( const float128_t *, bool ),
+ int_fast32_t subjFunction( const float128_t *, bool ),
+ bool exact
+ )
+{
+ int count;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_f128_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! f128M_isNaN( &genCases_f128_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, " " );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i64_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i64_rx.c
new file mode 100644
index 00000000..e7da2f02
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i64_rx.c
@@ -0,0 +1,105 @@
+
+/*============================================================================
+
+This C source 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, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f128_z_i64_rx(
+ int_fast64_t trueFunction( const float128_t *, uint_fast8_t, bool ),
+ int_fast64_t subjFunction( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_f128_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! f128M_isNaN( &genCases_f128_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, "\n\t" );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i64_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i64_x.c
new file mode 100644
index 00000000..0597367b
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_i64_x.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source 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, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f128_z_i64_x(
+ int_fast64_t trueFunction( const float128_t *, bool ),
+ int_fast64_t subjFunction( const float128_t *, bool ),
+ bool exact
+ )
+{
+ int count;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_f128_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! f128M_isNaN( &genCases_f128_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, "\n\t" );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui32_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui32_rx.c
new file mode 100644
index 00000000..31ede56f
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui32_rx.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source 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, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f128_z_ui32_rx(
+ uint_fast32_t trueFunction( const float128_t *, uint_fast8_t, bool ),
+ uint_fast32_t subjFunction( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_f128_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, " " );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui32_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui32_x.c
new file mode 100644
index 00000000..b5623e13
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui32_x.c
@@ -0,0 +1,102 @@
+
+/*============================================================================
+
+This C source 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, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f128_z_ui32_x(
+ uint_fast32_t trueFunction( const float128_t *, bool ),
+ uint_fast32_t subjFunction( const float128_t *, bool ),
+ bool exact
+ )
+{
+ int count;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_f128_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, " " );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui64_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui64_rx.c
new file mode 100644
index 00000000..cd58c923
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui64_rx.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source 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, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f128_z_ui64_rx(
+ uint_fast64_t trueFunction( const float128_t *, uint_fast8_t, bool ),
+ uint_fast64_t subjFunction( const float128_t *, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_f128_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, "\n\t" );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui64_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui64_x.c
new file mode 100644
index 00000000..9e103f82
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f128_z_ui64_x.c
@@ -0,0 +1,102 @@
+
+/*============================================================================
+
+This C source 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, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f128_z_ui64_x(
+ uint_fast64_t trueFunction( const float128_t *, bool ),
+ uint_fast64_t subjFunction( const float128_t *, bool ),
+ bool exact
+ )
+{
+ int count;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_f128_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, "\n\t" );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_extF80.c b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_extF80.c
new file mode 100644
index 00000000..dc442af6
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_extF80.c
@@ -0,0 +1,106 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#if defined FLOAT16 && defined EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f16_z_extF80(
+ void trueFunction( float16_t, extFloat80_t * ),
+ void subjFunction( float16_t, extFloat80_t * )
+ )
+{
+ int count;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_f16_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_f16_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f16_isSignalingNaN( genCases_f16_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_f128.c b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_f128.c
new file mode 100644
index 00000000..49c1fe71
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_f128.c
@@ -0,0 +1,106 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#if defined FLOAT16 && defined FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f16_z_f128(
+ void trueFunction( float16_t, float128_t * ),
+ void subjFunction( float16_t, float128_t * )
+ )
+{
+ int count;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_f16_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_f16_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f16_isSignalingNaN( genCases_f16_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_f32.c b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_f32.c
new file mode 100644
index 00000000..097e9cc0
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_f32.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f16_z_f32(
+ float32_t trueFunction( float16_t ), float32_t subjFunction( float16_t ) )
+{
+ int count;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f16_isSignalingNaN( genCases_f16_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_f64.c b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_f64.c
new file mode 100644
index 00000000..349cc69a
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_f64.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#if defined FLOAT16 && defined FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f16_z_f64(
+ float64_t trueFunction( float16_t ), float64_t subjFunction( float16_t ) )
+{
+ int count;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f16_isSignalingNaN( genCases_f16_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i32_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i32_rx.c
new file mode 100644
index 00000000..ecb5f69a
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i32_rx.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source 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, 2017, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f16_z_i32_rx(
+ int_fast32_t trueFunction( float16_t, uint_fast8_t, bool ),
+ int_fast32_t subjFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! f16_isNaN( genCases_f16_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i32_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i32_x.c
new file mode 100644
index 00000000..373eaf29
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i32_x.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source 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, 2017, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f16_z_i32_x(
+ int_fast32_t trueFunction( float16_t, bool ),
+ int_fast32_t subjFunction( float16_t, bool ),
+ bool exact
+ )
+{
+ int count;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! f16_isNaN( genCases_f16_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i64_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i64_rx.c
new file mode 100644
index 00000000..0ffdd63c
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i64_rx.c
@@ -0,0 +1,105 @@
+
+/*============================================================================
+
+This C source 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, 2017, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f16_z_i64_rx(
+ int_fast64_t trueFunction( float16_t, uint_fast8_t, bool ),
+ int_fast64_t subjFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! f16_isNaN( genCases_f16_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i64_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i64_x.c
new file mode 100644
index 00000000..df73dd54
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_i64_x.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source 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, 2017, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f16_z_i64_x(
+ int_fast64_t trueFunction( float16_t, bool ),
+ int_fast64_t subjFunction( float16_t, bool ),
+ bool exact
+ )
+{
+ int count;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! f16_isNaN( genCases_f16_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui32_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui32_rx.c
new file mode 100644
index 00000000..434dd4cc
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui32_rx.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source 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, 2017, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f16_z_ui32_rx(
+ uint_fast32_t trueFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast32_t subjFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui32_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui32_x.c
new file mode 100644
index 00000000..392c3bd5
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui32_x.c
@@ -0,0 +1,102 @@
+
+/*============================================================================
+
+This C source 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, 2017, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f16_z_ui32_x(
+ uint_fast32_t trueFunction( float16_t, bool ),
+ uint_fast32_t subjFunction( float16_t, bool ),
+ bool exact
+ )
+{
+ int count;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui64_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui64_rx.c
new file mode 100644
index 00000000..8b47c95e
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui64_rx.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source 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, 2017, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f16_z_ui64_rx(
+ uint_fast64_t trueFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast64_t subjFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui64_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui64_x.c
new file mode 100644
index 00000000..e13ab5e6
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f16_z_ui64_x.c
@@ -0,0 +1,102 @@
+
+/*============================================================================
+
+This C source 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, 2017, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f16_z_ui64_x(
+ uint_fast64_t trueFunction( float16_t, bool ),
+ uint_fast64_t subjFunction( float16_t, bool ),
+ bool exact
+ )
+{
+ int count;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_extF80.c b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_extF80.c
new file mode 100644
index 00000000..f0473ff8
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_extF80.c
@@ -0,0 +1,106 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f32_z_extF80(
+ void trueFunction( float32_t, extFloat80_t * ),
+ void subjFunction( float32_t, extFloat80_t * )
+ )
+{
+ int count;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_f32_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_f32_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f32_isSignalingNaN( genCases_f32_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_f128.c b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_f128.c
new file mode 100644
index 00000000..956e292d
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_f128.c
@@ -0,0 +1,106 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f32_z_f128(
+ void trueFunction( float32_t, float128_t * ),
+ void subjFunction( float32_t, float128_t * )
+ )
+{
+ int count;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_f32_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_f32_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f32_isSignalingNaN( genCases_f32_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_f16.c b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_f16.c
new file mode 100644
index 00000000..3f9e4abe
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_f16.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f32_z_f16(
+ float16_t trueFunction( float32_t ), float16_t subjFunction( float32_t ) )
+{
+ int count;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f32_isSignalingNaN( genCases_f32_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_f64.c b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_f64.c
new file mode 100644
index 00000000..c1d8c4d5
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_f64.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f32_z_f64(
+ float64_t trueFunction( float32_t ), float64_t subjFunction( float32_t ) )
+{
+ int count;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f32_isSignalingNaN( genCases_f32_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i32_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i32_rx.c
new file mode 100644
index 00000000..12d2053d
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i32_rx.c
@@ -0,0 +1,100 @@
+
+/*============================================================================
+
+This C source 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, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f32_z_i32_rx(
+ int_fast32_t trueFunction( float32_t, uint_fast8_t, bool ),
+ int_fast32_t subjFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! f32_isNaN( genCases_f32_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i32_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i32_x.c
new file mode 100644
index 00000000..df920aef
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i32_x.c
@@ -0,0 +1,99 @@
+
+/*============================================================================
+
+This C source 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, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f32_z_i32_x(
+ int_fast32_t trueFunction( float32_t, bool ),
+ int_fast32_t subjFunction( float32_t, bool ),
+ bool exact
+ )
+{
+ int count;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! f32_isNaN( genCases_f32_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i64_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i64_rx.c
new file mode 100644
index 00000000..44efc79e
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i64_rx.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source 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, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f32_z_i64_rx(
+ int_fast64_t trueFunction( float32_t, uint_fast8_t, bool ),
+ int_fast64_t subjFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! f32_isNaN( genCases_f32_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i64_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i64_x.c
new file mode 100644
index 00000000..a8dc17af
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_i64_x.c
@@ -0,0 +1,100 @@
+
+/*============================================================================
+
+This C source 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, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f32_z_i64_x(
+ int_fast64_t trueFunction( float32_t, bool ),
+ int_fast64_t subjFunction( float32_t, bool ),
+ bool exact
+ )
+{
+ int count;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! f32_isNaN( genCases_f32_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui32_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui32_rx.c
new file mode 100644
index 00000000..62f865c6
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui32_rx.c
@@ -0,0 +1,99 @@
+
+/*============================================================================
+
+This C source 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, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f32_z_ui32_rx(
+ uint_fast32_t trueFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast32_t subjFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui32_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui32_x.c
new file mode 100644
index 00000000..91589c4c
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui32_x.c
@@ -0,0 +1,98 @@
+
+/*============================================================================
+
+This C source 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, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f32_z_ui32_x(
+ uint_fast32_t trueFunction( float32_t, bool ),
+ uint_fast32_t subjFunction( float32_t, bool ),
+ bool exact
+ )
+{
+ int count;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui64_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui64_rx.c
new file mode 100644
index 00000000..021102db
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui64_rx.c
@@ -0,0 +1,99 @@
+
+/*============================================================================
+
+This C source 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, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f32_z_ui64_rx(
+ uint_fast64_t trueFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast64_t subjFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui64_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui64_x.c
new file mode 100644
index 00000000..2287ccb9
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f32_z_ui64_x.c
@@ -0,0 +1,98 @@
+
+/*============================================================================
+
+This C source 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, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f32_z_ui64_x(
+ uint_fast64_t trueFunction( float32_t, bool ),
+ uint_fast64_t subjFunction( float32_t, bool ),
+ bool exact
+ )
+{
+ int count;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_extF80.c b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_extF80.c
new file mode 100644
index 00000000..ce18476d
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_extF80.c
@@ -0,0 +1,106 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#if defined FLOAT64 && defined EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f64_z_extF80(
+ void trueFunction( float64_t, extFloat80_t * ),
+ void subjFunction( float64_t, extFloat80_t * )
+ )
+{
+ int count;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_f64_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_f64_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f64_isSignalingNaN( genCases_f64_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_f128.c b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_f128.c
new file mode 100644
index 00000000..3f36e9e8
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_f128.c
@@ -0,0 +1,106 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#if defined FLOAT64 && defined FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f64_z_f128(
+ void trueFunction( float64_t, float128_t * ),
+ void subjFunction( float64_t, float128_t * )
+ )
+{
+ int count;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_f64_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_f64_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f64_isSignalingNaN( genCases_f64_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_f16.c b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_f16.c
new file mode 100644
index 00000000..63f6c15c
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_f16.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#if defined FLOAT16 && defined FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f64_z_f16(
+ float16_t trueFunction( float64_t ), float16_t subjFunction( float64_t ) )
+{
+ int count;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f64_isSignalingNaN( genCases_f64_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, " " );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_f32.c b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_f32.c
new file mode 100644
index 00000000..8fdad441
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_f32.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f64_z_f32(
+ float32_t trueFunction( float64_t ), float32_t subjFunction( float64_t ) )
+{
+ int count;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f64_isSignalingNaN( genCases_f64_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, " " );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i32_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i32_rx.c
new file mode 100644
index 00000000..bd20ad9e
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i32_rx.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source 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, 2017, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f64_z_i32_rx(
+ int_fast32_t trueFunction( float64_t, uint_fast8_t, bool ),
+ int_fast32_t subjFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! f64_isNaN( genCases_f64_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, " " );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i32_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i32_x.c
new file mode 100644
index 00000000..cf1ab501
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i32_x.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source 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, 2017, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f64_z_i32_x(
+ int_fast32_t trueFunction( float64_t, bool ),
+ int_fast32_t subjFunction( float64_t, bool ),
+ bool exact
+ )
+{
+ int count;
+ int_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0x7FFFFFFF) && (subjZ != -0x7FFFFFFF - 1)
+ && (! f64_isNaN( genCases_f64_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, " " );
+ writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i64_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i64_rx.c
new file mode 100644
index 00000000..93dc6a03
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i64_rx.c
@@ -0,0 +1,105 @@
+
+/*============================================================================
+
+This C source 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, 2017, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f64_z_i64_rx(
+ int_fast64_t trueFunction( float64_t, uint_fast8_t, bool ),
+ int_fast64_t subjFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! f64_isNaN( genCases_f64_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, " " );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i64_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i64_x.c
new file mode 100644
index 00000000..6b1eadef
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_i64_x.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source 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, 2017, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f64_z_i64_x(
+ int_fast64_t trueFunction( float64_t, bool ),
+ int_fast64_t subjFunction( float64_t, bool ),
+ bool exact
+ )
+{
+ int count;
+ int_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ int_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != INT64_C( 0x7FFFFFFFFFFFFFFF ))
+ && (subjZ != -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1)
+ && (! f64_isNaN( genCases_f64_a ) || (subjZ != 0)))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, " " );
+ writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui32_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui32_rx.c
new file mode 100644
index 00000000..a7974677
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui32_rx.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source 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, 2017, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f64_z_ui32_rx(
+ uint_fast32_t trueFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast32_t subjFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, " " );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui32_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui32_x.c
new file mode 100644
index 00000000..40a6ee17
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui32_x.c
@@ -0,0 +1,102 @@
+
+/*============================================================================
+
+This C source 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, 2017, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f64_z_ui32_x(
+ uint_fast32_t trueFunction( float64_t, bool ),
+ uint_fast32_t subjFunction( float64_t, bool ),
+ bool exact
+ )
+{
+ int count;
+ uint_fast32_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != 0xFFFFFFFF) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, " " );
+ writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui64_rx.c b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui64_rx.c
new file mode 100644
index 00000000..83068dd3
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui64_rx.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source 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, 2017, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f64_z_ui64_rx(
+ uint_fast64_t trueFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast64_t subjFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, " " );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui64_x.c b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui64_x.c
new file mode 100644
index 00000000..38e7d55b
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_f64_z_ui64_x.c
@@ -0,0 +1,102 @@
+
+/*============================================================================
+
+This C source 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, 2017, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_f64_z_ui64_x(
+ uint_fast64_t trueFunction( float64_t, bool ),
+ uint_fast64_t subjFunction( float64_t, bool ),
+ bool exact
+ )
+{
+ int count;
+ uint_fast64_t trueZ;
+ uint_fast8_t trueFlags;
+ uint_fast64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkInvInts
+ || (trueFlags != softfloat_flag_invalid)
+ || (subjFlags != softfloat_flag_invalid)
+ || ((subjZ != UINT64_C( 0xFFFFFFFFFFFFFFFF )) && (subjZ != 0))
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, " " );
+ writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_extF80.c b/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_extF80.c
new file mode 100644
index 00000000..506f9e66
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_extF80.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_i32_z_extF80(
+ void trueFunction( int32_t, extFloat80_t * ),
+ void subjFunction( int32_t, extFloat80_t * )
+ )
+{
+ int count;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_i32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_i32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_i32_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_i32_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i32( genCases_i32_a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f128.c b/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f128.c
new file mode 100644
index 00000000..40e2f01a
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f128.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_i32_z_f128(
+ void trueFunction( int32_t, float128_t * ),
+ void subjFunction( int32_t, float128_t * )
+ )
+{
+ int count;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_i32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_i32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_i32_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_i32_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i32( genCases_i32_a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f16.c b/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f16.c
new file mode 100644
index 00000000..7c85d53c
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f16.c
@@ -0,0 +1,99 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_i32_z_f16(
+ float16_t trueFunction( int32_t ), float16_t subjFunction( int32_t ) )
+{
+ int count;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_i32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_i32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_i32_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_i32_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i32( genCases_i32_a, " " );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f32.c b/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f32.c
new file mode 100644
index 00000000..fa2f8651
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f32.c
@@ -0,0 +1,95 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_i32_z_f32(
+ float32_t trueFunction( int32_t ), float32_t subjFunction( int32_t ) )
+{
+ int count;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_i32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_i32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_i32_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_i32_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i32( genCases_i32_a, " " );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f64.c b/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f64.c
new file mode 100644
index 00000000..0dbad0be
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_i32_z_f64.c
@@ -0,0 +1,99 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_i32_z_f64(
+ float64_t trueFunction( int32_t ), float64_t subjFunction( int32_t ) )
+{
+ int count;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_i32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_i32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_i32_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_i32_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i32( genCases_i32_a, " " );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_extF80.c b/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_extF80.c
new file mode 100644
index 00000000..d8dc8d59
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_extF80.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_i64_z_extF80(
+ void trueFunction( int64_t, extFloat80_t * ),
+ void subjFunction( int64_t, extFloat80_t * )
+ )
+{
+ int count;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_i64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_i64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_i64_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_i64_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i64( genCases_i64_a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f128.c b/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f128.c
new file mode 100644
index 00000000..f44f520c
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f128.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_i64_z_f128(
+ void trueFunction( int64_t, float128_t * ),
+ void subjFunction( int64_t, float128_t * )
+ )
+{
+ int count;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_i64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_i64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_i64_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_i64_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i64( genCases_i64_a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f16.c b/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f16.c
new file mode 100644
index 00000000..53551b37
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f16.c
@@ -0,0 +1,99 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_i64_z_f16(
+ float16_t trueFunction( int64_t ), float16_t subjFunction( int64_t ) )
+{
+ int count;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_i64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_i64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_i64_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_i64_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i64( genCases_i64_a, " " );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f32.c b/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f32.c
new file mode 100644
index 00000000..19695c89
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f32.c
@@ -0,0 +1,95 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_i64_z_f32(
+ float32_t trueFunction( int64_t ), float32_t subjFunction( int64_t ) )
+{
+ int count;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_i64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_i64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_i64_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_i64_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i64( genCases_i64_a, " " );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f64.c b/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f64.c
new file mode 100644
index 00000000..24c96c6a
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_i64_z_f64.c
@@ -0,0 +1,99 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_i64_z_f64(
+ float64_t trueFunction( int64_t ), float64_t subjFunction( int64_t ) )
+{
+ int count;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_i64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_i64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_i64_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_i64_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_i64( genCases_i64_a, "\n\t" );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_extF80.c b/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_extF80.c
new file mode 100644
index 00000000..bdcb2bfe
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_extF80.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_ui32_z_extF80(
+ void trueFunction( uint32_t, extFloat80_t * ),
+ void subjFunction( uint32_t, extFloat80_t * )
+ )
+{
+ int count;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_ui32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_ui32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_ui32_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_ui32_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui32( genCases_ui32_a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f128.c b/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f128.c
new file mode 100644
index 00000000..534cd9ae
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f128.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_ui32_z_f128(
+ void trueFunction( uint32_t, float128_t * ),
+ void subjFunction( uint32_t, float128_t * )
+ )
+{
+ int count;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_ui32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_ui32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_ui32_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_ui32_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui32( genCases_ui32_a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f16.c b/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f16.c
new file mode 100644
index 00000000..6a4cc0e4
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f16.c
@@ -0,0 +1,99 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_ui32_z_f16(
+ float16_t trueFunction( uint32_t ), float16_t subjFunction( uint32_t ) )
+{
+ int count;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_ui32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_ui32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_ui32_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_ui32_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui32( genCases_ui32_a, " " );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f32.c b/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f32.c
new file mode 100644
index 00000000..fde88485
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f32.c
@@ -0,0 +1,95 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_ui32_z_f32(
+ float32_t trueFunction( uint32_t ), float32_t subjFunction( uint32_t ) )
+{
+ int count;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_ui32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_ui32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_ui32_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_ui32_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui32( genCases_ui32_a, " " );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f64.c b/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f64.c
new file mode 100644
index 00000000..b3f9d882
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_ui32_z_f64.c
@@ -0,0 +1,99 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_ui32_z_f64(
+ float64_t trueFunction( uint32_t ), float64_t subjFunction( uint32_t ) )
+{
+ int count;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_ui32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_ui32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_ui32_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_ui32_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui32( genCases_ui32_a, " " );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_extF80.c b/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_extF80.c
new file mode 100644
index 00000000..325d500c
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_extF80.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_ui64_z_extF80(
+ void trueFunction( uint64_t, extFloat80_t * ),
+ void subjFunction( uint64_t, extFloat80_t * )
+ )
+{
+ int count;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_ui64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_ui64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_ui64_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_ui64_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui64( genCases_ui64_a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f128.c b/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f128.c
new file mode 100644
index 00000000..2a57c057
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f128.c
@@ -0,0 +1,101 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_ui64_z_f128(
+ void trueFunction( uint64_t, float128_t * ),
+ void subjFunction( uint64_t, float128_t * )
+ )
+{
+ int count;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_ui64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_ui64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( genCases_ui64_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( genCases_ui64_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui64( genCases_ui64_a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f16.c b/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f16.c
new file mode 100644
index 00000000..ce54c8ff
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f16.c
@@ -0,0 +1,99 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_ui64_z_f16(
+ float16_t trueFunction( uint64_t ), float16_t subjFunction( uint64_t ) )
+{
+ int count;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_ui64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_ui64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_ui64_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_ui64_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui64( genCases_ui64_a, " " );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f32.c b/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f32.c
new file mode 100644
index 00000000..4a6dda3c
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f32.c
@@ -0,0 +1,95 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_ui64_z_f32(
+ float32_t trueFunction( uint64_t ), float32_t subjFunction( uint64_t ) )
+{
+ int count;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_ui64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_ui64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_ui64_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_ui64_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui64( genCases_ui64_a, " " );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f64.c b/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f64.c
new file mode 100644
index 00000000..9fc9cd17
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_a_ui64_z_f64.c
@@ -0,0 +1,99 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_a_ui64_z_f64(
+ float64_t trueFunction( uint64_t ), float64_t subjFunction( uint64_t ) )
+{
+ int count;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_ui64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_ui64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_ui64_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_ui64_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_ui64( genCases_ui64_a, "\n\t" );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_ab_extF80_z_bool.c b/src/libs/softfloat-3e/testfloat/source/test_ab_extF80_z_bool.c
new file mode 100644
index 00000000..1a830bcc
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_ab_extF80_z_bool.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_ab_extF80_z_bool(
+ bool trueFunction( const extFloat80_t *, const extFloat80_t * ),
+ bool subjFunction( const extFloat80_t *, const extFloat80_t * )
+ )
+{
+ int count;
+ bool trueZ;
+ uint_fast8_t trueFlags;
+ bool subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_ab_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_ab_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_extF80_a, &genCases_extF80_b );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_extF80_a, &genCases_extF80_b );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (extF80M_isSignalingNaN( &genCases_extF80_a )
+ || extF80M_isSignalingNaN( &genCases_extF80_b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_extF80M(
+ &genCases_extF80_a, &genCases_extF80_b, " " );
+ writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_ab_f128_z_bool.c b/src/libs/softfloat-3e/testfloat/source/test_ab_f128_z_bool.c
new file mode 100644
index 00000000..b5ee911b
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_ab_f128_z_bool.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_ab_f128_z_bool(
+ bool trueFunction( const float128_t *, const float128_t * ),
+ bool subjFunction( const float128_t *, const float128_t * )
+ )
+{
+ int count;
+ bool trueZ;
+ uint_fast8_t trueFlags;
+ bool subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_ab_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_ab_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( &genCases_f128_a, &genCases_f128_b );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( &genCases_f128_a, &genCases_f128_b );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f128M_isSignalingNaN( &genCases_f128_a )
+ || f128M_isSignalingNaN( &genCases_f128_b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_f128M( &genCases_f128_a, &genCases_f128_b );
+ writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_ab_f16_z_bool.c b/src/libs/softfloat-3e/testfloat/source/test_ab_f16_z_bool.c
new file mode 100644
index 00000000..02be4657
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_ab_f16_z_bool.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_ab_f16_z_bool(
+ bool trueFunction( float16_t, float16_t ),
+ bool subjFunction( float16_t, float16_t )
+ )
+{
+ int count;
+ bool trueZ;
+ uint_fast8_t trueFlags;
+ bool subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_ab_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_ab_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, genCases_f16_b );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a, genCases_f16_b );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f16_isSignalingNaN( genCases_f16_a )
+ || f16_isSignalingNaN( genCases_f16_b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_f16( genCases_f16_a, genCases_f16_b );
+ writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_ab_f32_z_bool.c b/src/libs/softfloat-3e/testfloat/source/test_ab_f32_z_bool.c
new file mode 100644
index 00000000..677892e6
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_ab_f32_z_bool.c
@@ -0,0 +1,99 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_ab_f32_z_bool(
+ bool trueFunction( float32_t, float32_t ),
+ bool subjFunction( float32_t, float32_t )
+ )
+{
+ int count;
+ bool trueZ;
+ uint_fast8_t trueFlags;
+ bool subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_ab_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_ab_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, genCases_f32_b );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a, genCases_f32_b );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f32_isSignalingNaN( genCases_f32_a )
+ || f32_isSignalingNaN( genCases_f32_b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_f32( genCases_f32_a, genCases_f32_b );
+ writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_ab_f64_z_bool.c b/src/libs/softfloat-3e/testfloat/source/test_ab_f64_z_bool.c
new file mode 100644
index 00000000..03b208d7
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_ab_f64_z_bool.c
@@ -0,0 +1,103 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_ab_f64_z_bool(
+ bool trueFunction( float64_t, float64_t ),
+ bool subjFunction( float64_t, float64_t )
+ )
+{
+ int count;
+ bool trueZ;
+ uint_fast8_t trueFlags;
+ bool subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_ab_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_ab_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, genCases_f64_b );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a, genCases_f64_b );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f64_isSignalingNaN( genCases_f64_a )
+ || f64_isSignalingNaN( genCases_f64_b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_f64( genCases_f64_a, genCases_f64_b, " " );
+ writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_abcz_f128.c b/src/libs/softfloat-3e/testfloat/source/test_abcz_f128.c
new file mode 100644
index 00000000..8e624466
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_abcz_f128.c
@@ -0,0 +1,125 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_abcz_f128(
+ void
+ trueFunction(
+ const float128_t *,
+ const float128_t *,
+ const float128_t *,
+ float128_t *
+ ),
+ void
+ subjFunction(
+ const float128_t *,
+ const float128_t *,
+ const float128_t *,
+ float128_t *
+ )
+ )
+{
+ int count;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_abc_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_abc_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction(
+ &genCases_f128_a, &genCases_f128_b, &genCases_f128_c, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction(
+ &genCases_f128_a, &genCases_f128_b, &genCases_f128_c, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && ( f128M_isSignalingNaN( &genCases_f128_a )
+ || f128M_isSignalingNaN( &genCases_f128_b )
+ || f128M_isSignalingNaN( &genCases_f128_c )
+ )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_abc_f128M(
+ &genCases_f128_a, &genCases_f128_b, &genCases_f128_c );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_abcz_f16.c b/src/libs/softfloat-3e/testfloat/source/test_abcz_f16.c
new file mode 100644
index 00000000..7e455c73
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_abcz_f16.c
@@ -0,0 +1,111 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_abcz_f16(
+ float16_t trueFunction( float16_t, float16_t, float16_t ),
+ float16_t subjFunction( float16_t, float16_t, float16_t )
+ )
+{
+ int count;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_abc_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_abc_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, genCases_f16_b, genCases_f16_c );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a, genCases_f16_b, genCases_f16_c );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && ( f16_isSignalingNaN( genCases_f16_a )
+ || f16_isSignalingNaN( genCases_f16_b )
+ || f16_isSignalingNaN( genCases_f16_c )
+ )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_abc_f16(
+ genCases_f16_a, genCases_f16_b, genCases_f16_c );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_abcz_f32.c b/src/libs/softfloat-3e/testfloat/source/test_abcz_f32.c
new file mode 100644
index 00000000..c7b06c43
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_abcz_f32.c
@@ -0,0 +1,107 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_abcz_f32(
+ float32_t trueFunction( float32_t, float32_t, float32_t ),
+ float32_t subjFunction( float32_t, float32_t, float32_t )
+ )
+{
+ int count;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_abc_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_abc_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, genCases_f32_b, genCases_f32_c );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a, genCases_f32_b, genCases_f32_c );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && ( f32_isSignalingNaN( genCases_f32_a )
+ || f32_isSignalingNaN( genCases_f32_b )
+ || f32_isSignalingNaN( genCases_f32_c )
+ )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_abc_f32(
+ genCases_f32_a, genCases_f32_b, genCases_f32_c );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_abcz_f64.c b/src/libs/softfloat-3e/testfloat/source/test_abcz_f64.c
new file mode 100644
index 00000000..c15f0429
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_abcz_f64.c
@@ -0,0 +1,111 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_abcz_f64(
+ float64_t trueFunction( float64_t, float64_t, float64_t ),
+ float64_t subjFunction( float64_t, float64_t, float64_t )
+ )
+{
+ int count;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_abc_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_abc_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, genCases_f64_b, genCases_f64_c );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a, genCases_f64_b, genCases_f64_c );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && ( f64_isSignalingNaN( genCases_f64_a )
+ || f64_isSignalingNaN( genCases_f64_b )
+ || f64_isSignalingNaN( genCases_f64_c )
+ )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_abc_f64(
+ genCases_f64_a, genCases_f64_b, genCases_f64_c );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_abz_extF80.c b/src/libs/softfloat-3e/testfloat/source/test_abz_extF80.c
new file mode 100644
index 00000000..041e8b7b
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_abz_extF80.c
@@ -0,0 +1,113 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_abz_extF80(
+ void
+ trueFunction(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * ),
+ void
+ subjFunction(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * )
+ )
+{
+ int count;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_ab_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_ab_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_extF80_a, &genCases_extF80_b, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( &genCases_extF80_a, &genCases_extF80_b, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (extF80M_isSignalingNaN( &genCases_extF80_a )
+ || extF80M_isSignalingNaN( &genCases_extF80_b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_extF80M(
+ &genCases_extF80_a, &genCases_extF80_b, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_abz_f128.c b/src/libs/softfloat-3e/testfloat/source/test_abz_f128.c
new file mode 100644
index 00000000..44f4d79b
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_abz_f128.c
@@ -0,0 +1,108 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_abz_f128(
+ void trueFunction( const float128_t *, const float128_t *, float128_t * ),
+ void subjFunction( const float128_t *, const float128_t *, float128_t * )
+ )
+{
+ int count;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_ab_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_ab_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_f128_a, &genCases_f128_b, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( &genCases_f128_a, &genCases_f128_b, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f128M_isSignalingNaN( &genCases_f128_a )
+ || f128M_isSignalingNaN( &genCases_f128_b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_f128M( &genCases_f128_a, &genCases_f128_b );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_abz_f16.c b/src/libs/softfloat-3e/testfloat/source/test_abz_f16.c
new file mode 100644
index 00000000..40cd2465
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_abz_f16.c
@@ -0,0 +1,108 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_abz_f16(
+ float16_t trueFunction( float16_t, float16_t ),
+ float16_t subjFunction( float16_t, float16_t )
+ )
+{
+ int count;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_ab_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_ab_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, genCases_f16_b );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a, genCases_f16_b );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f16_isSignalingNaN( genCases_f16_a )
+ || f16_isSignalingNaN( genCases_f16_b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_f16( genCases_f16_a, genCases_f16_b );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_abz_f32.c b/src/libs/softfloat-3e/testfloat/source/test_abz_f32.c
new file mode 100644
index 00000000..f31da82b
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_abz_f32.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_abz_f32(
+ float32_t trueFunction( float32_t, float32_t ),
+ float32_t subjFunction( float32_t, float32_t )
+ )
+{
+ int count;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_ab_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_ab_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, genCases_f32_b );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a, genCases_f32_b );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f32_isSignalingNaN( genCases_f32_a )
+ || f32_isSignalingNaN( genCases_f32_b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_f32( genCases_f32_a, genCases_f32_b );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_abz_f64.c b/src/libs/softfloat-3e/testfloat/source/test_abz_f64.c
new file mode 100644
index 00000000..caded698
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_abz_f64.c
@@ -0,0 +1,108 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_abz_f64(
+ float64_t trueFunction( float64_t, float64_t ),
+ float64_t subjFunction( float64_t, float64_t )
+ )
+{
+ int count;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_ab_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_ab_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, genCases_f64_b );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a, genCases_f64_b );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && (f64_isSignalingNaN( genCases_f64_a )
+ || f64_isSignalingNaN( genCases_f64_b ))
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_ab_f64( genCases_f64_a, genCases_f64_b, "\n\t" );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_az_extF80.c b/src/libs/softfloat-3e/testfloat/source/test_az_extF80.c
new file mode 100644
index 00000000..c9e3ed12
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_az_extF80.c
@@ -0,0 +1,107 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_az_extF80(
+ void trueFunction( const extFloat80_t *, extFloat80_t * ),
+ void subjFunction( const extFloat80_t *, extFloat80_t * )
+ )
+{
+ int count;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_extF80_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( &genCases_extF80_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && extF80M_isSignalingNaN( &genCases_extF80_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_az_extF80_rx.c b/src/libs/softfloat-3e/testfloat/source/test_az_extF80_rx.c
new file mode 100644
index 00000000..dd251111
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_az_extF80_rx.c
@@ -0,0 +1,112 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef EXTFLOAT80
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_az_extF80_rx(
+ void
+ trueFunction( const extFloat80_t *, uint_fast8_t, bool, extFloat80_t * ),
+ void
+ subjFunction( const extFloat80_t *, uint_fast8_t, bool, extFloat80_t * ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ extFloat80_t trueZ;
+ uint_fast8_t trueFlags;
+ extFloat80_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_extF80_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_extF80_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_extF80_a, roundingMode, exact, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( &genCases_extF80_a, roundingMode, exact, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && extF80M_isSignalingNaN( &genCases_extF80_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! extF80M_isNaN( &trueZ )
+ || ! extF80M_isNaN( &subjZ )
+ || extF80M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_extF80M( &genCases_extF80_a, "\n\t" );
+ writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_az_f128.c b/src/libs/softfloat-3e/testfloat/source/test_az_f128.c
new file mode 100644
index 00000000..fe4358cd
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_az_f128.c
@@ -0,0 +1,107 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_az_f128(
+ void trueFunction( const float128_t *, float128_t * ),
+ void subjFunction( const float128_t *, float128_t * )
+ )
+{
+ int count;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_f128_a, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( &genCases_f128_a, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && f128M_isSignalingNaN( &genCases_f128_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_az_f128_rx.c b/src/libs/softfloat-3e/testfloat/source/test_az_f128_rx.c
new file mode 100644
index 00000000..53583fae
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_az_f128_rx.c
@@ -0,0 +1,110 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT128
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_az_f128_rx(
+ void trueFunction( const float128_t *, uint_fast8_t, bool, float128_t * ),
+ void subjFunction( const float128_t *, uint_fast8_t, bool, float128_t * ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float128_t trueZ;
+ uint_fast8_t trueFlags;
+ float128_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f128_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f128_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueFunction( &genCases_f128_a, roundingMode, exact, &trueZ );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjFunction( &genCases_f128_a, roundingMode, exact, &subjZ );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f128M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs
+ && f128M_isSignalingNaN( &genCases_f128_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f128M_isNaN( &trueZ )
+ || ! f128M_isNaN( &subjZ )
+ || f128M_isSignalingNaN( &subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f128M( &genCases_f128_a, " " );
+ writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_az_f16.c b/src/libs/softfloat-3e/testfloat/source/test_az_f16.c
new file mode 100644
index 00000000..a3c2b9a4
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_az_f16.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_az_f16(
+ float16_t trueFunction( float16_t ), float16_t subjFunction( float16_t ) )
+{
+ int count;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f16_isSignalingNaN( genCases_f16_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_az_f16_rx.c b/src/libs/softfloat-3e/testfloat/source/test_az_f16_rx.c
new file mode 100644
index 00000000..2d1dd1ef
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_az_f16_rx.c
@@ -0,0 +1,109 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT16
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_az_f16_rx(
+ float16_t trueFunction( float16_t, uint_fast8_t, bool ),
+ float16_t subjFunction( float16_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float16_t trueZ;
+ uint_fast8_t trueFlags;
+ float16_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f16_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f16_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f16_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f16_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f16_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f16_isSignalingNaN( genCases_f16_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f16_isNaN( trueZ )
+ || ! f16_isNaN( subjZ )
+ || f16_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f16( genCases_f16_a );
+ writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_az_f32.c b/src/libs/softfloat-3e/testfloat/source/test_az_f32.c
new file mode 100644
index 00000000..46d62e37
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_az_f32.c
@@ -0,0 +1,100 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_az_f32(
+ float32_t trueFunction( float32_t ), float32_t subjFunction( float32_t ) )
+{
+ int count;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f32_isSignalingNaN( genCases_f32_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_az_f32_rx.c b/src/libs/softfloat-3e/testfloat/source/test_az_f32_rx.c
new file mode 100644
index 00000000..e3e9953f
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_az_f32_rx.c
@@ -0,0 +1,105 @@
+
+/*============================================================================
+
+This C source 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 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_az_f32_rx(
+ float32_t trueFunction( float32_t, uint_fast8_t, bool ),
+ float32_t subjFunction( float32_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float32_t trueZ;
+ uint_fast8_t trueFlags;
+ float32_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f32_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f32_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f32_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f32_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f32_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f32_isSignalingNaN( genCases_f32_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f32_isNaN( trueZ )
+ || ! f32_isNaN( subjZ )
+ || f32_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_az_f64.c b/src/libs/softfloat-3e/testfloat/source/test_az_f64.c
new file mode 100644
index 00000000..01f6760e
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_az_f64.c
@@ -0,0 +1,104 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_az_f64(
+ float64_t trueFunction( float64_t ), float64_t subjFunction( float64_t ) )
+{
+ int count;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f64_isSignalingNaN( genCases_f64_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, "\n\t" );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/test_az_f64_rx.c b/src/libs/softfloat-3e/testfloat/source/test_az_f64_rx.c
new file mode 100644
index 00000000..d0c66447
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/test_az_f64_rx.c
@@ -0,0 +1,109 @@
+
+/*============================================================================
+
+This C source 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, 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.
+
+=============================================================================*/
+
+#include
+#include
+#include "platform.h"
+#include "softfloat.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "writeCase.h"
+#include "testLoops.h"
+
+#ifdef FLOAT64
+
+#pragma STDC FENV_ACCESS ON
+
+void
+ test_az_f64_rx(
+ float64_t trueFunction( float64_t, uint_fast8_t, bool ),
+ float64_t subjFunction( float64_t, uint_fast8_t, bool ),
+ uint_fast8_t roundingMode,
+ bool exact
+ )
+{
+ int count;
+ float64_t trueZ;
+ uint_fast8_t trueFlags;
+ float64_t subjZ;
+ uint_fast8_t subjFlags;
+
+ genCases_f64_a_init();
+ genCases_writeTestsTotal( testLoops_forever );
+ verCases_errorCount = 0;
+ verCases_tenThousandsCount = 0;
+ count = 10000;
+ while ( ! genCases_done || testLoops_forever ) {
+ genCases_f64_a_next();
+ *testLoops_trueFlagsPtr = 0;
+ trueZ = trueFunction( genCases_f64_a, roundingMode, exact );
+ trueFlags = *testLoops_trueFlagsPtr;
+ testLoops_subjFlagsFunction();
+ subjZ = subjFunction( genCases_f64_a, roundingMode, exact );
+ subjFlags = testLoops_subjFlagsFunction();
+ --count;
+ if ( ! count ) {
+ verCases_perTenThousand();
+ count = 10000;
+ }
+ if ( ! f64_same( trueZ, subjZ ) || (trueFlags != subjFlags) ) {
+ if (
+ ! verCases_checkNaNs && f64_isSignalingNaN( genCases_f64_a )
+ ) {
+ trueFlags |= softfloat_flag_invalid;
+ }
+ if (
+ verCases_checkNaNs
+ || ! f64_isNaN( trueZ )
+ || ! f64_isNaN( subjZ )
+ || f64_isSignalingNaN( subjZ )
+ || (trueFlags != subjFlags)
+ ) {
+ ++verCases_errorCount;
+ verCases_writeErrorFound( 10000 - count );
+ writeCase_a_f64( genCases_f64_a, "\n\t" );
+ writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
+ if ( verCases_errorCount == verCases_maxErrorCount ) break;
+ }
+ }
+ }
+ verCases_writeTestsPerformed( 10000 - count );
+
+}
+
+#endif
+
diff --git a/src/libs/softfloat-3e/testfloat/source/testfloat.c b/src/libs/softfloat-3e/testfloat/source/testfloat.c
new file mode 100644
index 00000000..743e37ab
--- /dev/null
+++ b/src/libs/softfloat-3e/testfloat/source/testfloat.c
@@ -0,0 +1,1715 @@
+
+/*============================================================================
+
+This C source 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, 2017, 2018 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.
+
+=============================================================================*/
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include "platform.h"
+#include "fail.h"
+#include "softfloat.h"
+#include "subjfloat_config.h"
+#include "subjfloat.h"
+#include "functions.h"
+#include "genCases.h"
+#include "verCases.h"
+#include "testLoops.h"
+
+static void catchSIGINT( int signalCode )
+{
+
+ if ( verCases_stop ) exit( EXIT_FAILURE );
+ verCases_stop = true;
+
+}
+
+static void (*subjFunctionPtr)();
+
+#ifdef FLOAT16
+typedef float16_t funcType_a_ui32_z_f16( uint32_t );
+#endif
+typedef float32_t funcType_a_ui32_z_f32( uint32_t );
+#ifdef FLOAT64
+typedef float64_t funcType_a_ui32_z_f64( uint32_t );
+#endif
+#ifdef EXTFLOAT80
+typedef void funcType_a_ui32_z_extF80( uint32_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+typedef void funcType_a_ui32_z_f128( uint32_t, float128_t * );
+#endif
+#ifdef FLOAT16
+typedef float16_t funcType_a_ui64_z_f16( uint64_t );
+#endif
+typedef float32_t funcType_a_ui64_z_f32( uint64_t );
+#ifdef FLOAT64
+typedef float64_t funcType_a_ui64_z_f64( uint64_t );
+#endif
+#ifdef EXTFLOAT80
+typedef void funcType_a_ui64_z_extF80( uint64_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+typedef void funcType_a_ui64_z_f128( uint64_t, float128_t * );
+#endif
+#ifdef FLOAT16
+typedef float16_t funcType_a_i32_z_f16( int32_t );
+#endif
+typedef float32_t funcType_a_i32_z_f32( int32_t );
+#ifdef FLOAT64
+typedef float64_t funcType_a_i32_z_f64( int32_t );
+#endif
+#ifdef EXTFLOAT80
+typedef void funcType_a_i32_z_extF80( int32_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+typedef void funcType_a_i32_z_f128( int32_t, float128_t * );
+#endif
+#ifdef FLOAT16
+typedef float16_t funcType_a_i64_z_f16( int64_t );
+#endif
+typedef float32_t funcType_a_i64_z_f32( int64_t );
+#ifdef FLOAT64
+typedef float64_t funcType_a_i64_z_f64( int64_t );
+#endif
+#ifdef EXTFLOAT80
+typedef void funcType_a_i64_z_extF80( int64_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+typedef void funcType_a_i64_z_f128( int64_t, float128_t * );
+#endif
+
+#ifdef FLOAT16
+typedef uint_fast32_t funcType_a_f16_z_ui32( float16_t );
+typedef uint_fast64_t funcType_a_f16_z_ui64( float16_t );
+typedef int_fast32_t funcType_a_f16_z_i32( float16_t );
+typedef int_fast64_t funcType_a_f16_z_i64( float16_t );
+typedef float32_t funcType_a_f16_z_f32( float16_t );
+#ifdef FLOAT64
+typedef float64_t funcType_a_f16_z_f64( float16_t );
+#endif
+#ifdef EXTFLOAT80
+typedef void funcType_a_f16_z_extF80( float16_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+typedef void funcType_a_f16_z_f128( float16_t, float128_t * );
+#endif
+typedef float16_t funcType_az_f16( float16_t );
+typedef float16_t funcType_abz_f16( float16_t, float16_t );
+typedef float16_t funcType_abcz_f16( float16_t, float16_t, float16_t );
+typedef bool funcType_ab_f16_z_bool( float16_t, float16_t );
+#endif
+
+typedef uint_fast32_t funcType_a_f32_z_ui32( float32_t );
+typedef uint_fast64_t funcType_a_f32_z_ui64( float32_t );
+typedef int_fast32_t funcType_a_f32_z_i32( float32_t );
+typedef int_fast64_t funcType_a_f32_z_i64( float32_t );
+#ifdef FLOAT16
+typedef float16_t funcType_a_f32_z_f16( float32_t );
+#endif
+#ifdef FLOAT64
+typedef float64_t funcType_a_f32_z_f64( float32_t );
+#endif
+#ifdef EXTFLOAT80
+typedef void funcType_a_f32_z_extF80( float32_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+typedef void funcType_a_f32_z_f128( float32_t, float128_t * );
+#endif
+typedef float32_t funcType_az_f32( float32_t );
+typedef float32_t funcType_abz_f32( float32_t, float32_t );
+typedef float32_t funcType_abcz_f32( float32_t, float32_t, float32_t );
+typedef bool funcType_ab_f32_z_bool( float32_t, float32_t );
+
+#ifdef FLOAT64
+typedef uint_fast32_t funcType_a_f64_z_ui32( float64_t );
+typedef uint_fast64_t funcType_a_f64_z_ui64( float64_t );
+typedef int_fast32_t funcType_a_f64_z_i32( float64_t );
+typedef int_fast64_t funcType_a_f64_z_i64( float64_t );
+#ifdef FLOAT16
+typedef float16_t funcType_a_f64_z_f16( float64_t );
+#endif
+typedef float32_t funcType_a_f64_z_f32( float64_t );
+#ifdef EXTFLOAT80
+typedef void funcType_a_f64_z_extF80( float64_t, extFloat80_t * );
+#endif
+#ifdef FLOAT128
+typedef void funcType_a_f64_z_f128( float64_t, float128_t * );
+#endif
+typedef float64_t funcType_az_f64( float64_t );
+typedef float64_t funcType_abz_f64( float64_t, float64_t );
+typedef float64_t funcType_abcz_f64( float64_t, float64_t, float64_t );
+typedef bool funcType_ab_f64_z_bool( float64_t, float64_t );
+#endif
+
+#ifdef EXTFLOAT80
+typedef uint_fast32_t funcType_a_extF80_z_ui32( const extFloat80_t * );
+typedef uint_fast64_t funcType_a_extF80_z_ui64( const extFloat80_t * );
+typedef int_fast32_t funcType_a_extF80_z_i32( const extFloat80_t * );
+typedef int_fast64_t funcType_a_extF80_z_i64( const extFloat80_t * );
+#ifdef FLOAT16
+typedef float16_t funcType_a_extF80_z_f16( const extFloat80_t * );
+#endif
+typedef float32_t funcType_a_extF80_z_f32( const extFloat80_t * );
+#ifdef FLOAT64
+typedef float64_t funcType_a_extF80_z_f64( const extFloat80_t * );
+#endif
+#ifdef FLOAT128
+typedef void funcType_a_extF80_z_f128( const extFloat80_t *, float128_t * );
+#endif
+typedef void funcType_az_extF80( const extFloat80_t *, extFloat80_t * );
+typedef
+ void
+ funcType_abz_extF80(
+ const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
+typedef
+ bool funcType_ab_extF80_z_bool( const extFloat80_t *, const extFloat80_t * );
+#endif
+
+#ifdef FLOAT128
+typedef uint_fast32_t funcType_a_f128_z_ui32( const float128_t * );
+typedef uint_fast64_t funcType_a_f128_z_ui64( const float128_t * );
+typedef int_fast32_t funcType_a_f128_z_i32( const float128_t * );
+typedef int_fast64_t funcType_a_f128_z_i64( const float128_t * );
+#ifdef FLOAT16
+typedef float16_t funcType_a_f128_z_f16( const float128_t * );
+#endif
+typedef float32_t funcType_a_f128_z_f32( const float128_t * );
+#ifdef FLOAT64
+typedef float64_t funcType_a_f128_z_f64( const float128_t * );
+#endif
+#ifdef EXTFLOAT80
+typedef void funcType_a_f128_z_extF80( const float128_t *, extFloat80_t * );
+#endif
+typedef void funcType_az_f128( const float128_t *, float128_t * );
+typedef
+ void
+ funcType_abz_f128( const float128_t *, const float128_t *, float128_t * );
+typedef
+ void
+ funcType_abcz_f128(
+ const float128_t *, const float128_t *, const float128_t *, float128_t *
+ );
+typedef bool funcType_ab_f128_z_bool( const float128_t *, const float128_t * );
+#endif
+
+#ifdef FLOAT16
+
+static
+uint_fast32_t
+ subjFunction_a_f16_z_ui32_rx(
+ float16_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f16_z_ui32 *) subjFunctionPtr)( a );
+
+}
+
+static
+uint_fast64_t
+ subjFunction_a_f16_z_ui64_rx(
+ float16_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f16_z_ui64 *) subjFunctionPtr)( a );
+
+}
+
+static
+int_fast32_t
+ subjFunction_a_f16_z_i32_rx(
+ float16_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f16_z_i32 *) subjFunctionPtr)( a );
+
+}
+
+static
+int_fast64_t
+ subjFunction_a_f16_z_i64_rx(
+ float16_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f16_z_i64 *) subjFunctionPtr)( a );
+
+}
+
+static
+float16_t
+ subjFunction_az_f16_rx( float16_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_az_f16 *) subjFunctionPtr)( a );
+
+}
+
+#endif
+
+static
+uint_fast32_t
+ subjFunction_a_f32_z_ui32_rx(
+ float32_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f32_z_ui32 *) subjFunctionPtr)( a );
+
+}
+
+static
+uint_fast64_t
+ subjFunction_a_f32_z_ui64_rx(
+ float32_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f32_z_ui64 *) subjFunctionPtr)( a );
+
+}
+
+static
+int_fast32_t
+ subjFunction_a_f32_z_i32_rx(
+ float32_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f32_z_i32 *) subjFunctionPtr)( a );
+
+}
+
+static
+int_fast64_t
+ subjFunction_a_f32_z_i64_rx(
+ float32_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f32_z_i64 *) subjFunctionPtr)( a );
+
+}
+
+static
+float32_t
+ subjFunction_az_f32_rx( float32_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_az_f32 *) subjFunctionPtr)( a );
+
+}
+
+#ifdef FLOAT64
+
+static
+uint_fast32_t
+ subjFunction_a_f64_z_ui32_rx(
+ float64_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f64_z_ui32 *) subjFunctionPtr)( a );
+
+}
+
+static
+uint_fast64_t
+ subjFunction_a_f64_z_ui64_rx(
+ float64_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f64_z_ui64 *) subjFunctionPtr)( a );
+
+}
+
+static
+int_fast32_t
+ subjFunction_a_f64_z_i32_rx(
+ float64_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f64_z_i32 *) subjFunctionPtr)( a );
+
+}
+
+static
+int_fast64_t
+ subjFunction_a_f64_z_i64_rx(
+ float64_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f64_z_i64 *) subjFunctionPtr)( a );
+
+}
+
+static
+float64_t
+ subjFunction_az_f64_rx( float64_t a, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_az_f64 *) subjFunctionPtr)( a );
+
+}
+
+#endif
+
+#ifdef EXTFLOAT80
+
+static
+uint_fast32_t
+ subjFunction_a_extF80_z_ui32_rx(
+ const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_extF80_z_ui32 *) subjFunctionPtr)( aPtr );
+
+}
+
+static
+uint_fast64_t
+ subjFunction_a_extF80_z_ui64_rx(
+ const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_extF80_z_ui64 *) subjFunctionPtr)( aPtr );
+
+}
+
+static
+int_fast32_t
+ subjFunction_a_extF80_z_i32_rx(
+ const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_extF80_z_i32 *) subjFunctionPtr)( aPtr );
+
+}
+
+static
+int_fast64_t
+ subjFunction_a_extF80_z_i64_rx(
+ const extFloat80_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_extF80_z_i64 *) subjFunctionPtr)( aPtr );
+
+}
+
+static
+void
+ subjFunction_az_extF80_rx(
+ const extFloat80_t *aPtr,
+ uint_fast8_t roundingMode,
+ bool exact,
+ extFloat80_t *zPtr
+ )
+{
+
+ return ((funcType_az_extF80 *) subjFunctionPtr)( aPtr, zPtr );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+static
+uint_fast32_t
+ subjFunction_a_f128_z_ui32_rx(
+ const float128_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f128_z_ui32 *) subjFunctionPtr)( aPtr );
+
+}
+
+static
+uint_fast64_t
+ subjFunction_a_f128_z_ui64_rx(
+ const float128_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f128_z_ui64 *) subjFunctionPtr)( aPtr );
+
+}
+
+static
+int_fast32_t
+ subjFunction_a_f128_z_i32_rx(
+ const float128_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f128_z_i32 *) subjFunctionPtr)( aPtr );
+
+}
+
+static
+int_fast64_t
+ subjFunction_a_f128_z_i64_rx(
+ const float128_t *aPtr, uint_fast8_t roundingMode, bool exact )
+{
+
+ return ((funcType_a_f128_z_i64 *) subjFunctionPtr)( aPtr );
+
+}
+
+static
+void
+ subjFunction_az_f128_rx(
+ const float128_t *aPtr,
+ uint_fast8_t roundingMode,
+ bool exact,
+ float128_t *zPtr
+ )
+{
+
+ return ((funcType_az_f128 *) subjFunctionPtr)( aPtr, zPtr );
+
+}
+
+#endif
+
+static
+void
+ testFunctionInstance(
+ int functionCode, uint_fast8_t roundingMode, bool exact )
+{
+#ifdef FLOAT16
+ funcType_abz_f16 *trueFunction_abz_f16;
+ funcType_ab_f16_z_bool *trueFunction_ab_f16_z_bool;
+#endif
+ funcType_abz_f32 *trueFunction_abz_f32;
+ funcType_ab_f32_z_bool *trueFunction_ab_f32_z_bool;
+#ifdef FLOAT64
+ funcType_abz_f64 *trueFunction_abz_f64;
+ funcType_ab_f64_z_bool *trueFunction_ab_f64_z_bool;
+#endif
+#ifdef EXTFLOAT80
+ funcType_abz_extF80 *trueFunction_abz_extF80;
+ funcType_ab_extF80_z_bool *trueFunction_ab_extF80_z_bool;
+#endif
+#ifdef FLOAT128
+ funcType_abz_f128 *trueFunction_abz_f128;
+ funcType_ab_f128_z_bool *trueFunction_ab_f128_z_bool;
+#endif
+
+ fputs( "Testing ", stderr );
+ verCases_writeFunctionName( stderr );
+ fputs( ".\n", stderr );
+ switch ( functionCode ) {
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef FLOAT16
+#ifdef SUBJ_UI32_TO_F16
+ case UI32_TO_F16:
+ test_a_ui32_z_f16(
+ ui32_to_f16, (funcType_a_ui32_z_f16 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef SUBJ_UI32_TO_F32
+ case UI32_TO_F32:
+ test_a_ui32_z_f32(
+ ui32_to_f32, (funcType_a_ui32_z_f32 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_UI32_TO_F64
+ case UI32_TO_F64:
+ test_a_ui32_z_f64(
+ ui32_to_f64, (funcType_a_ui32_z_f64 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_UI32_TO_EXTF80
+ case UI32_TO_EXTF80:
+ test_a_ui32_z_extF80(
+ ui32_to_extF80M, (funcType_a_ui32_z_extF80 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_UI32_TO_F128
+ case UI32_TO_F128:
+ test_a_ui32_z_f128(
+ ui32_to_f128M, (funcType_a_ui32_z_f128 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef FLOAT16
+#ifdef SUBJ_UI64_TO_F16
+ case UI64_TO_F16:
+ test_a_ui64_z_f16(
+ ui64_to_f16, (funcType_a_ui64_z_f16 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef SUBJ_UI64_TO_F32
+ case UI64_TO_F32:
+ test_a_ui64_z_f32(
+ ui64_to_f32, (funcType_a_ui64_z_f32 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_UI64_TO_F64
+ case UI64_TO_F64:
+ test_a_ui64_z_f64(
+ ui64_to_f64, (funcType_a_ui64_z_f64 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_UI64_TO_EXTF80
+ case UI64_TO_EXTF80:
+ test_a_ui64_z_extF80(
+ ui64_to_extF80M, (funcType_a_ui64_z_extF80 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_UI64_TO_F128
+ case UI64_TO_F128:
+ test_a_ui64_z_f128(
+ ui64_to_f128M, (funcType_a_ui64_z_f128 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef FLOAT16
+#ifdef SUBJ_I32_TO_F16
+ case I32_TO_F16:
+ test_a_i32_z_f16(
+ i32_to_f16, (funcType_a_i32_z_f16 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef SUBJ_I32_TO_F32
+ case I32_TO_F32:
+ test_a_i32_z_f32(
+ i32_to_f32, (funcType_a_i32_z_f32 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_I32_TO_F64
+ case I32_TO_F64:
+ test_a_i32_z_f64(
+ i32_to_f64, (funcType_a_i32_z_f64 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_I32_TO_EXTF80
+ case I32_TO_EXTF80:
+ test_a_i32_z_extF80(
+ i32_to_extF80M, (funcType_a_i32_z_extF80 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_I32_TO_F128
+ case I32_TO_F128:
+ test_a_i32_z_f128(
+ i32_to_f128M, (funcType_a_i32_z_f128 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef FLOAT16
+#ifdef SUBJ_I64_TO_F16
+ case I64_TO_F16:
+ test_a_i64_z_f16(
+ i64_to_f16, (funcType_a_i64_z_f16 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef SUBJ_I64_TO_F32
+ case I64_TO_F32:
+ test_a_i64_z_f32(
+ i64_to_f32, (funcType_a_i64_z_f32 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_I64_TO_F64
+ case I64_TO_F64:
+ test_a_i64_z_f64(
+ i64_to_f64, (funcType_a_i64_z_f64 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_I64_TO_EXTF80
+ case I64_TO_EXTF80:
+ test_a_i64_z_extF80(
+ i64_to_extF80M, (funcType_a_i64_z_extF80 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_I64_TO_F128
+ case I64_TO_F128:
+ test_a_i64_z_f128(
+ i64_to_f128M, (funcType_a_i64_z_f128 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef FLOAT16
+ case F16_TO_UI32:
+ test_a_f16_z_ui32_rx(
+ f16_to_ui32, subjFunction_a_f16_z_ui32_rx, roundingMode, exact );
+ break;
+ case F16_TO_UI64:
+ test_a_f16_z_ui64_rx(
+ f16_to_ui64, subjFunction_a_f16_z_ui64_rx, roundingMode, exact );
+ break;
+ case F16_TO_I32:
+ test_a_f16_z_i32_rx(
+ f16_to_i32, subjFunction_a_f16_z_i32_rx, roundingMode, exact );
+ break;
+ case F16_TO_I64:
+ test_a_f16_z_i64_rx(
+ f16_to_i64, subjFunction_a_f16_z_i64_rx, roundingMode, exact );
+ break;
+#ifdef SUBJ_F16_TO_F32
+ case F16_TO_F32:
+ test_a_f16_z_f32(
+ f16_to_f32, (funcType_a_f16_z_f32 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_F16_TO_F64
+ case F16_TO_F64:
+ test_a_f16_z_f64(
+ f16_to_f64, (funcType_a_f16_z_f64 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_F16_TO_EXTF80
+ case F16_TO_EXTF80:
+ test_a_f16_z_extF80(
+ f16_to_extF80M, (funcType_a_f16_z_extF80 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_F16_TO_F128
+ case F16_TO_F128:
+ test_a_f16_z_f128(
+ f16_to_f128M, (funcType_a_f16_z_f128 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+ case F16_ROUNDTOINT:
+ test_az_f16_rx(
+ f16_roundToInt, subjFunction_az_f16_rx, roundingMode, exact );
+ break;
+#ifdef SUBJ_F16_ADD
+ case F16_ADD:
+ trueFunction_abz_f16 = f16_add;
+ goto test_abz_f16;
+#endif
+#ifdef SUBJ_F16_SUB
+ case F16_SUB:
+ trueFunction_abz_f16 = f16_sub;
+ goto test_abz_f16;
+#endif
+#ifdef SUBJ_F16_MUL
+ case F16_MUL:
+ trueFunction_abz_f16 = f16_mul;
+ goto test_abz_f16;
+#endif
+#ifdef SUBJ_F16_MULADD
+ case F16_MULADD:
+ test_abcz_f16( f16_mulAdd, (funcType_abcz_f16 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef SUBJ_F16_DIV
+ case F16_DIV:
+ trueFunction_abz_f16 = f16_div;
+ goto test_abz_f16;
+#endif
+#ifdef SUBJ_F16_REM
+ case F16_REM:
+ trueFunction_abz_f16 = f16_rem;
+ goto test_abz_f16;
+#endif
+ test_abz_f16:
+ test_abz_f16(
+ trueFunction_abz_f16, (funcType_abz_f16 *) subjFunctionPtr );
+ break;
+#ifdef SUBJ_F16_SQRT
+ case F16_SQRT:
+ test_az_f16( f16_sqrt, (funcType_az_f16 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef SUBJ_F16_EQ
+ case F16_EQ:
+ trueFunction_ab_f16_z_bool = f16_eq;
+ goto test_ab_f16_z_bool;
+#endif
+#ifdef SUBJ_F16_LE
+ case F16_LE:
+ trueFunction_ab_f16_z_bool = f16_le;
+ goto test_ab_f16_z_bool;
+#endif
+#ifdef SUBJ_F16_LT
+ case F16_LT:
+ trueFunction_ab_f16_z_bool = f16_lt;
+ goto test_ab_f16_z_bool;
+#endif
+#ifdef SUBJ_F16_EQ_SIGNALING
+ case F16_EQ_SIGNALING:
+ trueFunction_ab_f16_z_bool = f16_eq_signaling;
+ goto test_ab_f16_z_bool;
+#endif
+#ifdef SUBJ_F16_LE_QUIET
+ case F16_LE_QUIET:
+ trueFunction_ab_f16_z_bool = f16_le_quiet;
+ goto test_ab_f16_z_bool;
+#endif
+#ifdef SUBJ_F16_LT_QUIET
+ case F16_LT_QUIET:
+ trueFunction_ab_f16_z_bool = f16_lt_quiet;
+ goto test_ab_f16_z_bool;
+#endif
+ test_ab_f16_z_bool:
+ test_ab_f16_z_bool(
+ trueFunction_ab_f16_z_bool,
+ (funcType_ab_f16_z_bool *) subjFunctionPtr
+ );
+ break;
+#endif
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+ case F32_TO_UI32:
+ test_a_f32_z_ui32_rx(
+ f32_to_ui32, subjFunction_a_f32_z_ui32_rx, roundingMode, exact );
+ break;
+ case F32_TO_UI64:
+ test_a_f32_z_ui64_rx(
+ f32_to_ui64, subjFunction_a_f32_z_ui64_rx, roundingMode, exact );
+ break;
+ case F32_TO_I32:
+ test_a_f32_z_i32_rx(
+ f32_to_i32, subjFunction_a_f32_z_i32_rx, roundingMode, exact );
+ break;
+ case F32_TO_I64:
+ test_a_f32_z_i64_rx(
+ f32_to_i64, subjFunction_a_f32_z_i64_rx, roundingMode, exact );
+ break;
+#ifdef FLOAT16
+#ifdef SUBJ_F32_TO_F16
+ case F32_TO_F16:
+ test_a_f32_z_f16(
+ f32_to_f16, (funcType_a_f32_z_f16 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_F32_TO_F64
+ case F32_TO_F64:
+ test_a_f32_z_f64(
+ f32_to_f64, (funcType_a_f32_z_f64 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_F32_TO_EXTF80
+ case F32_TO_EXTF80:
+ test_a_f32_z_extF80(
+ f32_to_extF80M, (funcType_a_f32_z_extF80 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_F32_TO_F128
+ case F32_TO_F128:
+ test_a_f32_z_f128(
+ f32_to_f128M, (funcType_a_f32_z_f128 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+ case F32_ROUNDTOINT:
+ test_az_f32_rx(
+ f32_roundToInt, subjFunction_az_f32_rx, roundingMode, exact );
+ break;
+#ifdef SUBJ_F32_ADD
+ case F32_ADD:
+ trueFunction_abz_f32 = f32_add;
+ goto test_abz_f32;
+#endif
+#ifdef SUBJ_F32_SUB
+ case F32_SUB:
+ trueFunction_abz_f32 = f32_sub;
+ goto test_abz_f32;
+#endif
+#ifdef SUBJ_F32_MUL
+ case F32_MUL:
+ trueFunction_abz_f32 = f32_mul;
+ goto test_abz_f32;
+#endif
+#ifdef SUBJ_F32_MULADD
+ case F32_MULADD:
+ test_abcz_f32( f32_mulAdd, (funcType_abcz_f32 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef SUBJ_F32_DIV
+ case F32_DIV:
+ trueFunction_abz_f32 = f32_div;
+ goto test_abz_f32;
+#endif
+#ifdef SUBJ_F32_REM
+ case F32_REM:
+ trueFunction_abz_f32 = f32_rem;
+ goto test_abz_f32;
+#endif
+ test_abz_f32:
+ test_abz_f32(
+ trueFunction_abz_f32, (funcType_abz_f32 *) subjFunctionPtr );
+ break;
+#ifdef SUBJ_F32_SQRT
+ case F32_SQRT:
+ test_az_f32( f32_sqrt, (funcType_az_f32 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef SUBJ_F32_EQ
+ case F32_EQ:
+ trueFunction_ab_f32_z_bool = f32_eq;
+ goto test_ab_f32_z_bool;
+#endif
+#ifdef SUBJ_F32_LE
+ case F32_LE:
+ trueFunction_ab_f32_z_bool = f32_le;
+ goto test_ab_f32_z_bool;
+#endif
+#ifdef SUBJ_F32_LT
+ case F32_LT:
+ trueFunction_ab_f32_z_bool = f32_lt;
+ goto test_ab_f32_z_bool;
+#endif
+#ifdef SUBJ_F32_EQ_SIGNALING
+ case F32_EQ_SIGNALING:
+ trueFunction_ab_f32_z_bool = f32_eq_signaling;
+ goto test_ab_f32_z_bool;
+#endif
+#ifdef SUBJ_F32_LE_QUIET
+ case F32_LE_QUIET:
+ trueFunction_ab_f32_z_bool = f32_le_quiet;
+ goto test_ab_f32_z_bool;
+#endif
+#ifdef SUBJ_F32_LT_QUIET
+ case F32_LT_QUIET:
+ trueFunction_ab_f32_z_bool = f32_lt_quiet;
+ goto test_ab_f32_z_bool;
+#endif
+ test_ab_f32_z_bool:
+ test_ab_f32_z_bool(
+ trueFunction_ab_f32_z_bool,
+ (funcType_ab_f32_z_bool *) subjFunctionPtr
+ );
+ break;
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef FLOAT64
+ case F64_TO_UI32:
+ test_a_f64_z_ui32_rx(
+ f64_to_ui32, subjFunction_a_f64_z_ui32_rx, roundingMode, exact );
+ break;
+ case F64_TO_UI64:
+ test_a_f64_z_ui64_rx(
+ f64_to_ui64, subjFunction_a_f64_z_ui64_rx, roundingMode, exact );
+ break;
+ case F64_TO_I32:
+ test_a_f64_z_i32_rx(
+ f64_to_i32, subjFunction_a_f64_z_i32_rx, roundingMode, exact );
+ break;
+ case F64_TO_I64:
+ test_a_f64_z_i64_rx(
+ f64_to_i64, subjFunction_a_f64_z_i64_rx, roundingMode, exact );
+ break;
+#ifdef FLOAT16
+#ifdef SUBJ_F64_TO_F16
+ case F64_TO_F16:
+ test_a_f64_z_f16(
+ f64_to_f16, (funcType_a_f64_z_f16 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef SUBJ_F64_TO_F32
+ case F64_TO_F32:
+ test_a_f64_z_f32(
+ f64_to_f32, (funcType_a_f64_z_f32 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_F64_TO_EXTF80
+ case F64_TO_EXTF80:
+ test_a_f64_z_extF80(
+ f64_to_extF80M, (funcType_a_f64_z_extF80 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_F64_TO_F128
+ case F64_TO_F128:
+ test_a_f64_z_f128(
+ f64_to_f128M, (funcType_a_f64_z_f128 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+ case F64_ROUNDTOINT:
+ test_az_f64_rx(
+ f64_roundToInt, subjFunction_az_f64_rx, roundingMode, exact );
+ break;
+#ifdef SUBJ_F64_ADD
+ case F64_ADD:
+ trueFunction_abz_f64 = f64_add;
+ goto test_abz_f64;
+#endif
+#ifdef SUBJ_F64_SUB
+ case F64_SUB:
+ trueFunction_abz_f64 = f64_sub;
+ goto test_abz_f64;
+#endif
+#ifdef SUBJ_F64_MUL
+ case F64_MUL:
+ trueFunction_abz_f64 = f64_mul;
+ goto test_abz_f64;
+#endif
+#ifdef SUBJ_F64_MULADD
+ case F64_MULADD:
+ test_abcz_f64( f64_mulAdd, (funcType_abcz_f64 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef SUBJ_F64_DIV
+ case F64_DIV:
+ trueFunction_abz_f64 = f64_div;
+ goto test_abz_f64;
+#endif
+#ifdef SUBJ_F64_REM
+ case F64_REM:
+ trueFunction_abz_f64 = f64_rem;
+ goto test_abz_f64;
+#endif
+ test_abz_f64:
+ test_abz_f64(
+ trueFunction_abz_f64, (funcType_abz_f64 *) subjFunctionPtr );
+ break;
+#ifdef SUBJ_F64_SQRT
+ case F64_SQRT:
+ test_az_f64( f64_sqrt, (funcType_az_f64 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef SUBJ_F64_EQ
+ case F64_EQ:
+ trueFunction_ab_f64_z_bool = f64_eq;
+ goto test_ab_f64_z_bool;
+#endif
+#ifdef SUBJ_F64_LE
+ case F64_LE:
+ trueFunction_ab_f64_z_bool = f64_le;
+ goto test_ab_f64_z_bool;
+#endif
+#ifdef SUBJ_F64_LT
+ case F64_LT:
+ trueFunction_ab_f64_z_bool = f64_lt;
+ goto test_ab_f64_z_bool;
+#endif
+#ifdef SUBJ_F64_EQ_SIGNALING
+ case F64_EQ_SIGNALING:
+ trueFunction_ab_f64_z_bool = f64_eq_signaling;
+ goto test_ab_f64_z_bool;
+#endif
+#ifdef SUBJ_F64_LE_QUIET
+ case F64_LE_QUIET:
+ trueFunction_ab_f64_z_bool = f64_le_quiet;
+ goto test_ab_f64_z_bool;
+#endif
+#ifdef SUBJ_F64_LT_QUIET
+ case F64_LT_QUIET:
+ trueFunction_ab_f64_z_bool = f64_lt_quiet;
+ goto test_ab_f64_z_bool;
+#endif
+ test_ab_f64_z_bool:
+ test_ab_f64_z_bool(
+ trueFunction_ab_f64_z_bool,
+ (funcType_ab_f64_z_bool *) subjFunctionPtr
+ );
+ break;
+#endif
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef EXTFLOAT80
+ case EXTF80_TO_UI32:
+ test_a_extF80_z_ui32_rx(
+ extF80M_to_ui32,
+ subjFunction_a_extF80_z_ui32_rx,
+ roundingMode,
+ exact
+ );
+ break;
+ case EXTF80_TO_UI64:
+ test_a_extF80_z_ui64_rx(
+ extF80M_to_ui64,
+ subjFunction_a_extF80_z_ui64_rx,
+ roundingMode,
+ exact
+ );
+ break;
+ case EXTF80_TO_I32:
+ test_a_extF80_z_i32_rx(
+ extF80M_to_i32, subjFunction_a_extF80_z_i32_rx, roundingMode, exact
+ );
+ break;
+ case EXTF80_TO_I64:
+ test_a_extF80_z_i64_rx(
+ extF80M_to_i64, subjFunction_a_extF80_z_i64_rx, roundingMode, exact
+ );
+ break;
+#ifdef FLOAT16
+#ifdef SUBJ_EXTF80_TO_F16
+ case EXTF80_TO_F16:
+ test_a_extF80_z_f16(
+ extF80M_to_f16, (funcType_a_extF80_z_f16 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef SUBJ_EXTF80_TO_F32
+ case EXTF80_TO_F32:
+ test_a_extF80_z_f32(
+ extF80M_to_f32, (funcType_a_extF80_z_f32 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_EXTF80_TO_F64
+ case EXTF80_TO_F64:
+ test_a_extF80_z_f64(
+ extF80M_to_f64, (funcType_a_extF80_z_f64 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef FLOAT128
+#ifdef SUBJ_EXTF80_TO_F128
+ case EXTF80_TO_F128:
+ test_a_extF80_z_f128(
+ extF80M_to_f128M, (funcType_a_extF80_z_f128 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+ case EXTF80_ROUNDTOINT:
+ test_az_extF80_rx(
+ extF80M_roundToInt, subjFunction_az_extF80_rx, roundingMode, exact
+ );
+ break;
+#ifdef SUBJ_EXTF80_ADD
+ case EXTF80_ADD:
+ trueFunction_abz_extF80 = extF80M_add;
+ goto test_abz_extF80;
+#endif
+#ifdef SUBJ_EXTF80_SUB
+ case EXTF80_SUB:
+ trueFunction_abz_extF80 = extF80M_sub;
+ goto test_abz_extF80;
+#endif
+#ifdef SUBJ_EXTF80_MUL
+ case EXTF80_MUL:
+ trueFunction_abz_extF80 = extF80M_mul;
+ goto test_abz_extF80;
+#endif
+#ifdef SUBJ_EXTF80_DIV
+ case EXTF80_DIV:
+ trueFunction_abz_extF80 = extF80M_div;
+ goto test_abz_extF80;
+#endif
+#ifdef SUBJ_EXTF80_REM
+ case EXTF80_REM:
+ trueFunction_abz_extF80 = extF80M_rem;
+ goto test_abz_extF80;
+#endif
+ test_abz_extF80:
+ test_abz_extF80(
+ trueFunction_abz_extF80, (funcType_abz_extF80 *) subjFunctionPtr );
+ break;
+#ifdef SUBJ_EXTF80_SQRT
+ case EXTF80_SQRT:
+ test_az_extF80( extF80M_sqrt, (funcType_az_extF80 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef SUBJ_EXTF80_EQ
+ case EXTF80_EQ:
+ trueFunction_ab_extF80_z_bool = extF80M_eq;
+ goto test_ab_extF80_z_bool;
+#endif
+#ifdef SUBJ_EXTF80_LE
+ case EXTF80_LE:
+ trueFunction_ab_extF80_z_bool = extF80M_le;
+ goto test_ab_extF80_z_bool;
+#endif
+#ifdef SUBJ_EXTF80_LT
+ case EXTF80_LT:
+ trueFunction_ab_extF80_z_bool = extF80M_lt;
+ goto test_ab_extF80_z_bool;
+#endif
+#ifdef SUBJ_EXTF80_EQ_SIGNALING
+ case EXTF80_EQ_SIGNALING:
+ trueFunction_ab_extF80_z_bool = extF80M_eq_signaling;
+ goto test_ab_extF80_z_bool;
+#endif
+#ifdef SUBJ_EXTF80_LE_QUIET
+ case EXTF80_LE_QUIET:
+ trueFunction_ab_extF80_z_bool = extF80M_le_quiet;
+ goto test_ab_extF80_z_bool;
+#endif
+#ifdef SUBJ_EXTF80_LT_QUIET
+ case EXTF80_LT_QUIET:
+ trueFunction_ab_extF80_z_bool = extF80M_lt_quiet;
+ goto test_ab_extF80_z_bool;
+#endif
+ test_ab_extF80_z_bool:
+ test_ab_extF80_z_bool(
+ trueFunction_ab_extF80_z_bool,
+ (funcType_ab_extF80_z_bool *) subjFunctionPtr
+ );
+ break;
+#endif
+ /*--------------------------------------------------------------------
+ *--------------------------------------------------------------------*/
+#ifdef FLOAT128
+ case F128_TO_UI32:
+ test_a_f128_z_ui32_rx(
+ f128M_to_ui32, subjFunction_a_f128_z_ui32_rx, roundingMode, exact
+ );
+ break;
+ case F128_TO_UI64:
+ test_a_f128_z_ui64_rx(
+ f128M_to_ui64, subjFunction_a_f128_z_ui64_rx, roundingMode, exact
+ );
+ break;
+ case F128_TO_I32:
+ test_a_f128_z_i32_rx(
+ f128M_to_i32, subjFunction_a_f128_z_i32_rx, roundingMode, exact );
+ break;
+ case F128_TO_I64:
+ test_a_f128_z_i64_rx(
+ f128M_to_i64, subjFunction_a_f128_z_i64_rx, roundingMode, exact );
+ break;
+#ifdef FLOAT16
+#ifdef SUBJ_F128_TO_F16
+ case F128_TO_F16:
+ test_a_f128_z_f16(
+ f128M_to_f16, (funcType_a_f128_z_f16 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef SUBJ_F128_TO_F32
+ case F128_TO_F32:
+ test_a_f128_z_f32(
+ f128M_to_f32, (funcType_a_f128_z_f32 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef FLOAT64
+#ifdef SUBJ_F128_TO_F64
+ case F128_TO_F64:
+ test_a_f128_z_f64(
+ f128M_to_f64, (funcType_a_f128_z_f64 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+#ifdef EXTFLOAT80
+#ifdef SUBJ_F128_TO_EXTF80
+ case F128_TO_EXTF80:
+ test_a_f128_z_extF80(
+ f128M_to_extF80M, (funcType_a_f128_z_extF80 *) subjFunctionPtr );
+ break;
+#endif
+#endif
+ case F128_ROUNDTOINT:
+ test_az_f128_rx(
+ f128M_roundToInt, subjFunction_az_f128_rx, roundingMode, exact );
+ break;
+#ifdef SUBJ_F128_ADD
+ case F128_ADD:
+ trueFunction_abz_f128 = f128M_add;
+ goto test_abz_f128;
+#endif
+#ifdef SUBJ_F128_SUB
+ case F128_SUB:
+ trueFunction_abz_f128 = f128M_sub;
+ goto test_abz_f128;
+#endif
+#ifdef SUBJ_F128_MUL
+ case F128_MUL:
+ trueFunction_abz_f128 = f128M_mul;
+ goto test_abz_f128;
+#endif
+#ifdef SUBJ_F128_MULADD
+ case F128_MULADD:
+ test_abcz_f128( f128M_mulAdd, (funcType_abcz_f128 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef SUBJ_F128_DIV
+ case F128_DIV:
+ trueFunction_abz_f128 = f128M_div;
+ goto test_abz_f128;
+#endif
+#ifdef SUBJ_F128_REM
+ case F128_REM:
+ trueFunction_abz_f128 = f128M_rem;
+ goto test_abz_f128;
+#endif
+ test_abz_f128:
+ test_abz_f128(
+ trueFunction_abz_f128, (funcType_abz_f128 *) subjFunctionPtr );
+ break;
+#ifdef SUBJ_F128_SQRT
+ case F128_SQRT:
+ test_az_f128( f128M_sqrt, (funcType_az_f128 *) subjFunctionPtr );
+ break;
+#endif
+#ifdef SUBJ_F128_EQ
+ case F128_EQ:
+ trueFunction_ab_f128_z_bool = f128M_eq;
+ goto test_ab_f128_z_bool;
+#endif
+#ifdef SUBJ_F128_LE
+ case F128_LE:
+ trueFunction_ab_f128_z_bool = f128M_le;
+ goto test_ab_f128_z_bool;
+#endif
+#ifdef SUBJ_F128_LT
+ case F128_LT:
+ trueFunction_ab_f128_z_bool = f128M_lt;
+ goto test_ab_f128_z_bool;
+#endif
+#ifdef SUBJ_F128_EQ_SIGNALING
+ case F128_EQ_SIGNALING:
+ trueFunction_ab_f128_z_bool = f128M_eq_signaling;
+ goto test_ab_f128_z_bool;
+#endif
+#ifdef SUBJ_F128_LE_QUIET
+ case F128_LE_QUIET:
+ trueFunction_ab_f128_z_bool = f128M_le_quiet;
+ goto test_ab_f128_z_bool;
+#endif
+#ifdef SUBJ_F128_LT_QUIET
+ case F128_LT_QUIET:
+ trueFunction_ab_f128_z_bool = f128M_lt_quiet;
+ goto test_ab_f128_z_bool;
+#endif
+ test_ab_f128_z_bool:
+ test_ab_f128_z_bool(
+ trueFunction_ab_f128_z_bool,
+ (funcType_ab_f128_z_bool *) subjFunctionPtr
+ );
+ break;
+#endif
+ }
+ if ( (verCases_errorStop && verCases_anyErrors) || verCases_stop ) {
+ verCases_exitWithStatus();
+ }
+
+}
+
+static
+void
+ testFunction(
+ const struct standardFunctionInfo *standardFunctionInfoPtr,
+ uint_fast8_t roundingPrecisionIn,
+ int roundingCodeIn
+ )
+{
+ int functionCode, functionAttribs;
+ bool standardFunctionHasFixedRounding;
+ int roundingCode;
+ bool exact;
+ uint_fast8_t roundingPrecision, roundingMode = 0;
+
+ functionCode = standardFunctionInfoPtr->functionCode;
+ functionAttribs = functionInfos[functionCode].attribs;
+ standardFunctionHasFixedRounding = false;
+ if ( functionAttribs & FUNC_ARG_ROUNDINGMODE ) {
+ roundingCode = standardFunctionInfoPtr->roundingCode;
+ if ( roundingCode ) {
+ standardFunctionHasFixedRounding = true;
+ roundingCodeIn = roundingCode;
+ }
+ }
+ exact = standardFunctionInfoPtr->exact;
+ verCases_functionNamePtr = standardFunctionInfoPtr->namePtr;
+ roundingPrecision = 32;
+ for (;;) {
+ if ( functionAttribs & FUNC_EFF_ROUNDINGPRECISION ) {
+ if ( roundingPrecisionIn ) roundingPrecision = roundingPrecisionIn;
+ } else {
+ roundingPrecision = 0;
+ }
+#ifdef EXTFLOAT80
+ verCases_roundingPrecision = roundingPrecision;
+ if ( roundingPrecision ) {
+ extF80_roundingPrecision = roundingPrecision;
+ subjfloat_setExtF80RoundingPrecision( roundingPrecision );
+ }
+#endif
+ for (
+ roundingCode = 1; roundingCode < NUM_ROUNDINGMODES; ++roundingCode
+ ) {
+#ifndef SUBJFLOAT_ROUND_NEAR_MAXMAG
+ if ( roundingCode != ROUND_NEAR_MAXMAG ) {
+#endif
+#if defined FLOAT_ROUND_ODD && ! defined SUBJFLOAT_ROUND_NEAR_MAXMAG
+ if ( roundingCode != ROUND_ODD ) {
+#endif
+ if (
+ functionAttribs
+ & (FUNC_ARG_ROUNDINGMODE | FUNC_EFF_ROUNDINGMODE)
+ ) {
+ if ( roundingCodeIn ) roundingCode = roundingCodeIn;
+ } else {
+ roundingCode = 0;
+ }
+ verCases_roundingCode =
+ standardFunctionHasFixedRounding ? 0 : roundingCode;
+ if ( roundingCode ) {
+ roundingMode = roundingModes[roundingCode];
+ softfloat_roundingMode = roundingMode;
+ if ( ! standardFunctionHasFixedRounding ) {
+ subjfloat_setRoundingMode( roundingMode );
+ }
+ }
+ testFunctionInstance( functionCode, roundingMode, exact );
+ if ( roundingCodeIn || ! roundingCode ) break;
+#if defined FLOAT_ROUND_ODD && ! defined SUBJFLOAT_ROUND_NEAR_MAXMAG
+ }
+#endif
+#ifndef SUBJFLOAT_ROUND_NEAR_MAXMAG
+ }
+#endif
+ }
+ if ( roundingPrecisionIn || ! roundingPrecision ) break;
+ if ( roundingPrecision == 80 ) {
+ break;
+ } else if ( roundingPrecision == 64 ) {
+ roundingPrecision = 80;
+ } else if ( roundingPrecision == 32 ) {
+ roundingPrecision = 64;
+ }
+ }
+
+}
+
+int main( int argc, char *argv[] )
+{
+ bool haveFunctionArg;
+ const struct standardFunctionInfo *standardFunctionInfoPtr;
+ int numOperands;
+ uint_fast8_t roundingPrecision;
+ int roundingCode;
+ const char *argPtr;
+ void (*const *subjFunctionPtrPtr)();
+ const char *functionNamePtr;
+ unsigned long ui;
+ long i;
+ int functionMatchAttrib;
+
+ /*------------------------------------------------------------------------
+ *------------------------------------------------------------------------*/
+ fail_programName = "testfloat";
+ if ( argc <= 1 ) goto writeHelpMessage;
+ genCases_setLevel( 1 );
+ verCases_maxErrorCount = 20;
+ testLoops_trueFlagsPtr = &softfloat_exceptionFlags;
+ testLoops_subjFlagsFunction = subjfloat_clearExceptionFlags;
+ haveFunctionArg = false;
+ standardFunctionInfoPtr = 0;
+ numOperands = 0;
+ roundingPrecision = 0;
+ roundingCode = 0;
+ for (;;) {
+ --argc;
+ if ( ! argc ) break;
+ argPtr = *++argv;
+ if ( ! argPtr ) break;
+ if ( argPtr[0] == '-' ) ++argPtr;
+ if (
+ ! strcmp( argPtr, "help" ) || ! strcmp( argPtr, "-help" )
+ || ! strcmp( argPtr, "h" )
+ ) {
+ writeHelpMessage:
+ fputs(
+"testfloat [