diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2012-12-23 15:11:11 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2012-12-23 15:11:11 +0000 |
commit | e4c6008c17e1f0f41b51ab3a011dd242b510e75a (patch) | |
tree | eda046151efb68fbe0919dc570e7194d02868aef /regress/misc/sse2/libbar | |
parent | d8e2e51e26185390022dbfa65ceacd9f35290693 (diff) |
Regression test for proper stack alignment for SSE2 instructions.
Diffstat (limited to 'regress/misc/sse2/libbar')
-rw-r--r-- | regress/misc/sse2/libbar/Makefile | 8 | ||||
-rw-r--r-- | regress/misc/sse2/libbar/bar.c | 12 | ||||
-rw-r--r-- | regress/misc/sse2/libbar/shlib_version | 2 |
3 files changed, 22 insertions, 0 deletions
diff --git a/regress/misc/sse2/libbar/Makefile b/regress/misc/sse2/libbar/Makefile new file mode 100644 index 00000000000..a5ce621d0f7 --- /dev/null +++ b/regress/misc/sse2/libbar/Makefile @@ -0,0 +1,8 @@ +LIB= bar +SRCS= bar.c + +CFLAGS+= -msse2 + +regress: all + +.include <bsd.lib.mk> diff --git a/regress/misc/sse2/libbar/bar.c b/regress/misc/sse2/libbar/bar.c new file mode 100644 index 00000000000..2d47a8209fe --- /dev/null +++ b/regress/misc/sse2/libbar/bar.c @@ -0,0 +1,12 @@ +#include <emmintrin.h> + +void bar(void) __attribute__((constructor)); + +void +bar(void) +{ + __m128i xmm_alpha; + + if ((((unsigned long)&xmm_alpha) & 15) != 0) + exit(1); +} diff --git a/regress/misc/sse2/libbar/shlib_version b/regress/misc/sse2/libbar/shlib_version new file mode 100644 index 00000000000..1edea46de91 --- /dev/null +++ b/regress/misc/sse2/libbar/shlib_version @@ -0,0 +1,2 @@ +major=1 +minor=0 |