[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 09/11] tests/tcg: build sha1-vector with O3 and compare
From: |
Alex Bennée |
Subject: |
[PATCH v1 09/11] tests/tcg: build sha1-vector with O3 and compare |
Date: |
Fri, 11 Feb 2022 16:03:07 +0000 |
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>
Message-Id: <20220202191242.652607-3-alex.bennee@linaro.org>
---
tests/tcg/aarch64/Makefile.target | 10 ++++++++++
tests/tcg/arm/Makefile.target | 9 +++++++++
2 files changed, 19 insertions(+)
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
- Re: [PATCH v1 02/11] tests/docker: add NOUSER for alpine image, (continued)
[PATCH v1 11/11] tests/tcg: add vectorised sha512 versions, Alex Bennée, 2022/02/11
[PATCH v1 04/11] tests/docker: update debian-arm64-cross with lci-tool, Alex Bennée, 2022/02/11
[PATCH v1 01/11] tests/docker: restore TESTS/IMAGES filtering, Alex Bennée, 2022/02/11
[PATCH v1 09/11] tests/tcg: build sha1-vector with O3 and compare,
Alex Bennée <=
[PATCH v1 06/11] scripts/ci: add build env rules for aarch32 on aarch64, Alex Bennée, 2022/02/11
[PATCH v1 05/11] tests/docker: introduce debian-riscv64-test-cross, Alex Bennée, 2022/02/11
[PATCH v1 10/11] tests/tcg: add sha512 test, Alex Bennée, 2022/02/11
[PATCH v1 07/11] scripts/ci: allow for a secondary runner, Alex Bennée, 2022/02/11