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

Diff of /sml/trunk/src/compiler/CodeGen/x86/x86CpsRegs.sml

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

revision 546, Thu Feb 24 14:04:51 2000 UTC revision 555, Fri Mar 3 16:10:30 2000 UTC
# Line 11  Line 11 
11    structure T = X86MLTree    structure T = X86MLTree
12    structure C = X86Cells    structure C = X86Cells
13    
   type rexp = (unit, unit, unit, unit) T.rexp  
   type fexp = (unit, unit, unit, unit) T.fexp  
   type ccexp = (unit, unit, unit, unit) T.ccexp  
   
14    fun upto(from, to) = if from>to then [] else from::(upto (from+1,to))    fun upto(from, to) = if from>to then [] else from::(upto (from+1,to))
15    infix upto    infix upto
16    
# Line 27  Line 23 
23    val ebx = T.REG(32, C.ebx)    val edi = T.REG(32, C.edi)    val ebx = T.REG(32, C.ebx)    val edi = T.REG(32, C.edi)
24    
25    fun regInMem i =    fun regInMem i =
26        T.LOAD(32, T.ADD(32, esp, T.LI i), CPSRegions.memory) : rexp        T.LOAD(32, T.ADD(32, esp, T.LI i), CPSRegions.memory)
27    
28    val allocptr  = edi    val allocptr  = edi
29    val stdarg    = ebp    val stdarg    = ebp
# Line 41  Line 37 
37    val storeptr  = regInMem 24    val storeptr  = regInMem 24
38    val varptr    = regInMem 28    val varptr    = regInMem 28
39    
40    val stdlink   = T.REG(32, GP 8) : rexp                (* vreg 0 *)    val stdlink   = T.REG(32, GP 8)       (* vreg 0 *)
41    val stdclos   = T.REG(32, GP 9) : rexp                (* vreg 1 *)    val stdclos   = T.REG(32, GP 9)       (* vreg 1 *)
42    
43    fun mkVregList(n, 0) = []    fun mkVregList(n, 0) = []
44      | mkVregList(n, cnt) = T.REG(32, GP n)::mkVregList(n+1, cnt-1)      | mkVregList(n, cnt) = T.REG(32, GP n)::mkVregList(n+1, cnt-1)
45    
46    (* miscregs = {ebx,ecx,edx,r10,r11,...r31} *)    (* miscregs = {ebx,ecx,edx,r10,r11,...r31} *)
47    val miscregs : rexp list =    val miscregs =
48        ebx::ecx::edx::mkVregList(10, X86Runtime.numVregs - 2)        ebx::ecx::edx::mkVregList(10, X86Runtime.numVregs - 2)
49    
50    val calleesave = Array.fromList miscregs    val calleesave = Array.fromList miscregs
51    val exhausted = NONE    val exhausted = NONE
52    
53    val floatregs : fexp list =    val floatregs =
54        map (fn f => T.FREG(64,f)) ((FP 8) upto (FP 31))        map (fn f => T.FREG(64,f)) ((FP 8) upto (FP 31))
55    val savedfpregs = []    val savedfpregs = []
56    

Legend:
Removed from v.546  
changed lines
  Added in v.555

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