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/branches/idlbasis-devel/src/MLRISC/alpha/instructions/alphaInstr.sml
ViewVC logotype

Diff of /sml/branches/idlbasis-devel/src/MLRISC/alpha/instructions/alphaInstr.sml

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

revision 1231, Mon Jun 3 18:32:08 2002 UTC revision 1232, Tue Jun 4 21:11:15 2002 UTC
# Line 8  Line 8 
8  signature ALPHAINSTR =  signature ALPHAINSTR =
9  sig  sig
10     structure C : ALPHACELLS     structure C : ALPHACELLS
11       structure CB : CELLS_BASIS = CellsBasis
12     structure T : MLTREE     structure T : MLTREE
13     structure Constant: CONSTANT     structure Constant: CONSTANT
14     structure Region : REGION     structure Region : REGION
# Line 16  Line 17 
17     datatype ea =     datatype ea =
18       Direct of CellsBasis.cell       Direct of CellsBasis.cell
19     | FDirect of CellsBasis.cell     | FDirect of CellsBasis.cell
20     | Displace of {base:CellsBasis.cell, disp:int}     | Displace of {base:CellsBasis.cell, disp:T.labexp, mem:Region.region}
21     datatype operand =     datatype operand =
22       REGop of CellsBasis.cell       REGop of CellsBasis.cell
23     | IMMop of int     | IMMop of int
# Line 215  Line 216 
216     | RDUNIQUE     | RDUNIQUE
217     | WRUNIQUE     | WRUNIQUE
218     type addressing_mode = CellsBasis.cell * operand     type addressing_mode = CellsBasis.cell * operand
219     datatype instruction =     datatype instr =
220       DEFFREG of CellsBasis.cell       LDA of {r:CellsBasis.cell, b:CellsBasis.cell, d:operand}
    | LDA of {r:CellsBasis.cell, b:CellsBasis.cell, d:operand}  
221     | LDAH of {r:CellsBasis.cell, b:CellsBasis.cell, d:operand}     | LDAH of {r:CellsBasis.cell, b:CellsBasis.cell, d:operand}
222     | LOAD of {ldOp:load, r:CellsBasis.cell, b:CellsBasis.cell, d:operand, mem:Region.region}     | LOAD of {ldOp:load, r:CellsBasis.cell, b:CellsBasis.cell, d:operand, mem:Region.region}
223     | STORE of {stOp:store, r:CellsBasis.cell, b:CellsBasis.cell, d:operand,     | STORE of {stOp:store, r:CellsBasis.cell, b:CellsBasis.cell, d:operand,
# Line 239  Line 239 
239     | CMOVE of {oper:cmove, ra:CellsBasis.cell, rb:operand, rc:CellsBasis.cell}     | CMOVE of {oper:cmove, ra:CellsBasis.cell, rb:operand, rc:CellsBasis.cell}
240     | PSEUDOARITH of {oper:pseudo_op, ra:CellsBasis.cell, rb:operand, rc:CellsBasis.cell,     | PSEUDOARITH of {oper:pseudo_op, ra:CellsBasis.cell, rb:operand, rc:CellsBasis.cell,
241          tmps:C.cellset}          tmps:C.cellset}
    | COPY of {dst:(CellsBasis.cell) list, src:(CellsBasis.cell) list, impl:instruction list option ref,  
         tmp:ea option}  
    | FCOPY of {dst:(CellsBasis.cell) list, src:(CellsBasis.cell) list, impl:instruction list option ref,  
         tmp:ea option}  
242     | FUNARY of {oper:funary, fb:CellsBasis.cell, fc:CellsBasis.cell}     | FUNARY of {oper:funary, fb:CellsBasis.cell, fc:CellsBasis.cell}
243     | FOPERATE of {oper:foperate, fa:CellsBasis.cell, fb:CellsBasis.cell, fc:CellsBasis.cell}     | FOPERATE of {oper:foperate, fa:CellsBasis.cell, fb:CellsBasis.cell, fc:CellsBasis.cell}
244     | FOPERATEV of {oper:foperateV, fa:CellsBasis.cell, fb:CellsBasis.cell,     | FOPERATEV of {oper:foperateV, fa:CellsBasis.cell, fb:CellsBasis.cell,
# Line 250  Line 246 
246     | FCMOVE of {oper:fcmove, fa:CellsBasis.cell, fb:CellsBasis.cell, fc:CellsBasis.cell}     | FCMOVE of {oper:fcmove, fa:CellsBasis.cell, fb:CellsBasis.cell, fc:CellsBasis.cell}
247     | TRAPB     | TRAPB
248     | CALL_PAL of {code:osf_user_palcode, def:C.cellset, use:C.cellset}     | CALL_PAL of {code:osf_user_palcode, def:C.cellset, use:C.cellset}
    | ANNOTATION of {i:instruction, a:Annotations.annotation}  
249     | SOURCE of {}     | SOURCE of {}
250     | SINK of {}     | SINK of {}
251     | PHI of {}     | PHI of {}
252       and instruction =
253         LIVE of {regs: C.cellset, spilled: C.cellset}
254       | KILL of {regs: C.cellset, spilled: C.cellset}
255       | COPY of {k: CellsBasis.cellkind,
256                  sz: int,          (* in bits *)
257                  dst: CellsBasis.cell list,
258                  src: CellsBasis.cell list,
259                  tmp: ea option (* NONE if |dst| = {src| = 1 *)}
260       | ANNOTATION of {i:instruction, a:Annotations.annotation}
261       | INSTR of instr
262       val lda : {r:CellsBasis.cell, b:CellsBasis.cell, d:operand} -> instruction
263       val ldah : {r:CellsBasis.cell, b:CellsBasis.cell, d:operand} -> instruction
264       val load : {ldOp:load, r:CellsBasis.cell, b:CellsBasis.cell, d:operand,
265          mem:Region.region} -> instruction
266       val store : {stOp:store, r:CellsBasis.cell, b:CellsBasis.cell, d:operand,
267          mem:Region.region} -> instruction
268       val fload : {ldOp:fload, r:CellsBasis.cell, b:CellsBasis.cell, d:operand,
269          mem:Region.region} -> instruction
270       val fstore : {stOp:fstore, r:CellsBasis.cell, b:CellsBasis.cell, d:operand,
271          mem:Region.region} -> instruction
272       val jmpl : {r:CellsBasis.cell, b:CellsBasis.cell, d:int} * Label.label list -> instruction
273       val jsr : {r:CellsBasis.cell, b:CellsBasis.cell, d:int, defs:C.cellset,
274          uses:C.cellset, cutsTo:Label.label list, mem:Region.region} -> instruction
275       val bsr : {r:CellsBasis.cell, lab:Label.label, defs:C.cellset, uses:C.cellset,
276          cutsTo:Label.label list, mem:Region.region} -> instruction
277       val ret : {r:CellsBasis.cell, b:CellsBasis.cell, d:int} -> instruction
278       val branch : {b:branch, r:CellsBasis.cell, lab:Label.label} -> instruction
279       val fbranch : {b:fbranch, f:CellsBasis.cell, lab:Label.label} -> instruction
280       val operate : {oper:operate, ra:CellsBasis.cell, rb:operand, rc:CellsBasis.cell} -> instruction
281       val operatev : {oper:operateV, ra:CellsBasis.cell, rb:operand, rc:CellsBasis.cell} -> instruction
282       val cmove : {oper:cmove, ra:CellsBasis.cell, rb:operand, rc:CellsBasis.cell} -> instruction
283       val pseudoarith : {oper:pseudo_op, ra:CellsBasis.cell, rb:operand, rc:CellsBasis.cell,
284          tmps:C.cellset} -> instruction
285       val funary : {oper:funary, fb:CellsBasis.cell, fc:CellsBasis.cell} -> instruction
286       val foperate : {oper:foperate, fa:CellsBasis.cell, fb:CellsBasis.cell, fc:CellsBasis.cell} -> instruction
287       val foperatev : {oper:foperateV, fa:CellsBasis.cell, fb:CellsBasis.cell,
288          fc:CellsBasis.cell} -> instruction
289       val fcmove : {oper:fcmove, fa:CellsBasis.cell, fb:CellsBasis.cell, fc:CellsBasis.cell} -> instruction
290       val trapb : instruction
291       val call_pal : {code:osf_user_palcode, def:C.cellset, use:C.cellset} -> instruction
292       val source : {} -> instruction
293       val sink : {} -> instruction
294       val phi : {} -> instruction
295  end  end
296    
297  functor AlphaInstr(T: MLTREE  functor AlphaInstr(T: MLTREE
298                    ) : ALPHAINSTR =                    ) : ALPHAINSTR =
299  struct  struct
300     structure C = AlphaCells     structure C = AlphaCells
301       structure CB = CellsBasis
302     structure T = T     structure T = T
303     structure Region = T.Region     structure Region = T.Region
304     structure Constant = T.Constant     structure Constant = T.Constant
305     datatype ea =     datatype ea =
306       Direct of CellsBasis.cell       Direct of CellsBasis.cell
307     | FDirect of CellsBasis.cell     | FDirect of CellsBasis.cell
308     | Displace of {base:CellsBasis.cell, disp:int}     | Displace of {base:CellsBasis.cell, disp:T.labexp, mem:Region.region}
309     datatype operand =     datatype operand =
310       REGop of CellsBasis.cell       REGop of CellsBasis.cell
311     | IMMop of int     | IMMop of int
# Line 465  Line 504 
504     | RDUNIQUE     | RDUNIQUE
505     | WRUNIQUE     | WRUNIQUE
506     type addressing_mode = CellsBasis.cell * operand     type addressing_mode = CellsBasis.cell * operand
507     datatype instruction =     datatype instr =
508       DEFFREG of CellsBasis.cell       LDA of {r:CellsBasis.cell, b:CellsBasis.cell, d:operand}
    | LDA of {r:CellsBasis.cell, b:CellsBasis.cell, d:operand}  
509     | LDAH of {r:CellsBasis.cell, b:CellsBasis.cell, d:operand}     | LDAH of {r:CellsBasis.cell, b:CellsBasis.cell, d:operand}
510     | LOAD of {ldOp:load, r:CellsBasis.cell, b:CellsBasis.cell, d:operand, mem:Region.region}     | LOAD of {ldOp:load, r:CellsBasis.cell, b:CellsBasis.cell, d:operand, mem:Region.region}
511     | STORE of {stOp:store, r:CellsBasis.cell, b:CellsBasis.cell, d:operand,     | STORE of {stOp:store, r:CellsBasis.cell, b:CellsBasis.cell, d:operand,
# Line 489  Line 527 
527     | CMOVE of {oper:cmove, ra:CellsBasis.cell, rb:operand, rc:CellsBasis.cell}     | CMOVE of {oper:cmove, ra:CellsBasis.cell, rb:operand, rc:CellsBasis.cell}
528     | PSEUDOARITH of {oper:pseudo_op, ra:CellsBasis.cell, rb:operand, rc:CellsBasis.cell,     | PSEUDOARITH of {oper:pseudo_op, ra:CellsBasis.cell, rb:operand, rc:CellsBasis.cell,
529          tmps:C.cellset}          tmps:C.cellset}
    | COPY of {dst:(CellsBasis.cell) list, src:(CellsBasis.cell) list, impl:instruction list option ref,  
         tmp:ea option}  
    | FCOPY of {dst:(CellsBasis.cell) list, src:(CellsBasis.cell) list, impl:instruction list option ref,  
         tmp:ea option}  
530     | FUNARY of {oper:funary, fb:CellsBasis.cell, fc:CellsBasis.cell}     | FUNARY of {oper:funary, fb:CellsBasis.cell, fc:CellsBasis.cell}
531     | FOPERATE of {oper:foperate, fa:CellsBasis.cell, fb:CellsBasis.cell, fc:CellsBasis.cell}     | FOPERATE of {oper:foperate, fa:CellsBasis.cell, fb:CellsBasis.cell, fc:CellsBasis.cell}
532     | FOPERATEV of {oper:foperateV, fa:CellsBasis.cell, fb:CellsBasis.cell,     | FOPERATEV of {oper:foperateV, fa:CellsBasis.cell, fb:CellsBasis.cell,
# Line 500  Line 534 
534     | FCMOVE of {oper:fcmove, fa:CellsBasis.cell, fb:CellsBasis.cell, fc:CellsBasis.cell}     | FCMOVE of {oper:fcmove, fa:CellsBasis.cell, fb:CellsBasis.cell, fc:CellsBasis.cell}
535     | TRAPB     | TRAPB
536     | CALL_PAL of {code:osf_user_palcode, def:C.cellset, use:C.cellset}     | CALL_PAL of {code:osf_user_palcode, def:C.cellset, use:C.cellset}
    | ANNOTATION of {i:instruction, a:Annotations.annotation}  
537     | SOURCE of {}     | SOURCE of {}
538     | SINK of {}     | SINK of {}
539     | PHI of {}     | PHI of {}
540       and instruction =
541         LIVE of {regs: C.cellset, spilled: C.cellset}
542       | KILL of {regs: C.cellset, spilled: C.cellset}
543       | COPY of {k: CellsBasis.cellkind,
544                  sz: int,          (* in bits *)
545                  dst: CellsBasis.cell list,
546                  src: CellsBasis.cell list,
547                  tmp: ea option (* NONE if |dst| = {src| = 1 *)}
548       | ANNOTATION of {i:instruction, a:Annotations.annotation}
549       | INSTR of instr
550       val lda = INSTR o LDA
551       and ldah = INSTR o LDAH
552       and load = INSTR o LOAD
553       and store = INSTR o STORE
554       and fload = INSTR o FLOAD
555       and fstore = INSTR o FSTORE
556       and jmpl = INSTR o JMPL
557       and jsr = INSTR o JSR
558       and bsr = INSTR o BSR
559       and ret = INSTR o RET
560       and branch = INSTR o BRANCH
561       and fbranch = INSTR o FBRANCH
562       and operate = INSTR o OPERATE
563       and operatev = INSTR o OPERATEV
564       and cmove = INSTR o CMOVE
565       and pseudoarith = INSTR o PSEUDOARITH
566       and funary = INSTR o FUNARY
567       and foperate = INSTR o FOPERATE
568       and foperatev = INSTR o FOPERATEV
569       and fcmove = INSTR o FCMOVE
570       and trapb = INSTR TRAPB
571       and call_pal = INSTR o CALL_PAL
572       and source = INSTR o SOURCE
573       and sink = INSTR o SINK
574       and phi = INSTR o PHI
575  end  end
576    

Legend:
Removed from v.1231  
changed lines
  Added in v.1232

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