qemu-s390x
[Top][All Lists]
Advanced

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

Re: [PATCH v2 12/12] tests/tcg/s390x: Test unaligned accesses


From: Thomas Huth
Subject: Re: [PATCH v2 12/12] tests/tcg/s390x: Test unaligned accesses
Date: Wed, 15 Mar 2023 19:09:27 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0

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 <iii@linux.ibm.com>
---
...
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




reply via email to

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