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/compiler/CodeGen/x86/x86MemRegs.sml
ViewVC logotype

View of /sml/branches/SMLNJ/src/compiler/CodeGen/x86/x86MemRegs.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 247 - (download) (annotate)
Sat Apr 17 18:47:13 1999 UTC (20 years, 10 months ago) by monnier
File size: 468 byte(s)
version 110.16
functor X86MemRegs(X86Instr:X86INSTR) = struct
  structure I = X86Instr

  fun error msg = MLRiscErrorMsg.impossible ("X86MemRegs." ^ msg)

  val sp = X86Cells.esp
  fun memReg regmap opnd = let
    fun lookup r = regmap r handle _ => r
    (* see X86.prim.asm stack layout *)
    fun disp r = Int32.fromInt((lookup r-8) * 8 + X86Runtime.vFpStart)
  in
    case opnd
    of I.FDirect f => I.Displace{base=sp, disp=I.Immed(disp f)}
     | _ => error "memReg"
  end
end

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