Debian Codegraph @

lib/mlrisc-lib/MLRISC/Tools/MDL/mdl-rtl.sml

raw
1 (*
2 * RTL definitions
3 *)
4 structure MDLConstant =
5 struct
6 type const = unit
7 fun toString _ = ""
8 fun valueOf _ = 0
9 fun hash _ = 0w0
10 fun == _ = false
11 end
12
13 structure MDLRegion =
14 struct
15 type region = unit
16 val stack = () and readonly = () and memory = ()
17 fun toString _ = ""
18 end
19
20 structure MDLExtension =
21 struct
22 type ('s,'r,'f,'c) sx = unit
23 type ('s,'r,'f,'c) rx = unit
24 type ('s,'r,'f,'c) fx = unit
25 type ('s,'r,'f,'c) ccx = unit
26 end
27
28 structure MDLMLTree =
29 MLTreeF(structure Constant=MDLConstant
30 structure Region=MDLRegion
31 structure Extension=MDLExtension)
32
33
34 structure MDLClientPseudoOps =
35 struct
36 structure AsmPseudoOps =
37 struct
38 structure T = MDLMLTree
39 structure PB = PseudoOpsBasisTyp
40 type 'a pseudo_op = (T.labexp,'a) PB.pseudo_op
41 fun toString _ = ""
42 fun lexpToString _ = ""
43 fun defineLabel _ = ""
44 fun emitValue _ = ()
45 fun sizeOf _ = 0
46 val wordSize = 0
47 end
48 type pseudo_op = unit
49 fun toString _ = ""
50 fun emitValue _ = ()
51 fun sizeOf _ = 0
52 fun adjustLabels _ = false
53 end
54
55 structure MDLPseudoOps =
56 PseudoOps(structure Client = MDLClientPseudoOps)
57
58 structure MDLStream = InstructionStream(MDLPseudoOps)
59
60 structure MDLMLTreeUtil =
61 MLTreeUtils(structure T = MDLMLTree
62 fun hashSext _ _ = 0w0
63 fun hashRext _ _ = 0w0
64 fun hashFext _ _ = 0w0
65 fun hashCCext _ _ = 0w0
66 fun eqSext _ _ = false
67 fun eqRext _ _ = false
68 fun eqFext _ _ = false
69 fun eqCCext _ _ = false
70 fun showSext _ _ = ""
71 fun showRext _ _ = ""
72 fun showFext _ _ = ""
73 fun showCCext _ _ = ""
74 )
75
76 structure MDLMLTreeRewrite =
77 MLTreeRewrite(structure T = MDLMLTree
78 fun sext _ x = x
79 fun rext _ x = x
80 fun fext _ x = x
81 fun ccext _ x = x
82 )
83
84 structure MDLMLTreeFold =
85 MLTreeFold(structure T = MDLMLTree
86 fun sext _ (_,x) = x
87 fun rext _ (_,_,x) = x
88 fun fext _ (_,_,x) = x
89 fun ccext _ (_,_,x) = x
90 )
91
92 structure MDLMLTreeRTL =
93 MLTreeRTL(structure Util = MDLMLTreeUtil
94 structure Rewrite = MDLMLTreeRewrite
95 structure Fold = MDLMLTreeFold
96 )
97
98 structure MDLRTLBuilder = RTLBuild(MDLMLTreeRTL)