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/alpha/instructions/alphaShuffle.sml
ViewVC logotype

Annotation of /sml/trunk/src/MLRISC/alpha/instructions/alphaShuffle.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1003 - (view) (download)

1 : monnier 409 functor AlphaShuffle(I:ALPHAINSTR) : ALPHASHUFFLE = struct
2 :     structure I = I
3 :     structure Shuffle = Shuffle(I)
4 :    
5 : george 889 type t = {tmp:I.ea option, dst:CellsBasis.cell list, src:CellsBasis.cell list}
6 : monnier 409
7 :     val mem=I.Region.memory
8 :    
9 : george 889 val zeroR = I.REGop(Option.valOf(I.C.zeroReg CellsBasis.GP))
10 : leunga 744
11 : monnier 409 fun move{src=I.Direct rs, dst=I.Direct rd} =
12 : george 1003 [I.operate{oper=I.BIS, ra=rs, rb=zeroR, rc=rd}]
13 : monnier 409 | move{src=I.Direct rs, dst=I.Displace{base, disp}} =
14 : george 1003 [I.store{stOp=I.STL, r=rs, b=base, d=I.IMMop disp, mem=mem}]
15 : monnier 409 | move{src=I.Displace{base, disp}, dst=I.Direct rt} =
16 : george 1003 [I.load{ldOp=I.LDL, r=rt, b=base, d=I.IMMop disp, mem=mem}]
17 : monnier 409
18 :     fun fmove{src=I.FDirect fs, dst=I.FDirect fd} =
19 : george 1003 [I.foperate{oper=I.CPYS, fa=fs, fb=fs, fc=fd}]
20 : monnier 409 | fmove{src=I.FDirect fs, dst=I.Displace{base, disp}} =
21 : george 1003 [I.fstore{stOp=I.STT, r=fs, b=base, d=I.IMMop disp, mem=mem}]
22 : monnier 409 | fmove{src=I.Displace{base, disp}, dst=I.FDirect ft} =
23 : george 1003 [I.fload{ldOp=I.LDT, r=ft, b=base, d=I.IMMop disp, mem=mem}]
24 : monnier 409
25 :     val shuffle = Shuffle.shuffle {mvInstr=move, ea=I.Direct}
26 :    
27 :     val shufflefp = Shuffle.shuffle {mvInstr=fmove, ea=I.FDirect}
28 :     end
29 :    

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