- Timestamp:
- Sep 3, 2012, 4:44:08 PM (9 years ago)
- Location:
- Deliverables/D2.2/8051-toolstick
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
Deliverables/D2.2/8051-toolstick/src/RTLabs/RTLabsToRTL.ml
r1635 r2321 422 422 let insts_rest = List.map f_rest rest in 423 423 let insts = firsts @ insts_rest in 424 (* Set the carry flag if >0, then dump that in the destination *) 425 let squash_result = 426 [RTL.St_op2 (I8051.Add, destr, RTL.Reg destr, RTL.Imm 255, start_lbl); 427 RTL.St_op2 (I8051.Addc, destr, RTL.Imm 0, RTL.Imm 0, start_lbl)] in 424 428 let epilogue = translate_cst (AST.Cst_int 0) destrs in 425 add_translates [ adds_graph insts ; epilogue] start_lbl dest_lbl def 429 add_translates [ adds_graph (insts @ squash_result); epilogue] 430 start_lbl dest_lbl def 426 431 427 432 (* this requires destrs to be either 0 or 1 to be truly correct
Note: See TracChangeset
for help on using the changeset viewer.