From 0328a46e225c7d763ce0b003eac84da0ad608a5c Mon Sep 17 00:00:00 2001 From: Joshua Wise Date: Tue, 13 Jul 2010 22:44:40 -0400 Subject: [PATCH] Fix up for MLton build. --- codegen/codegen.sml | 4 ++-- sources.mlb | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/codegen/codegen.sml b/codegen/codegen.sml index 29707a8..804dee5 100644 --- a/codegen/codegen.sml +++ b/codegen/codegen.sml @@ -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 diff --git a/sources.mlb b/sources.mlb index 63f9acf..abeae0b 100644 --- a/sources.mlb +++ b/sources.mlb @@ -26,11 +26,12 @@ $(SML_LIB)/mlyacc-lib/mlyacc-lib.mlb trans/temp.sml trans/label.sml + trans/stringref.sml trans/tree.sml trans/treeutils.sml trans/trans.sml - codegen/x86.sml + codegen/blarg.sml codegen/codegen.sml codegen/liveness.sml codegen/igraph.sml @@ -40,11 +41,6 @@ $(SML_LIB)/mlyacc-lib/mlyacc-lib.mlb codegen/stringifier.sml optimize/optimizer.sml - optimize/constfold.sml - optimize/feckful.sml - optimize/labelcoalescing.sml - optimize/peephole.sml - optimize/stupidfunc.sml top/top.sml top/top_mlton.sml -- 2.43.0