Received: from eggs.gnu.org ([2001:4830:134:3::10]:57917) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFKTN-0000WO-OJ for qemu-devel@nongnu.org; Wed, 15 Jul 2015 07:03:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZFKTH-0001KC-PJ for qemu-devel@nongnu.org; Wed, 15 Jul 2015 07:03:33 -0400 Received: from hall.aurel32.net ([2001:bc8:30d7:100::1]:47952) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFKTH-0001JQ-HR for qemu-devel@nongnu.org; Wed, 15 Jul 2015 07:03:27 -0400 From: Aurelien Jarno Date: Wed, 15 Jul 2015 13:03:16 +0200 Message-Id: <1436958199-5181-7-git-send-email-aurelien@aurel32.net> In-Reply-To: <1436958199-5181-1-git-send-email-aurelien@aurel32.net> References: <1436958199-5181-1-git-send-email-aurelien@aurel32.net> Subject: [Qemu-devel] [PATCH RFC 6/9] tcg/i386: document the way 32/64-bit conversions are handled List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Aurelien Jarno , Richard Henderson Cc: Paolo Bonzini Cc: Richard Henderson Signed-off-by: Aurelien Jarno --- tcg/i386/tcg-target.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h index 16f3949..d483083 100644 --- a/tcg/i386/tcg-target.h +++ b/tcg/i386/tcg-target.h @@ -129,7 +129,11 @@ extern bool have_bmi1; #define TCG_TARGET_HAS_muluh_i64 0 #define TCG_TARGET_HAS_mulsh_i64 0 -/* size changing optional ops */ +/* size changing optional ops. On x86 we ensure that all 32-bit ops + ignore the high bits. We therefore can implement trunc_shr_i64_i32 + as a mov, but we need to implement ext_i32_i64 and extu_i32_i64 to + zero/sign extend the high bits when converting a 32-bit value into + a 64-bit one. */ #define TCG_TARGET_HAS_trunc_shr_i64_i32 0 #define TCG_TARGET_HAS_ext_i32_i64 1 #define TCG_TARGET_HAS_extu_i32_i64 1 -- 2.1.4