summaryrefslogtreecommitdiff
path: root/asmcomp/amd64/proc.ml
diff options
context:
space:
mode:
Diffstat (limited to 'asmcomp/amd64/proc.ml')
-rw-r--r--asmcomp/amd64/proc.ml2
1 files changed, 2 insertions, 0 deletions
diff --git a/asmcomp/amd64/proc.ml b/asmcomp/amd64/proc.ml
index 856e4655a6..0e274b4f4e 100644
--- a/asmcomp/amd64/proc.ml
+++ b/asmcomp/amd64/proc.ml
@@ -92,6 +92,7 @@ let phys_reg n =
let rax = phys_reg 0
let rcx = phys_reg 5
let rdx = phys_reg 4
+let r11 = phys_reg 9
let rxmm15 = phys_reg 115
let stack_slot slot ty =
@@ -169,6 +170,7 @@ let destroyed_at_oper = function
| Iop(Istore(Single, _)) -> [| rxmm15 |]
| Iop(Ialloc _ | Iintop(Icomp _) | Iintop_imm((Idiv|Imod|Icomp _), _))
-> [| rax |]
+ | Iswitch(_, _) when !pic_code -> [| r11 |]
| _ -> [||]
let destroyed_at_raise = all_phys_regs