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

Diff of /sml/trunk/src/compiler/CodeGen/hppa/hppaCG.sml

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

revision 113, Fri Jun 5 19:41:21 1998 UTC revision 127, Mon Sep 7 19:06:29 1998 UTC
# Line 11  Line 11 
11    structure R = HppaCpsRegs    structure R = HppaCpsRegs
12    structure CG = Control.CG    structure CG = Control.CG
13    structure Region = I.Region    structure Region = I.Region
14      structure B = HppaMLTree.BNames
15    
16    fun error msg = ErrorMsg.impossible ("HppaCG." ^ msg)    fun error msg = ErrorMsg.impossible ("HppaCG." ^ msg)
17    
# Line 91  Line 92 
92         fregSpills := Intmap.new(8, FregSpills))         fregSpills := Intmap.new(8, FregSpills))
93    
94      (* spill general register *)      (* spill general register *)
95      fun spillR {regmap, instr, reg} = let      fun spillR {regmap, instr, reg, id} = let
96        val loc = getRegLoc reg        val loc = getRegLoc reg
97        fun spillInstr(r) =        fun spillInstr(r) =
98           [I.STORE{st=I.STW, b=C.stackptrR, d=I.IMMED(~loc), r=r, mem=stack}]           [I.STORE{st=I.STW, b=C.stackptrR, d=I.IMMED(~loc), r=r, mem=stack}]
# Line 117  Line 118 
118      end      end
119    
120      (* reload general register *)      (* reload general register *)
121      fun reloadR {regmap, instr, reg} = let      fun reloadR {regmap, instr, reg, id} = let
122        val loc = getRegLoc(reg)        val loc = getRegLoc(reg)
123        fun reloadInstr(r) =        fun reloadInstr(r) =
124            I.LOADI{li=I.LDW, i=I.IMMED(~loc), r=C.stackptrR, t=r, mem=stack}            I.LOADI{li=I.LDW, i=I.IMMED(~loc), r=C.stackptrR, t=r, mem=stack}
# Line 132  Line 133 
133           end           end
134      end      end
135    
136      fun spillF {regmap, instr, reg} = let      fun spillF {regmap, instr, reg, id} = let
137        val disp = getFregLoc reg        val disp = getFregLoc reg
138        val tmpR = C.asmTmpR        val tmpR = C.asmTmpR
139        fun spillInstrs(reg) =        fun spillInstrs(reg) =
# Line 160  Line 161 
161           end           end
162      end      end
163    
164      fun reloadF {regmap, instr, reg} = let      fun reloadF {regmap, instr, reg, id:B.name} = let
165        val disp = getFregLoc reg        val disp = getFregLoc reg
166        val tmpR = C.asmTmpR        val tmpR = C.asmTmpR
167        fun reloadInstrs(reg, rest) =        fun reloadInstrs(reg, rest) =
# Line 192  Line 193 
193        HppaRa.IntRa        HppaRa.IntRa
194          (structure RaUser = struct          (structure RaUser = struct
195              structure I = HppaInstr              structure I = HppaInstr
196                structure B = B
197    
198              val getreg = GR.getreg              val getreg = GR.getreg
199              val spill = spillR              val spill = spillR
# Line 208  Line 210 
210        HppaRa.FloatRa        HppaRa.FloatRa
211          (structure RaUser = struct          (structure RaUser = struct
212              structure I = HppaInstr              structure I = HppaInstr
213                structure B = B
214    
215              val getreg = FR.getreg              val getreg = FR.getreg
216              val spill = spillF              val spill = spillF
# Line 290  Line 293 
293  end  end
294    
295  (*  (*
296   * $Log$   * $Log: hppaCG.sml,v $
297     * Revision 1.3  1998/05/23 14:09:20  george
298     *   Fixed RCS keyword syntax
299     *
300   *)   *)

Legend:
Removed from v.113  
changed lines
  Added in v.127

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