From: David Gibson <david@gibson.dropbear.id.au>
To: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Cc: qemu-ppc@nongnu.org, rth@twiddle.net, qemu-devel@nongnu.org,
bharata@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH v1 8/9] target-ppc: implement xscpsgnqp instruction
Date: Fri, 9 Dec 2016 09:51:03 +1100 [thread overview]
Message-ID: <20161208225103.GH13139@umbus.fritz.box> (raw)
In-Reply-To: <1481135102-20011-9-git-send-email-nikunj@linux.vnet.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 3899 bytes --]
On Wed, Dec 07, 2016 at 11:55:01PM +0530, Nikunj A Dadhania wrote:
> xscpsgnqp: VSX Scalar Copy Sign Quad-Precision
>
> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
> Reviewed-by: Richard Henderson <rth@twiddle.net>
Merged to ppc-for-2.9
> ---
> target-ppc/translate/vsx-impl.inc.c | 12 +++++++++++-
> target-ppc/translate/vsx-ops.inc.c | 1 +
> 2 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/target-ppc/translate/vsx-impl.inc.c b/target-ppc/translate/vsx-impl.inc.c
> index 01b95df..8321134 100644
> --- a/target-ppc/translate/vsx-impl.inc.c
> +++ b/target-ppc/translate/vsx-impl.inc.c
> @@ -642,9 +642,10 @@ VSX_SCALAR_MOVE(xscpsgndp, OP_CPSGN, SGN_MASK_DP)
> #define VSX_SCALAR_MOVE_QP(name, op, sgn_mask) \
> static void glue(gen_, name)(DisasContext *ctx) \
> { \
> + int xa; \
> int xt = rD(ctx->opcode) + 32; \
> int xb = rB(ctx->opcode) + 32; \
> - TCGv_i64 xbh, xbl, sgm; \
> + TCGv_i64 xah, xbh, xbl, sgm; \
> \
> if (unlikely(!ctx->vsx_enabled)) { \
> gen_exception(ctx, POWERPC_EXCP_VSXU); \
> @@ -666,6 +667,14 @@ static void glue(gen_, name)(DisasContext *ctx) \
> case OP_NEG: \
> tcg_gen_xor_i64(xbh, xbh, sgm); \
> break; \
> + case OP_CPSGN: \
> + xah = tcg_temp_new_i64(); \
> + xa = rA(ctx->opcode) + 32; \
> + tcg_gen_and_i64(xah, cpu_vsrh(xa), sgm); \
> + tcg_gen_andc_i64(xbh, xbh, sgm); \
> + tcg_gen_or_i64(xbh, xbh, xah); \
> + tcg_temp_free_i64(xah); \
> + break; \
> } \
> tcg_gen_mov_i64(cpu_vsrh(xt), xbh); \
> tcg_gen_mov_i64(cpu_vsrl(xt), xbl); \
> @@ -677,6 +686,7 @@ static void glue(gen_, name)(DisasContext *ctx) \
> VSX_SCALAR_MOVE_QP(xsabsqp, OP_ABS, SGN_MASK_DP)
> VSX_SCALAR_MOVE_QP(xsnabsqp, OP_NABS, SGN_MASK_DP)
> VSX_SCALAR_MOVE_QP(xsnegqp, OP_NEG, SGN_MASK_DP)
> +VSX_SCALAR_MOVE_QP(xscpsgnqp, OP_CPSGN, SGN_MASK_DP)
>
> #define VSX_VECTOR_MOVE(name, op, sgn_mask) \
> static void glue(gen_, name)(DisasContext * ctx) \
> diff --git a/target-ppc/translate/vsx-ops.inc.c b/target-ppc/translate/vsx-ops.inc.c
> index d798edb..42e83d2 100644
> --- a/target-ppc/translate/vsx-ops.inc.c
> +++ b/target-ppc/translate/vsx-ops.inc.c
> @@ -107,6 +107,7 @@ GEN_XX3FORM(xscpsgndp, 0x00, 0x16, PPC2_VSX),
> GEN_VSX_XFORM_300_EO(xsabsqp, 0x04, 0x19, 0x00, 0x00000001),
> GEN_VSX_XFORM_300_EO(xsnabsqp, 0x04, 0x19, 0x08, 0x00000001),
> GEN_VSX_XFORM_300_EO(xsnegqp, 0x04, 0x19, 0x10, 0x00000001),
> +GEN_VSX_XFORM_300(xscpsgnqp, 0x04, 0x03, 0x00000001),
>
> GEN_XX2FORM(xvabsdp, 0x12, 0x1D, PPC2_VSX),
> GEN_XX2FORM(xvnabsdp, 0x12, 0x1E, PPC2_VSX),
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-12-08 22:52 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-07 18:24 [Qemu-devel] [PATCH v1 ppc-for-2.9 0/9] POWER9 TCG enablements - part9 Nikunj A Dadhania
2016-12-07 18:24 ` [Qemu-devel] [PATCH v1 1/9] target-ppc: implement lxvl instruction Nikunj A Dadhania
2016-12-08 22:25 ` David Gibson
2016-12-09 5:54 ` Nikunj A Dadhania
2016-12-07 18:24 ` [Qemu-devel] [PATCH v1 2/9] target-ppc: implement lxvll instruction Nikunj A Dadhania
2016-12-07 18:24 ` [Qemu-devel] [PATCH v1 3/9] target-ppc: implement stxvl instruction Nikunj A Dadhania
2016-12-08 22:26 ` David Gibson
2016-12-09 5:54 ` Nikunj A Dadhania
2016-12-07 18:24 ` [Qemu-devel] [PATCH v1 4/9] target-ppc: implement stxvll instructions Nikunj A Dadhania
2016-12-07 18:24 ` [Qemu-devel] [PATCH v1 5/9] target-ppc: implement xxextractuw instruction Nikunj A Dadhania
2016-12-08 22:32 ` David Gibson
2016-12-07 18:24 ` [Qemu-devel] [PATCH v1 6/9] target-ppc: implement xxinsertw instruction Nikunj A Dadhania
2016-12-08 22:34 ` David Gibson
2016-12-07 18:25 ` [Qemu-devel] [PATCH v1 7/9] target-ppc: implement xsnegqp instruction Nikunj A Dadhania
2016-12-08 22:50 ` David Gibson
2016-12-07 18:25 ` [Qemu-devel] [PATCH v1 8/9] target-ppc: implement xscpsgnqp instruction Nikunj A Dadhania
2016-12-08 22:51 ` David Gibson [this message]
2016-12-07 18:25 ` [Qemu-devel] [PATCH v1 9/9] target-ppc: Add xxperm and xxpermr instructions Nikunj A Dadhania
2016-12-08 22:51 ` David Gibson
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=20161208225103.GH13139@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=bharata@linux.vnet.ibm.com \
--cc=nikunj@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rth@twiddle.net \
/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).