aboutsummaryrefslogtreecommitdiff
path: root/tests/tcg/s390x/vx.h
diff options
context:
space:
mode:
authorDavid Miller <dmiller423@gmail.com>2022-04-28 11:47:08 +0200
committerThomas Huth <thuth@redhat.com>2022-05-04 08:47:19 +0200
commitbc556c6686269c905043760631d7f57a30588bf3 (patch)
treebe68a249d91dc23d98a55967ab0497af796c731b /tests/tcg/s390x/vx.h
parent4f9b6c7ddb2937157a6f87de6bb79a5b93dcea5a (diff)
downloadqemu-bc556c6686269c905043760631d7f57a30588bf3.zip
qemu-bc556c6686269c905043760631d7f57a30588bf3.tar.gz
qemu-bc556c6686269c905043760631d7f57a30588bf3.tar.bz2
tests/tcg/s390x: Tests for Vector Enhancements Facility 2
Signed-off-by: David Miller <dmiller423@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: David Hildenbrand <david@redhat.com> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20220428094708.84835-14-david@redhat.com> [thuth: Only add test if -march=z15 is supported. Fix constraints for Clang] Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/tcg/s390x/vx.h')
-rw-r--r--tests/tcg/s390x/vx.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/tcg/s390x/vx.h b/tests/tcg/s390x/vx.h
new file mode 100644
index 0000000..02e7fd5
--- /dev/null
+++ b/tests/tcg/s390x/vx.h
@@ -0,0 +1,19 @@
+#ifndef QEMU_TESTS_S390X_VX_H
+#define QEMU_TESTS_S390X_VX_H
+
+typedef union S390Vector {
+ uint64_t d[2]; /* doubleword */
+ uint32_t w[4]; /* word */
+ uint16_t h[8]; /* halfword */
+ uint8_t b[16]; /* byte */
+ float f[4]; /* float32 */
+ double fd[2]; /* float64 */
+ __uint128_t v;
+} S390Vector;
+
+#define ES8 0
+#define ES16 1
+#define ES32 2
+#define ES64 3
+
+#endif /* QEMU_TESTS_S390X_VX_H */