[sim] made softfloat files C instead of C++
[riscv-isa-sim.git] / softfloat / s_normSubnormalF32Sig.c
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