From: "Alex Bennée" <alex.bennee@linaro.org>
To: peter.maydell@linaro.org
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
"open list:ARM TCG CPUs" <qemu-arm@nongnu.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
qemu-devel@nongnu.org
Subject: [PULL 11/18] tests/tcg: build sha1-vector with O3 and compare
Date: Tue, 1 Mar 2022 09:47:08 +0000 [thread overview]
Message-ID: <20220301094715.550871-12-alex.bennee@linaro.org> (raw)
In-Reply-To: <20220301094715.550871-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>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220225172021.3493923-12-alex.bennee@linaro.org>
diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target
index 1d967901bd..df3f8e9438 100644
--- a/tests/tcg/aarch64/Makefile.target
+++ b/tests/tcg/aarch64/Makefile.target
@@ -50,6 +50,16 @@ sysregs: CFLAGS+=-march=armv8.1-a+sve
AARCH64_TESTS += sve-ioctls
sve-ioctls: CFLAGS+=-march=armv8.1-a+sve
+# Vector SHA1
+sha1-vector: CFLAGS=-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
diff --git a/tests/tcg/arm/Makefile.target b/tests/tcg/arm/Makefile.target
index f509d823d4..2dc94931c3 100644
--- a/tests/tcg/arm/Makefile.target
+++ b/tests/tcg/arm/Makefile.target
@@ -70,6 +70,15 @@ endif
ARM_TESTS += commpage
+# Vector SHA1
+sha1-vector: CFLAGS=-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)
+
+ARM_TESTS += sha1-vector
TESTS += $(ARM_TESTS)
# On ARM Linux only supports 4k pages
--
2.30.2
next prev parent reply other threads:[~2022-03-01 10:03 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-01 9:46 [PULL 00/18] testing and semihosting updates Alex Bennée
2022-03-01 9:46 ` [PULL 01/18] tests/docker: restore TESTS/IMAGES filtering Alex Bennée
2022-03-01 9:46 ` [PULL 02/18] tests/docker: add NOUSER for alpine image Alex Bennée
2022-03-01 9:47 ` [PULL 03/18] tests/lcitool: update to latest version Alex Bennée
2022-03-01 9:47 ` [PULL 04/18] tests/docker: update debian-arm64-cross with lcitool Alex Bennée
2022-03-01 9:47 ` [PULL 05/18] tests/docker: update debian-s390x-cross " Alex Bennée
2022-03-01 9:47 ` [PULL 06/18] tests/docker: introduce debian-riscv64-test-cross Alex Bennée
2022-03-01 9:47 ` [PULL 07/18] scripts/ci: add build env rules for aarch32 on aarch64 Alex Bennée
2022-03-01 9:47 ` [PULL 08/18] scripts/ci: allow for a secondary runner Alex Bennée
2022-03-01 9:47 ` [PULL 09/18] gitlab: add a new aarch32 custom runner definition Alex Bennée
2022-03-01 9:47 ` [PULL 10/18] tests/tcg/ppc64: clean-up handling of byte-reverse Alex Bennée
2022-03-01 9:47 ` Alex Bennée [this message]
2022-03-01 9:47 ` [PULL 12/18] tests/tcg: add sha512 test Alex Bennée
2022-03-01 9:47 ` [PULL 13/18] tests/tcg: add vectorised sha512 versions Alex Bennée
2022-03-07 8:54 ` Thomas Huth
2022-03-09 11:18 ` Alex Bennée
2022-03-01 9:47 ` [PULL 14/18] travis.yml: Update the s390x jobs to Ubuntu Focal Alex Bennée
2022-03-01 9:47 ` [PULL 15/18] gitlab: upgrade the job definition for s390x to 20.04 Alex Bennée
2022-03-01 9:47 ` [PULL 16/18] tests/tcg: completely disable threadcount for sh4 Alex Bennée
2022-03-01 9:47 ` [PULL 17/18] semihosting/arm-compat: replace heuristic for softmmu SYS_HEAPINFO Alex Bennée
2022-03-01 9:47 ` [PULL 18/18] tests/tcg: port SYS_HEAPINFO to a system test Alex Bennée
2022-03-02 12:38 ` [PULL 00/18] testing and semihosting updates 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=20220301094715.550871-12-alex.bennee@linaro.org \
--to=alex.bennee@linaro.org \
--cc=peter.maydell@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).