Skip to content

Commit

Permalink
chore: use constant
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanpwang committed Dec 31, 2024
1 parent bedaffe commit 6f37aeb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions extensions/sha256/transpiler/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use openvm_instructions::{instruction::Instruction, UsizeOpcode};
use openvm_instructions::{instruction::Instruction, riscv::RV32_MEMORY_AS, UsizeOpcode};
use openvm_instructions_derive::UsizeOpcode;
use openvm_sha256_guest::{OPCODE, SHA256_FUNCT3, SHA256_FUNCT7};
use openvm_stark_backend::p3_field::PrimeField32;
Expand Down Expand Up @@ -35,7 +35,11 @@ impl<F: PrimeField32> TranspilerExtension<F> for Sha256TranspilerExtension {
if dec_insn.funct7 != SHA256_FUNCT7 as u32 {
return None;
}
let instruction = from_r_type(Rv32Sha256Opcode::SHA256.with_default_offset(), 2, &dec_insn);
let instruction = from_r_type(
Rv32Sha256Opcode::SHA256.with_default_offset(),
RV32_MEMORY_AS as usize,
&dec_insn,
);
Some((instruction, 1))
}
}

0 comments on commit 6f37aeb

Please sign in to comment.