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, aneesh.kumar@linux.vnet.ibm.com,
benh@kernel.crashing.org,
Vivek Andrew Sha <vivekandrewsha@gmail.com>
Subject: Re: [Qemu-devel] [PATCH RFC v0 4/6] target-ppc: add vslv instruction
Date: Wed, 27 Jul 2016 16:03:14 +1000 [thread overview]
Message-ID: <20160727060314.GJ17429@voom.fritz.box> (raw)
In-Reply-To: <1469561218-3067-5-git-send-email-nikunj@linux.vnet.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 2806 bytes --]
On Wed, Jul 27, 2016 at 12:56:56AM +0530, Nikunj A Dadhania wrote:
> From: Vivek Andrew Sha <vivekandrewsha@gmail.com>
>
> vslv: Vector Shift Left Variable
>
> Signed-off-by: Vivek Andrew Sha <vivekandrewsha@gmail.com>
> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> target-ppc/helper.h | 1 +
> target-ppc/int_helper.c | 14 ++++++++++++++
> target-ppc/translate.c | 2 ++
> 3 files changed, 17 insertions(+)
>
> diff --git a/target-ppc/helper.h b/target-ppc/helper.h
> index e93b84b..9703f85 100644
> --- a/target-ppc/helper.h
> +++ b/target-ppc/helper.h
> @@ -211,6 +211,7 @@ DEF_HELPER_3(vslw, void, avr, avr, avr)
> DEF_HELPER_3(vsld, void, avr, avr, avr)
> DEF_HELPER_3(vslo, void, avr, avr, avr)
> DEF_HELPER_3(vsro, void, avr, avr, avr)
> +DEF_HELPER_3(vslv, void, avr, avr, avr)
> DEF_HELPER_3(vaddcuw, void, avr, avr, avr)
> DEF_HELPER_3(vsubcuw, void, avr, avr, avr)
> DEF_HELPER_2(lvsl, void, avr, tl)
> diff --git a/target-ppc/int_helper.c b/target-ppc/int_helper.c
> index bffe8d6..412398f 100644
> --- a/target-ppc/int_helper.c
> +++ b/target-ppc/int_helper.c
> @@ -1708,6 +1708,20 @@ VSL(w, u32, 0x1F)
> VSL(d, u64, 0x3F)
> #undef VSL
>
> +void helper_vslv(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
> +{
> + int i;
> + unsigned int shift, bytes, size;
> +
> + size = ARRAY_SIZE(r->u8);
> + for (i = 0; i < size; i++) {
> + shift = b->u8[i] & 0x7; /* extract shift value */
> + bytes = (a->u8[i] << 8) + /* extract adjacent bytes */
> + (((i + 1) < size) ? a->u8[i + 1] : 0);
> + r->u8[i] = (bytes << shift) >> 8; /* shift and store result */
> + }
> +}
> +
> void helper_vsldoi(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32_t shift)
> {
> int sh = shift & 0xf;
> diff --git a/target-ppc/translate.c b/target-ppc/translate.c
> index 7cf0c8e..473f21a 100644
> --- a/target-ppc/translate.c
> +++ b/target-ppc/translate.c
> @@ -7457,6 +7457,7 @@ GEN_VXFORM(vsraw, 2, 14);
> GEN_VXFORM(vsrad, 2, 15);
> GEN_VXFORM(vslo, 6, 16);
> GEN_VXFORM(vsro, 6, 17);
> +GEN_VXFORM(vslv, 2, 29);
> GEN_VXFORM(vaddcuw, 0, 6);
> GEN_VXFORM(vsubcuw, 0, 22);
> GEN_VXFORM_ENV(vaddubs, 0, 8);
> @@ -10942,6 +10943,7 @@ GEN_VXFORM(vsraw, 2, 14),
> GEN_VXFORM_207(vsrad, 2, 15),
> GEN_VXFORM(vslo, 6, 16),
> GEN_VXFORM(vsro, 6, 17),
> +GEN_VXFORM(vslv, 2, 29),
> GEN_VXFORM(vaddcuw, 0, 6),
> GEN_VXFORM(vsubcuw, 0, 22),
> GEN_VXFORM(vaddubs, 0, 8),
--
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-07-27 6:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-26 19:26 [Qemu-devel] [PATCH RFC v0 0/6] POWER9 TCG enablements - part2 Nikunj A Dadhania
2016-07-26 19:26 ` [Qemu-devel] [PATCH RFC v0 1/6] target-ppc: add dtstsfi[q] instructions Nikunj A Dadhania
2016-07-27 5:42 ` David Gibson
2016-07-26 19:26 ` [Qemu-devel] [PATCH RFC v0 2/6] target-ppc: add vabsdu[b, h, w] instructions Nikunj A Dadhania
2016-07-27 5:52 ` David Gibson
2016-07-27 6:19 ` Nikunj A Dadhania
2016-07-26 19:26 ` [Qemu-devel] [PATCH RFC v0 3/6] target-ppc: add vcmpnez[b, h, w][.] instructions Nikunj A Dadhania
2016-07-27 5:57 ` David Gibson
2016-07-27 6:22 ` Nikunj A Dadhania
2016-07-26 19:26 ` [Qemu-devel] [PATCH RFC v0 4/6] target-ppc: add vslv instruction Nikunj A Dadhania
2016-07-27 6:03 ` David Gibson [this message]
2016-07-26 19:26 ` [Qemu-devel] [PATCH RFC v0 5/6] target-ppc: add vsrv instruction Nikunj A Dadhania
2016-07-27 6:05 ` David Gibson
2016-07-27 6:31 ` Nikunj A Dadhania
2016-07-27 6:48 ` David Gibson
2016-07-27 6:57 ` Nikunj A Dadhania
2016-07-27 7:02 ` David Gibson
2016-07-26 19:26 ` [Qemu-devel] [PATCH RFC v0 6/6] target-ppc: add extswsli[.] instruction Nikunj A Dadhania
2016-07-27 6:07 ` David Gibson
2016-07-28 4:33 ` [Qemu-devel] [PATCH RFC v0 0/6] POWER9 TCG enablements - part2 David Gibson
2016-07-28 6:06 ` Nikunj A Dadhania
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=20160727060314.GJ17429@voom.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--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 \
--cc=vivekandrewsha@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.