@@ -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
Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> --- tcg/i386/tcg-target.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)