qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: [Qemu-devel] [RISU PATCH] arm.risu: Avoid VTRN with Vd == Vm
Date: Thu, 13 Jun 2019 15:37:41 +0100	[thread overview]
Message-ID: <20190613143741.15128-1-peter.maydell@linaro.org> (raw)

The AArch32 VTRN instruction is specified to give an UNKNOWN
result if Vd and Vm are the same register; avoid generating
this in risu output, as we already do for VUZP and VZIP.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
Alex: this pattern error is why we don't pass your
testcases/aarch32-all/insn_VTRN__INC.risu.bin when compared
with a real Cortex-A7. You probably want to update that.

 arm.risu | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arm.risu b/arm.risu
index 9009e6b..c16d245 100644
--- a/arm.risu
+++ b/arm.risu
@@ -613,7 +613,8 @@ VCLT0 A1 1111 0011 1 d 11 sz:2 01 vd:4 0 f 100 q m 0 vm:4
 VABS A1 1111 0011 1 d 11 sz:2 01 vd:4 0 f 110 q m 0 vm:4
 VNEG A1 1111 0011 1 d 11 sz:2 01 vd:4 0 f 111 q m 0 vm:4
 VSWP A1 1111 0011 1 d 11 sz:2 10 vd:4 00000 q m 0 vm:4
-VTRN A1 1111 0011 1 d 11 sz:2 10 vd:4 00001 q m 0 vm:4
+# d == m gives UNKNOWN results, so avoid it
+VTRN A1 1111 0011 1 d 11 sz:2 10 vd:4 00001 q m 0 vm:4 { ($d != $m) || ($vd != $vm); }
 # d == m gives UNKNOWN results, so avoid it
 VUZP A1 1111 0011 1 d 11 sz:2 10 vd:4 00010 q m 0 vm:4 { ($d != $m) || ($vd != $vm); }
 VZIP A1 1111 0011 1 d 11 sz:2 10 vd:4 00011 q m 0 vm:4 { ($d != $m) || ($vd != $vm); }
-- 
2.20.1



             reply	other threads:[~2019-06-13 16:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-13 14:37 Peter Maydell [this message]
2019-06-13 21:17 ` [Qemu-devel] [RISU PATCH] arm.risu: Avoid VTRN with Vd == Vm Richard Henderson
2019-06-17 14:24   ` Peter Maydell

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=20190613143741.15128-1-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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).