Changeset 2100
 Timestamp:
 Jun 18, 2012, 5:16:08 PM (5 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Deliverables/D2.2/8051/src/ERTL/ERTLToLTLI.ml
r1589 r2100 49 49 let adjust off = locals  (off + I8051.int_size) 50 50 51 (* sideeffects : dpl, dph, a *)51 (* sideeffects : dpl, dph, a, st1 if adjust off <> 0 *) 52 52 let move_sp_to_dptr off l = 53 53 let off = adjust off in … … 58 58 LTL.St_to_acc (I8051.spl, l) 59 59 else 60 let l = generate (LTL.St_op2 (I8051.Sub, LTL.Reg I8051.st1, l)) in 61 let l = generate (LTL.St_clear_carry l) in 62 let l = generate (LTL.St_int (I8051.a, 0, l)) in 63 (* ^ restore the carry bit ^ *) 60 64 let l = generate (LTL.St_from_acc (I8051.dph, l)) in 61 65 let l = generate (LTL.St_op2 (I8051.Addc, LTL.Reg I8051.sph, l)) in … … 63 67 let l = generate (LTL.St_from_acc (I8051.dpl, l)) in 64 68 let l = generate (LTL.St_op2 (I8051.Add, LTL.Reg I8051.spl, l)) in 65 LTL.St_int (I8051.a, off, l) 66 67 68 (* sideeffects : dpl, dph, a *) 69 let l = generate (LTL.St_int (I8051.a, off, l)) in 70 let l = generate (LTL.St_from_acc (I8051.st1, l)) in 71 let l = generate (LTL.St_op2 (I8051.Addc, LTL.Imm 0, l)) in 72 LTL.St_int (I8051.a, 0, l) 73 (* ^ save the carry bit ^ *) 74 75 76 (* sideeffects : dpl, dph, a, st1 if adjust off <> 0 *) 69 77 let get_stack r off l = 70 78 let l = … … 73 81 move_sp_to_dptr off l 74 82 75 (* sideeffects : dpl, dph, a *)83 (* sideeffects : dpl, dph, a, st1 if adjust off <> 0 *) 76 84 let set_stack_not_a off r l = 77 85 let l = generate (LTL.St_store l) in … … 79 87 move_sp_to_dptr off l 80 88 81 (* sideeffects : dpl, dph, st0 *)89 (* sideeffects : dpl, dph, st0, st1 if adjust off <> 0 *) 82 90 let set_stack_a off l = 83 91 let l = generate (set_stack_not_a off I8051.st0 l) in 84 92 LTL.St_from_acc (I8051.st0, l) 85 93 86 (* sideeffects : dpl, dph, st0 if r = a, a if r != a *)94 (* sideeffects : dpl, dph, st0 if r = a, a if r != a, st1 if adjust off <> 0 *) 87 95 let set_stack off r = 88 96 if I8051.eq_reg r I8051.a then set_stack_a off else 89 97 set_stack_not_a off r 90 98 91 (* sideeffects : dpl, dph, a *)99 (* sideeffects : dpl, dph, a, st1 if adjust off <> 0 *) 92 100 let set_stack_int off k l = 93 101 let l = generate (LTL.St_store l) in … … 96 104 97 105 98 (* sideeffects : (dpl, dph, a ) if dest spilled *)106 (* sideeffects : (dpl, dph, a, st1 if adjust off <> 0) if dest spilled *) 99 107 let move_int (dest : decision) (k : int) l = 100 108 match dest with … … 103 111 104 112 (* sideeffects : none if dest = src, a if both colored, 105 (dpl, dph, a ) if src spilled or src imm and dest spilled,106 (dpl, dph, a, st0 ) if dest spilled *)113 (dpl, dph, a, st1 if adjust off <> 0) if src spilled or src imm and dest spilled, 114 (dpl, dph, a, st0, st1 if adjust off <> 0) if dest spilled *) 107 115 let move (dest : decision) (src : argument) l = 108 116 match dest, src with
Note: See TracChangeset
for help on using the changeset viewer.