[MLton-commit] r5519

Matthew Fluet fluet at mlton.org
Thu Apr 12 19:14:42 PDT 2007


Added primitives for bit cast of word to/from real
----------------------------------------------------------------------

U   mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/mlton.sig
U   mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/mlton.sml
U   mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/basis-ffi.sml
D   mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/check-pack-real.sml
U   mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-char.sml
U   mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-int.sml
U   mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-iwconv.sml
U   mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-mlton.sml
U   mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-pack-real.sml
U   mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-real.sml
U   mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-word.sml
U   mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/primitive.mlb
U   mlton/branches/on-20050822-x86_64-branch/basis-library/real/pack-real.sml
U   mlton/branches/on-20050822-x86_64-branch/mlton/atoms/hash-type.fun
U   mlton/branches/on-20050822-x86_64-branch/mlton/atoms/prim.fun
U   mlton/branches/on-20050822-x86_64-branch/mlton/atoms/prim.sig
U   mlton/branches/on-20050822-x86_64-branch/mlton/backend/packed-representation.fun
U   mlton/branches/on-20050822-x86_64-branch/mlton/backend/rssa.fun
U   mlton/branches/on-20050822-x86_64-branch/mlton/backend/ssa-to-rssa.fun
U   mlton/branches/on-20050822-x86_64-branch/mlton/codegen/c-codegen/c-codegen.fun
U   mlton/branches/on-20050822-x86_64-branch/mlton/codegen/x86-codegen/x86-mlton.fun
U   mlton/branches/on-20050822-x86_64-branch/mlton/defunctorize/defunctorize.fun
U   mlton/branches/on-20050822-x86_64-branch/mlton/ssa/ssa-tree2.fun
D   mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/PackReal.c
U   mlton/branches/on-20050822-x86_64-branch/runtime/basis/coerce.h
U   mlton/branches/on-20050822-x86_64-branch/runtime/basis-ffi.h
U   mlton/branches/on-20050822-x86_64-branch/runtime/gen/basis-ffi.def
U   mlton/branches/on-20050822-x86_64-branch/runtime/gen/basis-ffi.h
U   mlton/branches/on-20050822-x86_64-branch/runtime/gen/basis-ffi.sml

----------------------------------------------------------------------

Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/mlton.sig
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/mlton.sig	2007-04-11 21:24:58 UTC (rev 5518)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/mlton.sig	2007-04-13 02:14:36 UTC (rev 5519)
@@ -50,6 +50,9 @@
       structure Weak: MLTON_WEAK
       structure Word: MLTON_WORD
       structure Word8: MLTON_WORD
+      structure Word16: MLTON_WORD
+      structure Word32: MLTON_WORD
+      structure Word64: MLTON_WORD
       structure Word8Array: MLTON_MONO_ARRAY
       structure Word8Vector: MLTON_MONO_VECTOR
       structure World: MLTON_WORLD

Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/mlton.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/mlton.sml	2007-04-11 21:24:58 UTC (rev 5518)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/mlton.sml	2007-04-13 02:14:36 UTC (rev 5519)
@@ -80,6 +80,21 @@
       open Word8
       type t = word
    end
+structure Word16 =
+   struct
+      open Word16
+      type t = word
+   end
+structure Word32 =
+   struct
+      open Word32
+      type t = word
+   end
+structure Word64 =
+   struct
+      open Word64
+      type t = word
+   end
 
 structure Word8Array = struct
    open Word8Array

Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/basis-ffi.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/basis-ffi.sml	2007-04-11 21:24:58 UTC (rev 5518)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/basis-ffi.sml	2007-04-13 02:14:36 UTC (rev 5519)
@@ -209,24 +209,6 @@
 val POLLPRI = _const "OS_IO_POLLPRI" : C_Short.t;
 end
 end
-structure PackReal32 = 
-struct
-val subArr = _import "PackReal32_subArr" : (Word8.t) array * C_Ptrdiff.t -> Real32.t;
-val subArrRev = _import "PackReal32_subArrRev" : (Word8.t) array * C_Ptrdiff.t -> Real32.t;
-val subVec = _import "PackReal32_subVec" : (Word8.t) vector * C_Ptrdiff.t -> Real32.t;
-val subVecRev = _import "PackReal32_subVecRev" : (Word8.t) vector * C_Ptrdiff.t -> Real32.t;
-val update = _import "PackReal32_update" : (Word8.t) array * C_Ptrdiff.t * Real32.t -> unit;
-val updateRev = _import "PackReal32_updateRev" : (Word8.t) array * C_Ptrdiff.t * Real32.t -> unit;
-end
-structure PackReal64 = 
-struct
-val subArr = _import "PackReal64_subArr" : (Word8.t) array * C_Ptrdiff.t -> Real64.t;
-val subArrRev = _import "PackReal64_subArrRev" : (Word8.t) array * C_Ptrdiff.t -> Real64.t;
-val subVec = _import "PackReal64_subVec" : (Word8.t) vector * C_Ptrdiff.t -> Real64.t;
-val subVecRev = _import "PackReal64_subVecRev" : (Word8.t) vector * C_Ptrdiff.t -> Real64.t;
-val update = _import "PackReal64_update" : (Word8.t) array * C_Ptrdiff.t * Real64.t -> unit;
-val updateRev = _import "PackReal64_updateRev" : (Word8.t) array * C_Ptrdiff.t * Real64.t -> unit;
-end
 structure Posix = 
 struct
 structure Error = 
@@ -922,6 +904,7 @@
 type t = Real32.t
 val abs = _import "Real32_abs" : Real32.t -> Real32.t;
 val add = _import "Real32_add" : Real32.t * Real32.t -> Real32.t;
+val castToWord32 = _import "Real32_castToWord32" : Real32.t -> Word32.t;
 val class = _import "Real32_class" : Real32.t -> C_Int.t;
 val div = _import "Real32_div" : Real32.t * Real32.t -> Real32.t;
 val equal = _import "Real32_equal" : Real32.t * Real32.t -> Bool.t;
@@ -962,27 +945,28 @@
 val neg = _import "Real32_neg" : Real32.t -> Real32.t;
 val nextAfterDown = _import "Real32_nextAfterDown" : Real32.t -> Real32.t;
 val nextAfterUp = _import "Real32_nextAfterUp" : Real32.t -> Real32.t;
+val rndToReal32 = _import "Real32_rndToReal32" : Real32.t -> Real32.t;
+val rndToReal64 = _import "Real32_rndToReal64" : Real32.t -> Real64.t;
+val rndToWordS16 = _import "Real32_rndToWordS16" : Real32.t -> Int16.t;
+val rndToWordS32 = _import "Real32_rndToWordS32" : Real32.t -> Int32.t;
+val rndToWordS64 = _import "Real32_rndToWordS64" : Real32.t -> Int64.t;
+val rndToWordS8 = _import "Real32_rndToWordS8" : Real32.t -> Int8.t;
+val rndToWordU16 = _import "Real32_rndToWordU16" : Real32.t -> Word16.t;
+val rndToWordU32 = _import "Real32_rndToWordU32" : Real32.t -> Word32.t;
+val rndToWordU64 = _import "Real32_rndToWordU64" : Real32.t -> Word64.t;
+val rndToWordU8 = _import "Real32_rndToWordU8" : Real32.t -> Word8.t;
 val round = _import "Real32_round" : Real32.t -> Real32.t;
 val signBit = _import "Real32_signBit" : Real32.t -> C_Int.t;
 val store = _import "Real32_store" : (Real32.t) ref * Real32.t -> unit;
 val strto = _import "Real32_strto" : NullString8.t -> Real32.t;
 val sub = _import "Real32_sub" : Real32.t * Real32.t -> Real32.t;
-val toReal32 = _import "Real32_toReal32" : Real32.t -> Real32.t;
-val toReal64 = _import "Real32_toReal64" : Real32.t -> Real64.t;
-val toWordS16 = _import "Real32_toWordS16" : Real32.t -> Int16.t;
-val toWordS32 = _import "Real32_toWordS32" : Real32.t -> Int32.t;
-val toWordS64 = _import "Real32_toWordS64" : Real32.t -> Int64.t;
-val toWordS8 = _import "Real32_toWordS8" : Real32.t -> Int8.t;
-val toWordU16 = _import "Real32_toWordU16" : Real32.t -> Word16.t;
-val toWordU32 = _import "Real32_toWordU32" : Real32.t -> Word32.t;
-val toWordU64 = _import "Real32_toWordU64" : Real32.t -> Word64.t;
-val toWordU8 = _import "Real32_toWordU8" : Real32.t -> Word8.t;
 end
 structure Real64 = 
 struct
 type t = Real64.t
 val abs = _import "Real64_abs" : Real64.t -> Real64.t;
 val add = _import "Real64_add" : Real64.t * Real64.t -> Real64.t;
+val castToWord64 = _import "Real64_castToWord64" : Real64.t -> Word64.t;
 val class = _import "Real64_class" : Real64.t -> C_Int.t;
 val div = _import "Real64_div" : Real64.t * Real64.t -> Real64.t;
 val equal = _import "Real64_equal" : Real64.t * Real64.t -> Bool.t;
@@ -1023,21 +1007,21 @@
 val neg = _import "Real64_neg" : Real64.t -> Real64.t;
 val nextAfterDown = _import "Real64_nextAfterDown" : Real64.t -> Real64.t;
 val nextAfterUp = _import "Real64_nextAfterUp" : Real64.t -> Real64.t;
+val rndToReal32 = _import "Real64_rndToReal32" : Real64.t -> Real32.t;
+val rndToReal64 = _import "Real64_rndToReal64" : Real64.t -> Real64.t;
+val rndToWordS16 = _import "Real64_rndToWordS16" : Real64.t -> Int16.t;
+val rndToWordS32 = _import "Real64_rndToWordS32" : Real64.t -> Int32.t;
+val rndToWordS64 = _import "Real64_rndToWordS64" : Real64.t -> Int64.t;
+val rndToWordS8 = _import "Real64_rndToWordS8" : Real64.t -> Int8.t;
+val rndToWordU16 = _import "Real64_rndToWordU16" : Real64.t -> Word16.t;
+val rndToWordU32 = _import "Real64_rndToWordU32" : Real64.t -> Word32.t;
+val rndToWordU64 = _import "Real64_rndToWordU64" : Real64.t -> Word64.t;
+val rndToWordU8 = _import "Real64_rndToWordU8" : Real64.t -> Word8.t;
 val round = _import "Real64_round" : Real64.t -> Real64.t;
 val signBit = _import "Real64_signBit" : Real64.t -> C_Int.t;
 val store = _import "Real64_store" : (Real64.t) ref * Real64.t -> unit;
 val strto = _import "Real64_strto" : NullString8.t -> Real64.t;
 val sub = _import "Real64_sub" : Real64.t * Real64.t -> Real64.t;
-val toReal32 = _import "Real64_toReal32" : Real64.t -> Real32.t;
-val toReal64 = _import "Real64_toReal64" : Real64.t -> Real64.t;
-val toWordS16 = _import "Real64_toWordS16" : Real64.t -> Int16.t;
-val toWordS32 = _import "Real64_toWordS32" : Real64.t -> Int32.t;
-val toWordS64 = _import "Real64_toWordS64" : Real64.t -> Int64.t;
-val toWordS8 = _import "Real64_toWordS8" : Real64.t -> Int8.t;
-val toWordU16 = _import "Real64_toWordU16" : Real64.t -> Word16.t;
-val toWordU32 = _import "Real64_toWordU32" : Real64.t -> Word32.t;
-val toWordU64 = _import "Real64_toWordU64" : Real64.t -> Word64.t;
-val toWordU8 = _import "Real64_toWordU8" : Real64.t -> Word8.t;
 end
 structure Socket = 
 struct
@@ -1178,6 +1162,7 @@
 type t = Word32.t
 val add = _import "Word32_add" : Word32.t * Word32.t -> Word32.t;
 val andb = _import "Word32_andb" : Word32.t * Word32.t -> Word32.t;
+val castToReal32 = _import "Word32_castToReal32" : Word32.t -> Real32.t;
 val equal = _import "Word32_equal" : Word32.t * Word32.t -> Bool.t;
 val lshift = _import "Word32_lshift" : Word32.t * Word32.t -> Word32.t;
 val neg = _import "Word32_neg" : Word32.t -> Word32.t;
@@ -1193,6 +1178,7 @@
 type t = Word64.t
 val add = _import "Word64_add" : Word64.t * Word64.t -> Word64.t;
 val andb = _import "Word64_andb" : Word64.t * Word64.t -> Word64.t;
+val castToReal64 = _import "Word64_castToReal64" : Word64.t -> Real64.t;
 val equal = _import "Word64_equal" : Word64.t * Word64.t -> Bool.t;
 val fetch = _import "Word64_fetch" : (Word64.t) ref -> Word64.t;
 val lshift = _import "Word64_lshift" : Word64.t * Word32.t -> Word64.t;
@@ -1224,6 +1210,10 @@
 structure WordS16 = 
 struct
 val addCheckOverflows = _import "WordS16_addCheckOverflows" : Int16.t * Int16.t -> Bool.t;
+val extdToWord16 = _import "WordS16_extdToWord16" : Int16.t -> Word16.t;
+val extdToWord32 = _import "WordS16_extdToWord32" : Int16.t -> Word32.t;
+val extdToWord64 = _import "WordS16_extdToWord64" : Int16.t -> Word64.t;
+val extdToWord8 = _import "WordS16_extdToWord8" : Int16.t -> Word8.t;
 val ge = _import "WordS16_ge" : Int16.t * Int16.t -> Bool.t;
 val gt = _import "WordS16_gt" : Int16.t * Int16.t -> Bool.t;
 val le = _import "WordS16_le" : Int16.t * Int16.t -> Bool.t;
@@ -1233,18 +1223,18 @@
 val negCheckOverflows = _import "WordS16_negCheckOverflows" : Int16.t -> Bool.t;
 val quot = _import "WordS16_quot" : Int16.t * Int16.t -> Int16.t;
 val rem = _import "WordS16_rem" : Int16.t * Int16.t -> Int16.t;
+val rndToReal32 = _import "WordS16_rndToReal32" : Int16.t -> Real32.t;
+val rndToReal64 = _import "WordS16_rndToReal64" : Int16.t -> Real64.t;
 val rshift = _import "WordS16_rshift" : Int16.t * Word32.t -> Int16.t;
 val subCheckOverflows = _import "WordS16_subCheckOverflows" : Int16.t * Int16.t -> Bool.t;
-val toReal32 = _import "WordS16_toReal32" : Int16.t -> Real32.t;
-val toReal64 = _import "WordS16_toReal64" : Int16.t -> Real64.t;
-val toWord16 = _import "WordS16_toWord16" : Int16.t -> Word16.t;
-val toWord32 = _import "WordS16_toWord32" : Int16.t -> Word32.t;
-val toWord64 = _import "WordS16_toWord64" : Int16.t -> Word64.t;
-val toWord8 = _import "WordS16_toWord8" : Int16.t -> Word8.t;
 end
 structure WordS32 = 
 struct
 val addCheckOverflows = _import "WordS32_addCheckOverflows" : Int32.t * Int32.t -> Bool.t;
+val extdToWord16 = _import "WordS32_extdToWord16" : Int32.t -> Word16.t;
+val extdToWord32 = _import "WordS32_extdToWord32" : Int32.t -> Word32.t;
+val extdToWord64 = _import "WordS32_extdToWord64" : Int32.t -> Word64.t;
+val extdToWord8 = _import "WordS32_extdToWord8" : Int32.t -> Word8.t;
 val ge = _import "WordS32_ge" : Int32.t * Int32.t -> Bool.t;
 val gt = _import "WordS32_gt" : Int32.t * Int32.t -> Bool.t;
 val le = _import "WordS32_le" : Int32.t * Int32.t -> Bool.t;
@@ -1254,18 +1244,18 @@
 val negCheckOverflows = _import "WordS32_negCheckOverflows" : Int32.t -> Bool.t;
 val quot = _import "WordS32_quot" : Int32.t * Int32.t -> Int32.t;
 val rem = _import "WordS32_rem" : Int32.t * Int32.t -> Int32.t;
+val rndToReal32 = _import "WordS32_rndToReal32" : Int32.t -> Real32.t;
+val rndToReal64 = _import "WordS32_rndToReal64" : Int32.t -> Real64.t;
 val rshift = _import "WordS32_rshift" : Int32.t * Word32.t -> Int32.t;
 val subCheckOverflows = _import "WordS32_subCheckOverflows" : Int32.t * Int32.t -> Bool.t;
-val toReal32 = _import "WordS32_toReal32" : Int32.t -> Real32.t;
-val toReal64 = _import "WordS32_toReal64" : Int32.t -> Real64.t;
-val toWord16 = _import "WordS32_toWord16" : Int32.t -> Word16.t;
-val toWord32 = _import "WordS32_toWord32" : Int32.t -> Word32.t;
-val toWord64 = _import "WordS32_toWord64" : Int32.t -> Word64.t;
-val toWord8 = _import "WordS32_toWord8" : Int32.t -> Word8.t;
 end
 structure WordS64 = 
 struct
 val addCheckOverflows = _import "WordS64_addCheckOverflows" : Int64.t * Int64.t -> Bool.t;
+val extdToWord16 = _import "WordS64_extdToWord16" : Int64.t -> Word16.t;
+val extdToWord32 = _import "WordS64_extdToWord32" : Int64.t -> Word32.t;
+val extdToWord64 = _import "WordS64_extdToWord64" : Int64.t -> Word64.t;
+val extdToWord8 = _import "WordS64_extdToWord8" : Int64.t -> Word8.t;
 val ge = _import "WordS64_ge" : Int64.t * Int64.t -> Bool.t;
 val gt = _import "WordS64_gt" : Int64.t * Int64.t -> Bool.t;
 val le = _import "WordS64_le" : Int64.t * Int64.t -> Bool.t;
@@ -1275,18 +1265,18 @@
 val negCheckOverflows = _import "WordS64_negCheckOverflows" : Int64.t -> Bool.t;
 val quot = _import "WordS64_quot" : Int64.t * Int64.t -> Int64.t;
 val rem = _import "WordS64_rem" : Int64.t * Int64.t -> Int64.t;
+val rndToReal32 = _import "WordS64_rndToReal32" : Int64.t -> Real32.t;
+val rndToReal64 = _import "WordS64_rndToReal64" : Int64.t -> Real64.t;
 val rshift = _import "WordS64_rshift" : Int64.t * Word32.t -> Int64.t;
 val subCheckOverflows = _import "WordS64_subCheckOverflows" : Int64.t * Int64.t -> Bool.t;
-val toReal32 = _import "WordS64_toReal32" : Int64.t -> Real32.t;
-val toReal64 = _import "WordS64_toReal64" : Int64.t -> Real64.t;
-val toWord16 = _import "WordS64_toWord16" : Int64.t -> Word16.t;
-val toWord32 = _import "WordS64_toWord32" : Int64.t -> Word32.t;
-val toWord64 = _import "WordS64_toWord64" : Int64.t -> Word64.t;
-val toWord8 = _import "WordS64_toWord8" : Int64.t -> Word8.t;
 end
 structure WordS8 = 
 struct
 val addCheckOverflows = _import "WordS8_addCheckOverflows" : Int8.t * Int8.t -> Bool.t;
+val extdToWord16 = _import "WordS8_extdToWord16" : Int8.t -> Word16.t;
+val extdToWord32 = _import "WordS8_extdToWord32" : Int8.t -> Word32.t;
+val extdToWord64 = _import "WordS8_extdToWord64" : Int8.t -> Word64.t;
+val extdToWord8 = _import "WordS8_extdToWord8" : Int8.t -> Word8.t;
 val ge = _import "WordS8_ge" : Int8.t * Int8.t -> Bool.t;
 val gt = _import "WordS8_gt" : Int8.t * Int8.t -> Bool.t;
 val le = _import "WordS8_le" : Int8.t * Int8.t -> Bool.t;
@@ -1296,18 +1286,18 @@
 val negCheckOverflows = _import "WordS8_negCheckOverflows" : Int8.t -> Bool.t;
 val quot = _import "WordS8_quot" : Int8.t * Int8.t -> Int8.t;
 val rem = _import "WordS8_rem" : Int8.t * Int8.t -> Int8.t;
+val rndToReal32 = _import "WordS8_rndToReal32" : Int8.t -> Real32.t;
+val rndToReal64 = _import "WordS8_rndToReal64" : Int8.t -> Real64.t;
 val rshift = _import "WordS8_rshift" : Int8.t * Word32.t -> Int8.t;
 val subCheckOverflows = _import "WordS8_subCheckOverflows" : Int8.t * Int8.t -> Bool.t;
-val toReal32 = _import "WordS8_toReal32" : Int8.t -> Real32.t;
-val toReal64 = _import "WordS8_toReal64" : Int8.t -> Real64.t;
-val toWord16 = _import "WordS8_toWord16" : Int8.t -> Word16.t;
-val toWord32 = _import "WordS8_toWord32" : Int8.t -> Word32.t;
-val toWord64 = _import "WordS8_toWord64" : Int8.t -> Word64.t;
-val toWord8 = _import "WordS8_toWord8" : Int8.t -> Word8.t;
 end
 structure WordU16 = 
 struct
 val addCheckOverflows = _import "WordU16_addCheckOverflows" : Word16.t * Word16.t -> Bool.t;
+val extdToWord16 = _import "WordU16_extdToWord16" : Word16.t -> Word16.t;
+val extdToWord32 = _import "WordU16_extdToWord32" : Word16.t -> Word32.t;
+val extdToWord64 = _import "WordU16_extdToWord64" : Word16.t -> Word64.t;
+val extdToWord8 = _import "WordU16_extdToWord8" : Word16.t -> Word8.t;
 val ge = _import "WordU16_ge" : Word16.t * Word16.t -> Bool.t;
 val gt = _import "WordU16_gt" : Word16.t * Word16.t -> Bool.t;
 val le = _import "WordU16_le" : Word16.t * Word16.t -> Bool.t;
@@ -1316,17 +1306,17 @@
 val mulCheckOverflows = _import "WordU16_mulCheckOverflows" : Word16.t * Word16.t -> Bool.t;
 val quot = _import "WordU16_quot" : Word16.t * Word16.t -> Word16.t;
 val rem = _import "WordU16_rem" : Word16.t * Word16.t -> Word16.t;
+val rndToReal32 = _import "WordU16_rndToReal32" : Word16.t -> Real32.t;
+val rndToReal64 = _import "WordU16_rndToReal64" : Word16.t -> Real64.t;
 val rshift = _import "WordU16_rshift" : Word16.t * Word32.t -> Word16.t;
-val toReal32 = _import "WordU16_toReal32" : Word16.t -> Real32.t;
-val toReal64 = _import "WordU16_toReal64" : Word16.t -> Real64.t;
-val toWord16 = _import "WordU16_toWord16" : Word16.t -> Word16.t;
-val toWord32 = _import "WordU16_toWord32" : Word16.t -> Word32.t;
-val toWord64 = _import "WordU16_toWord64" : Word16.t -> Word64.t;
-val toWord8 = _import "WordU16_toWord8" : Word16.t -> Word8.t;
 end
 structure WordU32 = 
 struct
 val addCheckOverflows = _import "WordU32_addCheckOverflows" : Word32.t * Word32.t -> Bool.t;
+val extdToWord16 = _import "WordU32_extdToWord16" : Word32.t -> Word16.t;
+val extdToWord32 = _import "WordU32_extdToWord32" : Word32.t -> Word32.t;
+val extdToWord64 = _import "WordU32_extdToWord64" : Word32.t -> Word64.t;
+val extdToWord8 = _import "WordU32_extdToWord8" : Word32.t -> Word8.t;
 val ge = _import "WordU32_ge" : Word32.t * Word32.t -> Bool.t;
 val gt = _import "WordU32_gt" : Word32.t * Word32.t -> Bool.t;
 val le = _import "WordU32_le" : Word32.t * Word32.t -> Bool.t;
@@ -1335,17 +1325,17 @@
 val mulCheckOverflows = _import "WordU32_mulCheckOverflows" : Word32.t * Word32.t -> Bool.t;
 val quot = _import "WordU32_quot" : Word32.t * Word32.t -> Word32.t;
 val rem = _import "WordU32_rem" : Word32.t * Word32.t -> Word32.t;
+val rndToReal32 = _import "WordU32_rndToReal32" : Word32.t -> Real32.t;
+val rndToReal64 = _import "WordU32_rndToReal64" : Word32.t -> Real64.t;
 val rshift = _import "WordU32_rshift" : Word32.t * Word32.t -> Word32.t;
-val toReal32 = _import "WordU32_toReal32" : Word32.t -> Real32.t;
-val toReal64 = _import "WordU32_toReal64" : Word32.t -> Real64.t;
-val toWord16 = _import "WordU32_toWord16" : Word32.t -> Word16.t;
-val toWord32 = _import "WordU32_toWord32" : Word32.t -> Word32.t;
-val toWord64 = _import "WordU32_toWord64" : Word32.t -> Word64.t;
-val toWord8 = _import "WordU32_toWord8" : Word32.t -> Word8.t;
 end
 structure WordU64 = 
 struct
 val addCheckOverflows = _import "WordU64_addCheckOverflows" : Word64.t * Word64.t -> Bool.t;
+val extdToWord16 = _import "WordU64_extdToWord16" : Word64.t -> Word16.t;
+val extdToWord32 = _import "WordU64_extdToWord32" : Word64.t -> Word32.t;
+val extdToWord64 = _import "WordU64_extdToWord64" : Word64.t -> Word64.t;
+val extdToWord8 = _import "WordU64_extdToWord8" : Word64.t -> Word8.t;
 val ge = _import "WordU64_ge" : Word64.t * Word64.t -> Bool.t;
 val gt = _import "WordU64_gt" : Word64.t * Word64.t -> Bool.t;
 val le = _import "WordU64_le" : Word64.t * Word64.t -> Bool.t;
@@ -1354,17 +1344,17 @@
 val mulCheckOverflows = _import "WordU64_mulCheckOverflows" : Word64.t * Word64.t -> Bool.t;
 val quot = _import "WordU64_quot" : Word64.t * Word64.t -> Word64.t;
 val rem = _import "WordU64_rem" : Word64.t * Word64.t -> Word64.t;
+val rndToReal32 = _import "WordU64_rndToReal32" : Word64.t -> Real32.t;
+val rndToReal64 = _import "WordU64_rndToReal64" : Word64.t -> Real64.t;
 val rshift = _import "WordU64_rshift" : Word64.t * Word32.t -> Word64.t;
-val toReal32 = _import "WordU64_toReal32" : Word64.t -> Real32.t;
-val toReal64 = _import "WordU64_toReal64" : Word64.t -> Real64.t;
-val toWord16 = _import "WordU64_toWord16" : Word64.t -> Word16.t;
-val toWord32 = _import "WordU64_toWord32" : Word64.t -> Word32.t;
-val toWord64 = _import "WordU64_toWord64" : Word64.t -> Word64.t;
-val toWord8 = _import "WordU64_toWord8" : Word64.t -> Word8.t;
 end
 structure WordU8 = 
 struct
 val addCheckOverflows = _import "WordU8_addCheckOverflows" : Word8.t * Word8.t -> Bool.t;
+val extdToWord16 = _import "WordU8_extdToWord16" : Word8.t -> Word16.t;
+val extdToWord32 = _import "WordU8_extdToWord32" : Word8.t -> Word32.t;
+val extdToWord64 = _import "WordU8_extdToWord64" : Word8.t -> Word64.t;
+val extdToWord8 = _import "WordU8_extdToWord8" : Word8.t -> Word8.t;
 val ge = _import "WordU8_ge" : Word8.t * Word8.t -> Bool.t;
 val gt = _import "WordU8_gt" : Word8.t * Word8.t -> Bool.t;
 val le = _import "WordU8_le" : Word8.t * Word8.t -> Bool.t;
@@ -1373,13 +1363,9 @@
 val mulCheckOverflows = _import "WordU8_mulCheckOverflows" : Word8.t * Word8.t -> Bool.t;
 val quot = _import "WordU8_quot" : Word8.t * Word8.t -> Word8.t;
 val rem = _import "WordU8_rem" : Word8.t * Word8.t -> Word8.t;
+val rndToReal32 = _import "WordU8_rndToReal32" : Word8.t -> Real32.t;
+val rndToReal64 = _import "WordU8_rndToReal64" : Word8.t -> Real64.t;
 val rshift = _import "WordU8_rshift" : Word8.t * Word32.t -> Word8.t;
-val toReal32 = _import "WordU8_toReal32" : Word8.t -> Real32.t;
-val toReal64 = _import "WordU8_toReal64" : Word8.t -> Real64.t;
-val toWord16 = _import "WordU8_toWord16" : Word8.t -> Word16.t;
-val toWord32 = _import "WordU8_toWord32" : Word8.t -> Word32.t;
-val toWord64 = _import "WordU8_toWord64" : Word8.t -> Word64.t;
-val toWord8 = _import "WordU8_toWord8" : Word8.t -> Word8.t;
 end
 end
 end

Deleted: mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/check-pack-real.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/check-pack-real.sml	2007-04-11 21:24:58 UTC (rev 5518)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/check-pack-real.sml	2007-04-13 02:14:36 UTC (rev 5519)
@@ -1,37 +0,0 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
- *    Jagannathan, and Stephen Weeks.
- * Copyright (C) 1997-2000 NEC Research Institute.
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-local
-   fun 'a check (x: 'a, y: 'a) : unit = ()
-
-   local
-      structure PR1 = Primitive.PackReal32
-      structure PR2 = PrimitiveFFI.PackReal32
-   in
-      val () = check (PR1.subArr, PR2.subArr)
-      val () = check (PR1.subArrRev, PR2.subArrRev)
-      val () = check (PR1.subVec, PR2.subVec)
-      val () = check (PR1.subVecRev, PR2.subVecRev)
-      val () = check (PR1.update, PR2.update)
-      val () = check (PR1.updateRev, PR2.updateRev)
-   end
-
-   local
-      structure PR1 = Primitive.PackReal64
-      structure PR2 = PrimitiveFFI.PackReal64
-   in
-      val () = check (PR1.subArr, PR2.subArr)
-      val () = check (PR1.subArrRev, PR2.subArrRev)
-      val () = check (PR1.subVec, PR2.subVec)
-      val () = check (PR1.subVecRev, PR2.subVecRev)
-      val () = check (PR1.update, PR2.update)
-      val () = check (PR1.updateRev, PR2.updateRev)
-   end
-in
-
-end

Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-char.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-char.sml	2007-04-11 21:24:58 UTC (rev 5518)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-char.sml	2007-04-13 02:14:36 UTC (rev 5519)
@@ -18,10 +18,10 @@
 
       val < = _prim "WordU8_lt": char * char -> bool;
 
-      val idToWord8 = _prim "WordU8_toWord8": char -> Word8.word;
-      val idFromWord8 = _prim "WordU8_toWord8": Word8.word -> char;
-      val idToInt8 = _prim "WordS8_toWord8": char -> Int8.int;
-      val idFromInt8 = _prim "WordS8_toWord8": Int8.int -> char;
+      val idToWord8 = _prim "WordU8_extdToWord8": char -> Word8.word;
+      val idFromWord8 = _prim "WordU8_extdToWord8": Word8.word -> char;
+      val idToInt8 = _prim "WordS8_extdToWord8": char -> Int8.int;
+      val idFromInt8 = _prim "WordS8_extdToWord8": Int8.int -> char;
    end
 structure Char8 = 
    struct
@@ -39,10 +39,10 @@
 
       val < = _prim "WordU16_lt": char * char -> bool;
 
-      val idToWord16 = _prim "WordU16_toWord16": char -> Word16.word;
-      val idFromWord16 = _prim "WordU16_toWord16": Word16.word -> char;
-      val idToInt16 = _prim "WordS16_toWord16": char -> Int16.int;
-      val idFromInt16 = _prim "WordS16_toWord16": Int16.int -> char;
+      val idToWord16 = _prim "WordU16_extdToWord16": char -> Word16.word;
+      val idFromWord16 = _prim "WordU16_extdToWord16": Word16.word -> char;
+      val idToInt16 = _prim "WordS16_extdToWord16": char -> Int16.int;
+      val idFromInt16 = _prim "WordS16_extdToWord16": Int16.int -> char;
    end
 structure Char16 = 
    struct
@@ -60,10 +60,10 @@
 
       val < = _prim "WordU32_lt": char * char -> bool;
 
-      val idToWord32 = _prim "WordU32_toWord32": char -> Word32.word;
-      val idFromWord32 = _prim "WordU32_toWord32": Word32.word -> char;
-      val idToInt32 = _prim "WordS32_toWord32": char -> Int32.int;
-      val idFromInt32 = _prim "WordS32_toWord32": Int32.int -> char;
+      val idToWord32 = _prim "WordU32_extdToWord32": char -> Word32.word;
+      val idFromWord32 = _prim "WordU32_extdToWord32": Word32.word -> char;
+      val idToInt32 = _prim "WordS32_extdToWord32": char -> Int32.int;
+      val idFromInt32 = _prim "WordS32_extdToWord32": Int32.int -> char;
    end
 structure Char32 = 
    struct

Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-int.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-int.sml	2007-04-11 21:24:58 UTC (rev 5518)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-int.sml	2007-04-13 02:14:36 UTC (rev 5519)
@@ -45,57 +45,57 @@
    struct
       open Int1
       type big = Int8.int
-      val fromBigUnsafe = _prim "WordU8_toWord1": big -> int;
+      val fromBigUnsafe = _prim "WordU8_extdToWord1": big -> int;
       val sizeInBits: Int32.int = 1
-      val toBig = _prim "WordU1_toWord8": int -> big;
+      val toBig = _prim "WordU1_extdToWord8": int -> big;
    end
 structure Int2 =
    struct
       open Int2
       type big = Int8.int
-      val fromBigUnsafe = _prim "WordU8_toWord2": big -> int;
+      val fromBigUnsafe = _prim "WordU8_extdToWord2": big -> int;
       val sizeInBits: Int32.int = 2
-      val toBig = _prim "WordU2_toWord8": int -> big;
+      val toBig = _prim "WordU2_extdToWord8": int -> big;
    end
 structure Int3 =
    struct
       open Int3
       type big = Int8.int
-      val fromBigUnsafe = _prim "WordU8_toWord3": big -> int;
+      val fromBigUnsafe = _prim "WordU8_extdToWord3": big -> int;
       val sizeInBits: Int32.int = 3
-      val toBig = _prim "WordU3_toWord8": int -> big;
+      val toBig = _prim "WordU3_extdToWord8": int -> big;
    end
 structure Int4 =
    struct
       open Int4
       type big = Int8.int
-      val fromBigUnsafe = _prim "WordU8_toWord4": big -> int;
+      val fromBigUnsafe = _prim "WordU8_extdToWord4": big -> int;
       val sizeInBits: Int32.int = 4
-      val toBig = _prim "WordU4_toWord8": int -> big;
+      val toBig = _prim "WordU4_extdToWord8": int -> big;
    end
 structure Int5 =
    struct
       open Int5
       type big = Int8.int
-      val fromBigUnsafe = _prim "WordU8_toWord5": big -> int;
+      val fromBigUnsafe = _prim "WordU8_extdToWord5": big -> int;
       val sizeInBits: Int32.int = 5
-      val toBig = _prim "WordU5_toWord8": int -> big;
+      val toBig = _prim "WordU5_extdToWord8": int -> big;
    end
 structure Int6 =
    struct
       open Int6
       type big = Int8.int
-      val fromBigUnsafe = _prim "WordU8_toWord6": big -> int;
+      val fromBigUnsafe = _prim "WordU8_extdToWord6": big -> int;
       val sizeInBits: Int32.int = 6
-      val toBig = _prim "WordU6_toWord8": int -> big;
+      val toBig = _prim "WordU6_extdToWord8": int -> big;
    end
 structure Int7 =
    struct
       open Int7
       type big = Int8.int
-      val fromBigUnsafe = _prim "WordU8_toWord7": big -> int;
+      val fromBigUnsafe = _prim "WordU8_extdToWord7": big -> int;
       val sizeInBits: Int32.int = 7
-      val toBig = _prim "WordU7_toWord8": int -> big;
+      val toBig = _prim "WordU7_extdToWord8": int -> big;
    end
 structure Int8 =
    struct
@@ -144,57 +144,57 @@
    struct
       open Int9
       type big = Int16.int
-      val fromBigUnsafe = _prim "WordU16_toWord9": big -> int;
+      val fromBigUnsafe = _prim "WordU16_extdToWord9": big -> int;
       val sizeInBits: Int32.int = 9
-      val toBig = _prim "WordU9_toWord16": int -> big;
+      val toBig = _prim "WordU9_extdToWord16": int -> big;
    end
 structure Int10 =
    struct
       open Int10
       type big = Int16.int
-      val fromBigUnsafe = _prim "WordU16_toWord10": big -> int;
+      val fromBigUnsafe = _prim "WordU16_extdToWord10": big -> int;
       val sizeInBits: Int32.int = 10
-      val toBig = _prim "WordU10_toWord16": int -> big;
+      val toBig = _prim "WordU10_extdToWord16": int -> big;
    end
 structure Int11 =
    struct
       open Int11
       type big = Int16.int
-      val fromBigUnsafe = _prim "WordU16_toWord11": big -> int;
+      val fromBigUnsafe = _prim "WordU16_extdToWord11": big -> int;
       val sizeInBits: Int32.int = 11
-      val toBig = _prim "WordU11_toWord16": int -> big;
+      val toBig = _prim "WordU11_extdToWord16": int -> big;
    end
 structure Int12 =
    struct
       open Int12
       type big = Int16.int
-      val fromBigUnsafe = _prim "WordU16_toWord12": big -> int;
+      val fromBigUnsafe = _prim "WordU16_extdToWord12": big -> int;
       val sizeInBits: Int32.int = 12
-      val toBig = _prim "WordU12_toWord16": int -> big;
+      val toBig = _prim "WordU12_extdToWord16": int -> big;
    end
 structure Int13 =
    struct
       open Int13
       type big = Int16.int
-      val fromBigUnsafe = _prim "WordU16_toWord13": big -> int;
+      val fromBigUnsafe = _prim "WordU16_extdToWord13": big -> int;
       val sizeInBits: Int32.int = 13
-      val toBig = _prim "WordU13_toWord16": int -> big;
+      val toBig = _prim "WordU13_extdToWord16": int -> big;
    end
 structure Int14 =
    struct
       open Int14
       type big = Int16.int
-      val fromBigUnsafe = _prim "WordU16_toWord14": big -> int;
+      val fromBigUnsafe = _prim "WordU16_extdToWord14": big -> int;
       val sizeInBits: Int32.int = 14
-      val toBig = _prim "WordU14_toWord16": int -> big;
+      val toBig = _prim "WordU14_extdToWord16": int -> big;
    end
 structure Int15 =
    struct
       open Int15
       type big = Int16.int
-      val fromBigUnsafe = _prim "WordU16_toWord15": big -> int;
+      val fromBigUnsafe = _prim "WordU16_extdToWord15": big -> int;
       val sizeInBits: Int32.int = 15
-      val toBig = _prim "WordU15_toWord16": int -> big;
+      val toBig = _prim "WordU15_extdToWord16": int -> big;
    end
 structure Int16 =
    struct
@@ -243,121 +243,121 @@
    struct
       open Int17
       type big = Int32.int
-      val fromBigUnsafe = _prim "WordU32_toWord17": big -> int;
+      val fromBigUnsafe = _prim "WordU32_extdToWord17": big -> int;
       val sizeInBits: Int32.int = 17
-      val toBig = _prim "WordU17_toWord32": int -> big;
+      val toBig = _prim "WordU17_extdToWord32": int -> big;
    end
 structure Int18 =
    struct
       open Int18
       type big = Int32.int
-      val fromBigUnsafe = _prim "WordU32_toWord18": big -> int;
+      val fromBigUnsafe = _prim "WordU32_extdToWord18": big -> int;
       val sizeInBits: Int32.int = 18
-      val toBig = _prim "WordU18_toWord32": int -> big;
+      val toBig = _prim "WordU18_extdToWord32": int -> big;
    end
 structure Int19 =
    struct
       open Int19
       type big = Int32.int
-      val fromBigUnsafe = _prim "WordU32_toWord19": big -> int;
+      val fromBigUnsafe = _prim "WordU32_extdToWord19": big -> int;
       val sizeInBits: Int32.int = 19
-      val toBig = _prim "WordU19_toWord32": int -> big;
+      val toBig = _prim "WordU19_extdToWord32": int -> big;
    end
 structure Int20 =
    struct
       open Int20
       type big = Int32.int
-      val fromBigUnsafe = _prim "WordU32_toWord20": big -> int;
+      val fromBigUnsafe = _prim "WordU32_extdToWord20": big -> int;
       val sizeInBits: Int32.int = 20
-      val toBig = _prim "WordU20_toWord32": int -> big;
+      val toBig = _prim "WordU20_extdToWord32": int -> big;
    end
 structure Int21 =
    struct
       open Int21
       type big = Int32.int
-      val fromBigUnsafe = _prim "WordU32_toWord21": big -> int;
+      val fromBigUnsafe = _prim "WordU32_extdToWord21": big -> int;
       val sizeInBits: Int32.int = 21
-      val toBig = _prim "WordU21_toWord32": int -> big;
+      val toBig = _prim "WordU21_extdToWord32": int -> big;
    end
 structure Int22 =
    struct
       open Int22
       type big = Int32.int
-      val fromBigUnsafe = _prim "WordU32_toWord22": big -> int;
+      val fromBigUnsafe = _prim "WordU32_extdToWord22": big -> int;
       val sizeInBits: Int32.int = 22
-      val toBig = _prim "WordU22_toWord32": int -> big;
+      val toBig = _prim "WordU22_extdToWord32": int -> big;
    end
 structure Int23 =
    struct
       open Int23
       type big = Int32.int
-      val fromBigUnsafe = _prim "WordU32_toWord23": big -> int;
+      val fromBigUnsafe = _prim "WordU32_extdToWord23": big -> int;
       val sizeInBits: Int32.int = 23
-      val toBig = _prim "WordU23_toWord32": int -> big;
+      val toBig = _prim "WordU23_extdToWord32": int -> big;
    end
 structure Int24 =
    struct
       open Int24
       type big = Int32.int
-      val fromBigUnsafe = _prim "WordU32_toWord24": big -> int;
+      val fromBigUnsafe = _prim "WordU32_extdToWord24": big -> int;
       val sizeInBits: Int32.int = 24
-      val toBig = _prim "WordU24_toWord32": int -> big;
+      val toBig = _prim "WordU24_extdToWord32": int -> big;
    end
 structure Int25 =
    struct
       open Int25
       type big = Int32.int
-      val fromBigUnsafe = _prim "WordU32_toWord25": big -> int;
+      val fromBigUnsafe = _prim "WordU32_extdToWord25": big -> int;
       val sizeInBits: Int32.int = 25
-      val toBig = _prim "WordU25_toWord32": int -> big;
+      val toBig = _prim "WordU25_extdToWord32": int -> big;
    end
 structure Int26 =
    struct
       open Int26
       type big = Int32.int
-      val fromBigUnsafe = _prim "WordU32_toWord26": big -> int;
+      val fromBigUnsafe = _prim "WordU32_extdToWord26": big -> int;
       val sizeInBits: Int32.int = 26
-      val toBig = _prim "WordU26_toWord32": int -> big;
+      val toBig = _prim "WordU26_extdToWord32": int -> big;
    end
 structure Int27 =
    struct
       open Int27
       type big = Int32.int
-      val fromBigUnsafe = _prim "WordU32_toWord27": big -> int;
+      val fromBigUnsafe = _prim "WordU32_extdToWord27": big -> int;
       val sizeInBits: Int32.int = 27
-      val toBig = _prim "WordU27_toWord32": int -> big;
+      val toBig = _prim "WordU27_extdToWord32": int -> big;
    end
 structure Int28 =
    struct
       open Int28
       type big = Int32.int
-      val fromBigUnsafe = _prim "WordU32_toWord28": big -> int;
+      val fromBigUnsafe = _prim "WordU32_extdToWord28": big -> int;
       val sizeInBits: Int32.int = 28
-      val toBig = _prim "WordU28_toWord32": int -> big;
+      val toBig = _prim "WordU28_extdToWord32": int -> big;
    end
 structure Int29 =
    struct
       open Int29
       type big = Int32.int
-      val fromBigUnsafe = _prim "WordU32_toWord29": big -> int;
+      val fromBigUnsafe = _prim "WordU32_extdToWord29": big -> int;
       val sizeInBits: Int32.int = 29
-      val toBig = _prim "WordU29_toWord32": int -> big;
+      val toBig = _prim "WordU29_extdToWord32": int -> big;
    end
 structure Int30 =
    struct
       open Int30
       type big = Int32.int
-      val fromBigUnsafe = _prim "WordU32_toWord30": big -> int;
+      val fromBigUnsafe = _prim "WordU32_extdToWord30": big -> int;
       val sizeInBits: Int32.int = 30
-      val toBig = _prim "WordU30_toWord32": int -> big;
+      val toBig = _prim "WordU30_extdToWord32": int -> big;
    end
 structure Int31 =
    struct
       open Int31
       type big = Int32.int
-      val fromBigUnsafe = _prim "WordU32_toWord31": big -> int;
+      val fromBigUnsafe = _prim "WordU32_extdToWord31": big -> int;
       val sizeInBits: Int32.int = 31
-      val toBig = _prim "WordU31_toWord32": int -> big;
+      val toBig = _prim "WordU31_extdToWord32": int -> big;
    end
 structure Int32 =
    struct

Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-iwconv.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-iwconv.sml	2007-04-11 21:24:58 UTC (rev 5518)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-iwconv.sml	2007-04-13 02:14:36 UTC (rev 5519)
@@ -183,311 +183,311 @@
    struct
       (* identity *)
       val idFromInt8ToInt8 =
-         _prim "WordU8_toWord8": Int8.int -> Int8.int;
+         _prim "WordU8_extdToWord8": Int8.int -> Int8.int;
       val idFromInt8ToWord8 =
-         _prim "WordU8_toWord8": Int8.int -> Word8.word;
+         _prim "WordU8_extdToWord8": Int8.int -> Word8.word;
       val idFromInt16ToInt16 =
-         _prim "WordU16_toWord16": Int16.int -> Int16.int;
+         _prim "WordU16_extdToWord16": Int16.int -> Int16.int;
       val idFromInt16ToWord16 =
-         _prim "WordU16_toWord16": Int16.int -> Word16.word;
+         _prim "WordU16_extdToWord16": Int16.int -> Word16.word;
       val idFromInt32ToInt32 =
-         _prim "WordU32_toWord32": Int32.int -> Int32.int;
+         _prim "WordU32_extdToWord32": Int32.int -> Int32.int;
       val idFromInt32ToWord32 =
-         _prim "WordU32_toWord32": Int32.int -> Word32.word;
+         _prim "WordU32_extdToWord32": Int32.int -> Word32.word;
       val idFromInt64ToInt64 =
-         _prim "WordU64_toWord64": Int64.int -> Int64.int;
+         _prim "WordU64_extdToWord64": Int64.int -> Int64.int;
       val idFromInt64ToWord64 =
-         _prim "WordU64_toWord64": Int64.int -> Word64.word;
+         _prim "WordU64_extdToWord64": Int64.int -> Word64.word;
       val idFromWord8ToInt8 =
-         _prim "WordU8_toWord8": Word8.word -> Int8.int;
+         _prim "WordU8_extdToWord8": Word8.word -> Int8.int;
       val idFromWord8ToWord8 =
-         _prim "WordU8_toWord8": Word8.word -> Word8.word;
+         _prim "WordU8_extdToWord8": Word8.word -> Word8.word;
       val idFromWord16ToInt16 =
-         _prim "WordU16_toWord16": Word16.word -> Int16.int;
+         _prim "WordU16_extdToWord16": Word16.word -> Int16.int;
       val idFromWord16ToWord16 =
-         _prim "WordU16_toWord16": Word16.word -> Word16.word;
+         _prim "WordU16_extdToWord16": Word16.word -> Word16.word;
       val idFromWord32ToInt32 =
-         _prim "WordU32_toWord32": Word32.word -> Int32.int;
+         _prim "WordU32_extdToWord32": Word32.word -> Int32.int;
       val idFromWord32ToWord32 =
-         _prim "WordU32_toWord32": Word32.word -> Word32.word;
+         _prim "WordU32_extdToWord32": Word32.word -> Word32.word;
       val idFromWord64ToInt64 =
-         _prim "WordU64_toWord64": Word64.word -> Int64.int;
+         _prim "WordU64_extdToWord64": Word64.word -> Int64.int;
       val idFromWord64ToWord64 =
-         _prim "WordU64_toWord64": Word64.word -> Word64.word;
+         _prim "WordU64_extdToWord64": Word64.word -> Word64.word;
 
       (* zero-extend or low-bits *)
       val zextdFromInt8ToInt8 =
-         _prim "WordU8_toWord8": Int8.int -> Int8.int;
+         _prim "WordU8_extdToWord8": Int8.int -> Int8.int;
       val zextdFromInt8ToInt16 =
-         _prim "WordU8_toWord16": Int8.int -> Int16.int;
+         _prim "WordU8_extdToWord16": Int8.int -> Int16.int;
       val zextdFromInt8ToInt32 =
-         _prim "WordU8_toWord32": Int8.int -> Int32.int;
+         _prim "WordU8_extdToWord32": Int8.int -> Int32.int;
       val zextdFromInt8ToInt64 =
-         _prim "WordU8_toWord64": Int8.int -> Int64.int;
+         _prim "WordU8_extdToWord64": Int8.int -> Int64.int;
       val zextdFromInt8ToWord8 =
-         _prim "WordU8_toWord8": Int8.int -> Word8.word;
+         _prim "WordU8_extdToWord8": Int8.int -> Word8.word;
       val zextdFromInt8ToWord16 =
-         _prim "WordU8_toWord16": Int8.int -> Word16.word;
+         _prim "WordU8_extdToWord16": Int8.int -> Word16.word;
       val zextdFromInt8ToWord32 =
-         _prim "WordU8_toWord32": Int8.int -> Word32.word;
+         _prim "WordU8_extdToWord32": Int8.int -> Word32.word;
       val zextdFromInt8ToWord64 =
-         _prim "WordU8_toWord64": Int8.int -> Word64.word;
+         _prim "WordU8_extdToWord64": Int8.int -> Word64.word;
 
       val zextdFromInt16ToInt8 =
-         _prim "WordU16_toWord8": Int16.int -> Int8.int;
+         _prim "WordU16_extdToWord8": Int16.int -> Int8.int;
       val zextdFromInt16ToInt16 =
-         _prim "WordU16_toWord16": Int16.int -> Int16.int;
+         _prim "WordU16_extdToWord16": Int16.int -> Int16.int;
       val zextdFromInt16ToInt32 =
-         _prim "WordU16_toWord32": Int16.int -> Int32.int;
+         _prim "WordU16_extdToWord32": Int16.int -> Int32.int;
       val zextdFromInt16ToInt64 =
-         _prim "WordU16_toWord64": Int16.int -> Int64.int;
+         _prim "WordU16_extdToWord64": Int16.int -> Int64.int;
       val zextdFromInt16ToWord8 =
-         _prim "WordU16_toWord8": Int16.int -> Word8.word;
+         _prim "WordU16_extdToWord8": Int16.int -> Word8.word;
       val zextdFromInt16ToWord16 =
-         _prim "WordU16_toWord16": Int16.int -> Word16.word;
+         _prim "WordU16_extdToWord16": Int16.int -> Word16.word;
       val zextdFromInt16ToWord32 =
-         _prim "WordU16_toWord32": Int16.int -> Word32.word;
+         _prim "WordU16_extdToWord32": Int16.int -> Word32.word;
       val zextdFromInt16ToWord64 =
-         _prim "WordU16_toWord64": Int16.int -> Word64.word;
+         _prim "WordU16_extdToWord64": Int16.int -> Word64.word;
 
       val zextdFromInt32ToInt8 =
-         _prim "WordU32_toWord8": Int32.int -> Int8.int;
+         _prim "WordU32_extdToWord8": Int32.int -> Int8.int;
       val zextdFromInt32ToInt16 =
-         _prim "WordU32_toWord16": Int32.int -> Int16.int;
+         _prim "WordU32_extdToWord16": Int32.int -> Int16.int;
       val zextdFromInt32ToInt32 =
-         _prim "WordU32_toWord32": Int32.int -> Int32.int;
+         _prim "WordU32_extdToWord32": Int32.int -> Int32.int;
       val zextdFromInt32ToInt64 =
-         _prim "WordU32_toWord64": Int32.int -> Int64.int;
+         _prim "WordU32_extdToWord64": Int32.int -> Int64.int;
       val zextdFromInt32ToWord8 =
-         _prim "WordU32_toWord8": Int32.int -> Word8.word;
+         _prim "WordU32_extdToWord8": Int32.int -> Word8.word;
       val zextdFromInt32ToWord16 =
-         _prim "WordU32_toWord16": Int32.int -> Word16.word;
+         _prim "WordU32_extdToWord16": Int32.int -> Word16.word;
       val zextdFromInt32ToWord32 =
-         _prim "WordU32_toWord32": Int32.int -> Word32.word;
+         _prim "WordU32_extdToWord32": Int32.int -> Word32.word;
       val zextdFromInt32ToWord64 =
-         _prim "WordU32_toWord64": Int32.int -> Word64.word;
+         _prim "WordU32_extdToWord64": Int32.int -> Word64.word;
 
       val zextdFromInt64ToInt8 =
-         _prim "WordU64_toWord8": Int64.int -> Int8.int;
+         _prim "WordU64_extdToWord8": Int64.int -> Int8.int;
       val zextdFromInt64ToInt16 =
-         _prim "WordU64_toWord16": Int64.int -> Int16.int;
+         _prim "WordU64_extdToWord16": Int64.int -> Int16.int;
       val zextdFromInt64ToInt32 =
-         _prim "WordU64_toWord32": Int64.int -> Int32.int;
+         _prim "WordU64_extdToWord32": Int64.int -> Int32.int;
       val zextdFromInt64ToInt64 =
-         _prim "WordU64_toWord64": Int64.int -> Int64.int;
+         _prim "WordU64_extdToWord64": Int64.int -> Int64.int;
       val zextdFromInt64ToWord8 =
-         _prim "WordU64_toWord8": Int64.int -> Word8.word;
+         _prim "WordU64_extdToWord8": Int64.int -> Word8.word;
       val zextdFromInt64ToWord16 =
-         _prim "WordU64_toWord16": Int64.int -> Word16.word;
+         _prim "WordU64_extdToWord16": Int64.int -> Word16.word;
       val zextdFromInt64ToWord32 =
-         _prim "WordU64_toWord32": Int64.int -> Word32.word;
+         _prim "WordU64_extdToWord32": Int64.int -> Word32.word;
       val zextdFromInt64ToWord64 =
-         _prim "WordU64_toWord64": Int64.int -> Word64.word;
+         _prim "WordU64_extdToWord64": Int64.int -> Word64.word;
 
       val zextdFromWord8ToInt8 =
-         _prim "WordU8_toWord8": Word8.word -> Int8.int;
+         _prim "WordU8_extdToWord8": Word8.word -> Int8.int;
       val zextdFromWord8ToInt16 =
-         _prim "WordU8_toWord16": Word8.word -> Int16.int;
+         _prim "WordU8_extdToWord16": Word8.word -> Int16.int;
       val zextdFromWord8ToInt32 =
-         _prim "WordU8_toWord32": Word8.word -> Int32.int;
+         _prim "WordU8_extdToWord32": Word8.word -> Int32.int;
       val zextdFromWord8ToInt64 =
-         _prim "WordU8_toWord64": Word8.word -> Int64.int;
+         _prim "WordU8_extdToWord64": Word8.word -> Int64.int;
       val zextdFromWord8ToWord8 =
-         _prim "WordU8_toWord8": Word8.word -> Word8.word;
+         _prim "WordU8_extdToWord8": Word8.word -> Word8.word;
       val zextdFromWord8ToWord16 =
-         _prim "WordU8_toWord16": Word8.word -> Word16.word;
+         _prim "WordU8_extdToWord16": Word8.word -> Word16.word;
       val zextdFromWord8ToWord32 =
-         _prim "WordU8_toWord32": Word8.word -> Word32.word;
+         _prim "WordU8_extdToWord32": Word8.word -> Word32.word;
       val zextdFromWord8ToWord64 =
-         _prim "WordU8_toWord64": Word8.word -> Word64.word;
+         _prim "WordU8_extdToWord64": Word8.word -> Word64.word;
 
       val zextdFromWord16ToInt8 =
-         _prim "WordU16_toWord8": Word16.word -> Int8.int;
+         _prim "WordU16_extdToWord8": Word16.word -> Int8.int;
       val zextdFromWord16ToInt16 =
-         _prim "WordU16_toWord16": Word16.word -> Int16.int;
+         _prim "WordU16_extdToWord16": Word16.word -> Int16.int;
       val zextdFromWord16ToInt32 =
-         _prim "WordU16_toWord32": Word16.word -> Int32.int;
+         _prim "WordU16_extdToWord32": Word16.word -> Int32.int;
       val zextdFromWord16ToInt64 =
-         _prim "WordU16_toWord64": Word16.word -> Int64.int;
+         _prim "WordU16_extdToWord64": Word16.word -> Int64.int;
       val zextdFromWord16ToWord8 =
-         _prim "WordU16_toWord8": Word16.word -> Word8.word;
+         _prim "WordU16_extdToWord8": Word16.word -> Word8.word;
       val zextdFromWord16ToWord16 =
-         _prim "WordU16_toWord16": Word16.word -> Word16.word;
+         _prim "WordU16_extdToWord16": Word16.word -> Word16.word;
       val zextdFromWord16ToWord32 =
-         _prim "WordU16_toWord32": Word16.word -> Word32.word;
+         _prim "WordU16_extdToWord32": Word16.word -> Word32.word;
       val zextdFromWord16ToWord64 =
-         _prim "WordU16_toWord64": Word16.word -> Word64.word;
+         _prim "WordU16_extdToWord64": Word16.word -> Word64.word;
 
       val zextdFromWord32ToInt8 =
-         _prim "WordU32_toWord8": Word32.word -> Int8.int;
+         _prim "WordU32_extdToWord8": Word32.word -> Int8.int;
       val zextdFromWord32ToInt16 =
-         _prim "WordU32_toWord16": Word32.word -> Int16.int;
+         _prim "WordU32_extdToWord16": Word32.word -> Int16.int;
       val zextdFromWord32ToInt32 =
-         _prim "WordU32_toWord32": Word32.word -> Int32.int;
+         _prim "WordU32_extdToWord32": Word32.word -> Int32.int;
       val zextdFromWord32ToInt64 =
-         _prim "WordU32_toWord64": Word32.word -> Int64.int;
+         _prim "WordU32_extdToWord64": Word32.word -> Int64.int;
       val zextdFromWord32ToWord8 =
-         _prim "WordU32_toWord8": Word32.word -> Word8.word;
+         _prim "WordU32_extdToWord8": Word32.word -> Word8.word;
       val zextdFromWord32ToWord16 =
-         _prim "WordU32_toWord16": Word32.word -> Word16.word;
+         _prim "WordU32_extdToWord16": Word32.word -> Word16.word;
       val zextdFromWord32ToWord32 =
-         _prim "WordU32_toWord32": Word32.word -> Word32.word;
+         _prim "WordU32_extdToWord32": Word32.word -> Word32.word;
       val zextdFromWord32ToWord64 =
-         _prim "WordU32_toWord64": Word32.word -> Word64.word;
+         _prim "WordU32_extdToWord64": Word32.word -> Word64.word;
 
       val zextdFromWord64ToInt8 =
-         _prim "WordU64_toWord8": Word64.word -> Int8.int;
+         _prim "WordU64_extdToWord8": Word64.word -> Int8.int;
       val zextdFromWord64ToInt16 =
-         _prim "WordU64_toWord16": Word64.word -> Int16.int;
+         _prim "WordU64_extdToWord16": Word64.word -> Int16.int;
       val zextdFromWord64ToInt32 =
-         _prim "WordU64_toWord32": Word64.word -> Int32.int;
+         _prim "WordU64_extdToWord32": Word64.word -> Int32.int;
       val zextdFromWord64ToInt64 =
-         _prim "WordU64_toWord64": Word64.word -> Int64.int;
+         _prim "WordU64_extdToWord64": Word64.word -> Int64.int;
       val zextdFromWord64ToWord8 =
-         _prim "WordU64_toWord8": Word64.word -> Word8.word;
+         _prim "WordU64_extdToWord8": Word64.word -> Word8.word;
       val zextdFromWord64ToWord16 =
-         _prim "WordU64_toWord16": Word64.word -> Word16.word;
+         _prim "WordU64_extdToWord16": Word64.word -> Word16.word;
       val zextdFromWord64ToWord32 =
-         _prim "WordU64_toWord32": Word64.word -> Word32.word;
+         _prim "WordU64_extdToWord32": Word64.word -> Word32.word;
       val zextdFromWord64ToWord64 =
-         _prim "WordU64_toWord64": Word64.word -> Word64.word;
+         _prim "WordU64_extdToWord64": Word64.word -> Word64.word;
 
       (* sign-extend or low-bits *)
       val sextdFromInt8ToInt8 =
-         _prim "WordS8_toWord8": Int8.int -> Int8.int;
+         _prim "WordS8_extdToWord8": Int8.int -> Int8.int;
       val sextdFromInt8ToInt16 =
-         _prim "WordS8_toWord16": Int8.int -> Int16.int;
+         _prim "WordS8_extdToWord16": Int8.int -> Int16.int;
       val sextdFromInt8ToInt32 =
-         _prim "WordS8_toWord32": Int8.int -> Int32.int;
+         _prim "WordS8_extdToWord32": Int8.int -> Int32.int;
       val sextdFromInt8ToInt64 =
-         _prim "WordS8_toWord64": Int8.int -> Int64.int;
+         _prim "WordS8_extdToWord64": Int8.int -> Int64.int;
       val sextdFromInt8ToWord8 =
-         _prim "WordS8_toWord8": Int8.int -> Word8.word;
+         _prim "WordS8_extdToWord8": Int8.int -> Word8.word;
       val sextdFromInt8ToWord16 =
-         _prim "WordS8_toWord16": Int8.int -> Word16.word;
+         _prim "WordS8_extdToWord16": Int8.int -> Word16.word;
       val sextdFromInt8ToWord32 =
-         _prim "WordS8_toWord32": Int8.int -> Word32.word;
+         _prim "WordS8_extdToWord32": Int8.int -> Word32.word;
       val sextdFromInt8ToWord64 =
-         _prim "WordS8_toWord64": Int8.int -> Word64.word;
+         _prim "WordS8_extdToWord64": Int8.int -> Word64.word;
 
       val sextdFromInt16ToInt8 =
-         _prim "WordS16_toWord8": Int16.int -> Int8.int;
+         _prim "WordS16_extdToWord8": Int16.int -> Int8.int;
       val sextdFromInt16ToInt16 =
-         _prim "WordS16_toWord16": Int16.int -> Int16.int;
+         _prim "WordS16_extdToWord16": Int16.int -> Int16.int;
       val sextdFromInt16ToInt32 =
-         _prim "WordS16_toWord32": Int16.int -> Int32.int;
+         _prim "WordS16_extdToWord32": Int16.int -> Int32.int;
       val sextdFromInt16ToInt64 =
-         _prim "WordS16_toWord64": Int16.int -> Int64.int;
+         _prim "WordS16_extdToWord64": Int16.int -> Int64.int;
       val sextdFromInt16ToWord8 =
-         _prim "WordS16_toWord8": Int16.int -> Word8.word;
+         _prim "WordS16_extdToWord8": Int16.int -> Word8.word;
       val sextdFromInt16ToWord16 =
-         _prim "WordS16_toWord16": Int16.int -> Word16.word;
+         _prim "WordS16_extdToWord16": Int16.int -> Word16.word;
       val sextdFromInt16ToWord32 =
-         _prim "WordS16_toWord32": Int16.int -> Word32.word;
+         _prim "WordS16_extdToWord32": Int16.int -> Word32.word;
       val sextdFromInt16ToWord64 =
-         _prim "WordS16_toWord64": Int16.int -> Word64.word;
+         _prim "WordS16_extdToWord64": Int16.int -> Word64.word;
 
       val sextdFromInt32ToInt8 =
-         _prim "WordS32_toWord8": Int32.int -> Int8.int;
+         _prim "WordS32_extdToWord8": Int32.int -> Int8.int;
       val sextdFromInt32ToInt16 =
-         _prim "WordS32_toWord16": Int32.int -> Int16.int;
+         _prim "WordS32_extdToWord16": Int32.int -> Int16.int;
       val sextdFromInt32ToInt32 =
-         _prim "WordS32_toWord32": Int32.int -> Int32.int;
+         _prim "WordS32_extdToWord32": Int32.int -> Int32.int;
       val sextdFromInt32ToInt64 =
-         _prim "WordS32_toWord64": Int32.int -> Int64.int;
+         _prim "WordS32_extdToWord64": Int32.int -> Int64.int;
       val sextdFromInt32ToWord8 =
-         _prim "WordS32_toWord8": Int32.int -> Word8.word;
+         _prim "WordS32_extdToWord8": Int32.int -> Word8.word;
       val sextdFromInt32ToWord16 =
-         _prim "WordS32_toWord16": Int32.int -> Word16.word;
+         _prim "WordS32_extdToWord16": Int32.int -> Word16.word;
       val sextdFromInt32ToWord32 =
-         _prim "WordS32_toWord32": Int32.int -> Word32.word;
+         _prim "WordS32_extdToWord32": Int32.int -> Word32.word;
       val sextdFromInt32ToWord64 =
-         _prim "WordS32_toWord64": Int32.int -> Word64.word;
+         _prim "WordS32_extdToWord64": Int32.int -> Word64.word;
 
       val sextdFromInt64ToInt8 =
-         _prim "WordS64_toWord8": Int64.int -> Int8.int;
+         _prim "WordS64_extdToWord8": Int64.int -> Int8.int;
       val sextdFromInt64ToInt16 =
-         _prim "WordS64_toWord16": Int64.int -> Int16.int;
+         _prim "WordS64_extdToWord16": Int64.int -> Int16.int;
       val sextdFromInt64ToInt32 =
-         _prim "WordS64_toWord32": Int64.int -> Int32.int;
+         _prim "WordS64_extdToWord32": Int64.int -> Int32.int;
       val sextdFromInt64ToInt64 =
-         _prim "WordS64_toWord64": Int64.int -> Int64.int;
+         _prim "WordS64_extdToWord64": Int64.int -> Int64.int;
       val sextdFromInt64ToWord8 =
-         _prim "WordS64_toWord8": Int64.int -> Word8.word;
+         _prim "WordS64_extdToWord8": Int64.int -> Word8.word;
       val sextdFromInt64ToWord16 =
-         _prim "WordS64_toWord16": Int64.int -> Word16.word;
+         _prim "WordS64_extdToWord16": Int64.int -> Word16.word;
       val sextdFromInt64ToWord32 =
-         _prim "WordS64_toWord32": Int64.int -> Word32.word;
+         _prim "WordS64_extdToWord32": Int64.int -> Word32.word;
       val sextdFromInt64ToWord64 =
-         _prim "WordS64_toWord64": Int64.int -> Word64.word;
+         _prim "WordS64_extdToWord64": Int64.int -> Word64.word;
 
       val sextdFromWord8ToInt8 =
-         _prim "WordS8_toWord8": Word8.word -> Int8.int;
+         _prim "WordS8_extdToWord8": Word8.word -> Int8.int;
       val sextdFromWord8ToInt16 =
-         _prim "WordS8_toWord16": Word8.word -> Int16.int;
+         _prim "WordS8_extdToWord16": Word8.word -> Int16.int;
       val sextdFromWord8ToInt32 =
-         _prim "WordS8_toWord32": Word8.word -> Int32.int;
+         _prim "WordS8_extdToWord32": Word8.word -> Int32.int;
       val sextdFromWord8ToInt64 =
-         _prim "WordS8_toWord64": Word8.word -> Int64.int;
+         _prim "WordS8_extdToWord64": Word8.word -> Int64.int;
       val sextdFromWord8ToWord8 =
-         _prim "WordS8_toWord8": Word8.word -> Word8.word;
+         _prim "WordS8_extdToWord8": Word8.word -> Word8.word;
       val sextdFromWord8ToWord16 =
-         _prim "WordS8_toWord16": Word8.word -> Word16.word;
+         _prim "WordS8_extdToWord16": Word8.word -> Word16.word;
       val sextdFromWord8ToWord32 =
-         _prim "WordS8_toWord32": Word8.word -> Word32.word;
+         _prim "WordS8_extdToWord32": Word8.word -> Word32.word;
       val sextdFromWord8ToWord64 =
-         _prim "WordS8_toWord64": Word8.word -> Word64.word;
+         _prim "WordS8_extdToWord64": Word8.word -> Word64.word;
 
       val sextdFromWord16ToInt8 =
-         _prim "WordS16_toWord8": Word16.word -> Int8.int;
+         _prim "WordS16_extdToWord8": Word16.word -> Int8.int;
       val sextdFromWord16ToInt16 =
-         _prim "WordS16_toWord16": Word16.word -> Int16.int;
+         _prim "WordS16_extdToWord16": Word16.word -> Int16.int;
       val sextdFromWord16ToInt32 =
-         _prim "WordS16_toWord32": Word16.word -> Int32.int;
+         _prim "WordS16_extdToWord32": Word16.word -> Int32.int;
       val sextdFromWord16ToInt64 =
-         _prim "WordS16_toWord64": Word16.word -> Int64.int;
+         _prim "WordS16_extdToWord64": Word16.word -> Int64.int;
       val sextdFromWord16ToWord8 =
-         _prim "WordS16_toWord8": Word16.word -> Word8.word;
+         _prim "WordS16_extdToWord8": Word16.word -> Word8.word;
       val sextdFromWord16ToWord16 =
-         _prim "WordS16_toWord16": Word16.word -> Word16.word;
+         _prim "WordS16_extdToWord16": Word16.word -> Word16.word;
       val sextdFromWord16ToWord32 =
-         _prim "WordS16_toWord32": Word16.word -> Word32.word;
+         _prim "WordS16_extdToWord32": Word16.word -> Word32.word;
       val sextdFromWord16ToWord64 =
-         _prim "WordS16_toWord64": Word16.word -> Word64.word;
+         _prim "WordS16_extdToWord64": Word16.word -> Word64.word;
 
       val sextdFromWord32ToInt8 =
-         _prim "WordS32_toWord8": Word32.word -> Int8.int;
+         _prim "WordS32_extdToWord8": Word32.word -> Int8.int;
       val sextdFromWord32ToInt16 =
-         _prim "WordS32_toWord16": Word32.word -> Int16.int;
+         _prim "WordS32_extdToWord16": Word32.word -> Int16.int;
       val sextdFromWord32ToInt32 =
-         _prim "WordS32_toWord32": Word32.word -> Int32.int;
+         _prim "WordS32_extdToWord32": Word32.word -> Int32.int;
       val sextdFromWord32ToInt64 =
-         _prim "WordS32_toWord64": Word32.word -> Int64.int;
+         _prim "WordS32_extdToWord64": Word32.word -> Int64.int;
       val sextdFromWord32ToWord8 =
-         _prim "WordS32_toWord8": Word32.word -> Word8.word;
+         _prim "WordS32_extdToWord8": Word32.word -> Word8.word;
       val sextdFromWord32ToWord16 =
-         _prim "WordS32_toWord16": Word32.word -> Word16.word;
+         _prim "WordS32_extdToWord16": Word32.word -> Word16.word;
       val sextdFromWord32ToWord32 =
-         _prim "WordS32_toWord32": Word32.word -> Word32.word;
+         _prim "WordS32_extdToWord32": Word32.word -> Word32.word;
       val sextdFromWord32ToWord64 =
-         _prim "WordS32_toWord64": Word32.word -> Word64.word;
+         _prim "WordS32_extdToWord64": Word32.word -> Word64.word;
 
       val sextdFromWord64ToInt8 =
-         _prim "WordS64_toWord8": Word64.word -> Int8.int;
+         _prim "WordS64_extdToWord8": Word64.word -> Int8.int;
       val sextdFromWord64ToInt16 =
-         _prim "WordS64_toWord16": Word64.word -> Int16.int;
+         _prim "WordS64_extdToWord16": Word64.word -> Int16.int;
       val sextdFromWord64ToInt32 =
-         _prim "WordS64_toWord32": Word64.word -> Int32.int;
+         _prim "WordS64_extdToWord32": Word64.word -> Int32.int;
       val sextdFromWord64ToInt64 =
-         _prim "WordS64_toWord64": Word64.word -> Int64.int;
+         _prim "WordS64_extdToWord64": Word64.word -> Int64.int;
       val sextdFromWord64ToWord8 =
-         _prim "WordS64_toWord8": Word64.word -> Word8.word;
+         _prim "WordS64_extdToWord8": Word64.word -> Word8.word;
       val sextdFromWord64ToWord16 =
-         _prim "WordS64_toWord16": Word64.word -> Word16.word;
+         _prim "WordS64_extdToWord16": Word64.word -> Word16.word;
       val sextdFromWord64ToWord32 =
-         _prim "WordS64_toWord32": Word64.word -> Word32.word;
+         _prim "WordS64_extdToWord32": Word64.word -> Word32.word;
       val sextdFromWord64ToWord64 =
-         _prim "WordS64_toWord64": Word64.word -> Word64.word;
+         _prim "WordS64_extdToWord64": Word64.word -> Word64.word;
    end
 
 end

Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-mlton.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-mlton.sml	2007-04-11 21:24:58 UTC (rev 5518)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-mlton.sml	2007-04-13 02:14:36 UTC (rev 5519)
@@ -225,10 +225,10 @@
          structure S =
             C_Pointer_ChooseWordN
             (type 'a t = 'a -> t
-             val fWord8 = _prim "WordU8_toWord8": Primitive.Word8.word -> pointer;
-             val fWord16 = _prim "WordU16_toWord16": Primitive.Word16.word -> pointer;
-             val fWord32 = _prim "WordU32_toWord32": Primitive.Word32.word -> pointer;
-             val fWord64 = _prim "WordU64_toWord64": Primitive.Word64.word -> pointer;)
+             val fWord8 = _prim "WordU8_extdToWord8": Primitive.Word8.word -> pointer;
+             val fWord16 = _prim "WordU16_extdToWord16": Primitive.Word16.word -> pointer;
+             val fWord32 = _prim "WordU32_extdToWord32": Primitive.Word32.word -> pointer;
+             val fWord64 = _prim "WordU64_extdToWord64": Primitive.Word64.word -> pointer;)
       in
          val fromWord = S.f
       end
@@ -236,10 +236,10 @@
          structure S =
             C_Pointer_ChooseWordN
             (type 'a t = t -> 'a
-             val fWord8 = _prim "WordU8_toWord8": pointer -> Primitive.Word8.word;
-             val fWord16 = _prim "WordU16_toWord16": pointer -> Primitive.Word16.word;
-             val fWord32 = _prim "WordU32_toWord32": pointer -> Primitive.Word32.word;
-             val fWord64 = _prim "WordU64_toWord64": pointer -> Primitive.Word64.word;)
+             val fWord8 = _prim "WordU8_extdToWord8": pointer -> Primitive.Word8.word;
+             val fWord16 = _prim "WordU16_extdToWord16": pointer -> Primitive.Word16.word;
+             val fWord32 = _prim "WordU32_extdToWord32": pointer -> Primitive.Word32.word;
+             val fWord64 = _prim "WordU64_extdToWord64": pointer -> Primitive.Word64.word;)
       in
          val toWord = S.f
       end

Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-pack-real.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-pack-real.sml	2007-04-11 21:24:58 UTC (rev 5518)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-pack-real.sml	2007-04-13 02:14:36 UTC (rev 5519)
@@ -15,37 +15,19 @@
 structure PackReal32 =
    struct
       type real = Real32.real
+      type word = Word32.word
 
-      val subArr = 
-         _import "PackReal32_subArr": Word8.word array * C_Ptrdiff.t -> real;
-      val subArrRev = 
-         _import "PackReal32_subArrRev": Word8.word array * C_Ptrdiff.t -> real;
-      val subVec = 
-         _import "PackReal32_subVec": Word8.word vector * C_Ptrdiff.t -> real;
-      val subVecRev = 
-         _import "PackReal32_subVecRev": Word8.word vector * C_Ptrdiff.t -> real;
-      val update = 
-         _import "PackReal32_update": Word8.word array * C_Ptrdiff.t * real -> unit;
-      val updateRev = 
-         _import "PackReal32_updateRev": Word8.word array * C_Ptrdiff.t * real -> unit;
+      val castFromWord = _prim "Word32_castToReal32": word -> real;
+      val castToWord = _prim "Real32_castToWord32": real -> word;
    end
 
 structure PackReal64 =
    struct
       type real = Real64.real
+      type word = Word64.word
 
-      val subArr = 
-         _import "PackReal64_subArr": Word8.word array * C_Ptrdiff.t -> real;
-      val subArrRev = 
-         _import "PackReal64_subArrRev": Word8.word array * C_Ptrdiff.t -> real;
-      val subVec = 
-         _import "PackReal64_subVec": Word8.word vector * C_Ptrdiff.t -> real;
-      val subVecRev =
-         _import "PackReal64_subVecRev": Word8.word vector * C_Ptrdiff.t -> real;
-      val update =
-         _import "PackReal64_update": Word8.word array * C_Ptrdiff.t * real -> unit;
-      val updateRev =
-         _import "PackReal64_updateRev": Word8.word array * C_Ptrdiff.t * real -> unit;
+      val castFromWord = _prim "Word64_castToReal64": word -> real;
+      val castToWord = _prim "Real64_castToWord64": real -> word;
    end
 
 end

Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-real.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-real.sml	2007-04-11 21:24:58 UTC (rev 5518)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-real.sml	2007-04-13 02:14:36 UTC (rev 5519)
@@ -91,7 +91,7 @@
 
 open Primitive
 
-structure Real32 : PRIM_REAL  =
+structure Real32 : PRIM_REAL =
    struct
       open Real32
 
@@ -148,21 +148,21 @@
       val signBit = _import "Real32_signBit": real -> C_Int.t;
       val strto = _import "Real32_strto": NullString8.t -> real;
 
-      val fromInt8Unsafe = _prim "WordS8_toReal32": Int8.int -> real;
-      val fromInt16Unsafe = _prim "WordS16_toReal32": Int16.int -> real;
-      val fromInt32Unsafe = _prim "WordS32_toReal32": Int32.int -> real;
-      val fromInt64Unsafe = _prim "WordS64_toReal32": Int64.int -> real;
+      val fromInt8Unsafe = _prim "WordS8_rndToReal32": Int8.int -> real;
+      val fromInt16Unsafe = _prim "WordS16_rndToReal32": Int16.int -> real;
+      val fromInt32Unsafe = _pr



More information about the MLton-commit mailing list