aboutsummaryrefslogtreecommitdiff
path: root/nptl/tst-align.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-09-17 08:47:44 +0000
committerUlrich Drepper <drepper@redhat.com>2003-09-17 08:47:44 +0000
commita4db3439f1177cf5c5ceb80bfa3f3a2cef00fc0e (patch)
treee21a8cd5a2222281888d37b530d360e92995abd7 /nptl/tst-align.c
parent6c052003bda07641309dcd4fe4a5158d24f5d607 (diff)
downloadglibc-a4db3439f1177cf5c5ceb80bfa3f3a2cef00fc0e.tar
glibc-a4db3439f1177cf5c5ceb80bfa3f3a2cef00fc0e.tar.gz
glibc-a4db3439f1177cf5c5ceb80bfa3f3a2cef00fc0e.tar.bz2
glibc-a4db3439f1177cf5c5ceb80bfa3f3a2cef00fc0e.zip
Update.
2003-09-15 Jakub Jelinek <jakub@redhat.com> * sysdeps/i386/Makefile (sysdep-CFLAGS): If not in math or csu subdir, add -mpreferred-stack-boundary=4, with few exceptions. 2003-09-17 Jakub Jelinek <jakub@redhat.com> * Makeconfig (stack-align-test-flags): Set. * stdlib/Makefile (CFLAGS-tst-bsearch.c): Add $(stack-align-test-flags). * stdlib/tst-bsearch.c: Include tst-stack-align.h. (align_check): New var. (comp): Use TEST_STACK_ALIGN macro. (do_test): Fail if align_check != 1. * sysdeps/generic/tst-stack-align.h: New file. * sysdeps/i386/i686/Makefile (stack-align-test-flags): Add -msse. * sysdeps/i386/i686/tst-stack-align.h: New file.
Diffstat (limited to 'nptl/tst-align.c')
-rw-r--r--nptl/tst-align.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/nptl/tst-align.c b/nptl/tst-align.c
index 902a1c772a..2de9d7a107 100644
--- a/nptl/tst-align.c
+++ b/nptl/tst-align.c
@@ -21,7 +21,7 @@
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
-
+#include <tst-stack-align.h>
static void *
tf (void *arg)
@@ -30,14 +30,7 @@ tf (void *arg)
puts ("in thread");
- double d = 2.0;
- printf ("double: %g %p %zu\n", d, &d, __alignof (double));
- if ((((uintptr_t) &d) & (__alignof (double) - 1)) != 0)
- ok = false;
-
- long double ld = 3.0;
- printf ("ldouble: %Lg %p %zu\n", ld, &ld, __alignof (long double));
- if ((((uintptr_t) &ld) & (__alignof (long double) - 1)) != 0)
+ if (TEST_STACK_ALIGN ())
ok = false;
return ok ? NULL : (void *) -1l;
@@ -50,14 +43,7 @@ do_test (void)
puts ("in main");
- double d = 0.0;
- printf ("double: %g %p %zu\n", d, &d, __alignof (double));
- if ((((uintptr_t) &d) & (__alignof (double) - 1)) != 0)
- ok = false;
-
- long double ld = 1.0;
- printf ("ldouble: %Lg %p %zu\n", ld, &ld, __alignof (long double));
- if ((((uintptr_t) &ld) & (__alignof (long double) - 1)) != 0)
+ if (TEST_STACK_ALIGN ())
ok = false;
pthread_t th;