From 2bece2c88331f024a46527634e3dd91c71d22141 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 14 Jun 2010 17:35:27 -0700 Subject: tcg: Optionally sign-extend 32-bit arguments for 64-bit hosts. 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 Signed-off-by: Aurelien Jarno --- target-i386/ops_sse_header.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'target-i386/ops_sse_header.h') diff --git a/target-i386/ops_sse_header.h b/target-i386/ops_sse_header.h index a0a63613a1..8d4b2b7006 100644 --- a/target-i386/ops_sse_header.h +++ b/target-i386/ops_sse_header.h @@ -30,6 +30,9 @@ #define dh_ctype_Reg Reg * #define dh_ctype_XMMReg XMMReg * #define dh_ctype_MMXReg MMXReg * +#define dh_is_signed_Reg dh_is_signed_ptr +#define dh_is_signed_XMMReg dh_is_signed_ptr +#define dh_is_signed_MMXReg dh_is_signed_ptr DEF_HELPER_2(glue(psrlw, SUFFIX), void, Reg, Reg) DEF_HELPER_2(glue(psraw, SUFFIX), void, Reg, Reg) -- cgit v1.2.1