[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 06/13] target-alpha: Use setcond for int compari
From: |
Aurelien Jarno |
Subject: |
Re: [Qemu-devel] [PATCH 06/13] target-alpha: Use setcond for int comparisons. |
Date: |
Sat, 10 Apr 2010 03:05:37 +0200 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Tue, Mar 16, 2010 at 01:04:34PM -0700, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <address@hidden>
> ---
> target-alpha/translate.c | 43 ++++++++++++++++++++++---------------------
> 1 files changed, 22 insertions(+), 21 deletions(-)
Thanks, applied.
> diff --git a/target-alpha/translate.c b/target-alpha/translate.c
> index dff03ef..adeff0a 100644
> --- a/target-alpha/translate.c
> +++ b/target-alpha/translate.c
> @@ -1290,33 +1290,34 @@ MVIOP2(pkwb)
> MVIOP2(unpkbl)
> MVIOP2(unpkbw)
>
> -static inline void gen_cmp(TCGCond cond, int ra, int rb, int rc, int islit,
> - uint8_t lit)
> +static void gen_cmp(TCGCond cond, int ra, int rb, int rc,
> + int islit, uint8_t lit)
> {
> - int l1, l2;
> - TCGv tmp;
> + TCGv va, vb;
>
> - if (unlikely(rc == 31))
> + if (unlikely(rc == 31)) {
> return;
> + }
>
> - l1 = gen_new_label();
> - l2 = gen_new_label();
> + if (ra == 31) {
> + va = tcg_const_i64(0);
> + } else {
> + va = cpu_ir[ra];
> + }
> + if (islit) {
> + vb = tcg_const_i64(lit);
> + } else {
> + vb = cpu_ir[rb];
> + }
>
> - if (ra != 31) {
> - tmp = tcg_temp_new();
> - tcg_gen_mov_i64(tmp, cpu_ir[ra]);
> - } else
> - tmp = tcg_const_i64(0);
> - if (islit)
> - tcg_gen_brcondi_i64(cond, tmp, lit, l1);
> - else
> - tcg_gen_brcond_i64(cond, tmp, cpu_ir[rb], l1);
> + tcg_gen_setcond_i64(cond, cpu_ir[rc], va, vb);
>
> - tcg_gen_movi_i64(cpu_ir[rc], 0);
> - tcg_gen_br(l2);
> - gen_set_label(l1);
> - tcg_gen_movi_i64(cpu_ir[rc], 1);
> - gen_set_label(l2);
> + if (ra == 31) {
> + tcg_temp_free(va);
> + }
> + if (islit) {
> + tcg_temp_free(vb);
> + }
> }
>
> static void gen_rx(int ra, int set)
> --
> 1.6.6.1
>
>
>
>
--
Aurelien Jarno GPG: 1024D/F1BCDB73
address@hidden http://www.aurel32.net
- [Qemu-devel] [PATCH 00/13] target-alpha improvements, version 4, Richard Henderson, 2010/04/07
- [Qemu-devel] [PATCH 04/13] target-alpha: Implement cvtql inline., Richard Henderson, 2010/04/07
- [Qemu-devel] [PATCH 05/13] target-alpha: Implement cvtlq inline., Richard Henderson, 2010/04/07
- [Qemu-devel] [PATCH 02/13] target-alpha: Implement cpys{, n, e} inline., Richard Henderson, 2010/04/07
- [Qemu-devel] [PATCH 06/13] target-alpha: Use setcond for int comparisons., Richard Henderson, 2010/04/07
- Re: [Qemu-devel] [PATCH 06/13] target-alpha: Use setcond for int comparisons.,
Aurelien Jarno <=
- [Qemu-devel] [PATCH 09/13] target-alpha: Update commentary for opcode 0x1A., Richard Henderson, 2010/04/07
- [Qemu-devel] [PATCH 01/13] target-alpha: Add flags markups to helpers.h., Richard Henderson, 2010/04/07
- [Qemu-devel] [PATCH 10/13] target-alpha: Enable NPTL., Richard Henderson, 2010/04/07
- [Qemu-devel] [PATCH 07/13] target-alpha: Use non-inverted arguments to gen_{f}cmov., Richard Henderson, 2010/04/07
- [Qemu-devel] [PATCH 03/13] target-alpha: Implement rs/rc properly., Richard Henderson, 2010/04/07
- [Qemu-devel] [PATCH 11/13] target-alpha: Indicate NORETURN status when raising exception., Richard Henderson, 2010/04/07