qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v6 13/13] tests/tcg/s390x: Tests for Vector Enhancements Faci


From: Thomas Huth
Subject: Re: [PATCH v6 13/13] tests/tcg/s390x: Tests for Vector Enhancements Facility 2
Date: Mon, 2 May 2022 11:10:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

On 02/05/2022 10.12, Thomas Huth wrote:
On 28/04/2022 11.47, David Hildenbrand wrote:
From: David Miller <dmiller423@gmail.com>

Signed-off-by: David Miller <dmiller423@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
---
  tests/tcg/s390x/Makefile.target |   8 ++
  tests/tcg/s390x/vx.h            |  19 +++++
  tests/tcg/s390x/vxeh2_vcvt.c    |  88 ++++++++++++++++++++
  tests/tcg/s390x/vxeh2_vlstr.c   | 139 ++++++++++++++++++++++++++++++++
  tests/tcg/s390x/vxeh2_vs.c      |  93 +++++++++++++++++++++
  5 files changed, 347 insertions(+)
  create mode 100644 tests/tcg/s390x/vx.h
  create mode 100644 tests/tcg/s390x/vxeh2_vcvt.c
  create mode 100644 tests/tcg/s390x/vxeh2_vlstr.c
  create mode 100644 tests/tcg/s390x/vxeh2_vs.c

diff --git a/tests/tcg/s390x/Makefile.target b/tests/tcg/s390x/Makefile.target
index f0d474a245..e50d617f21 100644
--- a/tests/tcg/s390x/Makefile.target
+++ b/tests/tcg/s390x/Makefile.target
@@ -17,6 +17,14 @@ TESTS+=trap
  TESTS+=signals-s390x
  TESTS+=branch-relative-long
+VECTOR_TESTS=vxeh2_vs
+VECTOR_TESTS+=vxeh2_vcvt
+VECTOR_TESTS+=vxeh2_vlstr
+
+TESTS+=$(VECTOR_TESTS)
+
+$(VECTOR_TESTS): CFLAGS+=-march=z15 -O2

I'm sorry, but this still fails in the QEMU CI:

https://gitlab.com/thuth/qemu/-/jobs/2401500348

s390x-linux-gnu-gcc: error: unrecognized argument in option '-march=z15'

I think we either have to switch to manually encoded instructions again, or add a check to the Makefile and only add the tests if the compiler supports -march=z15 ...? Opinions? Preferences?

I just tried, and seems like something like this should do the job, I think:

diff a/tests/tcg/s390x/Makefile.target b/tests/tcg/s390x/Makefile.target
--- a/tests/tcg/s390x/Makefile.target
+++ b/tests/tcg/s390x/Makefile.target
@@ -20,11 +20,11 @@ TESTS+=branch-relative-long
 VECTOR_TESTS=vxeh2_vs
 VECTOR_TESTS+=vxeh2_vcvt
 VECTOR_TESTS+=vxeh2_vlstr
-
-TESTS+=$(VECTOR_TESTS)
-
 $(VECTOR_TESTS): CFLAGS+=-march=z15 -O2
+TESTS+=$(if $(shell $(CC) -march=z15 -S -o /dev/null -xc /dev/null \
+                        >/dev/null 2>&1 && echo OK),$(VECTOR_TESTS))
+
 ifneq ($(HAVE_GDB_BIN),)
 GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
Does that look reasonable?

 Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]