[sim] integrated SoftFloat-3 with ISA sim; removed SoftFloat-2b
[riscv-isa-sim.git] / softfloat / s_mul128By64To192.cc
diff --git a/softfloat/s_mul128By64To192.cc b/softfloat/s_mul128By64To192.cc
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