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

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