aboutsummaryrefslogtreecommitdiff
path: root/tcg/s390/tcg-target.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2010-06-14 17:35:27 -0700
committerAurelien Jarno <aurelien@aurel32.net>2010-06-16 11:29:11 +0200
commit2bece2c88331f024a46527634e3dd91c71d22141 (patch)
tree2275cb777821df8aa66ea092bae2124b9923d01b /tcg/s390/tcg-target.h
parentd2c5efd89fe319f150aba0b67e394f23f6c07ba6 (diff)
downloadqemu-2bece2c88331f024a46527634e3dd91c71d22141.zip
qemu-2bece2c88331f024a46527634e3dd91c71d22141.tar.gz
qemu-2bece2c88331f024a46527634e3dd91c71d22141.tar.bz2
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 <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'tcg/s390/tcg-target.h')
-rw-r--r--tcg/s390/tcg-target.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tcg/s390/tcg-target.h b/tcg/s390/tcg-target.h
index d7fe0c7..8c19262 100644
--- a/tcg/s390/tcg-target.h
+++ b/tcg/s390/tcg-target.h
@@ -87,6 +87,8 @@ enum {
#define TCG_TARGET_STACK_ALIGN 8
#define TCG_TARGET_CALL_STACK_OFFSET 0
+#define TCG_TARGET_EXTEND_ARGS 1
+
enum {
/* Note: must be synced with dyngen-exec.h */
TCG_AREG0 = TCG_REG_R10,