From 09d8df6fab54f1b46fca97646f9c007d3b12e0ac Mon Sep 17 00:00:00 2001 From: Trevor Elliott Date: Tue, 1 Nov 2022 13:23:33 -0700 Subject: [PATCH] Switch to `x64_rbp` to avoid the use of a pinned register (#5168) Avoid a use of preg_rpb in the x64 backend, using x64_rbp instead. --- cranelift/codegen/src/isa/x64/lower.isle | 2 +- cranelift/filetests/filetests/isa/x64/fp_sp_pc.clif | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cranelift/codegen/src/isa/x64/lower.isle b/cranelift/codegen/src/isa/x64/lower.isle index c54546c9b4..89a8b5cbda 100644 --- a/cranelift/codegen/src/isa/x64/lower.isle +++ b/cranelift/codegen/src/isa/x64/lower.isle @@ -2853,7 +2853,7 @@ (rule (lower (get_return_address)) (x64_load $I64 - (Amode.ImmReg 8 (preg_rbp) (mem_flags_trusted)) + (Amode.ImmReg 8 (x64_rbp) (mem_flags_trusted)) (ExtKind.None))) ;; Rules for `jump` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/cranelift/filetests/filetests/isa/x64/fp_sp_pc.clif b/cranelift/filetests/filetests/isa/x64/fp_sp_pc.clif index 9a9990ddb2..04315658b8 100644 --- a/cranelift/filetests/filetests/isa/x64/fp_sp_pc.clif +++ b/cranelift/filetests/filetests/isa/x64/fp_sp_pc.clif @@ -39,7 +39,9 @@ block0: ; pushq %rbp ; movq %rsp, %rbp ; block0: -; movq 8(%rbp), %rax +; movq %rbp, %rdi +; movq 8(%rdi), %rax ; movq %rbp, %rsp ; popq %rbp ; ret +