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/x86.md
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/x86/x86.md

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

revision 428, Wed Sep 8 09:47:00 1999 UTC revision 429, Wed Sep 8 09:47:00 1999 UTC
# Line 55  Line 55 
55     and ebp     = $GP[5]     and ebp     = $GP[5]
56     and esi     = $GP[6]     and esi     = $GP[6]
57     and edi     = $GP[7]     and edi     = $GP[7]
58     and stackptrR = esp     and stackptrR = $GP[4]
59     and asmTmpR   = ~1 (* not used *)     and asmTmpR   = ~1 (* not used *)
60     and fasmTmp   = ~1 (* not used *)     and fasmTmp   = ~1 (* not used *)
61    
# Line 140  Line 140 
140       (structure MemRegs : MEMORY_REGISTERS where I = Instr) =       (structure MemRegs : MEMORY_REGISTERS where I = Instr) =
141    struct    struct
142       val memReg = MemRegs.memReg regmap       val memReg = MemRegs.memReg regmap
143       fun emitInt32 i = emit(if i < 0 then "-"^Int32.toString(~i)       fun emitInt32 i =
144                              else Int32.toString i)       let val s = Int32.toString i
145             val s = if i >= 0 then s else "-"^String.substring(s,1,size s-1)
146         in  emit s end
147    
148       fun emit_src2 NONE = ()       fun emit_src2 NONE = ()
149         | emit_src2(SOME i) = (emit "$"; emitInt32 i; emit ", ")         | emit_src2(SOME i) = (emit "$"; emitInt32 i; emit ", ")
150    
# Line 177  Line 180 
180             emit_region mem)             emit_region mem)
181         | I.Indexed{base=SOME base,index,scale,disp,mem,...} =>         | I.Indexed{base=SOME base,index,scale,disp,mem,...} =>
182           (eOptionalDisp disp; emit "("; emit_GP base;           (eOptionalDisp disp; emit "("; emit_GP base;
183            comma(); emit_GP index; emitScale scale; emit ")";            comma(); emit_GP index; comma(); emitScale scale; emit ")";
184            emit_region mem)            emit_region mem)
185        and eOptionalDisp(I.Immed 0) = ()        and eOptionalDisp(I.Immed 0) = ()
186          | eOptionalDisp(I.Const c) = emit(Constant.toString c)          | eOptionalDisp(I.Const c) = emit(Constant.toString c)
# Line 214  Line 217 
217      | CALL of operand * C.cellset * C.cellset * Region.region      | CALL of operand * C.cellset * C.cellset * Region.region
218          ``call\t<stupidGas operand><region>''          ``call\t<stupidGas operand><region>''
219    
220      | RET      | RET of operand option
221          ``ret''          ``ret<case operand of NONE => ()
222                                | SOME e => (emit "\t"; emit_operand e)>''
223    
224     (* integer *)     (* integer *)
225      | MOVE of {mvOp:move, src:operand, dst:operand}      | MOVE of {mvOp:move, src:operand, dst:operand}

Legend:
Removed from v.428  
changed lines
  Added in v.429

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