[sim] made softfloat files C instead of C++
authorAndrew Waterman <waterman@s144.Millennium.Berkeley.EDU>
Fri, 15 Oct 2010 23:17:53 +0000 (16:17 -0700)
committerAndrew Waterman <waterman@s144.Millennium.Berkeley.EDU>
Fri, 15 Oct 2010 23:17:53 +0000 (16:17 -0700)
222 files changed:
Makefile.in
softfloat/f32_add.c [new file with mode: 0755]
softfloat/f32_add.cc [deleted file]
softfloat/f32_div.c [new file with mode: 0755]
softfloat/f32_div.cc [deleted file]
softfloat/f32_eq.c [new file with mode: 0755]
softfloat/f32_eq.cc [deleted file]
softfloat/f32_eq_signaling.c [new file with mode: 0755]
softfloat/f32_eq_signaling.cc [deleted file]
softfloat/f32_isSignalingNaN.c [new file with mode: 0755]
softfloat/f32_isSignalingNaN.cc [deleted file]
softfloat/f32_le.c [new file with mode: 0755]
softfloat/f32_le.cc [deleted file]
softfloat/f32_le_quiet.c [new file with mode: 0755]
softfloat/f32_le_quiet.cc [deleted file]
softfloat/f32_lt.c [new file with mode: 0755]
softfloat/f32_lt.cc [deleted file]
softfloat/f32_lt_quiet.c [new file with mode: 0755]
softfloat/f32_lt_quiet.cc [deleted file]
softfloat/f32_mul.c [new file with mode: 0755]
softfloat/f32_mul.cc [deleted file]
softfloat/f32_mulAdd.c [new file with mode: 0755]
softfloat/f32_mulAdd.cc [deleted file]
softfloat/f32_rem.c [new file with mode: 0755]
softfloat/f32_rem.cc [deleted file]
softfloat/f32_roundToInt.c [new file with mode: 0755]
softfloat/f32_roundToInt.cc [deleted file]
softfloat/f32_sqrt.c [new file with mode: 0755]
softfloat/f32_sqrt.cc [deleted file]
softfloat/f32_sub.c [new file with mode: 0755]
softfloat/f32_sub.cc [deleted file]
softfloat/f32_to_f64.c [new file with mode: 0755]
softfloat/f32_to_f64.cc [deleted file]
softfloat/f32_to_i32.c [new file with mode: 0755]
softfloat/f32_to_i32.cc [deleted file]
softfloat/f32_to_i32_r_minMag.c [new file with mode: 0755]
softfloat/f32_to_i32_r_minMag.cc [deleted file]
softfloat/f32_to_i64.c [new file with mode: 0755]
softfloat/f32_to_i64.cc [deleted file]
softfloat/f32_to_i64_r_minMag.c [new file with mode: 0755]
softfloat/f32_to_i64_r_minMag.cc [deleted file]
softfloat/f32_to_ui32.c [new file with mode: 0755]
softfloat/f32_to_ui32.cc [deleted file]
softfloat/f32_to_ui32_r_minMag.c [new file with mode: 0755]
softfloat/f32_to_ui32_r_minMag.cc [deleted file]
softfloat/f32_to_ui64.c [new file with mode: 0755]
softfloat/f32_to_ui64.cc [deleted file]
softfloat/f32_to_ui64_r_minMag.c [new file with mode: 0755]
softfloat/f32_to_ui64_r_minMag.cc [deleted file]
softfloat/f64_add.c [new file with mode: 0755]
softfloat/f64_add.cc [deleted file]
softfloat/f64_div.c [new file with mode: 0755]
softfloat/f64_div.cc [deleted file]
softfloat/f64_eq.c [new file with mode: 0755]
softfloat/f64_eq.cc [deleted file]
softfloat/f64_eq_signaling.c [new file with mode: 0755]
softfloat/f64_eq_signaling.cc [deleted file]
softfloat/f64_isSignalingNaN.c [new file with mode: 0755]
softfloat/f64_isSignalingNaN.cc [deleted file]
softfloat/f64_le.c [new file with mode: 0755]
softfloat/f64_le.cc [deleted file]
softfloat/f64_le_quiet.c [new file with mode: 0755]
softfloat/f64_le_quiet.cc [deleted file]
softfloat/f64_lt.c [new file with mode: 0755]
softfloat/f64_lt.cc [deleted file]
softfloat/f64_lt_quiet.c [new file with mode: 0755]
softfloat/f64_lt_quiet.cc [deleted file]
softfloat/f64_mul.c [new file with mode: 0755]
softfloat/f64_mul.cc [deleted file]
softfloat/f64_mulAdd.c [new file with mode: 0755]
softfloat/f64_mulAdd.cc [deleted file]
softfloat/f64_rem.c [new file with mode: 0755]
softfloat/f64_rem.cc [deleted file]
softfloat/f64_roundToInt.c [new file with mode: 0755]
softfloat/f64_roundToInt.cc [deleted file]
softfloat/f64_sqrt.c [new file with mode: 0755]
softfloat/f64_sqrt.cc [deleted file]
softfloat/f64_sub.c [new file with mode: 0755]
softfloat/f64_sub.cc [deleted file]
softfloat/f64_to_f32.c [new file with mode: 0755]
softfloat/f64_to_f32.cc [deleted file]
softfloat/f64_to_i32.c [new file with mode: 0755]
softfloat/f64_to_i32.cc [deleted file]
softfloat/f64_to_i32_r_minMag.c [new file with mode: 0755]
softfloat/f64_to_i32_r_minMag.cc [deleted file]
softfloat/f64_to_i64.c [new file with mode: 0755]
softfloat/f64_to_i64.cc [deleted file]
softfloat/f64_to_i64_r_minMag.c [new file with mode: 0755]
softfloat/f64_to_i64_r_minMag.cc [deleted file]
softfloat/f64_to_ui32.c [new file with mode: 0755]
softfloat/f64_to_ui32.cc [deleted file]
softfloat/f64_to_ui32_r_minMag.c [new file with mode: 0755]
softfloat/f64_to_ui32_r_minMag.cc [deleted file]
softfloat/f64_to_ui64.c [new file with mode: 0755]
softfloat/f64_to_ui64.cc [deleted file]
softfloat/f64_to_ui64_r_minMag.c [new file with mode: 0755]
softfloat/f64_to_ui64_r_minMag.cc [deleted file]
softfloat/i32_to_f32.c [new file with mode: 0755]
softfloat/i32_to_f32.cc [deleted file]
softfloat/i32_to_f64.c [new file with mode: 0755]
softfloat/i32_to_f64.cc [deleted file]
softfloat/i64_to_f32.c [new file with mode: 0755]
softfloat/i64_to_f32.cc [deleted file]
softfloat/i64_to_f64.c [new file with mode: 0755]
softfloat/i64_to_f64.cc [deleted file]
softfloat/s_add128.c [new file with mode: 0755]
softfloat/s_add128.cc [deleted file]
softfloat/s_add192.c [new file with mode: 0755]
softfloat/s_add192.cc [deleted file]
softfloat/s_addMagsF32.c [new file with mode: 0755]
softfloat/s_addMagsF32.cc [deleted file]
softfloat/s_addMagsF64.c [new file with mode: 0755]
softfloat/s_addMagsF64.cc [deleted file]
softfloat/s_countLeadingZeros32.c [new file with mode: 0755]
softfloat/s_countLeadingZeros32.cc [deleted file]
softfloat/s_countLeadingZeros64.c [new file with mode: 0755]
softfloat/s_countLeadingZeros64.cc [deleted file]
softfloat/s_countLeadingZeros8.c [new file with mode: 0755]
softfloat/s_countLeadingZeros8.cc [deleted file]
softfloat/s_eq128.c [new file with mode: 0755]
softfloat/s_eq128.cc [deleted file]
softfloat/s_estimateDiv128To64.c [new file with mode: 0755]
softfloat/s_estimateDiv128To64.cc [deleted file]
softfloat/s_estimateSqrt32.c [new file with mode: 0755]
softfloat/s_estimateSqrt32.cc [deleted file]
softfloat/s_le128.c [new file with mode: 0755]
softfloat/s_le128.cc [deleted file]
softfloat/s_lt128.c [new file with mode: 0755]
softfloat/s_lt128.cc [deleted file]
softfloat/s_mul128By64To192.c [new file with mode: 0755]
softfloat/s_mul128By64To192.cc [deleted file]
softfloat/s_mul128To256.c [new file with mode: 0755]
softfloat/s_mul128To256.cc [deleted file]
softfloat/s_mul64To128.c [new file with mode: 0755]
softfloat/s_mul64To128.cc [deleted file]
softfloat/s_mulAddF32.c [new file with mode: 0755]
softfloat/s_mulAddF32.cc [deleted file]
softfloat/s_mulAddF64.c [new file with mode: 0755]
softfloat/s_mulAddF64.cc [deleted file]
softfloat/s_normRoundPackToF32.c [new file with mode: 0755]
softfloat/s_normRoundPackToF32.cc [deleted file]
softfloat/s_normRoundPackToF64.c [new file with mode: 0755]
softfloat/s_normRoundPackToF64.cc [deleted file]
softfloat/s_normSubnormalF32Sig.c [new file with mode: 0755]
softfloat/s_normSubnormalF32Sig.cc [deleted file]
softfloat/s_normSubnormalF64Sig.c [new file with mode: 0755]
softfloat/s_normSubnormalF64Sig.cc [deleted file]
softfloat/s_roundPackToF32.c [new file with mode: 0755]
softfloat/s_roundPackToF32.cc [deleted file]
softfloat/s_roundPackToF64.c [new file with mode: 0755]
softfloat/s_roundPackToF64.cc [deleted file]
softfloat/s_roundPackToI32.c [new file with mode: 0755]
softfloat/s_roundPackToI32.cc [deleted file]
softfloat/s_roundPackToI64.c [new file with mode: 0755]
softfloat/s_roundPackToI64.cc [deleted file]
softfloat/s_roundPackToUI32.c [new file with mode: 0755]
softfloat/s_roundPackToUI32.cc [deleted file]
softfloat/s_roundPackToUI64.c [new file with mode: 0755]
softfloat/s_roundPackToUI64.cc [deleted file]
softfloat/s_shift128ExtraRightJam.c [new file with mode: 0755]
softfloat/s_shift128ExtraRightJam.cc [deleted file]
softfloat/s_shift128RightJam.c [new file with mode: 0755]
softfloat/s_shift128RightJam.cc [deleted file]
softfloat/s_shift32RightJam.c [new file with mode: 0755]
softfloat/s_shift32RightJam.cc [deleted file]
softfloat/s_shift64ExtraRightJam.c [new file with mode: 0755]
softfloat/s_shift64ExtraRightJam.cc [deleted file]
softfloat/s_shift64RightJam.c [new file with mode: 0755]
softfloat/s_shift64RightJam.cc [deleted file]
softfloat/s_shortShift128ExtraRightJam.c [new file with mode: 0755]
softfloat/s_shortShift128ExtraRightJam.cc [deleted file]
softfloat/s_shortShift128Left.c [new file with mode: 0755]
softfloat/s_shortShift128Left.cc [deleted file]
softfloat/s_shortShift128Right.c [new file with mode: 0755]
softfloat/s_shortShift128Right.cc [deleted file]
softfloat/s_shortShift192Left.c [new file with mode: 0755]
softfloat/s_shortShift192Left.cc [deleted file]
softfloat/s_shortShift32Right1Jam.c [new file with mode: 0755]
softfloat/s_shortShift32Right1Jam.cc [deleted file]
softfloat/s_shortShift64ExtraRightJam.c [new file with mode: 0755]
softfloat/s_shortShift64ExtraRightJam.cc [deleted file]
softfloat/s_shortShift64RightJam.c [new file with mode: 0755]
softfloat/s_shortShift64RightJam.cc [deleted file]
softfloat/s_sub128.c [new file with mode: 0755]
softfloat/s_sub128.cc [deleted file]
softfloat/s_sub192.c [new file with mode: 0755]
softfloat/s_sub192.cc [deleted file]
softfloat/s_subMagsF32.c [new file with mode: 0755]
softfloat/s_subMagsF32.cc [deleted file]
softfloat/s_subMagsF64.c [new file with mode: 0755]
softfloat/s_subMagsF64.cc [deleted file]
softfloat/softfloat.h
softfloat/softfloat.mk.in
softfloat/softfloat_state.c [new file with mode: 0755]
softfloat/softfloat_state.cc [deleted file]
softfloat/ui32_to_f32.c [new file with mode: 0755]
softfloat/ui32_to_f32.cc [deleted file]
softfloat/ui32_to_f64.c [new file with mode: 0755]
softfloat/ui32_to_f64.cc [deleted file]
softfloat/ui64_to_f32.c [new file with mode: 0755]
softfloat/ui64_to_f32.cc [deleted file]
softfloat/ui64_to_f64.c [new file with mode: 0755]
softfloat/ui64_to_f64.cc [deleted file]
softfloat_riscv/s_commonNaNToF32UI.c [new file with mode: 0755]
softfloat_riscv/s_commonNaNToF32UI.cc [deleted file]
softfloat_riscv/s_commonNaNToF64UI.c [new file with mode: 0755]
softfloat_riscv/s_commonNaNToF64UI.cc [deleted file]
softfloat_riscv/s_f32UIToCommonNaN.c [new file with mode: 0755]
softfloat_riscv/s_f32UIToCommonNaN.cc [deleted file]
softfloat_riscv/s_f64UIToCommonNaN.c [new file with mode: 0755]
softfloat_riscv/s_f64UIToCommonNaN.cc [deleted file]
softfloat_riscv/s_isSigNaNF32UI.c [new file with mode: 0755]
softfloat_riscv/s_isSigNaNF32UI.cc [deleted file]
softfloat_riscv/s_isSigNaNF64UI.c [new file with mode: 0755]
softfloat_riscv/s_isSigNaNF64UI.cc [deleted file]
softfloat_riscv/s_propagateNaNF32UI.c [new file with mode: 0755]
softfloat_riscv/s_propagateNaNF32UI.cc [deleted file]
softfloat_riscv/s_propagateNaNF64UI.c [new file with mode: 0755]
softfloat_riscv/s_propagateNaNF64UI.cc [deleted file]
softfloat_riscv/softfloat_raiseFlags.c [new file with mode: 0755]
softfloat_riscv/softfloat_raiseFlags.cc [deleted file]
softfloat_riscv/softfloat_riscv.mk.in

index c4279a5b7c0da3f807f7d2a44bc6f628d4be042b..53dfb60c37c83f16f4be15632db32185cb82a36a 100644 (file)
@@ -82,11 +82,14 @@ VPATH := $(addprefix $(src_dir)/, $(sprojs_enabled))
 #  - CPPFLAGS : flags for the preprocessor (eg. -I,-D)
 #  - CXXFLAGS : flags for C++ compiler (eg. -Wall,-g,-O3)
 
+CC            := @CC@
 CXX           := @CXX@
 CPPFLAGS      := @CPPFLAGS@
 CXXFLAGS      := @CXXFLAGS@
 COMPILE       := $(CXX) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) \
                  $(sprojs_include)
+COMPILE_C     := $(CC)  -MMD -MP $(CPPFLAGS) $(CXXFLAGS) \
+                 $(sprojs_include)
 # Linker
 #  - LDFLAGS : Flags for the linker (eg. -L)
 #  - LIBS    : Library flags (eg. -l)
@@ -169,7 +172,7 @@ define subproject_template
 # system will create a library for this subproject with just the
 # corresponding dummy object file.
 
-ifeq ($$(strip $$($(2)_srcs)),)
+ifeq ($$(strip $$($(2)_srcs) $$($(2)_c_srcs)),)
 $(2)_srcs += _$(1).cc
 $(2)_junk += _$(1).cc
 endif
@@ -180,15 +183,19 @@ _$(1).cc :
 # Build the object files for this subproject
 
 $(2)_objs := $$(patsubst %.cc, %.o, $$($(2)_srcs))
+$(2)_c_objs := $$(patsubst %.c, %.o, $$($(2)_c_srcs))
 $(2)_deps := $$(patsubst %.o, %.d, $$($(2)_objs))
+$(2)_c_deps := $$(patsubst %.o, %.d, $$($(2)_c_objs))
 $$($(2)_objs) : %.o : %.cc
        $(COMPILE) -c $$<
+$$($(2)_c_objs) : %.o : %.c
+       $(COMPILE_C) -c $$<
 
-$(2)_junk += $$($(2)_objs) $$($(2)_deps)
+$(2)_junk += $$($(2)_objs) $$($(2)_c_objs) $$($(2)_deps) $$($(2)_c_deps)
 
 # Build a library for this subproject
 
-lib$(1).a : $$($(2)_objs)
+lib$(1).a : $$($(2)_objs) $$($(2)_c_objs)
        $(AR) rcv $$@ $$^
        $(RANLIB) $$@
 
diff --git a/softfloat/f32_add.c b/softfloat/f32_add.c
new file mode 100755 (executable)
index 0000000..dc53d68
--- /dev/null
@@ -0,0 +1,29 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float32_t f32_add( float32_t a, float32_t b )
+{
+    union ui32_f32 uA;
+    uint_fast32_t uiA;
+    bool signA;
+    union ui32_f32 uB;
+    uint_fast32_t uiB;
+    bool signB;
+    float32_t ( *magsRoutine )( uint_fast32_t, uint_fast32_t, bool );
+
+    uA.f = a;
+    uiA = uA.ui;
+    signA = signF32UI( uiA );
+    uB.f = b;
+    uiB = uB.ui;
+    signB = signF32UI( uiB );
+    magsRoutine =
+        ( signA == signB ) ? softfloat_addMagsF32 : softfloat_subMagsF32;
+    return magsRoutine( uiA, uiB, signA );
+
+}
+
diff --git a/softfloat/f32_add.cc b/softfloat/f32_add.cc
deleted file mode 100755 (executable)
index dc53d68..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "internals.h"
-#include "softfloat.h"
-
-float32_t f32_add( float32_t a, float32_t b )
-{
-    union ui32_f32 uA;
-    uint_fast32_t uiA;
-    bool signA;
-    union ui32_f32 uB;
-    uint_fast32_t uiB;
-    bool signB;
-    float32_t ( *magsRoutine )( uint_fast32_t, uint_fast32_t, bool );
-
-    uA.f = a;
-    uiA = uA.ui;
-    signA = signF32UI( uiA );
-    uB.f = b;
-    uiB = uB.ui;
-    signB = signF32UI( uiB );
-    magsRoutine =
-        ( signA == signB ) ? softfloat_addMagsF32 : softfloat_subMagsF32;
-    return magsRoutine( uiA, uiB, signA );
-
-}
-
diff --git a/softfloat/f32_div.c b/softfloat/f32_div.c
new file mode 100755 (executable)
index 0000000..958b140
--- /dev/null
@@ -0,0 +1,96 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float32_t f32_div( float32_t a, float32_t b )
+{
+    union ui32_f32 uA;
+    uint_fast32_t uiA;
+    bool signA;
+    int_fast16_t expA;
+    uint_fast32_t sigA;
+    union ui32_f32 uB;
+    uint_fast32_t uiB;
+    bool signB;
+    int_fast16_t expB;
+    uint_fast32_t sigB;
+    bool signZ;
+    struct exp16_sig32 normExpSig;
+    int_fast16_t expZ;
+    uint_fast32_t sigZ;
+    uint_fast32_t uiZ;
+    union ui32_f32 uZ;
+
+    uA.f = a;
+    uiA = uA.ui;
+    signA = signF32UI( uiA );
+    expA = expF32UI( uiA );
+    sigA = fracF32UI( uiA );
+    uB.f = b;
+    uiB = uB.ui;
+    signB = signF32UI( uiB );
+    expB = expF32UI( uiB );
+    sigB = fracF32UI( uiB );
+    signZ = signA ^ signB;
+    if ( expA == 0xFF ) {
+        if ( sigA ) goto propagateNaN;
+        if ( expB == 0xFF ) {
+            if ( sigB ) goto propagateNaN;
+            goto invalid;
+        }
+        goto infinity;
+    }
+    if ( expB == 0xFF ) {
+        if ( sigB ) goto propagateNaN;
+        goto zero;
+    }
+    if ( ! expB ) {
+        if ( ! sigB ) {
+            if ( ! ( expA | sigA ) ) goto invalid;
+            softfloat_raiseFlags( softfloat_flag_infinity );
+            goto infinity;
+        }
+        normExpSig = softfloat_normSubnormalF32Sig( sigB );
+        expB = normExpSig.exp;
+        sigB = normExpSig.sig;
+    }
+    if ( ! expA ) {
+        if ( ! sigA ) goto zero;
+        normExpSig = softfloat_normSubnormalF32Sig( sigA );
+        expA = normExpSig.exp;
+        sigA = normExpSig.sig;
+    }
+    expZ = expA - expB + 0x7D;
+    sigA = ( sigA | 0x00800000 )<<7;
+    sigB = ( sigB | 0x00800000 )<<8;
+    if ( sigB <= ( sigA + sigA ) ) {
+        ++expZ;
+        sigA >>= 1;
+    }
+    sigZ = ( (uint_fast64_t) sigA<<32 ) / sigB;
+    if ( ! ( sigZ & 0x3F ) ) {
+        sigZ |= ( (uint_fast64_t) sigB * sigZ != (uint_fast64_t) sigA<<32 );
+    }
+    return softfloat_roundPackToF32( signZ, expZ, sigZ );
+ propagateNaN:
+    uiZ = softfloat_propagateNaNF32UI( uiA, uiB );
+    goto uiZ;
+ invalid:
+    softfloat_raiseFlags( softfloat_flag_invalid );
+    uiZ = defaultNaNF32UI;
+    goto uiZ;
+ infinity:
+    uiZ = packToF32UI( signZ, 0xFF, 0 );
+    goto uiZ;
+ zero:
+    uiZ = packToF32UI( signZ, 0, 0 );
+ uiZ:
+    uZ.ui = uiZ;
+    return uZ.f;
+
+}
+
diff --git a/softfloat/f32_div.cc b/softfloat/f32_div.cc
deleted file mode 100755 (executable)
index 958b140..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "internals.h"
-#include "specialize.h"
-#include "softfloat.h"
-
-float32_t f32_div( float32_t a, float32_t b )
-{
-    union ui32_f32 uA;
-    uint_fast32_t uiA;
-    bool signA;
-    int_fast16_t expA;
-    uint_fast32_t sigA;
-    union ui32_f32 uB;
-    uint_fast32_t uiB;
-    bool signB;
-    int_fast16_t expB;
-    uint_fast32_t sigB;
-    bool signZ;
-    struct exp16_sig32 normExpSig;
-    int_fast16_t expZ;
-    uint_fast32_t sigZ;
-    uint_fast32_t uiZ;
-    union ui32_f32 uZ;
-
-    uA.f = a;
-    uiA = uA.ui;
-    signA = signF32UI( uiA );
-    expA = expF32UI( uiA );
-    sigA = fracF32UI( uiA );
-    uB.f = b;
-    uiB = uB.ui;
-    signB = signF32UI( uiB );
-    expB = expF32UI( uiB );
-    sigB = fracF32UI( uiB );
-    signZ = signA ^ signB;
-    if ( expA == 0xFF ) {
-        if ( sigA ) goto propagateNaN;
-        if ( expB == 0xFF ) {
-            if ( sigB ) goto propagateNaN;
-            goto invalid;
-        }
-        goto infinity;
-    }
-    if ( expB == 0xFF ) {
-        if ( sigB ) goto propagateNaN;
-        goto zero;
-    }
-    if ( ! expB ) {
-        if ( ! sigB ) {
-            if ( ! ( expA | sigA ) ) goto invalid;
-            softfloat_raiseFlags( softfloat_flag_infinity );
-            goto infinity;
-        }
-        normExpSig = softfloat_normSubnormalF32Sig( sigB );
-        expB = normExpSig.exp;
-        sigB = normExpSig.sig;
-    }
-    if ( ! expA ) {
-        if ( ! sigA ) goto zero;
-        normExpSig = softfloat_normSubnormalF32Sig( sigA );
-        expA = normExpSig.exp;
-        sigA = normExpSig.sig;
-    }
-    expZ = expA - expB + 0x7D;
-    sigA = ( sigA | 0x00800000 )<<7;
-    sigB = ( sigB | 0x00800000 )<<8;
-    if ( sigB <= ( sigA + sigA ) ) {
-        ++expZ;
-        sigA >>= 1;
-    }
-    sigZ = ( (uint_fast64_t) sigA<<32 ) / sigB;
-    if ( ! ( sigZ & 0x3F ) ) {
-        sigZ |= ( (uint_fast64_t) sigB * sigZ != (uint_fast64_t) sigA<<32 );
-    }
-    return softfloat_roundPackToF32( signZ, expZ, sigZ );
- propagateNaN:
-    uiZ = softfloat_propagateNaNF32UI( uiA, uiB );
-    goto uiZ;
- invalid:
-    softfloat_raiseFlags( softfloat_flag_invalid );
-    uiZ = defaultNaNF32UI;
-    goto uiZ;
- infinity:
-    uiZ = packToF32UI( signZ, 0xFF, 0 );
-    goto uiZ;
- zero:
-    uiZ = packToF32UI( signZ, 0, 0 );
- uiZ:
-    uZ.ui = uiZ;
-    return uZ.f;
-
-}
-
diff --git a/softfloat/f32_eq.c b/softfloat/f32_eq.c
new file mode 100755 (executable)
index 0000000..8f2306b
--- /dev/null
@@ -0,0 +1,34 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool f32_eq( float32_t a, float32_t b )
+{
+    union ui32_f32 uA;
+    uint_fast32_t uiA;
+    union ui32_f32 uB;
+    uint_fast32_t uiB;
+
+    uA.f = a;
+    uiA = uA.ui;
+    uB.f = b;
+    uiB = uB.ui;
+    if (
+           ( ( expF32UI( uiA ) == 0xFF ) && fracF32UI( uiA ) )
+        || ( ( expF32UI( uiB ) == 0xFF ) && fracF32UI( uiB ) )
+    ) {
+        if (
+            softfloat_isSigNaNF32UI( uiA ) || softfloat_isSigNaNF32UI( uiB )
+        ) {
+            softfloat_raiseFlags( softfloat_flag_invalid );
+        }
+        return false;
+    }
+    return ( uiA == uiB ) || ! (uint32_t) ( ( uiA | uiB )<<1 );
+
+}
+
diff --git a/softfloat/f32_eq.cc b/softfloat/f32_eq.cc
deleted file mode 100755 (executable)
index 8f2306b..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "internals.h"
-#include "specialize.h"
-#include "softfloat.h"
-
-bool f32_eq( float32_t a, float32_t b )
-{
-    union ui32_f32 uA;
-    uint_fast32_t uiA;
-    union ui32_f32 uB;
-    uint_fast32_t uiB;
-
-    uA.f = a;
-    uiA = uA.ui;
-    uB.f = b;
-    uiB = uB.ui;
-    if (
-           ( ( expF32UI( uiA ) == 0xFF ) && fracF32UI( uiA ) )
-        || ( ( expF32UI( uiB ) == 0xFF ) && fracF32UI( uiB ) )
-    ) {
-        if (
-            softfloat_isSigNaNF32UI( uiA ) || softfloat_isSigNaNF32UI( uiB )
-        ) {
-            softfloat_raiseFlags( softfloat_flag_invalid );
-        }
-        return false;
-    }
-    return ( uiA == uiB ) || ! (uint32_t) ( ( uiA | uiB )<<1 );
-
-}
-
diff --git a/softfloat/f32_eq_signaling.c b/softfloat/f32_eq_signaling.c
new file mode 100755 (executable)
index 0000000..bfba48a
--- /dev/null
@@ -0,0 +1,29 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+bool f32_eq_signaling( float32_t a, float32_t b )
+{
+    union ui32_f32 uA;
+    uint_fast32_t uiA;
+    union ui32_f32 uB;
+    uint_fast32_t uiB;
+
+    uA.f = a;
+    uiA = uA.ui;
+    uB.f = b;
+    uiB = uB.ui;
+    if (
+           ( ( expF32UI( uiA ) == 0xFF ) && fracF32UI( uiA ) )
+        || ( ( expF32UI( uiB ) == 0xFF ) && fracF32UI( uiB ) )
+    ) {
+        softfloat_raiseFlags( softfloat_flag_invalid );
+        return false;
+    }
+    return ( uiA == uiB ) || ! (uint32_t) ( ( uiA | uiB )<<1 );
+
+}
+
diff --git a/softfloat/f32_eq_signaling.cc b/softfloat/f32_eq_signaling.cc
deleted file mode 100755 (executable)
index bfba48a..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "internals.h"
-#include "softfloat.h"
-
-bool f32_eq_signaling( float32_t a, float32_t b )
-{
-    union ui32_f32 uA;
-    uint_fast32_t uiA;
-    union ui32_f32 uB;
-    uint_fast32_t uiB;
-
-    uA.f = a;
-    uiA = uA.ui;
-    uB.f = b;
-    uiB = uB.ui;
-    if (
-           ( ( expF32UI( uiA ) == 0xFF ) && fracF32UI( uiA ) )
-        || ( ( expF32UI( uiB ) == 0xFF ) && fracF32UI( uiB ) )
-    ) {
-        softfloat_raiseFlags( softfloat_flag_invalid );
-        return false;
-    }
-    return ( uiA == uiB ) || ! (uint32_t) ( ( uiA | uiB )<<1 );
-
-}
-
diff --git a/softfloat/f32_isSignalingNaN.c b/softfloat/f32_isSignalingNaN.c
new file mode 100755 (executable)
index 0000000..09aaa82
--- /dev/null
@@ -0,0 +1,16 @@
+
+#include <stdbool.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool f32_isSignalingNaN( float32_t a )
+{
+    union ui32_f32 uA;
+
+    uA.f = a;
+    return softfloat_isSigNaNF32UI( uA.ui );
+
+}
+
diff --git a/softfloat/f32_isSignalingNaN.cc b/softfloat/f32_isSignalingNaN.cc
deleted file mode 100755 (executable)
index 09aaa82..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-
-#include <stdbool.h>
-#include "platform.h"
-#include "internals.h"
-#include "specialize.h"
-#include "softfloat.h"
-
-bool f32_isSignalingNaN( float32_t a )
-{
-    union ui32_f32 uA;
-
-    uA.f = a;
-    return softfloat_isSigNaNF32UI( uA.ui );
-
-}
-
diff --git a/softfloat/f32_le.c b/softfloat/f32_le.c
new file mode 100755 (executable)
index 0000000..5f47be5
--- /dev/null
@@ -0,0 +1,34 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+bool f32_le( float32_t a, float32_t b )
+{
+    union ui32_f32 uA;
+    uint_fast32_t uiA;
+    union ui32_f32 uB;
+    uint_fast32_t uiB;
+    bool signA, signB;
+
+    uA.f = a;
+    uiA = uA.ui;
+    uB.f = b;
+    uiB = uB.ui;
+    if (
+           ( ( expF32UI( uiA ) == 0xFF ) && fracF32UI( uiA ) )
+        || ( ( expF32UI( uiB ) == 0xFF ) && fracF32UI( uiB ) )
+    ) {
+        softfloat_raiseFlags( softfloat_flag_invalid );
+        return false;
+    }
+    signA = signF32UI( uiA );
+    signB = signF32UI( uiB );
+    return
+        ( signA != signB ) ? signA || ! (uint32_t) ( ( uiA | uiB )<<1 )
+            : ( uiA == uiB ) || ( signA ^ ( uiA < uiB ) );
+
+}
+
diff --git a/softfloat/f32_le.cc b/softfloat/f32_le.cc
deleted file mode 100755 (executable)
index 5f47be5..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "internals.h"
-#include "softfloat.h"
-
-bool f32_le( float32_t a, float32_t b )
-{
-    union ui32_f32 uA;
-    uint_fast32_t uiA;
-    union ui32_f32 uB;
-    uint_fast32_t uiB;
-    bool signA, signB;
-
-    uA.f = a;
-    uiA = uA.ui;
-    uB.f = b;
-    uiB = uB.ui;
-    if (
-           ( ( expF32UI( uiA ) == 0xFF ) && fracF32UI( uiA ) )
-        || ( ( expF32UI( uiB ) == 0xFF ) && fracF32UI( uiB ) )
-    ) {
-        softfloat_raiseFlags( softfloat_flag_invalid );
-        return false;
-    }
-    signA = signF32UI( uiA );
-    signB = signF32UI( uiB );
-    return
-        ( signA != signB ) ? signA || ! (uint32_t) ( ( uiA | uiB )<<1 )
-            : ( uiA == uiB ) || ( signA ^ ( uiA < uiB ) );
-
-}
-
diff --git a/softfloat/f32_le_quiet.c b/softfloat/f32_le_quiet.c
new file mode 100755 (executable)
index 0000000..2b541da
--- /dev/null
@@ -0,0 +1,39 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool f32_le_quiet( float32_t a, float32_t b )
+{
+    union ui32_f32 uA;
+    uint_fast32_t uiA;
+    union ui32_f32 uB;
+    uint_fast32_t uiB;
+    bool signA, signB;
+
+    uA.f = a;
+    uiA = uA.ui;
+    uB.f = b;
+    uiB = uB.ui;
+    if (
+           ( ( expF32UI( uiA ) == 0xFF ) && fracF32UI( uiA ) )
+        || ( ( expF32UI( uiB ) == 0xFF ) && fracF32UI( uiB ) )
+    ) {
+        if (
+            softfloat_isSigNaNF32UI( uiA ) || softfloat_isSigNaNF32UI( uiB )
+        ) {
+            softfloat_raiseFlags( softfloat_flag_invalid );
+        }
+        return false;
+    }
+    signA = signF32UI( uiA );
+    signB = signF32UI( uiB );
+    return
+        ( signA != signB ) ? signA || ! (uint32_t) ( ( uiA | uiB )<<1 )
+            : ( uiA == uiB ) || ( signA ^ ( uiA < uiB ) );
+
+}
+
diff --git a/softfloat/f32_le_quiet.cc b/softfloat/f32_le_quiet.cc
deleted file mode 100755 (executable)
index 2b541da..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "internals.h"
-#include "specialize.h"
-#include "softfloat.h"
-
-bool f32_le_quiet( float32_t a, float32_t b )
-{
-    union ui32_f32 uA;
-    uint_fast32_t uiA;
-    union ui32_f32 uB;
-    uint_fast32_t uiB;
-    bool signA, signB;
-
-    uA.f = a;
-    uiA = uA.ui;
-    uB.f = b;
-    uiB = uB.ui;
-    if (
-           ( ( expF32UI( uiA ) == 0xFF ) && fracF32UI( uiA ) )
-        || ( ( expF32UI( uiB ) == 0xFF ) && fracF32UI( uiB ) )
-    ) {
-        if (
-            softfloat_isSigNaNF32UI( uiA ) || softfloat_isSigNaNF32UI( uiB )
-        ) {
-            softfloat_raiseFlags( softfloat_flag_invalid );
-        }
-        return false;
-    }
-    signA = signF32UI( uiA );
-    signB = signF32UI( uiB );
-    return
-        ( signA != signB ) ? signA || ! (uint32_t) ( ( uiA | uiB )<<1 )
-            : ( uiA == uiB ) || ( signA ^ ( uiA < uiB ) );
-
-}
-
diff --git a/softfloat/f32_lt.c b/softfloat/f32_lt.c
new file mode 100755 (executable)
index 0000000..753b28a
--- /dev/null
@@ -0,0 +1,34 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+bool f32_lt( float32_t a, float32_t b )
+{
+    union ui32_f32 uA;
+    uint_fast32_t uiA;
+    union ui32_f32 uB;
+    uint_fast32_t uiB;
+    bool signA, signB;
+
+    uA.f = a;
+    uiA = uA.ui;
+    uB.f = b;
+    uiB = uB.ui;
+    if (
+           ( ( expF32UI( uiA ) == 0xFF ) && fracF32UI( uiA ) )
+        || ( ( expF32UI( uiB ) == 0xFF ) && fracF32UI( uiB ) )
+    ) {
+        softfloat_raiseFlags( softfloat_flag_invalid );
+        return false;
+    }
+    signA = signF32UI( uiA );
+    signB = signF32UI( uiB );
+    return
+        ( signA != signB ) ? signA && ( (uint32_t) ( ( uiA | uiB )<<1 ) != 0 )
+            : ( uiA != uiB ) && ( signA ^ ( uiA < uiB ) );
+
+}
+
diff --git a/softfloat/f32_lt.cc b/softfloat/f32_lt.cc
deleted file mode 100755 (executable)
index 753b28a..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "internals.h"
-#include "softfloat.h"
-
-bool f32_lt( float32_t a, float32_t b )
-{
-    union ui32_f32 uA;
-    uint_fast32_t uiA;
-    union ui32_f32 uB;
-    uint_fast32_t uiB;
-    bool signA, signB;
-
-    uA.f = a;
-    uiA = uA.ui;
-    uB.f = b;
-    uiB = uB.ui;
-    if (
-           ( ( expF32UI( uiA ) == 0xFF ) && fracF32UI( uiA ) )
-        || ( ( expF32UI( uiB ) == 0xFF ) && fracF32UI( uiB ) )
-    ) {
-        softfloat_raiseFlags( softfloat_flag_invalid );
-        return false;
-    }
-    signA = signF32UI( uiA );
-    signB = signF32UI( uiB );
-    return
-        ( signA != signB ) ? signA && ( (uint32_t) ( ( uiA | uiB )<<1 ) != 0 )
-            : ( uiA != uiB ) && ( signA ^ ( uiA < uiB ) );
-
-}
-
diff --git a/softfloat/f32_lt_quiet.c b/softfloat/f32_lt_quiet.c
new file mode 100755 (executable)
index 0000000..ecd90bf
--- /dev/null
@@ -0,0 +1,39 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool f32_lt_quiet( float32_t a, float32_t b )
+{
+    union ui32_f32 uA;
+    uint_fast32_t uiA;
+    union ui32_f32 uB;
+    uint_fast32_t uiB;
+    bool signA, signB;
+
+    uA.f = a;
+    uiA = uA.ui;
+    uB.f = b;
+    uiB = uB.ui;
+    if (
+           ( ( expF32UI( uiA ) == 0xFF ) && fracF32UI( uiA ) )
+        || ( ( expF32UI( uiB ) == 0xFF ) && fracF32UI( uiB ) )
+    ) {
+        if (
+            softfloat_isSigNaNF32UI( uiA ) || softfloat_isSigNaNF32UI( uiB )
+        ) {
+            softfloat_raiseFlags( softfloat_flag_invalid );
+        }
+        return false;
+    }
+    signA = signF32UI( uiA );
+    signB = signF32UI( uiB );
+    return
+        ( signA != signB ) ? signA && ( (uint32_t) ( ( uiA | uiB )<<1 ) != 0 )
+            : ( uiA != uiB ) && ( signA ^ ( uiA < uiB ) );
+
+}
+
diff --git a/softfloat/f32_lt_quiet.cc b/softfloat/f32_lt_quiet.cc
deleted file mode 100755 (executable)
index ecd90bf..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "internals.h"
-#include "specialize.h"
-#include "softfloat.h"
-
-bool f32_lt_quiet( float32_t a, float32_t b )
-{
-    union ui32_f32 uA;
-    uint_fast32_t uiA;
-    union ui32_f32 uB;
-    uint_fast32_t uiB;
-    bool signA, signB;
-
-    uA.f = a;
-    uiA = uA.ui;
-    uB.f = b;
-    uiB = uB.ui;
-    if (
-           ( ( expF32UI( uiA ) == 0xFF ) && fracF32UI( uiA ) )
-        || ( ( expF32UI( uiB ) == 0xFF ) && fracF32UI( uiB ) )
-    ) {
-        if (
-            softfloat_isSigNaNF32UI( uiA ) || softfloat_isSigNaNF32UI( uiB )
-        ) {
-            softfloat_raiseFlags( softfloat_flag_invalid );
-        }
-        return false;
-    }
-    signA = signF32UI( uiA );
-    signB = signF32UI( uiB );
-    return
-        ( signA != signB ) ? signA && ( (uint32_t) ( ( uiA | uiB )<<1 ) != 0 )
-            : ( uiA != uiB ) && ( signA ^ ( uiA < uiB ) );
-
-}
-
diff --git a/softfloat/f32_mul.c b/softfloat/f32_mul.c
new file mode 100755 (executable)
index 0000000..d49c1dd
--- /dev/null
@@ -0,0 +1,89 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+#include "specialize.h"\r
+#include "softfloat.h"\r
+\r
+float32_t f32_mul( float32_t a, float32_t b )\r
+{\r
+    union ui32_f32 uA;\r
+    uint_fast32_t uiA;\r
+    bool signA;\r
+    int_fast16_t expA;\r
+    uint_fast32_t sigA;\r
+    union ui32_f32 uB;\r
+    uint_fast32_t uiB;\r
+    bool signB;\r
+    int_fast16_t expB;\r
+    uint_fast32_t sigB;\r
+    bool signZ;\r
+    uint_fast32_t magBits;\r
+    struct exp16_sig32 normExpSig;\r
+    int_fast16_t expZ;\r
+    uint_fast32_t sigZ, uiZ;\r
+    union ui32_f32 uZ;\r
+\r
+    uA.f = a;\r
+    uiA = uA.ui;\r
+    signA = signF32UI( uiA );\r
+    expA = expF32UI( uiA );\r
+    sigA = fracF32UI( uiA );\r
+    uB.f = b;\r
+    uiB = uB.ui;\r
+    signB = signF32UI( uiB );\r
+    expB = expF32UI( uiB );\r
+    sigB = fracF32UI( uiB );\r
+    signZ = signA ^ signB;\r
+    if ( expA == 0xFF ) {\r
+        if ( sigA || ( ( expB == 0xFF ) && sigB ) ) goto propagateNaN;\r
+        magBits = expB | sigB;\r
+        goto infArg;\r
+    }\r
+    if ( expB == 0xFF ) {\r
+        if ( sigB ) goto propagateNaN;\r
+        magBits = expA | sigA;\r
+        goto infArg;\r
+    }\r
+    if ( ! expA ) {\r
+        if ( ! sigA ) goto zero;\r
+        normExpSig = softfloat_normSubnormalF32Sig( sigA );\r
+        expA = normExpSig.exp;\r
+        sigA = normExpSig.sig;\r
+    }\r
+    if ( ! expB ) {\r
+        if ( ! sigB ) goto zero;\r
+        normExpSig = softfloat_normSubnormalF32Sig( sigB );\r
+        expB = normExpSig.exp;\r
+        sigB = normExpSig.sig;\r
+    }\r
+    expZ = expA + expB - 0x7F;\r
+    sigA = ( sigA | 0x00800000 )<<7;\r
+    sigB = ( sigB | 0x00800000 )<<8;\r
+    sigZ = softfloat_shortShift64RightJam( (uint_fast64_t) sigA * sigB, 32 );\r
+    if ( sigZ < 0x40000000 ) {\r
+        --expZ;\r
+        sigZ <<= 1;\r
+    }\r
+    return softfloat_roundPackToF32( signZ, expZ, sigZ );\r
+ propagateNaN:\r
+    uiZ = softfloat_propagateNaNF32UI( uiA, uiB );\r
+    goto uiZ;\r
+ infArg:\r
+    if ( ! magBits ) {\r
+        softfloat_raiseFlags( softfloat_flag_invalid );\r
+        uiZ = defaultNaNF32UI;\r
+    } else {\r
+        uiZ = packToF32UI( signZ, 0xFF, 0 );\r
+    }\r
+    goto uiZ;\r
+ zero:\r
+    uiZ = packToF32UI( signZ, 0, 0 );\r
+ uiZ:\r
+    uZ.ui = uiZ;\r
+    return uZ.f;\r
+\r
+}\r
+\r
diff --git a/softfloat/f32_mul.cc b/softfloat/f32_mul.cc
deleted file mode 100755 (executable)
index d49c1dd..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-#include "specialize.h"\r
-#include "softfloat.h"\r
-\r
-float32_t f32_mul( float32_t a, float32_t b )\r
-{\r
-    union ui32_f32 uA;\r
-    uint_fast32_t uiA;\r
-    bool signA;\r
-    int_fast16_t expA;\r
-    uint_fast32_t sigA;\r
-    union ui32_f32 uB;\r
-    uint_fast32_t uiB;\r
-    bool signB;\r
-    int_fast16_t expB;\r
-    uint_fast32_t sigB;\r
-    bool signZ;\r
-    uint_fast32_t magBits;\r
-    struct exp16_sig32 normExpSig;\r
-    int_fast16_t expZ;\r
-    uint_fast32_t sigZ, uiZ;\r
-    union ui32_f32 uZ;\r
-\r
-    uA.f = a;\r
-    uiA = uA.ui;\r
-    signA = signF32UI( uiA );\r
-    expA = expF32UI( uiA );\r
-    sigA = fracF32UI( uiA );\r
-    uB.f = b;\r
-    uiB = uB.ui;\r
-    signB = signF32UI( uiB );\r
-    expB = expF32UI( uiB );\r
-    sigB = fracF32UI( uiB );\r
-    signZ = signA ^ signB;\r
-    if ( expA == 0xFF ) {\r
-        if ( sigA || ( ( expB == 0xFF ) && sigB ) ) goto propagateNaN;\r
-        magBits = expB | sigB;\r
-        goto infArg;\r
-    }\r
-    if ( expB == 0xFF ) {\r
-        if ( sigB ) goto propagateNaN;\r
-        magBits = expA | sigA;\r
-        goto infArg;\r
-    }\r
-    if ( ! expA ) {\r
-        if ( ! sigA ) goto zero;\r
-        normExpSig = softfloat_normSubnormalF32Sig( sigA );\r
-        expA = normExpSig.exp;\r
-        sigA = normExpSig.sig;\r
-    }\r
-    if ( ! expB ) {\r
-        if ( ! sigB ) goto zero;\r
-        normExpSig = softfloat_normSubnormalF32Sig( sigB );\r
-        expB = normExpSig.exp;\r
-        sigB = normExpSig.sig;\r
-    }\r
-    expZ = expA + expB - 0x7F;\r
-    sigA = ( sigA | 0x00800000 )<<7;\r
-    sigB = ( sigB | 0x00800000 )<<8;\r
-    sigZ = softfloat_shortShift64RightJam( (uint_fast64_t) sigA * sigB, 32 );\r
-    if ( sigZ < 0x40000000 ) {\r
-        --expZ;\r
-        sigZ <<= 1;\r
-    }\r
-    return softfloat_roundPackToF32( signZ, expZ, sigZ );\r
- propagateNaN:\r
-    uiZ = softfloat_propagateNaNF32UI( uiA, uiB );\r
-    goto uiZ;\r
- infArg:\r
-    if ( ! magBits ) {\r
-        softfloat_raiseFlags( softfloat_flag_invalid );\r
-        uiZ = defaultNaNF32UI;\r
-    } else {\r
-        uiZ = packToF32UI( signZ, 0xFF, 0 );\r
-    }\r
-    goto uiZ;\r
- zero:\r
-    uiZ = packToF32UI( signZ, 0, 0 );\r
- uiZ:\r
-    uZ.ui = uiZ;\r
-    return uZ.f;\r
-\r
-}\r
-\r
diff --git a/softfloat/f32_mulAdd.c b/softfloat/f32_mulAdd.c
new file mode 100755 (executable)
index 0000000..3d4cee9
--- /dev/null
@@ -0,0 +1,25 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+float32_t f32_mulAdd( float32_t a, float32_t b, float32_t c )\r
+{\r
+    union ui32_f32 uA;\r
+    uint_fast32_t uiA;\r
+    union ui32_f32 uB;\r
+    uint_fast32_t uiB;\r
+    union ui32_f32 uC;\r
+    uint_fast32_t uiC;\r
+\r
+    uA.f = a;\r
+    uiA = uA.ui;\r
+    uB.f = b;\r
+    uiB = uB.ui;\r
+    uC.f = c;\r
+    uiC = uC.ui;\r
+    return softfloat_mulAddF32( 0, uiA, uiB, uiC );\r
+\r
+}\r
+\r
diff --git a/softfloat/f32_mulAdd.cc b/softfloat/f32_mulAdd.cc
deleted file mode 100755 (executable)
index 3d4cee9..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-float32_t f32_mulAdd( float32_t a, float32_t b, float32_t c )\r
-{\r
-    union ui32_f32 uA;\r
-    uint_fast32_t uiA;\r
-    union ui32_f32 uB;\r
-    uint_fast32_t uiB;\r
-    union ui32_f32 uC;\r
-    uint_fast32_t uiC;\r
-\r
-    uA.f = a;\r
-    uiA = uA.ui;\r
-    uB.f = b;\r
-    uiB = uB.ui;\r
-    uC.f = c;\r
-    uiC = uC.ui;\r
-    return softfloat_mulAddF32( 0, uiA, uiB, uiC );\r
-\r
-}\r
-\r
diff --git a/softfloat/f32_rem.c b/softfloat/f32_rem.c
new file mode 100755 (executable)
index 0000000..d29b840
--- /dev/null
@@ -0,0 +1,124 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float32_t f32_rem( float32_t a, float32_t b )
+{
+    union ui32_f32 uA;
+    uint_fast32_t uiA;
+    bool signA;
+    int_fast16_t expA;
+    uint_fast32_t sigA;
+    union ui32_f32 uB;
+    uint_fast32_t uiB;
+    bool signB;
+    int_fast16_t expB;
+    uint_fast32_t sigB;
+    struct exp16_sig32 normExpSig;
+    int_fast16_t expDiff;
+    uint_fast32_t q;
+    uint_fast64_t sigA64, sigB64, q64;
+    uint_fast32_t alternateSigA;
+    uint32_t sigMean;
+    bool signZ;
+    uint_fast32_t uiZ;
+    union ui32_f32 uZ;
+
+    uA.f = a;
+    uiA = uA.ui;
+    signA = signF32UI( uiA );
+    expA = expF32UI( uiA );
+    sigA = fracF32UI( uiA );
+    uB.f = b;
+    uiB = uB.ui;
+    signB = signF32UI( uiB );
+    expB = expF32UI( uiB );
+    sigB = fracF32UI( uiB );
+    if ( expA == 0xFF ) {
+        if ( sigA || ( ( expB == 0xFF ) && sigB ) ) goto propagateNaN;
+        goto invalid;
+    }
+    if ( expB == 0xFF ) {
+        if ( sigB ) goto propagateNaN;
+        return a;
+    }
+    if ( ! expB ) {
+        if ( ! sigB ) goto invalid;
+        normExpSig = softfloat_normSubnormalF32Sig( sigB );
+        expB = normExpSig.exp;
+        sigB = normExpSig.sig;
+    }
+    if ( ! expA ) {
+        if ( ! sigA ) return a;
+        normExpSig = softfloat_normSubnormalF32Sig( sigA );
+        expA = normExpSig.exp;
+        sigA = normExpSig.sig;
+    }
+    expDiff = expA - expB;
+    sigA |= 0x00800000;
+    sigB |= 0x00800000;
+    if ( expDiff < 32 ) {
+        sigA <<= 8;
+        sigB <<= 8;
+        if ( expDiff < 0 ) {
+            if ( expDiff < -1 ) return a;
+            sigA >>= 1;
+        }
+        q = ( sigB <= sigA );
+        if ( q ) sigA -= sigB;
+        if ( 0 < expDiff ) {
+            q = ( (uint_fast64_t) sigA<<32 ) / sigB;
+            q >>= 32 - expDiff;
+            sigB >>= 2;
+            sigA = ( ( sigA>>1 )<<( expDiff - 1 ) ) - sigB * q;
+        } else {
+            sigA >>= 2;
+            sigB >>= 2;
+        }
+    } else {
+        if ( sigB <= sigA ) sigA -= sigB;
+        sigA64 = (uint_fast64_t) sigA<<40;
+        sigB64 = (uint_fast64_t) sigB<<40;
+        expDiff -= 64;
+        while ( 0 < expDiff ) {
+            q64 = softfloat_estimateDiv128To64( sigA64, 0, sigB64 );
+            q64 = ( 2 < q64 ) ? q64 - 2 : 0;
+            sigA64 = - ( ( sigB * q64 )<<38 );
+            expDiff -= 62;
+        }
+        expDiff += 64;
+        q64 = softfloat_estimateDiv128To64( sigA64, 0, sigB64 );
+        q64 = ( 2 < q64 ) ? q64 - 2 : 0;
+        q = q64>>( 64 - expDiff );
+        sigB <<= 6;
+        sigA = ( ( sigA64>>33 )<<( expDiff - 1 ) ) - sigB * q;
+    }
+    do {
+        alternateSigA = sigA;
+        ++q;
+        sigA -= sigB;
+    } while ( sigA < 0x80000000 );
+    sigMean = sigA + alternateSigA;
+    if ( ( 0x80000000 <= sigMean ) || ( ! sigMean && ( q & 1 ) ) ) {
+        sigA = alternateSigA;
+    }
+    signZ = ( 0x80000000 <= sigA );
+    if ( signZ ) sigA = - sigA;
+    return softfloat_normRoundPackToF32( signA ^ signZ, expB, sigA );
+ propagateNaN:
+    uiZ = softfloat_propagateNaNF32UI( uiA, uiB );
+    goto uiZ;
+ invalid:
+    softfloat_raiseFlags( softfloat_flag_invalid );
+    uiZ = defaultNaNF32UI;
+ uiZ:
+    uZ.ui = uiZ;
+    return uZ.f;
+
+}
+
diff --git a/softfloat/f32_rem.cc b/softfloat/f32_rem.cc
deleted file mode 100755 (executable)
index d29b840..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "primitives.h"
-#include "internals.h"
-#include "specialize.h"
-#include "softfloat.h"
-
-float32_t f32_rem( float32_t a, float32_t b )
-{
-    union ui32_f32 uA;
-    uint_fast32_t uiA;
-    bool signA;
-    int_fast16_t expA;
-    uint_fast32_t sigA;
-    union ui32_f32 uB;
-    uint_fast32_t uiB;
-    bool signB;
-    int_fast16_t expB;
-    uint_fast32_t sigB;
-    struct exp16_sig32 normExpSig;
-    int_fast16_t expDiff;
-    uint_fast32_t q;
-    uint_fast64_t sigA64, sigB64, q64;
-    uint_fast32_t alternateSigA;
-    uint32_t sigMean;
-    bool signZ;
-    uint_fast32_t uiZ;
-    union ui32_f32 uZ;
-
-    uA.f = a;
-    uiA = uA.ui;
-    signA = signF32UI( uiA );
-    expA = expF32UI( uiA );
-    sigA = fracF32UI( uiA );
-    uB.f = b;
-    uiB = uB.ui;
-    signB = signF32UI( uiB );
-    expB = expF32UI( uiB );
-    sigB = fracF32UI( uiB );
-    if ( expA == 0xFF ) {
-        if ( sigA || ( ( expB == 0xFF ) && sigB ) ) goto propagateNaN;
-        goto invalid;
-    }
-    if ( expB == 0xFF ) {
-        if ( sigB ) goto propagateNaN;
-        return a;
-    }
-    if ( ! expB ) {
-        if ( ! sigB ) goto invalid;
-        normExpSig = softfloat_normSubnormalF32Sig( sigB );
-        expB = normExpSig.exp;
-        sigB = normExpSig.sig;
-    }
-    if ( ! expA ) {
-        if ( ! sigA ) return a;
-        normExpSig = softfloat_normSubnormalF32Sig( sigA );
-        expA = normExpSig.exp;
-        sigA = normExpSig.sig;
-    }
-    expDiff = expA - expB;
-    sigA |= 0x00800000;
-    sigB |= 0x00800000;
-    if ( expDiff < 32 ) {
-        sigA <<= 8;
-        sigB <<= 8;
-        if ( expDiff < 0 ) {
-            if ( expDiff < -1 ) return a;
-            sigA >>= 1;
-        }
-        q = ( sigB <= sigA );
-        if ( q ) sigA -= sigB;
-        if ( 0 < expDiff ) {
-            q = ( (uint_fast64_t) sigA<<32 ) / sigB;
-            q >>= 32 - expDiff;
-            sigB >>= 2;
-            sigA = ( ( sigA>>1 )<<( expDiff - 1 ) ) - sigB * q;
-        } else {
-            sigA >>= 2;
-            sigB >>= 2;
-        }
-    } else {
-        if ( sigB <= sigA ) sigA -= sigB;
-        sigA64 = (uint_fast64_t) sigA<<40;
-        sigB64 = (uint_fast64_t) sigB<<40;
-        expDiff -= 64;
-        while ( 0 < expDiff ) {
-            q64 = softfloat_estimateDiv128To64( sigA64, 0, sigB64 );
-            q64 = ( 2 < q64 ) ? q64 - 2 : 0;
-            sigA64 = - ( ( sigB * q64 )<<38 );
-            expDiff -= 62;
-        }
-        expDiff += 64;
-        q64 = softfloat_estimateDiv128To64( sigA64, 0, sigB64 );
-        q64 = ( 2 < q64 ) ? q64 - 2 : 0;
-        q = q64>>( 64 - expDiff );
-        sigB <<= 6;
-        sigA = ( ( sigA64>>33 )<<( expDiff - 1 ) ) - sigB * q;
-    }
-    do {
-        alternateSigA = sigA;
-        ++q;
-        sigA -= sigB;
-    } while ( sigA < 0x80000000 );
-    sigMean = sigA + alternateSigA;
-    if ( ( 0x80000000 <= sigMean ) || ( ! sigMean && ( q & 1 ) ) ) {
-        sigA = alternateSigA;
-    }
-    signZ = ( 0x80000000 <= sigA );
-    if ( signZ ) sigA = - sigA;
-    return softfloat_normRoundPackToF32( signA ^ signZ, expB, sigA );
- propagateNaN:
-    uiZ = softfloat_propagateNaNF32UI( uiA, uiB );
-    goto uiZ;
- invalid:
-    softfloat_raiseFlags( softfloat_flag_invalid );
-    uiZ = defaultNaNF32UI;
- uiZ:
-    uZ.ui = uiZ;
-    return uZ.f;
-
-}
-
diff --git a/softfloat/f32_roundToInt.c b/softfloat/f32_roundToInt.c
new file mode 100755 (executable)
index 0000000..f8f9114
--- /dev/null
@@ -0,0 +1,78 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float32_t f32_roundToInt( float32_t a, int_fast8_t roundingMode, bool exact )
+{
+    union ui32_f32 uA;
+    uint_fast32_t uiA;
+    int_fast16_t expA;
+    uint_fast32_t uiZ;
+    bool signA;
+    uint_fast32_t lastBitMask, roundBitsMask;
+    union ui32_f32 uZ;
+
+    uA.f = a;
+    uiA = uA.ui;
+    expA = expF32UI( uiA );
+    if ( 0x96 <= expA ) {
+        if ( ( expA == 0xFF ) && fracF32UI( uiA ) ) {
+            uiZ = softfloat_propagateNaNF32UI( uiA, 0 );
+            goto uiZ;
+        }
+        return a;
+    }
+    if ( expA <= 0x7E ) {
+        if ( ! (uint32_t) ( uiA<<1 ) ) return a;
+        if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+        signA = signF32UI( uiA );
+        switch ( roundingMode ) {
+         case softfloat_round_nearest_even:
+            if ( ( expA == 0x7E ) && fracF32UI( uiA ) ) {
+                uiZ = packToF32UI( signA, 0x7F, 0 );
+                goto uiZ;
+            }
+            break;
+         case softfloat_round_min:
+            uiZ = signA ? 0xBF800000 : 0;
+            goto uiZ;
+         case softfloat_round_max:
+            uiZ = signA ? 0x80000000 : 0x3F800000;
+            goto uiZ;
+         case softfloat_round_nearest_maxMag:
+            if ( expA == 0x7E ) {
+                uiZ = packToF32UI( signA, 0x7F, 0 );
+                goto uiZ;
+            }
+            break;
+        }
+        uiZ = packToF32UI( signA, 0, 0 );
+        goto uiZ;
+    }
+    lastBitMask = (uint_fast32_t) 1<<( 0x96 - expA );
+    roundBitsMask = lastBitMask - 1;
+    uiZ = uiA;
+    if ( roundingMode == softfloat_round_nearest_maxMag ) {
+        uiZ += lastBitMask>>1;
+    } else if ( roundingMode == softfloat_round_nearest_even ) {
+        uiZ += lastBitMask>>1;
+        if ( ! ( uiZ & roundBitsMask ) ) uiZ &= ~ lastBitMask;
+    } else if ( roundingMode != softfloat_round_minMag ) {
+        if ( signF32UI( uiZ ) ^ ( roundingMode == softfloat_round_max ) ) {
+            uiZ += roundBitsMask;
+        }
+    }
+    uiZ &= ~ roundBitsMask;
+    if ( exact && ( uiZ != uiA ) ) {
+        softfloat_exceptionFlags |= softfloat_flag_inexact;
+    }
+ uiZ:
+    uZ.ui = uiZ;
+    return uZ.f;
+
+}
+
diff --git a/softfloat/f32_roundToInt.cc b/softfloat/f32_roundToInt.cc
deleted file mode 100755 (executable)
index f8f9114..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "internals.h"
-#include "specialize.h"
-#include "softfloat.h"
-
-float32_t f32_roundToInt( float32_t a, int_fast8_t roundingMode, bool exact )
-{
-    union ui32_f32 uA;
-    uint_fast32_t uiA;
-    int_fast16_t expA;
-    uint_fast32_t uiZ;
-    bool signA;
-    uint_fast32_t lastBitMask, roundBitsMask;
-    union ui32_f32 uZ;
-
-    uA.f = a;
-    uiA = uA.ui;
-    expA = expF32UI( uiA );
-    if ( 0x96 <= expA ) {
-        if ( ( expA == 0xFF ) && fracF32UI( uiA ) ) {
-            uiZ = softfloat_propagateNaNF32UI( uiA, 0 );
-            goto uiZ;
-        }
-        return a;
-    }
-    if ( expA <= 0x7E ) {
-        if ( ! (uint32_t) ( uiA<<1 ) ) return a;
-        if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
-        signA = signF32UI( uiA );
-        switch ( roundingMode ) {
-         case softfloat_round_nearest_even:
-            if ( ( expA == 0x7E ) && fracF32UI( uiA ) ) {
-                uiZ = packToF32UI( signA, 0x7F, 0 );
-                goto uiZ;
-            }
-            break;
-         case softfloat_round_min:
-            uiZ = signA ? 0xBF800000 : 0;
-            goto uiZ;
-         case softfloat_round_max:
-            uiZ = signA ? 0x80000000 : 0x3F800000;
-            goto uiZ;
-         case softfloat_round_nearest_maxMag:
-            if ( expA == 0x7E ) {
-                uiZ = packToF32UI( signA, 0x7F, 0 );
-                goto uiZ;
-            }
-            break;
-        }
-        uiZ = packToF32UI( signA, 0, 0 );
-        goto uiZ;
-    }
-    lastBitMask = (uint_fast32_t) 1<<( 0x96 - expA );
-    roundBitsMask = lastBitMask - 1;
-    uiZ = uiA;
-    if ( roundingMode == softfloat_round_nearest_maxMag ) {
-        uiZ += lastBitMask>>1;
-    } else if ( roundingMode == softfloat_round_nearest_even ) {
-        uiZ += lastBitMask>>1;
-        if ( ! ( uiZ & roundBitsMask ) ) uiZ &= ~ lastBitMask;
-    } else if ( roundingMode != softfloat_round_minMag ) {
-        if ( signF32UI( uiZ ) ^ ( roundingMode == softfloat_round_max ) ) {
-            uiZ += roundBitsMask;
-        }
-    }
-    uiZ &= ~ roundBitsMask;
-    if ( exact && ( uiZ != uiA ) ) {
-        softfloat_exceptionFlags |= softfloat_flag_inexact;
-    }
- uiZ:
-    uZ.ui = uiZ;
-    return uZ.f;
-
-}
-
diff --git a/softfloat/f32_sqrt.c b/softfloat/f32_sqrt.c
new file mode 100755 (executable)
index 0000000..c9eb907
--- /dev/null
@@ -0,0 +1,74 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+#include "specialize.h"\r
+#include "softfloat.h"\r
+\r
+float32_t f32_sqrt( float32_t a )\r
+{\r
+    union ui32_f32 uA;\r
+    uint_fast32_t uiA;\r
+    bool signA;\r
+    int_fast16_t expA;\r
+    uint_fast32_t sigA, uiZ;\r
+    struct exp16_sig32 normExpSig;\r
+    int_fast16_t expZ;\r
+    uint_fast32_t sigZ;\r
+    uint_fast64_t term, rem;\r
+    union ui32_f32 uZ;\r
+\r
+    uA.f = a;\r
+    uiA = uA.ui;\r
+    signA = signF32UI( uiA );\r
+    expA = expF32UI( uiA );\r
+    sigA = fracF32UI( uiA );\r
+    if ( expA == 0xFF ) {\r
+        if ( sigA ) {\r
+            uiZ = softfloat_propagateNaNF32UI( uiA, 0 );\r
+            goto uiZ;\r
+        }\r
+        if ( ! signA ) return a;\r
+        goto invalid;\r
+    }\r
+    if ( signA ) {\r
+        if ( ! ( expA | sigA ) ) return a;\r
+        goto invalid;\r
+    }\r
+    if ( ! expA ) {\r
+        if ( ! sigA ) return a;\r
+        normExpSig = softfloat_normSubnormalF32Sig( sigA );\r
+        expA = normExpSig.exp;\r
+        sigA = normExpSig.sig;\r
+    }\r
+    expZ = ( ( expA - 0x7F )>>1 ) + 0x7E;\r
+    sigA = ( sigA | 0x00800000 )<<8;\r
+    sigZ = softfloat_estimateSqrt32( expA, sigA ) + 2;\r
+    if ( ( sigZ & 0x7F ) <= 5 ) {\r
+        if ( sigZ < 2 ) {\r
+            sigZ = 0x7FFFFFFF;\r
+            goto roundPack;\r
+        }\r
+        sigA >>= expA & 1;\r
+        term = (uint_fast64_t) sigZ * sigZ;\r
+        rem = ( (uint_fast64_t) sigA<<32 ) - term;\r
+        while ( UINT64_C( 0x8000000000000000 ) <= rem ) {\r
+            --sigZ;\r
+            rem += ( (uint_fast64_t) sigZ<<1 ) | 1;\r
+        }\r
+        sigZ |= ( rem != 0 );\r
+    }\r
+    sigZ = softfloat_shortShift32Right1Jam( sigZ );\r
+ roundPack:\r
+    return softfloat_roundPackToF32( 0, expZ, sigZ );\r
+ invalid:\r
+    softfloat_raiseFlags( softfloat_flag_invalid );\r
+    uiZ = defaultNaNF32UI;\r
+ uiZ:\r
+    uZ.ui = uiZ;\r
+    return uZ.f;\r
+\r
+}\r
+\r
diff --git a/softfloat/f32_sqrt.cc b/softfloat/f32_sqrt.cc
deleted file mode 100755 (executable)
index c9eb907..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-#include "specialize.h"\r
-#include "softfloat.h"\r
-\r
-float32_t f32_sqrt( float32_t a )\r
-{\r
-    union ui32_f32 uA;\r
-    uint_fast32_t uiA;\r
-    bool signA;\r
-    int_fast16_t expA;\r
-    uint_fast32_t sigA, uiZ;\r
-    struct exp16_sig32 normExpSig;\r
-    int_fast16_t expZ;\r
-    uint_fast32_t sigZ;\r
-    uint_fast64_t term, rem;\r
-    union ui32_f32 uZ;\r
-\r
-    uA.f = a;\r
-    uiA = uA.ui;\r
-    signA = signF32UI( uiA );\r
-    expA = expF32UI( uiA );\r
-    sigA = fracF32UI( uiA );\r
-    if ( expA == 0xFF ) {\r
-        if ( sigA ) {\r
-            uiZ = softfloat_propagateNaNF32UI( uiA, 0 );\r
-            goto uiZ;\r
-        }\r
-        if ( ! signA ) return a;\r
-        goto invalid;\r
-    }\r
-    if ( signA ) {\r
-        if ( ! ( expA | sigA ) ) return a;\r
-        goto invalid;\r
-    }\r
-    if ( ! expA ) {\r
-        if ( ! sigA ) return a;\r
-        normExpSig = softfloat_normSubnormalF32Sig( sigA );\r
-        expA = normExpSig.exp;\r
-        sigA = normExpSig.sig;\r
-    }\r
-    expZ = ( ( expA - 0x7F )>>1 ) + 0x7E;\r
-    sigA = ( sigA | 0x00800000 )<<8;\r
-    sigZ = softfloat_estimateSqrt32( expA, sigA ) + 2;\r
-    if ( ( sigZ & 0x7F ) <= 5 ) {\r
-        if ( sigZ < 2 ) {\r
-            sigZ = 0x7FFFFFFF;\r
-            goto roundPack;\r
-        }\r
-        sigA >>= expA & 1;\r
-        term = (uint_fast64_t) sigZ * sigZ;\r
-        rem = ( (uint_fast64_t) sigA<<32 ) - term;\r
-        while ( UINT64_C( 0x8000000000000000 ) <= rem ) {\r
-            --sigZ;\r
-            rem += ( (uint_fast64_t) sigZ<<1 ) | 1;\r
-        }\r
-        sigZ |= ( rem != 0 );\r
-    }\r
-    sigZ = softfloat_shortShift32Right1Jam( sigZ );\r
- roundPack:\r
-    return softfloat_roundPackToF32( 0, expZ, sigZ );\r
- invalid:\r
-    softfloat_raiseFlags( softfloat_flag_invalid );\r
-    uiZ = defaultNaNF32UI;\r
- uiZ:\r
-    uZ.ui = uiZ;\r
-    return uZ.f;\r
-\r
-}\r
-\r
diff --git a/softfloat/f32_sub.c b/softfloat/f32_sub.c
new file mode 100755 (executable)
index 0000000..c64df8e
--- /dev/null
@@ -0,0 +1,29 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+float32_t f32_sub( float32_t a, float32_t b )\r
+{\r
+    union ui32_f32 uA;\r
+    uint_fast32_t uiA;\r
+    bool signA;\r
+    union ui32_f32 uB;\r
+    uint_fast32_t uiB;\r
+    bool signB;\r
+    float32_t ( *magsRoutine )( uint_fast32_t, uint_fast32_t, bool );\r
+\r
+    uA.f = a;\r
+    uiA = uA.ui;\r
+    signA = signF32UI( uiA );\r
+    uB.f = b;\r
+    uiB = uB.ui;\r
+    signB = signF32UI( uiB );\r
+    magsRoutine =\r
+        ( signA == signB ) ? softfloat_subMagsF32 : softfloat_addMagsF32;\r
+    return magsRoutine( uiA, uiB ^ 0x80000000, signA );\r
+\r
+}\r
+\r
diff --git a/softfloat/f32_sub.cc b/softfloat/f32_sub.cc
deleted file mode 100755 (executable)
index c64df8e..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-float32_t f32_sub( float32_t a, float32_t b )\r
-{\r
-    union ui32_f32 uA;\r
-    uint_fast32_t uiA;\r
-    bool signA;\r
-    union ui32_f32 uB;\r
-    uint_fast32_t uiB;\r
-    bool signB;\r
-    float32_t ( *magsRoutine )( uint_fast32_t, uint_fast32_t, bool );\r
-\r
-    uA.f = a;\r
-    uiA = uA.ui;\r
-    signA = signF32UI( uiA );\r
-    uB.f = b;\r
-    uiB = uB.ui;\r
-    signB = signF32UI( uiB );\r
-    magsRoutine =\r
-        ( signA == signB ) ? softfloat_subMagsF32 : softfloat_addMagsF32;\r
-    return magsRoutine( uiA, uiB ^ 0x80000000, signA );\r
-\r
-}\r
-\r
diff --git a/softfloat/f32_to_f64.c b/softfloat/f32_to_f64.c
new file mode 100755 (executable)
index 0000000..9f0ae5c
--- /dev/null
@@ -0,0 +1,47 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "internals.h"\r
+#include "specialize.h"\r
+#include "softfloat.h"\r
+\r
+float64_t f32_to_f64( float32_t a )\r
+{\r
+    union ui32_f32 uA;\r
+    uint_fast32_t uiA;\r
+    bool sign;\r
+    int_fast16_t exp;\r
+    uint_fast32_t sig;\r
+    uint_fast64_t uiZ;\r
+    struct exp16_sig32 normExpSig;\r
+    union ui64_f64 uZ;\r
+\r
+    uA.f = a;\r
+    uiA = uA.ui;\r
+    sign = signF32UI( uiA );\r
+    exp = expF32UI( uiA );\r
+    sig = fracF32UI( uiA );\r
+    if ( exp == 0xFF ) {\r
+        uiZ =\r
+            sig ? softfloat_commonNaNToF64UI(\r
+                      softfloat_f32UIToCommonNaN( uiA ) )\r
+                : packToF64UI( sign, 0x7FF, 0 );\r
+        goto uiZ;\r
+    }\r
+    if ( ! exp ) {\r
+        if ( ! sig ) {\r
+            uiZ = packToF64UI( sign, 0, 0 );\r
+            goto uiZ;\r
+        }\r
+        normExpSig = softfloat_normSubnormalF32Sig( sig );\r
+        exp = normExpSig.exp - 1;\r
+        sig = normExpSig.sig;\r
+    }\r
+    uiZ = packToF64UI( sign, exp + 0x380, (uint_fast64_t) sig<<29 );\r
+ uiZ:\r
+    uZ.ui = uiZ;\r
+    return uZ.f;\r
+\r
+}\r
+\r
diff --git a/softfloat/f32_to_f64.cc b/softfloat/f32_to_f64.cc
deleted file mode 100755 (executable)
index 9f0ae5c..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "internals.h"\r
-#include "specialize.h"\r
-#include "softfloat.h"\r
-\r
-float64_t f32_to_f64( float32_t a )\r
-{\r
-    union ui32_f32 uA;\r
-    uint_fast32_t uiA;\r
-    bool sign;\r
-    int_fast16_t exp;\r
-    uint_fast32_t sig;\r
-    uint_fast64_t uiZ;\r
-    struct exp16_sig32 normExpSig;\r
-    union ui64_f64 uZ;\r
-\r
-    uA.f = a;\r
-    uiA = uA.ui;\r
-    sign = signF32UI( uiA );\r
-    exp = expF32UI( uiA );\r
-    sig = fracF32UI( uiA );\r
-    if ( exp == 0xFF ) {\r
-        uiZ =\r
-            sig ? softfloat_commonNaNToF64UI(\r
-                      softfloat_f32UIToCommonNaN( uiA ) )\r
-                : packToF64UI( sign, 0x7FF, 0 );\r
-        goto uiZ;\r
-    }\r
-    if ( ! exp ) {\r
-        if ( ! sig ) {\r
-            uiZ = packToF64UI( sign, 0, 0 );\r
-            goto uiZ;\r
-        }\r
-        normExpSig = softfloat_normSubnormalF32Sig( sig );\r
-        exp = normExpSig.exp - 1;\r
-        sig = normExpSig.sig;\r
-    }\r
-    uiZ = packToF64UI( sign, exp + 0x380, (uint_fast64_t) sig<<29 );\r
- uiZ:\r
-    uZ.ui = uiZ;\r
-    return uZ.f;\r
-\r
-}\r
-\r
diff --git a/softfloat/f32_to_i32.c b/softfloat/f32_to_i32.c
new file mode 100755 (executable)
index 0000000..bbbaee0
--- /dev/null
@@ -0,0 +1,34 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+int_fast32_t f32_to_i32( float32_t a, int_fast8_t roundingMode, bool exact )\r
+{\r
+    union ui32_f32 uA;\r
+    uint_fast32_t uiA;\r
+    bool sign;\r
+    int_fast16_t exp;\r
+    uint_fast32_t sig;\r
+    uint_fast64_t sig64;\r
+    int_fast16_t shiftCount;\r
+\r
+    uA.f = a;\r
+    uiA = uA.ui;\r
+    sign = signF32UI( uiA );\r
+    exp = expF32UI( uiA );\r
+    sig = fracF32UI( uiA );\r
+    if ( ( exp == 0xFF ) && sig ) sign = 0;\r
+    if ( exp ) sig |= 0x00800000;\r
+    sig64 = (uint_fast64_t) sig<<32;\r
+    shiftCount = 0xAF - exp;\r
+    if ( 0 < shiftCount ) {\r
+        sig64 = softfloat_shift64RightJam( sig64, shiftCount );\r
+    }\r
+    return softfloat_roundPackToI32( sign, sig64, roundingMode, exact );\r
+\r
+}\r
+\r
diff --git a/softfloat/f32_to_i32.cc b/softfloat/f32_to_i32.cc
deleted file mode 100755 (executable)
index bbbaee0..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-int_fast32_t f32_to_i32( float32_t a, int_fast8_t roundingMode, bool exact )\r
-{\r
-    union ui32_f32 uA;\r
-    uint_fast32_t uiA;\r
-    bool sign;\r
-    int_fast16_t exp;\r
-    uint_fast32_t sig;\r
-    uint_fast64_t sig64;\r
-    int_fast16_t shiftCount;\r
-\r
-    uA.f = a;\r
-    uiA = uA.ui;\r
-    sign = signF32UI( uiA );\r
-    exp = expF32UI( uiA );\r
-    sig = fracF32UI( uiA );\r
-    if ( ( exp == 0xFF ) && sig ) sign = 0;\r
-    if ( exp ) sig |= 0x00800000;\r
-    sig64 = (uint_fast64_t) sig<<32;\r
-    shiftCount = 0xAF - exp;\r
-    if ( 0 < shiftCount ) {\r
-        sig64 = softfloat_shift64RightJam( sig64, shiftCount );\r
-    }\r
-    return softfloat_roundPackToI32( sign, sig64, roundingMode, exact );\r
-\r
-}\r
-\r
diff --git a/softfloat/f32_to_i32_r_minMag.c b/softfloat/f32_to_i32_r_minMag.c
new file mode 100755 (executable)
index 0000000..63ff1e2
--- /dev/null
@@ -0,0 +1,45 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+int_fast32_t f32_to_i32_r_minMag( float32_t a, bool exact )\r
+{\r
+    union ui32_f32 uA;\r
+    uint_fast32_t uiA;\r
+    int_fast16_t exp;\r
+    uint_fast32_t sig;\r
+    bool sign;\r
+    int_fast16_t shiftCount;\r
+    int_fast32_t absZ;\r
+\r
+    uA.f = a;\r
+    uiA = uA.ui;\r
+    exp = expF32UI( uiA );\r
+    sig = fracF32UI( uiA );\r
+    if ( exp < 0x7F ) {\r
+        if ( exact && ( exp | sig ) ) {\r
+            softfloat_exceptionFlags |= softfloat_flag_inexact;\r
+        }\r
+        return 0;\r
+    }\r
+    sign = signF32UI( uiA );\r
+    shiftCount = 0x9E - exp;\r
+    if ( shiftCount <= 0 ) {\r
+        if ( uiA != packToF32UI( 1, 0x9E, 0 ) ) {\r
+            softfloat_raiseFlags( softfloat_flag_invalid );\r
+            if ( ! sign || ( ( exp == 0xFF ) && sig ) ) return 0x7FFFFFFF;\r
+        }\r
+        return -0x7FFFFFFF - 1;\r
+    }\r
+    sig = ( sig | 0x00800000 )<<8;\r
+    absZ = sig>>shiftCount;\r
+    if ( exact && (uint32_t) ( sig<<( ( - shiftCount ) & 31 ) ) ) {\r
+        softfloat_exceptionFlags |= softfloat_flag_inexact;\r
+    }\r
+    return sign ? - absZ : absZ;\r
+\r
+}\r
+\r
diff --git a/softfloat/f32_to_i32_r_minMag.cc b/softfloat/f32_to_i32_r_minMag.cc
deleted file mode 100755 (executable)
index 63ff1e2..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-int_fast32_t f32_to_i32_r_minMag( float32_t a, bool exact )\r
-{\r
-    union ui32_f32 uA;\r
-    uint_fast32_t uiA;\r
-    int_fast16_t exp;\r
-    uint_fast32_t sig;\r
-    bool sign;\r
-    int_fast16_t shiftCount;\r
-    int_fast32_t absZ;\r
-\r
-    uA.f = a;\r
-    uiA = uA.ui;\r
-    exp = expF32UI( uiA );\r
-    sig = fracF32UI( uiA );\r
-    if ( exp < 0x7F ) {\r
-        if ( exact && ( exp | sig ) ) {\r
-            softfloat_exceptionFlags |= softfloat_flag_inexact;\r
-        }\r
-        return 0;\r
-    }\r
-    sign = signF32UI( uiA );\r
-    shiftCount = 0x9E - exp;\r
-    if ( shiftCount <= 0 ) {\r
-        if ( uiA != packToF32UI( 1, 0x9E, 0 ) ) {\r
-            softfloat_raiseFlags( softfloat_flag_invalid );\r
-            if ( ! sign || ( ( exp == 0xFF ) && sig ) ) return 0x7FFFFFFF;\r
-        }\r
-        return -0x7FFFFFFF - 1;\r
-    }\r
-    sig = ( sig | 0x00800000 )<<8;\r
-    absZ = sig>>shiftCount;\r
-    if ( exact && (uint32_t) ( sig<<( ( - shiftCount ) & 31 ) ) ) {\r
-        softfloat_exceptionFlags |= softfloat_flag_inexact;\r
-    }\r
-    return sign ? - absZ : absZ;\r
-\r
-}\r
-\r
diff --git a/softfloat/f32_to_i64.c b/softfloat/f32_to_i64.c
new file mode 100755 (executable)
index 0000000..c0b8981
--- /dev/null
@@ -0,0 +1,44 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+int_fast64_t f32_to_i64( float32_t a, int_fast8_t roundingMode, bool exact )\r
+{\r
+    union ui32_f32 uA;\r
+    uint_fast32_t uiA;\r
+    bool sign;\r
+    int_fast16_t exp;\r
+    uint_fast32_t sig;\r
+    int_fast16_t shiftCount;\r
+    uint_fast64_t sig64, extra;\r
+    struct uint64_extra sig64Extra;\r
+\r
+    uA.f = a;\r
+    uiA = uA.ui;\r
+    sign = signF32UI( uiA );\r
+    exp = expF32UI( uiA );\r
+    sig = fracF32UI( uiA );\r
+    shiftCount = 0xBE - exp;\r
+    if ( shiftCount < 0 ) {\r
+        softfloat_raiseFlags( softfloat_flag_invalid );\r
+        if ( ! sign || ( ( exp == 0xFF ) && sig ) ) {\r
+            return INT64_C( 0x7FFFFFFFFFFFFFFF );\r
+        }\r
+        return - INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1;\r
+    }\r
+    if ( exp ) sig |= 0x00800000;\r
+    sig64 = (uint_fast64_t) sig<<40;\r
+    extra = 0;\r
+    if ( shiftCount ) {\r
+        sig64Extra = softfloat_shift64ExtraRightJam( sig64, 0, shiftCount );\r
+        sig64 = sig64Extra.v;\r
+        extra = sig64Extra.extra;\r
+    }\r
+    return softfloat_roundPackToI64( sign, sig64, extra, roundingMode, exact );\r
+\r
+}\r
+\r
diff --git a/softfloat/f32_to_i64.cc b/softfloat/f32_to_i64.cc
deleted file mode 100755 (executable)
index c0b8981..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-int_fast64_t f32_to_i64( float32_t a, int_fast8_t roundingMode, bool exact )\r
-{\r
-    union ui32_f32 uA;\r
-    uint_fast32_t uiA;\r
-    bool sign;\r
-    int_fast16_t exp;\r
-    uint_fast32_t sig;\r
-    int_fast16_t shiftCount;\r
-    uint_fast64_t sig64, extra;\r
-    struct uint64_extra sig64Extra;\r
-\r
-    uA.f = a;\r
-    uiA = uA.ui;\r
-    sign = signF32UI( uiA );\r
-    exp = expF32UI( uiA );\r
-    sig = fracF32UI( uiA );\r
-    shiftCount = 0xBE - exp;\r
-    if ( shiftCount < 0 ) {\r
-        softfloat_raiseFlags( softfloat_flag_invalid );\r
-        if ( ! sign || ( ( exp == 0xFF ) && sig ) ) {\r
-            return INT64_C( 0x7FFFFFFFFFFFFFFF );\r
-        }\r
-        return - INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1;\r
-    }\r
-    if ( exp ) sig |= 0x00800000;\r
-    sig64 = (uint_fast64_t) sig<<40;\r
-    extra = 0;\r
-    if ( shiftCount ) {\r
-        sig64Extra = softfloat_shift64ExtraRightJam( sig64, 0, shiftCount );\r
-        sig64 = sig64Extra.v;\r
-        extra = sig64Extra.extra;\r
-    }\r
-    return softfloat_roundPackToI64( sign, sig64, extra, roundingMode, exact );\r
-\r
-}\r
-\r
diff --git a/softfloat/f32_to_i64_r_minMag.c b/softfloat/f32_to_i64_r_minMag.c
new file mode 100755 (executable)
index 0000000..33bff93
--- /dev/null
@@ -0,0 +1,52 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+int_fast64_t f32_to_i64_r_minMag( float32_t a, bool exact )\r
+{\r
+    union ui32_f32 uA;\r
+    uint_fast32_t uiA;\r
+    int_fast16_t exp;\r
+    uint_fast32_t sig;\r
+    bool sign;\r
+    int_fast16_t shiftCount;\r
+    uint_fast64_t sig64;\r
+    int_fast64_t absZ;\r
+\r
+    uA.f = a;\r
+    uiA = uA.ui;\r
+    exp = expF32UI( uiA );\r
+    sig = fracF32UI( uiA );\r
+    if ( exp < 0x7F ) {\r
+        if ( exact && ( exp | sig ) ) {\r
+            softfloat_exceptionFlags |= softfloat_flag_inexact;\r
+        }\r
+        return 0;\r
+    }\r
+    sign = signF32UI( uiA );\r
+    shiftCount = 0xBE - exp;\r
+    if ( shiftCount <= 0 ) {\r
+        if ( uiA != packToF32UI( 1, 0xBE, 0 ) ) {\r
+            softfloat_raiseFlags( softfloat_flag_invalid );\r
+            if ( ! sign || ( ( exp == 0xFF ) && sig ) ) {\r
+                return INT64_C( 0x7FFFFFFFFFFFFFFF );\r
+            }\r
+        }\r
+        return - INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1;\r
+    }\r
+    sig |= 0x00800000;\r
+    sig64 = (uint_fast64_t) sig<<40;\r
+    absZ = sig64>>shiftCount;\r
+    shiftCount = 40 - shiftCount;\r
+    if (\r
+        exact && ( shiftCount < 0 ) && (uint32_t) ( sig<<( shiftCount & 31 ) )\r
+    ) {\r
+        softfloat_exceptionFlags |= softfloat_flag_inexact;\r
+    }\r
+    return sign ? - absZ : absZ;\r
+\r
+}\r
+\r
diff --git a/softfloat/f32_to_i64_r_minMag.cc b/softfloat/f32_to_i64_r_minMag.cc
deleted file mode 100755 (executable)
index 33bff93..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-int_fast64_t f32_to_i64_r_minMag( float32_t a, bool exact )\r
-{\r
-    union ui32_f32 uA;\r
-    uint_fast32_t uiA;\r
-    int_fast16_t exp;\r
-    uint_fast32_t sig;\r
-    bool sign;\r
-    int_fast16_t shiftCount;\r
-    uint_fast64_t sig64;\r
-    int_fast64_t absZ;\r
-\r
-    uA.f = a;\r
-    uiA = uA.ui;\r
-    exp = expF32UI( uiA );\r
-    sig = fracF32UI( uiA );\r
-    if ( exp < 0x7F ) {\r
-        if ( exact && ( exp | sig ) ) {\r
-            softfloat_exceptionFlags |= softfloat_flag_inexact;\r
-        }\r
-        return 0;\r
-    }\r
-    sign = signF32UI( uiA );\r
-    shiftCount = 0xBE - exp;\r
-    if ( shiftCount <= 0 ) {\r
-        if ( uiA != packToF32UI( 1, 0xBE, 0 ) ) {\r
-            softfloat_raiseFlags( softfloat_flag_invalid );\r
-            if ( ! sign || ( ( exp == 0xFF ) && sig ) ) {\r
-                return INT64_C( 0x7FFFFFFFFFFFFFFF );\r
-            }\r
-        }\r
-        return - INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1;\r
-    }\r
-    sig |= 0x00800000;\r
-    sig64 = (uint_fast64_t) sig<<40;\r
-    absZ = sig64>>shiftCount;\r
-    shiftCount = 40 - shiftCount;\r
-    if (\r
-        exact && ( shiftCount < 0 ) && (uint32_t) ( sig<<( shiftCount & 31 ) )\r
-    ) {\r
-        softfloat_exceptionFlags |= softfloat_flag_inexact;\r
-    }\r
-    return sign ? - absZ : absZ;\r
-\r
-}\r
-\r
diff --git a/softfloat/f32_to_ui32.c b/softfloat/f32_to_ui32.c
new file mode 100755 (executable)
index 0000000..3501db8
--- /dev/null
@@ -0,0 +1,33 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+uint_fast32_t f32_to_ui32( float32_t a, int_fast8_t roundingMode, bool exact )\r
+{\r
+    union ui32_f32 uA;\r
+    uint_fast32_t uiA;\r
+    bool sign;\r
+    int_fast16_t exp;\r
+    uint_fast32_t sig;\r
+    uint_fast64_t sig64;\r
+    int_fast16_t shiftCount;\r
+\r
+    uA.f = a;\r
+    uiA = uA.ui;\r
+    sign = signF32UI( uiA );\r
+    exp = expF32UI( uiA );\r
+    sig = fracF32UI( uiA );\r
+    if ( exp ) sig |= 0x00800000;\r
+    sig64 = (uint_fast64_t) sig<<32;\r
+    shiftCount = 0xAF - exp;\r
+    if ( 0 < shiftCount ) {\r
+        sig64 = softfloat_shift64RightJam( sig64, shiftCount );\r
+    }\r
+    return softfloat_roundPackToUI32( sign, sig64, roundingMode, exact );\r
+\r
+}\r
+\r
diff --git a/softfloat/f32_to_ui32.cc b/softfloat/f32_to_ui32.cc
deleted file mode 100755 (executable)
index 3501db8..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-uint_fast32_t f32_to_ui32( float32_t a, int_fast8_t roundingMode, bool exact )\r
-{\r
-    union ui32_f32 uA;\r
-    uint_fast32_t uiA;\r
-    bool sign;\r
-    int_fast16_t exp;\r
-    uint_fast32_t sig;\r
-    uint_fast64_t sig64;\r
-    int_fast16_t shiftCount;\r
-\r
-    uA.f = a;\r
-    uiA = uA.ui;\r
-    sign = signF32UI( uiA );\r
-    exp = expF32UI( uiA );\r
-    sig = fracF32UI( uiA );\r
-    if ( exp ) sig |= 0x00800000;\r
-    sig64 = (uint_fast64_t) sig<<32;\r
-    shiftCount = 0xAF - exp;\r
-    if ( 0 < shiftCount ) {\r
-        sig64 = softfloat_shift64RightJam( sig64, shiftCount );\r
-    }\r
-    return softfloat_roundPackToUI32( sign, sig64, roundingMode, exact );\r
-\r
-}\r
-\r
diff --git a/softfloat/f32_to_ui32_r_minMag.c b/softfloat/f32_to_ui32_r_minMag.c
new file mode 100755 (executable)
index 0000000..edd858d
--- /dev/null
@@ -0,0 +1,41 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+uint_fast32_t f32_to_ui32_r_minMag( float32_t a, bool exact )\r
+{\r
+    union ui32_f32 uA;\r
+    uint_fast32_t uiA;\r
+    int_fast16_t exp;\r
+    uint_fast32_t sig;\r
+    int_fast16_t shiftCount;\r
+    uint_fast32_t z;\r
+\r
+    uA.f = a;\r
+    uiA = uA.ui;\r
+    exp = expF32UI( uiA );\r
+    sig = fracF32UI( uiA );\r
+    if ( exp < 0x7F ) {\r
+        if ( exact && ( exp | sig ) ) {\r
+            softfloat_exceptionFlags |= softfloat_flag_inexact;\r
+        }\r
+        return 0;\r
+    }\r
+    if ( signF32UI( uiA ) ) goto invalid;\r
+    shiftCount = 0x9E - exp;\r
+    if ( shiftCount < 0 ) goto invalid;\r
+    sig = ( sig | 0x00800000 )<<8;\r
+    z = sig>>shiftCount;\r
+    if ( exact && ( sig & ( ( (uint_fast32_t) 1<<shiftCount ) - 1 ) ) ) {\r
+        softfloat_exceptionFlags |= softfloat_flag_inexact;\r
+    }\r
+    return z;\r
+ invalid:\r
+    softfloat_raiseFlags( softfloat_flag_invalid );\r
+    return 0xFFFFFFFF;\r
+\r
+}\r
+\r
diff --git a/softfloat/f32_to_ui32_r_minMag.cc b/softfloat/f32_to_ui32_r_minMag.cc
deleted file mode 100755 (executable)
index edd858d..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-uint_fast32_t f32_to_ui32_r_minMag( float32_t a, bool exact )\r
-{\r
-    union ui32_f32 uA;\r
-    uint_fast32_t uiA;\r
-    int_fast16_t exp;\r
-    uint_fast32_t sig;\r
-    int_fast16_t shiftCount;\r
-    uint_fast32_t z;\r
-\r
-    uA.f = a;\r
-    uiA = uA.ui;\r
-    exp = expF32UI( uiA );\r
-    sig = fracF32UI( uiA );\r
-    if ( exp < 0x7F ) {\r
-        if ( exact && ( exp | sig ) ) {\r
-            softfloat_exceptionFlags |= softfloat_flag_inexact;\r
-        }\r
-        return 0;\r
-    }\r
-    if ( signF32UI( uiA ) ) goto invalid;\r
-    shiftCount = 0x9E - exp;\r
-    if ( shiftCount < 0 ) goto invalid;\r
-    sig = ( sig | 0x00800000 )<<8;\r
-    z = sig>>shiftCount;\r
-    if ( exact && ( sig & ( ( (uint_fast32_t) 1<<shiftCount ) - 1 ) ) ) {\r
-        softfloat_exceptionFlags |= softfloat_flag_inexact;\r
-    }\r
-    return z;\r
- invalid:\r
-    softfloat_raiseFlags( softfloat_flag_invalid );\r
-    return 0xFFFFFFFF;\r
-\r
-}\r
-\r
diff --git a/softfloat/f32_to_ui64.c b/softfloat/f32_to_ui64.c
new file mode 100755 (executable)
index 0000000..6cdcf74
--- /dev/null
@@ -0,0 +1,42 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+uint_fast64_t f32_to_ui64( float32_t a, int_fast8_t roundingMode, bool exact )\r
+{\r
+    union ui32_f32 uA;\r
+    uint_fast32_t uiA;\r
+    bool sign;\r
+    int_fast16_t exp;\r
+    uint_fast32_t sig;\r
+    int_fast16_t shiftCount;\r
+    uint_fast64_t sig64, extra;\r
+    struct uint64_extra sig64Extra;\r
+\r
+    uA.f = a;\r
+    uiA = uA.ui;\r
+    sign = signF32UI( uiA );\r
+    exp = expF32UI( uiA );\r
+    sig = fracF32UI( uiA );\r
+    shiftCount = 0xBE - exp;\r
+    if ( shiftCount < 0 ) {\r
+        softfloat_raiseFlags( softfloat_flag_invalid );\r
+        return UINT64_C( 0xFFFFFFFFFFFFFFFF );\r
+    }\r
+    if ( exp ) sig |= 0x00800000;\r
+    sig64 = (uint_fast64_t) sig<<40;\r
+    extra = 0;\r
+    if ( shiftCount ) {\r
+        sig64Extra = softfloat_shift64ExtraRightJam( sig64, 0, shiftCount );\r
+        sig64 = sig64Extra.v;\r
+        extra = sig64Extra.extra;\r
+    }\r
+    return\r
+        softfloat_roundPackToUI64( sign, sig64, extra, roundingMode, exact );\r
+\r
+}\r
+\r
diff --git a/softfloat/f32_to_ui64.cc b/softfloat/f32_to_ui64.cc
deleted file mode 100755 (executable)
index 6cdcf74..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-uint_fast64_t f32_to_ui64( float32_t a, int_fast8_t roundingMode, bool exact )\r
-{\r
-    union ui32_f32 uA;\r
-    uint_fast32_t uiA;\r
-    bool sign;\r
-    int_fast16_t exp;\r
-    uint_fast32_t sig;\r
-    int_fast16_t shiftCount;\r
-    uint_fast64_t sig64, extra;\r
-    struct uint64_extra sig64Extra;\r
-\r
-    uA.f = a;\r
-    uiA = uA.ui;\r
-    sign = signF32UI( uiA );\r
-    exp = expF32UI( uiA );\r
-    sig = fracF32UI( uiA );\r
-    shiftCount = 0xBE - exp;\r
-    if ( shiftCount < 0 ) {\r
-        softfloat_raiseFlags( softfloat_flag_invalid );\r
-        return UINT64_C( 0xFFFFFFFFFFFFFFFF );\r
-    }\r
-    if ( exp ) sig |= 0x00800000;\r
-    sig64 = (uint_fast64_t) sig<<40;\r
-    extra = 0;\r
-    if ( shiftCount ) {\r
-        sig64Extra = softfloat_shift64ExtraRightJam( sig64, 0, shiftCount );\r
-        sig64 = sig64Extra.v;\r
-        extra = sig64Extra.extra;\r
-    }\r
-    return\r
-        softfloat_roundPackToUI64( sign, sig64, extra, roundingMode, exact );\r
-\r
-}\r
-\r
diff --git a/softfloat/f32_to_ui64_r_minMag.c b/softfloat/f32_to_ui64_r_minMag.c
new file mode 100755 (executable)
index 0000000..738d6b1
--- /dev/null
@@ -0,0 +1,45 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+uint_fast64_t f32_to_ui64_r_minMag( float32_t a, bool exact )\r
+{\r
+    union ui32_f32 uA;\r
+    uint_fast32_t uiA;\r
+    int_fast16_t exp;\r
+    uint_fast32_t sig;\r
+    int_fast16_t shiftCount;\r
+    uint_fast64_t sig64, z;\r
+\r
+    uA.f = a;\r
+    uiA = uA.ui;\r
+    exp = expF32UI( uiA );\r
+    sig = fracF32UI( uiA );\r
+    if ( exp < 0x7F ) {\r
+        if ( exact && ( exp | sig ) ) {\r
+            softfloat_exceptionFlags |= softfloat_flag_inexact;\r
+        }\r
+        return 0;\r
+    }\r
+    if ( signF32UI( uiA ) ) goto invalid;\r
+    shiftCount = 0xBE - exp;\r
+    if ( shiftCount < 0 ) goto invalid;\r
+    sig |= 0x00800000;\r
+    sig64 = (uint_fast64_t) sig<<40;\r
+    z = sig64>>shiftCount;\r
+    shiftCount = 40 - shiftCount;\r
+    if (\r
+        exact && ( shiftCount < 0 ) && (uint32_t) ( sig<<( shiftCount & 31 ) )\r
+    ) {\r
+        softfloat_exceptionFlags |= softfloat_flag_inexact;\r
+    }\r
+    return z;\r
+ invalid:\r
+    softfloat_raiseFlags( softfloat_flag_invalid );\r
+    return UINT64_C( 0xFFFFFFFFFFFFFFFF );\r
+\r
+}\r
+\r
diff --git a/softfloat/f32_to_ui64_r_minMag.cc b/softfloat/f32_to_ui64_r_minMag.cc
deleted file mode 100755 (executable)
index 738d6b1..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-uint_fast64_t f32_to_ui64_r_minMag( float32_t a, bool exact )\r
-{\r
-    union ui32_f32 uA;\r
-    uint_fast32_t uiA;\r
-    int_fast16_t exp;\r
-    uint_fast32_t sig;\r
-    int_fast16_t shiftCount;\r
-    uint_fast64_t sig64, z;\r
-\r
-    uA.f = a;\r
-    uiA = uA.ui;\r
-    exp = expF32UI( uiA );\r
-    sig = fracF32UI( uiA );\r
-    if ( exp < 0x7F ) {\r
-        if ( exact && ( exp | sig ) ) {\r
-            softfloat_exceptionFlags |= softfloat_flag_inexact;\r
-        }\r
-        return 0;\r
-    }\r
-    if ( signF32UI( uiA ) ) goto invalid;\r
-    shiftCount = 0xBE - exp;\r
-    if ( shiftCount < 0 ) goto invalid;\r
-    sig |= 0x00800000;\r
-    sig64 = (uint_fast64_t) sig<<40;\r
-    z = sig64>>shiftCount;\r
-    shiftCount = 40 - shiftCount;\r
-    if (\r
-        exact && ( shiftCount < 0 ) && (uint32_t) ( sig<<( shiftCount & 31 ) )\r
-    ) {\r
-        softfloat_exceptionFlags |= softfloat_flag_inexact;\r
-    }\r
-    return z;\r
- invalid:\r
-    softfloat_raiseFlags( softfloat_flag_invalid );\r
-    return UINT64_C( 0xFFFFFFFFFFFFFFFF );\r
-\r
-}\r
-\r
diff --git a/softfloat/f64_add.c b/softfloat/f64_add.c
new file mode 100755 (executable)
index 0000000..9ec4b5f
--- /dev/null
@@ -0,0 +1,29 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float64_t f64_add( float64_t a, float64_t b )
+{
+    union ui64_f64 uA;
+    uint_fast64_t uiA;
+    bool signA;
+    union ui64_f64 uB;
+    uint_fast64_t uiB;
+    bool signB;
+    float64_t ( *magsRoutine )( uint_fast64_t, uint_fast64_t, bool );
+
+    uA.f = a;
+    uiA = uA.ui;
+    signA = signF64UI( uiA );
+    uB.f = b;
+    uiB = uB.ui;
+    signB = signF64UI( uiB );
+    magsRoutine =
+        ( signA == signB ) ? softfloat_addMagsF64 : softfloat_subMagsF64;
+    return magsRoutine( uiA, uiB, signA );
+
+}
+
diff --git a/softfloat/f64_add.cc b/softfloat/f64_add.cc
deleted file mode 100755 (executable)
index 9ec4b5f..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "internals.h"
-#include "softfloat.h"
-
-float64_t f64_add( float64_t a, float64_t b )
-{
-    union ui64_f64 uA;
-    uint_fast64_t uiA;
-    bool signA;
-    union ui64_f64 uB;
-    uint_fast64_t uiB;
-    bool signB;
-    float64_t ( *magsRoutine )( uint_fast64_t, uint_fast64_t, bool );
-
-    uA.f = a;
-    uiA = uA.ui;
-    signA = signF64UI( uiA );
-    uB.f = b;
-    uiB = uB.ui;
-    signB = signF64UI( uiB );
-    magsRoutine =
-        ( signA == signB ) ? softfloat_addMagsF64 : softfloat_subMagsF64;
-    return magsRoutine( uiA, uiB, signA );
-
-}
-
diff --git a/softfloat/f64_div.c b/softfloat/f64_div.c
new file mode 100755 (executable)
index 0000000..9bc72b3
--- /dev/null
@@ -0,0 +1,104 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float64_t f64_div( float64_t a, float64_t b )
+{
+    union ui64_f64 uA;
+    uint_fast64_t uiA;
+    bool signA;
+    int_fast16_t expA;
+    uint_fast64_t sigA;
+    union ui64_f64 uB;
+    uint_fast64_t uiB;
+    bool signB;
+    int_fast16_t expB;
+    uint_fast64_t sigB;
+    bool signZ;
+    struct exp16_sig64 normExpSig;
+    int_fast16_t expZ;
+    uint_fast64_t sigZ;
+    struct uint128 term, rem;
+    uint_fast64_t uiZ;
+    union ui64_f64 uZ;
+
+    uA.f = a;
+    uiA = uA.ui;
+    signA = signF64UI( uiA );
+    expA = expF64UI( uiA );
+    sigA = fracF64UI( uiA );
+    uB.f = b;
+    uiB = uB.ui;
+    signB = signF64UI( uiB );
+    expB = expF64UI( uiB );
+    sigB = fracF64UI( uiB );
+    signZ = signA ^ signB;
+    if ( expA == 0x7FF ) {
+        if ( sigA ) goto propagateNaN;
+        if ( expB == 0x7FF ) {
+            if ( sigB ) goto propagateNaN;
+            goto invalid;
+        }
+        goto infinity;
+    }
+    if ( expB == 0x7FF ) {
+        if ( sigB ) goto propagateNaN;
+        goto zero;
+    }
+    if ( ! expB ) {
+        if ( ! sigB ) {
+            if ( ! ( expA | sigA ) ) goto invalid;
+            softfloat_raiseFlags( softfloat_flag_infinity );
+            goto infinity;
+        }
+        normExpSig = softfloat_normSubnormalF64Sig( sigB );
+        expB = normExpSig.exp;
+        sigB = normExpSig.sig;
+    }
+    if ( ! expA ) {
+        if ( ! sigA ) goto zero;
+        normExpSig = softfloat_normSubnormalF64Sig( sigA );
+        expA = normExpSig.exp;
+        sigA = normExpSig.sig;
+    }
+    expZ = expA - expB + 0x3FD;
+    sigA = ( sigA | UINT64_C( 0x0010000000000000 ) )<<10;
+    sigB = ( sigB | UINT64_C( 0x0010000000000000 ) )<<11;
+    if ( sigB <= ( sigA + sigA ) ) {
+        ++expZ;
+        sigA >>= 1;
+    }
+    sigZ = softfloat_estimateDiv128To64( sigA, 0, sigB );
+    if ( ( sigZ & 0x1FF ) <= 2 ) {
+        term = softfloat_mul64To128( sigB, sigZ );
+        rem = softfloat_sub128( sigA, 0, term.v64, term.v0 );
+        while ( UINT64_C( 0x8000000000000000 ) <= rem.v64 ) {
+            --sigZ;
+            rem = softfloat_add128( rem.v64, rem.v0, 0, sigB );
+        }
+        sigZ |= ( rem.v0 != 0 );
+    }
+    return softfloat_roundPackToF64( signZ, expZ, sigZ );
+ propagateNaN:
+    uiZ = softfloat_propagateNaNF64UI( uiA, uiB );
+    goto uiZ;
+ invalid:
+    softfloat_raiseFlags( softfloat_flag_invalid );
+    uiZ = defaultNaNF64UI;
+    goto uiZ;
+ infinity:
+    uiZ = packToF64UI( signZ, 0x7FF, 0 );
+    goto uiZ;
+ zero:
+    uiZ = packToF64UI( signZ, 0, 0 );
+ uiZ:
+    uZ.ui = uiZ;
+    return uZ.f;
+
+}
+
diff --git a/softfloat/f64_div.cc b/softfloat/f64_div.cc
deleted file mode 100755 (executable)
index 9bc72b3..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "primitives.h"
-#include "internals.h"
-#include "specialize.h"
-#include "softfloat.h"
-
-float64_t f64_div( float64_t a, float64_t b )
-{
-    union ui64_f64 uA;
-    uint_fast64_t uiA;
-    bool signA;
-    int_fast16_t expA;
-    uint_fast64_t sigA;
-    union ui64_f64 uB;
-    uint_fast64_t uiB;
-    bool signB;
-    int_fast16_t expB;
-    uint_fast64_t sigB;
-    bool signZ;
-    struct exp16_sig64 normExpSig;
-    int_fast16_t expZ;
-    uint_fast64_t sigZ;
-    struct uint128 term, rem;
-    uint_fast64_t uiZ;
-    union ui64_f64 uZ;
-
-    uA.f = a;
-    uiA = uA.ui;
-    signA = signF64UI( uiA );
-    expA = expF64UI( uiA );
-    sigA = fracF64UI( uiA );
-    uB.f = b;
-    uiB = uB.ui;
-    signB = signF64UI( uiB );
-    expB = expF64UI( uiB );
-    sigB = fracF64UI( uiB );
-    signZ = signA ^ signB;
-    if ( expA == 0x7FF ) {
-        if ( sigA ) goto propagateNaN;
-        if ( expB == 0x7FF ) {
-            if ( sigB ) goto propagateNaN;
-            goto invalid;
-        }
-        goto infinity;
-    }
-    if ( expB == 0x7FF ) {
-        if ( sigB ) goto propagateNaN;
-        goto zero;
-    }
-    if ( ! expB ) {
-        if ( ! sigB ) {
-            if ( ! ( expA | sigA ) ) goto invalid;
-            softfloat_raiseFlags( softfloat_flag_infinity );
-            goto infinity;
-        }
-        normExpSig = softfloat_normSubnormalF64Sig( sigB );
-        expB = normExpSig.exp;
-        sigB = normExpSig.sig;
-    }
-    if ( ! expA ) {
-        if ( ! sigA ) goto zero;
-        normExpSig = softfloat_normSubnormalF64Sig( sigA );
-        expA = normExpSig.exp;
-        sigA = normExpSig.sig;
-    }
-    expZ = expA - expB + 0x3FD;
-    sigA = ( sigA | UINT64_C( 0x0010000000000000 ) )<<10;
-    sigB = ( sigB | UINT64_C( 0x0010000000000000 ) )<<11;
-    if ( sigB <= ( sigA + sigA ) ) {
-        ++expZ;
-        sigA >>= 1;
-    }
-    sigZ = softfloat_estimateDiv128To64( sigA, 0, sigB );
-    if ( ( sigZ & 0x1FF ) <= 2 ) {
-        term = softfloat_mul64To128( sigB, sigZ );
-        rem = softfloat_sub128( sigA, 0, term.v64, term.v0 );
-        while ( UINT64_C( 0x8000000000000000 ) <= rem.v64 ) {
-            --sigZ;
-            rem = softfloat_add128( rem.v64, rem.v0, 0, sigB );
-        }
-        sigZ |= ( rem.v0 != 0 );
-    }
-    return softfloat_roundPackToF64( signZ, expZ, sigZ );
- propagateNaN:
-    uiZ = softfloat_propagateNaNF64UI( uiA, uiB );
-    goto uiZ;
- invalid:
-    softfloat_raiseFlags( softfloat_flag_invalid );
-    uiZ = defaultNaNF64UI;
-    goto uiZ;
- infinity:
-    uiZ = packToF64UI( signZ, 0x7FF, 0 );
-    goto uiZ;
- zero:
-    uiZ = packToF64UI( signZ, 0, 0 );
- uiZ:
-    uZ.ui = uiZ;
-    return uZ.f;
-
-}
-
diff --git a/softfloat/f64_eq.c b/softfloat/f64_eq.c
new file mode 100755 (executable)
index 0000000..925aabc
--- /dev/null
@@ -0,0 +1,35 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool f64_eq( float64_t a, float64_t b )
+{
+    union ui64_f64 uA;
+    uint_fast64_t uiA;
+    union ui64_f64 uB;
+    uint_fast64_t uiB;
+
+    uA.f = a;
+    uiA = uA.ui;
+    uB.f = b;
+    uiB = uB.ui;
+    if (
+           ( ( expF64UI( uiA ) == 0x7FF ) && fracF64UI( uiA ) )
+        || ( ( expF64UI( uiB ) == 0x7FF ) && fracF64UI( uiB ) )
+    ) {
+        if (
+            softfloat_isSigNaNF64UI( uiA ) || softfloat_isSigNaNF64UI( uiB )
+        ) {
+            softfloat_raiseFlags( softfloat_flag_invalid );
+        }
+        return false;
+    }
+    return
+        ( uiA == uiB ) || ! ( ( uiA | uiB ) & UINT64_C( 0x7FFFFFFFFFFFFFFF ) );
+
+}
+
diff --git a/softfloat/f64_eq.cc b/softfloat/f64_eq.cc
deleted file mode 100755 (executable)
index 925aabc..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "internals.h"
-#include "specialize.h"
-#include "softfloat.h"
-
-bool f64_eq( float64_t a, float64_t b )
-{
-    union ui64_f64 uA;
-    uint_fast64_t uiA;
-    union ui64_f64 uB;
-    uint_fast64_t uiB;
-
-    uA.f = a;
-    uiA = uA.ui;
-    uB.f = b;
-    uiB = uB.ui;
-    if (
-           ( ( expF64UI( uiA ) == 0x7FF ) && fracF64UI( uiA ) )
-        || ( ( expF64UI( uiB ) == 0x7FF ) && fracF64UI( uiB ) )
-    ) {
-        if (
-            softfloat_isSigNaNF64UI( uiA ) || softfloat_isSigNaNF64UI( uiB )
-        ) {
-            softfloat_raiseFlags( softfloat_flag_invalid );
-        }
-        return false;
-    }
-    return
-        ( uiA == uiB ) || ! ( ( uiA | uiB ) & UINT64_C( 0x7FFFFFFFFFFFFFFF ) );
-
-}
-
diff --git a/softfloat/f64_eq_signaling.c b/softfloat/f64_eq_signaling.c
new file mode 100755 (executable)
index 0000000..7a54dc1
--- /dev/null
@@ -0,0 +1,30 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+bool f64_eq_signaling( float64_t a, float64_t b )
+{
+    union ui64_f64 uA;
+    uint_fast64_t uiA;
+    union ui64_f64 uB;
+    uint_fast64_t uiB;
+
+    uA.f = a;
+    uiA = uA.ui;
+    uB.f = b;
+    uiB = uB.ui;
+    if (
+           ( ( expF64UI( uiA ) == 0x7FF ) && fracF64UI( uiA ) )
+        || ( ( expF64UI( uiB ) == 0x7FF ) && fracF64UI( uiB ) )
+    ) {
+        softfloat_raiseFlags( softfloat_flag_invalid );
+        return false;
+    }
+    return
+        ( uiA == uiB ) || ! ( ( uiA | uiB ) & UINT64_C( 0x7FFFFFFFFFFFFFFF ) );
+
+}
+
diff --git a/softfloat/f64_eq_signaling.cc b/softfloat/f64_eq_signaling.cc
deleted file mode 100755 (executable)
index 7a54dc1..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "internals.h"
-#include "softfloat.h"
-
-bool f64_eq_signaling( float64_t a, float64_t b )
-{
-    union ui64_f64 uA;
-    uint_fast64_t uiA;
-    union ui64_f64 uB;
-    uint_fast64_t uiB;
-
-    uA.f = a;
-    uiA = uA.ui;
-    uB.f = b;
-    uiB = uB.ui;
-    if (
-           ( ( expF64UI( uiA ) == 0x7FF ) && fracF64UI( uiA ) )
-        || ( ( expF64UI( uiB ) == 0x7FF ) && fracF64UI( uiB ) )
-    ) {
-        softfloat_raiseFlags( softfloat_flag_invalid );
-        return false;
-    }
-    return
-        ( uiA == uiB ) || ! ( ( uiA | uiB ) & UINT64_C( 0x7FFFFFFFFFFFFFFF ) );
-
-}
-
diff --git a/softfloat/f64_isSignalingNaN.c b/softfloat/f64_isSignalingNaN.c
new file mode 100755 (executable)
index 0000000..d720ac1
--- /dev/null
@@ -0,0 +1,16 @@
+
+#include <stdbool.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool f64_isSignalingNaN( float64_t a )
+{
+    union ui64_f64 uA;
+
+    uA.f = a;
+    return softfloat_isSigNaNF64UI( uA.ui );
+
+}
+
diff --git a/softfloat/f64_isSignalingNaN.cc b/softfloat/f64_isSignalingNaN.cc
deleted file mode 100755 (executable)
index d720ac1..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-
-#include <stdbool.h>
-#include "platform.h"
-#include "internals.h"
-#include "specialize.h"
-#include "softfloat.h"
-
-bool f64_isSignalingNaN( float64_t a )
-{
-    union ui64_f64 uA;
-
-    uA.f = a;
-    return softfloat_isSigNaNF64UI( uA.ui );
-
-}
-
diff --git a/softfloat/f64_le.c b/softfloat/f64_le.c
new file mode 100755 (executable)
index 0000000..e6c5caf
--- /dev/null
@@ -0,0 +1,35 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+bool f64_le( float64_t a, float64_t b )
+{
+    union ui64_f64 uA;
+    uint_fast64_t uiA;
+    union ui64_f64 uB;
+    uint_fast64_t uiB;
+    bool signA, signB;
+
+    uA.f = a;
+    uiA = uA.ui;
+    uB.f = b;
+    uiB = uB.ui;
+    if (
+           ( ( expF64UI( uiA ) == 0x7FF ) && fracF64UI( uiA ) )
+        || ( ( expF64UI( uiB ) == 0x7FF ) && fracF64UI( uiB ) )
+    ) {
+        softfloat_raiseFlags( softfloat_flag_invalid );
+        return false;
+    }
+    signA = signF64UI( uiA );
+    signB = signF64UI( uiB );
+    return
+        ( signA != signB )
+            ? signA || ! ( ( uiA | uiB ) & UINT64_C( 0x7FFFFFFFFFFFFFFF ) )
+            : ( uiA == uiB ) || ( signA ^ ( uiA < uiB ) );
+
+}
+
diff --git a/softfloat/f64_le.cc b/softfloat/f64_le.cc
deleted file mode 100755 (executable)
index e6c5caf..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "internals.h"
-#include "softfloat.h"
-
-bool f64_le( float64_t a, float64_t b )
-{
-    union ui64_f64 uA;
-    uint_fast64_t uiA;
-    union ui64_f64 uB;
-    uint_fast64_t uiB;
-    bool signA, signB;
-
-    uA.f = a;
-    uiA = uA.ui;
-    uB.f = b;
-    uiB = uB.ui;
-    if (
-           ( ( expF64UI( uiA ) == 0x7FF ) && fracF64UI( uiA ) )
-        || ( ( expF64UI( uiB ) == 0x7FF ) && fracF64UI( uiB ) )
-    ) {
-        softfloat_raiseFlags( softfloat_flag_invalid );
-        return false;
-    }
-    signA = signF64UI( uiA );
-    signB = signF64UI( uiB );
-    return
-        ( signA != signB )
-            ? signA || ! ( ( uiA | uiB ) & UINT64_C( 0x7FFFFFFFFFFFFFFF ) )
-            : ( uiA == uiB ) || ( signA ^ ( uiA < uiB ) );
-
-}
-
diff --git a/softfloat/f64_le_quiet.c b/softfloat/f64_le_quiet.c
new file mode 100755 (executable)
index 0000000..e9b7ede
--- /dev/null
@@ -0,0 +1,40 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool f64_le_quiet( float64_t a, float64_t b )
+{
+    union ui64_f64 uA;
+    uint_fast64_t uiA;
+    union ui64_f64 uB;
+    uint_fast64_t uiB;
+    bool signA, signB;
+
+    uA.f = a;
+    uiA = uA.ui;
+    uB.f = b;
+    uiB = uB.ui;
+    if (
+           ( ( expF64UI( uiA ) == 0x7FF ) && fracF64UI( uiA ) )
+        || ( ( expF64UI( uiB ) == 0x7FF ) && fracF64UI( uiB ) )
+    ) {
+        if (
+            softfloat_isSigNaNF64UI( uiA ) || softfloat_isSigNaNF64UI( uiB )
+        ) {
+            softfloat_raiseFlags( softfloat_flag_invalid );
+        }
+        return false;
+    }
+    signA = signF64UI( uiA );
+    signB = signF64UI( uiB );
+    return
+        ( signA != signB )
+            ? signA || ! ( ( uiA | uiB ) & UINT64_C( 0x7FFFFFFFFFFFFFFF ) )
+            : ( uiA == uiB ) || ( signA ^ ( uiA < uiB ) );
+
+}
+
diff --git a/softfloat/f64_le_quiet.cc b/softfloat/f64_le_quiet.cc
deleted file mode 100755 (executable)
index e9b7ede..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "internals.h"
-#include "specialize.h"
-#include "softfloat.h"
-
-bool f64_le_quiet( float64_t a, float64_t b )
-{
-    union ui64_f64 uA;
-    uint_fast64_t uiA;
-    union ui64_f64 uB;
-    uint_fast64_t uiB;
-    bool signA, signB;
-
-    uA.f = a;
-    uiA = uA.ui;
-    uB.f = b;
-    uiB = uB.ui;
-    if (
-           ( ( expF64UI( uiA ) == 0x7FF ) && fracF64UI( uiA ) )
-        || ( ( expF64UI( uiB ) == 0x7FF ) && fracF64UI( uiB ) )
-    ) {
-        if (
-            softfloat_isSigNaNF64UI( uiA ) || softfloat_isSigNaNF64UI( uiB )
-        ) {
-            softfloat_raiseFlags( softfloat_flag_invalid );
-        }
-        return false;
-    }
-    signA = signF64UI( uiA );
-    signB = signF64UI( uiB );
-    return
-        ( signA != signB )
-            ? signA || ! ( ( uiA | uiB ) & UINT64_C( 0x7FFFFFFFFFFFFFFF ) )
-            : ( uiA == uiB ) || ( signA ^ ( uiA < uiB ) );
-
-}
-
diff --git a/softfloat/f64_lt.c b/softfloat/f64_lt.c
new file mode 100755 (executable)
index 0000000..1b2f696
--- /dev/null
@@ -0,0 +1,35 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+bool f64_lt( float64_t a, float64_t b )
+{
+    union ui64_f64 uA;
+    uint_fast64_t uiA;
+    union ui64_f64 uB;
+    uint_fast64_t uiB;
+    bool signA, signB;
+
+    uA.f = a;
+    uiA = uA.ui;
+    uB.f = b;
+    uiB = uB.ui;
+    if (
+           ( ( expF64UI( uiA ) == 0x7FF ) && fracF64UI( uiA ) )
+        || ( ( expF64UI( uiB ) == 0x7FF ) && fracF64UI( uiB ) )
+    ) {
+        softfloat_raiseFlags( softfloat_flag_invalid );
+        return false;
+    }
+    signA = signF64UI( uiA );
+    signB = signF64UI( uiB );
+    return
+        ( signA != signB )
+            ? signA && ( ( uiA | uiB ) & UINT64_C( 0x7FFFFFFFFFFFFFFF ) )
+            : ( uiA != uiB ) && ( signA ^ ( uiA < uiB ) );
+
+}
+
diff --git a/softfloat/f64_lt.cc b/softfloat/f64_lt.cc
deleted file mode 100755 (executable)
index 1b2f696..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "internals.h"
-#include "softfloat.h"
-
-bool f64_lt( float64_t a, float64_t b )
-{
-    union ui64_f64 uA;
-    uint_fast64_t uiA;
-    union ui64_f64 uB;
-    uint_fast64_t uiB;
-    bool signA, signB;
-
-    uA.f = a;
-    uiA = uA.ui;
-    uB.f = b;
-    uiB = uB.ui;
-    if (
-           ( ( expF64UI( uiA ) == 0x7FF ) && fracF64UI( uiA ) )
-        || ( ( expF64UI( uiB ) == 0x7FF ) && fracF64UI( uiB ) )
-    ) {
-        softfloat_raiseFlags( softfloat_flag_invalid );
-        return false;
-    }
-    signA = signF64UI( uiA );
-    signB = signF64UI( uiB );
-    return
-        ( signA != signB )
-            ? signA && ( ( uiA | uiB ) & UINT64_C( 0x7FFFFFFFFFFFFFFF ) )
-            : ( uiA != uiB ) && ( signA ^ ( uiA < uiB ) );
-
-}
-
diff --git a/softfloat/f64_lt_quiet.c b/softfloat/f64_lt_quiet.c
new file mode 100755 (executable)
index 0000000..f27e6da
--- /dev/null
@@ -0,0 +1,40 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+bool f64_lt_quiet( float64_t a, float64_t b )
+{
+    union ui64_f64 uA;
+    uint_fast64_t uiA;
+    union ui64_f64 uB;
+    uint_fast64_t uiB;
+    bool signA, signB;
+
+    uA.f = a;
+    uiA = uA.ui;
+    uB.f = b;
+    uiB = uB.ui;
+    if (
+           ( ( expF64UI( uiA ) == 0x7FF ) && fracF64UI( uiA ) )
+        || ( ( expF64UI( uiB ) == 0x7FF ) && fracF64UI( uiB ) )
+    ) {
+        if (
+            softfloat_isSigNaNF64UI( uiA ) || softfloat_isSigNaNF64UI( uiB )
+        ) {
+            softfloat_raiseFlags( softfloat_flag_invalid );
+        }
+        return false;
+    }
+    signA = signF64UI( uiA );
+    signB = signF64UI( uiB );
+    return
+        ( signA != signB )
+            ? signA && ( ( uiA | uiB ) & UINT64_C( 0x7FFFFFFFFFFFFFFF ) )
+            : ( uiA != uiB ) && ( signA ^ ( uiA < uiB ) );
+
+}
+
diff --git a/softfloat/f64_lt_quiet.cc b/softfloat/f64_lt_quiet.cc
deleted file mode 100755 (executable)
index f27e6da..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "internals.h"
-#include "specialize.h"
-#include "softfloat.h"
-
-bool f64_lt_quiet( float64_t a, float64_t b )
-{
-    union ui64_f64 uA;
-    uint_fast64_t uiA;
-    union ui64_f64 uB;
-    uint_fast64_t uiB;
-    bool signA, signB;
-
-    uA.f = a;
-    uiA = uA.ui;
-    uB.f = b;
-    uiB = uB.ui;
-    if (
-           ( ( expF64UI( uiA ) == 0x7FF ) && fracF64UI( uiA ) )
-        || ( ( expF64UI( uiB ) == 0x7FF ) && fracF64UI( uiB ) )
-    ) {
-        if (
-            softfloat_isSigNaNF64UI( uiA ) || softfloat_isSigNaNF64UI( uiB )
-        ) {
-            softfloat_raiseFlags( softfloat_flag_invalid );
-        }
-        return false;
-    }
-    signA = signF64UI( uiA );
-    signB = signF64UI( uiB );
-    return
-        ( signA != signB )
-            ? signA && ( ( uiA | uiB ) & UINT64_C( 0x7FFFFFFFFFFFFFFF ) )
-            : ( uiA != uiB ) && ( signA ^ ( uiA < uiB ) );
-
-}
-
diff --git a/softfloat/f64_mul.c b/softfloat/f64_mul.c
new file mode 100755 (executable)
index 0000000..4b5dc4e
--- /dev/null
@@ -0,0 +1,91 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+#include "specialize.h"\r
+#include "softfloat.h"\r
+\r
+float64_t f64_mul( float64_t a, float64_t b )\r
+{\r
+    union ui64_f64 uA;\r
+    uint_fast64_t uiA;\r
+    bool signA;\r
+    int_fast16_t expA;\r
+    uint_fast64_t sigA;\r
+    union ui64_f64 uB;\r
+    uint_fast64_t uiB;\r
+    bool signB;\r
+    int_fast16_t expB;\r
+    uint_fast64_t sigB;\r
+    bool signZ;\r
+    uint_fast64_t magBits;\r
+    struct exp16_sig64 normExpSig;\r
+    int_fast16_t expZ;\r
+    struct uint128 sigZ128;\r
+    uint_fast64_t sigZ, uiZ;\r
+    union ui64_f64 uZ;\r
+\r
+    uA.f = a;\r
+    uiA = uA.ui;\r
+    signA = signF64UI( uiA );\r
+    expA = expF64UI( uiA );\r
+    sigA = fracF64UI( uiA );\r
+    uB.f = b;\r
+    uiB = uB.ui;\r
+    signB = signF64UI( uiB );\r
+    expB = expF64UI( uiB );\r
+    sigB = fracF64UI( uiB );\r
+    signZ = signA ^ signB;\r
+    if ( expA == 0x7FF ) {\r
+        if ( sigA || ( ( expB == 0x7FF ) && sigB ) ) goto propagateNaN;\r
+        magBits = expB | sigB;\r
+        goto infArg;\r
+    }\r
+    if ( expB == 0x7FF ) {\r
+        if ( sigB ) goto propagateNaN;\r
+        magBits = expA | sigA;\r
+        goto infArg;\r
+    }\r
+    if ( ! expA ) {\r
+        if ( ! sigA ) goto zero;\r
+        normExpSig = softfloat_normSubnormalF64Sig( sigA );\r
+        expA = normExpSig.exp;\r
+        sigA = normExpSig.sig;\r
+    }\r
+    if ( ! expB ) {\r
+        if ( ! sigB ) goto zero;\r
+        normExpSig = softfloat_normSubnormalF64Sig( sigB );\r
+        expB = normExpSig.exp;\r
+        sigB = normExpSig.sig;\r
+    }\r
+    expZ = expA + expB - 0x3FF;\r
+    sigA = ( sigA | UINT64_C( 0x0010000000000000 ) )<<10;\r
+    sigB = ( sigB | UINT64_C( 0x0010000000000000 ) )<<11;\r
+    sigZ128 = softfloat_mul64To128( sigA, sigB );\r
+    sigZ = sigZ128.v64 | ( sigZ128.v0 != 0 );\r
+    if ( sigZ < UINT64_C( 0x4000000000000000 ) ) {\r
+        --expZ;\r
+        sigZ <<= 1;\r
+    }\r
+    return softfloat_roundPackToF64( signZ, expZ, sigZ );\r
+ propagateNaN:\r
+    uiZ = softfloat_propagateNaNF64UI( uiA, uiB );\r
+    goto uiZ;\r
+ infArg:\r
+    if ( ! magBits ) {\r
+        softfloat_raiseFlags( softfloat_flag_invalid );\r
+        uiZ = defaultNaNF64UI;\r
+    } else {\r
+        uiZ = packToF64UI( signZ, 0x7FF, 0 );\r
+    }\r
+    goto uiZ;\r
+ zero:\r
+    uiZ = packToF64UI( signZ, 0, 0 );\r
+ uiZ:\r
+    uZ.ui = uiZ;\r
+    return uZ.f;\r
+\r
+}\r
+\r
diff --git a/softfloat/f64_mul.cc b/softfloat/f64_mul.cc
deleted file mode 100755 (executable)
index 4b5dc4e..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-#include "specialize.h"\r
-#include "softfloat.h"\r
-\r
-float64_t f64_mul( float64_t a, float64_t b )\r
-{\r
-    union ui64_f64 uA;\r
-    uint_fast64_t uiA;\r
-    bool signA;\r
-    int_fast16_t expA;\r
-    uint_fast64_t sigA;\r
-    union ui64_f64 uB;\r
-    uint_fast64_t uiB;\r
-    bool signB;\r
-    int_fast16_t expB;\r
-    uint_fast64_t sigB;\r
-    bool signZ;\r
-    uint_fast64_t magBits;\r
-    struct exp16_sig64 normExpSig;\r
-    int_fast16_t expZ;\r
-    struct uint128 sigZ128;\r
-    uint_fast64_t sigZ, uiZ;\r
-    union ui64_f64 uZ;\r
-\r
-    uA.f = a;\r
-    uiA = uA.ui;\r
-    signA = signF64UI( uiA );\r
-    expA = expF64UI( uiA );\r
-    sigA = fracF64UI( uiA );\r
-    uB.f = b;\r
-    uiB = uB.ui;\r
-    signB = signF64UI( uiB );\r
-    expB = expF64UI( uiB );\r
-    sigB = fracF64UI( uiB );\r
-    signZ = signA ^ signB;\r
-    if ( expA == 0x7FF ) {\r
-        if ( sigA || ( ( expB == 0x7FF ) && sigB ) ) goto propagateNaN;\r
-        magBits = expB | sigB;\r
-        goto infArg;\r
-    }\r
-    if ( expB == 0x7FF ) {\r
-        if ( sigB ) goto propagateNaN;\r
-        magBits = expA | sigA;\r
-        goto infArg;\r
-    }\r
-    if ( ! expA ) {\r
-        if ( ! sigA ) goto zero;\r
-        normExpSig = softfloat_normSubnormalF64Sig( sigA );\r
-        expA = normExpSig.exp;\r
-        sigA = normExpSig.sig;\r
-    }\r
-    if ( ! expB ) {\r
-        if ( ! sigB ) goto zero;\r
-        normExpSig = softfloat_normSubnormalF64Sig( sigB );\r
-        expB = normExpSig.exp;\r
-        sigB = normExpSig.sig;\r
-    }\r
-    expZ = expA + expB - 0x3FF;\r
-    sigA = ( sigA | UINT64_C( 0x0010000000000000 ) )<<10;\r
-    sigB = ( sigB | UINT64_C( 0x0010000000000000 ) )<<11;\r
-    sigZ128 = softfloat_mul64To128( sigA, sigB );\r
-    sigZ = sigZ128.v64 | ( sigZ128.v0 != 0 );\r
-    if ( sigZ < UINT64_C( 0x4000000000000000 ) ) {\r
-        --expZ;\r
-        sigZ <<= 1;\r
-    }\r
-    return softfloat_roundPackToF64( signZ, expZ, sigZ );\r
- propagateNaN:\r
-    uiZ = softfloat_propagateNaNF64UI( uiA, uiB );\r
-    goto uiZ;\r
- infArg:\r
-    if ( ! magBits ) {\r
-        softfloat_raiseFlags( softfloat_flag_invalid );\r
-        uiZ = defaultNaNF64UI;\r
-    } else {\r
-        uiZ = packToF64UI( signZ, 0x7FF, 0 );\r
-    }\r
-    goto uiZ;\r
- zero:\r
-    uiZ = packToF64UI( signZ, 0, 0 );\r
- uiZ:\r
-    uZ.ui = uiZ;\r
-    return uZ.f;\r
-\r
-}\r
-\r
diff --git a/softfloat/f64_mulAdd.c b/softfloat/f64_mulAdd.c
new file mode 100755 (executable)
index 0000000..fa1669a
--- /dev/null
@@ -0,0 +1,25 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+float64_t f64_mulAdd( float64_t a, float64_t b, float64_t c )\r
+{\r
+    union ui64_f64 uA;\r
+    uint_fast64_t uiA;\r
+    union ui64_f64 uB;\r
+    uint_fast64_t uiB;\r
+    union ui64_f64 uC;\r
+    uint_fast64_t uiC;\r
+\r
+    uA.f = a;\r
+    uiA = uA.ui;\r
+    uB.f = b;\r
+    uiB = uB.ui;\r
+    uC.f = c;\r
+    uiC = uC.ui;\r
+    return softfloat_mulAddF64( 0, uiA, uiB, uiC );\r
+\r
+}\r
+\r
diff --git a/softfloat/f64_mulAdd.cc b/softfloat/f64_mulAdd.cc
deleted file mode 100755 (executable)
index fa1669a..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-float64_t f64_mulAdd( float64_t a, float64_t b, float64_t c )\r
-{\r
-    union ui64_f64 uA;\r
-    uint_fast64_t uiA;\r
-    union ui64_f64 uB;\r
-    uint_fast64_t uiB;\r
-    union ui64_f64 uC;\r
-    uint_fast64_t uiC;\r
-\r
-    uA.f = a;\r
-    uiA = uA.ui;\r
-    uB.f = b;\r
-    uiB = uB.ui;\r
-    uC.f = c;\r
-    uiC = uC.ui;\r
-    return softfloat_mulAddF64( 0, uiA, uiB, uiC );\r
-\r
-}\r
-\r
diff --git a/softfloat/f64_rem.c b/softfloat/f64_rem.c
new file mode 100755 (executable)
index 0000000..08fcd78
--- /dev/null
@@ -0,0 +1,113 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float64_t f64_rem( float64_t a, float64_t b )
+{
+    union ui64_f64 uA;
+    uint_fast64_t uiA;
+    bool signA;
+    int_fast16_t expA;
+    uint_fast64_t sigA;
+    union ui64_f64 uB;
+    uint_fast64_t uiB;
+    bool signB;
+    int_fast16_t expB;
+    uint_fast64_t sigB;
+    struct exp16_sig64 normExpSig;
+    int_fast16_t expDiff;
+    uint_fast64_t q, alternateSigA;
+    uint64_t sigMean;
+    bool signZ;
+    uint_fast64_t uiZ;
+    union ui64_f64 uZ;
+
+    uA.f = a;
+    uiA = uA.ui;
+    signA = signF64UI( uiA );
+    expA = expF64UI( uiA );
+    sigA = fracF64UI( uiA );
+    uB.f = b;
+    uiB = uB.ui;
+    signB = signF64UI( uiB );
+    expB = expF64UI( uiB );
+    sigB = fracF64UI( uiB );
+    if ( expA == 0x7FF ) {
+        if ( sigA || ( ( expB == 0x7FF ) && sigB ) ) goto propagateNaN;
+        goto invalid;
+    }
+    if ( expB == 0x7FF ) {
+        if ( sigB ) goto propagateNaN;
+        return a;
+    }
+    if ( ! expB ) {
+        if ( ! sigB ) goto invalid;
+        normExpSig = softfloat_normSubnormalF64Sig( sigB );
+        expB = normExpSig.exp;
+        sigB = normExpSig.sig;
+    }
+    if ( ! expA ) {
+        if ( ! sigA ) return a;
+        normExpSig = softfloat_normSubnormalF64Sig( sigA );
+        expA = normExpSig.exp;
+        sigA = normExpSig.sig;
+    }
+    expDiff = expA - expB;
+    sigA = ( sigA | UINT64_C( 0x0010000000000000 ) )<<11;
+    sigB = ( sigB | UINT64_C( 0x0010000000000000 ) )<<11;
+    if ( expDiff < 0 ) {
+        if ( expDiff < -1 ) return a;
+        sigA >>= 1;
+    }
+    q = ( sigB <= sigA );
+    if ( q ) sigA -= sigB;
+    expDiff -= 64;
+    while ( 0 < expDiff ) {
+        q = softfloat_estimateDiv128To64( sigA, 0, sigB );
+        q = ( 2 < q ) ? q - 2 : 0;
+        sigA = - ( ( sigB>>2 ) * q );
+        expDiff -= 62;
+    }
+    expDiff += 64;
+    if ( 0 < expDiff ) {
+        q = softfloat_estimateDiv128To64( sigA, 0, sigB );
+        q = ( 2 < q ) ? q - 2 : 0;
+        q >>= 64 - expDiff;
+        sigB >>= 2;
+        sigA = ( ( sigA>>1 )<<( expDiff - 1 ) ) - sigB * q;
+    } else {
+        sigA >>= 2;
+        sigB >>= 2;
+    }
+    do {
+        alternateSigA = sigA;
+        ++q;
+        sigA -= sigB;
+    } while ( sigA < UINT64_C( 0x8000000000000000 ) );
+    sigMean = sigA + alternateSigA;
+    if (
+        ( UINT64_C( 0x8000000000000000 ) <= sigMean )
+            || ( ! sigMean && ( q & 1 ) )
+    ) {
+        sigA = alternateSigA;
+    }
+    signZ = ( UINT64_C( 0x8000000000000000 ) <= sigA );
+    if ( signZ ) sigA = - sigA;
+    return softfloat_normRoundPackToF64( signA ^ signZ, expB, sigA );
+ propagateNaN:
+    uiZ = softfloat_propagateNaNF64UI( uiA, uiB );
+    goto uiZ;
+ invalid:
+    softfloat_raiseFlags( softfloat_flag_invalid );
+    uiZ = defaultNaNF64UI;
+ uiZ:
+    uZ.ui = uiZ;
+    return uZ.f;
+
+}
+
diff --git a/softfloat/f64_rem.cc b/softfloat/f64_rem.cc
deleted file mode 100755 (executable)
index 08fcd78..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "primitives.h"
-#include "internals.h"
-#include "specialize.h"
-#include "softfloat.h"
-
-float64_t f64_rem( float64_t a, float64_t b )
-{
-    union ui64_f64 uA;
-    uint_fast64_t uiA;
-    bool signA;
-    int_fast16_t expA;
-    uint_fast64_t sigA;
-    union ui64_f64 uB;
-    uint_fast64_t uiB;
-    bool signB;
-    int_fast16_t expB;
-    uint_fast64_t sigB;
-    struct exp16_sig64 normExpSig;
-    int_fast16_t expDiff;
-    uint_fast64_t q, alternateSigA;
-    uint64_t sigMean;
-    bool signZ;
-    uint_fast64_t uiZ;
-    union ui64_f64 uZ;
-
-    uA.f = a;
-    uiA = uA.ui;
-    signA = signF64UI( uiA );
-    expA = expF64UI( uiA );
-    sigA = fracF64UI( uiA );
-    uB.f = b;
-    uiB = uB.ui;
-    signB = signF64UI( uiB );
-    expB = expF64UI( uiB );
-    sigB = fracF64UI( uiB );
-    if ( expA == 0x7FF ) {
-        if ( sigA || ( ( expB == 0x7FF ) && sigB ) ) goto propagateNaN;
-        goto invalid;
-    }
-    if ( expB == 0x7FF ) {
-        if ( sigB ) goto propagateNaN;
-        return a;
-    }
-    if ( ! expB ) {
-        if ( ! sigB ) goto invalid;
-        normExpSig = softfloat_normSubnormalF64Sig( sigB );
-        expB = normExpSig.exp;
-        sigB = normExpSig.sig;
-    }
-    if ( ! expA ) {
-        if ( ! sigA ) return a;
-        normExpSig = softfloat_normSubnormalF64Sig( sigA );
-        expA = normExpSig.exp;
-        sigA = normExpSig.sig;
-    }
-    expDiff = expA - expB;
-    sigA = ( sigA | UINT64_C( 0x0010000000000000 ) )<<11;
-    sigB = ( sigB | UINT64_C( 0x0010000000000000 ) )<<11;
-    if ( expDiff < 0 ) {
-        if ( expDiff < -1 ) return a;
-        sigA >>= 1;
-    }
-    q = ( sigB <= sigA );
-    if ( q ) sigA -= sigB;
-    expDiff -= 64;
-    while ( 0 < expDiff ) {
-        q = softfloat_estimateDiv128To64( sigA, 0, sigB );
-        q = ( 2 < q ) ? q - 2 : 0;
-        sigA = - ( ( sigB>>2 ) * q );
-        expDiff -= 62;
-    }
-    expDiff += 64;
-    if ( 0 < expDiff ) {
-        q = softfloat_estimateDiv128To64( sigA, 0, sigB );
-        q = ( 2 < q ) ? q - 2 : 0;
-        q >>= 64 - expDiff;
-        sigB >>= 2;
-        sigA = ( ( sigA>>1 )<<( expDiff - 1 ) ) - sigB * q;
-    } else {
-        sigA >>= 2;
-        sigB >>= 2;
-    }
-    do {
-        alternateSigA = sigA;
-        ++q;
-        sigA -= sigB;
-    } while ( sigA < UINT64_C( 0x8000000000000000 ) );
-    sigMean = sigA + alternateSigA;
-    if (
-        ( UINT64_C( 0x8000000000000000 ) <= sigMean )
-            || ( ! sigMean && ( q & 1 ) )
-    ) {
-        sigA = alternateSigA;
-    }
-    signZ = ( UINT64_C( 0x8000000000000000 ) <= sigA );
-    if ( signZ ) sigA = - sigA;
-    return softfloat_normRoundPackToF64( signA ^ signZ, expB, sigA );
- propagateNaN:
-    uiZ = softfloat_propagateNaNF64UI( uiA, uiB );
-    goto uiZ;
- invalid:
-    softfloat_raiseFlags( softfloat_flag_invalid );
-    uiZ = defaultNaNF64UI;
- uiZ:
-    uZ.ui = uiZ;
-    return uZ.f;
-
-}
-
diff --git a/softfloat/f64_roundToInt.c b/softfloat/f64_roundToInt.c
new file mode 100755 (executable)
index 0000000..ef16dfa
--- /dev/null
@@ -0,0 +1,80 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float64_t f64_roundToInt( float64_t a, int_fast8_t roundingMode, bool exact )
+{
+    union ui64_f64 uA;
+    uint_fast64_t uiA;
+    int_fast16_t expA;
+    uint_fast64_t uiZ;
+    bool signA;
+    uint_fast64_t lastBitMask, roundBitsMask;
+    union ui64_f64 uZ;
+
+    uA.f = a;
+    uiA = uA.ui;
+    expA = expF64UI( uiA );
+    if ( 0x433 <= expA ) {
+        if ( ( expA == 0x7FF ) && fracF64UI( uiA ) ) {
+            uiZ = softfloat_propagateNaNF64UI( uiA, 0 );
+            goto uiZ;
+        }
+        return a;
+    }
+    if ( expA <= 0x3FE ) {
+        if ( ! ( uiA & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) ) return a;
+        if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+        signA = signF64UI( uiA );
+        switch ( roundingMode ) {
+         case softfloat_round_nearest_even:
+            if ( ( expA == 0x3FE ) && fracF64UI( uiA ) ) {
+                uiZ = packToF64UI( signA, 0x3FF, 0 );
+                goto uiZ;
+            }
+            break;
+         case softfloat_round_min:
+            uiZ = signA ? UINT64_C( 0xBFF0000000000000 ) : 0;
+            goto uiZ;
+         case softfloat_round_max:
+            uiZ =
+                signA ? UINT64_C( 0x8000000000000000 )
+                    : UINT64_C( 0x3FF0000000000000 );
+            goto uiZ;
+         case softfloat_round_nearest_maxMag:
+            if ( expA == 0x3FE ) {
+                uiZ = packToF64UI( signA, 0x3FF, 0 );
+                goto uiZ;
+            }
+            break;
+        }
+        uiZ = packToF64UI( signA, 0, 0 );
+        goto uiZ;
+    }
+    lastBitMask = (uint_fast64_t) 1<<( 0x433 - expA );
+    roundBitsMask = lastBitMask - 1;
+    uiZ = uiA;
+    if ( roundingMode == softfloat_round_nearest_maxMag ) {
+        uiZ += lastBitMask>>1;
+    } else if ( roundingMode == softfloat_round_nearest_even ) {
+        uiZ += lastBitMask>>1;
+        if ( ! ( uiZ & roundBitsMask ) ) uiZ &= ~ lastBitMask;
+    } else if ( roundingMode != softfloat_round_minMag ) {
+        if ( signF64UI( uiZ ) ^ ( roundingMode == softfloat_round_max ) ) {
+            uiZ += roundBitsMask;
+        }
+    }
+    uiZ &= ~ roundBitsMask;
+    if ( exact && ( uiZ != uiA ) ) {
+        softfloat_exceptionFlags |= softfloat_flag_inexact;
+    }
+ uiZ:
+    uZ.ui = uiZ;
+    return uZ.f;
+
+}
+
diff --git a/softfloat/f64_roundToInt.cc b/softfloat/f64_roundToInt.cc
deleted file mode 100755 (executable)
index ef16dfa..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "internals.h"
-#include "specialize.h"
-#include "softfloat.h"
-
-float64_t f64_roundToInt( float64_t a, int_fast8_t roundingMode, bool exact )
-{
-    union ui64_f64 uA;
-    uint_fast64_t uiA;
-    int_fast16_t expA;
-    uint_fast64_t uiZ;
-    bool signA;
-    uint_fast64_t lastBitMask, roundBitsMask;
-    union ui64_f64 uZ;
-
-    uA.f = a;
-    uiA = uA.ui;
-    expA = expF64UI( uiA );
-    if ( 0x433 <= expA ) {
-        if ( ( expA == 0x7FF ) && fracF64UI( uiA ) ) {
-            uiZ = softfloat_propagateNaNF64UI( uiA, 0 );
-            goto uiZ;
-        }
-        return a;
-    }
-    if ( expA <= 0x3FE ) {
-        if ( ! ( uiA & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) ) return a;
-        if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact;
-        signA = signF64UI( uiA );
-        switch ( roundingMode ) {
-         case softfloat_round_nearest_even:
-            if ( ( expA == 0x3FE ) && fracF64UI( uiA ) ) {
-                uiZ = packToF64UI( signA, 0x3FF, 0 );
-                goto uiZ;
-            }
-            break;
-         case softfloat_round_min:
-            uiZ = signA ? UINT64_C( 0xBFF0000000000000 ) : 0;
-            goto uiZ;
-         case softfloat_round_max:
-            uiZ =
-                signA ? UINT64_C( 0x8000000000000000 )
-                    : UINT64_C( 0x3FF0000000000000 );
-            goto uiZ;
-         case softfloat_round_nearest_maxMag:
-            if ( expA == 0x3FE ) {
-                uiZ = packToF64UI( signA, 0x3FF, 0 );
-                goto uiZ;
-            }
-            break;
-        }
-        uiZ = packToF64UI( signA, 0, 0 );
-        goto uiZ;
-    }
-    lastBitMask = (uint_fast64_t) 1<<( 0x433 - expA );
-    roundBitsMask = lastBitMask - 1;
-    uiZ = uiA;
-    if ( roundingMode == softfloat_round_nearest_maxMag ) {
-        uiZ += lastBitMask>>1;
-    } else if ( roundingMode == softfloat_round_nearest_even ) {
-        uiZ += lastBitMask>>1;
-        if ( ! ( uiZ & roundBitsMask ) ) uiZ &= ~ lastBitMask;
-    } else if ( roundingMode != softfloat_round_minMag ) {
-        if ( signF64UI( uiZ ) ^ ( roundingMode == softfloat_round_max ) ) {
-            uiZ += roundBitsMask;
-        }
-    }
-    uiZ &= ~ roundBitsMask;
-    if ( exact && ( uiZ != uiA ) ) {
-        softfloat_exceptionFlags |= softfloat_flag_inexact;
-    }
- uiZ:
-    uZ.ui = uiZ;
-    return uZ.f;
-
-}
-
diff --git a/softfloat/f64_sqrt.c b/softfloat/f64_sqrt.c
new file mode 100755 (executable)
index 0000000..cd91010
--- /dev/null
@@ -0,0 +1,74 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+#include "specialize.h"\r
+#include "softfloat.h"\r
+\r
+float64_t f64_sqrt( float64_t a )\r
+{\r
+    union ui64_f64 uA;\r
+    uint_fast64_t uiA;\r
+    bool signA;\r
+    int_fast16_t expA;\r
+    uint_fast64_t sigA, uiZ;\r
+    struct exp16_sig64 normExpSig;\r
+    int_fast16_t expZ;\r
+    uint_fast32_t sigZ32;\r
+    uint_fast64_t sigZ;\r
+    struct uint128 term, rem;\r
+    union ui64_f64 uZ;\r
+\r
+    uA.f = a;\r
+    uiA = uA.ui;\r
+    signA = signF64UI( uiA );\r
+    expA = expF64UI( uiA );\r
+    sigA = fracF64UI( uiA );\r
+    if ( expA == 0x7FF ) {\r
+        if ( sigA ) {\r
+            uiZ = softfloat_propagateNaNF64UI( uiA, 0 );\r
+            goto uiZ;\r
+        }\r
+        if ( ! signA ) return a;\r
+        goto invalid;\r
+    }\r
+    if ( signA ) {\r
+        if ( ! ( expA | sigA ) ) return a;\r
+        goto invalid;\r
+    }\r
+    if ( ! expA ) {\r
+        if ( ! sigA ) return a;\r
+        normExpSig = softfloat_normSubnormalF64Sig( sigA );\r
+        expA = normExpSig.exp;\r
+        sigA = normExpSig.sig;\r
+    }\r
+    expZ = ( ( expA - 0x3FF )>>1 ) + 0x3FE;\r
+    sigA |= UINT64_C( 0x0010000000000000 );\r
+    sigZ32 = softfloat_estimateSqrt32( expA, sigA>>21 );\r
+    sigA <<= 9 - ( expA & 1 );\r
+    sigZ =\r
+        softfloat_estimateDiv128To64( sigA, 0, (uint_fast64_t) sigZ32<<32 )\r
+            + ( (uint_fast64_t) sigZ32<<30 );\r
+    if ( ( sigZ & 0x1FF ) <= 5 ) {\r
+        term = softfloat_mul64To128( sigZ, sigZ );\r
+        rem = softfloat_sub128( sigA, 0, term.v64, term.v0 );\r
+        while ( UINT64_C( 0x8000000000000000 ) <= rem.v64 ) {\r
+            --sigZ;\r
+            rem =\r
+                softfloat_add128(\r
+                    rem.v64, rem.v0, sigZ>>63, (uint64_t) ( sigZ<<1 ) );\r
+        }\r
+        sigZ |= ( ( rem.v64 | rem.v0 ) != 0 );\r
+    }\r
+    return softfloat_roundPackToF64( 0, expZ, sigZ );\r
+ invalid:\r
+    softfloat_raiseFlags( softfloat_flag_invalid );\r
+    uiZ = defaultNaNF64UI;\r
+ uiZ:\r
+    uZ.ui = uiZ;\r
+    return uZ.f;\r
+\r
+}\r
+\r
diff --git a/softfloat/f64_sqrt.cc b/softfloat/f64_sqrt.cc
deleted file mode 100755 (executable)
index cd91010..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-#include "specialize.h"\r
-#include "softfloat.h"\r
-\r
-float64_t f64_sqrt( float64_t a )\r
-{\r
-    union ui64_f64 uA;\r
-    uint_fast64_t uiA;\r
-    bool signA;\r
-    int_fast16_t expA;\r
-    uint_fast64_t sigA, uiZ;\r
-    struct exp16_sig64 normExpSig;\r
-    int_fast16_t expZ;\r
-    uint_fast32_t sigZ32;\r
-    uint_fast64_t sigZ;\r
-    struct uint128 term, rem;\r
-    union ui64_f64 uZ;\r
-\r
-    uA.f = a;\r
-    uiA = uA.ui;\r
-    signA = signF64UI( uiA );\r
-    expA = expF64UI( uiA );\r
-    sigA = fracF64UI( uiA );\r
-    if ( expA == 0x7FF ) {\r
-        if ( sigA ) {\r
-            uiZ = softfloat_propagateNaNF64UI( uiA, 0 );\r
-            goto uiZ;\r
-        }\r
-        if ( ! signA ) return a;\r
-        goto invalid;\r
-    }\r
-    if ( signA ) {\r
-        if ( ! ( expA | sigA ) ) return a;\r
-        goto invalid;\r
-    }\r
-    if ( ! expA ) {\r
-        if ( ! sigA ) return a;\r
-        normExpSig = softfloat_normSubnormalF64Sig( sigA );\r
-        expA = normExpSig.exp;\r
-        sigA = normExpSig.sig;\r
-    }\r
-    expZ = ( ( expA - 0x3FF )>>1 ) + 0x3FE;\r
-    sigA |= UINT64_C( 0x0010000000000000 );\r
-    sigZ32 = softfloat_estimateSqrt32( expA, sigA>>21 );\r
-    sigA <<= 9 - ( expA & 1 );\r
-    sigZ =\r
-        softfloat_estimateDiv128To64( sigA, 0, (uint_fast64_t) sigZ32<<32 )\r
-            + ( (uint_fast64_t) sigZ32<<30 );\r
-    if ( ( sigZ & 0x1FF ) <= 5 ) {\r
-        term = softfloat_mul64To128( sigZ, sigZ );\r
-        rem = softfloat_sub128( sigA, 0, term.v64, term.v0 );\r
-        while ( UINT64_C( 0x8000000000000000 ) <= rem.v64 ) {\r
-            --sigZ;\r
-            rem =\r
-                softfloat_add128(\r
-                    rem.v64, rem.v0, sigZ>>63, (uint64_t) ( sigZ<<1 ) );\r
-        }\r
-        sigZ |= ( ( rem.v64 | rem.v0 ) != 0 );\r
-    }\r
-    return softfloat_roundPackToF64( 0, expZ, sigZ );\r
- invalid:\r
-    softfloat_raiseFlags( softfloat_flag_invalid );\r
-    uiZ = defaultNaNF64UI;\r
- uiZ:\r
-    uZ.ui = uiZ;\r
-    return uZ.f;\r
-\r
-}\r
-\r
diff --git a/softfloat/f64_sub.c b/softfloat/f64_sub.c
new file mode 100755 (executable)
index 0000000..38bd574
--- /dev/null
@@ -0,0 +1,29 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float64_t f64_sub( float64_t a, float64_t b )
+{
+    union ui64_f64 uA;
+    uint_fast64_t uiA;
+    bool signA;
+    union ui64_f64 uB;
+    uint_fast64_t uiB;
+    bool signB;
+    float64_t ( *magsRoutine )( uint_fast64_t, uint_fast64_t, bool );
+
+    uA.f = a;
+    uiA = uA.ui;
+    signA = signF64UI( uiA );
+    uB.f = b;
+    uiB = uB.ui;
+    signB = signF64UI( uiB );
+    magsRoutine =
+        ( signA == signB ) ? softfloat_subMagsF64 : softfloat_addMagsF64;
+    return magsRoutine( uiA, uiB, signA );
+
+}
+
diff --git a/softfloat/f64_sub.cc b/softfloat/f64_sub.cc
deleted file mode 100755 (executable)
index 38bd574..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "internals.h"
-#include "softfloat.h"
-
-float64_t f64_sub( float64_t a, float64_t b )
-{
-    union ui64_f64 uA;
-    uint_fast64_t uiA;
-    bool signA;
-    union ui64_f64 uB;
-    uint_fast64_t uiB;
-    bool signB;
-    float64_t ( *magsRoutine )( uint_fast64_t, uint_fast64_t, bool );
-
-    uA.f = a;
-    uiA = uA.ui;
-    signA = signF64UI( uiA );
-    uB.f = b;
-    uiB = uB.ui;
-    signB = signF64UI( uiB );
-    magsRoutine =
-        ( signA == signB ) ? softfloat_subMagsF64 : softfloat_addMagsF64;
-    return magsRoutine( uiA, uiB, signA );
-
-}
-
diff --git a/softfloat/f64_to_f32.c b/softfloat/f64_to_f32.c
new file mode 100755 (executable)
index 0000000..395d6c6
--- /dev/null
@@ -0,0 +1,43 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+#include "specialize.h"\r
+#include "softfloat.h"\r
+\r
+float32_t f64_to_f32( float64_t a )\r
+{\r
+    union ui64_f64 uA;\r
+    uint_fast64_t uiA;\r
+    bool sign;\r
+    int_fast16_t exp;\r
+    uint_fast64_t sig;\r
+    uint_fast32_t uiZ, sig32;\r
+    union ui32_f32 uZ;\r
+\r
+    uA.f = a;\r
+    uiA = uA.ui;\r
+    sign = signF64UI( uiA );\r
+    exp = expF64UI( uiA );\r
+    sig = fracF64UI( uiA );\r
+    if ( exp == 0x7FF ) {\r
+        uiZ =\r
+            sig ? softfloat_commonNaNToF32UI(\r
+                      softfloat_f64UIToCommonNaN( uiA ) )\r
+                : packToF32UI( sign, 0xFF, 0 );\r
+        goto uiZ;\r
+    }\r
+    sig32 = softfloat_shortShift64RightJam( sig, 22 );\r
+    if ( ! ( exp | sig32 ) ) {\r
+        uiZ = packToF32UI( sign, 0, 0 );\r
+        goto uiZ;\r
+    }\r
+    return softfloat_roundPackToF32( sign, exp - 0x381, sig32 | 0x40000000 );\r
+ uiZ:\r
+    uZ.ui = uiZ;\r
+    return uZ.f;\r
+\r
+}\r
+\r
diff --git a/softfloat/f64_to_f32.cc b/softfloat/f64_to_f32.cc
deleted file mode 100755 (executable)
index 395d6c6..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-#include "specialize.h"\r
-#include "softfloat.h"\r
-\r
-float32_t f64_to_f32( float64_t a )\r
-{\r
-    union ui64_f64 uA;\r
-    uint_fast64_t uiA;\r
-    bool sign;\r
-    int_fast16_t exp;\r
-    uint_fast64_t sig;\r
-    uint_fast32_t uiZ, sig32;\r
-    union ui32_f32 uZ;\r
-\r
-    uA.f = a;\r
-    uiA = uA.ui;\r
-    sign = signF64UI( uiA );\r
-    exp = expF64UI( uiA );\r
-    sig = fracF64UI( uiA );\r
-    if ( exp == 0x7FF ) {\r
-        uiZ =\r
-            sig ? softfloat_commonNaNToF32UI(\r
-                      softfloat_f64UIToCommonNaN( uiA ) )\r
-                : packToF32UI( sign, 0xFF, 0 );\r
-        goto uiZ;\r
-    }\r
-    sig32 = softfloat_shortShift64RightJam( sig, 22 );\r
-    if ( ! ( exp | sig32 ) ) {\r
-        uiZ = packToF32UI( sign, 0, 0 );\r
-        goto uiZ;\r
-    }\r
-    return softfloat_roundPackToF32( sign, exp - 0x381, sig32 | 0x40000000 );\r
- uiZ:\r
-    uZ.ui = uiZ;\r
-    return uZ.f;\r
-\r
-}\r
-\r
diff --git a/softfloat/f64_to_i32.c b/softfloat/f64_to_i32.c
new file mode 100755 (executable)
index 0000000..0778a86
--- /dev/null
@@ -0,0 +1,30 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+int_fast32_t f64_to_i32( float64_t a, int_fast8_t roundingMode, bool exact )\r
+{\r
+    union ui64_f64 uA;\r
+    uint_fast64_t uiA;\r
+    bool sign;\r
+    int_fast16_t exp;\r
+    uint_fast64_t sig;\r
+    int_fast16_t shiftCount;\r
+\r
+    uA.f = a;\r
+    uiA = uA.ui;\r
+    sign = signF64UI( uiA );\r
+    exp = expF64UI( uiA );\r
+    sig = fracF64UI( uiA );\r
+    if ( ( exp == 0x7FF ) && sig ) sign = 0;\r
+    if ( exp ) sig |= UINT64_C( 0x0010000000000000 );\r
+    shiftCount = 0x42C - exp;\r
+    if ( 0 < shiftCount ) sig = softfloat_shift64RightJam( sig, shiftCount );\r
+    return softfloat_roundPackToI32( sign, sig, roundingMode, exact );\r
+\r
+}\r
+\r
diff --git a/softfloat/f64_to_i32.cc b/softfloat/f64_to_i32.cc
deleted file mode 100755 (executable)
index 0778a86..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-int_fast32_t f64_to_i32( float64_t a, int_fast8_t roundingMode, bool exact )\r
-{\r
-    union ui64_f64 uA;\r
-    uint_fast64_t uiA;\r
-    bool sign;\r
-    int_fast16_t exp;\r
-    uint_fast64_t sig;\r
-    int_fast16_t shiftCount;\r
-\r
-    uA.f = a;\r
-    uiA = uA.ui;\r
-    sign = signF64UI( uiA );\r
-    exp = expF64UI( uiA );\r
-    sig = fracF64UI( uiA );\r
-    if ( ( exp == 0x7FF ) && sig ) sign = 0;\r
-    if ( exp ) sig |= UINT64_C( 0x0010000000000000 );\r
-    shiftCount = 0x42C - exp;\r
-    if ( 0 < shiftCount ) sig = softfloat_shift64RightJam( sig, shiftCount );\r
-    return softfloat_roundPackToI32( sign, sig, roundingMode, exact );\r
-\r
-}\r
-\r
diff --git a/softfloat/f64_to_i32_r_minMag.c b/softfloat/f64_to_i32_r_minMag.c
new file mode 100755 (executable)
index 0000000..39246c2
--- /dev/null
@@ -0,0 +1,50 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+int_fast32_t f64_to_i32_r_minMag( float64_t a, bool exact )\r
+{\r
+    union ui64_f64 uA;\r
+    uint_fast64_t uiA;\r
+    int_fast16_t exp;\r
+    uint_fast64_t sig;\r
+    bool sign;\r
+    int_fast16_t shiftCount;\r
+    uint_fast32_t absZ;\r
+    union { uint32_t ui; int32_t i; } uZ;\r
+    int_fast32_t z;\r
+\r
+    uA.f = a;\r
+    uiA = uA.ui;\r
+    exp = expF64UI( uiA );\r
+    sig = fracF64UI( uiA );\r
+    if ( exp < 0x3FF ) {\r
+        if ( exact && ( exp | sig ) ) {\r
+            softfloat_exceptionFlags |= softfloat_flag_inexact;\r
+        }\r
+        return 0;\r
+    }\r
+    sign = signF64UI( uiA );\r
+    if ( 0x41E < exp ) {\r
+        if ( ( exp == 0x7FF ) && sig ) sign = 0;\r
+        goto invalid;\r
+    }\r
+    sig |= UINT64_C( 0x0010000000000000 );\r
+    shiftCount = 0x433 - exp;\r
+    absZ = sig>>shiftCount;\r
+    uZ.ui = sign ? - absZ : absZ;\r
+    z = uZ.i;\r
+    if ( ( z < 0 ) != sign ) goto invalid;\r
+    if ( exact && ( (uint_fast64_t) absZ<<shiftCount != sig ) ) {\r
+        softfloat_exceptionFlags |= softfloat_flag_inexact;\r
+    }\r
+    return z;\r
+ invalid:\r
+    softfloat_raiseFlags( softfloat_flag_invalid );\r
+    return sign ? -0x7FFFFFFF - 1 : 0x7FFFFFFF;\r
+\r
+}\r
+\r
diff --git a/softfloat/f64_to_i32_r_minMag.cc b/softfloat/f64_to_i32_r_minMag.cc
deleted file mode 100755 (executable)
index 39246c2..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-int_fast32_t f64_to_i32_r_minMag( float64_t a, bool exact )\r
-{\r
-    union ui64_f64 uA;\r
-    uint_fast64_t uiA;\r
-    int_fast16_t exp;\r
-    uint_fast64_t sig;\r
-    bool sign;\r
-    int_fast16_t shiftCount;\r
-    uint_fast32_t absZ;\r
-    union { uint32_t ui; int32_t i; } uZ;\r
-    int_fast32_t z;\r
-\r
-    uA.f = a;\r
-    uiA = uA.ui;\r
-    exp = expF64UI( uiA );\r
-    sig = fracF64UI( uiA );\r
-    if ( exp < 0x3FF ) {\r
-        if ( exact && ( exp | sig ) ) {\r
-            softfloat_exceptionFlags |= softfloat_flag_inexact;\r
-        }\r
-        return 0;\r
-    }\r
-    sign = signF64UI( uiA );\r
-    if ( 0x41E < exp ) {\r
-        if ( ( exp == 0x7FF ) && sig ) sign = 0;\r
-        goto invalid;\r
-    }\r
-    sig |= UINT64_C( 0x0010000000000000 );\r
-    shiftCount = 0x433 - exp;\r
-    absZ = sig>>shiftCount;\r
-    uZ.ui = sign ? - absZ : absZ;\r
-    z = uZ.i;\r
-    if ( ( z < 0 ) != sign ) goto invalid;\r
-    if ( exact && ( (uint_fast64_t) absZ<<shiftCount != sig ) ) {\r
-        softfloat_exceptionFlags |= softfloat_flag_inexact;\r
-    }\r
-    return z;\r
- invalid:\r
-    softfloat_raiseFlags( softfloat_flag_invalid );\r
-    return sign ? -0x7FFFFFFF - 1 : 0x7FFFFFFF;\r
-\r
-}\r
-\r
diff --git a/softfloat/f64_to_i64.c b/softfloat/f64_to_i64.c
new file mode 100755 (executable)
index 0000000..89663ee
--- /dev/null
@@ -0,0 +1,46 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+int_fast64_t f64_to_i64( float64_t a, int_fast8_t roundingMode, bool exact )\r
+{\r
+    union ui64_f64 uA;\r
+    uint_fast64_t uiA;\r
+    bool sign;\r
+    int_fast16_t exp;\r
+    uint_fast64_t sig;\r
+    int_fast16_t shiftCount;\r
+    struct uint64_extra sigExtra;\r
+\r
+    uA.f = a;\r
+    uiA = uA.ui;\r
+    sign = signF64UI( uiA );\r
+    exp = expF64UI( uiA );\r
+    sig = fracF64UI( uiA );\r
+    if ( exp ) sig |= UINT64_C( 0x0010000000000000 );\r
+    shiftCount = 0x433 - exp;\r
+    if ( shiftCount <= 0 ) {\r
+        if ( 0x43E < exp ) {\r
+            softfloat_raiseFlags( softfloat_flag_invalid );\r
+            return\r
+                ! sign\r
+                    || ( ( exp == 0x7FF )\r
+                             && ( sig != UINT64_C( 0x0010000000000000 ) ) )\r
+                    ? INT64_C( 0x7FFFFFFFFFFFFFFF )\r
+                    : - INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1;\r
+        }\r
+        sigExtra.v = sig<<( - shiftCount );\r
+        sigExtra.extra = 0;\r
+    } else {\r
+        sigExtra = softfloat_shift64ExtraRightJam( sig, 0, shiftCount );\r
+    }\r
+    return\r
+        softfloat_roundPackToI64(\r
+            sign, sigExtra.v, sigExtra.extra, roundingMode, exact );\r
+\r
+}\r
+\r
diff --git a/softfloat/f64_to_i64.cc b/softfloat/f64_to_i64.cc
deleted file mode 100755 (executable)
index 89663ee..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-int_fast64_t f64_to_i64( float64_t a, int_fast8_t roundingMode, bool exact )\r
-{\r
-    union ui64_f64 uA;\r
-    uint_fast64_t uiA;\r
-    bool sign;\r
-    int_fast16_t exp;\r
-    uint_fast64_t sig;\r
-    int_fast16_t shiftCount;\r
-    struct uint64_extra sigExtra;\r
-\r
-    uA.f = a;\r
-    uiA = uA.ui;\r
-    sign = signF64UI( uiA );\r
-    exp = expF64UI( uiA );\r
-    sig = fracF64UI( uiA );\r
-    if ( exp ) sig |= UINT64_C( 0x0010000000000000 );\r
-    shiftCount = 0x433 - exp;\r
-    if ( shiftCount <= 0 ) {\r
-        if ( 0x43E < exp ) {\r
-            softfloat_raiseFlags( softfloat_flag_invalid );\r
-            return\r
-                ! sign\r
-                    || ( ( exp == 0x7FF )\r
-                             && ( sig != UINT64_C( 0x0010000000000000 ) ) )\r
-                    ? INT64_C( 0x7FFFFFFFFFFFFFFF )\r
-                    : - INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1;\r
-        }\r
-        sigExtra.v = sig<<( - shiftCount );\r
-        sigExtra.extra = 0;\r
-    } else {\r
-        sigExtra = softfloat_shift64ExtraRightJam( sig, 0, shiftCount );\r
-    }\r
-    return\r
-        softfloat_roundPackToI64(\r
-            sign, sigExtra.v, sigExtra.extra, roundingMode, exact );\r
-\r
-}\r
-\r
diff --git a/softfloat/f64_to_i64_r_minMag.c b/softfloat/f64_to_i64_r_minMag.c
new file mode 100755 (executable)
index 0000000..525705b
--- /dev/null
@@ -0,0 +1,52 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+int_fast64_t f64_to_i64_r_minMag( float64_t a, bool exact )\r
+{\r
+    union ui64_f64 uA;\r
+    uint_fast64_t uiA;\r
+    bool sign;\r
+    int_fast16_t exp;\r
+    uint_fast64_t sig;\r
+    int_fast16_t shiftCount;\r
+    int_fast64_t absZ;\r
+\r
+    uA.f = a;\r
+    uiA = uA.ui;\r
+    sign = signF64UI( uiA );\r
+    exp = expF64UI( uiA );\r
+    sig = fracF64UI( uiA );\r
+    shiftCount = exp - 0x433;\r
+    if ( 0 <= shiftCount ) {\r
+        if ( 0x43E <= exp ) {\r
+            if ( uiA != packToF64UI( 1, 0x43E, 0 ) ) {\r
+                softfloat_raiseFlags( softfloat_flag_invalid );\r
+                if ( ! sign || ( ( exp == 0x7FF ) && sig ) ) {\r
+                    return INT64_C( 0x7FFFFFFFFFFFFFFF );\r
+                }\r
+            }\r
+            return - INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1;\r
+        }\r
+        sig |= UINT64_C( 0x0010000000000000 );\r
+        absZ = sig<<shiftCount;\r
+    } else {\r
+        if ( exp < 0x3FF ) {\r
+            if ( exact && ( exp | sig ) ) {\r
+                softfloat_exceptionFlags |= softfloat_flag_inexact;\r
+            }\r
+            return 0;\r
+        }\r
+        sig |= UINT64_C( 0x0010000000000000 );\r
+        absZ = sig>>( - shiftCount );\r
+        if ( exact && (uint64_t) ( sig<<( shiftCount & 63 ) ) ) {\r
+            softfloat_exceptionFlags |= softfloat_flag_inexact;\r
+        }\r
+    }\r
+    return sign ? - absZ : absZ;\r
+\r
+}\r
+\r
diff --git a/softfloat/f64_to_i64_r_minMag.cc b/softfloat/f64_to_i64_r_minMag.cc
deleted file mode 100755 (executable)
index 525705b..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-int_fast64_t f64_to_i64_r_minMag( float64_t a, bool exact )\r
-{\r
-    union ui64_f64 uA;\r
-    uint_fast64_t uiA;\r
-    bool sign;\r
-    int_fast16_t exp;\r
-    uint_fast64_t sig;\r
-    int_fast16_t shiftCount;\r
-    int_fast64_t absZ;\r
-\r
-    uA.f = a;\r
-    uiA = uA.ui;\r
-    sign = signF64UI( uiA );\r
-    exp = expF64UI( uiA );\r
-    sig = fracF64UI( uiA );\r
-    shiftCount = exp - 0x433;\r
-    if ( 0 <= shiftCount ) {\r
-        if ( 0x43E <= exp ) {\r
-            if ( uiA != packToF64UI( 1, 0x43E, 0 ) ) {\r
-                softfloat_raiseFlags( softfloat_flag_invalid );\r
-                if ( ! sign || ( ( exp == 0x7FF ) && sig ) ) {\r
-                    return INT64_C( 0x7FFFFFFFFFFFFFFF );\r
-                }\r
-            }\r
-            return - INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1;\r
-        }\r
-        sig |= UINT64_C( 0x0010000000000000 );\r
-        absZ = sig<<shiftCount;\r
-    } else {\r
-        if ( exp < 0x3FF ) {\r
-            if ( exact && ( exp | sig ) ) {\r
-                softfloat_exceptionFlags |= softfloat_flag_inexact;\r
-            }\r
-            return 0;\r
-        }\r
-        sig |= UINT64_C( 0x0010000000000000 );\r
-        absZ = sig>>( - shiftCount );\r
-        if ( exact && (uint64_t) ( sig<<( shiftCount & 63 ) ) ) {\r
-            softfloat_exceptionFlags |= softfloat_flag_inexact;\r
-        }\r
-    }\r
-    return sign ? - absZ : absZ;\r
-\r
-}\r
-\r
diff --git a/softfloat/f64_to_ui32.c b/softfloat/f64_to_ui32.c
new file mode 100755 (executable)
index 0000000..b186605
--- /dev/null
@@ -0,0 +1,29 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+uint_fast32_t f64_to_ui32( float64_t a, int_fast8_t roundingMode, bool exact )\r
+{\r
+    union ui64_f64 uA;\r
+    uint_fast64_t uiA;\r
+    bool sign;\r
+    int_fast16_t exp;\r
+    uint_fast64_t sig;\r
+    int_fast16_t shiftCount;\r
+\r
+    uA.f = a;\r
+    uiA = uA.ui;\r
+    sign = signF64UI( uiA );\r
+    exp = expF64UI( uiA );\r
+    sig = fracF64UI( uiA );\r
+    if ( exp ) sig |= UINT64_C( 0x0010000000000000 );\r
+    shiftCount = 0x42C - exp;\r
+    if ( 0 < shiftCount ) sig = softfloat_shift64RightJam( sig, shiftCount );\r
+    return softfloat_roundPackToUI32( sign, sig, roundingMode, exact );\r
+\r
+}\r
+\r
diff --git a/softfloat/f64_to_ui32.cc b/softfloat/f64_to_ui32.cc
deleted file mode 100755 (executable)
index b186605..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-uint_fast32_t f64_to_ui32( float64_t a, int_fast8_t roundingMode, bool exact )\r
-{\r
-    union ui64_f64 uA;\r
-    uint_fast64_t uiA;\r
-    bool sign;\r
-    int_fast16_t exp;\r
-    uint_fast64_t sig;\r
-    int_fast16_t shiftCount;\r
-\r
-    uA.f = a;\r
-    uiA = uA.ui;\r
-    sign = signF64UI( uiA );\r
-    exp = expF64UI( uiA );\r
-    sig = fracF64UI( uiA );\r
-    if ( exp ) sig |= UINT64_C( 0x0010000000000000 );\r
-    shiftCount = 0x42C - exp;\r
-    if ( 0 < shiftCount ) sig = softfloat_shift64RightJam( sig, shiftCount );\r
-    return softfloat_roundPackToUI32( sign, sig, roundingMode, exact );\r
-\r
-}\r
-\r
diff --git a/softfloat/f64_to_ui32_r_minMag.c b/softfloat/f64_to_ui32_r_minMag.c
new file mode 100755 (executable)
index 0000000..9f1dd4d
--- /dev/null
@@ -0,0 +1,40 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+uint_fast32_t f64_to_ui32_r_minMag( float64_t a, bool exact )\r
+{\r
+    union ui64_f64 uA;\r
+    uint_fast64_t uiA;\r
+    int_fast16_t exp;\r
+    uint_fast64_t sig;\r
+    int_fast16_t shiftCount;\r
+    uint_fast32_t z;\r
+\r
+    uA.f = a;\r
+    uiA = uA.ui;\r
+    exp = expF64UI( uiA );\r
+    sig = fracF64UI( uiA );\r
+    if ( exp < 0x3FF ) {\r
+        if ( exact && ( exp | sig ) ) {\r
+            softfloat_exceptionFlags |= softfloat_flag_inexact;\r
+        }\r
+        return 0;\r
+    }\r
+    if ( signF64UI( uiA ) || ( 0x41E < exp ) ) {\r
+        softfloat_raiseFlags( softfloat_flag_invalid );\r
+        return 0xFFFFFFFF;\r
+    }\r
+    sig |= UINT64_C( 0x0010000000000000 );\r
+    shiftCount = 0x433 - exp;\r
+    z = sig>>shiftCount;\r
+    if ( exact && ( (uint_fast64_t) z<<shiftCount != sig ) ) {\r
+        softfloat_exceptionFlags |= softfloat_flag_inexact;\r
+    }\r
+    return z;\r
+\r
+}\r
+\r
diff --git a/softfloat/f64_to_ui32_r_minMag.cc b/softfloat/f64_to_ui32_r_minMag.cc
deleted file mode 100755 (executable)
index 9f1dd4d..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-uint_fast32_t f64_to_ui32_r_minMag( float64_t a, bool exact )\r
-{\r
-    union ui64_f64 uA;\r
-    uint_fast64_t uiA;\r
-    int_fast16_t exp;\r
-    uint_fast64_t sig;\r
-    int_fast16_t shiftCount;\r
-    uint_fast32_t z;\r
-\r
-    uA.f = a;\r
-    uiA = uA.ui;\r
-    exp = expF64UI( uiA );\r
-    sig = fracF64UI( uiA );\r
-    if ( exp < 0x3FF ) {\r
-        if ( exact && ( exp | sig ) ) {\r
-            softfloat_exceptionFlags |= softfloat_flag_inexact;\r
-        }\r
-        return 0;\r
-    }\r
-    if ( signF64UI( uiA ) || ( 0x41E < exp ) ) {\r
-        softfloat_raiseFlags( softfloat_flag_invalid );\r
-        return 0xFFFFFFFF;\r
-    }\r
-    sig |= UINT64_C( 0x0010000000000000 );\r
-    shiftCount = 0x433 - exp;\r
-    z = sig>>shiftCount;\r
-    if ( exact && ( (uint_fast64_t) z<<shiftCount != sig ) ) {\r
-        softfloat_exceptionFlags |= softfloat_flag_inexact;\r
-    }\r
-    return z;\r
-\r
-}\r
-\r
diff --git a/softfloat/f64_to_ui64.c b/softfloat/f64_to_ui64.c
new file mode 100755 (executable)
index 0000000..9afebd7
--- /dev/null
@@ -0,0 +1,41 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+uint_fast64_t f64_to_ui64( float64_t a, int_fast8_t roundingMode, bool exact )\r
+{\r
+    union ui64_f64 uA;\r
+    uint_fast64_t uiA;\r
+    bool sign;\r
+    int_fast16_t exp;\r
+    uint_fast64_t sig;\r
+    int_fast16_t shiftCount;\r
+    struct uint64_extra sigExtra;\r
+\r
+    uA.f = a;\r
+    uiA = uA.ui;\r
+    sign = signF64UI( uiA );\r
+    exp = expF64UI( uiA );\r
+    sig = fracF64UI( uiA );\r
+    if ( exp ) sig |= UINT64_C( 0x0010000000000000 );\r
+    shiftCount = 0x433 - exp;\r
+    if ( shiftCount <= 0 ) {\r
+        if ( 0x43E < exp ) {\r
+            softfloat_raiseFlags( softfloat_flag_invalid );\r
+            return UINT64_C( 0xFFFFFFFFFFFFFFFF );\r
+        }\r
+        sigExtra.v = sig<<( - shiftCount );\r
+        sigExtra.extra = 0;\r
+    } else {\r
+        sigExtra = softfloat_shift64ExtraRightJam( sig, 0, shiftCount );\r
+    }\r
+    return\r
+        softfloat_roundPackToUI64(\r
+            sign, sigExtra.v, sigExtra.extra, roundingMode, exact );\r
+\r
+}\r
+\r
diff --git a/softfloat/f64_to_ui64.cc b/softfloat/f64_to_ui64.cc
deleted file mode 100755 (executable)
index 9afebd7..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-uint_fast64_t f64_to_ui64( float64_t a, int_fast8_t roundingMode, bool exact )\r
-{\r
-    union ui64_f64 uA;\r
-    uint_fast64_t uiA;\r
-    bool sign;\r
-    int_fast16_t exp;\r
-    uint_fast64_t sig;\r
-    int_fast16_t shiftCount;\r
-    struct uint64_extra sigExtra;\r
-\r
-    uA.f = a;\r
-    uiA = uA.ui;\r
-    sign = signF64UI( uiA );\r
-    exp = expF64UI( uiA );\r
-    sig = fracF64UI( uiA );\r
-    if ( exp ) sig |= UINT64_C( 0x0010000000000000 );\r
-    shiftCount = 0x433 - exp;\r
-    if ( shiftCount <= 0 ) {\r
-        if ( 0x43E < exp ) {\r
-            softfloat_raiseFlags( softfloat_flag_invalid );\r
-            return UINT64_C( 0xFFFFFFFFFFFFFFFF );\r
-        }\r
-        sigExtra.v = sig<<( - shiftCount );\r
-        sigExtra.extra = 0;\r
-    } else {\r
-        sigExtra = softfloat_shift64ExtraRightJam( sig, 0, shiftCount );\r
-    }\r
-    return\r
-        softfloat_roundPackToUI64(\r
-            sign, sigExtra.v, sigExtra.extra, roundingMode, exact );\r
-\r
-}\r
-\r
diff --git a/softfloat/f64_to_ui64_r_minMag.c b/softfloat/f64_to_ui64_r_minMag.c
new file mode 100755 (executable)
index 0000000..a66d3ff
--- /dev/null
@@ -0,0 +1,45 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+uint_fast64_t f64_to_ui64_r_minMag( float64_t a, bool exact )\r
+{\r
+    union ui64_f64 uA;\r
+    uint_fast64_t uiA;\r
+    int_fast16_t exp;\r
+    uint_fast64_t sig;\r
+    int_fast16_t shiftCount;\r
+    uint_fast64_t z;\r
+\r
+    uA.f = a;\r
+    uiA = uA.ui;\r
+    exp = expF64UI( uiA );\r
+    sig = fracF64UI( uiA );\r
+    if ( exp < 0x3FF ) {\r
+        if ( exact && ( exp | sig ) ) {\r
+            softfloat_exceptionFlags |= softfloat_flag_inexact;\r
+        }\r
+        return 0;\r
+    }\r
+    if ( signF64UI( uiA ) ) goto invalid;\r
+    shiftCount = exp - 0x433;\r
+    if ( 0 <= shiftCount ) {\r
+        if ( 0x43E < exp ) goto invalid;\r
+        z = ( sig | UINT64_C( 0x0010000000000000 ) )<<shiftCount;\r
+    } else {\r
+        sig |= UINT64_C( 0x0010000000000000 );\r
+        z = sig>>( - shiftCount );\r
+        if ( exact && (uint64_t) ( sig<<( shiftCount & 63 ) ) ) {\r
+            softfloat_exceptionFlags |= softfloat_flag_inexact;\r
+        }\r
+    }\r
+    return z;\r
+ invalid:\r
+    softfloat_raiseFlags( softfloat_flag_invalid );\r
+    return UINT64_C( 0xFFFFFFFFFFFFFFFF );\r
+\r
+}\r
+\r
diff --git a/softfloat/f64_to_ui64_r_minMag.cc b/softfloat/f64_to_ui64_r_minMag.cc
deleted file mode 100755 (executable)
index a66d3ff..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-uint_fast64_t f64_to_ui64_r_minMag( float64_t a, bool exact )\r
-{\r
-    union ui64_f64 uA;\r
-    uint_fast64_t uiA;\r
-    int_fast16_t exp;\r
-    uint_fast64_t sig;\r
-    int_fast16_t shiftCount;\r
-    uint_fast64_t z;\r
-\r
-    uA.f = a;\r
-    uiA = uA.ui;\r
-    exp = expF64UI( uiA );\r
-    sig = fracF64UI( uiA );\r
-    if ( exp < 0x3FF ) {\r
-        if ( exact && ( exp | sig ) ) {\r
-            softfloat_exceptionFlags |= softfloat_flag_inexact;\r
-        }\r
-        return 0;\r
-    }\r
-    if ( signF64UI( uiA ) ) goto invalid;\r
-    shiftCount = exp - 0x433;\r
-    if ( 0 <= shiftCount ) {\r
-        if ( 0x43E < exp ) goto invalid;\r
-        z = ( sig | UINT64_C( 0x0010000000000000 ) )<<shiftCount;\r
-    } else {\r
-        sig |= UINT64_C( 0x0010000000000000 );\r
-        z = sig>>( - shiftCount );\r
-        if ( exact && (uint64_t) ( sig<<( shiftCount & 63 ) ) ) {\r
-            softfloat_exceptionFlags |= softfloat_flag_inexact;\r
-        }\r
-    }\r
-    return z;\r
- invalid:\r
-    softfloat_raiseFlags( softfloat_flag_invalid );\r
-    return UINT64_C( 0xFFFFFFFFFFFFFFFF );\r
-\r
-}\r
-\r
diff --git a/softfloat/i32_to_f32.c b/softfloat/i32_to_f32.c
new file mode 100755 (executable)
index 0000000..f51facd
--- /dev/null
@@ -0,0 +1,21 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+float32_t i32_to_f32( int_fast32_t a )\r
+{\r
+    bool sign;\r
+    union ui32_f32 uZ;\r
+\r
+    sign = ( a < 0 );\r
+    if ( ! ( a & 0x7FFFFFFF ) ) {\r
+        uZ.ui = sign ? packToF32UI( 1, 0x9E, 0 ) : 0;\r
+        return uZ.f;\r
+    }\r
+    return softfloat_normRoundPackToF32( sign, 0x9C, sign ? - a : a );\r
+\r
+}\r
+\r
diff --git a/softfloat/i32_to_f32.cc b/softfloat/i32_to_f32.cc
deleted file mode 100755 (executable)
index f51facd..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-float32_t i32_to_f32( int_fast32_t a )\r
-{\r
-    bool sign;\r
-    union ui32_f32 uZ;\r
-\r
-    sign = ( a < 0 );\r
-    if ( ! ( a & 0x7FFFFFFF ) ) {\r
-        uZ.ui = sign ? packToF32UI( 1, 0x9E, 0 ) : 0;\r
-        return uZ.f;\r
-    }\r
-    return softfloat_normRoundPackToF32( sign, 0x9C, sign ? - a : a );\r
-\r
-}\r
-\r
diff --git a/softfloat/i32_to_f64.c b/softfloat/i32_to_f64.c
new file mode 100755 (executable)
index 0000000..d42cbe8
--- /dev/null
@@ -0,0 +1,31 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+float64_t i32_to_f64( int_fast32_t a )\r
+{\r
+    uint_fast64_t uiZ;\r
+    bool sign;\r
+    uint_fast32_t absA;\r
+    int shiftCount;\r
+    union ui64_f64 uZ;\r
+\r
+    if ( ! a ) {\r
+        uiZ = 0;\r
+    } else {\r
+        sign = ( a < 0 );\r
+        absA = sign ? - a : a;\r
+        shiftCount = softfloat_countLeadingZeros32( absA ) + 21;\r
+        uiZ =\r
+            packToF64UI(\r
+                sign, 0x432 - shiftCount, (uint_fast64_t) absA<<shiftCount );\r
+    }\r
+    uZ.ui = uiZ;\r
+    return uZ.f;\r
+\r
+}\r
+\r
diff --git a/softfloat/i32_to_f64.cc b/softfloat/i32_to_f64.cc
deleted file mode 100755 (executable)
index d42cbe8..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-float64_t i32_to_f64( int_fast32_t a )\r
-{\r
-    uint_fast64_t uiZ;\r
-    bool sign;\r
-    uint_fast32_t absA;\r
-    int shiftCount;\r
-    union ui64_f64 uZ;\r
-\r
-    if ( ! a ) {\r
-        uiZ = 0;\r
-    } else {\r
-        sign = ( a < 0 );\r
-        absA = sign ? - a : a;\r
-        shiftCount = softfloat_countLeadingZeros32( absA ) + 21;\r
-        uiZ =\r
-            packToF64UI(\r
-                sign, 0x432 - shiftCount, (uint_fast64_t) absA<<shiftCount );\r
-    }\r
-    uZ.ui = uiZ;\r
-    return uZ.f;\r
-\r
-}\r
-\r
diff --git a/softfloat/i64_to_f32.c b/softfloat/i64_to_f32.c
new file mode 100755 (executable)
index 0000000..4fecbb9
--- /dev/null
@@ -0,0 +1,36 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+float32_t i64_to_f32( int_fast64_t a )\r
+{\r
+    bool sign;\r
+    uint_fast64_t absA;\r
+    int shiftCount;\r
+    union ui32_f32 u;\r
+    uint_fast32_t sig;\r
+\r
+    sign = ( a < 0 );\r
+    absA = sign ? - (uint_fast64_t) a : a;\r
+    shiftCount = softfloat_countLeadingZeros64( absA ) - 40;\r
+    if ( 0 <= shiftCount ) {\r
+        u.ui =\r
+            a ? packToF32UI(\r
+                    sign, 0x95 - shiftCount, (uint_fast32_t) absA<<shiftCount )\r
+                : 0;\r
+        return u.f;\r
+    } else {\r
+        shiftCount += 7;\r
+        sig =\r
+            ( shiftCount < 0 )\r
+                ? softfloat_shortShift64RightJam( absA, - shiftCount )\r
+                : (uint_fast32_t) absA<<shiftCount;\r
+        return softfloat_roundPackToF32( sign, 0x9C - shiftCount, sig );\r
+    }\r
+\r
+}\r
+\r
diff --git a/softfloat/i64_to_f32.cc b/softfloat/i64_to_f32.cc
deleted file mode 100755 (executable)
index 4fecbb9..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-float32_t i64_to_f32( int_fast64_t a )\r
-{\r
-    bool sign;\r
-    uint_fast64_t absA;\r
-    int shiftCount;\r
-    union ui32_f32 u;\r
-    uint_fast32_t sig;\r
-\r
-    sign = ( a < 0 );\r
-    absA = sign ? - (uint_fast64_t) a : a;\r
-    shiftCount = softfloat_countLeadingZeros64( absA ) - 40;\r
-    if ( 0 <= shiftCount ) {\r
-        u.ui =\r
-            a ? packToF32UI(\r
-                    sign, 0x95 - shiftCount, (uint_fast32_t) absA<<shiftCount )\r
-                : 0;\r
-        return u.f;\r
-    } else {\r
-        shiftCount += 7;\r
-        sig =\r
-            ( shiftCount < 0 )\r
-                ? softfloat_shortShift64RightJam( absA, - shiftCount )\r
-                : (uint_fast32_t) absA<<shiftCount;\r
-        return softfloat_roundPackToF32( sign, 0x9C - shiftCount, sig );\r
-    }\r
-\r
-}\r
-\r
diff --git a/softfloat/i64_to_f64.c b/softfloat/i64_to_f64.c
new file mode 100755 (executable)
index 0000000..1add960
--- /dev/null
@@ -0,0 +1,21 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+float64_t i64_to_f64( int_fast64_t a )\r
+{\r
+    bool sign;\r
+    union ui64_f64 uZ;\r
+\r
+    sign = ( a < 0 );\r
+    if ( ! ( a & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) ) {\r
+        uZ.ui = sign ? packToF64UI( 1, 0x43E, 0 ) : 0;\r
+        return uZ.f;\r
+    }\r
+    return softfloat_normRoundPackToF64( sign, 0x43C, sign ? - a : a );\r
+\r
+}\r
+\r
diff --git a/softfloat/i64_to_f64.cc b/softfloat/i64_to_f64.cc
deleted file mode 100755 (executable)
index 1add960..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-float64_t i64_to_f64( int_fast64_t a )\r
-{\r
-    bool sign;\r
-    union ui64_f64 uZ;\r
-\r
-    sign = ( a < 0 );\r
-    if ( ! ( a & UINT64_C( 0x7FFFFFFFFFFFFFFF ) ) ) {\r
-        uZ.ui = sign ? packToF64UI( 1, 0x43E, 0 ) : 0;\r
-        return uZ.f;\r
-    }\r
-    return softfloat_normRoundPackToF64( sign, 0x43C, sign ? - a : a );\r
-\r
-}\r
-\r
diff --git a/softfloat/s_add128.c b/softfloat/s_add128.c
new file mode 100755 (executable)
index 0000000..59c0348
--- /dev/null
@@ -0,0 +1,17 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+\r
+struct uint128\r
+ softfloat_add128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )\r
+{\r
+    struct uint128 z;\r
+\r
+    z.v0 = a0 + b0;\r
+    z.v64 = a64 + b64;\r
+    z.v64 += ( z.v0 < a0 );\r
+    return z;\r
+\r
+}\r
+\r
diff --git a/softfloat/s_add128.cc b/softfloat/s_add128.cc
deleted file mode 100755 (executable)
index 59c0348..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-\r
-struct uint128\r
- softfloat_add128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )\r
-{\r
-    struct uint128 z;\r
-\r
-    z.v0 = a0 + b0;\r
-    z.v64 = a64 + b64;\r
-    z.v64 += ( z.v0 < a0 );\r
-    return z;\r
-\r
-}\r
-\r
diff --git a/softfloat/s_add192.c b/softfloat/s_add192.c
new file mode 100755 (executable)
index 0000000..543eb5d
--- /dev/null
@@ -0,0 +1,30 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+\r
+struct uint192\r
+ softfloat_add192(\r
+     uint64_t a128,\r
+     uint64_t a64,\r
+     uint64_t a0,\r
+     uint64_t b128,\r
+     uint64_t b64,\r
+     uint64_t b0\r
+ )\r
+{\r
+    struct uint192 z;\r
+    unsigned int carry64, carry128;\r
+\r
+    z.v0 = a0 + b0;\r
+    carry64 = ( z.v0 < a0 );\r
+    z.v64 = a64 + b64;\r
+    carry128 = ( z.v64 < a64 );\r
+    z.v128 = a128 + b128;\r
+    z.v64 += carry64;\r
+    carry128 += ( z.v64 < carry64 );\r
+    z.v128 += carry128;\r
+    return z;\r
+\r
+}\r
+\r
diff --git a/softfloat/s_add192.cc b/softfloat/s_add192.cc
deleted file mode 100755 (executable)
index 543eb5d..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-\r
-struct uint192\r
- softfloat_add192(\r
-     uint64_t a128,\r
-     uint64_t a64,\r
-     uint64_t a0,\r
-     uint64_t b128,\r
-     uint64_t b64,\r
-     uint64_t b0\r
- )\r
-{\r
-    struct uint192 z;\r
-    unsigned int carry64, carry128;\r
-\r
-    z.v0 = a0 + b0;\r
-    carry64 = ( z.v0 < a0 );\r
-    z.v64 = a64 + b64;\r
-    carry128 = ( z.v64 < a64 );\r
-    z.v128 = a128 + b128;\r
-    z.v64 += carry64;\r
-    carry128 += ( z.v64 < carry64 );\r
-    z.v128 += carry128;\r
-    return z;\r
-\r
-}\r
-\r
diff --git a/softfloat/s_addMagsF32.c b/softfloat/s_addMagsF32.c
new file mode 100755 (executable)
index 0000000..f361e2b
--- /dev/null
@@ -0,0 +1,75 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+#include "specialize.h"\r
+\r
+float32_t\r
+ softfloat_addMagsF32( uint_fast32_t uiA, uint_fast32_t uiB, bool signZ )\r
+{\r
+    int_fast16_t expA;\r
+    uint_fast32_t sigA;\r
+    int_fast16_t expB;\r
+    uint_fast32_t sigB;\r
+    int_fast16_t expDiff;\r
+    uint_fast32_t uiZ;\r
+    int_fast16_t expZ;\r
+    uint_fast32_t sigZ;\r
+    union ui32_f32 uZ;\r
+\r
+    expA = expF32UI( uiA );\r
+    sigA = fracF32UI( uiA );\r
+    expB = expF32UI( uiB );\r
+    sigB = fracF32UI( uiB );\r
+    expDiff = expA - expB;\r
+    sigA <<= 6;\r
+    sigB <<= 6;\r
+    if ( ! expDiff ) {\r
+        if ( expA == 0xFF ) {\r
+            if ( sigA | sigB ) goto propagateNaN;\r
+            uiZ = uiA;\r
+            goto uiZ;\r
+        }\r
+        if ( ! expA ) {\r
+            uiZ = packToF32UI( signZ, 0, ( uiA + uiB ) & 0x7FFFFFFF );\r
+            goto uiZ;\r
+        }\r
+        expZ = expA;\r
+        sigZ = 0x40000000 + sigA + sigB;\r
+    } else {\r
+        if ( expDiff < 0 ) {\r
+            if ( expB == 0xFF ) {\r
+                if ( sigB ) goto propagateNaN;\r
+                uiZ = packToF32UI( signZ, 0xFF, 0 );\r
+                goto uiZ;\r
+            }\r
+            expZ = expB;\r
+            sigA += expA ? 0x20000000 : sigA;\r
+            sigA = softfloat_shift32RightJam( sigA, - expDiff );\r
+        } else {\r
+            if ( expA == 0xFF ) {\r
+                if ( sigA ) goto propagateNaN;\r
+                uiZ = uiA;\r
+                goto uiZ;\r
+            }\r
+            expZ = expA;\r
+            sigB += expB ? 0x20000000 : sigB;\r
+            sigB = softfloat_shift32RightJam( sigB, expDiff );\r
+        }\r
+        sigZ = 0x20000000 + sigA + sigB;\r
+        if ( sigZ < 0x40000000 ) {\r
+            --expZ;\r
+            sigZ <<= 1;\r
+        }\r
+    }\r
+    return softfloat_roundPackToF32( signZ, expZ, sigZ );\r
+ propagateNaN:\r
+    uiZ = softfloat_propagateNaNF32UI( uiA, uiB );\r
+ uiZ:\r
+    uZ.ui = uiZ;\r
+    return uZ.f;\r
+\r
+}\r
+\r
diff --git a/softfloat/s_addMagsF32.cc b/softfloat/s_addMagsF32.cc
deleted file mode 100755 (executable)
index f361e2b..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-#include "specialize.h"\r
-\r
-float32_t\r
- softfloat_addMagsF32( uint_fast32_t uiA, uint_fast32_t uiB, bool signZ )\r
-{\r
-    int_fast16_t expA;\r
-    uint_fast32_t sigA;\r
-    int_fast16_t expB;\r
-    uint_fast32_t sigB;\r
-    int_fast16_t expDiff;\r
-    uint_fast32_t uiZ;\r
-    int_fast16_t expZ;\r
-    uint_fast32_t sigZ;\r
-    union ui32_f32 uZ;\r
-\r
-    expA = expF32UI( uiA );\r
-    sigA = fracF32UI( uiA );\r
-    expB = expF32UI( uiB );\r
-    sigB = fracF32UI( uiB );\r
-    expDiff = expA - expB;\r
-    sigA <<= 6;\r
-    sigB <<= 6;\r
-    if ( ! expDiff ) {\r
-        if ( expA == 0xFF ) {\r
-            if ( sigA | sigB ) goto propagateNaN;\r
-            uiZ = uiA;\r
-            goto uiZ;\r
-        }\r
-        if ( ! expA ) {\r
-            uiZ = packToF32UI( signZ, 0, ( uiA + uiB ) & 0x7FFFFFFF );\r
-            goto uiZ;\r
-        }\r
-        expZ = expA;\r
-        sigZ = 0x40000000 + sigA + sigB;\r
-    } else {\r
-        if ( expDiff < 0 ) {\r
-            if ( expB == 0xFF ) {\r
-                if ( sigB ) goto propagateNaN;\r
-                uiZ = packToF32UI( signZ, 0xFF, 0 );\r
-                goto uiZ;\r
-            }\r
-            expZ = expB;\r
-            sigA += expA ? 0x20000000 : sigA;\r
-            sigA = softfloat_shift32RightJam( sigA, - expDiff );\r
-        } else {\r
-            if ( expA == 0xFF ) {\r
-                if ( sigA ) goto propagateNaN;\r
-                uiZ = uiA;\r
-                goto uiZ;\r
-            }\r
-            expZ = expA;\r
-            sigB += expB ? 0x20000000 : sigB;\r
-            sigB = softfloat_shift32RightJam( sigB, expDiff );\r
-        }\r
-        sigZ = 0x20000000 + sigA + sigB;\r
-        if ( sigZ < 0x40000000 ) {\r
-            --expZ;\r
-            sigZ <<= 1;\r
-        }\r
-    }\r
-    return softfloat_roundPackToF32( signZ, expZ, sigZ );\r
- propagateNaN:\r
-    uiZ = softfloat_propagateNaNF32UI( uiA, uiB );\r
- uiZ:\r
-    uZ.ui = uiZ;\r
-    return uZ.f;\r
-\r
-}\r
-\r
diff --git a/softfloat/s_addMagsF64.c b/softfloat/s_addMagsF64.c
new file mode 100755 (executable)
index 0000000..a81c3e4
--- /dev/null
@@ -0,0 +1,77 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "internals.h"
+#include "specialize.h"
+
+float64_t
+ softfloat_addMagsF64( uint_fast64_t uiA, uint_fast64_t uiB, bool signZ )
+{
+    int_fast16_t expA;
+    uint_fast64_t sigA;
+    int_fast16_t expB;
+    uint_fast64_t sigB;
+    int_fast16_t expDiff;
+    uint_fast64_t uiZ;
+    int_fast16_t expZ;
+    uint_fast64_t sigZ;
+    union ui64_f64 uZ;
+
+    expA = expF64UI( uiA );
+    sigA = fracF64UI( uiA );
+    expB = expF64UI( uiB );
+    sigB = fracF64UI( uiB );
+    expDiff = expA - expB;
+    sigA <<= 9;
+    sigB <<= 9;
+    if ( ! expDiff ) {
+        if ( expA == 0x7FF ) {
+            if ( sigA | sigB ) goto propagateNaN;
+            uiZ = uiA;
+            goto uiZ;
+        }
+        if ( ! expA ) {
+            uiZ =
+                packToF64UI(
+                    signZ, 0, ( uiA + uiB ) & UINT64_C( 0x7FFFFFFFFFFFFFFF ) );
+            goto uiZ;
+        }
+        expZ = expA;
+        sigZ = UINT64_C( 0x4000000000000000 ) + sigA + sigB;
+    } else {
+        if ( expDiff < 0 ) {
+            if ( expB == 0x7FF ) {
+                if ( sigB ) goto propagateNaN;
+                uiZ = packToF64UI( signZ, 0x7FF, 0 );
+                goto uiZ;
+            }
+            expZ = expB;
+            sigA += expA ? UINT64_C( 0x2000000000000000 ) : sigA;
+            sigA = softfloat_shift64RightJam( sigA, - expDiff );
+        } else {
+            if ( expA == 0x7FF ) {
+                if ( sigA ) goto propagateNaN;
+                uiZ = uiA;
+                goto uiZ;
+            }
+            expZ = expA;
+            sigB += expB ? UINT64_C( 0x2000000000000000 ) : sigB;
+            sigB = softfloat_shift64RightJam( sigB, expDiff );
+        }
+        sigZ = UINT64_C( 0x2000000000000000 ) + sigA + sigB;
+        if ( sigZ < UINT64_C( 0x4000000000000000 ) ) {
+            --expZ;
+            sigZ <<= 1;
+        }
+    }
+    return softfloat_roundPackToF64( signZ, expZ, sigZ );
+ propagateNaN:
+    uiZ = softfloat_propagateNaNF64UI( uiA, uiB );
+ uiZ:
+    uZ.ui = uiZ;
+    return uZ.f;
+
+}
+
diff --git a/softfloat/s_addMagsF64.cc b/softfloat/s_addMagsF64.cc
deleted file mode 100755 (executable)
index a81c3e4..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "primitives.h"
-#include "internals.h"
-#include "specialize.h"
-
-float64_t
- softfloat_addMagsF64( uint_fast64_t uiA, uint_fast64_t uiB, bool signZ )
-{
-    int_fast16_t expA;
-    uint_fast64_t sigA;
-    int_fast16_t expB;
-    uint_fast64_t sigB;
-    int_fast16_t expDiff;
-    uint_fast64_t uiZ;
-    int_fast16_t expZ;
-    uint_fast64_t sigZ;
-    union ui64_f64 uZ;
-
-    expA = expF64UI( uiA );
-    sigA = fracF64UI( uiA );
-    expB = expF64UI( uiB );
-    sigB = fracF64UI( uiB );
-    expDiff = expA - expB;
-    sigA <<= 9;
-    sigB <<= 9;
-    if ( ! expDiff ) {
-        if ( expA == 0x7FF ) {
-            if ( sigA | sigB ) goto propagateNaN;
-            uiZ = uiA;
-            goto uiZ;
-        }
-        if ( ! expA ) {
-            uiZ =
-                packToF64UI(
-                    signZ, 0, ( uiA + uiB ) & UINT64_C( 0x7FFFFFFFFFFFFFFF ) );
-            goto uiZ;
-        }
-        expZ = expA;
-        sigZ = UINT64_C( 0x4000000000000000 ) + sigA + sigB;
-    } else {
-        if ( expDiff < 0 ) {
-            if ( expB == 0x7FF ) {
-                if ( sigB ) goto propagateNaN;
-                uiZ = packToF64UI( signZ, 0x7FF, 0 );
-                goto uiZ;
-            }
-            expZ = expB;
-            sigA += expA ? UINT64_C( 0x2000000000000000 ) : sigA;
-            sigA = softfloat_shift64RightJam( sigA, - expDiff );
-        } else {
-            if ( expA == 0x7FF ) {
-                if ( sigA ) goto propagateNaN;
-                uiZ = uiA;
-                goto uiZ;
-            }
-            expZ = expA;
-            sigB += expB ? UINT64_C( 0x2000000000000000 ) : sigB;
-            sigB = softfloat_shift64RightJam( sigB, expDiff );
-        }
-        sigZ = UINT64_C( 0x2000000000000000 ) + sigA + sigB;
-        if ( sigZ < UINT64_C( 0x4000000000000000 ) ) {
-            --expZ;
-            sigZ <<= 1;
-        }
-    }
-    return softfloat_roundPackToF64( signZ, expZ, sigZ );
- propagateNaN:
-    uiZ = softfloat_propagateNaNF64UI( uiA, uiB );
- uiZ:
-    uZ.ui = uiZ;
-    return uZ.f;
-
-}
-
diff --git a/softfloat/s_countLeadingZeros32.c b/softfloat/s_countLeadingZeros32.c
new file mode 100755 (executable)
index 0000000..0bd17e1
--- /dev/null
@@ -0,0 +1,22 @@
+
+#include <stdint.h>
+#include "primitives.h"
+
+int softfloat_countLeadingZeros32( uint32_t a )
+{
+    int count;
+
+    count = 0;
+    if ( a < 0x10000 ) {
+        count = 16;
+        a <<= 16;
+    }
+    if ( a < 0x1000000 ) {
+        count += 8;
+        a <<= 8;
+    }
+    count += softfloat_countLeadingZeros8[ a>>24 ];
+    return count;
+
+}
+
diff --git a/softfloat/s_countLeadingZeros32.cc b/softfloat/s_countLeadingZeros32.cc
deleted file mode 100755 (executable)
index 0bd17e1..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-
-#include <stdint.h>
-#include "primitives.h"
-
-int softfloat_countLeadingZeros32( uint32_t a )
-{
-    int count;
-
-    count = 0;
-    if ( a < 0x10000 ) {
-        count = 16;
-        a <<= 16;
-    }
-    if ( a < 0x1000000 ) {
-        count += 8;
-        a <<= 8;
-    }
-    count += softfloat_countLeadingZeros8[ a>>24 ];
-    return count;
-
-}
-
diff --git a/softfloat/s_countLeadingZeros64.c b/softfloat/s_countLeadingZeros64.c
new file mode 100755 (executable)
index 0000000..79f4280
--- /dev/null
@@ -0,0 +1,32 @@
+
+#include <stdint.h>
+#include "primitives.h"
+#include "platform.h"
+
+int softfloat_countLeadingZeros64( uint64_t a )
+{
+    int count;
+    uint32_t a32;
+
+    count = 32;
+    a32 = a;
+    if ( UINT64_C( 0x100000000 ) <= a ) {
+        count = 0;
+        a32 = a>>32;
+    }
+    /*------------------------------------------------------------------------
+    | From here, result is current count + count leading zeros of `a32'.
+    *------------------------------------------------------------------------*/
+    if ( a32 < 0x10000 ) {
+        count += 16;
+        a32 <<= 16;
+    }
+    if ( a32 < 0x1000000 ) {
+        count += 8;
+        a32 <<= 8;
+    }
+    count += softfloat_countLeadingZeros8[ a32>>24 ];
+    return count;
+
+}
+
diff --git a/softfloat/s_countLeadingZeros64.cc b/softfloat/s_countLeadingZeros64.cc
deleted file mode 100755 (executable)
index 79f4280..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-
-#include <stdint.h>
-#include "primitives.h"
-#include "platform.h"
-
-int softfloat_countLeadingZeros64( uint64_t a )
-{
-    int count;
-    uint32_t a32;
-
-    count = 32;
-    a32 = a;
-    if ( UINT64_C( 0x100000000 ) <= a ) {
-        count = 0;
-        a32 = a>>32;
-    }
-    /*------------------------------------------------------------------------
-    | From here, result is current count + count leading zeros of `a32'.
-    *------------------------------------------------------------------------*/
-    if ( a32 < 0x10000 ) {
-        count += 16;
-        a32 <<= 16;
-    }
-    if ( a32 < 0x1000000 ) {
-        count += 8;
-        a32 <<= 8;
-    }
-    count += softfloat_countLeadingZeros8[ a32>>24 ];
-    return count;
-
-}
-
diff --git a/softfloat/s_countLeadingZeros8.c b/softfloat/s_countLeadingZeros8.c
new file mode 100755 (executable)
index 0000000..4eca7e9
--- /dev/null
@@ -0,0 +1,24 @@
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+
+const uint8_t softfloat_countLeadingZeros8[ 256 ] = {
+    8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
+    3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
diff --git a/softfloat/s_countLeadingZeros8.cc b/softfloat/s_countLeadingZeros8.cc
deleted file mode 100755 (executable)
index 4eca7e9..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-
-#include <stdint.h>
-#include "platform.h"
-#include "primitives.h"
-
-const uint8_t softfloat_countLeadingZeros8[ 256 ] = {
-    8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
-    3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
-    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-
diff --git a/softfloat/s_eq128.c b/softfloat/s_eq128.c
new file mode 100755 (executable)
index 0000000..7261dc4
--- /dev/null
@@ -0,0 +1,13 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+
+bool softfloat_eq128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )
+{
+
+    return ( a64 == b64 ) && ( a0 == b0 );
+
+}
+
diff --git a/softfloat/s_eq128.cc b/softfloat/s_eq128.cc
deleted file mode 100755 (executable)
index 7261dc4..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "primitives.h"
-
-bool softfloat_eq128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )
-{
-
-    return ( a64 == b64 ) && ( a0 == b0 );
-
-}
-
diff --git a/softfloat/s_estimateDiv128To64.c b/softfloat/s_estimateDiv128To64.c
new file mode 100755 (executable)
index 0000000..f8610a2
--- /dev/null
@@ -0,0 +1,28 @@
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+
+uint64_t softfloat_estimateDiv128To64( uint64_t a64, uint64_t a0, uint64_t b )
+{
+    uint32_t b32;
+    uint64_t z;
+    struct uint128 term, rem;
+    uint64_t rem32;
+
+    if ( b <= a64 ) return UINT64_C( 0xFFFFFFFFFFFFFFFF );
+    b32 = b>>32;
+    z = ( (uint64_t) b32<<32 <= a64 ) ? UINT64_C( 0xFFFFFFFF00000000 )
+            : ( a64 / b32 )<<32;
+    term = softfloat_mul64To128( b, z );
+    rem = softfloat_sub128( a64, a0, term.v64, term.v0 );
+    while ( UINT64_C( 0x8000000000000000 ) <= rem.v64 ) {
+        z -= UINT64_C( 0x100000000 );
+        rem = softfloat_add128( rem.v64, rem.v0, b32, (uint64_t) ( b<<32 ) );
+    }
+    rem32 = ( rem.v64<<32 ) | ( rem.v0>>32 );
+    z |= ( (uint64_t) b32<<32 <= rem32 ) ? 0xFFFFFFFF : rem32 / b32;
+    return z;
+
+}
+
diff --git a/softfloat/s_estimateDiv128To64.cc b/softfloat/s_estimateDiv128To64.cc
deleted file mode 100755 (executable)
index f8610a2..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-
-#include <stdint.h>
-#include "platform.h"
-#include "primitives.h"
-
-uint64_t softfloat_estimateDiv128To64( uint64_t a64, uint64_t a0, uint64_t b )
-{
-    uint32_t b32;
-    uint64_t z;
-    struct uint128 term, rem;
-    uint64_t rem32;
-
-    if ( b <= a64 ) return UINT64_C( 0xFFFFFFFFFFFFFFFF );
-    b32 = b>>32;
-    z = ( (uint64_t) b32<<32 <= a64 ) ? UINT64_C( 0xFFFFFFFF00000000 )
-            : ( a64 / b32 )<<32;
-    term = softfloat_mul64To128( b, z );
-    rem = softfloat_sub128( a64, a0, term.v64, term.v0 );
-    while ( UINT64_C( 0x8000000000000000 ) <= rem.v64 ) {
-        z -= UINT64_C( 0x100000000 );
-        rem = softfloat_add128( rem.v64, rem.v0, b32, (uint64_t) ( b<<32 ) );
-    }
-    rem32 = ( rem.v64<<32 ) | ( rem.v0>>32 );
-    z |= ( (uint64_t) b32<<32 <= rem32 ) ? 0xFFFFFFFF : rem32 / b32;
-    return z;
-
-}
-
diff --git a/softfloat/s_estimateSqrt32.c b/softfloat/s_estimateSqrt32.c
new file mode 100755 (executable)
index 0000000..e22a9dc
--- /dev/null
@@ -0,0 +1,37 @@
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+
+uint32_t softfloat_estimateSqrt32( unsigned int expA, uint32_t a )
+{
+    static const uint16_t sqrtOddAdjustments[] = {
+        0x0004, 0x0022, 0x005D, 0x00B1, 0x011D, 0x019F, 0x0236, 0x02E0,
+        0x039C, 0x0468, 0x0545, 0x0631, 0x072B, 0x0832, 0x0946, 0x0A67
+    };
+    static const uint16_t sqrtEvenAdjustments[] = {
+        0x0A2D, 0x08AF, 0x075A, 0x0629, 0x051A, 0x0429, 0x0356, 0x029E,
+        0x0200, 0x0179, 0x0109, 0x00AF, 0x0068, 0x0034, 0x0012, 0x0002
+    };
+    int index;
+    uint32_t z;
+    union { uint32_t ui; int32_t i; } u32;
+
+    index = ( a>>27 ) & 15;
+    if ( expA & 1 ) {
+        z = 0x4000 + ( a>>17 ) - sqrtOddAdjustments[ index ];
+        z = ( ( a / z )<<14 ) + ( z<<15 );
+        a >>= 1;
+    } else {
+        z = 0x8000 + ( a>>17 ) - sqrtEvenAdjustments[ index ];
+        z = a / z + z;
+        z = ( 0x20000 <= z ) ? 0xFFFF8000 : z<<15;
+        if ( z <= a ) {
+            u32.ui = a;
+            return u32.i>>1;
+        }
+    }
+    return (uint32_t) ( ( (uint64_t) a<<31 ) / z ) + ( z>>1 );
+
+}
+
diff --git a/softfloat/s_estimateSqrt32.cc b/softfloat/s_estimateSqrt32.cc
deleted file mode 100755 (executable)
index e22a9dc..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-
-#include <stdint.h>
-#include "platform.h"
-#include "primitives.h"
-
-uint32_t softfloat_estimateSqrt32( unsigned int expA, uint32_t a )
-{
-    static const uint16_t sqrtOddAdjustments[] = {
-        0x0004, 0x0022, 0x005D, 0x00B1, 0x011D, 0x019F, 0x0236, 0x02E0,
-        0x039C, 0x0468, 0x0545, 0x0631, 0x072B, 0x0832, 0x0946, 0x0A67
-    };
-    static const uint16_t sqrtEvenAdjustments[] = {
-        0x0A2D, 0x08AF, 0x075A, 0x0629, 0x051A, 0x0429, 0x0356, 0x029E,
-        0x0200, 0x0179, 0x0109, 0x00AF, 0x0068, 0x0034, 0x0012, 0x0002
-    };
-    int index;
-    uint32_t z;
-    union { uint32_t ui; int32_t i; } u32;
-
-    index = ( a>>27 ) & 15;
-    if ( expA & 1 ) {
-        z = 0x4000 + ( a>>17 ) - sqrtOddAdjustments[ index ];
-        z = ( ( a / z )<<14 ) + ( z<<15 );
-        a >>= 1;
-    } else {
-        z = 0x8000 + ( a>>17 ) - sqrtEvenAdjustments[ index ];
-        z = a / z + z;
-        z = ( 0x20000 <= z ) ? 0xFFFF8000 : z<<15;
-        if ( z <= a ) {
-            u32.ui = a;
-            return u32.i>>1;
-        }
-    }
-    return (uint32_t) ( ( (uint64_t) a<<31 ) / z ) + ( z>>1 );
-
-}
-
diff --git a/softfloat/s_le128.c b/softfloat/s_le128.c
new file mode 100755 (executable)
index 0000000..83b1d7f
--- /dev/null
@@ -0,0 +1,13 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+\r
+bool softfloat_le128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )\r
+{\r
+\r
+    return ( a64 < b64 ) || ( ( a64 == b64 ) && ( a0 <= b0 ) );\r
+\r
+}\r
+\r
diff --git a/softfloat/s_le128.cc b/softfloat/s_le128.cc
deleted file mode 100755 (executable)
index 83b1d7f..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-\r
-bool softfloat_le128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )\r
-{\r
-\r
-    return ( a64 < b64 ) || ( ( a64 == b64 ) && ( a0 <= b0 ) );\r
-\r
-}\r
-\r
diff --git a/softfloat/s_lt128.c b/softfloat/s_lt128.c
new file mode 100755 (executable)
index 0000000..33a3df4
--- /dev/null
@@ -0,0 +1,13 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+\r
+bool softfloat_lt128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )\r
+{\r
+\r
+    return ( a64 < b64 ) || ( ( a64 == b64 ) && ( a0 < b0 ) );\r
+\r
+}\r
+\r
diff --git a/softfloat/s_lt128.cc b/softfloat/s_lt128.cc
deleted file mode 100755 (executable)
index 33a3df4..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-\r
-bool softfloat_lt128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )\r
-{\r
-\r
-    return ( a64 < b64 ) || ( ( a64 == b64 ) && ( a0 < b0 ) );\r
-\r
-}\r
-\r
diff --git a/softfloat/s_mul128By64To192.c b/softfloat/s_mul128By64To192.c
new file mode 100755 (executable)
index 0000000..dfa8825
--- /dev/null
@@ -0,0 +1,20 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+\r
+struct uint192\r
+ softfloat_mul128By64To192( uint64_t a64, uint64_t a0, uint64_t b )\r
+{\r
+    struct uint128 p0, p64;\r
+    struct uint192 z;\r
+\r
+    p0 = softfloat_mul64To128( a0, b );\r
+    z.v0 = p0.v0;\r
+    p64 = softfloat_mul64To128( a64, b );\r
+    z.v64 = p64.v0 + p0.v64;\r
+    z.v128 = p64.v64 + ( z.v64 < p64.v0 );\r
+    return z;\r
+\r
+}\r
+\r
diff --git a/softfloat/s_mul128By64To192.cc b/softfloat/s_mul128By64To192.cc
deleted file mode 100755 (executable)
index dfa8825..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-\r
-struct uint192\r
- softfloat_mul128By64To192( uint64_t a64, uint64_t a0, uint64_t b )\r
-{\r
-    struct uint128 p0, p64;\r
-    struct uint192 z;\r
-\r
-    p0 = softfloat_mul64To128( a0, b );\r
-    z.v0 = p0.v0;\r
-    p64 = softfloat_mul64To128( a64, b );\r
-    z.v64 = p64.v0 + p0.v64;\r
-    z.v128 = p64.v64 + ( z.v64 < p64.v0 );\r
-    return z;\r
-\r
-}\r
-\r
diff --git a/softfloat/s_mul128To256.c b/softfloat/s_mul128To256.c
new file mode 100755 (executable)
index 0000000..a96cd94
--- /dev/null
@@ -0,0 +1,28 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+\r
+struct uint256\r
+ softfloat_mul128To256( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )\r
+{\r
+    struct uint128 p0, p64, p128;\r
+    struct uint256 z;\r
+\r
+    p0 = softfloat_mul64To128( a0, b0 );\r
+    z.v0 = p0.v0;\r
+    p64 = softfloat_mul64To128( a64, b0 );\r
+    z.v64 = p64.v0 + p0.v64;\r
+    z.v128 = p64.v64 + ( z.v64 < p64.v0 );\r
+    p128 = softfloat_mul64To128( a64, b64 );\r
+    z.v128 += p128.v0;\r
+    z.v192 = p128.v64 + ( z.v128 < p128.v0 );\r
+    p64 = softfloat_mul64To128( a0, b64 );\r
+    z.v64 += p64.v0;\r
+    p64.v64 += ( z.v64 < p64.v0 );\r
+    z.v128 += p64.v64;\r
+    z.v192 += ( z.v128 < p64.v64 );\r
+    return z;\r
+\r
+}\r
+\r
diff --git a/softfloat/s_mul128To256.cc b/softfloat/s_mul128To256.cc
deleted file mode 100755 (executable)
index a96cd94..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-\r
-struct uint256\r
- softfloat_mul128To256( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )\r
-{\r
-    struct uint128 p0, p64, p128;\r
-    struct uint256 z;\r
-\r
-    p0 = softfloat_mul64To128( a0, b0 );\r
-    z.v0 = p0.v0;\r
-    p64 = softfloat_mul64To128( a64, b0 );\r
-    z.v64 = p64.v0 + p0.v64;\r
-    z.v128 = p64.v64 + ( z.v64 < p64.v0 );\r
-    p128 = softfloat_mul64To128( a64, b64 );\r
-    z.v128 += p128.v0;\r
-    z.v192 = p128.v64 + ( z.v128 < p128.v0 );\r
-    p64 = softfloat_mul64To128( a0, b64 );\r
-    z.v64 += p64.v0;\r
-    p64.v64 += ( z.v64 < p64.v0 );\r
-    z.v128 += p64.v64;\r
-    z.v192 += ( z.v128 < p64.v64 );\r
-    return z;\r
-\r
-}\r
-\r
diff --git a/softfloat/s_mul64To128.c b/softfloat/s_mul64To128.c
new file mode 100755 (executable)
index 0000000..c17780b
--- /dev/null
@@ -0,0 +1,28 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+\r
+struct uint128 softfloat_mul64To128( uint64_t a, uint64_t b )\r
+{\r
+    uint32_t a32, a0, b32, b0;\r
+    struct uint128 z;\r
+    uint64_t mid1, mid2, mid;\r
+\r
+    a32 = a>>32;\r
+    a0 = a;\r
+    b32 = b>>32;\r
+    b0 = b;\r
+    z.v0 = (uint64_t) a0 * b0;\r
+    mid1 = (uint64_t) a32 * b0;\r
+    mid2 = (uint64_t) a0 * b32;\r
+    z.v64 = (uint64_t) a32 * b32;\r
+    mid = mid1 + mid2;\r
+    z.v64 += ( (uint64_t) ( mid < mid1 ) )<<32 | mid>>32;\r
+    mid <<= 32;\r
+    z.v0 += mid;\r
+    z.v64 += ( z.v0 < mid );\r
+    return z;\r
+\r
+}\r
+\r
diff --git a/softfloat/s_mul64To128.cc b/softfloat/s_mul64To128.cc
deleted file mode 100755 (executable)
index c17780b..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-\r
-struct uint128 softfloat_mul64To128( uint64_t a, uint64_t b )\r
-{\r
-    uint32_t a32, a0, b32, b0;\r
-    struct uint128 z;\r
-    uint64_t mid1, mid2, mid;\r
-\r
-    a32 = a>>32;\r
-    a0 = a;\r
-    b32 = b>>32;\r
-    b0 = b;\r
-    z.v0 = (uint64_t) a0 * b0;\r
-    mid1 = (uint64_t) a32 * b0;\r
-    mid2 = (uint64_t) a0 * b32;\r
-    z.v64 = (uint64_t) a32 * b32;\r
-    mid = mid1 + mid2;\r
-    z.v64 += ( (uint64_t) ( mid < mid1 ) )<<32 | mid>>32;\r
-    mid <<= 32;\r
-    z.v0 += mid;\r
-    z.v64 += ( z.v0 < mid );\r
-    return z;\r
-\r
-}\r
-\r
diff --git a/softfloat/s_mulAddF32.c b/softfloat/s_mulAddF32.c
new file mode 100755 (executable)
index 0000000..e55a0ba
--- /dev/null
@@ -0,0 +1,171 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+#include "specialize.h"\r
+#include "softfloat.h"\r
+\r
+float32_t\r
+ softfloat_mulAddF32(\r
+     int op, uint_fast32_t uiA, uint_fast32_t uiB, uint_fast32_t uiC )\r
+{\r
+    bool signA;\r
+    int_fast16_t expA;\r
+    uint_fast32_t sigA;\r
+    bool signB;\r
+    int_fast16_t expB;\r
+    uint_fast32_t sigB;\r
+    bool signC;\r
+    int_fast16_t expC;\r
+    uint_fast32_t sigC;\r
+    bool signProd;\r
+    uint_fast32_t magBits, uiZ;\r
+    struct exp16_sig32 normExpSig;\r
+    int_fast16_t expProd;\r
+    uint_fast64_t sigProd;\r
+    bool signZ;\r
+    int_fast16_t expZ;\r
+    uint_fast32_t sigZ;\r
+    int_fast16_t expDiff;\r
+    uint_fast64_t sigZ64, sigC64;\r
+    int shiftCount;\r
+    union ui32_f32 uZ;\r
+\r
+    signA = signF32UI( uiA );\r
+    expA = expF32UI( uiA );\r
+    sigA = fracF32UI( uiA );\r
+    signB = signF32UI( uiB );\r
+    expB = expF32UI( uiB );\r
+    sigB = fracF32UI( uiB );\r
+    signC = signF32UI( uiC ) ^ ( op == softfloat_mulAdd_subC );\r
+    expC = expF32UI( uiC );\r
+    sigC = fracF32UI( uiC );\r
+    signProd = signA ^ signB ^ ( op == softfloat_mulAdd_subProd );\r
+    if ( expA == 0xFF ) {\r
+        if ( sigA || ( ( expB == 0xFF ) && sigB ) ) goto propagateNaN_ABC;\r
+        magBits = expB | sigB;\r
+        goto infProdArg;\r
+    }\r
+    if ( expB == 0xFF ) {\r
+        if ( sigB ) goto propagateNaN_ABC;\r
+        magBits = expA | sigA;\r
+        goto infProdArg;\r
+    }\r
+    if ( expC == 0xFF ) {\r
+        if ( sigC ) {\r
+            uiZ = 0;\r
+            goto propagateNaN_ZC;\r
+        }\r
+        uiZ = uiC;\r
+        goto uiZ;\r
+    }\r
+    if ( ! expA ) {\r
+        if ( ! sigA ) goto zeroProd;\r
+        normExpSig = softfloat_normSubnormalF32Sig( sigA );\r
+        expA = normExpSig.exp;\r
+        sigA = normExpSig.sig;\r
+    }\r
+    if ( ! expB ) {\r
+        if ( ! sigB ) goto zeroProd;\r
+        normExpSig = softfloat_normSubnormalF32Sig( sigB );\r
+        expB = normExpSig.exp;\r
+        sigB = normExpSig.sig;\r
+    }\r
+    expProd = expA + expB - 0x7E;\r
+    sigA = ( sigA | 0x00800000 )<<7;\r
+    sigB = ( sigB | 0x00800000 )<<7;\r
+    sigProd = (uint_fast64_t) sigA * sigB;\r
+    if ( sigProd < UINT64_C( 0x2000000000000000 ) ) {\r
+        --expProd;\r
+        sigProd <<= 1;\r
+    }\r
+    signZ = signProd;\r
+    if ( ! expC ) {\r
+        if ( ! sigC ) {\r
+            expZ = expProd - 1;\r
+            sigZ = softfloat_shortShift64RightJam( sigProd, 31 );\r
+            goto roundPack;\r
+        }\r
+        normExpSig = softfloat_normSubnormalF32Sig( sigC );\r
+        expC = normExpSig.exp;\r
+        sigC = normExpSig.sig;\r
+    }\r
+    sigC = ( sigC | 0x00800000 )<<6;\r
+    expDiff = expProd - expC;\r
+    if ( signProd == signC ) {\r
+        if ( expDiff <= 0 ) {\r
+            expZ = expC;\r
+            sigZ = sigC + softfloat_shift64RightJam( sigProd, 32 - expDiff );\r
+        } else {\r
+            expZ = expProd;\r
+            sigZ64 =\r
+                sigProd\r
+                    + softfloat_shift64RightJam(\r
+                          (uint_fast64_t) sigC<<32, expDiff );\r
+            sigZ = softfloat_shortShift64RightJam( sigZ64, 32 );\r
+        }\r
+        if ( sigZ < 0x40000000 ) {\r
+            --expZ;\r
+            sigZ <<= 1;\r
+        }\r
+    } else {\r
+/*** OPTIMIZE BETTER? ***/\r
+        sigC64 = (uint_fast64_t) sigC<<32;\r
+        if ( expDiff < 0 ) {\r
+            signZ = signC;\r
+            expZ = expC;\r
+            sigZ64 = sigC64 - softfloat_shift64RightJam( sigProd, - expDiff );\r
+        } else if ( ! expDiff ) {\r
+            expZ = expProd;\r
+            sigZ64 = sigProd - sigC64;\r
+            if ( ! sigZ64 ) goto completeCancellation;\r
+            if ( sigZ64 & UINT64_C( 0x8000000000000000 ) ) {\r
+                signZ ^= 1;\r
+                sigZ64 = - sigZ64;\r
+            }\r
+        } else {\r
+            expZ = expProd;\r
+            sigZ64 = sigProd - softfloat_shift64RightJam( sigC64, expDiff );\r
+        }\r
+        shiftCount = softfloat_countLeadingZeros64( sigZ64 ) - 1;\r
+        expZ -= shiftCount;\r
+        shiftCount -= 32;\r
+        if ( shiftCount < 0 ) {\r
+            sigZ = softfloat_shortShift64RightJam( sigZ64, - shiftCount );\r
+        } else {\r
+            sigZ = (uint_fast32_t) sigZ64<<shiftCount;\r
+        }\r
+    }\r
+ roundPack:\r
+    return softfloat_roundPackToF32( signZ, expZ, sigZ );\r
+ propagateNaN_ABC:\r
+    uiZ = softfloat_propagateNaNF32UI( uiA, uiB );\r
+    goto propagateNaN_ZC;\r
+ infProdArg:\r
+    if ( magBits ) {\r
+        uiZ = packToF32UI( signProd, 0xFF, 0 );\r
+        if ( expC != 0xFF ) goto uiZ;\r
+        if ( sigC ) goto propagateNaN_ZC;\r
+        if ( signProd == signC ) goto uiZ;\r
+    }\r
+ invalid:\r
+    softfloat_raiseFlags( softfloat_flag_invalid );\r
+    uiZ = defaultNaNF32UI;\r
+ propagateNaN_ZC:\r
+    uiZ = softfloat_propagateNaNF32UI( uiZ, uiC );\r
+    goto uiZ;\r
+ zeroProd:\r
+    uiZ = uiC;\r
+    if ( ! ( expC | sigC ) && ( signProd != signC ) ) {\r
+ completeCancellation:\r
+        uiZ =\r
+            packToF32UI( softfloat_roundingMode == softfloat_round_min, 0, 0 );\r
+    }\r
+ uiZ:\r
+    uZ.ui = uiZ;\r
+    return uZ.f;\r
+\r
+}\r
+\r
diff --git a/softfloat/s_mulAddF32.cc b/softfloat/s_mulAddF32.cc
deleted file mode 100755 (executable)
index e55a0ba..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-#include "specialize.h"\r
-#include "softfloat.h"\r
-\r
-float32_t\r
- softfloat_mulAddF32(\r
-     int op, uint_fast32_t uiA, uint_fast32_t uiB, uint_fast32_t uiC )\r
-{\r
-    bool signA;\r
-    int_fast16_t expA;\r
-    uint_fast32_t sigA;\r
-    bool signB;\r
-    int_fast16_t expB;\r
-    uint_fast32_t sigB;\r
-    bool signC;\r
-    int_fast16_t expC;\r
-    uint_fast32_t sigC;\r
-    bool signProd;\r
-    uint_fast32_t magBits, uiZ;\r
-    struct exp16_sig32 normExpSig;\r
-    int_fast16_t expProd;\r
-    uint_fast64_t sigProd;\r
-    bool signZ;\r
-    int_fast16_t expZ;\r
-    uint_fast32_t sigZ;\r
-    int_fast16_t expDiff;\r
-    uint_fast64_t sigZ64, sigC64;\r
-    int shiftCount;\r
-    union ui32_f32 uZ;\r
-\r
-    signA = signF32UI( uiA );\r
-    expA = expF32UI( uiA );\r
-    sigA = fracF32UI( uiA );\r
-    signB = signF32UI( uiB );\r
-    expB = expF32UI( uiB );\r
-    sigB = fracF32UI( uiB );\r
-    signC = signF32UI( uiC ) ^ ( op == softfloat_mulAdd_subC );\r
-    expC = expF32UI( uiC );\r
-    sigC = fracF32UI( uiC );\r
-    signProd = signA ^ signB ^ ( op == softfloat_mulAdd_subProd );\r
-    if ( expA == 0xFF ) {\r
-        if ( sigA || ( ( expB == 0xFF ) && sigB ) ) goto propagateNaN_ABC;\r
-        magBits = expB | sigB;\r
-        goto infProdArg;\r
-    }\r
-    if ( expB == 0xFF ) {\r
-        if ( sigB ) goto propagateNaN_ABC;\r
-        magBits = expA | sigA;\r
-        goto infProdArg;\r
-    }\r
-    if ( expC == 0xFF ) {\r
-        if ( sigC ) {\r
-            uiZ = 0;\r
-            goto propagateNaN_ZC;\r
-        }\r
-        uiZ = uiC;\r
-        goto uiZ;\r
-    }\r
-    if ( ! expA ) {\r
-        if ( ! sigA ) goto zeroProd;\r
-        normExpSig = softfloat_normSubnormalF32Sig( sigA );\r
-        expA = normExpSig.exp;\r
-        sigA = normExpSig.sig;\r
-    }\r
-    if ( ! expB ) {\r
-        if ( ! sigB ) goto zeroProd;\r
-        normExpSig = softfloat_normSubnormalF32Sig( sigB );\r
-        expB = normExpSig.exp;\r
-        sigB = normExpSig.sig;\r
-    }\r
-    expProd = expA + expB - 0x7E;\r
-    sigA = ( sigA | 0x00800000 )<<7;\r
-    sigB = ( sigB | 0x00800000 )<<7;\r
-    sigProd = (uint_fast64_t) sigA * sigB;\r
-    if ( sigProd < UINT64_C( 0x2000000000000000 ) ) {\r
-        --expProd;\r
-        sigProd <<= 1;\r
-    }\r
-    signZ = signProd;\r
-    if ( ! expC ) {\r
-        if ( ! sigC ) {\r
-            expZ = expProd - 1;\r
-            sigZ = softfloat_shortShift64RightJam( sigProd, 31 );\r
-            goto roundPack;\r
-        }\r
-        normExpSig = softfloat_normSubnormalF32Sig( sigC );\r
-        expC = normExpSig.exp;\r
-        sigC = normExpSig.sig;\r
-    }\r
-    sigC = ( sigC | 0x00800000 )<<6;\r
-    expDiff = expProd - expC;\r
-    if ( signProd == signC ) {\r
-        if ( expDiff <= 0 ) {\r
-            expZ = expC;\r
-            sigZ = sigC + softfloat_shift64RightJam( sigProd, 32 - expDiff );\r
-        } else {\r
-            expZ = expProd;\r
-            sigZ64 =\r
-                sigProd\r
-                    + softfloat_shift64RightJam(\r
-                          (uint_fast64_t) sigC<<32, expDiff );\r
-            sigZ = softfloat_shortShift64RightJam( sigZ64, 32 );\r
-        }\r
-        if ( sigZ < 0x40000000 ) {\r
-            --expZ;\r
-            sigZ <<= 1;\r
-        }\r
-    } else {\r
-/*** OPTIMIZE BETTER? ***/\r
-        sigC64 = (uint_fast64_t) sigC<<32;\r
-        if ( expDiff < 0 ) {\r
-            signZ = signC;\r
-            expZ = expC;\r
-            sigZ64 = sigC64 - softfloat_shift64RightJam( sigProd, - expDiff );\r
-        } else if ( ! expDiff ) {\r
-            expZ = expProd;\r
-            sigZ64 = sigProd - sigC64;\r
-            if ( ! sigZ64 ) goto completeCancellation;\r
-            if ( sigZ64 & UINT64_C( 0x8000000000000000 ) ) {\r
-                signZ ^= 1;\r
-                sigZ64 = - sigZ64;\r
-            }\r
-        } else {\r
-            expZ = expProd;\r
-            sigZ64 = sigProd - softfloat_shift64RightJam( sigC64, expDiff );\r
-        }\r
-        shiftCount = softfloat_countLeadingZeros64( sigZ64 ) - 1;\r
-        expZ -= shiftCount;\r
-        shiftCount -= 32;\r
-        if ( shiftCount < 0 ) {\r
-            sigZ = softfloat_shortShift64RightJam( sigZ64, - shiftCount );\r
-        } else {\r
-            sigZ = (uint_fast32_t) sigZ64<<shiftCount;\r
-        }\r
-    }\r
- roundPack:\r
-    return softfloat_roundPackToF32( signZ, expZ, sigZ );\r
- propagateNaN_ABC:\r
-    uiZ = softfloat_propagateNaNF32UI( uiA, uiB );\r
-    goto propagateNaN_ZC;\r
- infProdArg:\r
-    if ( magBits ) {\r
-        uiZ = packToF32UI( signProd, 0xFF, 0 );\r
-        if ( expC != 0xFF ) goto uiZ;\r
-        if ( sigC ) goto propagateNaN_ZC;\r
-        if ( signProd == signC ) goto uiZ;\r
-    }\r
- invalid:\r
-    softfloat_raiseFlags( softfloat_flag_invalid );\r
-    uiZ = defaultNaNF32UI;\r
- propagateNaN_ZC:\r
-    uiZ = softfloat_propagateNaNF32UI( uiZ, uiC );\r
-    goto uiZ;\r
- zeroProd:\r
-    uiZ = uiC;\r
-    if ( ! ( expC | sigC ) && ( signProd != signC ) ) {\r
- completeCancellation:\r
-        uiZ =\r
-            packToF32UI( softfloat_roundingMode == softfloat_round_min, 0, 0 );\r
-    }\r
- uiZ:\r
-    uZ.ui = uiZ;\r
-    return uZ.f;\r
-\r
-}\r
-\r
diff --git a/softfloat/s_mulAddF64.c b/softfloat/s_mulAddF64.c
new file mode 100755 (executable)
index 0000000..01ba3b4
--- /dev/null
@@ -0,0 +1,188 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+#include "specialize.h"\r
+#include "softfloat.h"\r
+\r
+float64_t\r
+ softfloat_mulAddF64(\r
+     int op, uint_fast64_t uiA, uint_fast64_t uiB, uint_fast64_t uiC )\r
+{\r
+    bool signA;\r
+    int_fast16_t expA;\r
+    uint_fast64_t sigA;\r
+    bool signB;\r
+    int_fast16_t expB;\r
+    uint_fast64_t sigB;\r
+    bool signC;\r
+    int_fast16_t expC;\r
+    uint_fast64_t sigC;\r
+    bool signProd;\r
+    uint_fast64_t magBits, uiZ;\r
+    struct exp16_sig64 normExpSig;\r
+    int_fast16_t expProd;\r
+    struct uint128 sigProd;\r
+    bool signZ;\r
+    int_fast16_t expZ;\r
+    uint_fast64_t sigZ;\r
+    int_fast16_t expDiff;\r
+    struct uint128 sigC128, sigZ128;\r
+    int shiftCount;\r
+    union ui64_f64 uZ;\r
+\r
+    signA = signF64UI( uiA );\r
+    expA = expF64UI( uiA );\r
+    sigA = fracF64UI( uiA );\r
+    signB = signF64UI( uiB );\r
+    expB = expF64UI( uiB );\r
+    sigB = fracF64UI( uiB );\r
+    signC = signF64UI( uiC ) ^ ( op == softfloat_mulAdd_subC );\r
+    expC = expF64UI( uiC );\r
+    sigC = fracF64UI( uiC );\r
+    signProd = signA ^ signB ^ ( op == softfloat_mulAdd_subProd );\r
+    if ( expA == 0x7FF ) {\r
+        if ( sigA || ( ( expB == 0x7FF ) && sigB ) ) goto propagateNaN_ABC;\r
+        magBits = expB | sigB;\r
+        goto infProdArg;\r
+    }\r
+    if ( expB == 0x7FF ) {\r
+        if ( sigB ) goto propagateNaN_ABC;\r
+        magBits = expA | sigA;\r
+        goto infProdArg;\r
+    }\r
+    if ( expC == 0x7FF ) {\r
+        if ( sigC ) {\r
+            uiZ = 0;\r
+            goto propagateNaN_ZC;\r
+        }\r
+        uiZ = uiC;\r
+        goto uiZ;\r
+    }\r
+    if ( ! expA ) {\r
+        if ( ! sigA ) goto zeroProd;\r
+        normExpSig = softfloat_normSubnormalF64Sig( sigA );\r
+        expA = normExpSig.exp;\r
+        sigA = normExpSig.sig;\r
+    }\r
+    if ( ! expB ) {\r
+        if ( ! sigB ) goto zeroProd;\r
+        normExpSig = softfloat_normSubnormalF64Sig( sigB );\r
+        expB = normExpSig.exp;\r
+        sigB = normExpSig.sig;\r
+    }\r
+    expProd = expA + expB - 0x3FE;\r
+    sigA = ( sigA | UINT64_C( 0x0010000000000000 ) )<<10;\r
+    sigB = ( sigB | UINT64_C( 0x0010000000000000 ) )<<10;\r
+    sigProd = softfloat_mul64To128( sigA, sigB );\r
+    if ( sigProd.v64 < UINT64_C( 0x2000000000000000 ) ) {\r
+        --expProd;\r
+        sigProd = softfloat_shortShift128Left( sigProd.v64, sigProd.v0, 1 );\r
+    }\r
+    signZ = signProd;\r
+    if ( ! expC ) {\r
+        if ( ! sigC ) {\r
+            expZ = expProd - 1;\r
+            sigZ = sigProd.v64<<1 | ( sigProd.v0 != 0 );\r
+            goto roundPack;\r
+        }\r
+        normExpSig = softfloat_normSubnormalF64Sig( sigC );\r
+        expC = normExpSig.exp;\r
+        sigC = normExpSig.sig;\r
+    }\r
+    sigC = ( sigC | UINT64_C( 0x0010000000000000 ) )<<9;\r
+    expDiff = expProd - expC;\r
+    if ( signProd == signC ) {\r
+        if ( expDiff <= 0 ) {\r
+            expZ = expC;\r
+            if ( expDiff ) {\r
+                sigProd.v64 =\r
+                    softfloat_shift64RightJam( sigProd.v64, - expDiff );\r
+            }\r
+            sigZ = ( sigC + sigProd.v64 ) | ( sigProd.v0 != 0 );\r
+        } else {\r
+            expZ = expProd;\r
+            sigC128 = softfloat_shift128RightJam( sigC, 0, expDiff );\r
+            sigZ128 =\r
+                softfloat_add128(\r
+                    sigProd.v64, sigProd.v0, sigC128.v64, sigC128.v0 );\r
+            sigZ = sigZ128.v64 | ( sigZ128.v0 != 0 );\r
+        }\r
+        if ( sigZ < UINT64_C( 0x4000000000000000 ) ) {\r
+            --expZ;\r
+            sigZ <<= 1;\r
+        }\r
+    } else {\r
+/*** OPTIMIZE BETTER? ***/\r
+        if ( expDiff < 0 ) {\r
+            signZ = signC;\r
+            expZ = expC;\r
+            sigProd =\r
+                softfloat_shift128RightJam(\r
+                    sigProd.v64, sigProd.v0, - expDiff );\r
+            sigZ128 = softfloat_sub128( sigC, 0, sigProd.v64, sigProd.v0 );\r
+        } else if ( ! expDiff ) {\r
+            expZ = expProd;\r
+            sigZ128 = softfloat_sub128( sigProd.v64, sigProd.v0, sigC, 0 );\r
+            if ( ! ( sigZ128.v64 | sigZ128.v0 ) ) goto completeCancellation;\r
+            if ( sigZ128.v64 & UINT64_C( 0x8000000000000000 ) ) {\r
+                signZ ^= 1;\r
+                sigZ128 = softfloat_sub128( 0, 0, sigZ128.v64, sigZ128.v0 );\r
+            }\r
+        } else {\r
+            expZ = expProd;\r
+            sigC128 = softfloat_shift128RightJam( sigC, 0, expDiff );\r
+            sigZ128 =\r
+                softfloat_sub128(\r
+                    sigProd.v64, sigProd.v0, sigC128.v64, sigC128.v0 );\r
+        }\r
+        if ( ! sigZ128.v64 ) {\r
+            expZ -= 64;\r
+            sigZ128.v64 = sigZ128.v0;\r
+            sigZ128.v0 = 0;\r
+        }\r
+        shiftCount = softfloat_countLeadingZeros64( sigZ128.v64 ) - 1;\r
+        expZ -= shiftCount;\r
+        if ( shiftCount < 0 ) {\r
+            sigZ = softfloat_shortShift64RightJam( sigZ128.v64, - shiftCount );\r
+        } else {\r
+            sigZ128 =\r
+                softfloat_shortShift128Left(\r
+                    sigZ128.v64, sigZ128.v0, shiftCount );\r
+            sigZ = sigZ128.v64;\r
+        }\r
+        sigZ |= ( sigZ128.v0 != 0 );\r
+    }\r
+ roundPack:\r
+    return softfloat_roundPackToF64( signZ, expZ, sigZ );\r
+ propagateNaN_ABC:\r
+    uiZ = softfloat_propagateNaNF64UI( uiA, uiB );\r
+    goto propagateNaN_ZC;\r
+ infProdArg:\r
+    if ( magBits ) {\r
+        uiZ = packToF64UI( signProd, 0x7FF, 0 );\r
+        if ( expC != 0x7FF ) goto uiZ;\r
+        if ( sigC ) goto propagateNaN_ZC;\r
+        if ( signProd == signC ) goto uiZ;\r
+    }\r
+ invalid:\r
+    softfloat_raiseFlags( softfloat_flag_invalid );\r
+    uiZ = defaultNaNF64UI;\r
+ propagateNaN_ZC:\r
+    uiZ = softfloat_propagateNaNF64UI( uiZ, uiC );\r
+    goto uiZ;\r
+ zeroProd:\r
+    uiZ = uiC;\r
+    if ( ! ( expC | sigC ) && ( signProd != signC ) ) {\r
+ completeCancellation:\r
+        uiZ =\r
+            packToF64UI( softfloat_roundingMode == softfloat_round_min, 0, 0 );\r
+    }\r
+ uiZ:\r
+    uZ.ui = uiZ;\r
+    return uZ.f;\r
+\r
+}\r
+\r
diff --git a/softfloat/s_mulAddF64.cc b/softfloat/s_mulAddF64.cc
deleted file mode 100755 (executable)
index 01ba3b4..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-#include "specialize.h"\r
-#include "softfloat.h"\r
-\r
-float64_t\r
- softfloat_mulAddF64(\r
-     int op, uint_fast64_t uiA, uint_fast64_t uiB, uint_fast64_t uiC )\r
-{\r
-    bool signA;\r
-    int_fast16_t expA;\r
-    uint_fast64_t sigA;\r
-    bool signB;\r
-    int_fast16_t expB;\r
-    uint_fast64_t sigB;\r
-    bool signC;\r
-    int_fast16_t expC;\r
-    uint_fast64_t sigC;\r
-    bool signProd;\r
-    uint_fast64_t magBits, uiZ;\r
-    struct exp16_sig64 normExpSig;\r
-    int_fast16_t expProd;\r
-    struct uint128 sigProd;\r
-    bool signZ;\r
-    int_fast16_t expZ;\r
-    uint_fast64_t sigZ;\r
-    int_fast16_t expDiff;\r
-    struct uint128 sigC128, sigZ128;\r
-    int shiftCount;\r
-    union ui64_f64 uZ;\r
-\r
-    signA = signF64UI( uiA );\r
-    expA = expF64UI( uiA );\r
-    sigA = fracF64UI( uiA );\r
-    signB = signF64UI( uiB );\r
-    expB = expF64UI( uiB );\r
-    sigB = fracF64UI( uiB );\r
-    signC = signF64UI( uiC ) ^ ( op == softfloat_mulAdd_subC );\r
-    expC = expF64UI( uiC );\r
-    sigC = fracF64UI( uiC );\r
-    signProd = signA ^ signB ^ ( op == softfloat_mulAdd_subProd );\r
-    if ( expA == 0x7FF ) {\r
-        if ( sigA || ( ( expB == 0x7FF ) && sigB ) ) goto propagateNaN_ABC;\r
-        magBits = expB | sigB;\r
-        goto infProdArg;\r
-    }\r
-    if ( expB == 0x7FF ) {\r
-        if ( sigB ) goto propagateNaN_ABC;\r
-        magBits = expA | sigA;\r
-        goto infProdArg;\r
-    }\r
-    if ( expC == 0x7FF ) {\r
-        if ( sigC ) {\r
-            uiZ = 0;\r
-            goto propagateNaN_ZC;\r
-        }\r
-        uiZ = uiC;\r
-        goto uiZ;\r
-    }\r
-    if ( ! expA ) {\r
-        if ( ! sigA ) goto zeroProd;\r
-        normExpSig = softfloat_normSubnormalF64Sig( sigA );\r
-        expA = normExpSig.exp;\r
-        sigA = normExpSig.sig;\r
-    }\r
-    if ( ! expB ) {\r
-        if ( ! sigB ) goto zeroProd;\r
-        normExpSig = softfloat_normSubnormalF64Sig( sigB );\r
-        expB = normExpSig.exp;\r
-        sigB = normExpSig.sig;\r
-    }\r
-    expProd = expA + expB - 0x3FE;\r
-    sigA = ( sigA | UINT64_C( 0x0010000000000000 ) )<<10;\r
-    sigB = ( sigB | UINT64_C( 0x0010000000000000 ) )<<10;\r
-    sigProd = softfloat_mul64To128( sigA, sigB );\r
-    if ( sigProd.v64 < UINT64_C( 0x2000000000000000 ) ) {\r
-        --expProd;\r
-        sigProd = softfloat_shortShift128Left( sigProd.v64, sigProd.v0, 1 );\r
-    }\r
-    signZ = signProd;\r
-    if ( ! expC ) {\r
-        if ( ! sigC ) {\r
-            expZ = expProd - 1;\r
-            sigZ = sigProd.v64<<1 | ( sigProd.v0 != 0 );\r
-            goto roundPack;\r
-        }\r
-        normExpSig = softfloat_normSubnormalF64Sig( sigC );\r
-        expC = normExpSig.exp;\r
-        sigC = normExpSig.sig;\r
-    }\r
-    sigC = ( sigC | UINT64_C( 0x0010000000000000 ) )<<9;\r
-    expDiff = expProd - expC;\r
-    if ( signProd == signC ) {\r
-        if ( expDiff <= 0 ) {\r
-            expZ = expC;\r
-            if ( expDiff ) {\r
-                sigProd.v64 =\r
-                    softfloat_shift64RightJam( sigProd.v64, - expDiff );\r
-            }\r
-            sigZ = ( sigC + sigProd.v64 ) | ( sigProd.v0 != 0 );\r
-        } else {\r
-            expZ = expProd;\r
-            sigC128 = softfloat_shift128RightJam( sigC, 0, expDiff );\r
-            sigZ128 =\r
-                softfloat_add128(\r
-                    sigProd.v64, sigProd.v0, sigC128.v64, sigC128.v0 );\r
-            sigZ = sigZ128.v64 | ( sigZ128.v0 != 0 );\r
-        }\r
-        if ( sigZ < UINT64_C( 0x4000000000000000 ) ) {\r
-            --expZ;\r
-            sigZ <<= 1;\r
-        }\r
-    } else {\r
-/*** OPTIMIZE BETTER? ***/\r
-        if ( expDiff < 0 ) {\r
-            signZ = signC;\r
-            expZ = expC;\r
-            sigProd =\r
-                softfloat_shift128RightJam(\r
-                    sigProd.v64, sigProd.v0, - expDiff );\r
-            sigZ128 = softfloat_sub128( sigC, 0, sigProd.v64, sigProd.v0 );\r
-        } else if ( ! expDiff ) {\r
-            expZ = expProd;\r
-            sigZ128 = softfloat_sub128( sigProd.v64, sigProd.v0, sigC, 0 );\r
-            if ( ! ( sigZ128.v64 | sigZ128.v0 ) ) goto completeCancellation;\r
-            if ( sigZ128.v64 & UINT64_C( 0x8000000000000000 ) ) {\r
-                signZ ^= 1;\r
-                sigZ128 = softfloat_sub128( 0, 0, sigZ128.v64, sigZ128.v0 );\r
-            }\r
-        } else {\r
-            expZ = expProd;\r
-            sigC128 = softfloat_shift128RightJam( sigC, 0, expDiff );\r
-            sigZ128 =\r
-                softfloat_sub128(\r
-                    sigProd.v64, sigProd.v0, sigC128.v64, sigC128.v0 );\r
-        }\r
-        if ( ! sigZ128.v64 ) {\r
-            expZ -= 64;\r
-            sigZ128.v64 = sigZ128.v0;\r
-            sigZ128.v0 = 0;\r
-        }\r
-        shiftCount = softfloat_countLeadingZeros64( sigZ128.v64 ) - 1;\r
-        expZ -= shiftCount;\r
-        if ( shiftCount < 0 ) {\r
-            sigZ = softfloat_shortShift64RightJam( sigZ128.v64, - shiftCount );\r
-        } else {\r
-            sigZ128 =\r
-                softfloat_shortShift128Left(\r
-                    sigZ128.v64, sigZ128.v0, shiftCount );\r
-            sigZ = sigZ128.v64;\r
-        }\r
-        sigZ |= ( sigZ128.v0 != 0 );\r
-    }\r
- roundPack:\r
-    return softfloat_roundPackToF64( signZ, expZ, sigZ );\r
- propagateNaN_ABC:\r
-    uiZ = softfloat_propagateNaNF64UI( uiA, uiB );\r
-    goto propagateNaN_ZC;\r
- infProdArg:\r
-    if ( magBits ) {\r
-        uiZ = packToF64UI( signProd, 0x7FF, 0 );\r
-        if ( expC != 0x7FF ) goto uiZ;\r
-        if ( sigC ) goto propagateNaN_ZC;\r
-        if ( signProd == signC ) goto uiZ;\r
-    }\r
- invalid:\r
-    softfloat_raiseFlags( softfloat_flag_invalid );\r
-    uiZ = defaultNaNF64UI;\r
- propagateNaN_ZC:\r
-    uiZ = softfloat_propagateNaNF64UI( uiZ, uiC );\r
-    goto uiZ;\r
- zeroProd:\r
-    uiZ = uiC;\r
-    if ( ! ( expC | sigC ) && ( signProd != signC ) ) {\r
- completeCancellation:\r
-        uiZ =\r
-            packToF64UI( softfloat_roundingMode == softfloat_round_min, 0, 0 );\r
-    }\r
- uiZ:\r
-    uZ.ui = uiZ;\r
-    return uZ.f;\r
-\r
-}\r
-\r
diff --git a/softfloat/s_normRoundPackToF32.c b/softfloat/s_normRoundPackToF32.c
new file mode 100755 (executable)
index 0000000..2e6f4b0
--- /dev/null
@@ -0,0 +1,24 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+\r
+float32_t\r
+ softfloat_normRoundPackToF32( bool sign, int_fast16_t exp, uint_fast32_t sig )\r
+{\r
+    int shiftCount;\r
+    union ui32_f32 uZ;\r
+\r
+    shiftCount = softfloat_countLeadingZeros32( sig ) - 1;\r
+    exp -= shiftCount;\r
+    if ( ( 7 <= shiftCount ) && ( (uint16_t) exp < 0xFD ) ) {\r
+        uZ.ui = packToF32UI( sign, sig ? exp : 0, sig<<( shiftCount - 7 ) );\r
+        return uZ.f;\r
+    } else {\r
+        return softfloat_roundPackToF32( sign, exp, sig<<shiftCount );\r
+    }\r
+\r
+}\r
+\r
diff --git a/softfloat/s_normRoundPackToF32.cc b/softfloat/s_normRoundPackToF32.cc
deleted file mode 100755 (executable)
index 2e6f4b0..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-\r
-float32_t\r
- softfloat_normRoundPackToF32( bool sign, int_fast16_t exp, uint_fast32_t sig )\r
-{\r
-    int shiftCount;\r
-    union ui32_f32 uZ;\r
-\r
-    shiftCount = softfloat_countLeadingZeros32( sig ) - 1;\r
-    exp -= shiftCount;\r
-    if ( ( 7 <= shiftCount ) && ( (uint16_t) exp < 0xFD ) ) {\r
-        uZ.ui = packToF32UI( sign, sig ? exp : 0, sig<<( shiftCount - 7 ) );\r
-        return uZ.f;\r
-    } else {\r
-        return softfloat_roundPackToF32( sign, exp, sig<<shiftCount );\r
-    }\r
-\r
-}\r
-\r
diff --git a/softfloat/s_normRoundPackToF64.c b/softfloat/s_normRoundPackToF64.c
new file mode 100755 (executable)
index 0000000..64dced4
--- /dev/null
@@ -0,0 +1,24 @@
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+\r
+float64_t\r
+ softfloat_normRoundPackToF64( bool sign, int_fast16_t exp, uint_fast64_t sig )\r
+{\r
+    int shiftCount;\r
+    union ui64_f64 uZ;\r
+\r
+    shiftCount = softfloat_countLeadingZeros64( sig ) - 1;\r
+    exp -= shiftCount;\r
+    if ( ( 10 <= shiftCount ) && ( (uint16_t) exp < 0x7FD ) ) {\r
+        uZ.ui = packToF64UI( sign, sig ? exp : 0, sig<<( shiftCount - 10 ) );\r
+        return uZ.f;\r
+    } else {\r
+        return softfloat_roundPackToF64( sign, exp, sig<<shiftCount );\r
+    }\r
+\r
+}\r
+\r
diff --git a/softfloat/s_normRoundPackToF64.cc b/softfloat/s_normRoundPackToF64.cc
deleted file mode 100755 (executable)
index 64dced4..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-\r
-float64_t\r
- softfloat_normRoundPackToF64( bool sign, int_fast16_t exp, uint_fast64_t sig )\r
-{\r
-    int shiftCount;\r
-    union ui64_f64 uZ;\r
-\r
-    shiftCount = softfloat_countLeadingZeros64( sig ) - 1;\r
-    exp -= shiftCount;\r
-    if ( ( 10 <= shiftCount ) && ( (uint16_t) exp < 0x7FD ) ) {\r
-        uZ.ui = packToF64UI( sign, sig ? exp : 0, sig<<( shiftCount - 10 ) );\r
-        return uZ.f;\r
-    } else {\r
-        return softfloat_roundPackToF64( sign, exp, sig<<shiftCount );\r
-    }\r
-\r
-}\r
-\r
diff --git a/softfloat/s_normSubnormalF32Sig.c b/softfloat/s_normSubnormalF32Sig.c
new file mode 100755 (executable)
index 0000000..b98eb86
--- /dev/null
@@ -0,0 +1,18 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+\r
+struct exp16_sig32 softfloat_normSubnormalF32Sig( uint_fast32_t sig )\r
+{\r
+    int shiftCount;\r
+    struct exp16_sig32 z;\r
+\r
+    shiftCount = softfloat_countLeadingZeros32( sig ) - 8;\r
+    z.exp = 1 - shiftCount;\r
+    z.sig = sig<<shiftCount;\r
+    return z;\r
+\r
+}\r
+\r
diff --git a/softfloat/s_normSubnormalF32Sig.cc b/softfloat/s_normSubnormalF32Sig.cc
deleted file mode 100755 (executable)
index b98eb86..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-\r
-struct exp16_sig32 softfloat_normSubnormalF32Sig( uint_fast32_t sig )\r
-{\r
-    int shiftCount;\r
-    struct exp16_sig32 z;\r
-\r
-    shiftCount = softfloat_countLeadingZeros32( sig ) - 8;\r
-    z.exp = 1 - shiftCount;\r
-    z.sig = sig<<shiftCount;\r
-    return z;\r
-\r
-}\r
-\r
diff --git a/softfloat/s_normSubnormalF64Sig.c b/softfloat/s_normSubnormalF64Sig.c
new file mode 100755 (executable)
index 0000000..45a7c9e
--- /dev/null
@@ -0,0 +1,18 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+\r
+struct exp16_sig64 softfloat_normSubnormalF64Sig( uint_fast64_t sig )\r
+{\r
+    int shiftCount;\r
+    struct exp16_sig64 z;\r
+\r
+    shiftCount = softfloat_countLeadingZeros64( sig ) - 11;\r
+    z.exp = 1 - shiftCount;\r
+    z.sig = sig<<shiftCount;\r
+    return z;\r
+\r
+}\r
+\r
diff --git a/softfloat/s_normSubnormalF64Sig.cc b/softfloat/s_normSubnormalF64Sig.cc
deleted file mode 100755 (executable)
index 45a7c9e..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-\r
-struct exp16_sig64 softfloat_normSubnormalF64Sig( uint_fast64_t sig )\r
-{\r
-    int shiftCount;\r
-    struct exp16_sig64 z;\r
-\r
-    shiftCount = softfloat_countLeadingZeros64( sig ) - 11;\r
-    z.exp = 1 - shiftCount;\r
-    z.sig = sig<<shiftCount;\r
-    return z;\r
-\r
-}\r
-\r
diff --git a/softfloat/s_roundPackToF32.c b/softfloat/s_roundPackToF32.c
new file mode 100755 (executable)
index 0000000..11764f1
--- /dev/null
@@ -0,0 +1,65 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float32_t
+ softfloat_roundPackToF32( bool sign, int_fast16_t exp, uint_fast32_t sig )
+{
+    int roundingMode;
+    bool roundNearestEven;
+    int roundIncrement, roundBits;
+    bool isTiny;
+    uint_fast32_t uiZ;
+    union ui32_f32 uZ;
+
+    roundingMode = softfloat_roundingMode;
+    roundNearestEven = ( roundingMode == softfloat_round_nearest_even );
+    roundIncrement = 0x40;
+    if (
+           ! roundNearestEven
+        && ( roundingMode != softfloat_round_nearest_maxMag )
+    ) {
+        roundIncrement =
+               ( roundingMode == softfloat_round_minMag )
+            || ( roundingMode
+                     == ( sign ? softfloat_round_max : softfloat_round_min ) )
+                ? 0
+                : 0x7F;
+    }
+    roundBits = sig & 0x7F;
+    if ( 0xFD <= (uint16_t) exp ) {
+        if ( exp < 0 ) {
+            isTiny =
+                   ( softfloat_detectTininess
+                         == softfloat_tininess_beforeRounding )
+                || ( exp < -1 )
+                || ( sig + roundIncrement < 0x80000000 );
+            sig = softfloat_shift32RightJam( sig, - exp );
+            exp = 0;
+            roundBits = sig & 0x7F;
+            if ( isTiny && roundBits ) {
+                softfloat_raiseFlags( softfloat_flag_underflow );
+            }
+        } else if (
+            ( 0xFD < exp ) || ( 0x80000000 <= sig + roundIncrement )
+        ) {
+            softfloat_raiseFlags(
+                softfloat_flag_overflow | softfloat_flag_inexact );
+            uiZ = packToF32UI( sign, 0xFF, 0 ) - ! roundIncrement;
+            goto uiZ;
+        }
+    }
+    if ( roundBits ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+    sig = ( sig + roundIncrement )>>7;
+    sig &= ~ ( ! ( roundBits ^ 0x40 ) & roundNearestEven );
+    uiZ = packToF32UI( sign, sig ? exp : 0, sig );
+ uiZ:
+    uZ.ui = uiZ;
+    return uZ.f;
+
+}
+
diff --git a/softfloat/s_roundPackToF32.cc b/softfloat/s_roundPackToF32.cc
deleted file mode 100755 (executable)
index 11764f1..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "primitives.h"
-#include "internals.h"
-#include "softfloat.h"
-
-float32_t
- softfloat_roundPackToF32( bool sign, int_fast16_t exp, uint_fast32_t sig )
-{
-    int roundingMode;
-    bool roundNearestEven;
-    int roundIncrement, roundBits;
-    bool isTiny;
-    uint_fast32_t uiZ;
-    union ui32_f32 uZ;
-
-    roundingMode = softfloat_roundingMode;
-    roundNearestEven = ( roundingMode == softfloat_round_nearest_even );
-    roundIncrement = 0x40;
-    if (
-           ! roundNearestEven
-        && ( roundingMode != softfloat_round_nearest_maxMag )
-    ) {
-        roundIncrement =
-               ( roundingMode == softfloat_round_minMag )
-            || ( roundingMode
-                     == ( sign ? softfloat_round_max : softfloat_round_min ) )
-                ? 0
-                : 0x7F;
-    }
-    roundBits = sig & 0x7F;
-    if ( 0xFD <= (uint16_t) exp ) {
-        if ( exp < 0 ) {
-            isTiny =
-                   ( softfloat_detectTininess
-                         == softfloat_tininess_beforeRounding )
-                || ( exp < -1 )
-                || ( sig + roundIncrement < 0x80000000 );
-            sig = softfloat_shift32RightJam( sig, - exp );
-            exp = 0;
-            roundBits = sig & 0x7F;
-            if ( isTiny && roundBits ) {
-                softfloat_raiseFlags( softfloat_flag_underflow );
-            }
-        } else if (
-            ( 0xFD < exp ) || ( 0x80000000 <= sig + roundIncrement )
-        ) {
-            softfloat_raiseFlags(
-                softfloat_flag_overflow | softfloat_flag_inexact );
-            uiZ = packToF32UI( sign, 0xFF, 0 ) - ! roundIncrement;
-            goto uiZ;
-        }
-    }
-    if ( roundBits ) softfloat_exceptionFlags |= softfloat_flag_inexact;
-    sig = ( sig + roundIncrement )>>7;
-    sig &= ~ ( ! ( roundBits ^ 0x40 ) & roundNearestEven );
-    uiZ = packToF32UI( sign, sig ? exp : 0, sig );
- uiZ:
-    uZ.ui = uiZ;
-    return uZ.f;
-
-}
-
diff --git a/softfloat/s_roundPackToF64.c b/softfloat/s_roundPackToF64.c
new file mode 100755 (executable)
index 0000000..fb0ef1d
--- /dev/null
@@ -0,0 +1,66 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "internals.h"
+#include "softfloat.h"
+
+float64_t
+ softfloat_roundPackToF64( bool sign, int_fast16_t exp, uint_fast64_t sig )
+{
+    int roundingMode;
+    bool roundNearestEven;
+    int roundIncrement, roundBits;
+    bool isTiny;
+    uint_fast64_t uiZ;
+    union ui64_f64 uZ;
+
+    roundingMode = softfloat_roundingMode;
+    roundNearestEven = ( roundingMode == softfloat_round_nearest_even );
+    roundIncrement = 0x200;
+    if (
+           ! roundNearestEven
+        && ( roundingMode != softfloat_round_nearest_maxMag )
+    ) {
+        roundIncrement =
+               ( roundingMode == softfloat_round_minMag )
+            || ( roundingMode
+                     == ( sign ? softfloat_round_max : softfloat_round_min ) )
+                ? 0
+                : 0x3FF;
+    }
+    roundBits = sig & 0x3FF;
+    if ( 0x7FD <= (uint16_t) exp ) {
+        if ( exp < 0 ) {
+            isTiny =
+                   ( softfloat_detectTininess
+                         == softfloat_tininess_beforeRounding )
+                || ( exp < -1 )
+                || ( sig + roundIncrement < UINT64_C( 0x8000000000000000 ) );
+            sig = softfloat_shift64RightJam( sig, - exp );
+            exp = 0;
+            roundBits = sig & 0x3FF;
+            if ( isTiny && roundBits ) {
+                softfloat_raiseFlags( softfloat_flag_underflow );
+            }
+        } else if (
+            ( 0x7FD < exp )
+                || ( UINT64_C( 0x8000000000000000 ) <= sig + roundIncrement )
+        ) {
+            softfloat_raiseFlags(
+                softfloat_flag_overflow | softfloat_flag_inexact );
+            uiZ = packToF64UI( sign, 0x7FF, 0 ) - ! roundIncrement;
+            goto uiZ;
+        }
+    }
+    if ( roundBits ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+    sig = ( sig + roundIncrement )>>10;
+    sig &= ~ ( ! ( roundBits ^ 0x200 ) & roundNearestEven );
+    uiZ = packToF64UI( sign, sig ? exp : 0, sig );
+ uiZ:
+    uZ.ui = uiZ;
+    return uZ.f;
+
+}
+
diff --git a/softfloat/s_roundPackToF64.cc b/softfloat/s_roundPackToF64.cc
deleted file mode 100755 (executable)
index fb0ef1d..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "primitives.h"
-#include "internals.h"
-#include "softfloat.h"
-
-float64_t
- softfloat_roundPackToF64( bool sign, int_fast16_t exp, uint_fast64_t sig )
-{
-    int roundingMode;
-    bool roundNearestEven;
-    int roundIncrement, roundBits;
-    bool isTiny;
-    uint_fast64_t uiZ;
-    union ui64_f64 uZ;
-
-    roundingMode = softfloat_roundingMode;
-    roundNearestEven = ( roundingMode == softfloat_round_nearest_even );
-    roundIncrement = 0x200;
-    if (
-           ! roundNearestEven
-        && ( roundingMode != softfloat_round_nearest_maxMag )
-    ) {
-        roundIncrement =
-               ( roundingMode == softfloat_round_minMag )
-            || ( roundingMode
-                     == ( sign ? softfloat_round_max : softfloat_round_min ) )
-                ? 0
-                : 0x3FF;
-    }
-    roundBits = sig & 0x3FF;
-    if ( 0x7FD <= (uint16_t) exp ) {
-        if ( exp < 0 ) {
-            isTiny =
-                   ( softfloat_detectTininess
-                         == softfloat_tininess_beforeRounding )
-                || ( exp < -1 )
-                || ( sig + roundIncrement < UINT64_C( 0x8000000000000000 ) );
-            sig = softfloat_shift64RightJam( sig, - exp );
-            exp = 0;
-            roundBits = sig & 0x3FF;
-            if ( isTiny && roundBits ) {
-                softfloat_raiseFlags( softfloat_flag_underflow );
-            }
-        } else if (
-            ( 0x7FD < exp )
-                || ( UINT64_C( 0x8000000000000000 ) <= sig + roundIncrement )
-        ) {
-            softfloat_raiseFlags(
-                softfloat_flag_overflow | softfloat_flag_inexact );
-            uiZ = packToF64UI( sign, 0x7FF, 0 ) - ! roundIncrement;
-            goto uiZ;
-        }
-    }
-    if ( roundBits ) softfloat_exceptionFlags |= softfloat_flag_inexact;
-    sig = ( sig + roundIncrement )>>10;
-    sig &= ~ ( ! ( roundBits ^ 0x200 ) & roundNearestEven );
-    uiZ = packToF64UI( sign, sig ? exp : 0, sig );
- uiZ:
-    uZ.ui = uiZ;
-    return uZ.f;
-
-}
-
diff --git a/softfloat/s_roundPackToI32.c b/softfloat/s_roundPackToI32.c
new file mode 100755 (executable)
index 0000000..1c91497
--- /dev/null
@@ -0,0 +1,48 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+int_fast32_t
+ softfloat_roundPackToI32(
+     bool sign, uint_fast64_t sig, int_fast8_t roundingMode, bool exact )
+{
+    bool roundNearestEven;
+    int roundIncrement, roundBits;
+    uint_fast32_t sig32;
+    union { uint32_t ui; int32_t i; } uZ;
+    int_fast32_t z;
+
+    roundNearestEven = ( roundingMode == softfloat_round_nearest_even );
+    roundIncrement = 0x40;
+    if (
+           ! roundNearestEven
+        && ( roundingMode != softfloat_round_nearest_maxMag )
+    ) {
+        roundIncrement =
+               ( roundingMode == softfloat_round_minMag )
+            || ( roundingMode
+                     == ( sign ? softfloat_round_max : softfloat_round_min ) )
+                ? 0
+                : 0x7F;
+    }
+    roundBits = sig & 0x7F;
+    sig += roundIncrement;
+    if ( sig & UINT64_C( 0xFFFFFF8000000000 ) ) goto invalid;
+    sig32 = sig>>7;
+    sig32 &= ~ ( ! ( roundBits ^ 0x40 ) & roundNearestEven );
+    uZ.ui = sign ? - sig32 : sig32;
+    z = uZ.i;
+    if ( z && ( ( z < 0 ) ^ sign ) ) goto invalid;
+    if ( exact && roundBits ) {
+        softfloat_exceptionFlags |= softfloat_flag_inexact;
+    }
+    return z;
+ invalid:
+    softfloat_raiseFlags( softfloat_flag_invalid );
+    return sign ? -0x7FFFFFFF - 1 : 0x7FFFFFFF;
+
+}
+
diff --git a/softfloat/s_roundPackToI32.cc b/softfloat/s_roundPackToI32.cc
deleted file mode 100755 (executable)
index 1c91497..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "internals.h"
-#include "softfloat.h"
-
-int_fast32_t
- softfloat_roundPackToI32(
-     bool sign, uint_fast64_t sig, int_fast8_t roundingMode, bool exact )
-{
-    bool roundNearestEven;
-    int roundIncrement, roundBits;
-    uint_fast32_t sig32;
-    union { uint32_t ui; int32_t i; } uZ;
-    int_fast32_t z;
-
-    roundNearestEven = ( roundingMode == softfloat_round_nearest_even );
-    roundIncrement = 0x40;
-    if (
-           ! roundNearestEven
-        && ( roundingMode != softfloat_round_nearest_maxMag )
-    ) {
-        roundIncrement =
-               ( roundingMode == softfloat_round_minMag )
-            || ( roundingMode
-                     == ( sign ? softfloat_round_max : softfloat_round_min ) )
-                ? 0
-                : 0x7F;
-    }
-    roundBits = sig & 0x7F;
-    sig += roundIncrement;
-    if ( sig & UINT64_C( 0xFFFFFF8000000000 ) ) goto invalid;
-    sig32 = sig>>7;
-    sig32 &= ~ ( ! ( roundBits ^ 0x40 ) & roundNearestEven );
-    uZ.ui = sign ? - sig32 : sig32;
-    z = uZ.i;
-    if ( z && ( ( z < 0 ) ^ sign ) ) goto invalid;
-    if ( exact && roundBits ) {
-        softfloat_exceptionFlags |= softfloat_flag_inexact;
-    }
-    return z;
- invalid:
-    softfloat_raiseFlags( softfloat_flag_invalid );
-    return sign ? -0x7FFFFFFF - 1 : 0x7FFFFFFF;
-
-}
-
diff --git a/softfloat/s_roundPackToI64.c b/softfloat/s_roundPackToI64.c
new file mode 100755 (executable)
index 0000000..b2f5d63
--- /dev/null
@@ -0,0 +1,52 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+int_fast64_t
+ softfloat_roundPackToI64(
+     bool sign,
+     uint_fast64_t sig64,
+     uint_fast64_t sig0,
+     int_fast8_t roundingMode,
+     bool exact
+ )
+{
+    bool roundNearestEven, increment;
+    union { uint64_t ui; int64_t i; } uZ;
+    int_fast64_t z;
+
+    roundNearestEven = ( roundingMode == softfloat_round_nearest_even );
+    increment = ( UINT64_C( 0x8000000000000000 ) <= sig0 );
+    if (
+           ! roundNearestEven
+        && ( roundingMode != softfloat_round_nearest_maxMag )
+    ) {
+        increment =
+               ( roundingMode != softfloat_round_minMag )
+            && ( roundingMode
+                     == ( sign ? softfloat_round_min : softfloat_round_max ) )
+            && sig0;
+    }
+    if ( increment ) {
+        ++sig64;
+        if ( ! sig64 ) goto invalid;
+        sig64 &=
+            ~ ( ! ( sig0 & UINT64_C( 0x7FFFFFFFFFFFFFFF ) )
+                    & roundNearestEven );
+    }
+    uZ.ui = sign ? - sig64 : sig64;
+    z = uZ.i;
+    if ( z && ( ( z < 0 ) ^ sign ) ) goto invalid;
+    if ( exact && sig0 ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+    return z;
+ invalid:
+    softfloat_raiseFlags( softfloat_flag_invalid );
+    return
+        sign ? - INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1
+            : INT64_C( 0x7FFFFFFFFFFFFFFF );
+
+}
+
diff --git a/softfloat/s_roundPackToI64.cc b/softfloat/s_roundPackToI64.cc
deleted file mode 100755 (executable)
index b2f5d63..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "internals.h"
-#include "softfloat.h"
-
-int_fast64_t
- softfloat_roundPackToI64(
-     bool sign,
-     uint_fast64_t sig64,
-     uint_fast64_t sig0,
-     int_fast8_t roundingMode,
-     bool exact
- )
-{
-    bool roundNearestEven, increment;
-    union { uint64_t ui; int64_t i; } uZ;
-    int_fast64_t z;
-
-    roundNearestEven = ( roundingMode == softfloat_round_nearest_even );
-    increment = ( UINT64_C( 0x8000000000000000 ) <= sig0 );
-    if (
-           ! roundNearestEven
-        && ( roundingMode != softfloat_round_nearest_maxMag )
-    ) {
-        increment =
-               ( roundingMode != softfloat_round_minMag )
-            && ( roundingMode
-                     == ( sign ? softfloat_round_min : softfloat_round_max ) )
-            && sig0;
-    }
-    if ( increment ) {
-        ++sig64;
-        if ( ! sig64 ) goto invalid;
-        sig64 &=
-            ~ ( ! ( sig0 & UINT64_C( 0x7FFFFFFFFFFFFFFF ) )
-                    & roundNearestEven );
-    }
-    uZ.ui = sign ? - sig64 : sig64;
-    z = uZ.i;
-    if ( z && ( ( z < 0 ) ^ sign ) ) goto invalid;
-    if ( exact && sig0 ) softfloat_exceptionFlags |= softfloat_flag_inexact;
-    return z;
- invalid:
-    softfloat_raiseFlags( softfloat_flag_invalid );
-    return
-        sign ? - INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1
-            : INT64_C( 0x7FFFFFFFFFFFFFFF );
-
-}
-
diff --git a/softfloat/s_roundPackToUI32.c b/softfloat/s_roundPackToUI32.c
new file mode 100755 (executable)
index 0000000..ab44ec7
--- /dev/null
@@ -0,0 +1,44 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+uint_fast32_t
+ softfloat_roundPackToUI32(
+     bool sign, uint_fast64_t sig, int_fast8_t roundingMode, bool exact )
+{
+    bool roundNearestEven;
+    int roundIncrement, roundBits;
+    uint_fast32_t z;
+
+    roundNearestEven = ( roundingMode == softfloat_round_nearest_even );
+    roundIncrement = 0x40;
+    if (
+           ! roundNearestEven
+        && ( roundingMode != softfloat_round_nearest_maxMag )
+    ) {
+        roundIncrement =
+               ( roundingMode == softfloat_round_minMag )
+            || ( roundingMode
+                     == ( sign ? softfloat_round_max : softfloat_round_min ) )
+                ? 0
+                : 0x7F;
+    }
+    roundBits = sig & 0x7F;
+    sig += roundIncrement;
+    if ( sig & UINT64_C( 0xFFFFFF8000000000 ) ) goto invalid;
+    z = sig>>7;
+    z &= ~ ( ! ( roundBits ^ 0x40 ) & roundNearestEven );
+    if ( sign && z ) goto invalid;
+    if ( exact && roundBits ) {
+        softfloat_exceptionFlags |= softfloat_flag_inexact;
+    }
+    return z;
+ invalid:
+    softfloat_raiseFlags( softfloat_flag_invalid );
+    return 0xFFFFFFFF;
+
+}
+
diff --git a/softfloat/s_roundPackToUI32.cc b/softfloat/s_roundPackToUI32.cc
deleted file mode 100755 (executable)
index ab44ec7..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "internals.h"
-#include "softfloat.h"
-
-uint_fast32_t
- softfloat_roundPackToUI32(
-     bool sign, uint_fast64_t sig, int_fast8_t roundingMode, bool exact )
-{
-    bool roundNearestEven;
-    int roundIncrement, roundBits;
-    uint_fast32_t z;
-
-    roundNearestEven = ( roundingMode == softfloat_round_nearest_even );
-    roundIncrement = 0x40;
-    if (
-           ! roundNearestEven
-        && ( roundingMode != softfloat_round_nearest_maxMag )
-    ) {
-        roundIncrement =
-               ( roundingMode == softfloat_round_minMag )
-            || ( roundingMode
-                     == ( sign ? softfloat_round_max : softfloat_round_min ) )
-                ? 0
-                : 0x7F;
-    }
-    roundBits = sig & 0x7F;
-    sig += roundIncrement;
-    if ( sig & UINT64_C( 0xFFFFFF8000000000 ) ) goto invalid;
-    z = sig>>7;
-    z &= ~ ( ! ( roundBits ^ 0x40 ) & roundNearestEven );
-    if ( sign && z ) goto invalid;
-    if ( exact && roundBits ) {
-        softfloat_exceptionFlags |= softfloat_flag_inexact;
-    }
-    return z;
- invalid:
-    softfloat_raiseFlags( softfloat_flag_invalid );
-    return 0xFFFFFFFF;
-
-}
-
diff --git a/softfloat/s_roundPackToUI64.c b/softfloat/s_roundPackToUI64.c
new file mode 100755 (executable)
index 0000000..d42266f
--- /dev/null
@@ -0,0 +1,46 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "softfloat.h"
+
+uint_fast64_t
+ softfloat_roundPackToUI64(
+     bool sign,
+     uint_fast64_t sig64,
+     uint_fast64_t sig0,
+     int_fast8_t roundingMode,
+     bool exact
+ )
+{
+    bool roundNearestEven, increment;
+
+    roundNearestEven = ( roundingMode == softfloat_round_nearest_even );
+    increment = ( UINT64_C( 0x8000000000000000 ) <= sig0 );
+    if (
+           ! roundNearestEven
+        && ( roundingMode != softfloat_round_nearest_maxMag )
+    ) {
+        increment =
+               ( roundingMode != softfloat_round_minMag )
+            && ( roundingMode
+                     == ( sign ? softfloat_round_min : softfloat_round_max ) )
+            && sig0;
+    }
+    if ( increment ) {
+        ++sig64;
+        if ( ! sig64 ) goto invalid;
+        sig64 &=
+            ~ ( ! ( sig0 & UINT64_C( 0x7FFFFFFFFFFFFFFF ) )
+                    & roundNearestEven );
+    }
+    if ( sign && sig64 ) goto invalid;
+    if ( exact && sig0 ) softfloat_exceptionFlags |= softfloat_flag_inexact;
+    return sig64;
+ invalid:
+    softfloat_raiseFlags( softfloat_flag_invalid );
+    return UINT64_C( 0xFFFFFFFFFFFFFFFF );
+
+}
+
diff --git a/softfloat/s_roundPackToUI64.cc b/softfloat/s_roundPackToUI64.cc
deleted file mode 100755 (executable)
index d42266f..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "internals.h"
-#include "softfloat.h"
-
-uint_fast64_t
- softfloat_roundPackToUI64(
-     bool sign,
-     uint_fast64_t sig64,
-     uint_fast64_t sig0,
-     int_fast8_t roundingMode,
-     bool exact
- )
-{
-    bool roundNearestEven, increment;
-
-    roundNearestEven = ( roundingMode == softfloat_round_nearest_even );
-    increment = ( UINT64_C( 0x8000000000000000 ) <= sig0 );
-    if (
-           ! roundNearestEven
-        && ( roundingMode != softfloat_round_nearest_maxMag )
-    ) {
-        increment =
-               ( roundingMode != softfloat_round_minMag )
-            && ( roundingMode
-                     == ( sign ? softfloat_round_min : softfloat_round_max ) )
-            && sig0;
-    }
-    if ( increment ) {
-        ++sig64;
-        if ( ! sig64 ) goto invalid;
-        sig64 &=
-            ~ ( ! ( sig0 & UINT64_C( 0x7FFFFFFFFFFFFFFF ) )
-                    & roundNearestEven );
-    }
-    if ( sign && sig64 ) goto invalid;
-    if ( exact && sig0 ) softfloat_exceptionFlags |= softfloat_flag_inexact;
-    return sig64;
- invalid:
-    softfloat_raiseFlags( softfloat_flag_invalid );
-    return UINT64_C( 0xFFFFFFFFFFFFFFFF );
-
-}
-
diff --git a/softfloat/s_shift128ExtraRightJam.c b/softfloat/s_shift128ExtraRightJam.c
new file mode 100755 (executable)
index 0000000..6c57974
--- /dev/null
@@ -0,0 +1,38 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+\r
+struct uint128_extra\r
+ softfloat_shift128ExtraRightJam(\r
+     uint64_t a64, uint64_t a0, uint64_t extra, unsigned int count )\r
+{\r
+    unsigned int negCount;\r
+    struct uint128_extra z;\r
+\r
+    negCount = - count;\r
+    if ( count < 64 ) {\r
+        z.v64 = a64>>count;\r
+        z.v0 = a64<<( negCount & 63 ) | a0>>count;\r
+        z.extra = a0<<( negCount & 63 );\r
+    } else {\r
+        z.v64 = 0;\r
+        if ( count == 64 ) {\r
+            z.v0 = a64;\r
+            z.extra = a0;\r
+        } else {\r
+            extra |= a0;\r
+            if ( count < 128 ) {\r
+                z.v0 = a64>>( count & 63 );\r
+                z.extra = a64<<( negCount & 63 );\r
+            } else {\r
+                z.v0 = 0;\r
+                z.extra = ( count == 128 ) ? a64 : ( a64 != 0 );\r
+            }\r
+        }\r
+    }\r
+    z.extra |= ( extra != 0 );\r
+    return z;\r
+\r
+}\r
+\r
diff --git a/softfloat/s_shift128ExtraRightJam.cc b/softfloat/s_shift128ExtraRightJam.cc
deleted file mode 100755 (executable)
index 6c57974..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-\r
-struct uint128_extra\r
- softfloat_shift128ExtraRightJam(\r
-     uint64_t a64, uint64_t a0, uint64_t extra, unsigned int count )\r
-{\r
-    unsigned int negCount;\r
-    struct uint128_extra z;\r
-\r
-    negCount = - count;\r
-    if ( count < 64 ) {\r
-        z.v64 = a64>>count;\r
-        z.v0 = a64<<( negCount & 63 ) | a0>>count;\r
-        z.extra = a0<<( negCount & 63 );\r
-    } else {\r
-        z.v64 = 0;\r
-        if ( count == 64 ) {\r
-            z.v0 = a64;\r
-            z.extra = a0;\r
-        } else {\r
-            extra |= a0;\r
-            if ( count < 128 ) {\r
-                z.v0 = a64>>( count & 63 );\r
-                z.extra = a64<<( negCount & 63 );\r
-            } else {\r
-                z.v0 = 0;\r
-                z.extra = ( count == 128 ) ? a64 : ( a64 != 0 );\r
-            }\r
-        }\r
-    }\r
-    z.extra |= ( extra != 0 );\r
-    return z;\r
-\r
-}\r
-\r
diff --git a/softfloat/s_shift128RightJam.c b/softfloat/s_shift128RightJam.c
new file mode 100755 (executable)
index 0000000..5a4e188
--- /dev/null
@@ -0,0 +1,31 @@
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+
+struct uint128
+ softfloat_shift128RightJam( uint64_t a64, uint64_t a0, unsigned int count )
+{
+    unsigned int negCount;
+    struct uint128 z;
+
+    if ( count < 64 ) {
+        negCount = - count;
+        z.v64 = a64>>( count & 63 );
+        z.v0 =
+            a64<<( negCount & 63 ) | a0>>count
+                | ( (uint64_t) ( a0<<( negCount & 63 ) ) != 0 );
+    } else {
+        z.v64 = 0;
+        z.v0 =
+            ( count < 128 )
+                ? a64>>( count & 63 )
+                      | ( ( ( a64 & ( ( (uint64_t) 1<<( count & 63 ) ) - 1 ) )
+                                | a0 )
+                              != 0 )
+                : ( ( a64 | a0 ) != 0 );
+    }
+    return z;
+
+}
+
diff --git a/softfloat/s_shift128RightJam.cc b/softfloat/s_shift128RightJam.cc
deleted file mode 100755 (executable)
index 5a4e188..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-
-#include <stdint.h>
-#include "platform.h"
-#include "primitives.h"
-
-struct uint128
- softfloat_shift128RightJam( uint64_t a64, uint64_t a0, unsigned int count )
-{
-    unsigned int negCount;
-    struct uint128 z;
-
-    if ( count < 64 ) {
-        negCount = - count;
-        z.v64 = a64>>( count & 63 );
-        z.v0 =
-            a64<<( negCount & 63 ) | a0>>count
-                | ( (uint64_t) ( a0<<( negCount & 63 ) ) != 0 );
-    } else {
-        z.v64 = 0;
-        z.v0 =
-            ( count < 128 )
-                ? a64>>( count & 63 )
-                      | ( ( ( a64 & ( ( (uint64_t) 1<<( count & 63 ) ) - 1 ) )
-                                | a0 )
-                              != 0 )
-                : ( ( a64 | a0 ) != 0 );
-    }
-    return z;
-
-}
-
diff --git a/softfloat/s_shift32RightJam.c b/softfloat/s_shift32RightJam.c
new file mode 100755 (executable)
index 0000000..b697a34
--- /dev/null
@@ -0,0 +1,15 @@
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+
+uint32_t softfloat_shift32RightJam( uint32_t a, unsigned int count )
+{
+
+    return
+        ( count < 32 )
+            ? a>>count | ( (uint32_t) ( a<<( ( - count ) & 31 ) ) != 0 )
+            : ( a != 0 );
+
+}
+
diff --git a/softfloat/s_shift32RightJam.cc b/softfloat/s_shift32RightJam.cc
deleted file mode 100755 (executable)
index b697a34..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-
-#include <stdint.h>
-#include "platform.h"
-#include "primitives.h"
-
-uint32_t softfloat_shift32RightJam( uint32_t a, unsigned int count )
-{
-
-    return
-        ( count < 32 )
-            ? a>>count | ( (uint32_t) ( a<<( ( - count ) & 31 ) ) != 0 )
-            : ( a != 0 );
-
-}
-
diff --git a/softfloat/s_shift64ExtraRightJam.c b/softfloat/s_shift64ExtraRightJam.c
new file mode 100755 (executable)
index 0000000..167ea54
--- /dev/null
@@ -0,0 +1,23 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+\r
+struct uint64_extra\r
+ softfloat_shift64ExtraRightJam(\r
+     uint64_t a, uint64_t extra, unsigned int count )\r
+{\r
+    struct uint64_extra z;\r
+\r
+    if ( count < 64 ) {\r
+        z.v = a>>count;\r
+        z.extra = a<<( ( - count ) & 63 );\r
+    } else {\r
+        z.v = 0;\r
+        z.extra = ( count == 64 ) ? a : ( a != 0 );\r
+    }\r
+    z.extra |= ( extra != 0 );\r
+    return z;\r
+\r
+}\r
+\r
diff --git a/softfloat/s_shift64ExtraRightJam.cc b/softfloat/s_shift64ExtraRightJam.cc
deleted file mode 100755 (executable)
index 167ea54..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-\r
-struct uint64_extra\r
- softfloat_shift64ExtraRightJam(\r
-     uint64_t a, uint64_t extra, unsigned int count )\r
-{\r
-    struct uint64_extra z;\r
-\r
-    if ( count < 64 ) {\r
-        z.v = a>>count;\r
-        z.extra = a<<( ( - count ) & 63 );\r
-    } else {\r
-        z.v = 0;\r
-        z.extra = ( count == 64 ) ? a : ( a != 0 );\r
-    }\r
-    z.extra |= ( extra != 0 );\r
-    return z;\r
-\r
-}\r
-\r
diff --git a/softfloat/s_shift64RightJam.c b/softfloat/s_shift64RightJam.c
new file mode 100755 (executable)
index 0000000..ebebb61
--- /dev/null
@@ -0,0 +1,15 @@
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+
+uint64_t softfloat_shift64RightJam( uint64_t a, unsigned int count )
+{
+
+    return
+        ( count < 64 )
+            ? a>>count | ( (uint64_t) ( a<<( ( - count ) & 63 ) ) != 0 )
+            : ( a != 0 );
+
+}
+
diff --git a/softfloat/s_shift64RightJam.cc b/softfloat/s_shift64RightJam.cc
deleted file mode 100755 (executable)
index ebebb61..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-
-#include <stdint.h>
-#include "platform.h"
-#include "primitives.h"
-
-uint64_t softfloat_shift64RightJam( uint64_t a, unsigned int count )
-{
-
-    return
-        ( count < 64 )
-            ? a>>count | ( (uint64_t) ( a<<( ( - count ) & 63 ) ) != 0 )
-            : ( a != 0 );
-
-}
-
diff --git a/softfloat/s_shortShift128ExtraRightJam.c b/softfloat/s_shortShift128ExtraRightJam.c
new file mode 100755 (executable)
index 0000000..c772740
--- /dev/null
@@ -0,0 +1,20 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+\r
+struct uint128_extra\r
+ softfloat_shortShift128ExtraRightJam(\r
+     uint64_t a64, uint64_t a0, uint64_t extra, unsigned int count )\r
+{\r
+    unsigned int negCount;\r
+    struct uint128_extra z;\r
+\r
+    negCount = - count;\r
+    z.v64 = a64>>count;\r
+    z.v0 = a64<<( negCount & 63 ) | a0>>count;\r
+    z.extra = a0<<( negCount & 63 ) | ( extra != 0 );\r
+    return z;\r
+\r
+}\r
+\r
diff --git a/softfloat/s_shortShift128ExtraRightJam.cc b/softfloat/s_shortShift128ExtraRightJam.cc
deleted file mode 100755 (executable)
index c772740..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-\r
-struct uint128_extra\r
- softfloat_shortShift128ExtraRightJam(\r
-     uint64_t a64, uint64_t a0, uint64_t extra, unsigned int count )\r
-{\r
-    unsigned int negCount;\r
-    struct uint128_extra z;\r
-\r
-    negCount = - count;\r
-    z.v64 = a64>>count;\r
-    z.v0 = a64<<( negCount & 63 ) | a0>>count;\r
-    z.extra = a0<<( negCount & 63 ) | ( extra != 0 );\r
-    return z;\r
-\r
-}\r
-\r
diff --git a/softfloat/s_shortShift128Left.c b/softfloat/s_shortShift128Left.c
new file mode 100755 (executable)
index 0000000..9c29988
--- /dev/null
@@ -0,0 +1,16 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+\r
+struct uint128\r
+ softfloat_shortShift128Left( uint64_t a64, uint64_t a0, unsigned int count )\r
+{\r
+    struct uint128 z;\r
+\r
+    z.v64 = a64<<count | a0>>( ( - count ) & 63 );\r
+    z.v0 = a0<<count;\r
+    return z;\r
+\r
+}\r
+\r
diff --git a/softfloat/s_shortShift128Left.cc b/softfloat/s_shortShift128Left.cc
deleted file mode 100755 (executable)
index 9c29988..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-\r
-struct uint128\r
- softfloat_shortShift128Left( uint64_t a64, uint64_t a0, unsigned int count )\r
-{\r
-    struct uint128 z;\r
-\r
-    z.v64 = a64<<count | a0>>( ( - count ) & 63 );\r
-    z.v0 = a0<<count;\r
-    return z;\r
-\r
-}\r
-\r
diff --git a/softfloat/s_shortShift128Right.c b/softfloat/s_shortShift128Right.c
new file mode 100755 (executable)
index 0000000..f7f4ce8
--- /dev/null
@@ -0,0 +1,16 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+\r
+struct uint128\r
+ softfloat_shortShift128Right( uint64_t a64, uint64_t a0, unsigned int count )\r
+{\r
+    struct uint128 z;\r
+\r
+    z.v64 = a64>>count;\r
+    z.v0 = a64<<( ( - count ) & 63 ) | a0>>count;\r
+    return z;\r
+\r
+}\r
+\r
diff --git a/softfloat/s_shortShift128Right.cc b/softfloat/s_shortShift128Right.cc
deleted file mode 100755 (executable)
index f7f4ce8..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-\r
-struct uint128\r
- softfloat_shortShift128Right( uint64_t a64, uint64_t a0, unsigned int count )\r
-{\r
-    struct uint128 z;\r
-\r
-    z.v64 = a64>>count;\r
-    z.v0 = a64<<( ( - count ) & 63 ) | a0>>count;\r
-    return z;\r
-\r
-}\r
-\r
diff --git a/softfloat/s_shortShift192Left.c b/softfloat/s_shortShift192Left.c
new file mode 100755 (executable)
index 0000000..cf1e55d
--- /dev/null
@@ -0,0 +1,20 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+\r
+struct uint192\r
+ softfloat_shortShift192Left(\r
+     uint64_t a128, uint64_t a64, uint64_t a0, unsigned int count )\r
+{\r
+    unsigned int negCount;\r
+    struct uint192 z;\r
+\r
+    negCount = - count;\r
+    z.v128 = a128<<count | a64>>( negCount & 63 );\r
+    z.v64 = a64<<count | a0>>( negCount & 63 );\r
+    z.v0 = a0<<count;\r
+    return z;\r
+\r
+}\r
+\r
diff --git a/softfloat/s_shortShift192Left.cc b/softfloat/s_shortShift192Left.cc
deleted file mode 100755 (executable)
index cf1e55d..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-\r
-struct uint192\r
- softfloat_shortShift192Left(\r
-     uint64_t a128, uint64_t a64, uint64_t a0, unsigned int count )\r
-{\r
-    unsigned int negCount;\r
-    struct uint192 z;\r
-\r
-    negCount = - count;\r
-    z.v128 = a128<<count | a64>>( negCount & 63 );\r
-    z.v64 = a64<<count | a0>>( negCount & 63 );\r
-    z.v0 = a0<<count;\r
-    return z;\r
-\r
-}\r
-\r
diff --git a/softfloat/s_shortShift32Right1Jam.c b/softfloat/s_shortShift32Right1Jam.c
new file mode 100755 (executable)
index 0000000..db4c304
--- /dev/null
@@ -0,0 +1,12 @@
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+
+uint32_t softfloat_shortShift32Right1Jam( uint32_t a )
+{
+
+    return a>>1 | ( a & 1 );
+
+}
+
diff --git a/softfloat/s_shortShift32Right1Jam.cc b/softfloat/s_shortShift32Right1Jam.cc
deleted file mode 100755 (executable)
index db4c304..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-
-#include <stdint.h>
-#include "platform.h"
-#include "primitives.h"
-
-uint32_t softfloat_shortShift32Right1Jam( uint32_t a )
-{
-
-    return a>>1 | ( a & 1 );
-
-}
-
diff --git a/softfloat/s_shortShift64ExtraRightJam.c b/softfloat/s_shortShift64ExtraRightJam.c
new file mode 100755 (executable)
index 0000000..b861c67
--- /dev/null
@@ -0,0 +1,17 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+\r
+struct uint64_extra\r
+ softfloat_shortShift64ExtraRightJam(\r
+     uint64_t a, uint64_t extra, unsigned int count )\r
+{\r
+    struct uint64_extra z;\r
+\r
+    z.v = a>>count;\r
+    z.extra = a<<( ( - count ) & 63 ) | ( extra != 0 );\r
+    return z;\r
+\r
+}\r
+\r
diff --git a/softfloat/s_shortShift64ExtraRightJam.cc b/softfloat/s_shortShift64ExtraRightJam.cc
deleted file mode 100755 (executable)
index b861c67..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-\r
-struct uint64_extra\r
- softfloat_shortShift64ExtraRightJam(\r
-     uint64_t a, uint64_t extra, unsigned int count )\r
-{\r
-    struct uint64_extra z;\r
-\r
-    z.v = a>>count;\r
-    z.extra = a<<( ( - count ) & 63 ) | ( extra != 0 );\r
-    return z;\r
-\r
-}\r
-\r
diff --git a/softfloat/s_shortShift64RightJam.c b/softfloat/s_shortShift64RightJam.c
new file mode 100755 (executable)
index 0000000..0da6c93
--- /dev/null
@@ -0,0 +1,12 @@
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+
+uint64_t softfloat_shortShift64RightJam( uint64_t a, unsigned int count )
+{
+
+    return a>>count | ( ( a & ( ( (uint64_t) 1<<count ) - 1 ) ) != 0 );
+
+}
+
diff --git a/softfloat/s_shortShift64RightJam.cc b/softfloat/s_shortShift64RightJam.cc
deleted file mode 100755 (executable)
index 0da6c93..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-
-#include <stdint.h>
-#include "platform.h"
-#include "primitives.h"
-
-uint64_t softfloat_shortShift64RightJam( uint64_t a, unsigned int count )
-{
-
-    return a>>count | ( ( a & ( ( (uint64_t) 1<<count ) - 1 ) ) != 0 );
-
-}
-
diff --git a/softfloat/s_sub128.c b/softfloat/s_sub128.c
new file mode 100755 (executable)
index 0000000..0c4f181
--- /dev/null
@@ -0,0 +1,17 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+\r
+struct uint128\r
+ softfloat_sub128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )\r
+{\r
+    struct uint128 z;\r
+\r
+    z.v0 = a0 - b0;\r
+    z.v64 = a64 - b64;\r
+    z.v64 -= ( a0 < b0 );\r
+    return z;\r
+\r
+}\r
+\r
diff --git a/softfloat/s_sub128.cc b/softfloat/s_sub128.cc
deleted file mode 100755 (executable)
index 0c4f181..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-\r
-struct uint128\r
- softfloat_sub128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )\r
-{\r
-    struct uint128 z;\r
-\r
-    z.v0 = a0 - b0;\r
-    z.v64 = a64 - b64;\r
-    z.v64 -= ( a0 < b0 );\r
-    return z;\r
-\r
-}\r
-\r
diff --git a/softfloat/s_sub192.c b/softfloat/s_sub192.c
new file mode 100755 (executable)
index 0000000..96f21c9
--- /dev/null
@@ -0,0 +1,30 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+\r
+struct uint192\r
+ softfloat_sub192(\r
+     uint64_t a128,\r
+     uint64_t a64,\r
+     uint64_t a0,\r
+     uint64_t b128,\r
+     uint64_t b64,\r
+     uint64_t b0\r
+ )\r
+{\r
+    struct uint192 z;\r
+    unsigned int borrow64, borrow128;\r
+\r
+    z.v0 = a0 - b0;\r
+    borrow64 = ( a0 < b0 );\r
+    z.v64 = a64 - b64;\r
+    borrow128 = ( a64 < b64 );\r
+    z.v128 = a128 - b128;\r
+    borrow128 += ( z.v64 < borrow64 );\r
+    z.v64 -= borrow64;\r
+    z.v128 -= borrow128;\r
+    return z;\r
+\r
+}\r
+\r
diff --git a/softfloat/s_sub192.cc b/softfloat/s_sub192.cc
deleted file mode 100755 (executable)
index 96f21c9..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-\r
-struct uint192\r
- softfloat_sub192(\r
-     uint64_t a128,\r
-     uint64_t a64,\r
-     uint64_t a0,\r
-     uint64_t b128,\r
-     uint64_t b64,\r
-     uint64_t b0\r
- )\r
-{\r
-    struct uint192 z;\r
-    unsigned int borrow64, borrow128;\r
-\r
-    z.v0 = a0 - b0;\r
-    borrow64 = ( a0 < b0 );\r
-    z.v64 = a64 - b64;\r
-    borrow128 = ( a64 < b64 );\r
-    z.v128 = a128 - b128;\r
-    borrow128 += ( z.v64 < borrow64 );\r
-    z.v64 -= borrow64;\r
-    z.v128 -= borrow128;\r
-    return z;\r
-\r
-}\r
-\r
diff --git a/softfloat/s_subMagsF32.c b/softfloat/s_subMagsF32.c
new file mode 100755 (executable)
index 0000000..0c83b02
--- /dev/null
@@ -0,0 +1,81 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float32_t
+ softfloat_subMagsF32( uint_fast32_t uiA, uint_fast32_t uiB, bool signZ )
+{
+    int_fast16_t expA;
+    uint_fast32_t sigA;
+    int_fast16_t expB;
+    uint_fast32_t sigB;
+    int_fast16_t expDiff;
+    uint_fast32_t uiZ;
+    int_fast16_t expZ;
+    uint_fast32_t sigZ;
+    union ui32_f32 uZ;
+
+    expA = expF32UI( uiA );
+    sigA = fracF32UI( uiA );
+    expB = expF32UI( uiB );
+    sigB = fracF32UI( uiB );
+    expDiff = expA - expB;
+    sigA <<= 7;
+    sigB <<= 7;
+    if ( 0 < expDiff ) goto expABigger;
+    if ( expDiff < 0 ) goto expBBigger;
+    if ( expA == 0xFF ) {
+        if ( sigA | sigB ) goto propagateNaN;
+        softfloat_raiseFlags( softfloat_flag_invalid );
+        uiZ = defaultNaNF32UI;
+        goto uiZ;
+    }
+    if ( ! expA ) {
+        expA = 1;
+        expB = 1;
+    }
+    if ( sigB < sigA ) goto aBigger;
+    if ( sigA < sigB ) goto bBigger;
+    uiZ = packToF32UI( softfloat_roundingMode == softfloat_round_min, 0, 0 );
+    goto uiZ;
+ expBBigger:
+    if ( expB == 0xFF ) {
+        if ( sigB ) goto propagateNaN;
+        uiZ = packToF32UI( signZ ^ 1, 0xFF, 0 );
+        goto uiZ;
+    }
+    sigA += expA ? 0x40000000 : sigA;
+    sigA = softfloat_shift32RightJam( sigA, - expDiff );
+    sigB |= 0x40000000;
+ bBigger:
+    signZ ^= 1;
+    expZ = expB;
+    sigZ = sigB - sigA;
+    goto normRoundPack;
+ expABigger:
+    if ( expA == 0xFF ) {
+        if ( sigA ) goto propagateNaN;
+        uiZ = uiA;
+        goto uiZ;
+    }
+    sigB += expB ? 0x40000000 : sigB;
+    sigB = softfloat_shift32RightJam( sigB, expDiff );
+    sigA |= 0x40000000;
+ aBigger:
+    expZ = expA;
+    sigZ = sigA - sigB;
+ normRoundPack:
+    return softfloat_normRoundPackToF32( signZ, expZ - 1, sigZ );
+ propagateNaN:
+    uiZ = softfloat_propagateNaNF32UI( uiA, uiB );
+ uiZ:
+    uZ.ui = uiZ;
+    return uZ.f;
+
+}
+
diff --git a/softfloat/s_subMagsF32.cc b/softfloat/s_subMagsF32.cc
deleted file mode 100755 (executable)
index 0c83b02..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "primitives.h"
-#include "internals.h"
-#include "specialize.h"
-#include "softfloat.h"
-
-float32_t
- softfloat_subMagsF32( uint_fast32_t uiA, uint_fast32_t uiB, bool signZ )
-{
-    int_fast16_t expA;
-    uint_fast32_t sigA;
-    int_fast16_t expB;
-    uint_fast32_t sigB;
-    int_fast16_t expDiff;
-    uint_fast32_t uiZ;
-    int_fast16_t expZ;
-    uint_fast32_t sigZ;
-    union ui32_f32 uZ;
-
-    expA = expF32UI( uiA );
-    sigA = fracF32UI( uiA );
-    expB = expF32UI( uiB );
-    sigB = fracF32UI( uiB );
-    expDiff = expA - expB;
-    sigA <<= 7;
-    sigB <<= 7;
-    if ( 0 < expDiff ) goto expABigger;
-    if ( expDiff < 0 ) goto expBBigger;
-    if ( expA == 0xFF ) {
-        if ( sigA | sigB ) goto propagateNaN;
-        softfloat_raiseFlags( softfloat_flag_invalid );
-        uiZ = defaultNaNF32UI;
-        goto uiZ;
-    }
-    if ( ! expA ) {
-        expA = 1;
-        expB = 1;
-    }
-    if ( sigB < sigA ) goto aBigger;
-    if ( sigA < sigB ) goto bBigger;
-    uiZ = packToF32UI( softfloat_roundingMode == softfloat_round_min, 0, 0 );
-    goto uiZ;
- expBBigger:
-    if ( expB == 0xFF ) {
-        if ( sigB ) goto propagateNaN;
-        uiZ = packToF32UI( signZ ^ 1, 0xFF, 0 );
-        goto uiZ;
-    }
-    sigA += expA ? 0x40000000 : sigA;
-    sigA = softfloat_shift32RightJam( sigA, - expDiff );
-    sigB |= 0x40000000;
- bBigger:
-    signZ ^= 1;
-    expZ = expB;
-    sigZ = sigB - sigA;
-    goto normRoundPack;
- expABigger:
-    if ( expA == 0xFF ) {
-        if ( sigA ) goto propagateNaN;
-        uiZ = uiA;
-        goto uiZ;
-    }
-    sigB += expB ? 0x40000000 : sigB;
-    sigB = softfloat_shift32RightJam( sigB, expDiff );
-    sigA |= 0x40000000;
- aBigger:
-    expZ = expA;
-    sigZ = sigA - sigB;
- normRoundPack:
-    return softfloat_normRoundPackToF32( signZ, expZ - 1, sigZ );
- propagateNaN:
-    uiZ = softfloat_propagateNaNF32UI( uiA, uiB );
- uiZ:
-    uZ.ui = uiZ;
-    return uZ.f;
-
-}
-
diff --git a/softfloat/s_subMagsF64.c b/softfloat/s_subMagsF64.c
new file mode 100755 (executable)
index 0000000..45b81ba
--- /dev/null
@@ -0,0 +1,81 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+float64_t
+ softfloat_subMagsF64( uint_fast64_t uiA, uint_fast64_t uiB, bool signZ )
+{
+    int_fast16_t expA;
+    uint_fast64_t sigA;
+    int_fast16_t expB;
+    uint_fast64_t sigB;
+    int_fast16_t expDiff;
+    uint_fast64_t uiZ;
+    int_fast16_t expZ;
+    uint_fast64_t sigZ;
+    union ui64_f64 uZ;
+
+    expA = expF64UI( uiA );
+    sigA = fracF64UI( uiA );
+    expB = expF64UI( uiB );
+    sigB = fracF64UI( uiB );
+    expDiff = expA - expB;
+    sigA <<= 10;
+    sigB <<= 10;
+    if ( 0 < expDiff ) goto expABigger;
+    if ( expDiff < 0 ) goto expBBigger;
+    if ( expA == 0x7FF ) {
+        if ( sigA | sigB ) goto propagateNaN;
+        softfloat_raiseFlags( softfloat_flag_invalid );
+        uiZ = defaultNaNF64UI;
+        goto uiZ;
+    }
+    if ( ! expA ) {
+        expA = 1;
+        expB = 1;
+    }
+    if ( sigB < sigA ) goto aBigger;
+    if ( sigA < sigB ) goto bBigger;
+    uiZ = packToF64UI( softfloat_roundingMode == softfloat_round_min, 0, 0 );
+    goto uiZ;
+ expBBigger:
+    if ( expB == 0x7FF ) {
+        if ( sigB ) goto propagateNaN;
+        uiZ = packToF64UI( signZ ^ 1, 0x7FF, 0 );
+        goto uiZ;
+    }
+    sigA += expA ? UINT64_C( 0x4000000000000000 ) : sigA;
+    sigA = softfloat_shift64RightJam( sigA, - expDiff );
+    sigB |= UINT64_C( 0x4000000000000000 );
+ bBigger:
+    signZ ^= 1;
+    expZ = expB;
+    sigZ = sigB - sigA;
+    goto normRoundPack;
+ expABigger:
+    if ( expA == 0x7FF ) {
+        if ( sigA ) goto propagateNaN;
+        uiZ = uiA;
+        goto uiZ;
+    }
+    sigB += expB ? UINT64_C( 0x4000000000000000 ) : sigB;
+    sigB = softfloat_shift64RightJam( sigB, expDiff );
+    sigA |= UINT64_C( 0x4000000000000000 );
+ aBigger:
+    expZ = expA;
+    sigZ = sigA - sigB;
+ normRoundPack:
+    return softfloat_normRoundPackToF64( signZ, expZ - 1, sigZ );
+ propagateNaN:
+    uiZ = softfloat_propagateNaNF64UI( uiA, uiB );
+ uiZ:
+    uZ.ui = uiZ;
+    return uZ.f;
+
+}
+
diff --git a/softfloat/s_subMagsF64.cc b/softfloat/s_subMagsF64.cc
deleted file mode 100755 (executable)
index 45b81ba..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "primitives.h"
-#include "internals.h"
-#include "specialize.h"
-#include "softfloat.h"
-
-float64_t
- softfloat_subMagsF64( uint_fast64_t uiA, uint_fast64_t uiB, bool signZ )
-{
-    int_fast16_t expA;
-    uint_fast64_t sigA;
-    int_fast16_t expB;
-    uint_fast64_t sigB;
-    int_fast16_t expDiff;
-    uint_fast64_t uiZ;
-    int_fast16_t expZ;
-    uint_fast64_t sigZ;
-    union ui64_f64 uZ;
-
-    expA = expF64UI( uiA );
-    sigA = fracF64UI( uiA );
-    expB = expF64UI( uiB );
-    sigB = fracF64UI( uiB );
-    expDiff = expA - expB;
-    sigA <<= 10;
-    sigB <<= 10;
-    if ( 0 < expDiff ) goto expABigger;
-    if ( expDiff < 0 ) goto expBBigger;
-    if ( expA == 0x7FF ) {
-        if ( sigA | sigB ) goto propagateNaN;
-        softfloat_raiseFlags( softfloat_flag_invalid );
-        uiZ = defaultNaNF64UI;
-        goto uiZ;
-    }
-    if ( ! expA ) {
-        expA = 1;
-        expB = 1;
-    }
-    if ( sigB < sigA ) goto aBigger;
-    if ( sigA < sigB ) goto bBigger;
-    uiZ = packToF64UI( softfloat_roundingMode == softfloat_round_min, 0, 0 );
-    goto uiZ;
- expBBigger:
-    if ( expB == 0x7FF ) {
-        if ( sigB ) goto propagateNaN;
-        uiZ = packToF64UI( signZ ^ 1, 0x7FF, 0 );
-        goto uiZ;
-    }
-    sigA += expA ? UINT64_C( 0x4000000000000000 ) : sigA;
-    sigA = softfloat_shift64RightJam( sigA, - expDiff );
-    sigB |= UINT64_C( 0x4000000000000000 );
- bBigger:
-    signZ ^= 1;
-    expZ = expB;
-    sigZ = sigB - sigA;
-    goto normRoundPack;
- expABigger:
-    if ( expA == 0x7FF ) {
-        if ( sigA ) goto propagateNaN;
-        uiZ = uiA;
-        goto uiZ;
-    }
-    sigB += expB ? UINT64_C( 0x4000000000000000 ) : sigB;
-    sigB = softfloat_shift64RightJam( sigB, expDiff );
-    sigA |= UINT64_C( 0x4000000000000000 );
- aBigger:
-    expZ = expA;
-    sigZ = sigA - sigB;
- normRoundPack:
-    return softfloat_normRoundPackToF64( signZ, expZ - 1, sigZ );
- propagateNaN:
-    uiZ = softfloat_propagateNaNF64UI( uiA, uiB );
- uiZ:
-    uZ.ui = uiZ;
-    return uZ.f;
-
-}
-
index a7ea2483e37c14ee0fd4f4b63ecbbf41ba75ec74..3eddeed0343b13dc56d24a1dcc7456a2150ba28e 100755 (executable)
@@ -2,6 +2,10 @@
 #ifndef softfloat_h\r
 #define softfloat_h\r
 \r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
 /*** UPDATE COMMENTS. ***/\r
 \r
 /*============================================================================\r
@@ -221,5 +225,9 @@ bool f128_le_quiet( float128_t, float128_t );
 bool f128_lt_quiet( float128_t, float128_t );\r
 bool f128_isSignalingNaN( float128_t );\r
 \r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
 #endif\r
 \r
index 964bc478fbe185435a8624954872ea58191ad2e1..59993cb0fd49154e743c4a60841e49d0ba7e42e7 100644 (file)
@@ -6,107 +6,107 @@ softfloat_hdrs = \
        primitives.h \
        softfloat.h \
 
-softfloat_srcs = \
-       f32_add.cc                      \
-       f32_div.cc                      \
-       f32_eq.cc                       \
-       f32_eq_signaling.cc             \
-       f32_isSignalingNaN.cc           \
-       f32_le.cc                       \
-       f32_le_quiet.cc                 \
-       f32_lt.cc                       \
-       f32_lt_quiet.cc                 \
-       f32_mulAdd.cc                   \
-       f32_mul.cc                      \
-       f32_rem.cc                      \
-       f32_roundToInt.cc               \
-       f32_sqrt.cc                     \
-       f32_sub.cc                      \
-       f32_to_f64.cc                   \
-       f32_to_i32.cc                   \
-       f32_to_i32_r_minMag.cc          \
-       f32_to_i64.cc                   \
-       f32_to_i64_r_minMag.cc          \
-       f32_to_ui32.cc                  \
-       f32_to_ui32_r_minMag.cc         \
-       f32_to_ui64.cc                  \
-       f32_to_ui64_r_minMag.cc         \
-       f64_add.cc                      \
-       f64_div.cc                      \
-       f64_eq.cc                       \
-       f64_eq_signaling.cc             \
-       f64_isSignalingNaN.cc           \
-       f64_le.cc                       \
-       f64_le_quiet.cc                 \
-       f64_lt.cc                       \
-       f64_lt_quiet.cc                 \
-       f64_mulAdd.cc                   \
-       f64_mul.cc                      \
-       f64_rem.cc                      \
-       f64_roundToInt.cc               \
-       f64_sqrt.cc                     \
-       f64_sub.cc                      \
-       f64_to_f32.cc                   \
-       f64_to_i32.cc                   \
-       f64_to_i32_r_minMag.cc          \
-       f64_to_i64.cc                   \
-       f64_to_i64_r_minMag.cc          \
-       f64_to_ui32.cc                  \
-       f64_to_ui32_r_minMag.cc         \
-       f64_to_ui64.cc                  \
-       f64_to_ui64_r_minMag.cc         \
-       i32_to_f32.cc                   \
-       i32_to_f64.cc                   \
-       i64_to_f32.cc                   \
-       i64_to_f64.cc                   \
-       s_add128.cc                     \
-       s_add192.cc                     \
-       s_addMagsF32.cc                 \
-       s_addMagsF64.cc                 \
-       s_countLeadingZeros32.cc        \
-       s_countLeadingZeros64.cc        \
-       s_countLeadingZeros8.cc         \
-       s_eq128.cc                      \
-       s_estimateDiv128To64.cc         \
-       s_estimateSqrt32.cc             \
-       s_le128.cc                      \
-       s_lt128.cc                      \
-       s_mul128By64To192.cc            \
-       s_mul128To256.cc                \
-       s_mul64To128.cc                 \
-       s_mulAddF32.cc                  \
-       s_mulAddF64.cc                  \
-       s_normRoundPackToF32.cc         \
-       s_normRoundPackToF64.cc         \
-       s_normSubnormalF32Sig.cc        \
-       s_normSubnormalF64Sig.cc        \
-       softfloat_state.cc              \
-       s_roundPackToF32.cc             \
-       s_roundPackToF64.cc             \
-       s_roundPackToI32.cc             \
-       s_roundPackToI64.cc             \
-       s_roundPackToUI32.cc            \
-       s_roundPackToUI64.cc            \
-       s_shift128ExtraRightJam.cc      \
-       s_shift128RightJam.cc           \
-       s_shift32RightJam.cc            \
-       s_shift64ExtraRightJam.cc       \
-       s_shift64RightJam.cc            \
-       s_shortShift128ExtraRightJam.cc \
-       s_shortShift128Left.cc          \
-       s_shortShift128Right.cc         \
-       s_shortShift192Left.cc          \
-       s_shortShift32Right1Jam.cc      \
-       s_shortShift64ExtraRightJam.cc  \
-       s_shortShift64RightJam.cc       \
-       s_sub128.cc                     \
-       s_sub192.cc                     \
-       s_subMagsF32.cc                 \
-       s_subMagsF64.cc                 \
-       ui32_to_f32.cc                  \
-       ui32_to_f64.cc                  \
-       ui64_to_f32.cc                  \
-       ui64_to_f64.cc                  \
+softfloat_c_srcs = \
+       f32_add.c                      \
+       f32_div.c                      \
+       f32_eq.c                       \
+       f32_eq_signaling.c             \
+       f32_isSignalingNaN.c           \
+       f32_le.c                       \
+       f32_le_quiet.c                 \
+       f32_lt.c                       \
+       f32_lt_quiet.c                 \
+       f32_mulAdd.c                   \
+       f32_mul.c                      \
+       f32_rem.c                      \
+       f32_roundToInt.c               \
+       f32_sqrt.c                     \
+       f32_sub.c                      \
+       f32_to_f64.c                   \
+       f32_to_i32.c                   \
+       f32_to_i32_r_minMag.c          \
+       f32_to_i64.c                   \
+       f32_to_i64_r_minMag.c          \
+       f32_to_ui32.c                  \
+       f32_to_ui32_r_minMag.c         \
+       f32_to_ui64.c                  \
+       f32_to_ui64_r_minMag.c         \
+       f64_add.c                      \
+       f64_div.c                      \
+       f64_eq.c                       \
+       f64_eq_signaling.c             \
+       f64_isSignalingNaN.c           \
+       f64_le.c                       \
+       f64_le_quiet.c                 \
+       f64_lt.c                       \
+       f64_lt_quiet.c                 \
+       f64_mulAdd.c                   \
+       f64_mul.c                      \
+       f64_rem.c                      \
+       f64_roundToInt.c               \
+       f64_sqrt.c                     \
+       f64_sub.c                      \
+       f64_to_f32.c                   \
+       f64_to_i32.c                   \
+       f64_to_i32_r_minMag.c          \
+       f64_to_i64.c                   \
+       f64_to_i64_r_minMag.c          \
+       f64_to_ui32.c                  \
+       f64_to_ui32_r_minMag.c         \
+       f64_to_ui64.c                  \
+       f64_to_ui64_r_minMag.c         \
+       i32_to_f32.c                   \
+       i32_to_f64.c                   \
+       i64_to_f32.c                   \
+       i64_to_f64.c                   \
+       s_add128.c                     \
+       s_add192.c                     \
+       s_addMagsF32.c                 \
+       s_addMagsF64.c                 \
+       s_countLeadingZeros32.c        \
+       s_countLeadingZeros64.c        \
+       s_countLeadingZeros8.c         \
+       s_eq128.c                      \
+       s_estimateDiv128To64.c         \
+       s_estimateSqrt32.c             \
+       s_le128.c                      \
+       s_lt128.c                      \
+       s_mul128By64To192.c            \
+       s_mul128To256.c                \
+       s_mul64To128.c                 \
+       s_mulAddF32.c                  \
+       s_mulAddF64.c                  \
+       s_normRoundPackToF32.c         \
+       s_normRoundPackToF64.c         \
+       s_normSubnormalF32Sig.c        \
+       s_normSubnormalF64Sig.c        \
+       softfloat_state.c              \
+       s_roundPackToF32.c             \
+       s_roundPackToF64.c             \
+       s_roundPackToI32.c             \
+       s_roundPackToI64.c             \
+       s_roundPackToUI32.c            \
+       s_roundPackToUI64.c            \
+       s_shift128ExtraRightJam.c      \
+       s_shift128RightJam.c           \
+       s_shift32RightJam.c            \
+       s_shift64ExtraRightJam.c       \
+       s_shift64RightJam.c            \
+       s_shortShift128ExtraRightJam.c \
+       s_shortShift128Left.c          \
+       s_shortShift128Right.c         \
+       s_shortShift192Left.c          \
+       s_shortShift32Right1Jam.c      \
+       s_shortShift64ExtraRightJam.c  \
+       s_shortShift64RightJam.c       \
+       s_sub128.c                     \
+       s_sub192.c                     \
+       s_subMagsF32.c                 \
+       s_subMagsF64.c                 \
+       ui32_to_f32.c                  \
+       ui32_to_f64.c                  \
+       ui64_to_f32.c                  \
+       ui64_to_f64.c                  \
 
 softfloat_test_srcs =
 
diff --git a/softfloat/softfloat_state.c b/softfloat/softfloat_state.c
new file mode 100755 (executable)
index 0000000..8859089
--- /dev/null
@@ -0,0 +1,19 @@
+\r
+/*** COMMENTS. ***/\r
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "internals.h"\r
+#include "specialize.h"\r
+#include "softfloat.h"\r
+\r
+/*----------------------------------------------------------------------------\r
+| Floating-point rounding mode, extended double-precision rounding precision,\r
+| and exception flags.\r
+*----------------------------------------------------------------------------*/\r
+int_fast8_t softfloat_roundingMode = softfloat_round_nearest_even;\r
+int_fast8_t softfloat_detectTininess = init_detectTininess;\r
+int_fast8_t softfloat_exceptionFlags = 0;\r
+\r
+int_fast8_t floatx80_roundingPrecision = 80;\r
+\r
diff --git a/softfloat/softfloat_state.cc b/softfloat/softfloat_state.cc
deleted file mode 100755 (executable)
index 8859089..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-\r
-/*** COMMENTS. ***/\r
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "internals.h"\r
-#include "specialize.h"\r
-#include "softfloat.h"\r
-\r
-/*----------------------------------------------------------------------------\r
-| Floating-point rounding mode, extended double-precision rounding precision,\r
-| and exception flags.\r
-*----------------------------------------------------------------------------*/\r
-int_fast8_t softfloat_roundingMode = softfloat_round_nearest_even;\r
-int_fast8_t softfloat_detectTininess = init_detectTininess;\r
-int_fast8_t softfloat_exceptionFlags = 0;\r
-\r
-int_fast8_t floatx80_roundingPrecision = 80;\r
-\r
diff --git a/softfloat/ui32_to_f32.c b/softfloat/ui32_to_f32.c
new file mode 100755 (executable)
index 0000000..ba0fc1a
--- /dev/null
@@ -0,0 +1,25 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+float32_t ui32_to_f32( uint_fast32_t a )\r
+{\r
+    union ui32_f32 uZ;\r
+\r
+    if ( ! a ) {\r
+        uZ.ui = 0;\r
+        return uZ.f;\r
+    }\r
+    if ( a & 0x80000000 ) {\r
+        return\r
+            softfloat_roundPackToF32(\r
+                0, 0x9D, softfloat_shortShift32Right1Jam( a ) );\r
+    } else {\r
+        return softfloat_normRoundPackToF32( 0, 0x9C, a );\r
+    }\r
+\r
+}\r
+\r
diff --git a/softfloat/ui32_to_f32.cc b/softfloat/ui32_to_f32.cc
deleted file mode 100755 (executable)
index ba0fc1a..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-float32_t ui32_to_f32( uint_fast32_t a )\r
-{\r
-    union ui32_f32 uZ;\r
-\r
-    if ( ! a ) {\r
-        uZ.ui = 0;\r
-        return uZ.f;\r
-    }\r
-    if ( a & 0x80000000 ) {\r
-        return\r
-            softfloat_roundPackToF32(\r
-                0, 0x9D, softfloat_shortShift32Right1Jam( a ) );\r
-    } else {\r
-        return softfloat_normRoundPackToF32( 0, 0x9C, a );\r
-    }\r
-\r
-}\r
-\r
diff --git a/softfloat/ui32_to_f64.c b/softfloat/ui32_to_f64.c
new file mode 100755 (executable)
index 0000000..d0bd177
--- /dev/null
@@ -0,0 +1,26 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+float64_t ui32_to_f64( uint_fast32_t a )\r
+{\r
+    uint_fast64_t uiZ;\r
+    int shiftCount;\r
+    union ui64_f64 uZ;\r
+\r
+    if ( ! a ) {\r
+        uiZ = 0;\r
+    } else {\r
+        shiftCount = softfloat_countLeadingZeros32( a ) + 21;\r
+        uiZ =\r
+            packToF64UI(\r
+                0, 0x432 - shiftCount, (uint_fast64_t) a<<shiftCount );\r
+    }\r
+    uZ.ui = uiZ;\r
+    return uZ.f;\r
+\r
+}\r
+\r
diff --git a/softfloat/ui32_to_f64.cc b/softfloat/ui32_to_f64.cc
deleted file mode 100755 (executable)
index d0bd177..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-float64_t ui32_to_f64( uint_fast32_t a )\r
-{\r
-    uint_fast64_t uiZ;\r
-    int shiftCount;\r
-    union ui64_f64 uZ;\r
-\r
-    if ( ! a ) {\r
-        uiZ = 0;\r
-    } else {\r
-        shiftCount = softfloat_countLeadingZeros32( a ) + 21;\r
-        uiZ =\r
-            packToF64UI(\r
-                0, 0x432 - shiftCount, (uint_fast64_t) a<<shiftCount );\r
-    }\r
-    uZ.ui = uiZ;\r
-    return uZ.f;\r
-\r
-}\r
-\r
diff --git a/softfloat/ui64_to_f32.c b/softfloat/ui64_to_f32.c
new file mode 100755 (executable)
index 0000000..82afbdc
--- /dev/null
@@ -0,0 +1,31 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+float32_t ui64_to_f32( uint_fast64_t a )\r
+{\r
+    int shiftCount;\r
+    union ui32_f32 u;\r
+    uint_fast32_t sig;\r
+\r
+    shiftCount = softfloat_countLeadingZeros64( a ) - 40;\r
+    if ( 0 <= shiftCount ) {\r
+        u.ui =\r
+            a ? packToF32UI(\r
+                    0, 0x95 - shiftCount, (uint_fast32_t) a<<shiftCount )\r
+                : 0;\r
+        return u.f;\r
+    } else {\r
+        shiftCount += 7;\r
+        sig =\r
+            ( shiftCount < 0 )\r
+                ? softfloat_shortShift64RightJam( a, - shiftCount )\r
+                : (uint_fast32_t) a<<shiftCount;\r
+        return softfloat_roundPackToF32( 0, 0x9C - shiftCount, sig );\r
+    }\r
+\r
+}\r
+\r
diff --git a/softfloat/ui64_to_f32.cc b/softfloat/ui64_to_f32.cc
deleted file mode 100755 (executable)
index 82afbdc..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-float32_t ui64_to_f32( uint_fast64_t a )\r
-{\r
-    int shiftCount;\r
-    union ui32_f32 u;\r
-    uint_fast32_t sig;\r
-\r
-    shiftCount = softfloat_countLeadingZeros64( a ) - 40;\r
-    if ( 0 <= shiftCount ) {\r
-        u.ui =\r
-            a ? packToF32UI(\r
-                    0, 0x95 - shiftCount, (uint_fast32_t) a<<shiftCount )\r
-                : 0;\r
-        return u.f;\r
-    } else {\r
-        shiftCount += 7;\r
-        sig =\r
-            ( shiftCount < 0 )\r
-                ? softfloat_shortShift64RightJam( a, - shiftCount )\r
-                : (uint_fast32_t) a<<shiftCount;\r
-        return softfloat_roundPackToF32( 0, 0x9C - shiftCount, sig );\r
-    }\r
-\r
-}\r
-\r
diff --git a/softfloat/ui64_to_f64.c b/softfloat/ui64_to_f64.c
new file mode 100755 (executable)
index 0000000..52c158b
--- /dev/null
@@ -0,0 +1,25 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "primitives.h"\r
+#include "internals.h"\r
+#include "softfloat.h"\r
+\r
+float64_t ui64_to_f64( uint_fast64_t a )\r
+{\r
+    union ui64_f64 uZ;\r
+\r
+    if ( ! a ) {\r
+        uZ.ui = 0;\r
+        return uZ.f;\r
+    }\r
+    if ( a & UINT64_C( 0x8000000000000000 ) ) {\r
+        return\r
+            softfloat_roundPackToF64(\r
+                0, 0x43D, softfloat_shortShift64RightJam( a, 1 ) );\r
+    } else {\r
+        return softfloat_normRoundPackToF64( 0, 0x43C, a );\r
+    }\r
+\r
+}\r
+\r
diff --git a/softfloat/ui64_to_f64.cc b/softfloat/ui64_to_f64.cc
deleted file mode 100755 (executable)
index 52c158b..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "primitives.h"\r
-#include "internals.h"\r
-#include "softfloat.h"\r
-\r
-float64_t ui64_to_f64( uint_fast64_t a )\r
-{\r
-    union ui64_f64 uZ;\r
-\r
-    if ( ! a ) {\r
-        uZ.ui = 0;\r
-        return uZ.f;\r
-    }\r
-    if ( a & UINT64_C( 0x8000000000000000 ) ) {\r
-        return\r
-            softfloat_roundPackToF64(\r
-                0, 0x43D, softfloat_shortShift64RightJam( a, 1 ) );\r
-    } else {\r
-        return softfloat_normRoundPackToF64( 0, 0x43C, a );\r
-    }\r
-\r
-}\r
-\r
diff --git a/softfloat_riscv/s_commonNaNToF32UI.c b/softfloat_riscv/s_commonNaNToF32UI.c
new file mode 100755 (executable)
index 0000000..61f2735
--- /dev/null
@@ -0,0 +1,17 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "specialize.h"\r
+\r
+/*----------------------------------------------------------------------------\r
+| Returns the result of converting the canonical NaN `a' to the single-\r
+| precision floating-point format.\r
+*----------------------------------------------------------------------------*/\r
+\r
+uint_fast32_t softfloat_commonNaNToF32UI( struct commonNaN a )\r
+{\r
+\r
+    return (uint_fast32_t) a.sign<<31 | 0x7FFFFFFF;\r
+\r
+}\r
+\r
diff --git a/softfloat_riscv/s_commonNaNToF32UI.cc b/softfloat_riscv/s_commonNaNToF32UI.cc
deleted file mode 100755 (executable)
index 61f2735..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "specialize.h"\r
-\r
-/*----------------------------------------------------------------------------\r
-| Returns the result of converting the canonical NaN `a' to the single-\r
-| precision floating-point format.\r
-*----------------------------------------------------------------------------*/\r
-\r
-uint_fast32_t softfloat_commonNaNToF32UI( struct commonNaN a )\r
-{\r
-\r
-    return (uint_fast32_t) a.sign<<31 | 0x7FFFFFFF;\r
-\r
-}\r
-\r
diff --git a/softfloat_riscv/s_commonNaNToF64UI.c b/softfloat_riscv/s_commonNaNToF64UI.c
new file mode 100755 (executable)
index 0000000..da36c04
--- /dev/null
@@ -0,0 +1,18 @@
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Returns the result of converting the canonical NaN `a' to the double-
+| precision floating-point format.
+*----------------------------------------------------------------------------*/
+
+uint_fast64_t softfloat_commonNaNToF64UI( struct commonNaN a )
+{
+
+    return
+        (uint_fast64_t) a.sign<<63 | UINT64_C( 0x7FFFFFFFFFFFFFFF );
+
+}
+
diff --git a/softfloat_riscv/s_commonNaNToF64UI.cc b/softfloat_riscv/s_commonNaNToF64UI.cc
deleted file mode 100755 (executable)
index da36c04..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-
-#include <stdint.h>
-#include "platform.h"
-#include "specialize.h"
-
-/*----------------------------------------------------------------------------
-| Returns the result of converting the canonical NaN `a' to the double-
-| precision floating-point format.
-*----------------------------------------------------------------------------*/
-
-uint_fast64_t softfloat_commonNaNToF64UI( struct commonNaN a )
-{
-
-    return
-        (uint_fast64_t) a.sign<<63 | UINT64_C( 0x7FFFFFFFFFFFFFFF );
-
-}
-
diff --git a/softfloat_riscv/s_f32UIToCommonNaN.c b/softfloat_riscv/s_f32UIToCommonNaN.c
new file mode 100755 (executable)
index 0000000..9ee0db9
--- /dev/null
@@ -0,0 +1,25 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "specialize.h"\r
+#include "softfloat.h"\r
+\r
+/*----------------------------------------------------------------------------\r
+| Returns the result of converting the single-precision floating-point NaN\r
+| `a' to the canonical NaN format.  If `a' is a signaling NaN, the invalid\r
+| exception is raised.\r
+*----------------------------------------------------------------------------*/\r
+struct commonNaN softfloat_f32UIToCommonNaN( uint_fast32_t uiA )\r
+{\r
+    struct commonNaN z;\r
+\r
+    if ( softfloat_isSigNaNF32UI( uiA ) ) {\r
+        softfloat_raiseFlags( softfloat_flag_invalid );\r
+    }\r
+    z.sign = uiA>>31;\r
+    z.v64 = (uint_fast64_t) 0x7FFFF <<41;\r
+    z.v0 = 0;\r
+    return z;\r
+\r
+}\r
+\r
diff --git a/softfloat_riscv/s_f32UIToCommonNaN.cc b/softfloat_riscv/s_f32UIToCommonNaN.cc
deleted file mode 100755 (executable)
index 9ee0db9..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "specialize.h"\r
-#include "softfloat.h"\r
-\r
-/*----------------------------------------------------------------------------\r
-| Returns the result of converting the single-precision floating-point NaN\r
-| `a' to the canonical NaN format.  If `a' is a signaling NaN, the invalid\r
-| exception is raised.\r
-*----------------------------------------------------------------------------*/\r
-struct commonNaN softfloat_f32UIToCommonNaN( uint_fast32_t uiA )\r
-{\r
-    struct commonNaN z;\r
-\r
-    if ( softfloat_isSigNaNF32UI( uiA ) ) {\r
-        softfloat_raiseFlags( softfloat_flag_invalid );\r
-    }\r
-    z.sign = uiA>>31;\r
-    z.v64 = (uint_fast64_t) 0x7FFFF <<41;\r
-    z.v0 = 0;\r
-    return z;\r
-\r
-}\r
-\r
diff --git a/softfloat_riscv/s_f64UIToCommonNaN.c b/softfloat_riscv/s_f64UIToCommonNaN.c
new file mode 100755 (executable)
index 0000000..84d8ca0
--- /dev/null
@@ -0,0 +1,25 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "specialize.h"\r
+#include "softfloat.h"\r
+\r
+/*----------------------------------------------------------------------------\r
+| Returns the result of converting the double-precision floating-point NaN\r
+| `a' to the canonical NaN format.  If `a' is a signaling NaN, the invalid\r
+| exception is raised.\r
+*----------------------------------------------------------------------------*/\r
+struct commonNaN softfloat_f64UIToCommonNaN( uint_fast64_t uiA )\r
+{\r
+    struct commonNaN z;\r
+\r
+    if ( softfloat_isSigNaNF64UI( uiA ) ) {\r
+        softfloat_raiseFlags( softfloat_flag_invalid );\r
+    }\r
+    z.sign = uiA>>63;\r
+    z.v64 = (uint_fast64_t) 0xFFFFFFFFFFFFF <<12;\r
+    z.v0 = 0;\r
+    return z;\r
+\r
+}\r
+\r
diff --git a/softfloat_riscv/s_f64UIToCommonNaN.cc b/softfloat_riscv/s_f64UIToCommonNaN.cc
deleted file mode 100755 (executable)
index 84d8ca0..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "specialize.h"\r
-#include "softfloat.h"\r
-\r
-/*----------------------------------------------------------------------------\r
-| Returns the result of converting the double-precision floating-point NaN\r
-| `a' to the canonical NaN format.  If `a' is a signaling NaN, the invalid\r
-| exception is raised.\r
-*----------------------------------------------------------------------------*/\r
-struct commonNaN softfloat_f64UIToCommonNaN( uint_fast64_t uiA )\r
-{\r
-    struct commonNaN z;\r
-\r
-    if ( softfloat_isSigNaNF64UI( uiA ) ) {\r
-        softfloat_raiseFlags( softfloat_flag_invalid );\r
-    }\r
-    z.sign = uiA>>63;\r
-    z.v64 = (uint_fast64_t) 0xFFFFFFFFFFFFF <<12;\r
-    z.v0 = 0;\r
-    return z;\r
-\r
-}\r
-\r
diff --git a/softfloat_riscv/s_isSigNaNF32UI.c b/softfloat_riscv/s_isSigNaNF32UI.c
new file mode 100755 (executable)
index 0000000..0a9c33f
--- /dev/null
@@ -0,0 +1,13 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+
+bool softfloat_isSigNaNF32UI( uint_fast32_t ui )
+{
+
+    return ( ( ui>>22 & 0x1FF ) == 0x1FE ) && ( ui & 0x003FFFFF );
+
+}
+
diff --git a/softfloat_riscv/s_isSigNaNF32UI.cc b/softfloat_riscv/s_isSigNaNF32UI.cc
deleted file mode 100755 (executable)
index 0a9c33f..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "specialize.h"
-
-bool softfloat_isSigNaNF32UI( uint_fast32_t ui )
-{
-
-    return ( ( ui>>22 & 0x1FF ) == 0x1FE ) && ( ui & 0x003FFFFF );
-
-}
-
diff --git a/softfloat_riscv/s_isSigNaNF64UI.c b/softfloat_riscv/s_isSigNaNF64UI.c
new file mode 100755 (executable)
index 0000000..d255213
--- /dev/null
@@ -0,0 +1,15 @@
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+
+bool softfloat_isSigNaNF64UI( uint_fast64_t ui )
+{
+
+    return
+        ( ( ui>>51 & 0xFFF ) == 0xFFE )
+            && ( ui & UINT64_C( 0x0007FFFFFFFFFFFF ) );
+
+}
+
diff --git a/softfloat_riscv/s_isSigNaNF64UI.cc b/softfloat_riscv/s_isSigNaNF64UI.cc
deleted file mode 100755 (executable)
index d255213..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "specialize.h"
-
-bool softfloat_isSigNaNF64UI( uint_fast64_t ui )
-{
-
-    return
-        ( ( ui>>51 & 0xFFF ) == 0xFFE )
-            && ( ui & UINT64_C( 0x0007FFFFFFFFFFFF ) );
-
-}
-
diff --git a/softfloat_riscv/s_propagateNaNF32UI.c b/softfloat_riscv/s_propagateNaNF32UI.c
new file mode 100755 (executable)
index 0000000..07774e8
--- /dev/null
@@ -0,0 +1,55 @@
+\r
+/*** UPDATE COMMENTS. ***/\r
+\r
+#include <stdbool.h>\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "internals.h"\r
+#include "specialize.h"\r
+#include "softfloat.h"\r
+\r
+/*----------------------------------------------------------------------------\r
+| Takes two single-precision floating-point values `a' and `b', one of which\r
+| is a NaN, and returns the appropriate NaN result.  If either `a' or `b' is a\r
+| signaling NaN, the invalid exception is raised.\r
+*----------------------------------------------------------------------------*/\r
+\r
+uint_fast32_t\r
+ softfloat_propagateNaNF32UI( uint_fast32_t uiA, uint_fast32_t uiB )\r
+{\r
+    bool isNaNA, isSigNaNA, isNaNB, isSigNaNB;\r
+    uint_fast32_t uiMagA, uiMagB;\r
+\r
+    /*------------------------------------------------------------------------\r
+    *------------------------------------------------------------------------*/\r
+    isNaNA = isNaNF32UI( uiA );\r
+    isSigNaNA = softfloat_isSigNaNF32UI( uiA );\r
+    isNaNB = isNaNF32UI( uiB );\r
+    isSigNaNB = softfloat_isSigNaNF32UI( uiB );\r
+    /*------------------------------------------------------------------------\r
+    | Make NaNs non-signaling.\r
+    *------------------------------------------------------------------------*/\r
+    uiA |= 0x00400000;\r
+    uiB |= 0x00400000;\r
+    /*------------------------------------------------------------------------\r
+    *------------------------------------------------------------------------*/\r
+    if ( isSigNaNA | isSigNaNB ) {\r
+        softfloat_raiseFlags( softfloat_flag_invalid );\r
+    }\r
+    if ( isSigNaNA ) {\r
+        if ( isSigNaNB ) goto returnLargerSignificand;\r
+        return isNaNB ? uiB : uiA;\r
+    } else if ( isNaNA ) {\r
+        if ( isSigNaNB || ! isNaNB ) return uiA;\r
+ returnLargerSignificand:\r
+        uiMagA = uiA<<1;\r
+        uiMagB = uiB<<1;\r
+        if ( uiMagA < uiMagB ) return uiB;\r
+        if ( uiMagB < uiMagA ) return uiA;\r
+        return ( uiA < uiB ) ? uiA : uiB;\r
+    } else {\r
+        return uiB;\r
+    }\r
+\r
+}\r
+\r
diff --git a/softfloat_riscv/s_propagateNaNF32UI.cc b/softfloat_riscv/s_propagateNaNF32UI.cc
deleted file mode 100755 (executable)
index 07774e8..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-\r
-/*** UPDATE COMMENTS. ***/\r
-\r
-#include <stdbool.h>\r
-#include <stdint.h>\r
-#include "platform.h"\r
-#include "internals.h"\r
-#include "specialize.h"\r
-#include "softfloat.h"\r
-\r
-/*----------------------------------------------------------------------------\r
-| Takes two single-precision floating-point values `a' and `b', one of which\r
-| is a NaN, and returns the appropriate NaN result.  If either `a' or `b' is a\r
-| signaling NaN, the invalid exception is raised.\r
-*----------------------------------------------------------------------------*/\r
-\r
-uint_fast32_t\r
- softfloat_propagateNaNF32UI( uint_fast32_t uiA, uint_fast32_t uiB )\r
-{\r
-    bool isNaNA, isSigNaNA, isNaNB, isSigNaNB;\r
-    uint_fast32_t uiMagA, uiMagB;\r
-\r
-    /*------------------------------------------------------------------------\r
-    *------------------------------------------------------------------------*/\r
-    isNaNA = isNaNF32UI( uiA );\r
-    isSigNaNA = softfloat_isSigNaNF32UI( uiA );\r
-    isNaNB = isNaNF32UI( uiB );\r
-    isSigNaNB = softfloat_isSigNaNF32UI( uiB );\r
-    /*------------------------------------------------------------------------\r
-    | Make NaNs non-signaling.\r
-    *------------------------------------------------------------------------*/\r
-    uiA |= 0x00400000;\r
-    uiB |= 0x00400000;\r
-    /*------------------------------------------------------------------------\r
-    *------------------------------------------------------------------------*/\r
-    if ( isSigNaNA | isSigNaNB ) {\r
-        softfloat_raiseFlags( softfloat_flag_invalid );\r
-    }\r
-    if ( isSigNaNA ) {\r
-        if ( isSigNaNB ) goto returnLargerSignificand;\r
-        return isNaNB ? uiB : uiA;\r
-    } else if ( isNaNA ) {\r
-        if ( isSigNaNB || ! isNaNB ) return uiA;\r
- returnLargerSignificand:\r
-        uiMagA = uiA<<1;\r
-        uiMagB = uiB<<1;\r
-        if ( uiMagA < uiMagB ) return uiB;\r
-        if ( uiMagB < uiMagA ) return uiA;\r
-        return ( uiA < uiB ) ? uiA : uiB;\r
-    } else {\r
-        return uiB;\r
-    }\r
-\r
-}\r
-\r
diff --git a/softfloat_riscv/s_propagateNaNF64UI.c b/softfloat_riscv/s_propagateNaNF64UI.c
new file mode 100755 (executable)
index 0000000..0ff6446
--- /dev/null
@@ -0,0 +1,55 @@
+
+/*** UPDATE COMMENTS. ***/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Takes two double-precision floating-point values `a' and `b', one of which
+| is a NaN, and returns the appropriate NaN result.  If either `a' or `b' is a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+
+uint_fast64_t
+ softfloat_propagateNaNF64UI( uint_fast64_t uiA, uint_fast64_t uiB )
+{
+    bool isNaNA, isSigNaNA, isNaNB, isSigNaNB;
+    uint_fast64_t uiMagA, uiMagB;
+
+    /*------------------------------------------------------------------------
+    *------------------------------------------------------------------------*/
+    isNaNA = isNaNF64UI( uiA );
+    isSigNaNA = softfloat_isSigNaNF64UI( uiA );
+    isNaNB = isNaNF64UI( uiB );
+    isSigNaNB = softfloat_isSigNaNF64UI( uiB );
+    /*------------------------------------------------------------------------
+    | Make NaNs non-signaling.
+    *------------------------------------------------------------------------*/
+    uiA |= UINT64_C( 0x0008000000000000 );
+    uiB |= UINT64_C( 0x0008000000000000 );
+    /*------------------------------------------------------------------------
+    *------------------------------------------------------------------------*/
+    if ( isSigNaNA | isSigNaNB ) {
+        softfloat_raiseFlags( softfloat_flag_invalid );
+    }
+    if ( isSigNaNA ) {
+        if ( isSigNaNB ) goto returnLargerSignificand;
+        return isNaNB ? uiB : uiA;
+    } else if ( isNaNA ) {
+        if ( isSigNaNB || ! isNaNB ) return uiA;
+ returnLargerSignificand:
+        uiMagA = uiA & UINT64_C( 0x7FFFFFFFFFFFFFFF );
+        uiMagB = uiB & UINT64_C( 0x7FFFFFFFFFFFFFFF );
+        if ( uiMagA < uiMagB ) return uiB;
+        if ( uiMagB < uiMagA ) return uiA;
+        return ( uiA < uiB ) ? uiA : uiB;
+    } else {
+        return uiB;
+    }
+
+}
+
diff --git a/softfloat_riscv/s_propagateNaNF64UI.cc b/softfloat_riscv/s_propagateNaNF64UI.cc
deleted file mode 100755 (executable)
index 0ff6446..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-
-/*** UPDATE COMMENTS. ***/
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "internals.h"
-#include "specialize.h"
-#include "softfloat.h"
-
-/*----------------------------------------------------------------------------
-| Takes two double-precision floating-point values `a' and `b', one of which
-| is a NaN, and returns the appropriate NaN result.  If either `a' or `b' is a
-| signaling NaN, the invalid exception is raised.
-*----------------------------------------------------------------------------*/
-
-uint_fast64_t
- softfloat_propagateNaNF64UI( uint_fast64_t uiA, uint_fast64_t uiB )
-{
-    bool isNaNA, isSigNaNA, isNaNB, isSigNaNB;
-    uint_fast64_t uiMagA, uiMagB;
-
-    /*------------------------------------------------------------------------
-    *------------------------------------------------------------------------*/
-    isNaNA = isNaNF64UI( uiA );
-    isSigNaNA = softfloat_isSigNaNF64UI( uiA );
-    isNaNB = isNaNF64UI( uiB );
-    isSigNaNB = softfloat_isSigNaNF64UI( uiB );
-    /*------------------------------------------------------------------------
-    | Make NaNs non-signaling.
-    *------------------------------------------------------------------------*/
-    uiA |= UINT64_C( 0x0008000000000000 );
-    uiB |= UINT64_C( 0x0008000000000000 );
-    /*------------------------------------------------------------------------
-    *------------------------------------------------------------------------*/
-    if ( isSigNaNA | isSigNaNB ) {
-        softfloat_raiseFlags( softfloat_flag_invalid );
-    }
-    if ( isSigNaNA ) {
-        if ( isSigNaNB ) goto returnLargerSignificand;
-        return isNaNB ? uiB : uiA;
-    } else if ( isNaNA ) {
-        if ( isSigNaNB || ! isNaNB ) return uiA;
- returnLargerSignificand:
-        uiMagA = uiA & UINT64_C( 0x7FFFFFFFFFFFFFFF );
-        uiMagB = uiB & UINT64_C( 0x7FFFFFFFFFFFFFFF );
-        if ( uiMagA < uiMagB ) return uiB;
-        if ( uiMagB < uiMagA ) return uiA;
-        return ( uiA < uiB ) ? uiA : uiB;
-    } else {
-        return uiB;
-    }
-
-}
-
diff --git a/softfloat_riscv/softfloat_raiseFlags.c b/softfloat_riscv/softfloat_raiseFlags.c
new file mode 100755 (executable)
index 0000000..c0c0dc8
--- /dev/null
@@ -0,0 +1,51 @@
+
+/*============================================================================
+
+*** FIX.
+
+This C source fragment is part of the SoftFloat IEC/IEEE Floating-point
+Arithmetic Package, Release 2b.
+
+Written by John R. Hauser.  This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704.  Funding was partially provided by the
+National Science Foundation under grant MIP-9311980.  The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html'.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR.  USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+#include "platform.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Raises the exceptions specified by `flags'.  Floating-point traps can be
+| defined here if desired.  It is currently not possible for such a trap
+| to substitute a result value.  If traps are not implemented, this routine
+| should be simply `float_exception_flags |= flags;'.
+*----------------------------------------------------------------------------*/
+
+void softfloat_raiseFlags( int_fast8_t flags )
+{
+
+    softfloat_exceptionFlags |= flags;
+
+}
+
diff --git a/softfloat_riscv/softfloat_raiseFlags.cc b/softfloat_riscv/softfloat_raiseFlags.cc
deleted file mode 100755 (executable)
index c0c0dc8..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-
-/*============================================================================
-
-*** FIX.
-
-This C source fragment is part of the SoftFloat IEC/IEEE Floating-point
-Arithmetic Package, Release 2b.
-
-Written by John R. Hauser.  This work was made possible in part by the
-International Computer Science Institute, located at Suite 600, 1947 Center
-Street, Berkeley, California 94704.  Funding was partially provided by the
-National Science Foundation under grant MIP-9311980.  The original version
-of this code was written as part of a project to build a fixed-point vector
-processor in collaboration with the University of California at Berkeley,
-overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
-is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
-arithmetic/SoftFloat.html'.
-
-THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort has
-been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
-RESULT IN INCORRECT BEHAVIOR.  USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
-AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
-COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
-EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
-INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
-OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
-
-Derivative works are acceptable, even for commercial purposes, so long as
-(1) the source code for the derivative work includes prominent notice that
-the work is derivative, and (2) the source code includes prominent notice with
-these four paragraphs for those parts of this code that are retained.
-
-=============================================================================*/
-
-#include "platform.h"
-#include "softfloat.h"
-
-/*----------------------------------------------------------------------------
-| Raises the exceptions specified by `flags'.  Floating-point traps can be
-| defined here if desired.  It is currently not possible for such a trap
-| to substitute a result value.  If traps are not implemented, this routine
-| should be simply `float_exception_flags |= flags;'.
-*----------------------------------------------------------------------------*/
-
-void softfloat_raiseFlags( int_fast8_t flags )
-{
-
-    softfloat_exceptionFlags |= flags;
-
-}
-
index 0b996fb48333dc496aecb278d93fd53c6e8fbc49..0b898edf1ab325f99e2b991e83518d9ab8f75b00 100644 (file)
@@ -5,16 +5,16 @@ softfloat_riscv_hdrs = \
        platform.h        \
        specialize.h      \
 
-softfloat_riscv_srcs = \
-       softfloat_raiseFlags.cc \
-       s_commonNaNToF32UI.cc   \
-       s_commonNaNToF64UI.cc   \
-       s_f32UIToCommonNaN.cc   \
-       s_f64UIToCommonNaN.cc   \
-       s_isSigNaNF32UI.cc      \
-       s_isSigNaNF64UI.cc      \
-       s_propagateNaNF32UI.cc  \
-       s_propagateNaNF64UI.cc  \
+softfloat_riscv_c_srcs = \
+       softfloat_raiseFlags.c \
+       s_commonNaNToF32UI.c   \
+       s_commonNaNToF64UI.c   \
+       s_f32UIToCommonNaN.c   \
+       s_f64UIToCommonNaN.c   \
+       s_isSigNaNF32UI.c      \
+       s_isSigNaNF64UI.c      \
+       s_propagateNaNF32UI.c  \
+       s_propagateNaNF64UI.c  \
 
 softfloat_riscv_test_srcs =