Debian Codegraph @

lib/mlrisc-lib/MLRISC/hppa/instructions/hppaCells.sml

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