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/compiler/CodeGen/ppc/ppcCG.sml
ViewVC logotype

Annotation of /sml/trunk/src/compiler/CodeGen/ppc/ppcCG.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1532 - (view) (download)

1 : monnier 429 (*
2 :     * PPC specific backend
3 :     *)
4 :     structure PPCCG =
5 :     MachineGen
6 :     ( structure MachSpec = PPCSpec
7 : george 1033 structure T = PPCMLTree
8 : george 1009 structure CB = CellsBasis
9 : george 984 structure ClientPseudoOps = PPCClientPseudoOps
10 : monnier 429 structure PseudoOps = PPCPseudoOps
11 : blume 773 structure Ext = SMLNJMLTreeExt(* generic extension *)
12 : monnier 429 structure CpsRegs = PPCCpsRegs
13 : monnier 475 structure InsnProps = PPCProps
14 : monnier 429 structure Asm = PPCAsmEmitter
15 : george 555 structure Shuffle = PPCShuffle
16 : monnier 247
17 : mblume 1532 structure CCalls =
18 :     PPCMacOSX_CCalls (structure T = PPCMLTree fun ix x = x)
19 :     (* DummyCCallsFn (PPCMLTree) *)
20 : blume 773
21 : george 823 structure OmitFramePtr = struct
22 : george 909 structure CFG=PPCCFG
23 : george 823 structure I=PPCInstr
24 :     val vfp = PPCCpsRegs.vfp
25 : mblume 1532 (* no rewriting necessary, backend does not change sp *)
26 :     fun omitframeptr _ = ()
27 : george 823 end
28 :    
29 : monnier 429 structure MLTreeComp=
30 :     PPC(structure PPCInstr = PPCInstr
31 :     structure PPCMLTree = PPCMLTree
32 :     structure PseudoInstrs=
33 :     PPCPseudoInstr(structure Instr=PPCInstr)
34 : george 555 structure ExtensionComp = SMLNJMLTreeExtComp
35 :     (structure I = PPCInstr
36 :     structure T = PPCMLTree
37 : george 909 structure CFG = PPCCFG
38 : george 984 structure TS = PPCMLTreeStream
39 : george 555 )
40 : monnier 429 val bit64mode=false
41 :     val multCost=ref 6 (* an estimate *)
42 :     )
43 : monnier 247
44 : leunga 657 structure Jumps =
45 : monnier 429 PPCJumps(structure Instr=PPCInstr
46 : george 984 structure MLTreeEval=PPCMLTreeEval
47 : monnier 429 structure Shuffle=PPCShuffle)
48 : monnier 247
49 : monnier 429 structure BackPatch =
50 : george 909 BBSched2(structure CFG = PPCCFG
51 : leunga 657 structure Jumps = Jumps
52 : george 1124 structure Props = PPCProps
53 : monnier 429 structure Emitter = PPCMCEmitter)
54 : monnier 411
55 : monnier 429 structure RA =
56 : leunga 744 RISC_RA
57 : monnier 429 (structure I = PPCInstr
58 : george 1033 structure CFG = PPCCFG
59 : monnier 429 structure CpsRegs = PPCCpsRegs
60 :     structure InsnProps = InsnProps
61 :     structure Rewrite = PPCRewrite(PPCInstr)
62 : george 1033 structure SpillInstr= PPCSpillInstr(PPCInstr)
63 : monnier 429 structure Asm = PPCAsmEmitter
64 : leunga 744 structure SpillHeur = ChaitinSpillHeur
65 :     structure Spill = RASpill(structure InsnProps = InsnProps
66 :     structure Asm = PPCAsmEmitter)
67 : monnier 247
68 : leunga 744 structure SpillTable = SpillTable(PPCSpec)
69 :    
70 :     val architecture = PPCSpec.architecture
71 :    
72 : george 1033 datatype spillOperandKind = SPILL_LOC | CONST_VAL
73 :     type spill_info = unit
74 : leunga 744
75 : george 1033 fun beforeRA _ = SpillTable.spillInit()
76 :    
77 : monnier 429 val sp = I.C.stackptrR
78 : monnier 498 val spill = CPSRegions.spill
79 : monnier 247
80 : monnier 469 fun pure _ = false
81 :    
82 : leunga 744 structure Int =
83 :     struct
84 :     val avail = PPCCpsRegs.availR
85 :     val dedicated = PPCCpsRegs.dedicatedR
86 : monnier 247
87 : george 1033 fun mkDisp loc = T.LI(T.I.fromInt(32, SpillTable.getRegLoc loc))
88 : monnier 247
89 : george 1033 fun spillLoc{info, an, cell, id} =
90 :     {opnd=I.Displace{base=sp, disp=mkDisp(RAGraph.FRAME id), mem=spill},
91 :     kind=SPILL_LOC}
92 : monnier 247
93 : leunga 796 val mode = RACore.NO_OPTIMIZATION
94 : leunga 744 end
95 :     structure Float =
96 :     struct
97 :     val avail = PPCCpsRegs.availF
98 :     val dedicated = PPCCpsRegs.dedicatedF
99 :    
100 : george 1033 fun mkDisp loc = T.LI(T.I.fromInt(32, SpillTable.getFregLoc loc))
101 : george 1009
102 : george 1033 fun spillLoc(S, an, loc) =
103 :     I.Displace{base=sp, disp=mkDisp(RAGraph.FRAME loc), mem=spill}
104 : george 1009
105 : leunga 796 val mode = RACore.NO_OPTIMIZATION
106 : leunga 744 end
107 :     )
108 : monnier 429 )

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