qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 2/2] tests/tcg/s390x: Add ex-relative-long.c


From: Richard Henderson
Subject: Re: [PATCH 2/2] tests/tcg/s390x: Add ex-relative-long.c
Date: Tue, 14 Mar 2023 10:05:28 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0

On 3/13/23 16:38, Ilya Leoshkevich wrote:
Test EXECUTE and EXECUTE RELATIVE LONG with relative long instructions
as targets.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
---
  tests/tcg/s390x/Makefile.target    |   1 +
  tests/tcg/s390x/ex-relative-long.c | 149 +++++++++++++++++++++++++++++
  2 files changed, 150 insertions(+)
  create mode 100644 tests/tcg/s390x/ex-relative-long.c

diff --git a/tests/tcg/s390x/Makefile.target b/tests/tcg/s390x/Makefile.target
index 72ad309b273..ed2709ee2c3 100644
--- a/tests/tcg/s390x/Makefile.target
+++ b/tests/tcg/s390x/Makefile.target
@@ -28,6 +28,7 @@ TESTS+=div
  TESTS+=clst
  TESTS+=long-double
  TESTS+=cdsg
+TESTS+=ex-relative-long
cdsg: CFLAGS+=-pthread
  cdsg: LDFLAGS+=-pthread
diff --git a/tests/tcg/s390x/ex-relative-long.c 
b/tests/tcg/s390x/ex-relative-long.c
new file mode 100644
index 00000000000..e47dac7e2c3
--- /dev/null
+++ b/tests/tcg/s390x/ex-relative-long.c
@@ -0,0 +1,149 @@
+/* Check EXECUTE with relative long instructions as targets. */
+#include <stdlib.h>
+#include <stdio.h>
+
+struct test {
+    const char *name;
+    long (*func)(long reg, long *cc);
+    long exp_reg;
+    long exp_mem;
+    long exp_cc;
+};
+
+/* Variable targeted by relative long instructions. */
+long mem;

I guess you're assuming that the adjacent memory, which the buggy qemu would address, contains something other than


+/* Initial "mem" value. */
+#define MEM 0xfedcba9889abcdef

this?  Perhaps better to use an array, and address the middle of it?


r~



reply via email to

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