Skip to contentSkip to conversation

target-arm: Fix CP15 based WFI

PATCH In review Paul Brook 2 participants 2 messages Jul 1, 2012

lore
Share & tools
lore

Paul Brook

author
#0 lore raw

PATCH 1/1 target-arm: Fix CP15 based WFI

The coprocessor register rework broke cp15 based WFI instructions. We incorrectly fall through the normal register write case, which incorrectly adds a forced block termination. We've already done a special version of this (DISAS_WFI), so return immediately.

---
 target-arm/translate.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target-arm/translate.c +1 -1
index a2a0ecd..f39b9ca 100644
@@ -6236,7 +6236,7 @@ static int disas_coproc_insn(CPUARMState * env, DisasContext *s, uint32_t insn)
             }
             gen_set_pc_im(s->pc);
             s->is_jmp = DISAS_WFI;
-            break;
+            return 0;
         default:
             break;
         }
Signature · 1 line
1.7.10
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Paul Brook

The coprocessor register rework broke cp15 based WFI instructions. We incorrectly fall through the normal register write case, which incorrectly adds a forced block termination.  We've already done a special version of this (DISAS_WFI), so return immediately.

Thanks for the catch.

-- PMM