From 591d6f1dfdb60ab0a4cc487cd5781fa799dcac4b Mon Sep 17 00:00:00 2001 From: malc Date: Tue, 15 Dec 2009 19:44:20 +0300 Subject: tcg/ppc64: Fix loading of 32bit constants Signed-off-by: malc --- tcg/ppc64/tcg-target.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tcg/ppc64') diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c index 0c11917c15..803db481fd 100644 --- a/tcg/ppc64/tcg-target.c +++ b/tcg/ppc64/tcg-target.c @@ -463,8 +463,9 @@ static void tcg_out_movi (TCGContext *s, TCGType type, int ret, tcg_target_long arg) { int32_t arg32 = arg; + arg = type == TCG_TYPE_I32 ? arg & 0xffffffff : arg; - if (type == TCG_TYPE_I32 || arg == arg32) { + if (arg == arg32) { tcg_out_movi32 (s, ret, arg32); } else { -- cgit v1.2.3