[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/9] tcg: reorganize bswap* functions
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] [PATCH 0/9] tcg: reorganize bswap* functions |
Date: |
Thu, 12 Mar 2009 13:31:30 +0000 |
User-agent: |
KMail/1.9.9 |
> > I think we want to preserve the zero extension of the value, i.e. you
> > want something along the lines of:
> >
> > if (!TCGV_EQUAL_I64(ret, arg))
> > tcg_gen_movi_i32(TCGV_HIGH(ret), 0);
>
> That's why I have modified the documentation to say the high bytes have
> to be zero, similar to the current bswap16_i32 implementation.
There are two issues here:
- Requiring a zero extended input value.
- Providing a zero extended result.
Your documentation covers the former requirement. However it does not mention
the latter. The existing bswap16_i32 implementation does provide this
guarantee (and can be simplified if we do not require this). I expect it is
worth preserving the zero extension.
> > > +++ b/tcg/i386/tcg-target.c
> That's what I did first when using XCHG xH, xL. That's why I used ROLW
> instead which is able to work on the 8 registers by accessing 16-bit
> registers.
Ok. My mistake.
> > You need to use tcg_out_opc here to get REX prefixes. You need P_REXB to
> > avoid the legacy encoding issues mentioned above, and the high bit of the
> > r/m field also goes in the REX byte.
>
> Same here.
I'd managed to convince myself that tcg_out_modrm didn't use tcg_out_opc.
Clearly I was wrong.
Paul
- [Qemu-devel] [PATCH 4/9] tcg: add _tl aliases to bswap16/32/64 TCG ops, (continued)
- [Qemu-devel] [PATCH 4/9] tcg: add _tl aliases to bswap16/32/64 TCG ops, Aurelien Jarno, 2009/03/11
- [Qemu-devel] [PATCH 5/9] tcg: update README wrt recent bswap changes, Aurelien Jarno, 2009/03/11
- [Qemu-devel] [PATCH 7/9] target-i386: use the new bswap* TCG ops, Aurelien Jarno, 2009/03/11
- [Qemu-devel] [PATCH 9/9] tcg/x86_64: add bswap16_i{32, 64} and bswap32_i64 ops, Aurelien Jarno, 2009/03/11
- [Qemu-devel] [PATCH 8/9] tcg/x86: add bswap16_i32 ops, Aurelien Jarno, 2009/03/11
- [Qemu-devel] [PATCH 3/9] tcg: add bswap16_i64 and bswap32_i64 TCG ops, Aurelien Jarno, 2009/03/11
- [Qemu-devel] [PATCH 6/9] target-ppc: use the new bswap* TCG ops, Aurelien Jarno, 2009/03/11
- [Qemu-devel] [PATCH 1/9] tcg: rename bswap_i32/i64 functions, Aurelien Jarno, 2009/03/11
- Re: [Qemu-devel] [PATCH 0/9] tcg: reorganize bswap* functions, Paul Brook, 2009/03/12