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

SCM Repository

[smlnj] Diff of /sml/trunk/src/MLRISC/ppc/instructions/ppcInstr.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/ppc/instructions/ppcInstr.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1002, Fri Nov 30 17:11:33 2001 UTC revision 1003, Fri Dec 7 02:45:32 2001 UTC
# Line 8  Line 8 
8  signature PPCINSTR =  signature PPCINSTR =
9  sig  sig
10     structure C : PPCCELLS     structure C : PPCCELLS
11       structure CB : CELLS_BASIS
12     structure T : MLTREE     structure T : MLTREE
13     structure Constant: CONSTANT     structure Constant: CONSTANT
14     structure Region : REGION     structure Region : REGION
# Line 187  Line 188 
188     | OV32     | OV32
189     | CA32     | CA32
190     type cr_bit = (CellsBasis.cell) * bit     type cr_bit = (CellsBasis.cell) * bit
191     datatype instruction =     datatype instr =
192       L of {ld:load, rt:CellsBasis.cell, ra:CellsBasis.cell, d:operand, mem:Region.region}       L of {ld:load, rt:CellsBasis.cell, ra:CellsBasis.cell, d:operand, mem:Region.region}
193     | LF of {ld:fload, ft:CellsBasis.cell, ra:CellsBasis.cell, d:operand, mem:Region.region}     | LF of {ld:fload, ft:CellsBasis.cell, ra:CellsBasis.cell, d:operand, mem:Region.region}
194     | ST of {st:store, rs:CellsBasis.cell, ra:CellsBasis.cell, d:operand, mem:Region.region}     | ST of {st:store, rs:CellsBasis.cell, ra:CellsBasis.cell, d:operand, mem:Region.region}
# Line 223  Line 224 
224          tmp:ea option}          tmp:ea option}
225     | FCOPY of {dst:(CellsBasis.cell) list, src:(CellsBasis.cell) list, impl:instruction list option ref,     | FCOPY of {dst:(CellsBasis.cell) list, src:(CellsBasis.cell) list, impl:instruction list option ref,
226          tmp:ea option}          tmp:ea option}
    | ANNOTATION of {i:instruction, a:Annotations.annotation}  
227     | SOURCE of {}     | SOURCE of {}
228     | SINK of {}     | SINK of {}
229     | PHI of {}     | PHI of {}
230       and instruction =
231         LIVE of {regs: C.cellset, spilled: C.cellset}
232       | KILL of {regs: C.cellset, spilled: C.cellset}
233       | COPYXXX of {k: CB.cellkind, dst: CB.cell list, src: CB.cell list}
234       | ANNOTATION of {i:instruction, a:Annotations.annotation}
235       | INSTR of instr
236       val l : {ld:load, rt:CellsBasis.cell, ra:CellsBasis.cell, d:operand, mem:Region.region} -> instruction
237       val lf : {ld:fload, ft:CellsBasis.cell, ra:CellsBasis.cell, d:operand, mem:Region.region} -> instruction
238       val st : {st:store, rs:CellsBasis.cell, ra:CellsBasis.cell, d:operand, mem:Region.region} -> instruction
239       val stf : {st:fstore, fs:CellsBasis.cell, ra:CellsBasis.cell, d:operand,
240          mem:Region.region} -> instruction
241       val unary : {oper:unary, rt:CellsBasis.cell, ra:CellsBasis.cell, Rc:bool,
242          OE:bool} -> instruction
243       val arith : {oper:arith, rt:CellsBasis.cell, ra:CellsBasis.cell, rb:CellsBasis.cell,
244          Rc:bool, OE:bool} -> instruction
245       val arithi : {oper:arithi, rt:CellsBasis.cell, ra:CellsBasis.cell, im:operand} -> instruction
246       val rotate : {oper:rotate, ra:CellsBasis.cell, rs:CellsBasis.cell, sh:CellsBasis.cell,
247          mb:int, me:int option} -> instruction
248       val rotatei : {oper:rotatei, ra:CellsBasis.cell, rs:CellsBasis.cell, sh:operand,
249          mb:int, me:int option} -> instruction
250       val compare : {cmp:cmp, l:bool, bf:CellsBasis.cell, ra:CellsBasis.cell,
251          rb:operand} -> instruction
252       val fcompare : {cmp:fcmp, bf:CellsBasis.cell, fa:CellsBasis.cell, fb:CellsBasis.cell} -> instruction
253       val funary : {oper:funary, ft:CellsBasis.cell, fb:CellsBasis.cell, Rc:bool} -> instruction
254       val farith : {oper:farith, ft:CellsBasis.cell, fa:CellsBasis.cell, fb:CellsBasis.cell,
255          Rc:bool} -> instruction
256       val farith3 : {oper:farith3, ft:CellsBasis.cell, fa:CellsBasis.cell, fb:CellsBasis.cell,
257          fc:CellsBasis.cell, Rc:bool} -> instruction
258       val ccarith : {oper:ccarith, bt:cr_bit, ba:cr_bit, bb:cr_bit} -> instruction
259       val mcrf : {bf:CellsBasis.cell, bfa:CellsBasis.cell} -> instruction
260       val mtspr : {rs:CellsBasis.cell, spr:CellsBasis.cell} -> instruction
261       val mfspr : {rt:CellsBasis.cell, spr:CellsBasis.cell} -> instruction
262       val tw : {to:int, ra:CellsBasis.cell, si:operand} -> instruction
263       val td : {to:int, ra:CellsBasis.cell, si:operand} -> instruction
264       val bc : {bo:bo, bf:CellsBasis.cell, bit:bit, addr:operand, LK:bool, fall:operand} -> instruction
265       val bclr : {bo:bo, bf:CellsBasis.cell, bit:bit, LK:bool, labels:Label.label list} -> instruction
266       val b : {addr:operand, LK:bool} -> instruction
267       val call : {def:C.cellset, use:C.cellset, cutsTo:Label.label list, mem:Region.region} -> instruction
268       val copy : {dst:(CellsBasis.cell) list, src:(CellsBasis.cell) list, impl:instruction list option ref,
269          tmp:ea option} -> instruction
270       val fcopy : {dst:(CellsBasis.cell) list, src:(CellsBasis.cell) list, impl:instruction list option ref,
271          tmp:ea option} -> instruction
272       val source : {} -> instruction
273       val sink : {} -> instruction
274       val phi : {} -> instruction
275  end  end
276    
277  functor PPCInstr(T: MLTREE  functor PPCInstr(T: MLTREE
278                  ) : PPCINSTR =                  ) : PPCINSTR =
279  struct  struct
280     structure C = PPCCells     structure C = PPCCells
281       structure CB = CellsBasis
282     structure T = T     structure T = T
283     structure Region = T.Region     structure Region = T.Region
284     structure Constant = T.Constant     structure Constant = T.Constant
# Line 410  Line 456 
456     | OV32     | OV32
457     | CA32     | CA32
458     type cr_bit = (CellsBasis.cell) * bit     type cr_bit = (CellsBasis.cell) * bit
459     datatype instruction =     datatype instr =
460       L of {ld:load, rt:CellsBasis.cell, ra:CellsBasis.cell, d:operand, mem:Region.region}       L of {ld:load, rt:CellsBasis.cell, ra:CellsBasis.cell, d:operand, mem:Region.region}
461     | LF of {ld:fload, ft:CellsBasis.cell, ra:CellsBasis.cell, d:operand, mem:Region.region}     | LF of {ld:fload, ft:CellsBasis.cell, ra:CellsBasis.cell, d:operand, mem:Region.region}
462     | ST of {st:store, rs:CellsBasis.cell, ra:CellsBasis.cell, d:operand, mem:Region.region}     | ST of {st:store, rs:CellsBasis.cell, ra:CellsBasis.cell, d:operand, mem:Region.region}
# Line 446  Line 492 
492          tmp:ea option}          tmp:ea option}
493     | FCOPY of {dst:(CellsBasis.cell) list, src:(CellsBasis.cell) list, impl:instruction list option ref,     | FCOPY of {dst:(CellsBasis.cell) list, src:(CellsBasis.cell) list, impl:instruction list option ref,
494          tmp:ea option}          tmp:ea option}
    | ANNOTATION of {i:instruction, a:Annotations.annotation}  
495     | SOURCE of {}     | SOURCE of {}
496     | SINK of {}     | SINK of {}
497     | PHI of {}     | PHI of {}
498       and instruction =
499         LIVE of {regs: C.cellset, spilled: C.cellset}
500       | KILL of {regs: C.cellset, spilled: C.cellset}
501       | COPYXXX of {k: CB.cellkind, dst: CB.cell list, src: CB.cell list}
502       | ANNOTATION of {i:instruction, a:Annotations.annotation}
503       | INSTR of instr
504       val l = INSTR o L
505       and lf = INSTR o LF
506       and st = INSTR o ST
507       and stf = INSTR o STF
508       and unary = INSTR o UNARY
509       and arith = INSTR o ARITH
510       and arithi = INSTR o ARITHI
511       and rotate = INSTR o ROTATE
512       and rotatei = INSTR o ROTATEI
513       and compare = INSTR o COMPARE
514       and fcompare = INSTR o FCOMPARE
515       and funary = INSTR o FUNARY
516       and farith = INSTR o FARITH
517       and farith3 = INSTR o FARITH3
518       and ccarith = INSTR o CCARITH
519       and mcrf = INSTR o MCRF
520       and mtspr = INSTR o MTSPR
521       and mfspr = INSTR o MFSPR
522       and tw = INSTR o TW
523       and td = INSTR o TD
524       and bc = INSTR o BC
525       and bclr = INSTR o BCLR
526       and b = INSTR o B
527       and call = INSTR o CALL
528       and copy = INSTR o COPY
529       and fcopy = INSTR o FCOPY
530       and source = INSTR o SOURCE
531       and sink = INSTR o SINK
532       and phi = INSTR o PHI
533  end  end
534    

Legend:
Removed from v.1002  
changed lines
  Added in v.1003

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