]> Joshua Wise's Git repositories - snipe.git/blobdiff - codegen/codegen.sml
Fix up for MLton build.
[snipe.git] / codegen / codegen.sml
index 29707a8489d9b37dc0994b2b4dd3750079577374..804dee55108edf2cfcafea80e66e4880fefce845 100644 (file)
@@ -59,7 +59,7 @@ struct
    * generates instructions to achieve d <- e
    * d must be TEMP(t) or REG(r)
    *)
-  and munch_exp d (T.CONST n) = [X.INSN (X.AL, X.MOVLIT(d, Word.fromLarge n))]
+  and munch_exp d (T.CONST n) = [X.INSN (X.AL, X.MOVLIT(d, Word.fromLarge (Word32.toLarge n)))]
     | munch_exp d (T.STRING s) = [X.INSN (X.AL, X.MOVSTR(d, s))]
     | munch_exp d (T.NULLPTR) = [X.INSN (X.AL, X.MOVLIT(d, 0w0))]
     | munch_exp d (T.TEMP(t)) = [X.INSN (X.AL, X.MOV(d, X.TEMP t))]
@@ -284,7 +284,7 @@ struct
   (* munch_stm : T.stm -> X.insn list *)
   (* munch_stm stm generates code to execute stm *)
   and munch_stm (T.MOVE (T.TEMP t1, T.TEMP t2)) = [X.INSN (X.AL, X.MOV(X.TEMP t1, X.TEMP t2))]
-    | munch_stm (T.MOVE (T.TEMP t, T.CONST n)) = [X.INSN (X.AL, X.MOVLIT(X.TEMP t, Word.fromLarge n))]
+    | munch_stm (T.MOVE (T.TEMP t, T.CONST n)) = [X.INSN (X.AL, X.MOVLIT(X.TEMP t, Word.fromLarge (Word32.toLarge n)))]
     | munch_stm (T.MOVE (T.TEMP t, a as T.ARG (an))) =
         let
           val i = munch_exp (X.TEMP t) a
This page took 0.02276 seconds and 4 git commands to generate.