diff options
Diffstat (limited to 'asmcomp')
-rw-r--r-- | asmcomp/emit_hppa.mlp | 6 | ||||
-rw-r--r-- | asmcomp/proc_hppa.ml | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/asmcomp/emit_hppa.mlp b/asmcomp/emit_hppa.mlp index d6300bde4..12d5a6cb6 100644 --- a/asmcomp/emit_hppa.mlp +++ b/asmcomp/emit_hppa.mlp @@ -544,13 +544,15 @@ let rec emit_instr i dslot = ` comb,>>= %r3, %r1, {emit_label lbl_cont}\n`; ` addi 4, %r3, {emit_reg i.res.(0)}\n`; (* in delay slot *) emit_call "caml_call_gc" "%r2"; - ` ldi {emit_int n}, %r1\n`; (* in delay slot *) + (* Cannot use %r1 to pass size, since clobbered by glue call code *) + ` ldi {emit_int n}, %r29\n`; (* in delay slot *) record_frame i.live; ` addi 4, %r3, {emit_reg i.res.(0)}\n`; `{emit_label lbl_cont}:\n` end else begin emit_call "caml_alloc" "%r2"; - ` ldi {emit_int n}, %r1\n`; (* in delay slot *) + (* Cannot use %r1 either *) + ` ldi {emit_int n}, %r29\n`; (* in delay slot *) record_frame i.live; ` addi 4, %r3, {emit_reg i.res.(0)}\n` (* in delay slot *) end diff --git a/asmcomp/proc_hppa.ml b/asmcomp/proc_hppa.ml index d61e43e13..5f2a98a4d 100644 --- a/asmcomp/proc_hppa.ml +++ b/asmcomp/proc_hppa.ml @@ -269,10 +269,13 @@ let destroyed_at_c_call = (* %r3 - %r18, %fr12 - %fr21 preserved *) let destroyed_by_millicode = (* %r25, %r26, %r28, %r29 -- more? *) [| phys_reg 19; phys_reg 20; phys_reg 21; phys_reg 22 |] +let destroyed_by_alloc = [| phys_reg 22 |] (* %r29 *) + let destroyed_at_oper = function Iop(Icall_ind | Icall_imm _ | Iextcall(_, true)) -> all_phys_regs | Iop(Iextcall(_, false)) -> destroyed_at_c_call | Iop(Iintop(Idiv | Imod)) -> destroyed_by_millicode + | Iop(Ialloc _) -> destroyed_by_alloc | _ -> [||] let destroyed_at_raise = all_phys_regs |