From 56963fb92bf16fc4fb8d1b52e03c89666428ec3c Mon Sep 17 00:00:00 2001 From: Unkn0wn Date: Sun, 16 Aug 2026 12:03:03 -0500 Subject: [PATCH] Fixed a bug affecting the ExecuteQreg32 state which caused the PC to increment in situations it shouldn't (INQ crash) --- src/vhdl/gs4510.vhdl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/vhdl/gs4510.vhdl b/src/vhdl/gs4510.vhdl index c05482022..0b327740e 100755 --- a/src/vhdl/gs4510.vhdl +++ b/src/vhdl/gs4510.vhdl @@ -8218,7 +8218,13 @@ begin -- reg_q33 holds the q reg, no need to load anything next_is_axyz32_instruction <= '0'; report "ExecuteQreg32: reg_q33 = $" & to_hstring(reg_q33) & ", reg_instruction = " & instruction'image(reg_instruction); - pc_inc := '1'; + if fast_fetch_state = InstructionDecode then + pc_inc := '1'; + else + report "not setting pc_inc, because fast_fetch_state /= InstructionDecode"; + pc_inc := '0'; + end if; + -- pc_inc := '1'; pc_dec := '0'; case reg_instruction is when I_INC =>