[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 03/11] target-arm: Handle always condition co
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v2 03/11] target-arm: Handle always condition codes within arm_test_cc |
Date: |
Mon, 7 Sep 2015 18:11:04 +0100 |
On 2 September 2015 at 18:57, Richard Henderson <address@hidden> wrote:
> Handling this with TCG_COND_ALWAYS will allow these unlikely
> cases to be handled without special cases in the rest of the
> translator. The TCG optimizer ought to be able to reduce
> these ALWAYS conditions completely.
>
> Signed-off-by: Richard Henderson <address@hidden>
> ---
> target-arm/translate.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/target-arm/translate.c b/target-arm/translate.c
> index 1f43777..e2bccef 100644
> --- a/target-arm/translate.c
> +++ b/target-arm/translate.c
> @@ -799,6 +799,14 @@ void arm_test_cc(DisasCompare *cmp, int cc)
> tcg_gen_andc_i32(value, cpu_ZF, value);
> break;
>
> + case 14: /* always */
> + case 15: /* always */
> + /* Use the ALWAYS condition, which will fold early.
> + It doesn't matter what we use for the value. */
> + cond = TCG_COND_ALWAYS;
> + value = cpu_ZF;
> + goto no_invert;
> +
Reviewed-by: Peter Maydell <address@hidden>
The usual multiline comment style in target-arm is
/* line one
* line two
*/
by the way.
thanks
-- PMM