From 8e368edd5c4f865f04d3f3b7f348898674bf2beb Mon Sep 17 00:00:00 2001 From: sy2002 Date: Sat, 13 Feb 2016 12:37:22 +0100 Subject: [PATCH] fixed pre-decrement CPU bug --- vhdl/qnice_cpu.vhd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vhdl/qnice_cpu.vhd b/vhdl/qnice_cpu.vhd index 72b18879..57f3e7e7 100644 --- a/vhdl/qnice_cpu.vhd +++ b/vhdl/qnice_cpu.vhd @@ -398,7 +398,7 @@ begin -- in case of a branch, Dst_Mode would contain garbage, therefore perform an explicit check -- optimization: in case of MOVE the destination value is ignored anyway, so we can skip -- the whole indirect parameter fetch in this case - elsif Opcode /= opcBRA and Dst_Mode /= amDirect and Opcode /= opcMOVE then + elsif Opcode /= opcBRA and Dst_Mode /= amDirect and (Opcode /= opcMOVE or Dst_Mode = amIndirPreDec) then fsmNextCpuState <= cs_exeprep_get_dst_indirect; -- pre decrement for destination register