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 /MLRISC/trunk/amd64/emit/amd64Asm.sml
ViewVC logotype

Diff of /MLRISC/trunk/amd64/emit/amd64Asm.sml

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

revision 4851, Tue Sep 25 12:47:45 2018 UTC revision 4852, Tue Sep 25 12:48:35 2018 UTC
# Line 266  Line 266 
266       | asm_isize (I.I64) = "64"       | asm_isize (I.I64) = "64"
267     and emit_isize x = emit (asm_isize x)     and emit_isize x = emit (asm_isize x)
268    
269  (*#line 505.7 "amd64/amd64.mdl"*)  (*#line 511.7 "amd64/amd64.mdl"*)
270     fun emitInt32 i =     fun emitInt32 i =
271         let         let
272  (*#line 506.11 "amd64/amd64.mdl"*)  (*#line 512.11 "amd64/amd64.mdl"*)
273             val s = Int32.toString i             val s = Int32.toString i
274    
275  (*#line 507.11 "amd64/amd64.mdl"*)  (*#line 513.11 "amd64/amd64.mdl"*)
276             val s = (if (i >= 0)             val s = (if (i >= 0)
277                    then s                    then s
278                    else ("-" ^ (String.substring (s, 1, (size s) - 1))))                    else ("-" ^ (String.substring (s, 1, (size s) - 1))))
279         in emit s         in emit s
280         end         end
281    
282  (*#line 511.7 "amd64/amd64.mdl"*)  (*#line 517.7 "amd64/amd64.mdl"*)
283     fun emitInt64 i =     fun emitInt64 i =
284         let         let
285  (*#line 512.11 "amd64/amd64.mdl"*)  (*#line 518.11 "amd64/amd64.mdl"*)
286             val s = Int64.toString i             val s = Int64.toString i
287    
288  (*#line 513.11 "amd64/amd64.mdl"*)  (*#line 519.11 "amd64/amd64.mdl"*)
289             val s = (if (i >= 0)             val s = (if (i >= 0)
290                    then s                    then s
291                    else ("-" ^ (String.substring (s, 1, (size s) - 1))))                    else ("-" ^ (String.substring (s, 1, (size s) - 1))))
292         in emit s         in emit s
293         end         end
294    
295  (*#line 518.7 "amd64/amd64.mdl"*)  (*#line 524.7 "amd64/amd64.mdl"*)
296     val {low=SToffset, ...} = C.cellRange CellsBasis.FP     val {low=SToffset, ...} = C.cellRange CellsBasis.FP
297    
298  (*#line 520.7 "amd64/amd64.mdl"*)  (*#line 526.7 "amd64/amd64.mdl"*)
299     fun emitScale 0 = emit "1"     fun emitScale 0 = emit "1"
300       | emitScale 1 = emit "2"       | emitScale 1 = emit "2"
301       | emitScale 2 = emit "4"       | emitScale 2 = emit "4"
# Line 352  Line 352 
352       | emit_disp (I.ImmedLabel lexp) = emit_labexp lexp       | emit_disp (I.ImmedLabel lexp) = emit_labexp lexp
353       | emit_disp _ = error "emit_disp"       | emit_disp _ = error "emit_disp"
354    
355  (*#line 568.7 "amd64/amd64.mdl"*)  (*#line 574.7 "amd64/amd64.mdl"*)
356     fun stupidGas (I.ImmedLabel lexp) = emit_labexp lexp     fun stupidGas (I.ImmedLabel lexp) = emit_labexp lexp
357       | stupidGas opnd =       | stupidGas opnd =
358         ( emit "*";         ( emit "*";
359           emit_operand opnd )           emit_operand opnd )
360    
361  (*#line 572.7 "amd64/amd64.mdl"*)  (*#line 578.7 "amd64/amd64.mdl"*)
362     fun isMemOpnd (I.FDirect f) = true     fun isMemOpnd (I.FDirect f) = true
363       | isMemOpnd (I.LabelEA _) = true       | isMemOpnd (I.LabelEA _) = true
364       | isMemOpnd (I.Displace _) = true       | isMemOpnd (I.Displace _) = true
365       | isMemOpnd (I.Indexed _) = true       | isMemOpnd (I.Indexed _) = true
366       | isMemOpnd _ = false       | isMemOpnd _ = false
367    
368  (*#line 577.7 "amd64/amd64.mdl"*)  (*#line 583.7 "amd64/amd64.mdl"*)
369     fun chop fbinOp =     fun chop fbinOp =
370         let         let
371  (*#line 578.15 "amd64/amd64.mdl"*)  (*#line 584.15 "amd64/amd64.mdl"*)
372             val n = size fbinOp             val n = size fbinOp
373         in         in
374            (case Char.toLower (String.sub (fbinOp, n - 1)) of            (case Char.toLower (String.sub (fbinOp, n - 1)) of
# Line 377  Line 377 
377            )            )
378         end         end
379    
380  (*#line 584.7 "amd64/amd64.mdl"*)  (*#line 590.7 "amd64/amd64.mdl"*)
381     val emit_dst = emit_operand     val emit_dst = emit_operand
382    
383  (*#line 585.7 "amd64/amd64.mdl"*)  (*#line 591.7 "amd64/amd64.mdl"*)
384     val emit_src = emit_operand     val emit_src = emit_operand
385    
386  (*#line 586.7 "amd64/amd64.mdl"*)  (*#line 592.7 "amd64/amd64.mdl"*)
387     val emit_opnd = emit_operand     val emit_opnd = emit_operand
388    
389  (*#line 587.7 "amd64/amd64.mdl"*)  (*#line 593.7 "amd64/amd64.mdl"*)
390     val emit_opnd8 = emit_operand8     val emit_opnd8 = emit_operand8
391    
392  (*#line 588.7 "amd64/amd64.mdl"*)  (*#line 594.7 "amd64/amd64.mdl"*)
393     val emit_rsrc = emit_operand     val emit_rsrc = emit_operand
394    
395  (*#line 589.7 "amd64/amd64.mdl"*)  (*#line 595.7 "amd64/amd64.mdl"*)
396     val emit_lsrc = emit_operand     val emit_lsrc = emit_operand
397    
398  (*#line 590.7 "amd64/amd64.mdl"*)  (*#line 596.7 "amd64/amd64.mdl"*)
399     val emit_addr = emit_operand     val emit_addr = emit_operand
400    
401  (*#line 591.7 "amd64/amd64.mdl"*)  (*#line 597.7 "amd64/amd64.mdl"*)
402     val emit_src1 = emit_operand     val emit_src1 = emit_operand
403    
404  (*#line 592.7 "amd64/amd64.mdl"*)  (*#line 598.7 "amd64/amd64.mdl"*)
405     val emit_ea = emit_operand     val emit_ea = emit_operand
406    
407  (*#line 593.7 "amd64/amd64.mdl"*)  (*#line 599.7 "amd64/amd64.mdl"*)
408     val emit_count = emit_operand     val emit_count = emit_operand
409     fun emitInstr' instr =     fun emitInstr' instr =
410         (case instr of         (case instr of

Legend:
Removed from v.4851  
changed lines
  Added in v.4852

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