From 6209bebe8305aa6b79220b5aa5426532f03a1871 Mon Sep 17 00:00:00 2001 From: Frank Laub Date: Fri, 26 Jul 2024 11:13:41 -0700 Subject: [PATCH] Workaround for LLVM compiler bug for rv32im (#2129) See: https://github.com/rust-lang/rust/issues/128212 --------- Co-authored-by: Erik Kaneda --- risc0/build/src/docker.rs | 2 +- risc0/zkvm/platform/src/syscall.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/risc0/build/src/docker.rs b/risc0/build/src/docker.rs index 4e57503ea4..704a927470 100644 --- a/risc0/build/src/docker.rs +++ b/risc0/build/src/docker.rs @@ -250,7 +250,7 @@ mod test { build("../../risc0/zkvm/methods/guest/Cargo.toml"); compare_image_id( "risc0_zkvm_methods_guest/multi_test", - "42db28b642c1a8fa50bea888dc1c37178754b641408585d859eb9f6cb95a6633", + "1ade8788486544500d1221b64cac462c84ba9344cd875c3c8e84ca12d1bf7d5d", ); } } diff --git a/risc0/zkvm/platform/src/syscall.rs b/risc0/zkvm/platform/src/syscall.rs index 5c5e2a87a2..5ee565fcc6 100644 --- a/risc0/zkvm/platform/src/syscall.rs +++ b/risc0/zkvm/platform/src/syscall.rs @@ -218,8 +218,8 @@ macro_rules! impl_syscall { ::core::arch::asm!( "ecall", in("t0") $crate::syscall::ecall::SOFTWARE, - inout("a0") from_host => a0, - inout("a1") from_host_words => a1, + inlateout("a0") from_host => a0, + inlateout("a1") from_host_words => a1, in("a2") syscall.as_ptr() $(,in("a3") $a0 $(,in("a4") $a1 @@ -328,7 +328,7 @@ pub extern "C" fn sys_input(index: u32) -> u32 { asm!( "ecall", in("t0") t0, - inout("a0") index => a0, + inlateout("a0") index => a0, ); a0 }