Patchwork * Fixed problem with IT AL.

login
register
mail settings
Submitter Johan Bengtsson
Date Feb. 9, 2010, 3:43 p.m.
Message ID <1265730227-21926-2-git-send-email-teofrastius@gmail.com>
Download mbox | patch
Permalink /patch/44912/
State New
Headers show

Comments

Johan Bengtsson - Feb. 9, 2010, 3:43 p.m.
---
 target-arm/translate.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
Aurelien Jarno - Feb. 28, 2010, 6:58 p.m.
The patch looks ok. Can you please resend it with a Signed-of-by: line,
and maybe a better subject mentioning ARM?

On Tue, Feb 09, 2010 at 04:43:47PM +0100, Johan Bengtsson wrote:
> ---
>  target-arm/translate.c |    8 +++++---
>  1 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/target-arm/translate.c b/target-arm/translate.c
> index 786c329..554583d 100644
> --- a/target-arm/translate.c
> +++ b/target-arm/translate.c
> @@ -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);
> -- 
> 1.6.3.3
> 
> 
> 
>

Patch

diff --git a/target-arm/translate.c b/target-arm/translate.c
index 786c329..554583d 100644
--- a/target-arm/translate.c
+++ b/target-arm/translate.c
@@ -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);