Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normal format for custom_insn_* macros we have #1193

Merged
merged 7 commits into from
Jan 9, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Put the core::arch::asm invocation under the cfg(target_os = "zkvm"…
…) for less space for the wrong signature error
Golovanov399 committed Jan 8, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 9c55cf97889fd553cad95c35de18323f03fa6689
2 changes: 2 additions & 0 deletions crates/toolchain/platform/custom_insn/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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,