tcg/ppc64: Fix loading of 32bit constants
authormalc <av1474@comtv.ru>
Tue, 15 Dec 2009 16:44:20 +0000 (19:44 +0300)
committermalc <av1474@comtv.ru>
Tue, 15 Dec 2009 16:45:28 +0000 (19:45 +0300)
Signed-off-by: malc <av1474@comtv.ru>
tcg/ppc64/tcg-target.c

index 0c11917..803db48 100644 (file)
@@ -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 {