Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/src/compiler/CodeGen/ppc/ppcCpsRegs.sml
ViewVC logotype

View of /sml/trunk/src/compiler/CodeGen/ppc/ppcCpsRegs.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 555 - (download) (annotate)
Fri Mar 3 16:10:30 2000 UTC (20 years, 5 months ago) by george
File size: 1319 byte(s)
lal-20000303-new mltree -- take II
(* ppcCpsRegs.sml --- CPS registers used on the POWER PC
 *
 * COPYRIGHT (c) 1999  Bell Laboratories.
 *
 *)

structure PPCCpsRegs : CPSREGS = 
struct
  structure T = PPCMLTree
  structure SL = SortedList
  fun upto (from,to) = if from>to then [] else from::(upto (from+1,to))
  infix upto

  val GP = PPCCells.GPReg
  val FP = PPCCells.FPReg
  val CC = PPCCells.Reg PPCCells.CC

  fun REG r = T.REG(32, GP r) 
  fun FREG f = T.FREG(64, FP f)

  val exhaustedR = CC 0
  val exhausted	= SOME(T.CC(T.GTU,exhaustedR)) 

  val allocptr 	= REG(14) 
  val limitptr 	= REG(15)
  val storeptr	= REG(16)
  val stdlink	= REG(17)
  val stdclos	= REG(18)
  val stdarg	= REG(19)
  val stdcont  	= REG(20)
  val exnptr	= REG(21)
  val varptr	= REG(22)
  val baseptr   = REG(23)
  val stackptr	= REG(1)
  val gcLink	= T.REG(32,PPCCells.lr) 

  val miscregs =  map REG ([24,25,26,27,29,30,31] @ (3 upto 13)) 
  val calleesave = Array.fromList(miscregs)
  val floatregs = map FREG (1 upto 31)
  val savedfpregs = []

  val allRegs = map GP (SL.uniq(0 upto 31))

  val availR = 
    map (fn T.REG(_,r) => r)
         ([stdlink, stdclos, stdarg, stdcont] @ miscregs)
  val dedicatedR = SL.remove(SL.uniq availR, allRegs)

  val availF = map FP (1 upto 31)
  val dedicatedF = [FP 0]

  val signedGCTest = false
  val addressWidth = 32
end

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