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/MLRISC/alpha32/alpha32Shuffle.sml
ViewVC logotype

Annotation of /sml/trunk/src/MLRISC/alpha32/alpha32Shuffle.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 114 - (view) (download)

1 : monnier 16 functor Alpha32Shuffle(I:ALPHA32INSTR) = struct
2 :     structure I = I
3 :     structure Shuffle = Shuffle(I)
4 :    
5 :     val mem=I.Region.memory
6 :    
7 :     type t = {regMap:int->int, temp:I.ea option, dst:int list, src:int list}
8 :     fun move{src=I.Direct rs, dst=I.Direct rd} =
9 :     [I.OPERATE{oper=I.BIS, ra=rs, rb=I.REGop 31, rc=rd}]
10 :     | move{src=I.Direct rs, dst=I.Displace{base, disp}} =
11 :     [I.STORE{stOp=I.STL, r=rs, b=base, d=I.IMMop disp, mem=mem}]
12 :     | move{src=I.Displace{base, disp}, dst=I.Direct rt} =
13 :     [I.LOAD{ldOp=I.LDL, r=rt, b=base, d=I.IMMop disp, mem=mem}]
14 :    
15 :     fun fmove{src=I.FDirect fs, dst=I.FDirect fd} =
16 :     [I.FOPERATE{oper=I.CPYS, fa=fs, fb=fs, fc=fd}]
17 :     | fmove{src=I.FDirect fs, dst=I.Displace{base, disp}} =
18 :     [I.FSTORE{stOp=I.STT, r=fs, b=base, d=I.IMMop disp, mem=mem}]
19 :     | fmove{src=I.Displace{base, disp}, dst=I.FDirect ft} =
20 :     [I.FLOAD{ldOp=I.LDT, r=ft, b=base, d=I.IMMop disp, mem=mem}]
21 :    
22 : monnier 106 val shuffle = Shuffle.shuffle {mvInstr=move, ea=I.Direct}
23 : monnier 16
24 : monnier 106 val shufflefp = Shuffle.shuffle {mvInstr=fmove, ea=I.FDirect}
25 : monnier 16 end
26 :    
27 :     (*
28 : monnier 113 * $Log$
29 : monnier 16 *)

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