Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Richard Henderson <r...@twiddle.net> Signed-off-by: Aurelien Jarno <aurel...@aurel32.net> --- 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