Skip to contentSkip to conversation

Fixed problem with IT AL.

PATCH New Johan Bengtsson 2 participants 3 messages Feb 9, 2010 – Feb 28, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fixed problem with IT AL.

This patch fixes a problem in the ARM target, where an IT AL instruction causes QEmu to abort.

#1 lore raw

PATCH 1/1 * Fixed problem with IT AL.

---
 target-arm/translate.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
target-arm/translate.c +5 -3
index 786c329..554583d 100644
@@ -8328,9 +8328,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);
Signature · 1 line
1.6.3.3
#2 lore raw

Re: [Qemu-devel] [PATCH] * Fixed problem with IT AL.

The patch looks ok. Can you please resend it with a Signed-of-by: line, and maybe a better subject mentioning ARM?

Quoted 29 lines · Johan Bengtsson
---
 target-arm/translate.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
target-arm/translate.c +5 -3
index 786c329..554583d 100644
@@ -8328,9 +8328,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);
Signature · 1 line
1.6.3.3
Signature · 2 lines
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net