]> Git Repo - qemu.git/commitdiff
tcg-ppc64: Support mulsh_i32
authorRichard Henderson <[email protected]>
Wed, 26 Mar 2014 18:37:06 +0000 (11:37 -0700)
committerRichard Henderson <[email protected]>
Mon, 23 Jun 2014 14:32:12 +0000 (07:32 -0700)
Tested-by: Tom Musta <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
tcg/ppc64/tcg-target.c
tcg/ppc64/tcg-target.h

index a5ad14051d7fcd4c0192e65f3db268dad7e11fbc..02ee8e2a5307da1191f5e217e31a25ea5766fc43 100644 (file)
@@ -410,6 +410,7 @@ static int tcg_target_const_match(tcg_target_long val, TCGType type,
 #define OR     XO31(444)
 #define XOR    XO31(316)
 #define MULLW  XO31(235)
+#define MULHW  XO31( 75)
 #define MULHWU XO31( 11)
 #define DIVW   XO31(491)
 #define DIVWU  XO31(459)
@@ -2263,6 +2264,9 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args,
     case INDEX_op_muluh_i32:
         tcg_out32(s, MULHWU | TAB(args[0], args[1], args[2]));
         break;
+    case INDEX_op_mulsh_i32:
+        tcg_out32(s, MULHW | TAB(args[0], args[1], args[2]));
+        break;
     case INDEX_op_muluh_i64:
         tcg_out32(s, MULHDU | TAB(args[0], args[1], args[2]));
         break;
@@ -2329,6 +2333,7 @@ static const TCGTargetOpDef ppc_op_defs[] = {
     { INDEX_op_deposit_i32, { "r", "0", "rZ" } },
 
     { INDEX_op_muluh_i32, { "r", "r", "r" } },
+    { INDEX_op_mulsh_i32, { "r", "r", "r" } },
 
 #if TCG_TARGET_REG_BITS == 64
     { INDEX_op_ld8u_i64, { "r", "r" } },
index 7b9008769535dc03c8dedb5dfab600b9d6dd524b..066e74b9c7f5290d1990624b2d5f2fa5b54f5cfc 100644 (file)
@@ -71,7 +71,7 @@ typedef enum {
 #define TCG_TARGET_HAS_mulu2_i32        0
 #define TCG_TARGET_HAS_muls2_i32        0
 #define TCG_TARGET_HAS_muluh_i32        1
-#define TCG_TARGET_HAS_mulsh_i32        0
+#define TCG_TARGET_HAS_mulsh_i32        1
 
 #if TCG_TARGET_REG_BITS == 64
 #define TCG_TARGET_HAS_add2_i32         0
This page took 0.028375 seconds and 4 git commands to generate.