qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, qemu-stable@nongnu.org
Subject: [PULL for-5.0 09/10] tcg/i386: Fix INDEX_op_dup2_vec
Date: Mon, 30 Mar 2020 20:54:55 -0700	[thread overview]
Message-ID: <20200331035456.6494-11-richard.henderson@linaro.org> (raw)
In-Reply-To: <20200331035456.6494-1-richard.henderson@linaro.org>

We were only constructing the 64-bit element, and not
replicating the 64-bit element across the rest of the vector.

Cc: qemu-stable@nongnu.org
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 tcg/i386/tcg-target.inc.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/tcg/i386/tcg-target.inc.c b/tcg/i386/tcg-target.inc.c
index 223dba9c8c..7f61eeedd0 100644
--- a/tcg/i386/tcg-target.inc.c
+++ b/tcg/i386/tcg-target.inc.c
@@ -2855,9 +2855,13 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc,
         goto gen_simd;
 #if TCG_TARGET_REG_BITS == 32
     case INDEX_op_dup2_vec:
-        /* Constraints have already placed both 32-bit inputs in xmm regs.  */
-        insn = OPC_PUNPCKLDQ;
-        goto gen_simd;
+        /* First merge the two 32-bit inputs to a single 64-bit element. */
+        tcg_out_vex_modrm(s, OPC_PUNPCKLDQ, a0, a1, a2);
+        /* Then replicate the 64-bit elements across the rest of the vector. */
+        if (type != TCG_TYPE_V64) {
+            tcg_out_dup_vec(s, type, MO_64, a0, a0);
+        }
+        break;
 #endif
     case INDEX_op_abs_vec:
         insn = abs_insn[vece];
-- 
2.20.1



  parent reply	other threads:[~2020-03-31  4:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-31  3:54 [PULL for-5.0 00/10] tcg patch queue Richard Henderson
2020-03-31  3:54 ` [PULL for-5.0 01/10] configure: Drop adjustment of textseg Richard Henderson
2020-03-31  3:54 ` [PATCH for-5.0] tcg/i386: Fix INDEX_op_dup2_vec Richard Henderson
2020-03-31  8:14   ` no-reply
2020-03-31  3:54 ` [PULL for-5.0 02/10] tcg: Remove softmmu code_gen_buffer fixed address Richard Henderson
2020-03-31  3:54 ` [PULL for-5.0 03/10] configure: Do not force pie=no for non-x86 Richard Henderson
2020-03-31  3:54 ` [PULL for-5.0 04/10] configure: Always detect -no-pie toolchain support Richard Henderson
2020-03-31  3:54 ` [PULL for-5.0 05/10] configure: Unnest detection of -z, relro and -z, now Richard Henderson
2020-03-31  3:54 ` [PULL for-5.0 06/10] configure: Override the os default with --disable-pie Richard Henderson
2020-03-31  3:54 ` [PULL for-5.0 07/10] configure: Support -static-pie if requested Richard Henderson
2020-03-31 13:34   ` Laurent Vivier
2020-03-31 13:44     ` Laurent Vivier
2020-03-31 14:29       ` Richard Henderson
2020-03-31  3:54 ` [PULL for-5.0 08/10] target/mips: Fix loongson multimedia condition instructions Richard Henderson
2020-03-31  3:54 ` Richard Henderson [this message]
2020-03-31  3:54 ` [PULL for-5.0 10/10] decodetree: Use Python3 floor division operator Richard Henderson
2020-03-31 12:20 ` [PULL for-5.0 00/10] tcg patch queue Peter Maydell
2020-03-31 12:53   ` Alex Bennée
2020-03-31 15:02     ` Philippe Mathieu-Daudé

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=20200331035456.6494-11-richard.henderson@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    /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).