Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /MLRISC/trunk/amd64/staged-allocation/amd64-vararg-ccall-fn.sml
ViewVC logotype

Diff of /MLRISC/trunk/amd64/staged-allocation/amd64-vararg-ccall-fn.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3064, Thu Jun 5 07:20:32 2008 UTC revision 3065, Thu Jun 5 07:58:25 2008 UTC
# Line 33  Line 33 
33      fun lit i = T.LI (T.I.fromInt (wordTy, i))      fun lit i = T.LI (T.I.fromInt (wordTy, i))
34    
35      fun callWithArgs (cFun, args) = let      fun callWithArgs (cFun, args) = let
            val triplets = VarargCCall.encodeArgs args  
36             in             in
37                raise Fail "jump to the interpreter"                raise Fail "jump to the interpreter"
38             end             end
# Line 42  Line 41 
41             val lab = Label.global "varargs"             val lab = Label.global "varargs"
42             val args = C.newReg()             val args = C.newReg()
43             val cFun = C.newReg()             val cFun = C.newReg()
44               val endOfArgs = raise Fail "todo"
45             in             in
46                 (lab,                 (lab,
47                  List.concat [                  List.concat [
# Line 51  Line 51 
51                      T.COPY (wordTy, [C.rbp], [C.rsp])],                      T.COPY (wordTy, [C.rbp], [C.rsp])],
52                     [T.MV(wordTy, cFun, T.REG(wordTy, C.rdi))],    (* arg0 *)                     [T.MV(wordTy, cFun, T.REG(wordTy, C.rdi))],    (* arg0 *)
53                     [T.MV(wordTy, args, T.REG(wordTy, C.rsi))],    (* arg1 *)                     [T.MV(wordTy, args, T.REG(wordTy, C.rsi))],    (* arg1 *)
54                     VarargCCall.genVarargs(T.REG(wordTy, cFun), args),                     VarargCCall.genVarargs(T.REG(wordTy, cFun), args, endOfArgs),
55                     [leave],                     [leave],
56                     [T.RET []]                     [T.RET []]
57                     ])                     ])

Legend:
Removed from v.3064  
changed lines
  Added in v.3065

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0