target-arm: Fix handling of AL condition in IT instruction
authorJohan Bengtsson <teofrastius@gmail.com>
Wed, 17 Mar 2010 12:56:07 +0000 (13:56 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Tue, 23 Mar 2010 21:10:45 +0000 (22:10 +0100)
Do not try to insert a conditional jump over next instruction when the
condition code is AL as this will trigger an internal error.

Signed-off-by: Johan Bengtsson <teofrastius@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-arm/translate.c

index cdfe946a6d34147243faec302abcb8eced6cb202..3b84c1dabd2a280def2d53ab6c7b2af70c3aa3c0 100644 (file)
@@ -8336,9 +8336,11 @@ static void disas_thumb_insn(CPUState *env, DisasContext *s)
 
     if (s->condexec_mask) {
         cond = s->condexec_cond;
-        s->condlabel = gen_new_label();
-        gen_test_cc(cond ^ 1, s->condlabel);
-        s->condjmp = 1;
+        if (cond != 0x0e) {     /* Skip conditional when condition is AL. */
+          s->condlabel = gen_new_label();
+          gen_test_cc(cond ^ 1, s->condlabel);
+          s->condjmp = 1;
+        }
     }
 
     insn = lduw_code(s->pc);