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 /sml/trunk/src/compiler/CodeGen/sparc/sparcPseudoInstrs.sml
ViewVC logotype

Diff of /sml/trunk/src/compiler/CodeGen/sparc/sparcPseudoInstrs.sml

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

revision 839, Thu Jun 7 20:28:44 2001 UTC revision 840, Fri Jun 15 19:05:19 2001 UTC
# Line 14  Line 14 
14    
15    fun error msg = MLRiscErrorMsg.impossible ("SparcPseudoInstrs."^msg)    fun error msg = MLRiscErrorMsg.impossible ("SparcPseudoInstrs."^msg)
16    
17    (* runtime system dependent *)    val delta = SparcSpec.framesize       (* initial value of %fp - %sp *)
18    val floatTmpOffset = I.IMMED 88  
19    val umulOffset = I.IMMED 80    (* runtime system dependent; the numbers are relative to %sp but
20    val smulOffset = I.IMMED 72     * we need offsets relative to %fp, hence the adjustment by delta *)
21    val udivOffset = I.IMMED 84    val floatTmpOffset = I.IMMED (88 - delta)
22    val sdivOffset = I.IMMED 76    val umulOffset = I.IMMED (80 - delta)
23      val smulOffset = I.IMMED (72 - delta)
24      val udivOffset = I.IMMED (84 - delta)
25      val sdivOffset = I.IMMED (76 - delta)
26    
27    val stack = CPSRegions.stack    val stack = CPSRegions.stack
28    
# Line 70  Line 73 
73    in    in
74        [I.COPY{src=[r,reduceOpnd i],dst=[r10,r11],        [I.COPY{src=[r,reduceOpnd i],dst=[r10,r11],
75                     tmp=SOME(I.Direct(C.newReg())),impl=ref NONE},                     tmp=SOME(I.Direct(C.newReg())),impl=ref NONE},
76         I.LOAD{l=I.LD,r=C.stackptrR,i=offset,d=addr,mem=stack},         I.LOAD{l=I.LD,r=C.frameptrR,i=offset,d=addr,mem=stack},
77         I.JMPL{r=addr,i=I.IMMED 0,d=C.linkReg,defs=defs,uses=uses,         I.JMPL{r=addr,i=I.IMMED 0,d=C.linkReg,defs=defs,uses=uses,
78                cutsTo=[],nop=true,mem=stack},                cutsTo=[],nop=true,mem=stack},
79         I.COPY{src=[r10],dst=[d],tmp=NONE,impl=ref NONE}         I.COPY{src=[r10],dst=[d],tmp=NONE,impl=ref NONE}
# Line 83  Line 86 
86    fun sdivtrap({r, i, d}, reduceOpnd) = callRoutine(sdivOffset,reduceOpnd,r,i,d)    fun sdivtrap({r, i, d}, reduceOpnd) = callRoutine(sdivOffset,reduceOpnd,r,i,d)
87    
88    fun cvti2d({i, d}, reduceOpnd) =    fun cvti2d({i, d}, reduceOpnd) =
89        [I.STORE{s=I.ST,r=C.stackptrR,i=floatTmpOffset,d=reduceOpnd i,mem=stack},        [I.STORE{s=I.ST,r=C.frameptrR,i=floatTmpOffset,d=reduceOpnd i,mem=stack},
90         I.FLOAD{l=I.LDF,r=C.stackptrR,i=floatTmpOffset,d=d,mem=stack},         I.FLOAD{l=I.LDF,r=C.frameptrR,i=floatTmpOffset,d=d,mem=stack},
91         I.FPop1{a=I.FiTOd,r=d,d=d}         I.FPop1{a=I.FiTOd,r=d,d=d}
92        ]        ]
93    fun cvti2s _ = error "cvti2s"    fun cvti2s _ = error "cvti2s"

Legend:
Removed from v.839  
changed lines
  Added in v.840

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