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

Annotation of /sml/trunk/src/MLRISC/hppa/instructions/hppaCells.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 999 - (view) (download)

1 : monnier 411 (*
2 : leunga 744 * WARNING: This file was automatically generated by MDLGen (v3.0)
3 :     * from the machine description file "hppa/hppa.mdl".
4 :     * DO NOT EDIT this file directly
5 : monnier 245 *)
6 :    
7 :    
8 : monnier 411 signature HPPACELLS =
9 :     sig
10 : george 889 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 : leunga 999 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 : george 889 val returnPtr : CellsBasis.cell
28 :     val sar : CellsBasis.cell
29 :     val r0 : CellsBasis.cell
30 :     val f0 : CellsBasis.cell
31 : leunga 999 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 : monnier 411 end
39 : monnier 245
40 : monnier 411 structure HppaCells : HPPACELLS =
41 :     struct
42 :     exception HppaCells
43 :     fun error msg = MLRiscErrorMsg.error("HppaCells",msg)
44 : george 889 open CellsBasis
45 : leunga 744 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 : george 889 structure MyCells = Cells
69 : leunga 744 (exception Cells = HppaCells
70 : monnier 411 val firstPseudo = 256
71 : george 889 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 : leunga 744 defaultValues=[(32, 0)], zeroReg=SOME 0, toString=showFP, toStringWithSize=showFPWithSize,
76 : george 889 counter=ref 0, dedicated=ref 0, physicalRegs=ref CellsBasis.array0}
77 :     and desc_CR = CellsBasis.DESC {low=64, high=95, kind=CR, defaultValues=[],
78 : leunga 744 zeroReg=NONE, toString=showCR, toStringWithSize=showCRWithSize,
79 : george 889 counter=ref 0, dedicated=ref 0, physicalRegs=ref CellsBasis.array0}
80 :     and desc_MEM = CellsBasis.DESC {low=96, high=95, kind=CellsBasis.MEM,
81 : leunga 744 defaultValues=[], zeroReg=NONE, toString=showMEM, toStringWithSize=showMEMWithSize,
82 : george 889 counter=ref 0, dedicated=ref 0, physicalRegs=ref CellsBasis.array0}
83 :     and desc_CTRL = CellsBasis.DESC {low=96, high=95, kind=CellsBasis.CTRL,
84 : leunga 744 defaultValues=[], zeroReg=NONE, toString=showCTRL, toStringWithSize=showCTRLWithSize,
85 : george 889 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 : leunga 744 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 : monnier 411 )
93 : monnier 245
94 : george 889 open MyCells
95 : leunga 744 val addGP = CellSet.add
96 :     and addFP = CellSet.add
97 :     and addCR = CellSet.add
98 :     and addCC = CellSet.add
99 :     and addMEM = CellSet.add
100 :     and addCTRL = CellSet.add
101 :     and addCELLSET = CellSet.add
102 :     val RegGP = Reg GP
103 :     and RegFP = Reg FP
104 :     and RegCR = Reg CR
105 :     and RegCC = Reg CC
106 :     and RegMEM = Reg MEM
107 :     and RegCTRL = Reg CTRL
108 :     and RegCELLSET = Reg CELLSET
109 :     val returnPtr = RegGP 2
110 :     val stackptrR = RegGP 30
111 :     val asmTmpR = RegGP 29
112 :     val fasmTmp = RegFP 31
113 :     val sar = RegCR 11
114 :     val r0 = RegGP 0
115 :     val f0 = RegFP 0
116 : monnier 245 end
117 :    

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