From f25c75915758b97033515b16fcf565ce40a99a56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Mei=C3=9Fner?= Date: Fri, 29 Sep 2023 18:07:05 +0200 Subject: [PATCH] Simplifies inline asm. --- src/jit.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/jit.rs b/src/jit.rs index 0d0458a9..0ee363d7 100644 --- a/src/jit.rs +++ b/src/jit.rs @@ -111,7 +111,6 @@ impl JitProgram { "mov [{host_stack_pointer}], rsp", "add QWORD PTR [{host_stack_pointer}], -8", // We will push RIP in "call r10" later "mov rbp, {rbp}", - "mov rbx, {rbx}", "mov rax, [r11 + 0x00]", "mov rsi, [r11 + 0x08]", "mov rdx, [r11 + 0x10]", @@ -122,13 +121,13 @@ impl JitProgram { "mov r13, [r11 + 0x38]", "mov r14, [r11 + 0x40]", "mov r15, [r11 + 0x48]", + "mov rbx, [r11 + 0x50]", "mov r11, [r11 + 0x58]", "call r10", "pop rbp", "pop rbx", host_stack_pointer = in(reg) &mut vm.host_stack_pointer, rbp = in(reg) (vm as *mut _ as *mut u64).offset(*RUNTIME_ENVIRONMENT_KEY.get().unwrap() as isize), - rbx = in(reg) registers[ebpf::FRAME_PTR_REG], inlateout("rdi") instruction_meter, inlateout("r10") self.pc_section[registers[11] as usize] => _, inlateout("r11") ®isters => _,