Changeset 1525 for Deliverables/D2.2/8051/src/LIN/LINToASM.ml
- Timestamp:
- Nov 21, 2011, 6:17:45 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Deliverables/D2.2/8051/src/LIN/LINToASM.ml
r1492 r1525 118 118 | LIN.St_call_ptr -> 119 119 let lbl = env.fresh () in 120 [`MOV (`U3 (st0_addr, dpl_addr)) ; 121 `MOV (`U3 (st1_addr, dph_addr)) ; 122 `Mov (`DPTR, lbl) ; 123 `PUSH dpl_addr ; 124 `PUSH dph_addr ; 125 `PUSH st0_addr ; 126 `PUSH st1_addr ; 127 `RET ; 128 `Label lbl] 129 (* TODO: tell Claudio about the false assertion raised by the following. *) 130 (* 131 | LIN.St_call_ptr -> 132 let lbl = env.fresh () in 133 [`MOV (`U3 (st0_addr, dpl_addr)) ; 134 `MOV (`U3 (st1_addr, dph_addr)) ; 135 `Mov (`DPTR, lbl) ; 136 `PUSH dpl_addr ; 137 `PUSH dph_addr ; 138 `MOV (`U3 (dpl_addr, st0_addr)) ; 139 `MOV (`U3 (dph_addr, st1_addr)) ; 140 `JMP `IND_DPTR ; 141 `Label lbl] 142 *) 120 [`MOV (`U3 (st0_addr, dpl_addr)) ; (* save DPL *) 121 `MOV (`U3 (st1_addr, dph_addr)) ; (* save DPH *) 122 `Mov (`DPTR, lbl) ; (* DPTR <- return address *) 123 `PUSH dpl_addr ; (* push DPL *) 124 `PUSH dph_addr ; (* push DPH *) 125 `MOV (`U3 (dpl_addr, st0_addr)) ; (* restore DPL *) 126 `MOV (`U3 (dph_addr, st1_addr)) ; (* restore DPH *) 127 `MOV (`U1 (`A, data_of_int 0)) ; (* A <- 0 *) 128 `JMP `IND_DPTR ; (* jump to A+DPTR *) 129 `Label lbl] (* return address *) 143 130 | LIN.St_condacc lbl -> 144 131 [`WithLabel (`JNZ (`Label lbl))]
Note: See TracChangeset
for help on using the changeset viewer.