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 3054, Tue Jun 3 01:26:28 2008 UTC revision 3055, Tue Jun 3 06:55:14 2008 UTC
# Line 20  Line 20 
20      structure VarargCCall = VarargCCallFn(      structure VarargCCall = VarargCCallFn(
21                                structure T = T                                structure T = T
22                                structure CCall = CCall                                structure CCall = CCall
23                                val gprParams = List.map #2 CCall.CCs.gprParams                                val gprParams = List.map #2 ((64, C.rax) :: CCall.CCs.gprParams)
24                                val fprParams = List.map #2 CCall.CCs.fprParams                                val fprParams = List.map #2 CCall.CCs.fprParams
25                                val gprTys = [32, 64]                                val gprTys = [32, 64]
26                                val fprTys = [32, 64]                                val fprTys = [32, 64]
# Line 45  Line 45 
45             in             in
46                 (lab,                 (lab,
47                  List.concat [                  List.concat [
48                     (* the abi specifies that rax contains the number of floating-point arguments *)
49                     [T.MV(wordTy, C.rax, lit (List.length CCall.CCs.fprParams))],                     [T.MV(wordTy, C.rax, lit (List.length CCall.CCs.fprParams))],
50                     [push (T.REG(64, C.rbp)),                     [push (T.REG(64, C.rbp)),
51                      T.COPY (wordTy, [C.rbp], [C.rsp])],                      T.COPY (wordTy, [C.rbp], [C.rsp])],
52                     [T.MV(wordTy, cFun, T.REG(wordTy, C.rsi))],    (* arg0 *)                     [T.MV(wordTy, cFun, T.REG(wordTy, C.rdi))],    (* arg0 *)
53                     [T.MV(wordTy, args, T.REG(wordTy, C.rdi))],   (* 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),
55                     [leave],                     [leave],
56                     [T.RET []]                     [T.RET []]

Legend:
Removed from v.3054  
changed lines
  Added in v.3055

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