openvm_bigint_guest/
lib.rs

1#![no_std]
2
3use strum_macros::FromRepr;
4
5/// This is custom-0 defined in RISC-V spec document
6pub const OPCODE: u8 = 0x0b;
7pub const INT256_FUNCT3: u8 = 0b101;
8pub const BEQ256_FUNCT3: u8 = 0b110;
9
10/// funct7 options for 256-bit integer instructions.
11#[derive(Debug, Copy, Clone, PartialEq, Eq, FromRepr)]
12#[repr(u8)]
13pub enum Int256Funct7 {
14    Add = 0,
15    Sub,
16    Xor,
17    Or,
18    And,
19    Sll,
20    Srl,
21    Sra,
22    Slt,
23    Sltu,
24    Mul,
25}
26
27#[cfg(all(feature = "export-intrinsics", target_os = "zkvm"))]
28pub mod externs;