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/vararg-ccall/ia32-vararg-ccall.sml
ViewVC logotype

Diff of /MLRISC/trunk/vararg-ccall/ia32-vararg-ccall.sml

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

revision 3062, Wed Jun 4 06:59:52 2008 UTC revision 3063, Thu Jun 5 00:42:15 2008 UTC
# Line 83  Line 83 
83                  (ListPair.mapEq varArg (args, List.rev argLocs), argMem)                  (ListPair.mapEq varArg (args, List.rev argLocs), argMem)
84              end              end
85    
86      fun callWithArgs (cFun, args) = let    (* align the frame to 16 bytes *)
87             val (zippedArgs, stkArgSzB) = zipArgs args      fun darwinStkSzB stkArgSzB = let
88           (* the extra two words are for the return pointer and the frame pointer *)             val retAndFrameSzB = 2*4
89             val stkAllocSzB = #szb stkArgSzB + 2*4             val stkAllocSzB = stkArgSzB + retAndFrameSzB
90             val stkAllocSzB = IA32CSizes.alignAddr(stkAllocSzB, 16)             val stkAllocSzB = IA32CSizes.alignAddr(stkAllocSzB, 16)
91               val stkAllocSzB = stkAllocSzB - retAndFrameSzB
92               in
93                   stkAllocSzB
94               end
95    
96        fun callWithArgs (cFun, args) = let
97               val (zippedArgs, {szb, ...}) = zipArgs args
98             in             in
99                VarargCCall.vararg(cFun, zippedArgs, stkAllocSzB)                VarargCCall.vararg(cFun, zippedArgs, darwinStkSzB szb)
100             end             end
101    
102    end    end

Legend:
Removed from v.3062  
changed lines
  Added in v.3063

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