Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/branches/SMLNJ/src/MLRISC/alpha/instructions/alphaShuffle.sml
ViewVC logotype

View of /sml/branches/SMLNJ/src/MLRISC/alpha/instructions/alphaShuffle.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 429 - (download) (annotate)
Wed Sep 8 09:47:00 1999 UTC (20 years, 3 months ago) by monnier
File size: 1079 byte(s)
version 110.21
functor AlphaShuffle(I:ALPHAINSTR) : ALPHASHUFFLE = struct
  structure I = I
  structure Shuffle = Shuffle(I)

  type t = {regmap:I.C.cell->I.C.cell, tmp:I.ea option,
            dst:I.C.cell list, src:I.C.cell list}

  val mem=I.Region.memory

  fun move{src=I.Direct rs, dst=I.Direct rd} = 
        [I.OPERATE{oper=I.BIS, ra=rs, rb=I.REGop 31, rc=rd}]
    | move{src=I.Direct rs, dst=I.Displace{base, disp}} = 
	[I.STORE{stOp=I.STL, r=rs, b=base, d=I.IMMop disp, mem=mem}]
    | move{src=I.Displace{base, disp}, dst=I.Direct rt} = 
	[I.LOAD{ldOp=I.LDL, r=rt, b=base, d=I.IMMop disp, mem=mem}]

  fun fmove{src=I.FDirect fs, dst=I.FDirect fd} = 
        [I.FOPERATE{oper=I.CPYS, fa=fs, fb=fs, fc=fd}]
    | fmove{src=I.FDirect fs, dst=I.Displace{base, disp}} = 
	[I.FSTORE{stOp=I.STT, r=fs, b=base, d=I.IMMop disp, mem=mem}]
    | fmove{src=I.Displace{base, disp}, dst=I.FDirect ft} =
	[I.FLOAD{ldOp=I.LDT, r=ft, b=base, d=I.IMMop disp, mem=mem}]

  val shuffle = Shuffle.shuffle {mvInstr=move, ea=I.Direct}

  val shufflefp = Shuffle.shuffle {mvInstr=fmove, ea=I.FDirect}
end


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