[MLton-commit] r5747
Matthew Fluet
fluet at mlton.org
Mon Jul 9 10:00:17 PDT 2007
Be more specific about which codegen primitives are supported
----------------------------------------------------------------------
U mlton/trunk/mlton/atoms/prim.sig
U mlton/trunk/mlton/codegen/amd64-codegen/amd64-mlton.fun
U mlton/trunk/mlton/codegen/bytecode/bytecode.fun
U mlton/trunk/mlton/codegen/c-codegen/c-codegen.fun
U mlton/trunk/mlton/codegen/x86-codegen/x86-mlton.fun
----------------------------------------------------------------------
Modified: mlton/trunk/mlton/atoms/prim.sig
===================================================================
--- mlton/trunk/mlton/atoms/prim.sig 2007-07-09 16:59:34 UTC (rev 5746)
+++ mlton/trunk/mlton/atoms/prim.sig 2007-07-09 17:00:15 UTC (rev 5747)
@@ -120,7 +120,7 @@
| Real_mul of RealSize.t (* codegen *)
| Real_muladd of RealSize.t (* codegen *)
| Real_mulsub of RealSize.t (* codegen *)
- | Real_neg of RealSize.t (* codegen *)
+ | Real_neg of RealSize.t (* codegen *)
| Real_qequal of RealSize.t (* codegen *)
| Real_rndToReal of RealSize.t * RealSize.t (* codegen *)
| Real_rndToWord of RealSize.t * WordSize.t * {signed: bool} (* codegen *)
Modified: mlton/trunk/mlton/codegen/amd64-codegen/amd64-mlton.fun
===================================================================
--- mlton/trunk/mlton/codegen/amd64-codegen/amd64-mlton.fun 2007-07-09 16:59:34 UTC (rev 5746)
+++ mlton/trunk/mlton/codegen/amd64-codegen/amd64-mlton.fun 2007-07-09 17:00:15 UTC (rev 5747)
@@ -50,22 +50,35 @@
| CPointer_sub => true
| CPointer_toWord => true
| FFI_Symbol _ => true
+ | Real_Math_acos _ => false
+ | Real_Math_asin _ => false
+ | Real_Math_atan _ => false
+ | Real_Math_atan2 _ => false
+ | Real_Math_cos _ => false
+ | Real_Math_exp _ => false
+ | Real_Math_ln _ => false
+ | Real_Math_log10 _ => false
+ | Real_Math_sin _ => false
| Real_Math_sqrt _ => true
- (* | Real_abs _ => true *)
+ | Real_Math_tan _ => false
+ | Real_abs _ => false (* !! *)
| Real_add _ => true
| Real_castToWord _ => true
| Real_div _ => true
| Real_equal _ => true
+ | Real_ldexp _ => false
| Real_le _ => true
| Real_lt _ => true
| Real_mul _ => true
| Real_muladd _ => true
| Real_mulsub _ => true
- (* | Real_neg _ => true *)
+ | Real_neg _ => false (* !! *)
| Real_qequal _ => true
| Real_rndToReal _ => true
| Real_rndToWord (_, _, {signed}) => signed
+ | Real_round _ => false (* ?? *)
| Real_sub _ => true
+ | Thread_returnToC => false
| Word_add _ => true
| Word_addCheck _ => true
| Word_andb _ => true
@@ -82,7 +95,7 @@
| Word_orb _ => true
| Word_quot _ => true
| Word_rem _ => true
- | Word_rndToReal (s, _, {signed}) => signed orelse w32168 s
+ | Word_rndToReal (s1, _, {signed}) => signed orelse w32168 s1
| Word_rol _ => true
| Word_ror _ => true
| Word_rshift _ => true
Modified: mlton/trunk/mlton/codegen/bytecode/bytecode.fun
===================================================================
--- mlton/trunk/mlton/codegen/bytecode/bytecode.fun 2007-07-09 16:59:34 UTC (rev 5746)
+++ mlton/trunk/mlton/codegen/bytecode/bytecode.fun 2007-07-09 17:00:15 UTC (rev 5747)
@@ -46,12 +46,67 @@
datatype z = datatype Prim.Name.t
in
case Prim.name p of
- Real_ldexp _ => false
+ CPointer_add => true
+ | CPointer_diff => true
+ | CPointer_equal => true
+ | CPointer_fromWord => true
+ | CPointer_lt => true
+ | CPointer_sub => true
+ | CPointer_toWord => true
+ | FFI_Symbol _ => true
+ | Real_Math_acos _ => true
+ | Real_Math_asin _ => true
+ | Real_Math_atan _ => true
+ | Real_Math_atan2 _ => true
+ | Real_Math_cos _ => true
+ | Real_Math_exp _ => true
+ | Real_Math_ln _ => true
+ | Real_Math_log10 _ => true
+ | Real_Math_sin _ => true
+ | Real_Math_sqrt _ => true
+ | Real_Math_tan _ => true
+ | Real_abs _ => true
+ | Real_add _ => true
+ | Real_castToWord _ => true
+ | Real_div _ => true
+ | Real_equal _ => true
+ | Real_ldexp _ => false
+ | Real_le _ => true
+ | Real_lt _ => true
+ | Real_mul _ => true
| Real_muladd _ => false
| Real_mulsub _ => false
+ | Real_neg _ => true
+ | Real_qequal _ => false
+ | Real_rndToReal _ => true
+ | Real_rndToWord _ => true
+ | Real_round _ => true
+ | Real_sub _ => true
+ | Thread_returnToC => true
+ | Word_add _ => true
+ | Word_addCheck _ => true
+ | Word_andb _ => true
+ | Word_castToReal _ => true
+ | Word_equal _ => true
+ | Word_extdToWord _ => true
+ | Word_lshift _ => true
+ | Word_lt _ => true
+ | Word_mul _ => true
+ | Word_mulCheck _ => true
+ | Word_neg _ => true
+ | Word_negCheck _ => true
+ | Word_notb _ => true
+ | Word_orb _ => true
| Word_quot _ => true
| Word_rem _ => true
- | _ => CCodegen.implementsPrim p
+ | Word_rndToReal _ => true
+ | Word_rol _ => true
+ | Word_ror _ => true
+ | Word_rshift _ => true
+ | Word_sub _ => true
+ | Word_subCheck _ => true
+ | Word_xorb _ => true
+ | _ => false
end
structure Opcode = IntInf
Modified: mlton/trunk/mlton/codegen/c-codegen/c-codegen.fun
===================================================================
--- mlton/trunk/mlton/codegen/c-codegen/c-codegen.fun 2007-07-09 16:59:34 UTC (rev 5746)
+++ mlton/trunk/mlton/codegen/c-codegen/c-codegen.fun 2007-07-09 17:00:15 UTC (rev 5747)
@@ -155,6 +155,7 @@
| Real_Math_sin _ => true
| Real_Math_sqrt _ => true
| Real_Math_tan _ => true
+ | Real_abs _ => true
| Real_add _ => true
| Real_castToWord _ => true
| Real_div _ => true
@@ -166,6 +167,7 @@
| Real_muladd _ => true
| Real_mulsub _ => true
| Real_neg _ => true
+ | Real_qequal _ => false
| Real_rndToReal _ => true
| Real_rndToWord _ => true
| Real_round _ => true
Modified: mlton/trunk/mlton/codegen/x86-codegen/x86-mlton.fun
===================================================================
--- mlton/trunk/mlton/codegen/x86-codegen/x86-mlton.fun 2007-07-09 16:59:34 UTC (rev 5746)
+++ mlton/trunk/mlton/codegen/x86-codegen/x86-mlton.fun 2007-07-09 17:00:15 UTC (rev 5747)
@@ -63,6 +63,7 @@
| Real_Math_tan _ => true
| Real_abs _ => true
| Real_add _ => true
+ | Real_castToWord _ => false (* !! *)
| Real_div _ => true
| Real_equal _ => true
| Real_ldexp _ => true
@@ -77,9 +78,11 @@
| Real_rndToWord (_, s2, {signed}) => signed andalso w32168 s2
| Real_round _ => true
| Real_sub _ => true
+ | Thread_returnToC => false
| Word_add _ => true
| Word_addCheck _ => true
| Word_andb _ => true
+ | Word_castToReal _ => false (* !! *)
| Word_equal s => w32168 s
| Word_extdToWord (s1, s2, _) => w32168 s1 andalso w32168 s2
| Word_lshift s => w32168 s
More information about the MLton-commit
mailing list