qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: tommusta@gmail.com, av1474@comtv.ru
Subject: [Qemu-devel] [PATCH v3 19/25] tcg-ppc64: Support mulsh_i32
Date: Fri, 20 Jun 2014 07:13:35 -0700	[thread overview]
Message-ID: <1403273621-2584-20-git-send-email-rth@twiddle.net> (raw)
In-Reply-To: <1403273621-2584-1-git-send-email-rth@twiddle.net>

Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 tcg/ppc64/tcg-target.c | 5 +++++
 tcg/ppc64/tcg-target.h | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c
index a5ad140..02ee8e2 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" } },
diff --git a/tcg/ppc64/tcg-target.h b/tcg/ppc64/tcg-target.h
index 7b90087..066e74b 100644
--- a/tcg/ppc64/tcg-target.h
+++ b/tcg/ppc64/tcg-target.h
@@ -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
-- 
1.9.3

  parent reply	other threads:[~2014-06-20 14:14 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-20 14:13 [Qemu-devel] [PATCH v3 00/25] Merge ppc32/ppc64 tcg backends Richard Henderson
2014-06-20 14:13 ` [Qemu-devel] [PATCH v3 01/25] tcg-ppc: Use uintptr_t in ppc_tb_set_jmp_target Richard Henderson
2014-06-20 14:13 ` [Qemu-devel] [PATCH v3 02/25] tcg-ppc64: Avoid some hard-codings of TCG_TYPE_I64 Richard Henderson
2014-06-20 14:13 ` [Qemu-devel] [PATCH v3 03/25] tcg-ppc64: Move functions around Richard Henderson
2014-06-20 14:13 ` [Qemu-devel] [PATCH v3 04/25] tcg-ppc64: Relax register restrictions in tcg_out_mem_long Richard Henderson
2014-06-26 13:29   ` Greg Kurz
2014-06-20 14:13 ` [Qemu-devel] [PATCH v3 05/25] tcg-ppc64: Use tcg_out_{ld, st, cmp} internally Richard Henderson
2014-06-20 14:13 ` [Qemu-devel] [PATCH v3 06/25] tcg-ppc64: Make TCG_AREG0 and TCG_REG_CALL_STACK enum constants Richard Henderson
2014-06-20 14:13 ` [Qemu-devel] [PATCH v3 07/25] tcg-ppc64: Move call macros out of tcg-target.h Richard Henderson
2014-06-20 14:13 ` [Qemu-devel] [PATCH v3 08/25] tcg-ppc64: Fix TCG_TARGET_CALL_STACK_OFFSET Richard Henderson
2014-06-20 14:13 ` [Qemu-devel] [PATCH v3 09/25] tcg-ppc64: Better parameterize the stack frame Richard Henderson
2014-06-20 14:13 ` [Qemu-devel] [PATCH v3 10/25] tcg-ppc64: Use the correct test in tcg_out_call Richard Henderson
2014-06-20 14:13 ` [Qemu-devel] [PATCH v3 11/25] tcg-ppc64: Support the ppc64 elfv2 ABI Richard Henderson
2014-06-20 14:13 ` [Qemu-devel] [PATCH v3 12/25] tcg-ppc64: Adjust tcg_out_call for ELFv2 Richard Henderson
2014-06-20 14:13 ` [Qemu-devel] [PATCH v3 13/25] tcg-ppc64: Merge 32-bit ABIs into the prologue / frame code Richard Henderson
2014-06-20 14:13 ` [Qemu-devel] [PATCH v3 14/25] tcg-ppc64: Fix sub2 implementation Richard Henderson
2014-06-20 14:13 ` [Qemu-devel] [PATCH v3 15/25] tcg-ppc64: Begin merging ppc32 with ppc64 Richard Henderson
2014-06-20 14:13 ` [Qemu-devel] [PATCH v3 16/25] tcg-ppc64: Merge ppc32 brcond2, setcond2, muluh Richard Henderson
2014-06-20 14:13 ` [Qemu-devel] [PATCH v3 17/25] tcg-ppc64: Merge ppc32 qemu_ld/st Richard Henderson
2014-06-20 14:13 ` [Qemu-devel] [PATCH v3 18/25] tcg-ppc64: Merge ppc32 register usage Richard Henderson
2014-06-20 14:13 ` Richard Henderson [this message]
2014-06-20 14:13 ` [Qemu-devel] [PATCH v3 20/25] tcg-ppc64: Merge ppc32 shifts Richard Henderson
2014-06-20 14:13 ` [Qemu-devel] [PATCH v3 21/25] tcg-ppc: Remove the backend Richard Henderson
2014-06-20 14:13 ` [Qemu-devel] [PATCH v3 22/25] tcg-ppc: Rename the tcg/ppc64 backend Richard Henderson
2014-06-20 14:13 ` [Qemu-devel] [PATCH v3 23/25] qemu/osdep: Remove the need for qemu_init_auxval Richard Henderson
2014-06-20 14:13 ` [Qemu-devel] [PATCH v3 24/25] tcg-ppc: Merge cache-utils into the backend Richard Henderson
2014-06-20 14:13 ` [Qemu-devel] [PATCH v3 25/25] tcg-ppc: Use the return address as a base pointer Richard Henderson
2014-06-20 16:51 ` [Qemu-devel] [PATCH v3 00/25] Merge ppc32/ppc64 tcg backends Tom Musta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1403273621-2584-20-git-send-email-rth@twiddle.net \
    --to=rth@twiddle.net \
    --cc=av1474@comtv.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=tommusta@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).