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/emit/x86Asm.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/x86/emit/x86Asm.sml

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

revision 888, Thu Jul 19 20:24:21 2001 UTC revision 889, Thu Jul 19 20:35:20 2001 UTC
# Line 13  Line 13 
13                        structure MemRegs : MEMORY_REGISTERS where I=Instr                        structure MemRegs : MEMORY_REGISTERS where I=Instr
14    
15  (*#line 510.7 "x86/x86.mdl"*)  (*#line 510.7 "x86/x86.mdl"*)
16                        val memRegBase : MemRegs.I.C.cell option                        val memRegBase : CellsBasis.cell option
17                       ) : INSTRUCTION_EMITTER =                       ) : INSTRUCTION_EMITTER =
18  struct  struct
19     structure I  = Instr     structure I  = Instr
# Line 65  Line 65 
65         fun init size = (comment("Code Size = " ^ ms size); nl())         fun init size = (comment("Code Size = " ^ ms size); nl())
66         val emitCellInfo = AsmFormatUtil.reginfo         val emitCellInfo = AsmFormatUtil.reginfo
67                                  (emit,formatAnnotations)                                  (emit,formatAnnotations)
68         fun emitCell r = (emit(C.toString r); emitCellInfo r)         fun emitCell r = (emit(CellsBasis.toString r); emitCellInfo r)
69         fun emit_cellset(title,cellset) =         fun emit_cellset(title,cellset) =
70           (nl(); comment(title^C.CellSet.toString cellset))           (nl(); comment(title^C.CellSet.toString cellset))
71         val emit_cellset =         val emit_cellset =
# Line 288  Line 288 
288         end         end
289    
290  (*#line 518.6 "x86/x86.mdl"*)  (*#line 518.6 "x86/x86.mdl"*)
291     val {low=SToffset, ...} = C.cellRange C.FP     val {low=SToffset, ...} = C.cellRange CellsBasis.FP
292    
293  (*#line 520.6 "x86/x86.mdl"*)  (*#line 520.6 "x86/x86.mdl"*)
294     fun emitScale 0 = emit "1"     fun emitScale 0 = emit "1"
# Line 314  Line 314 
314         | I.ST f => emitCell f         | I.ST f => emitCell f
315         | I.FPR f =>         | I.FPR f =>
316           ( emit "%f";           ( emit "%f";
317             emit (Int.toString (C.registerNum f)))             emit (Int.toString (CellsBasis.registerNum f)))
318         | I.FDirect f => emit_operand (memReg opn)         | I.FDirect f => emit_operand (memReg opn)
319         | I.Displace{base, disp, mem, ...} =>         | I.Displace{base, disp, mem, ...} =>
320           ( emit_disp disp;           ( emit_disp disp;
# Line 337  Line 337 
337             emit ")";             emit ")";
338             emit_region mem )             emit_region mem )
339         )         )
340     and emit_operand8 (I.Direct r) = emit (C.toStringWithSize (r, 8))     and emit_operand8 (I.Direct r) = emit (CellsBasis.toStringWithSize (r, 8))
341       | emit_operand8 opn = emit_operand opn       | emit_operand8 opn = emit_operand opn
342     and emit_disp (I.Immed 0) = ()     and emit_disp (I.Immed 0) = ()
343       | emit_disp (I.Immed i) = emitInt32 i       | emit_disp (I.Immed i) = emitInt32 i
# Line 371  Line 371 
371         end         end
372    
373  (*#line 581.7 "x86/x86.mdl"*)  (*#line 581.7 "x86/x86.mdl"*)
374     fun isST0 (I.ST r) = (C.registerNum r) = 0     fun isST0 (I.ST r) = (CellsBasis.registerNum r) = 0
375       | isST0 _ = false       | isST0 _ = false
376    
377  (*#line 585.7 "x86/x86.mdl"*)  (*#line 585.7 "x86/x86.mdl"*)

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

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