Ignore:
Timestamp:
Dec 6, 2011, 5:04:13 PM (8 years ago)
Author:
tranquil
Message:
  • turned to argument-less return statements for RTLabs and RTL (there was a hidden invariant, for which the arguments of return statements where equal to the f_result field of the function definition: they were useless and an optimization was breaking the compilation)
  • corrected a bug in liveness analysis I had introduced
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D2.2/8051/src/ERTL/ERTLToLTLI.ml

    r1572 r1589  
    5252  let move_sp_to_dptr off l =
    5353    let off = adjust off in
    54     let l = generate (LTL.St_from_acc (I8051.dph, l)) in
    55     let l = generate (LTL.St_op2 (I8051.Addc, LTL.Reg I8051.sph, l)) in
    56     let l = generate (LTL.St_int (I8051.a, 0, l)) in
    57     let l = generate (LTL.St_from_acc (I8051.dpl, l)) in
    58     let l = generate (LTL.St_op2 (I8051.Add, LTL.Reg I8051.spl, l)) in
    59     LTL.St_int (I8051.a, off, l)
     54    if off = 0 then
     55      let l = generate (LTL.St_from_acc (I8051.dph, l)) in
     56      let l = generate (LTL.St_to_acc (I8051.sph, l)) in
     57      let l = generate (LTL.St_from_acc (I8051.dpl, l)) in
     58      LTL.St_to_acc (I8051.spl, l)
     59    else
     60      let l = generate (LTL.St_from_acc (I8051.dph, l)) in
     61      let l = generate (LTL.St_op2 (I8051.Addc, LTL.Reg I8051.sph, l)) in
     62      let l = generate (LTL.St_int (I8051.a, 0, l)) in
     63      let l = generate (LTL.St_from_acc (I8051.dpl, l)) in
     64      let l = generate (LTL.St_op2 (I8051.Add, LTL.Reg I8051.spl, l)) in
     65      LTL.St_int (I8051.a, off, l)
    6066
    6167
     
    7379    move_sp_to_dptr off l
    7480
    75   (* side-effects : dpl, dph, sst *)
     81  (* side-effects : dpl, dph, st0 *)
    7682  let set_stack_a off l =
    77     let l = generate (LTL.St_store l) in
    78     let l = generate (set_stack_not_a off I8051.sst l) in
     83    let l = generate (set_stack_not_a off I8051.st0 l) in
    7984    LTL.St_from_acc (I8051.st0, l)
    8085
     
    99104  (* side-effects : none if dest = src, a if both colored,
    100105                    (dpl, dph, a) if src spilled or src imm and dest spilled,
    101                     (dpl, dph, a, sst) if dest spilled *)
     106                    (dpl, dph, a, st0) if dest spilled *)
    102107  let move (dest : decision) (src : argument) l =
    103108    match dest, src with
Note: See TracChangeset for help on using the changeset viewer.