From 332a02177497e8bef97c05bde31ae3a9631fe9fe Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sun, 23 Dec 2012 16:12:30 +0000 Subject: Check proper alignment in destructors too. --- regress/misc/sse2/foo/foo.c | 11 +++++++++-- regress/misc/sse2/libbar/bar.c | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) (limited to 'regress') 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 #include -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 -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(); +} -- cgit v1.2.3