summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2012-12-23 16:12:30 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2012-12-23 16:12:30 +0000
commit332a02177497e8bef97c05bde31ae3a9631fe9fe (patch)
treea8fab7a3993bb44c3d0fcab884bbd2c815ef945c /regress
parent3cb9c75739d1a43e4f3694d947dd837d653c30c0 (diff)
Check proper alignment in destructors too.
Diffstat (limited to 'regress')
-rw-r--r--regress/misc/sse2/foo/foo.c11
-rw-r--r--regress/misc/sse2/libbar/bar.c11
2 files changed, 18 insertions, 4 deletions
diff --git a/regress/misc/sse2/foo/foo.c b/regress/misc/sse2/foo/foo.c
index bc95372e0c6..9a6075d0683 100644
--- a/regress/misc/sse2/foo/foo.c
+++ b/regress/misc/sse2/foo/foo.c
@@ -1,7 +1,8 @@
#include <emmintrin.h>
#include <pthread.h>
-void foobar(void) __attribute__((constructor));
+void foo_init(void) __attribute__((constructor));
+void foo_fini(void) __attribute__((destructor));
void *
foo(void *arg)
@@ -13,7 +14,13 @@ foo(void *arg)
}
void
-foobar(void)
+foo_init(void)
+{
+ foo(NULL);
+}
+
+void
+foo_fini(void)
{
foo(NULL);
}
diff --git a/regress/misc/sse2/libbar/bar.c b/regress/misc/sse2/libbar/bar.c
index 2d47a8209fe..3519d912467 100644
--- a/regress/misc/sse2/libbar/bar.c
+++ b/regress/misc/sse2/libbar/bar.c
@@ -1,12 +1,19 @@
#include <emmintrin.h>
-void bar(void) __attribute__((constructor));
+void bar_init(void) __attribute__((constructor));
+void bar_fini(void) __attribute__((destructor));
void
-bar(void)
+bar_init(void)
{
__m128i xmm_alpha;
if ((((unsigned long)&xmm_alpha) & 15) != 0)
exit(1);
}
+
+void
+bar_fini(void)
+{
+ bar_init();
+}