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

Diff of /sml/trunk/src/MLRISC/ppc/emit/ppcAsm.sml

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

revision 1592, Thu Aug 5 16:53:03 2004 UTC revision 1593, Thu Aug 5 22:19:45 2004 UTC
# Line 237  Line 237 
237       | asm_bit (I.OX) = "so"       | asm_bit (I.OX) = "so"
238     and emit_bit x = emit (asm_bit x)     and emit_bit x = emit (asm_bit x)
239    
240  (*#line 602.7 "ppc/ppc.mdl"*)  (*#line 608.7 "ppc/ppc.mdl"*)
241     fun emitx (s, I.RegOp _) = (if ((String.sub (s, (size s) - 1)) = #"e")     fun emitx (s, I.RegOp _) = (if ((String.sub (s, (size s) - 1)) = #"e")
242            then            then
243            ( emit (String.substring (s, 0, (size s) - 1));            ( emit (String.substring (s, 0, (size s) - 1));
# Line 247  Line 247 
247              emit "x" ))              emit "x" ))
248       | emitx (s, _) = emit s       | emitx (s, _) = emit s
249    
250  (*#line 608.7 "ppc/ppc.mdl"*)  (*#line 614.7 "ppc/ppc.mdl"*)
251     fun eOERc {OE=false, Rc=false} = ()     fun eOERc {OE=false, Rc=false} = ()
252       | eOERc {OE=false, Rc=true} = emit "."       | eOERc {OE=false, Rc=true} = emit "."
253       | eOERc {OE=true, Rc=false} = emit "o"       | eOERc {OE=true, Rc=false} = emit "o"
254       | eOERc {OE=true, Rc=true} = emit "o."       | eOERc {OE=true, Rc=true} = emit "o."
255    
256  (*#line 612.7 "ppc/ppc.mdl"*)  (*#line 618.7 "ppc/ppc.mdl"*)
257     fun eRc false = ""     fun eRc false = ""
258       | eRc true = "."       | eRc true = "."
259    
260  (*#line 613.7 "ppc/ppc.mdl"*)  (*#line 619.7 "ppc/ppc.mdl"*)
261     fun cr_bit (cr, bit) = (4 * (CellsBasis.physicalRegisterNum cr)) +     fun cr_bit (cr, bit) = (4 * (CellsBasis.physicalRegisterNum cr)) +
262         (case bit of         (case bit of
263           I.LT => 0           I.LT => 0
# Line 274  Line 274 
274         | I.OX => 3         | I.OX => 3
275         )         )
276    
277  (*#line 620.7 "ppc/ppc.mdl"*)  (*#line 626.7 "ppc/ppc.mdl"*)
278     fun eCRbit x = emit (Int.toString (cr_bit x))     fun eCRbit x = emit (Int.toString (cr_bit x))
279    
280  (*#line 621.7 "ppc/ppc.mdl"*)  (*#line 627.7 "ppc/ppc.mdl"*)
281     fun eLK true = emit "l"     fun eLK true = emit "l"
282       | eLK false = ()       | eLK false = ()
283    
284  (*#line 622.7 "ppc/ppc.mdl"*)  (*#line 628.7 "ppc/ppc.mdl"*)
285     fun eI (I.RegOp _) = ()     fun eI (I.RegOp _) = ()
286       | eI _ = emit "i"       | eI _ = emit "i"
287    
288  (*#line 623.7 "ppc/ppc.mdl"*)  (*#line 629.7 "ppc/ppc.mdl"*)
289     fun eBI (bo, bf, bit) =     fun eBI (bo, bf, bit) =
290         (case (bo, CellsBasis.physicalRegisterNum bf) of         (case (bo, CellsBasis.physicalRegisterNum bf) of
291           (I.ALWAYS, _) => ()           (I.ALWAYS, _) => ()
# Line 294  Line 294 
294         | (_, n) => emit ((("4*cr" ^ (Int.toString n)) ^ "+") ^ (asm_bit bit))         | (_, n) => emit ((("4*cr" ^ (Int.toString n)) ^ "+") ^ (asm_bit bit))
295         )         )
296    
297  (*#line 629.7 "ppc/ppc.mdl"*)  (*#line 635.7 "ppc/ppc.mdl"*)
298     fun emit_bo bo = emit     fun emit_bo bo = emit
299         (case bo of         (case bo of
300           I.TRUE => "t"           I.TRUE => "t"
# Line 310  Line 310 
310              else "f")              else "f")
311         )         )
312    
313  (*#line 640.7 "ppc/ppc.mdl"*)  (*#line 646.7 "ppc/ppc.mdl"*)
314     fun eME (SOME me) =     fun eME (SOME me) =
315         ( emit ", ";         ( emit ", ";
316           emit_int me )           emit_int me )
317       | eME NONE = ()       | eME NONE = ()
318    
319  (*#line 643.7 "ppc/ppc.mdl"*)  (*#line 649.7 "ppc/ppc.mdl"*)
320     fun addr (ra, I.RegOp rb) =     fun addr (ra, I.RegOp rb) =
321         ( emitCell ra;         ( emitCell ra;
322           emit ", ";           emit ", ";

Legend:
Removed from v.1592  
changed lines
  Added in v.1593

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