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 1033 - (view) (download)

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

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