On 13/03/2023 16.38, Ilya Leoshkevich wrote:
Add a number of small test that check whether accessing unaligned
addresses in various ways leads to a specification exception.
Run these test both in softmmu and user configurations; expect a PGM
in one case and SIGILL in the other.
Signed-off-by: Ilya Leoshkevich <[email protected]>
---
...
diff --git a/tests/tcg/s390x/ex-odd.S b/tests/tcg/s390x/ex-odd.S
new file mode 100644
index 00000000000..0427c79d8a4
--- /dev/null
+++ b/tests/tcg/s390x/ex-odd.S
@@ -0,0 +1,17 @@
+/*
+ * Test EXECUTEing a non-mapped odd address.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+#include "asm-const.h"
+
+#define CODE
\
+ stringify_in_c( lgrl %r1,odd_addr;)
\
+ stringify_in_c(expected_old_pswa:;)
\
+ stringify_in_c( ex 0,%r1;)
This fails to compile with Clang 15:
$ make check-tcg
BUILD s390x-softmmu guest-tests
tests/tcg/s390x/pgm-specification.inc:21:49: error: unknown token in expression
lgrl %r1,odd_addr; expected_old_pswa:; ex 0,%r1;
^
Thomas