Ignore:
Timestamp:
Nov 28, 2011, 3:13:14 PM (9 years ago)
Author:
tranquil
Message:
  • corrected previous bug
  • finished propagating immediates
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D2.2/8051/src/cminor/cminorToRTLabs.ml

    r1542 r1572  
    297297      let oretr = find_olocal lenv oret in
    298298      let old_entry = rtlabs_fun.RTLabs.f_entry in
    299       let stmt = RTLabs.St_call_id (f, regs, oretr, sg, old_entry) in
     299      let regs' = List.map (fun reg -> RTLabs.Reg reg) regs in
     300      let stmt = RTLabs.St_call_id (f, regs', oretr, sg, old_entry) in
    300301      let rtlabs_fun = generate rtlabs_fun stmt in
    301302      translate_exprs rtlabs_fun lenv regs args
     
    306307      let oretr = find_olocal lenv oret in
    307308      let old_entry = rtlabs_fun.RTLabs.f_entry in
    308       let stmt = RTLabs.St_call_ptr (fr, regs, oretr, sg, old_entry) in
     309      let regs' = List.map (fun reg -> RTLabs.Reg reg) regs in
     310      let stmt = RTLabs.St_call_ptr (fr, regs', oretr, sg, old_entry) in
    309311      let rtlabs_fun = generate rtlabs_fun stmt in
    310312      translate_exprs rtlabs_fun lenv (fr :: regs) (f :: args)
     
    313315                          args, sg) ->
    314316      let (rtlabs_fun, regs) = choose_destinations rtlabs_fun lenv args in
    315       let stmt = RTLabs.St_tailcall_id (f, regs, sg) in
     317      let regs' = List.map (fun reg -> RTLabs.Reg reg) regs in
     318      let stmt = RTLabs.St_tailcall_id (f, regs', sg) in
    316319      let rtlabs_fun = generate rtlabs_fun stmt in
    317320      translate_exprs rtlabs_fun lenv regs args
     
    320323      let (rtlabs_fun, fr) = choose_destination rtlabs_fun lenv f in
    321324      let (rtlabs_fun, regs) = choose_destinations rtlabs_fun lenv args in
    322       let stmt = RTLabs.St_tailcall_ptr (fr, regs, sg) in
     325      let regs' = List.map (fun reg -> RTLabs.Reg reg) regs in
     326      let stmt = RTLabs.St_tailcall_ptr (fr, regs', sg) in
    323327      let rtlabs_fun = generate rtlabs_fun stmt in
    324328      translate_exprs rtlabs_fun lenv (fr :: regs) (f :: args)
     
    445449  let return = match result with
    446450    | None -> None
    447     | Some (retr, _) -> Some retr in
     451    | Some (retr, _) -> Some (RTLabs.Reg retr) in
    448452  let graph = Label.Map.add exit (RTLabs.St_return return) Label.Map.empty in
    449453
Note: See TracChangeset for help on using the changeset viewer.