]> git.proxmox.com Git - qemu.git/commitdiff
tcg/ppc32: implement deposit_i32
authormalc <av1474@comtv.ru>
Mon, 22 Aug 2011 10:39:00 +0000 (14:39 +0400)
committermalc <av1474@comtv.ru>
Mon, 22 Aug 2011 10:39:00 +0000 (14:39 +0400)
Signed-off-by: malc <av1474@comtv.ru>
tcg/ppc/tcg-target.c
tcg/ppc/tcg-target.h

index 58c8621709b0127a1641930dad1e719c45febf14..4462647ef177930a5a09a8a72dec852907d73ba1 100644 (file)
@@ -1790,6 +1790,16 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args,
         }
         break;
 
+    case INDEX_op_deposit_i32:
+        tcg_out32 (s, RLWIMI
+                   | RA (args[0])
+                   | RS (args[2])
+                   | SH (args[3])
+                   | MB (32 - args[3] - args[4])
+                   | ME (31 - args[3])
+            );
+        break;
+
     default:
         tcg_dump_ops (s, stderr);
         tcg_abort ();
@@ -1885,6 +1895,8 @@ static const TCGTargetOpDef ppc_op_defs[] = {
     { INDEX_op_ext16s_i32, { "r", "r" } },
     { INDEX_op_ext16u_i32, { "r", "r" } },
 
+    { INDEX_op_deposit_i32, { "r", "0", "r" } },
+
     { -1 },
 };
 
index 8c35c4e5adc43441b2ef234da04dbcbe10c0bcb5..f9a88c4a3a1001db4d2ff191da5a56ad8b5008a7 100644 (file)
@@ -92,7 +92,7 @@ enum {
 #define TCG_TARGET_HAS_eqv_i32          1
 #define TCG_TARGET_HAS_nand_i32         1
 #define TCG_TARGET_HAS_nor_i32          1
-#define TCG_TARGET_HAS_deposit_i32      0
+#define TCG_TARGET_HAS_deposit_i32      1
 
 #define TCG_AREG0 TCG_REG_R27