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

SCM Repository

[smlnj] Diff of /MLRISC/trunk/amd64/staged-allocation/amd64-svid.sml
ViewVC logotype

Diff of /MLRISC/trunk/amd64/staged-allocation/amd64-svid.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2991, Tue Apr 15 15:05:41 2008 UTC revision 2992, Tue Apr 15 22:30:33 2008 UTC
# Line 22  Line 22 
22    
23      (* general-purpose registers *)      (* general-purpose registers *)
24      val [rax, rbx, rdi, rsi, rdx, rcx, r8, r9, r10, r11, r12, r13, r14, r15] =      val [rax, rbx, rdi, rsi, rdx, rcx, r8, r9, r10, r11, r12, r13, r14, r15] =
25            map (fn r => (wordTy, r))            List.map (fn r => (wordTy, r))
26              ([C.rax, C.rbx, C.rdi, C.rsi, C.rdx, C.rcx] @              ([C.rax, C.rbx, C.rdi, C.rsi, C.rdx, C.rcx] @
27               C.Regs CB.GP {from=8, to=15, step=1})               C.Regs CB.GP {from=8, to=15, step=1})
28      (* floating-point registers (SSE2) *)      (* floating-point registers (SSE2) *)
29      val sseFRegs as      val sseFRegs as
30          [xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm8, xmm9, xmm10,          [xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm8, xmm9, xmm10,
31           xmm11, xmm12, xmm13, xmm14, xmm15] =           xmm11, xmm12, xmm13, xmm14, xmm15] =
32             map (fn r => (64, r)) (C.Regs CB.FP {from=0, to=15, step=1})             List.map (fn r => (64, r)) (C.Regs CB.FP {from=0, to=15, step=1})
33      val calleeSaveRegs = map #2 [rbx, r12, r13, r14, r15]      val calleeSaveRegs = List.map #2 [rbx, r12, r13, r14, r15]
34      val callerSaveRegs = map #2 [rax, rcx, rdx, rsi, rdi, r8, r9, r10, r11]      val callerSaveRegs = List.map #2 [rax, rcx, rdx, rsi, rdi, r8, r9, r10, r11]
35      val callerSaveFRegs = sseFRegs      val callerSaveFRegs = sseFRegs
36      val calleeSaveFRegs = []      val calleeSaveFRegs = []
37      val spReg = T.REG (wordTy, C.rsp)      val spReg = T.REG (wordTy, C.rsp)
# Line 137  Line 137 
137      (* convert a C argument to a location for staged allocation *)      (* convert a C argument to a location for staged allocation *)
138      fun argLoc _ (w, S.REG (_, r), K_GPR) = C_GPR (w, r)      fun argLoc _ (w, S.REG (_, r), K_GPR) = C_GPR (w, r)
139        | argLoc _ (w, S.REG (_, r), K_FPR) = C_FPR (w, r)        | argLoc _ (w, S.REG (_, r), K_FPR) = C_FPR (w, r)
140        | argLoc argOffset (w, S.BLOCK_OFFSET offB, K_GPR) =        | argLoc argOffset (w, S.BLOCK_OFFSET offB, K_GPR) = C_STK (w, T.I.fromInt (wordTy, offB+argOffset))
141          C_STK (w, T.I.fromInt (wordTy, offB+argOffset))        | argLoc argOffset (w, S.BLOCK_OFFSET offB, K_FPR) = C_STK (w, T.I.fromInt (wordTy, offB+argOffset))
142        | argLoc argOffset (w, S.NARROW (loc, w', k), _) =        | argLoc argOffset (w, S.NARROW (loc, w', k), _) = argLoc argOffset (w', loc, k)
         argLoc argOffset (w', loc, k)  
143        | argLoc _ (w, S.COMBINE _, _) = raise Fail "impossible"        | argLoc _ (w, S.COMBINE _, _) = raise Fail "impossible"
144    
145      fun layout {conv, retTy, paramTys} = let      fun layout {conv, retTy, paramTys} = let

Legend:
Removed from v.2991  
changed lines
  Added in v.2992

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