summaryrefslogtreecommitdiffstats
path: root/tcg/ppc64/tcg-target.c
diff options
context:
space:
mode:
authorRichard Henderson2014-03-26 19:37:06 +0100
committerRichard Henderson2014-06-23 16:32:12 +0200
commit8fa391a011a421ed8bf63385ae8e051df453c2e3 (patch)
tree7c6f7ea0ef28f2213ccd364822eab691776e3063 /tcg/ppc64/tcg-target.c
parenttcg-ppc64: Merge ppc32 register usage (diff)
downloadqemu-8fa391a011a421ed8bf63385ae8e051df453c2e3.tar.gz
qemu-8fa391a011a421ed8bf63385ae8e051df453c2e3.tar.xz
qemu-8fa391a011a421ed8bf63385ae8e051df453c2e3.zip
tcg-ppc64: Support mulsh_i32
Tested-by: Tom Musta <tommusta@gmail.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'tcg/ppc64/tcg-target.c')
-rw-r--r--tcg/ppc64/tcg-target.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c
index a5ad14051d..02ee8e2a53 100644
--- a/tcg/ppc64/tcg-target.c
+++ b/tcg/ppc64/tcg-target.c
@@ -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" } },