qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: richard.henderson@linaro.org, qemu-devel@nongnu.org
Cc: fam@euphon.net, "Peter Maydell" <peter.maydell@linaro.org>,
	berrange@redhat.com, f4bug@amsat.org, qemu-arm@nongnu.org,
	stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com,
	"Alex Bennée" <alex.bennee@linaro.org>,
	aurelien@aurel32.net
Subject: [RFC PATCH  2/4] tests/tcg: build sha1-vector for SVE and compare
Date: Wed,  2 Feb 2022 19:12:40 +0000	[thread overview]
Message-ID: <20220202191242.652607-3-alex.bennee@linaro.org> (raw)
In-Reply-To: <20220202191242.652607-1-alex.bennee@linaro.org>

The aim of this is to test code generation for vectorised operations.
Unfortunately gcc struggles to do much with the messy sha1 code (try
-fopt-info-vec-missed to see why). However it's better than nothing.

We assume the non-vectorised output is gold and baring compiler bugs
the outputs should match.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/aarch64/Makefile.target | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target
index 1d967901bd..a03844ce48 100644
--- a/tests/tcg/aarch64/Makefile.target
+++ b/tests/tcg/aarch64/Makefile.target
@@ -50,6 +50,18 @@ sysregs: CFLAGS+=-march=armv8.1-a+sve
 AARCH64_TESTS += sve-ioctls
 sve-ioctls: CFLAGS+=-march=armv8.1-a+sve
 
+# Vector SHA1
+
+sha1-vector: CFLAGS=-march=armv8.1-a+sve -O3
+sha1-vector: sha1.c
+	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
+
+run-sha1-vector: sha1-vector run-sha1
+	$(call run-test, $<, $(QEMU) $(QEMU_OPTS) $<, "$< on $(TARGET_NAME)")
+	$(call diff-out, sha1-vector, sha1.out)
+
+TESTS += sha1-vector
+
 ifneq ($(HAVE_GDB_BIN),)
 GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
 
-- 
2.30.2



  parent reply	other threads:[~2022-02-02 19:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-02 19:12 [RFC PATCH 0/4] improve coverage of vector backend Alex Bennée
2022-02-02 19:12 ` [RFC PATCH 1/4] tests/tcg: cleanup sha1 source code Alex Bennée
2022-02-02 21:05   ` Richard Henderson
2022-02-02 19:12 ` Alex Bennée [this message]
2022-02-02 21:09   ` [RFC PATCH 2/4] tests/tcg: build sha1-vector for SVE and compare Richard Henderson
2022-02-02 19:12 ` [RFC PATCH 3/4] tests/tcg: add sha512 test Alex Bennée
2022-02-02 21:19   ` Richard Henderson
2022-02-02 19:12 ` [RFC PATCH 4/4] tests/tcg: add vectorised sha512 versions Alex Bennée
2022-02-02 21:18   ` Richard Henderson
2022-02-02 23:16 ` [RFC PATCH 0/4] improve coverage of vector backend Alex Bennée
2022-02-03  1:45   ` Taylor Simpson
2022-02-03 16:33     ` Taylor Simpson
2022-02-03 17:50       ` Alex Bennée
2022-02-03 17:57         ` Taylor Simpson
2022-02-03 18:26           ` Alex Bennée
2022-02-03 19:01             ` Taylor Simpson
2022-02-03 20:00               ` Alex Bennée
2022-02-03 21:05                 ` Taylor Simpson
2022-02-03 21:31                 ` Richard Henderson

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=20220202191242.652607-3-alex.bennee@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=aurelien@aurel32.net \
    --cc=berrange@redhat.com \
    --cc=crosa@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=fam@euphon.net \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=stefanha@redhat.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).