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

SCM Repository

[smlnj] Annotation of /sml/trunk/src/MLRISC/ppc/instructions/ppcCells.sml
ViewVC logotype

Annotation of /sml/trunk/src/MLRISC/ppc/instructions/ppcCells.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 810 - (view) (download)

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

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