From a4db3439f1177cf5c5ceb80bfa3f3a2cef00fc0e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 17 Sep 2003 08:47:44 +0000 Subject: Update. 2003-09-15 Jakub Jelinek * 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 * 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. --- nptl/tst-align.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'nptl/tst-align.c') 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 #include #include - +#include 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; -- cgit v1.2.3