Skip to content

Commit

Permalink
Use custom-0
Browse files Browse the repository at this point in the history
  • Loading branch information
TlatoaniHJ committed Jan 9, 2025
1 parent 1216e66 commit ea37590
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/native/serialization/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use p3_field::PrimeField32;

/*
* The indicators use
* - opcode = 0x2b (custom-1 as defined in RISC-V spec document)
* - opcode = 0x0b (custom-0 as defined in RISC-V spec document)
* - funct3 = 0b111
*
* `LONG_FORM_INSTRUCTION_INDICATOR` has funct7 = 0b0.
Expand All @@ -13,7 +13,7 @@ use p3_field::PrimeField32;
* because it occurs only within a block already prefixed with `LONG_FORM_INSTRUCTION_INDICATOR`.
* Thus, we make its value larger than 2^31 to ensure that it is not equal to a possible field element.
*/
const OPCODE: u32 = 0x2b;
const OPCODE: u32 = 0x0b;
const FUNCT3: u32 = 0b111;
pub const LONG_FORM_INSTRUCTION_INDICATOR: u32 = (FUNCT3 << 12) + OPCODE;
pub const GAP_INDICATOR: u32 = (1 << 25) + (FUNCT3 << 12) + OPCODE;
Expand Down

0 comments on commit ea37590

Please sign in to comment.