Skip to contentSkip to conversation

target/arm/translate.c: Fix missing 'break' for TT insns

PATCH In review Peter Maydell 2 participants 2 messages Feb 6, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/arm/translate.c: Fix missing 'break' for TT insns

The code where we added the TT instruction was accidentally missing a 'break', which meant that after generating the code to execute the TT we would fall through to 'goto illegal_op' and generate code to take an UNDEF insn.

---
Doh...

 target/arm/translate.c | 1 +
 1 file changed, 1 insertion(+)
target/arm/translate.c +1 -0
index 55826b7e5a..572c4d1cb6 100644
@@ -9926,6 +9926,7 @@ static void disas_thumb2_insn(DisasContext *s, uint32_t insn)
                         tcg_temp_free_i32(addr);
                         tcg_temp_free_i32(op);
                         store_reg(s, rd, ttresp);
+                        break;
                     }
                     goto illegal_op;
                 }
Signature · 1 line
2.16.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 1 line · Peter Maydell

The code where we added the TT instruction was accidentally

"In 5158de241b0 ..."

Quoted 4 lines

missing a 'break', which meant that after generating the code to execute the TT we would fall through to 'goto illegal_op' and generate code to take an UNDEF insn.>

Quoted 19 lines

---
Doh...

 target/arm/translate.c | 1 +
 1 file changed, 1 insertion(+)
target/arm/translate.c +1 -0
index 55826b7e5a..572c4d1cb6 100644
@@ -9926,6 +9926,7 @@ static void disas_thumb2_insn(DisasContext *s, uint32_t insn)
                         tcg_temp_free_i32(addr);
                         tcg_temp_free_i32(op);
                         store_reg(s, rd, ttresp);
+                        break;
                     }
                     goto illegal_op;
                 }