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/MLRISC/x86/instructions/x86Cells.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/x86/instructions/x86Cells.sml

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

revision 823, Tue May 8 21:25:15 2001 UTC revision 889, Thu Jul 19 20:35:20 2001 UTC
# Line 7  Line 7 
7    
8  signature X86CELLS =  signature X86CELLS =
9  sig  sig
10     include CELLS_COMMON     include CELLS
11     val EFLAGS : cellkind     val EFLAGS : CellsBasis.cellkind
12     val FFLAGS : cellkind     val FFLAGS : CellsBasis.cellkind
13     val CELLSET : cellkind     val CELLSET : CellsBasis.cellkind
14     val showGP : register_id -> string     val showGP : CellsBasis.register_id -> string
15     val showFP : register_id -> string     val showFP : CellsBasis.register_id -> string
16     val showCC : register_id -> string     val showCC : CellsBasis.register_id -> string
17     val showEFLAGS : register_id -> string     val showEFLAGS : CellsBasis.register_id -> string
18     val showFFLAGS : register_id -> string     val showFFLAGS : CellsBasis.register_id -> string
19     val showMEM : register_id -> string     val showMEM : CellsBasis.register_id -> string
20     val showCTRL : register_id -> string     val showCTRL : CellsBasis.register_id -> string
21     val showCELLSET : register_id -> string     val showCELLSET : CellsBasis.register_id -> string
22     val showGPWithSize : (register_id * sz) -> string     val showGPWithSize : (CellsBasis.register_id * CellsBasis.sz) -> string
23     val showFPWithSize : (register_id * sz) -> string     val showFPWithSize : (CellsBasis.register_id * CellsBasis.sz) -> string
24     val showCCWithSize : (register_id * sz) -> string     val showCCWithSize : (CellsBasis.register_id * CellsBasis.sz) -> string
25     val showEFLAGSWithSize : (register_id * sz) -> string     val showEFLAGSWithSize : (CellsBasis.register_id * CellsBasis.sz) -> string
26     val showFFLAGSWithSize : (register_id * sz) -> string     val showFFLAGSWithSize : (CellsBasis.register_id * CellsBasis.sz) -> string
27     val showMEMWithSize : (register_id * sz) -> string     val showMEMWithSize : (CellsBasis.register_id * CellsBasis.sz) -> string
28     val showCTRLWithSize : (register_id * sz) -> string     val showCTRLWithSize : (CellsBasis.register_id * CellsBasis.sz) -> string
29     val showCELLSETWithSize : (register_id * sz) -> string     val showCELLSETWithSize : (CellsBasis.register_id * CellsBasis.sz) -> string
30     val eax : cell     val eax : CellsBasis.cell
31     val ecx : cell     val ecx : CellsBasis.cell
32     val edx : cell     val edx : CellsBasis.cell
33     val ebx : cell     val ebx : CellsBasis.cell
34     val esp : cell     val esp : CellsBasis.cell
35     val ebp : cell     val ebp : CellsBasis.cell
36     val esi : cell     val esi : CellsBasis.cell
37     val edi : cell     val edi : CellsBasis.cell
38     val stackptrR : cell     val ST : int -> CellsBasis.cell
39     val ST : int -> cell     val ST0 : CellsBasis.cell
40     val ST0 : cell     val eflags : CellsBasis.cell
41     val asmTmpR : cell     val addGP : (CellsBasis.cell * cellset) -> cellset
42     val fasmTmp : cell     val addFP : (CellsBasis.cell * cellset) -> cellset
43     val eflags : cell     val addCC : (CellsBasis.cell * cellset) -> cellset
44     val addGP : (cell * cellset) -> cellset     val addEFLAGS : (CellsBasis.cell * cellset) -> cellset
45     val addFP : (cell * cellset) -> cellset     val addFFLAGS : (CellsBasis.cell * cellset) -> cellset
46     val addCC : (cell * cellset) -> cellset     val addMEM : (CellsBasis.cell * cellset) -> cellset
47     val addEFLAGS : (cell * cellset) -> cellset     val addCTRL : (CellsBasis.cell * cellset) -> cellset
48     val addFFLAGS : (cell * cellset) -> cellset     val addCELLSET : (CellsBasis.cell * cellset) -> cellset
    val addMEM : (cell * cellset) -> cellset  
    val addCTRL : (cell * cellset) -> cellset  
    val addCELLSET : (cell * cellset) -> cellset  
49  end  end
50    
51  structure X86Cells : X86CELLS =  structure X86Cells : X86CELLS =
52  struct  struct
53     exception X86Cells     exception X86Cells
54     fun error msg = MLRiscErrorMsg.error("X86Cells",msg)     fun error msg = MLRiscErrorMsg.error("X86Cells",msg)
55       open CellsBasis
56     fun showGPWithSize (r, ty) = (fn (0, 8) => "%al"     fun showGPWithSize (r, ty) = (fn (0, 8) => "%al"
57                                    | (0, 16) => "%ax"                                    | (0, 16) => "%ax"
58                                    | (0, 32) => "%eax"                                    | (0, 32) => "%eax"
# Line 104  Line 102 
102     val EFLAGS = CellsBasis.newCellKind {name="EFLAGS", nickname="eflags"}     val EFLAGS = CellsBasis.newCellKind {name="EFLAGS", nickname="eflags"}
103     and FFLAGS = CellsBasis.newCellKind {name="FFLAGS", nickname="fflags"}     and FFLAGS = CellsBasis.newCellKind {name="FFLAGS", nickname="fflags"}
104     and CELLSET = CellsBasis.newCellKind {name="CELLSET", nickname="cellset"}     and CELLSET = CellsBasis.newCellKind {name="CELLSET", nickname="cellset"}
105     structure MyCellsCommon = CellsCommon     structure MyCells = Cells
106        (exception Cells = X86Cells        (exception Cells = X86Cells
107         val firstPseudo = 256         val firstPseudo = 256
108         val desc_GP = CellsInternal.DESC {low=0, high=31, kind=CellsBasis.GP,         val desc_GP = CellsBasis.DESC {low=0, high=31, kind=CellsBasis.GP, defaultValues=[],
109                defaultValues=[], zeroReg=NONE, toString=showGP, toStringWithSize=showGPWithSize,                zeroReg=NONE, toString=showGP, toStringWithSize=showGPWithSize,
110                counter=ref 0, dedicated=ref 0, physicalRegs=ref CellsInternal.array0}                counter=ref 0, dedicated=ref 0, physicalRegs=ref CellsBasis.array0}
111         and desc_FP = CellsInternal.DESC {low=32, high=63, kind=CellsBasis.FP,         and desc_FP = CellsBasis.DESC {low=32, high=63, kind=CellsBasis.FP,
112                defaultValues=[], zeroReg=NONE, toString=showFP, toStringWithSize=showFPWithSize,                defaultValues=[], zeroReg=NONE, toString=showFP, toStringWithSize=showFPWithSize,
113                counter=ref 0, dedicated=ref 0, physicalRegs=ref CellsInternal.array0}                counter=ref 0, dedicated=ref 0, physicalRegs=ref CellsBasis.array0}
114         and desc_EFLAGS = CellsInternal.DESC {low=64, high=64, kind=EFLAGS,         and desc_EFLAGS = CellsBasis.DESC {low=64, high=64, kind=EFLAGS, defaultValues=[],
115                defaultValues=[], zeroReg=NONE, toString=showEFLAGS, toStringWithSize=showEFLAGSWithSize,                zeroReg=NONE, toString=showEFLAGS, toStringWithSize=showEFLAGSWithSize,
116                counter=ref 0, dedicated=ref 0, physicalRegs=ref CellsInternal.array0}                counter=ref 0, dedicated=ref 0, physicalRegs=ref CellsBasis.array0}
117         and desc_FFLAGS = CellsInternal.DESC {low=65, high=65, kind=FFLAGS,         and desc_FFLAGS = CellsBasis.DESC {low=65, high=65, kind=FFLAGS, defaultValues=[],
118                defaultValues=[], zeroReg=NONE, toString=showFFLAGS, toStringWithSize=showFFLAGSWithSize,                zeroReg=NONE, toString=showFFLAGS, toStringWithSize=showFFLAGSWithSize,
119                counter=ref 0, dedicated=ref 0, physicalRegs=ref CellsInternal.array0}                counter=ref 0, dedicated=ref 0, physicalRegs=ref CellsBasis.array0}
120         and desc_MEM = CellsInternal.DESC {low=66, high=65, kind=CellsBasis.MEM,         and desc_MEM = CellsBasis.DESC {low=66, high=65, kind=CellsBasis.MEM,
121                defaultValues=[], zeroReg=NONE, toString=showMEM, toStringWithSize=showMEMWithSize,                defaultValues=[], zeroReg=NONE, toString=showMEM, toStringWithSize=showMEMWithSize,
122                counter=ref 0, dedicated=ref 0, physicalRegs=ref CellsInternal.array0}                counter=ref 0, dedicated=ref 0, physicalRegs=ref CellsBasis.array0}
123         and desc_CTRL = CellsInternal.DESC {low=66, high=65, kind=CellsBasis.CTRL,         and desc_CTRL = CellsBasis.DESC {low=66, high=65, kind=CellsBasis.CTRL,
124                defaultValues=[], zeroReg=NONE, toString=showCTRL, toStringWithSize=showCTRLWithSize,                defaultValues=[], zeroReg=NONE, toString=showCTRL, toStringWithSize=showCTRLWithSize,
125                counter=ref 0, dedicated=ref 0, physicalRegs=ref CellsInternal.array0}                counter=ref 0, dedicated=ref 0, physicalRegs=ref CellsBasis.array0}
126         and desc_CELLSET = CellsInternal.DESC {low=66, high=65, kind=CELLSET,         and desc_CELLSET = CellsBasis.DESC {low=66, high=65, kind=CELLSET, defaultValues=[],
127                defaultValues=[], zeroReg=NONE, toString=showCELLSET, toStringWithSize=showCELLSETWithSize,                zeroReg=NONE, toString=showCELLSET, toStringWithSize=showCELLSETWithSize,
128                counter=ref 0, dedicated=ref 0, physicalRegs=ref CellsInternal.array0}                counter=ref 0, dedicated=ref 0, physicalRegs=ref CellsBasis.array0}
129         val cellKindDescs = [(CellsBasis.GP, desc_GP), (CellsBasis.FP, desc_FP),         val cellKindDescs = [(CellsBasis.GP, desc_GP), (CellsBasis.FP, desc_FP),
130                (CellsBasis.CC, desc_GP), (EFLAGS, desc_EFLAGS), (FFLAGS, desc_FFLAGS),                (CellsBasis.CC, desc_GP), (EFLAGS, desc_EFLAGS), (FFLAGS, desc_FFLAGS),
131                (CellsBasis.MEM, desc_MEM), (CellsBasis.CTRL, desc_CTRL), (CELLSET,                (CellsBasis.MEM, desc_MEM), (CellsBasis.CTRL, desc_CTRL), (CELLSET,
132                desc_CELLSET)]                desc_CELLSET)]
133        )        )
134    
135     open MyCellsCommon     open MyCells
136     val addGP = CellSet.add     val addGP = CellSet.add
137     and addFP = CellSet.add     and addFP = CellSet.add
138     and addCC = CellSet.add     and addCC = CellSet.add

Legend:
Removed from v.823  
changed lines
  Added in v.889

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