From: Richard Henderson <richard.henderson@linaro.org>
To: Stefan Brankovic <stefan.brankovic@rt-rk.com>, qemu-devel@nongnu.org
Cc: hsp.cat7@gmail.com, david@gibson.dropbear.id.au
Subject: Re: [Qemu-devel] [PATCH v4 08/13] tcg: Add opcodes for vector vmrgh instructions
Date: Thu, 27 Jun 2019 13:35:12 +0200 [thread overview]
Message-ID: <d42d0cdf-1cc5-b434-f974-4d5bde543271@linaro.org> (raw)
In-Reply-To: <1561632985-24866-9-git-send-email-stefan.brankovic@rt-rk.com>
On 6/27/19 12:56 PM, Stefan Brankovic wrote:
> +void HELPER(gvec_vmrgh8)(void *d, void *a, void *b, uint32_t desc)
> +{
> + intptr_t oprsz = simd_oprsz(desc);
> + intptr_t i;
> +
> + for (i = 0; i < (oprsz / 2); i += sizeof(uint8_t)) {
> + uint8_t aa = *(uint8_t *)(a + 8 * sizeof(uint8_t) + i);
> + uint8_t bb = *(uint8_t *)(b + 8 * sizeof(uint8_t) + i);
> + *(uint8_t *)(d + 2 * i) = bb;
> + *(uint8_t *)(d + 2 * i + sizeof(uint8_t)) = aa;
> + }
> + clear_high(d, oprsz, desc);
> +}
I tried this while developing the ARM SVE code.
The problem is that the vector element numbering differs for each host. So
while you may be able to get the correct results out of x86, you'll the the
wrong answers when you run this same code on a big-endian host.
The same goes for the INDEX_OP_vmrgh_vec opcode you introduced.
r~
next prev parent reply other threads:[~2019-06-27 11:43 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-27 10:56 [Qemu-devel] [PATCH v4 00/13] target/ppc, tcg, tcg/i386: Optimize emulation of some Altivec instructions Stefan Brankovic
2019-06-27 10:56 ` [Qemu-devel] [PATCH v4 01/13] target/ppc: Optimize emulation of lvsl and lvsr instructions Stefan Brankovic
2019-06-27 10:56 ` [Qemu-devel] [PATCH v4 02/13] target/ppc: Optimize emulation of vsl and vsr instructions Stefan Brankovic
2019-06-27 10:56 ` [Qemu-devel] [PATCH v4 03/13] target/ppc: Optimize emulation of vgbbd instruction Stefan Brankovic
2019-06-27 10:56 ` [Qemu-devel] [PATCH v4 04/13] target/ppc: Optimize emulation of vclzd instruction Stefan Brankovic
2019-06-27 10:56 ` [Qemu-devel] [PATCH v4 05/13] target/ppc: Optimize emulation of vclzw instruction Stefan Brankovic
2019-06-27 10:56 ` [Qemu-devel] [PATCH v4 06/13] target/ppc: Optimize emulation of vclzh and vclzb instructions Stefan Brankovic
2019-06-27 10:56 ` [Qemu-devel] [PATCH v4 07/13] target/ppc: Refactor emulation of vmrgew and vmrgow instructions Stefan Brankovic
2019-06-27 10:56 ` [Qemu-devel] [PATCH v4 08/13] tcg: Add opcodes for vector vmrgh instructions Stefan Brankovic
2019-06-27 11:35 ` Richard Henderson [this message]
2019-06-27 11:39 ` Richard Henderson
2019-06-27 10:56 ` [Qemu-devel] [PATCH v4 09/13] tcg/i386: Implement " Stefan Brankovic
2019-06-27 10:56 ` [Qemu-devel] [PATCH v4 10/13] target/ppc: convert vmrgh instructions to vector operations Stefan Brankovic
2019-06-27 10:56 ` [Qemu-devel] [PATCH v4 11/13] tcg: Add opcodes for verctor vmrgl instructions Stefan Brankovic
2019-06-27 10:56 ` [Qemu-devel] [PATCH v4 12/13] tcg/i386: Implement vector " Stefan Brankovic
2019-06-27 10:56 ` [Qemu-devel] [PATCH v4 13/13] target/ppc: convert vmrgl instructions to vector operations Stefan Brankovic
2019-06-27 20:19 ` [Qemu-devel] [PATCH v4 00/13] target/ppc, tcg, tcg/i386: Optimize emulation of some Altivec instructions Howard Spoelstra
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=d42d0cdf-1cc5-b434-f974-4d5bde543271@linaro.org \
--to=richard.henderson@linaro.org \
--cc=david@gibson.dropbear.id.au \
--cc=hsp.cat7@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=stefan.brankovic@rt-rk.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).