[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 1/2] tcg: Optionally sign-extend 32-bit argument
From: |
Aurelien Jarno |
Subject: |
[Qemu-devel] Re: [PATCH 1/2] tcg: Optionally sign-extend 32-bit arguments for 64-bit hosts. |
Date: |
Wed, 16 Jun 2010 11:26:34 +0200 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Mon, Jun 14, 2010 at 05:35:27PM -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
> 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 this, extend the "sizemask" parameter to tcg_gen_callN
> to include the signedness of the type of each parameter. If the
> tcg target requires it, extend each 32-bit argument into a 64-bit
> temp and pass that to the function call.
>
> This ABI feature is required by sparc64, ppc64 and s390x.
>
> Signed-off-by: Richard Henderson <address@hidden>
> ---
> def-helper.h | 38 +++++++++---
> target-i386/ops_sse_header.h | 3 +
> target-ppc/helper.h | 1 +
> tcg/ppc64/tcg-target.h | 1 +
> tcg/s390/tcg-target.h | 2 +
> tcg/sparc/tcg-target.h | 4 +
> tcg/tcg-op.h | 139 +++++++++++++++++++++++++++++++++++------
> tcg/tcg.c | 41 +++++++++++--
> 8 files changed, 193 insertions(+), 36 deletions(-)
Thanks, applied.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
address@hidden http://www.aurel32.net