diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1997-03-03 17:11:35 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1997-03-03 17:11:35 +0000 |
commit | e8639e720811a5b2ff425a91a8506be2de69b196 (patch) | |
tree | db29d511e70ca4ce4a2965276ef8091dcb5ef810 | |
parent | a1d1dedc40aae256d7b09aa64574dc1b777a5fcb (diff) |
Utiliser %r29 au lieu de %r1 pour passer la taille a caml_alloc et caml_call_gc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1309 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | asmcomp/emit_hppa.mlp | 6 | ||||
-rw-r--r-- | asmcomp/proc_hppa.ml | 3 | ||||
-rw-r--r-- | asmrun/hppa.S | 17 |
3 files changed, 15 insertions, 11 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 diff --git a/asmrun/hppa.S b/asmrun/hppa.S index 80a3993f0..2f4b129d3 100644 --- a/asmrun/hppa.S +++ b/asmrun/hppa.S @@ -87,10 +87,10 @@ caml_required_size .comm 8 EXPORT_CODE(G(caml_alloc)) G(caml_alloc): STARTPROC -; Required size in %r1 - ldw 0(%r4), %r31 - sub %r3, %r1, %r3 - comb,<<,n %r3, %r31, G(caml_call_gc) ; nullify if taken (forward br.) +; Required size in %r29 + ldw 0(%r4), %r1 + sub %r3, %r29, %r3 + comb,<<,n %r3, %r1, G(caml_call_gc) ; nullify if taken (forward br.) bv 0(%r2) nop ENDPROC @@ -98,10 +98,9 @@ G(caml_alloc): EXPORT_CODE(G(caml_call_gc)) G(caml_call_gc): STARTPROC -; Save required size (%r1) - copy %r1, %r31 +; Save required size (%r29) LOADHIGH(G(caml_required_size)) - stw %r31, LOW(G(caml_required_size))(%r1) + stw %r29, LOW(G(caml_required_size))(%r1) ; Save current allocation pointer for debugging purposes LOADHIGH(G(young_ptr)) stw %r3, LOW(G(young_ptr))(%r1) @@ -139,7 +138,7 @@ G(caml_call_gc): stws,ma %r25, 4(%r1) stws,ma %r26, 4(%r1) stws,ma %r28, 4(%r1) - stws,ma %r29, 4(%r1) +;; stws,ma %r29, 4(%r1) %r29 is clobbered LOADHIGH(G(gc_entry_float_regs)) ldo LOW(G(gc_entry_float_regs))(%r1), %r1 fstds,ma %fr4, 8(%r1) @@ -207,7 +206,7 @@ G(caml_call_gc): ldws,ma 4(%r1), %r25 ldws,ma 4(%r1), %r26 ldws,ma 4(%r1), %r28 - ldws,ma 4(%r1), %r29 +;; ldws,ma 4(%r1), %r29 %r29 is clobbered LOADHIGH(G(gc_entry_float_regs)) ldo LOW(G(gc_entry_float_regs))(%r1), %r1 fldds,ma 8(%r1), %fr4 |