diff options
-rw-r--r-- | asmcomp/arm/proc.ml | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/asmcomp/arm/proc.ml b/asmcomp/arm/proc.ml index 58f1c722d..dfd028f94 100644 --- a/asmcomp/arm/proc.ml +++ b/asmcomp/arm/proc.ml @@ -192,17 +192,17 @@ let destroyed_at_c_call = 124;125;126;127;128;129;130;131])) let destroyed_at_oper = function - Iop(Icall_ind | Icall_imm _ ) + Iop(Icall_ind | Icall_imm _) | Iop(Iextcall(_, true)) -> all_phys_regs | Iop(Iextcall(_, false)) -> destroyed_at_c_call - | Iop(Ialloc n) -> + | Iop(Ialloc _) -> destroyed_at_alloc | Iop(Iconst_symbol _) when !pic_code -> - [|phys_reg 3; phys_reg 8|] (* r3 and r12 destroyed *) + [| phys_reg 3; phys_reg 8 |] (* r3 and r12 destroyed *) | Iop(Iintoffloat | Ifloatofint | Iload(Single, _) | Istore(Single, _)) -> - [|phys_reg 107|] (* d7 (s14-s15) destroyed *) + [| phys_reg 107 |] (* d7 (s14-s15) destroyed *) | _ -> [||] let destroyed_at_raise = all_phys_regs @@ -210,11 +210,17 @@ let destroyed_at_raise = all_phys_regs (* Maximal register pressure *) let safe_register_pressure = function - Iextcall(_, _) -> 5 + Iextcall(_, _) -> if abi = EABI then 0 else 4 + | Ialloc _ -> if abi = EABI then 0 else 7 + | Iconst_symbol _ when !pic_code -> 7 | _ -> 9 let max_register_pressure = function - Iextcall(_, _) -> [| 5; 9; 9 |] + Iextcall(_, _) -> if abi = EABI then [| 4; 0; 0 |] else [| 4; 8; 8 |] + | Ialloc _ -> if abi = EABI then [| 7; 0; 0 |] else [| 7; 8; 8 |] + | Iconst_symbol _ when !pic_code -> [| 7; 16; 32 |] + | Iintoffloat | Ifloatofint + | Iload(Single, _) | Istore(Single, _) -> [| 9; 15; 31 |] | _ -> [| 9; 16; 32 |] (* Layout of the stack *) |