From 8c21a3da4a334d551f69a5e320a5ba4cd7dec6f4 Mon Sep 17 00:00:00 2001 From: johannst Date: Fri, 8 Dec 2023 00:06:50 +0000 Subject: deploy: 20744b382d4d0226037eab810f312accc28fbfe2 --- src/tiny_vm/tiny_vm.rs.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/tiny_vm/tiny_vm.rs.html') diff --git a/src/tiny_vm/tiny_vm.rs.html b/src/tiny_vm/tiny_vm.rs.html index 7de10c9..d36abd1 100644 --- a/src/tiny_vm/tiny_vm.rs.html +++ b/src/tiny_vm/tiny_vm.rs.html @@ -734,10 +734,7 @@ //! } //! ``` -#[cfg(not(any(target_arch = "x86_64", target_os = "linux")))] -compile_error!("Only supported on x86_64 with SystemV abi"); - -use juicebox_asm::insn::*; +use juicebox_asm::insn::*; use juicebox_asm::Runtime; use juicebox_asm::{Asm, Imm16, Imm64, Label, MemOp, Reg16, Reg64}; @@ -956,7 +953,8 @@ } } - /// Translate the bb at the current pc and return a JitFn pointer to it. + #[cfg(all(any(target_arch = "x86_64", target_os = "linux")))] + /// Translate the bb at the current pc and return a JitFn pointer to it. fn translate_next_bb(&mut self) -> JitFn { let mut bb = Asm::new(); let mut pc = self.pc; @@ -966,13 +964,15 @@ pc = pc.wrapping_add(1); - // JIT ABI. + // JIT abi: JitFn -> JitRet + // + // According to SystemV abi: // enter // rdi => regs // rsi => dmem // exit - // rax => JitRet(0, - // rdx => 1) + // rax => JitRet.0 + // rdx => JitRet.1 // Generate memory operand into regs for guest register. let reg_op = |r: TinyReg| { -- cgit v1.2.3