From aed294f7c3d58e01da54a4b3338a9c0e9574d1d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Mei=C3=9Fner?= Date: Thu, 26 Sep 2024 00:40:55 +0200 Subject: [PATCH] Stops using RBP altogether. --- src/jit.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jit.rs b/src/jit.rs index a0ce0df80..c90994d06 100644 --- a/src/jit.rs +++ b/src/jit.rs @@ -113,7 +113,7 @@ impl JitProgram { "push rbx", "mov [{host_stack_pointer}], rsp", "add QWORD PTR [{host_stack_pointer}], -8", // We will push RIP in "call rbp" later - "mov rbp, rax", + "mov [rsp-8], rax", "mov rax, [r11 + 0x00]", "mov rsi, [r11 + 0x08]", "mov rdx, [r11 + 0x10]", @@ -126,7 +126,7 @@ impl JitProgram { "mov r14, [r11 + 0x48]", "mov r15, [r11 + 0x50]", "mov r11, [r11 + 0x58]", - "call rbp", + "call [rsp-8]", "pop rbx", host_stack_pointer = in(reg) &mut vm.host_stack_pointer, inlateout("rdi") std::ptr::addr_of_mut!(*vm).cast::().offset(get_runtime_environment_key() as isize) => _,