Merge pull request #1112 from topos-protocol/fix-generate-jump

Fix jump operation generation
This commit is contained in:
Jacqueline Nabaglo 2023-07-08 16:38:35 -04:00 committed by GitHub
commit 1664ab4408
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -185,13 +185,14 @@ pub(crate) fn generate_jump<F: Field>(
state, state,
&mut row, &mut row,
); );
row.mem_channels[1].value[0] = F::ONE;
if state.registers.is_kernel { if state.registers.is_kernel {
// Don't actually do the read, just set the address, etc. // Don't actually do the read, just set the address, etc.
let channel = &mut row.mem_channels[NUM_GP_CHANNELS - 1]; let channel = &mut row.mem_channels[NUM_GP_CHANNELS - 1];
channel.used = F::ZERO; channel.used = F::ZERO;
channel.value[0] = F::ONE; channel.value[0] = F::ONE;
row.mem_channels[1].value[0] = F::ONE;
} else { } else {
if jumpdest_bit != U256::one() { if jumpdest_bit != U256::one() {
return Err(ProgramError::InvalidJumpDestination); return Err(ProgramError::InvalidJumpDestination);