diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-12-22 20:10:10 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-12-22 20:10:10 +0000 |
commit | a334319f6530564d22e775935d9c91663623a1b4 (patch) | |
tree | b5877475619e4c938e98757d518bb1e9cbead751 /sysdeps/i386/i686/hp-timing.h | |
parent | 0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff) | |
download | glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.xz glibc-a334319f6530564d22e775935d9c91663623a1b4.zip |
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'sysdeps/i386/i686/hp-timing.h')
-rw-r--r-- | sysdeps/i386/i686/hp-timing.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/sysdeps/i386/i686/hp-timing.h b/sysdeps/i386/i686/hp-timing.h index b924869649..a5906835f7 100644 --- a/sysdeps/i386/i686/hp-timing.h +++ b/sysdeps/i386/i686/hp-timing.h @@ -1,5 +1,5 @@ /* High precision, low overhead timing functions. i686 version. - Copyright (C) 1998, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1998, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -119,24 +119,26 @@ typedef unsigned long long int hp_timing_t; /* We have to jump through hoops to get this correctly implemented. */ #define HP_TIMING_ACCUM(Sum, Diff) \ do { \ - int __not_done; \ + char __not_done; \ hp_timing_t __oldval = (Sum); \ hp_timing_t __diff = (Diff) - GLRO(dl_hp_timing_overhead); \ do \ { \ hp_timing_t __newval = __oldval + __diff; \ int __temp0, __temp1; \ - __asm__ __volatile__ ("xchgl %0, %%ebx\n\t" \ + __asm__ __volatile__ ("xchgl %4, %%ebx\n\t" \ "lock; cmpxchg8b %1\n\t" \ - "sete %%bl\n\t" \ - "xchgl %0, %%ebx" \ - : "=SD" (__not_done), "=m" (Sum), \ - "=A" (__oldval), "=c" (__temp0) \ - : "m" (Sum), "2" (__oldval), \ - "3" ((unsigned int) (__newval >> 32)), \ - "0" ((unsigned int) __newval)); \ + "sete %0\n\t" \ + "movl %4, %%ebx" \ + : "=q" (__not_done), "=m" (Sum), \ + "=A" (__oldval), "=c" (__temp0), \ + "=SD" (__temp1) \ + : "1" (Sum), "2" (__oldval), \ + "3" (__newval >> 32), \ + "4" (__newval & 0xffffffff) \ + : "memory"); \ } \ - while ((unsigned char) __not_done); \ + while (__not_done); \ } while (0) /* No threads, no extra work. */ |