summary refs log tree commit diff
path: root/test/conaddr.ssa
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin@c9x.me>2019-04-30 11:02:42 +0200
committerQuentin Carbonneaux <quentin@c9x.me>2019-04-30 11:21:45 +0200
commit4b7f02c09710b379a706708ae5880a1811519539 (patch)
treefa13857c28209bf6ecc837a6532adc176720e66e /test/conaddr.ssa
parent660a8d9dfa44050897b2f5ead823554893d79f24 (diff)
downloadroux-4b7f02c09710b379a706708ae5880a1811519539.tar.gz
isel fix for amd64 memory stores
The value argument of store instructions was
handled incorrectly.
Diffstat (limited to 'test/conaddr.ssa')
-rw-r--r--test/conaddr.ssa14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/conaddr.ssa b/test/conaddr.ssa
index 43177ba..9e24d49 100644
--- a/test/conaddr.ssa
+++ b/test/conaddr.ssa
@@ -35,6 +35,13 @@ function l $f3(l %o) {
 }
 
 export
+function $f4() {
+@start
+	storel $p, $p
+	ret
+}
+
+export
 function $writeto0() {
 @start
 	storel 0, 0
@@ -45,13 +52,14 @@ function $writeto0() {
 # #include <stdlib.h>
 # #include <signal.h>
 # char a[] = "qbe rocks";
+# void *p;
 # int ok;
 # extern unsigned f0(long), f1(long), f2(long, long);
 # extern char *f3(long);
-# extern void writeto0();
+# extern void f4(), writeto0();
 # void h(int sig, siginfo_t *si, void *unused) {
 # 	ok += si->si_addr == 0;
-# 	exit(!(ok == 5));
+# 	exit(!(ok == 6));
 # }
 # int main() {
 # 	struct sigaction sa = {.sa_flags=SA_SIGINFO, .sa_sigaction=h};
@@ -60,6 +68,8 @@ function $writeto0() {
 # 	ok += f1((long)a-5) == 'o';
 # 	ok += f2(4, 2) == 's';
 # 	ok += *f3(0) == 'q';
+# 	f4();
+# 	ok += p == &p;
 # 	writeto0(); /* will segfault */
 # }
 # <<<