Skip to content

Commit

Permalink
Simplifies inline asm.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lichtso committed Sep 30, 2023
1 parent d335a3c commit f25c759
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/jit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]",
Expand All @@ -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") &registers => _,
Expand Down

0 comments on commit f25c759

Please sign in to comment.