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 582, Thu Mar 23 01:04:32 2000 UTC revision 583, Thu Mar 23 21:52:30 2000 UTC
# Line 9  Line 9 
9                        structure Shuffle : X86SHUFFLE                        structure Shuffle : X86SHUFFLE
10                           where I = Instr                           where I = Instr
11    
12  (*#line 181.7 "x86/x86.md"*)  (*#line 195.7 "x86/x86.md"*)
13                        structure MemRegs : MEMORY_REGISTERS where I=Instr                        structure MemRegs : MEMORY_REGISTERS where I=Instr
14                       ) : INSTRUCTION_EMITTER =                       ) : INSTRUCTION_EMITTER =
15  struct  struct
# Line 203  Line 203 
203       | asm_fenvOp (I.FNSTENV) = "fnstenv"       | asm_fenvOp (I.FNSTENV) = "fnstenv"
204     and emit_fenvOp x = emit (asm_fenvOp x)     and emit_fenvOp x = emit (asm_fenvOp x)
205    
206  (*#line 183.6 "x86/x86.md"*)  (*#line 197.6 "x86/x86.md"*)
207     val memReg = MemRegs.memReg regmap     val memReg = MemRegs.memReg regmap
208    
209  (*#line 184.6 "x86/x86.md"*)  (*#line 198.6 "x86/x86.md"*)
210     fun emitInt32 i = let     fun emitInt32 i = let
211    
212  (*#line 185.10 "x86/x86.md"*)  (*#line 199.10 "x86/x86.md"*)
213            val s = Int32.toString i            val s = Int32.toString i
214    
215  (*#line 186.10 "x86/x86.md"*)  (*#line 200.10 "x86/x86.md"*)
216            val s = (if (i >= 0)            val s = (if (i >= 0)
217                   then s                   then s
218                   else ("-" ^ (String.substring (s, 1, (size s) - 1))))                   else ("-" ^ (String.substring (s, 1, (size s) - 1))))
# Line 220  Line 220 
220         end         end
221    
222    
223  (*#line 189.6 "x86/x86.md"*)  (*#line 203.6 "x86/x86.md"*)
224     fun emitScale 0 = emit "1"     fun emitScale 0 = emit "1"
225       | emitScale 1 = emit "2"       | emitScale 1 = emit "2"
226       | emitScale 2 = emit "4"       | emitScale 2 = emit "4"
# Line 271  Line 271 
271       | emit_disp (I.ImmedLabel lexp) = emit_labexp lexp       | emit_disp (I.ImmedLabel lexp) = emit_labexp lexp
272       | emit_disp _ = error "emit_disp"       | emit_disp _ = error "emit_disp"
273    
274  (*#line 229.7 "x86/x86.md"*)  (*#line 243.7 "x86/x86.md"*)
275     fun stupidGas (I.ImmedLabel lexp) = emit_labexp lexp     fun stupidGas (I.ImmedLabel lexp) = emit_labexp lexp
276       | stupidGas (I.LabelEA _) = error "stupidGas"       | stupidGas (I.LabelEA _) = error "stupidGas"
277       | stupidGas opnd = emit_operand opnd       | stupidGas opnd = emit_operand opnd
278    
279  (*#line 234.7 "x86/x86.md"*)  (*#line 248.7 "x86/x86.md"*)
280     fun isMemOpnd (I.MemReg _) = true     fun isMemOpnd (I.MemReg _) = true
281       | isMemOpnd (I.FDirect f) = true       | isMemOpnd (I.FDirect f) = true
282       | isMemOpnd (I.LabelEA _) = true       | isMemOpnd (I.LabelEA _) = true
# Line 284  Line 284 
284       | isMemOpnd (I.Indexed _) = true       | isMemOpnd (I.Indexed _) = true
285       | isMemOpnd _ = false       | isMemOpnd _ = false
286    
287  (*#line 240.7 "x86/x86.md"*)  (*#line 254.7 "x86/x86.md"*)
288     fun chop fbinOp = let     fun chop fbinOp = let
289    
290  (*#line 241.15 "x86/x86.md"*)  (*#line 255.15 "x86/x86.md"*)
291            val n = size fbinOp            val n = size fbinOp
292         in         in
293            (            (
# Line 298  Line 298 
298         end         end
299    
300    
301  (*#line 247.7 "x86/x86.md"*)  (*#line 261.7 "x86/x86.md"*)
302     val emit_dst = emit_operand     val emit_dst = emit_operand
303    
304  (*#line 248.7 "x86/x86.md"*)  (*#line 262.7 "x86/x86.md"*)
305     val emit_src = emit_operand     val emit_src = emit_operand
306    
307  (*#line 249.7 "x86/x86.md"*)  (*#line 263.7 "x86/x86.md"*)
308     val emit_opnd = emit_operand     val emit_opnd = emit_operand
309    
310  (*#line 250.7 "x86/x86.md"*)  (*#line 264.7 "x86/x86.md"*)
311     val emit_rsrc = emit_operand     val emit_rsrc = emit_operand
312    
313  (*#line 251.7 "x86/x86.md"*)  (*#line 265.7 "x86/x86.md"*)
314     val emit_lsrc = emit_operand     val emit_lsrc = emit_operand
315    
316  (*#line 252.7 "x86/x86.md"*)  (*#line 266.7 "x86/x86.md"*)
317     val emit_addr = emit_operand     val emit_addr = emit_operand
318    
319  (*#line 253.7 "x86/x86.md"*)  (*#line 267.7 "x86/x86.md"*)
320     val emit_src1 = emit_operand     val emit_src1 = emit_operand
321     fun emitInstr instr =     fun emitInstr instr =
322         ( tab ();         ( tab ();

Legend:
Removed from v.582  
changed lines
  Added in v.583

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