From e32b16107435318d173a60dcda7281c50221ac1e Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Nov 01 2013 17:05:21 +0000 Subject: Follow-up to commit r14254: update destroyed_at_oper and max_register_pressure for immediate Idiv and Imod. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14255 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 --- diff --git a/asmcomp/amd64/proc.ml b/asmcomp/amd64/proc.ml index 8774a0d..838affb 100644 --- a/asmcomp/amd64/proc.ml +++ b/asmcomp/amd64/proc.ml @@ -257,9 +257,10 @@ let destroyed_at_c_call = 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)) -> [| rax; rdx |] + | Iop(Iintop(Idiv | Imod)) | Iop(Iintop_imm((Idiv | Imod), _)) + -> [| rax; rdx |] | Iop(Istore(Single, _)) -> [| rxmm15 |] - | Iop(Ialloc _ | Iintop(Icomp _) | Iintop_imm((Idiv|Imod|Icomp _), _)) + | Iop(Ialloc _ | Iintop(Icomp _) | Iintop_imm((Icomp _), _)) -> [| rax |] | Iswitch(_, _) -> [| rax; rdx |] | _ -> @@ -285,9 +286,9 @@ let max_register_pressure = function if fp then [| 7; 10 |] else [| 8; 10 |] else if fp then [| 3; 0 |] else [| 4; 0 |] - | Iintop(Idiv | Imod) -> + | Iintop(Idiv | Imod) | Iintop_imm((Idiv | Imod), _) -> if fp then [| 10; 16 |] else [| 11; 16 |] - | Ialloc _ | Iintop(Icomp _) | Iintop_imm((Idiv|Imod|Icomp _), _) -> + | Ialloc _ | Iintop(Icomp _) | Iintop_imm((Icomp _), _) -> if fp then [| 11; 16 |] else [| 12; 16 |] | Istore(Single, _) -> if fp then [| 12; 15 |] else [| 13; 15 |]