qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH RFC 6/9] tcg/i386: document the way 32/64-bit conver


From: Aurelien Jarno
Subject: [Qemu-devel] [PATCH RFC 6/9] tcg/i386: document the way 32/64-bit conversions are handled
Date: Wed, 15 Jul 2015 13:03:16 +0200

Cc: Paolo Bonzini <address@hidden>
Cc: Richard Henderson <address@hidden>
Signed-off-by: Aurelien Jarno <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]