Skip to content

Commit

Permalink
Put the core::arch::asm invocation under the cfg(target_os = "zkvm"…
Browse files Browse the repository at this point in the history
…) for less space for the wrong signature error
  • Loading branch information
Golovanov399 committed Jan 8, 2025
1 parent 99b0046 commit 9c55cf9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/toolchain/platform/custom_insn/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 9c55cf9

Please sign in to comment.