target-arm: Fix handling of AL condition in IT instruction
PATCH 1/399 target-arm: Fix handling of AL condition in IT instruction
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 <[email protected]>
--- target-arm/translate.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
target-arm/translate.c +5 -3
@@ -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
Aurelien Jarno
AppliedQuoted 4 lines · Johan Bengtsson
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 <[email protected]>
Thanks, applied.
Quoted 29 lines
--- target-arm/translate.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)target-arm/translate.c +5
-3@@ -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