Re: [Qemu-devel] [PATCH 07/35] tcg: Optionally sign-extend 32-bit arguments for 64-bit host.

2010-06-14 Thread Richard Henderson
On 06/10/2010 03:22 AM, Aurelien Jarno wrote: >> - 0, GET_TCGV_I32(ret), 2, args); >> + (is_signed ? 0x2a : 0x00), GET_TCGV_I32(ret), 2, args); > > Wouldn't it be better to actually pass the whole flag to > tcg_gen_helper32(), so that we can in the future also sup

Re: [Qemu-devel] [PATCH 07/35] tcg: Optionally sign-extend 32-bit arguments for 64-bit host.

2010-06-10 Thread Richard Henderson
On 06/10/2010 03:22 AM, Aurelien Jarno wrote: > Wouldn't it be better to actually pass the whole flag to > tcg_gen_helper32(), so that we can in the future also support mixed > signedness in arguments? Also doing it here looks like a bit like a > magic constant. I suppose that's possible. > This

Re: [Qemu-devel] [PATCH 07/35] tcg: Optionally sign-extend 32-bit arguments for 64-bit host.

2010-06-10 Thread Aurelien Jarno
On Fri, Jun 04, 2010 at 12:14:15PM -0700, Richard Henderson wrote: > Some hosts (amd64, ia64) have an ABI that ignores the high bits > of the 64-bit register when passing 32-bit arguments. Others, > like s390x, require the value to be properly sign-extended for > the type. I.e. "int32_t" must be

[Qemu-devel] [PATCH 07/35] tcg: Optionally sign-extend 32-bit arguments for 64-bit host.

2010-06-04 Thread Richard Henderson
Some hosts (amd64, ia64) have an ABI that ignores the high bits of the 64-bit register when passing 32-bit arguments. Others, like s390x, require the value to be properly sign-extended for the type. I.e. "int32_t" must be sign-extended and "uint32_t" must be zero-extended to 64-bits. To effect t