[MLton-commit] r5799
Matthew Fluet
fluet at mlton.org
Fri Jul 27 09:54:32 PDT 2007
Don't allow gcc to constant fold floating-point operations
----------------------------------------------------------------------
U mlton/trunk/doc/changelog
U mlton/trunk/mlton/backend/backend.fun
U mlton/trunk/runtime/basis/coerce.c
U mlton/trunk/runtime/basis/coerce.h
U mlton/trunk/runtime/basis-ffi.h
U mlton/trunk/runtime/gen/basis-ffi.def
U mlton/trunk/runtime/gen/basis-ffi.h
----------------------------------------------------------------------
Modified: mlton/trunk/doc/changelog
===================================================================
--- mlton/trunk/doc/changelog 2007-07-27 09:57:16 UTC (rev 5798)
+++ mlton/trunk/doc/changelog 2007-07-27 16:54:29 UTC (rev 5799)
@@ -1,5 +1,9 @@
Here are the changes since version 20051202.
+* 2007-07-27
+ - Fixed bugs in constant-folding of floating-point operations with C
+ codegen.
+
* 2007-07-26
- Fixed bug in treatment of floating-point operations. FP ops
depend on the current rounding mode, but were being treated as
Modified: mlton/trunk/mlton/backend/backend.fun
===================================================================
--- mlton/trunk/mlton/backend/backend.fun 2007-07-27 09:57:16 UTC (rev 5798)
+++ mlton/trunk/mlton/backend/backend.fun 2007-07-27 16:54:29 UTC (rev 5799)
@@ -443,15 +443,11 @@
Type.ofWordXVector v,
v))
end
- fun realOp (r: RealX.t): M.Operand.t =
- if !Control.codegen = Control.CCodegen
- then M.Operand.Real r
- else globalReal r
fun bogusOp (t: Type.t): M.Operand.t =
case Type.deReal t of
NONE => M.Operand.Word (WordX.fromIntInf
(0, WordSize.fromBits (Type.width t)))
- | SOME s => realOp (RealX.zero s)
+ | SOME s => globalReal (RealX.zero s)
fun constOperand (c: Const.t): M.Operand.t =
let
datatype z = datatype Const.t
@@ -462,7 +458,7 @@
NONE => globalIntInf i
| SOME w => M.Operand.Word w)
| Null => M.Operand.Null
- | Real r => realOp r
+ | Real r => globalReal r
| Word w => M.Operand.Word w
| WordVector v => globalVector v
end
Modified: mlton/trunk/runtime/basis/coerce.c
===================================================================
--- mlton/trunk/runtime/basis/coerce.c 2007-07-27 09:57:16 UTC (rev 5798)
+++ mlton/trunk/runtime/basis/coerce.c 2007-07-27 16:54:29 UTC (rev 5799)
@@ -1,3 +1,30 @@
#include "platform.h"
#include "coerce.h"
+
+/* Real coercions depend on rounding mode and can't be inlined where
+ * gcc might constant-fold them.
+ */
+
+#define coerce(n, f, t) \
+ t f##_##n##To##t (f x) { \
+ return (t)x; \
+ }
+#define bothFromWordCoerce(name, from, to) \
+coerce (name, Word##S##from, to) \
+coerce (name, Word##U##from, to)
+
+#define allWordCoerce(size) \
+bothFromWordCoerce(rnd, size, Real32) \
+bothFromWordCoerce(rnd, size, Real64)
+
+allWordCoerce(8)
+allWordCoerce(16)
+allWordCoerce(32)
+allWordCoerce(64)
+
+#undef allWordCoerce
+#undef bothToWordCoerce
+#undef bothFromWordCoerce
+
+#undef coerce
Modified: mlton/trunk/runtime/basis/coerce.h
===================================================================
--- mlton/trunk/runtime/basis/coerce.h 2007-07-27 09:57:16 UTC (rev 5798)
+++ mlton/trunk/runtime/basis/coerce.h 2007-07-27 16:54:29 UTC (rev 5799)
@@ -12,8 +12,6 @@
coerce (name, from, Word##U##to)
#define allWordCoerce(size) \
-bothFromWordCoerce(rnd, size, Real32) \
-bothFromWordCoerce(rnd, size, Real64) \
bothToWordCoerce(rnd, Real32, size) \
bothToWordCoerce(rnd, Real64, size) \
bothFromWordCoerce(extd, size, Word8) \
Modified: mlton/trunk/runtime/basis-ffi.h
===================================================================
--- mlton/trunk/runtime/basis-ffi.h 2007-07-27 09:57:16 UTC (rev 5798)
+++ mlton/trunk/runtime/basis-ffi.h 2007-07-27 16:54:29 UTC (rev 5799)
@@ -995,8 +995,8 @@
MLTON_CODEGEN_STATIC_INLINE Bool_t WordS16_negCheckOverflows(Int16_t);
MLTON_CODEGEN_WORDSQUOTREM(MLTON_CODEGEN_STATIC_INLINE) Int16_t WordS16_quot(Int16_t,Int16_t);
MLTON_CODEGEN_WORDSQUOTREM(MLTON_CODEGEN_STATIC_INLINE) Int16_t WordS16_rem(Int16_t,Int16_t);
-MLTON_CODEGEN_STATIC_INLINE Real32_t WordS16_rndToReal32(Int16_t);
-MLTON_CODEGEN_STATIC_INLINE Real64_t WordS16_rndToReal64(Int16_t);
+Real32_t WordS16_rndToReal32(Int16_t);
+Real64_t WordS16_rndToReal64(Int16_t);
MLTON_CODEGEN_STATIC_INLINE Int16_t WordS16_rshift(Int16_t,Word32_t);
MLTON_CODEGEN_STATIC_INLINE Bool_t WordS16_subCheckOverflows(Int16_t,Int16_t);
MLTON_CODEGEN_STATIC_INLINE Bool_t WordS32_addCheckOverflows(Int32_t,Int32_t);
@@ -1013,8 +1013,8 @@
MLTON_CODEGEN_STATIC_INLINE Bool_t WordS32_negCheckOverflows(Int32_t);
MLTON_CODEGEN_WORDSQUOTREM(MLTON_CODEGEN_STATIC_INLINE) Int32_t WordS32_quot(Int32_t,Int32_t);
MLTON_CODEGEN_WORDSQUOTREM(MLTON_CODEGEN_STATIC_INLINE) Int32_t WordS32_rem(Int32_t,Int32_t);
-MLTON_CODEGEN_STATIC_INLINE Real32_t WordS32_rndToReal32(Int32_t);
-MLTON_CODEGEN_STATIC_INLINE Real64_t WordS32_rndToReal64(Int32_t);
+Real32_t WordS32_rndToReal32(Int32_t);
+Real64_t WordS32_rndToReal64(Int32_t);
MLTON_CODEGEN_STATIC_INLINE Int32_t WordS32_rshift(Int32_t,Word32_t);
MLTON_CODEGEN_STATIC_INLINE Bool_t WordS32_subCheckOverflows(Int32_t,Int32_t);
MLTON_CODEGEN_STATIC_INLINE Bool_t WordS64_addCheckOverflows(Int64_t,Int64_t);
@@ -1031,8 +1031,8 @@
MLTON_CODEGEN_STATIC_INLINE Bool_t WordS64_negCheckOverflows(Int64_t);
MLTON_CODEGEN_WORDSQUOTREM(MLTON_CODEGEN_STATIC_INLINE) Int64_t WordS64_quot(Int64_t,Int64_t);
MLTON_CODEGEN_WORDSQUOTREM(MLTON_CODEGEN_STATIC_INLINE) Int64_t WordS64_rem(Int64_t,Int64_t);
-MLTON_CODEGEN_STATIC_INLINE Real32_t WordS64_rndToReal32(Int64_t);
-MLTON_CODEGEN_STATIC_INLINE Real64_t WordS64_rndToReal64(Int64_t);
+Real32_t WordS64_rndToReal32(Int64_t);
+Real64_t WordS64_rndToReal64(Int64_t);
MLTON_CODEGEN_STATIC_INLINE Int64_t WordS64_rshift(Int64_t,Word32_t);
MLTON_CODEGEN_STATIC_INLINE Bool_t WordS64_subCheckOverflows(Int64_t,Int64_t);
MLTON_CODEGEN_STATIC_INLINE Bool_t WordS8_addCheckOverflows(Int8_t,Int8_t);
@@ -1049,8 +1049,8 @@
MLTON_CODEGEN_STATIC_INLINE Bool_t WordS8_negCheckOverflows(Int8_t);
MLTON_CODEGEN_WORDSQUOTREM(MLTON_CODEGEN_STATIC_INLINE) Int8_t WordS8_quot(Int8_t,Int8_t);
MLTON_CODEGEN_WORDSQUOTREM(MLTON_CODEGEN_STATIC_INLINE) Int8_t WordS8_rem(Int8_t,Int8_t);
-MLTON_CODEGEN_STATIC_INLINE Real32_t WordS8_rndToReal32(Int8_t);
-MLTON_CODEGEN_STATIC_INLINE Real64_t WordS8_rndToReal64(Int8_t);
+Real32_t WordS8_rndToReal32(Int8_t);
+Real64_t WordS8_rndToReal64(Int8_t);
MLTON_CODEGEN_STATIC_INLINE Int8_t WordS8_rshift(Int8_t,Word32_t);
MLTON_CODEGEN_STATIC_INLINE Bool_t WordS8_subCheckOverflows(Int8_t,Int8_t);
MLTON_CODEGEN_STATIC_INLINE Bool_t WordU16_addCheckOverflows(Word16_t,Word16_t);
@@ -1066,8 +1066,8 @@
MLTON_CODEGEN_STATIC_INLINE Bool_t WordU16_mulCheckOverflows(Word16_t,Word16_t);
MLTON_CODEGEN_STATIC_INLINE Word16_t WordU16_quot(Word16_t,Word16_t);
MLTON_CODEGEN_STATIC_INLINE Word16_t WordU16_rem(Word16_t,Word16_t);
-MLTON_CODEGEN_STATIC_INLINE Real32_t WordU16_rndToReal32(Word16_t);
-MLTON_CODEGEN_STATIC_INLINE Real64_t WordU16_rndToReal64(Word16_t);
+Real32_t WordU16_rndToReal32(Word16_t);
+Real64_t WordU16_rndToReal64(Word16_t);
MLTON_CODEGEN_STATIC_INLINE Word16_t WordU16_rshift(Word16_t,Word32_t);
MLTON_CODEGEN_STATIC_INLINE Bool_t WordU32_addCheckOverflows(Word32_t,Word32_t);
MLTON_CODEGEN_STATIC_INLINE Word16_t WordU32_extdToWord16(Word32_t);
@@ -1082,8 +1082,8 @@
MLTON_CODEGEN_STATIC_INLINE Bool_t WordU32_mulCheckOverflows(Word32_t,Word32_t);
MLTON_CODEGEN_STATIC_INLINE Word32_t WordU32_quot(Word32_t,Word32_t);
MLTON_CODEGEN_STATIC_INLINE Word32_t WordU32_rem(Word32_t,Word32_t);
-MLTON_CODEGEN_STATIC_INLINE Real32_t WordU32_rndToReal32(Word32_t);
-MLTON_CODEGEN_STATIC_INLINE Real64_t WordU32_rndToReal64(Word32_t);
+Real32_t WordU32_rndToReal32(Word32_t);
+Real64_t WordU32_rndToReal64(Word32_t);
MLTON_CODEGEN_STATIC_INLINE Word32_t WordU32_rshift(Word32_t,Word32_t);
MLTON_CODEGEN_STATIC_INLINE Bool_t WordU64_addCheckOverflows(Word64_t,Word64_t);
MLTON_CODEGEN_STATIC_INLINE Word16_t WordU64_extdToWord16(Word64_t);
@@ -1098,8 +1098,8 @@
MLTON_CODEGEN_STATIC_INLINE Bool_t WordU64_mulCheckOverflows(Word64_t,Word64_t);
MLTON_CODEGEN_STATIC_INLINE Word64_t WordU64_quot(Word64_t,Word64_t);
MLTON_CODEGEN_STATIC_INLINE Word64_t WordU64_rem(Word64_t,Word64_t);
-MLTON_CODEGEN_STATIC_INLINE Real32_t WordU64_rndToReal32(Word64_t);
-MLTON_CODEGEN_STATIC_INLINE Real64_t WordU64_rndToReal64(Word64_t);
+Real32_t WordU64_rndToReal32(Word64_t);
+Real64_t WordU64_rndToReal64(Word64_t);
MLTON_CODEGEN_STATIC_INLINE Word64_t WordU64_rshift(Word64_t,Word32_t);
MLTON_CODEGEN_STATIC_INLINE Bool_t WordU8_addCheckOverflows(Word8_t,Word8_t);
MLTON_CODEGEN_STATIC_INLINE Word16_t WordU8_extdToWord16(Word8_t);
@@ -1114,8 +1114,8 @@
MLTON_CODEGEN_STATIC_INLINE Bool_t WordU8_mulCheckOverflows(Word8_t,Word8_t);
MLTON_CODEGEN_STATIC_INLINE Word8_t WordU8_quot(Word8_t,Word8_t);
MLTON_CODEGEN_STATIC_INLINE Word8_t WordU8_rem(Word8_t,Word8_t);
-MLTON_CODEGEN_STATIC_INLINE Real32_t WordU8_rndToReal32(Word8_t);
-MLTON_CODEGEN_STATIC_INLINE Real64_t WordU8_rndToReal64(Word8_t);
+Real32_t WordU8_rndToReal32(Word8_t);
+Real64_t WordU8_rndToReal64(Word8_t);
MLTON_CODEGEN_STATIC_INLINE Word8_t WordU8_rshift(Word8_t,Word32_t);
#endif /* _MLTON_BASIS_FFI_H_ */
Modified: mlton/trunk/runtime/gen/basis-ffi.def
===================================================================
--- mlton/trunk/runtime/gen/basis-ffi.def 2007-07-27 09:57:16 UTC (rev 5798)
+++ mlton/trunk/runtime/gen/basis-ffi.def 2007-07-27 16:54:29 UTC (rev 5799)
@@ -992,8 +992,8 @@
WordS16.negCheckOverflows = _import MLTON_CODEGEN_STATIC_INLINE : Int16.t -> Bool.t
WordS16.quot = _import MLTON_CODEGEN_WORDSQUOTREM(MLTON_CODEGEN_STATIC_INLINE) : Int16.t * Int16.t -> Int16.t
WordS16.rem = _import MLTON_CODEGEN_WORDSQUOTREM(MLTON_CODEGEN_STATIC_INLINE) : Int16.t * Int16.t -> Int16.t
-WordS16.rndToReal32 = _import MLTON_CODEGEN_STATIC_INLINE : Int16.t -> Real32.t
-WordS16.rndToReal64 = _import MLTON_CODEGEN_STATIC_INLINE : Int16.t -> Real64.t
+WordS16.rndToReal32 = _import : Int16.t -> Real32.t
+WordS16.rndToReal64 = _import : Int16.t -> Real64.t
WordS16.rshift = _import MLTON_CODEGEN_STATIC_INLINE : Int16.t * Word32.t -> Int16.t
WordS16.subCheckOverflows = _import MLTON_CODEGEN_STATIC_INLINE : Int16.t * Int16.t -> Bool.t
WordS32.addCheckOverflows = _import MLTON_CODEGEN_STATIC_INLINE : Int32.t * Int32.t -> Bool.t
@@ -1010,8 +1010,8 @@
WordS32.negCheckOverflows = _import MLTON_CODEGEN_STATIC_INLINE : Int32.t -> Bool.t
WordS32.quot = _import MLTON_CODEGEN_WORDSQUOTREM(MLTON_CODEGEN_STATIC_INLINE) : Int32.t * Int32.t -> Int32.t
WordS32.rem = _import MLTON_CODEGEN_WORDSQUOTREM(MLTON_CODEGEN_STATIC_INLINE) : Int32.t * Int32.t -> Int32.t
-WordS32.rndToReal32 = _import MLTON_CODEGEN_STATIC_INLINE : Int32.t -> Real32.t
-WordS32.rndToReal64 = _import MLTON_CODEGEN_STATIC_INLINE : Int32.t -> Real64.t
+WordS32.rndToReal32 = _import : Int32.t -> Real32.t
+WordS32.rndToReal64 = _import : Int32.t -> Real64.t
WordS32.rshift = _import MLTON_CODEGEN_STATIC_INLINE : Int32.t * Word32.t -> Int32.t
WordS32.subCheckOverflows = _import MLTON_CODEGEN_STATIC_INLINE : Int32.t * Int32.t -> Bool.t
WordS64.addCheckOverflows = _import MLTON_CODEGEN_STATIC_INLINE : Int64.t * Int64.t -> Bool.t
@@ -1028,8 +1028,8 @@
WordS64.negCheckOverflows = _import MLTON_CODEGEN_STATIC_INLINE : Int64.t -> Bool.t
WordS64.quot = _import MLTON_CODEGEN_WORDSQUOTREM(MLTON_CODEGEN_STATIC_INLINE) : Int64.t * Int64.t -> Int64.t
WordS64.rem = _import MLTON_CODEGEN_WORDSQUOTREM(MLTON_CODEGEN_STATIC_INLINE) : Int64.t * Int64.t -> Int64.t
-WordS64.rndToReal32 = _import MLTON_CODEGEN_STATIC_INLINE : Int64.t -> Real32.t
-WordS64.rndToReal64 = _import MLTON_CODEGEN_STATIC_INLINE : Int64.t -> Real64.t
+WordS64.rndToReal32 = _import : Int64.t -> Real32.t
+WordS64.rndToReal64 = _import : Int64.t -> Real64.t
WordS64.rshift = _import MLTON_CODEGEN_STATIC_INLINE : Int64.t * Word32.t -> Int64.t
WordS64.subCheckOverflows = _import MLTON_CODEGEN_STATIC_INLINE : Int64.t * Int64.t -> Bool.t
WordS8.addCheckOverflows = _import MLTON_CODEGEN_STATIC_INLINE : Int8.t * Int8.t -> Bool.t
@@ -1046,8 +1046,8 @@
WordS8.negCheckOverflows = _import MLTON_CODEGEN_STATIC_INLINE : Int8.t -> Bool.t
WordS8.quot = _import MLTON_CODEGEN_WORDSQUOTREM(MLTON_CODEGEN_STATIC_INLINE) : Int8.t * Int8.t -> Int8.t
WordS8.rem = _import MLTON_CODEGEN_WORDSQUOTREM(MLTON_CODEGEN_STATIC_INLINE) : Int8.t * Int8.t -> Int8.t
-WordS8.rndToReal32 = _import MLTON_CODEGEN_STATIC_INLINE : Int8.t -> Real32.t
-WordS8.rndToReal64 = _import MLTON_CODEGEN_STATIC_INLINE : Int8.t -> Real64.t
+WordS8.rndToReal32 = _import : Int8.t -> Real32.t
+WordS8.rndToReal64 = _import : Int8.t -> Real64.t
WordS8.rshift = _import MLTON_CODEGEN_STATIC_INLINE : Int8.t * Word32.t -> Int8.t
WordS8.subCheckOverflows = _import MLTON_CODEGEN_STATIC_INLINE : Int8.t * Int8.t -> Bool.t
WordU16.addCheckOverflows = _import MLTON_CODEGEN_STATIC_INLINE : Word16.t * Word16.t -> Bool.t
@@ -1063,8 +1063,8 @@
WordU16.mulCheckOverflows = _import MLTON_CODEGEN_STATIC_INLINE : Word16.t * Word16.t -> Bool.t
WordU16.quot = _import MLTON_CODEGEN_STATIC_INLINE : Word16.t * Word16.t -> Word16.t
WordU16.rem = _import MLTON_CODEGEN_STATIC_INLINE : Word16.t * Word16.t -> Word16.t
-WordU16.rndToReal32 = _import MLTON_CODEGEN_STATIC_INLINE : Word16.t -> Real32.t
-WordU16.rndToReal64 = _import MLTON_CODEGEN_STATIC_INLINE : Word16.t -> Real64.t
+WordU16.rndToReal32 = _import : Word16.t -> Real32.t
+WordU16.rndToReal64 = _import : Word16.t -> Real64.t
WordU16.rshift = _import MLTON_CODEGEN_STATIC_INLINE : Word16.t * Word32.t -> Word16.t
WordU32.addCheckOverflows = _import MLTON_CODEGEN_STATIC_INLINE : Word32.t * Word32.t -> Bool.t
WordU32.extdToWord16 = _import MLTON_CODEGEN_STATIC_INLINE : Word32.t -> Word16.t
@@ -1079,8 +1079,8 @@
WordU32.mulCheckOverflows = _import MLTON_CODEGEN_STATIC_INLINE : Word32.t * Word32.t -> Bool.t
WordU32.quot = _import MLTON_CODEGEN_STATIC_INLINE : Word32.t * Word32.t -> Word32.t
WordU32.rem = _import MLTON_CODEGEN_STATIC_INLINE : Word32.t * Word32.t -> Word32.t
-WordU32.rndToReal32 = _import MLTON_CODEGEN_STATIC_INLINE : Word32.t -> Real32.t
-WordU32.rndToReal64 = _import MLTON_CODEGEN_STATIC_INLINE : Word32.t -> Real64.t
+WordU32.rndToReal32 = _import : Word32.t -> Real32.t
+WordU32.rndToReal64 = _import : Word32.t -> Real64.t
WordU32.rshift = _import MLTON_CODEGEN_STATIC_INLINE : Word32.t * Word32.t -> Word32.t
WordU64.addCheckOverflows = _import MLTON_CODEGEN_STATIC_INLINE : Word64.t * Word64.t -> Bool.t
WordU64.extdToWord16 = _import MLTON_CODEGEN_STATIC_INLINE : Word64.t -> Word16.t
@@ -1095,8 +1095,8 @@
WordU64.mulCheckOverflows = _import MLTON_CODEGEN_STATIC_INLINE : Word64.t * Word64.t -> Bool.t
WordU64.quot = _import MLTON_CODEGEN_STATIC_INLINE : Word64.t * Word64.t -> Word64.t
WordU64.rem = _import MLTON_CODEGEN_STATIC_INLINE : Word64.t * Word64.t -> Word64.t
-WordU64.rndToReal32 = _import MLTON_CODEGEN_STATIC_INLINE : Word64.t -> Real32.t
-WordU64.rndToReal64 = _import MLTON_CODEGEN_STATIC_INLINE : Word64.t -> Real64.t
+WordU64.rndToReal32 = _import : Word64.t -> Real32.t
+WordU64.rndToReal64 = _import : Word64.t -> Real64.t
WordU64.rshift = _import MLTON_CODEGEN_STATIC_INLINE : Word64.t * Word32.t -> Word64.t
WordU8.addCheckOverflows = _import MLTON_CODEGEN_STATIC_INLINE : Word8.t * Word8.t -> Bool.t
WordU8.extdToWord16 = _import MLTON_CODEGEN_STATIC_INLINE : Word8.t -> Word16.t
@@ -1111,6 +1111,6 @@
WordU8.mulCheckOverflows = _import MLTON_CODEGEN_STATIC_INLINE : Word8.t * Word8.t -> Bool.t
WordU8.quot = _import MLTON_CODEGEN_STATIC_INLINE : Word8.t * Word8.t -> Word8.t
WordU8.rem = _import MLTON_CODEGEN_STATIC_INLINE : Word8.t * Word8.t -> Word8.t
-WordU8.rndToReal32 = _import MLTON_CODEGEN_STATIC_INLINE : Word8.t -> Real32.t
-WordU8.rndToReal64 = _import MLTON_CODEGEN_STATIC_INLINE : Word8.t -> Real64.t
+WordU8.rndToReal32 = _import : Word8.t -> Real32.t
+WordU8.rndToReal64 = _import : Word8.t -> Real64.t
WordU8.rshift = _import MLTON_CODEGEN_STATIC_INLINE : Word8.t * Word32.t -> Word8.t
Modified: mlton/trunk/runtime/gen/basis-ffi.h
===================================================================
--- mlton/trunk/runtime/gen/basis-ffi.h 2007-07-27 09:57:16 UTC (rev 5798)
+++ mlton/trunk/runtime/gen/basis-ffi.h 2007-07-27 16:54:29 UTC (rev 5799)
@@ -995,8 +995,8 @@
MLTON_CODEGEN_STATIC_INLINE Bool_t WordS16_negCheckOverflows(Int16_t);
MLTON_CODEGEN_WORDSQUOTREM(MLTON_CODEGEN_STATIC_INLINE) Int16_t WordS16_quot(Int16_t,Int16_t);
MLTON_CODEGEN_WORDSQUOTREM(MLTON_CODEGEN_STATIC_INLINE) Int16_t WordS16_rem(Int16_t,Int16_t);
-MLTON_CODEGEN_STATIC_INLINE Real32_t WordS16_rndToReal32(Int16_t);
-MLTON_CODEGEN_STATIC_INLINE Real64_t WordS16_rndToReal64(Int16_t);
+Real32_t WordS16_rndToReal32(Int16_t);
+Real64_t WordS16_rndToReal64(Int16_t);
MLTON_CODEGEN_STATIC_INLINE Int16_t WordS16_rshift(Int16_t,Word32_t);
MLTON_CODEGEN_STATIC_INLINE Bool_t WordS16_subCheckOverflows(Int16_t,Int16_t);
MLTON_CODEGEN_STATIC_INLINE Bool_t WordS32_addCheckOverflows(Int32_t,Int32_t);
@@ -1013,8 +1013,8 @@
MLTON_CODEGEN_STATIC_INLINE Bool_t WordS32_negCheckOverflows(Int32_t);
MLTON_CODEGEN_WORDSQUOTREM(MLTON_CODEGEN_STATIC_INLINE) Int32_t WordS32_quot(Int32_t,Int32_t);
MLTON_CODEGEN_WORDSQUOTREM(MLTON_CODEGEN_STATIC_INLINE) Int32_t WordS32_rem(Int32_t,Int32_t);
-MLTON_CODEGEN_STATIC_INLINE Real32_t WordS32_rndToReal32(Int32_t);
-MLTON_CODEGEN_STATIC_INLINE Real64_t WordS32_rndToReal64(Int32_t);
+Real32_t WordS32_rndToReal32(Int32_t);
+Real64_t WordS32_rndToReal64(Int32_t);
MLTON_CODEGEN_STATIC_INLINE Int32_t WordS32_rshift(Int32_t,Word32_t);
MLTON_CODEGEN_STATIC_INLINE Bool_t WordS32_subCheckOverflows(Int32_t,Int32_t);
MLTON_CODEGEN_STATIC_INLINE Bool_t WordS64_addCheckOverflows(Int64_t,Int64_t);
@@ -1031,8 +1031,8 @@
MLTON_CODEGEN_STATIC_INLINE Bool_t WordS64_negCheckOverflows(Int64_t);
MLTON_CODEGEN_WORDSQUOTREM(MLTON_CODEGEN_STATIC_INLINE) Int64_t WordS64_quot(Int64_t,Int64_t);
MLTON_CODEGEN_WORDSQUOTREM(MLTON_CODEGEN_STATIC_INLINE) Int64_t WordS64_rem(Int64_t,Int64_t);
-MLTON_CODEGEN_STATIC_INLINE Real32_t WordS64_rndToReal32(Int64_t);
-MLTON_CODEGEN_STATIC_INLINE Real64_t WordS64_rndToReal64(Int64_t);
+Real32_t WordS64_rndToReal32(Int64_t);
+Real64_t WordS64_rndToReal64(Int64_t);
MLTON_CODEGEN_STATIC_INLINE Int64_t WordS64_rshift(Int64_t,Word32_t);
MLTON_CODEGEN_STATIC_INLINE Bool_t WordS64_subCheckOverflows(Int64_t,Int64_t);
MLTON_CODEGEN_STATIC_INLINE Bool_t WordS8_addCheckOverflows(Int8_t,Int8_t);
@@ -1049,8 +1049,8 @@
MLTON_CODEGEN_STATIC_INLINE Bool_t WordS8_negCheckOverflows(Int8_t);
MLTON_CODEGEN_WORDSQUOTREM(MLTON_CODEGEN_STATIC_INLINE) Int8_t WordS8_quot(Int8_t,Int8_t);
MLTON_CODEGEN_WORDSQUOTREM(MLTON_CODEGEN_STATIC_INLINE) Int8_t WordS8_rem(Int8_t,Int8_t);
-MLTON_CODEGEN_STATIC_INLINE Real32_t WordS8_rndToReal32(Int8_t);
-MLTON_CODEGEN_STATIC_INLINE Real64_t WordS8_rndToReal64(Int8_t);
+Real32_t WordS8_rndToReal32(Int8_t);
+Real64_t WordS8_rndToReal64(Int8_t);
MLTON_CODEGEN_STATIC_INLINE Int8_t WordS8_rshift(Int8_t,Word32_t);
MLTON_CODEGEN_STATIC_INLINE Bool_t WordS8_subCheckOverflows(Int8_t,Int8_t);
MLTON_CODEGEN_STATIC_INLINE Bool_t WordU16_addCheckOverflows(Word16_t,Word16_t);
@@ -1066,8 +1066,8 @@
MLTON_CODEGEN_STATIC_INLINE Bool_t WordU16_mulCheckOverflows(Word16_t,Word16_t);
MLTON_CODEGEN_STATIC_INLINE Word16_t WordU16_quot(Word16_t,Word16_t);
MLTON_CODEGEN_STATIC_INLINE Word16_t WordU16_rem(Word16_t,Word16_t);
-MLTON_CODEGEN_STATIC_INLINE Real32_t WordU16_rndToReal32(Word16_t);
-MLTON_CODEGEN_STATIC_INLINE Real64_t WordU16_rndToReal64(Word16_t);
+Real32_t WordU16_rndToReal32(Word16_t);
+Real64_t WordU16_rndToReal64(Word16_t);
MLTON_CODEGEN_STATIC_INLINE Word16_t WordU16_rshift(Word16_t,Word32_t);
MLTON_CODEGEN_STATIC_INLINE Bool_t WordU32_addCheckOverflows(Word32_t,Word32_t);
MLTON_CODEGEN_STATIC_INLINE Word16_t WordU32_extdToWord16(Word32_t);
@@ -1082,8 +1082,8 @@
MLTON_CODEGEN_STATIC_INLINE Bool_t WordU32_mulCheckOverflows(Word32_t,Word32_t);
MLTON_CODEGEN_STATIC_INLINE Word32_t WordU32_quot(Word32_t,Word32_t);
MLTON_CODEGEN_STATIC_INLINE Word32_t WordU32_rem(Word32_t,Word32_t);
-MLTON_CODEGEN_STATIC_INLINE Real32_t WordU32_rndToReal32(Word32_t);
-MLTON_CODEGEN_STATIC_INLINE Real64_t WordU32_rndToReal64(Word32_t);
+Real32_t WordU32_rndToReal32(Word32_t);
+Real64_t WordU32_rndToReal64(Word32_t);
MLTON_CODEGEN_STATIC_INLINE Word32_t WordU32_rshift(Word32_t,Word32_t);
MLTON_CODEGEN_STATIC_INLINE Bool_t WordU64_addCheckOverflows(Word64_t,Word64_t);
MLTON_CODEGEN_STATIC_INLINE Word16_t WordU64_extdToWord16(Word64_t);
@@ -1098,8 +1098,8 @@
MLTON_CODEGEN_STATIC_INLINE Bool_t WordU64_mulCheckOverflows(Word64_t,Word64_t);
MLTON_CODEGEN_STATIC_INLINE Word64_t WordU64_quot(Word64_t,Word64_t);
MLTON_CODEGEN_STATIC_INLINE Word64_t WordU64_rem(Word64_t,Word64_t);
-MLTON_CODEGEN_STATIC_INLINE Real32_t WordU64_rndToReal32(Word64_t);
-MLTON_CODEGEN_STATIC_INLINE Real64_t WordU64_rndToReal64(Word64_t);
+Real32_t WordU64_rndToReal32(Word64_t);
+Real64_t WordU64_rndToReal64(Word64_t);
MLTON_CODEGEN_STATIC_INLINE Word64_t WordU64_rshift(Word64_t,Word32_t);
MLTON_CODEGEN_STATIC_INLINE Bool_t WordU8_addCheckOverflows(Word8_t,Word8_t);
MLTON_CODEGEN_STATIC_INLINE Word16_t WordU8_extdToWord16(Word8_t);
@@ -1114,8 +1114,8 @@
MLTON_CODEGEN_STATIC_INLINE Bool_t WordU8_mulCheckOverflows(Word8_t,Word8_t);
MLTON_CODEGEN_STATIC_INLINE Word8_t WordU8_quot(Word8_t,Word8_t);
MLTON_CODEGEN_STATIC_INLINE Word8_t WordU8_rem(Word8_t,Word8_t);
-MLTON_CODEGEN_STATIC_INLINE Real32_t WordU8_rndToReal32(Word8_t);
-MLTON_CODEGEN_STATIC_INLINE Real64_t WordU8_rndToReal64(Word8_t);
+Real32_t WordU8_rndToReal32(Word8_t);
+Real64_t WordU8_rndToReal64(Word8_t);
MLTON_CODEGEN_STATIC_INLINE Word8_t WordU8_rshift(Word8_t,Word32_t);
#endif /* _MLTON_BASIS_FFI_H_ */
More information about the MLton-commit
mailing list