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/ppc/instructions/ppcShuffle.sml
ViewVC logotype

Annotation of /sml/trunk/src/MLRISC/ppc/instructions/ppcShuffle.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1003 - (view) (download)

1 : monnier 245 functor PPCShuffle(I:PPCINSTR) = struct
2 :     structure I = I
3 :     structure Shuffle = Shuffle(I)
4 :    
5 :     val mem=I.Region.memory
6 :    
7 : george 889 type t = {tmp:I.ea option, dst:CellsBasis.cell list, src:CellsBasis.cell list}
8 : monnier 245
9 : monnier 411 fun error msg = MLRiscErrorMsg.error("PPCShuffle",msg)
10 : monnier 245
11 : monnier 411 (* WARNING: these move operators assume 32 bit addressing is used!
12 :     * Allen
13 :     *)
14 : monnier 245 fun move{src=I.Direct rs, dst=I.Direct rd} =
15 : george 1003 [I.arith{oper=I.OR, rt=rd, ra=rs, rb=rs, Rc=false, OE=false}]
16 : monnier 245 | move{src=I.Direct rs, dst=I.Displace{base, disp}} =
17 : george 1003 [I.st{st=I.STW, rs=rs, ra=base, d=disp, mem=mem}]
18 : monnier 245 | move{src=I.Displace{base, disp}, dst=I.Direct rt} =
19 : george 1003 [I.l{ld=I.LWZ, rt=rt, ra=base, d=disp, mem=mem}]
20 : monnier 245 | move _ = error "move"
21 :    
22 :     fun fmove{src=I.FDirect fs, dst=I.FDirect fd} =
23 : george 1003 [I.funary{oper=I.FMR, fb=fs, ft=fd, Rc=false}]
24 : monnier 245 | fmove{src=I.FDirect fs, dst=I.Displace{base, disp}} =
25 : george 1003 [I.stf{st=I.STFD, fs=fs, ra=base, d=disp, mem=mem}]
26 : monnier 245 | fmove{src=I.Displace{base, disp}, dst=I.FDirect ft} =
27 : george 1003 [I.lf{ld=I.LFD, ft=ft, ra=base, d=disp, mem=mem}]
28 : monnier 245 | fmove _ = error "fmove"
29 :    
30 :     val shuffle = Shuffle.shuffle {mvInstr=move, ea=I.Direct}
31 :    
32 :     val shufflefp = Shuffle.shuffle {mvInstr=fmove, ea=I.FDirect}
33 :     end

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