From 9c55cf97889fd553cad95c35de18323f03fa6689 Mon Sep 17 00:00:00 2001 From: Alexander Golovanov Date: Wed, 8 Jan 2025 18:42:46 +0100 Subject: [PATCH] Put the `core::arch::asm` invocation under the cfg(target_os = "zkvm") for less space for the wrong signature error --- crates/toolchain/platform/custom_insn/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/toolchain/platform/custom_insn/src/lib.rs b/crates/toolchain/platform/custom_insn/src/lib.rs index 3be4b7864..a27646542 100644 --- a/crates/toolchain/platform/custom_insn/src/lib.rs +++ b/crates/toolchain/platform/custom_insn/src/lib.rs @@ -318,6 +318,7 @@ pub fn custom_insn_r(input: proc_macro::TokenStream) -> proc_macro::TokenStream handle_reg_arg(&mut template, &mut args, &rs2, "rs2"); let expanded = quote::quote! { + #[cfg(target_os = "zkvm")] unsafe { core::arch::asm!( #template, @@ -374,6 +375,7 @@ pub fn custom_insn_i(input: proc_macro::TokenStream) -> proc_macro::TokenStream handle_reg_arg(&mut template, &mut args, &imm, "imm"); let expanded = quote::quote! { + #[cfg(target_os = "zkvm")] unsafe { core::arch::asm!( #template,