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/test.sml
ViewVC logotype

Diff of /MLRISC/trunk/amd64/staged-allocation/test.sml

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

revision 3043, Thu May 29 01:53:59 2008 UTC revision 3049, Fri May 30 00:58:55 2008 UTC
# Line 496  Line 496 
496  structure ChkTy = MLTreeCheckTy(structure T = T val intTy = 64)  structure ChkTy = MLTreeCheckTy(structure T = T val intTy = 64)
497  structure Vararg = AMD64VarargCCallFn(structure T = T)  structure Vararg = AMD64VarargCCallFn(structure T = T)
498    
499  structure TestStagedAllocation =  structure TestSA =
500    struct    struct
501    
502      val wordTy = 64      val wordTy = 64
# Line 570  Line 570 
570    
571      fun lit i = T.LI (T.I.fromInt (wordTy, i))      fun lit i = T.LI (T.I.fromInt (wordTy, i))
572    
573  (*     fun vararg _ = let
    fun testVarargs _ = let  
574             val lab = Label.global "varargs"             val lab = Label.global "varargs"
575             val tmp = C.newReg()             val tmp = C.newReg()
576             val tmpC = C.newReg()             val tmpC = C.newReg()
            val preCallInstrs = [T.MV(wordTy, C.rax, lit (List.length CCalls.CCs.fprParams))]  
577             val stms =             val stms =
578                 List.concat [                 List.concat [
579                     [T.EXT(AMD64InstrExt.PUSHQ(T.REG(64, Cells.rbp))),                     [T.EXT(AMD64InstrExt.PUSHQ(T.REG(64, Cells.rbp))),
580                      T.COPY (wordTy, [Cells.rbp], [Cells.rsp])],                      T.COPY (wordTy, [Cells.rbp], [Cells.rsp])],
581                     [T.MV(wordTy, tmp, T.REG(wordTy, C.rsi))],                     [T.MV(wordTy, tmp, T.REG(wordTy, C.rsi))],
582                     [T.MV(wordTy, tmpC, T.REG(wordTy, C.rdi))],                     [T.MV(wordTy, tmpC, T.REG(wordTy, C.rdi))],
583                     Vararg.genVarArgs (T.REG(wordTy, tmpC), tmp, preCallInstrs),                     Vararg.genVarargs (T.REG(wordTy, tmpC), tmp),
584                     [T.EXT(AMD64InstrExt.LEAVE)],                     [T.EXT(AMD64InstrExt.LEAVE)],
585                     [T.RET []]                     [T.RET []]
586                     ]                     ]
# Line 594  Line 592 
592             in             in
593                0                0
594             end             end
 *)  
595    end    end
596    
597    

Legend:
Removed from v.3043  
changed lines
  Added in v.3049

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