1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
|
(*
* WARNING: This file was automatically generated by MDLGen (v3.1)
* from the machine description file "hppa/hppa.mdl".
* DO NOT EDIT this file directly
*)
signature HPPACELLS =
sig
include CELLS
val CR : CellsBasis.cellkind
val CELLSET : CellsBasis.cellkind
val showGP : CellsBasis.register_id -> string
val showFP : CellsBasis.register_id -> string
val showCR : CellsBasis.register_id -> string
val showCC : CellsBasis.register_id -> string
val showMEM : CellsBasis.register_id -> string
val showCTRL : CellsBasis.register_id -> string
val showCELLSET : CellsBasis.register_id -> string
val showGPWithSize : CellsBasis.register_id * CellsBasis.sz -> string
val showFPWithSize : CellsBasis.register_id * CellsBasis.sz -> string
val showCRWithSize : CellsBasis.register_id * CellsBasis.sz -> string
val showCCWithSize : CellsBasis.register_id * CellsBasis.sz -> string
val showMEMWithSize : CellsBasis.register_id * CellsBasis.sz -> string
val showCTRLWithSize : CellsBasis.register_id * CellsBasis.sz -> string
val showCELLSETWithSize : CellsBasis.register_id * CellsBasis.sz -> string
val returnPtr : CellsBasis.cell
val sar : CellsBasis.cell
val r0 : CellsBasis.cell
val f0 : CellsBasis.cell
val addGP : CellsBasis.cell * cellset -> cellset
val addFP : CellsBasis.cell * cellset -> cellset
val addCR : CellsBasis.cell * cellset -> cellset
val addCC : CellsBasis.cell * cellset -> cellset
val addMEM : CellsBasis.cell * cellset -> cellset
val addCTRL : CellsBasis.cell * cellset -> cellset
val addCELLSET : CellsBasis.cell * cellset -> cellset
end
structure HppaCells : HPPACELLS =
struct
exception HppaCells
fun error msg = MLRiscErrorMsg.error("HppaCells",msg)
open CellsBasis
fun showGPWithSize (r, ty) = (fn (r, _) => "%r" ^ (Int.toString r)
) (r, ty)
and showFPWithSize (r, ty) = (fn (f, _) => "%f" ^ (Int.toString f)
) (r, ty)
and showCRWithSize (r, ty) = (fn (cr, _) => "%cr" ^ (Int.toString cr)
) (r, ty)
and showCCWithSize (r, ty) = (fn _ => "cc"
) (r, ty)
and showMEMWithSize (r, ty) = (fn (r, _) => "m" ^ (Int.toString r)
) (r, ty)
and showCTRLWithSize (r, ty) = (fn (r, _) => "ctrl" ^ (Int.toString r)
) (r, ty)
and showCELLSETWithSize (r, ty) = (fn _ => "CELLSET"
) (r, ty)
fun showGP r = showGPWithSize (r, 32)
fun showFP r = showFPWithSize (r, 64)
fun showCR r = showCRWithSize (r, 32)
fun showCC r = showCCWithSize (r, 32)
fun showMEM r = showMEMWithSize (r, 8)
fun showCTRL r = showCTRLWithSize (r, 0)
fun showCELLSET r = showCELLSETWithSize (r, 0)
val CR = CellsBasis.newCellKind {name="CR", nickname="cr"}
and CELLSET = CellsBasis.newCellKind {name="CELLSET", nickname="cellset"}
structure MyCells = Cells
(exception Cells = HppaCells
val firstPseudo = 256
val desc_GP = CellsBasis.DESC {low=0, high=31, kind=CellsBasis.GP, defaultValues=[(0,
0)], zeroReg=SOME 0, toString=showGP, toStringWithSize=showGPWithSize,
counter=ref 0, dedicated=ref 0, physicalRegs=ref CellsBasis.array0}
and desc_FP = CellsBasis.DESC {low=32, high=63, kind=CellsBasis.FP,
defaultValues=[(32, 0)], zeroReg=SOME 0, toString=showFP, toStringWithSize=showFPWithSize,
counter=ref 0, dedicated=ref 0, physicalRegs=ref CellsBasis.array0}
and desc_CR = CellsBasis.DESC {low=64, high=95, kind=CR, defaultValues=[],
zeroReg=NONE, toString=showCR, toStringWithSize=showCRWithSize,
counter=ref 0, dedicated=ref 0, physicalRegs=ref CellsBasis.array0}
and desc_MEM = CellsBasis.DESC {low=96, high=95, kind=CellsBasis.MEM,
defaultValues=[], zeroReg=NONE, toString=showMEM, toStringWithSize=showMEMWithSize,
counter=ref 0, dedicated=ref 0, physicalRegs=ref CellsBasis.array0}
and desc_CTRL = CellsBasis.DESC {low=96, high=95, kind=CellsBasis.CTRL,
defaultValues=[], zeroReg=NONE, toString=showCTRL, toStringWithSize=showCTRLWithSize,
counter=ref 0, dedicated=ref 0, physicalRegs=ref CellsBasis.array0}
and desc_CELLSET = CellsBasis.DESC {low=96, high=95, kind=CELLSET, defaultValues=[],
zeroReg=NONE, toString=showCELLSET, toStringWithSize=showCELLSETWithSize,
counter=ref 0, dedicated=ref 0, physicalRegs=ref CellsBasis.array0}
val cellKindDescs = [(CellsBasis.GP, desc_GP), (CellsBasis.FP, desc_FP),
(CR, desc_CR), (CellsBasis.CC, desc_GP), (CellsBasis.MEM, desc_MEM),
(CellsBasis.CTRL, desc_CTRL), (CELLSET, desc_CELLSET)]
val cellSize = 4
)
open MyCells
val addGP = CellSet.add
and addFP = CellSet.add
and addCR = CellSet.add
and addCC = CellSet.add
and addMEM = CellSet.add
and addCTRL = CellSet.add
and addCELLSET = CellSet.add
val RegGP = Reg GP
and RegFP = Reg FP
and RegCR = Reg CR
and RegCC = Reg CC
and RegMEM = Reg MEM
and RegCTRL = Reg CTRL
and RegCELLSET = Reg CELLSET
val returnPtr = RegGP 2
val stackptrR = RegGP 30
val asmTmpR = RegGP 29
val fasmTmp = RegFP 31
val sar = RegCR 11
val r0 = RegGP 0
val f0 = RegFP 0
end
|