Skip to content

Commit 38b79ff

Browse files
committed
add missed next_is_delayslot case
1 parent bbe7c7a commit 38b79ff

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

crates/core/executor/src/executor.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,9 +1243,11 @@ impl<'a> Executor<'a> {
12431243
}
12441244
Opcode::Jumpi => {
12451245
(a, b, c, next_next_pc) = self.execute_jumpi(instruction);
1246+
self.state.next_is_delayslot = true;
12461247
}
12471248
Opcode::JumpDirect => {
12481249
(a, b, c, next_next_pc) = self.execute_jump_direct(instruction);
1250+
self.state.next_is_delayslot = true;
12491251
}
12501252

12511253
// Misc instructions.

crates/core/machine/src/cpu/air/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ impl CpuChip {
163163
// Verify the relationship between initial start pc and initial next pc.
164164
builder
165165
.when_first_row()
166+
.when_not(local.is_halt)
166167
.assert_eq(local.pc + AB::Expr::from_canonical_u32(4), local.next_pc);
167168

168169
// Verify the pc, next_pc, and next_next_pc

0 commit comments

Comments
 (0)