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

View of /sml/trunk/src/compiler/CodeGen/x86/x86MemRegs.sml

Parent Directory Parent Directory | Revision Log Revision Log

Revision 412 - (download) (annotate)
Fri Sep 3 00:25:03 1999 UTC (21 years, 3 months ago) by monnier
File size: 523 byte(s)
This commit was generated by cvs2svn to compensate for changes in r411,
which included commits to RCS files with non-trunk default branches.
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-40) * 8 + X86Runtime.vFpStart)
    case opnd
    of I.FDirect f => I.Displace{base=sp, disp=I.Immed(disp f), 
     | _ => error "memReg"

ViewVC Help
Powered by ViewVC 1.0.0