[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [6805] tcg: optimize logical operations
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] [6805] tcg: optimize logical operations |
Date: |
Tue, 10 Mar 2009 23:26:40 +0000 |
User-agent: |
KMail/1.9.9 |
On Tuesday 10 March 2009, Aurelien Jarno wrote:
> static inline void tcg_gen_andi_i64(TCGv_i64 ret, TCGv_i64 arg1, int64_t
> - tcg_gen_andi_i32(TCGV_LOW(ret), TCGV_LOW(arg1), arg2);
> - tcg_gen_andi_i32(TCGV_HIGH(ret), TCGV_HIGH(arg1), arg2 >> 32);
> + if (TCGV_EQUAL_I64(arg1, arg2)) {
This is wrong (and breaks 32-bit hosts).
> static inline void tcg_gen_or_i64(TCGv_i64 ret, TCGv_i64 arg1, TCGv_i64
> - tcg_gen_or_i32(TCGV_LOW(ret), TCGV_LOW(arg1), TCGV_LOW(arg2));
> - tcg_gen_or_i32(TCGV_HIGH(ret), TCGV_HIGH(arg1), TCGV_HIGH(arg2));
> + if (TCGV_EQUAL_I64(arg1, arg2)) {
> static inline void tcg_gen_xor_i64(TCGv_i64 ret, TCGv_i64 arg1, TCGv_i64
> - tcg_gen_xor_i32(TCGV_LOW(ret), TCGV_LOW(arg1), TCGV_LOW(arg2));
> - tcg_gen_xor_i32(TCGV_HIGH(ret), TCGV_HIGH(arg1), TCGV_HIGH(arg2));
> + if (TCGV_EQUAL_I64(arg1, arg2)) {
These are pointless. The 32-bit ops already perform these simplifications.
Paul