diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-07-12 18:26:36 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-07-12 18:26:36 +0000 |
commit | 0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (patch) | |
tree | 2ea1f8305970753e4a657acb2ccc15ca3eec8e2c /sysdeps/i386/i686/hp-timing.h | |
parent | 7d58530341304d403a6626d7f7a1913165fe2f32 (diff) | |
download | glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.gz glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.xz glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.zip |
2.5-18.1
Diffstat (limited to 'sysdeps/i386/i686/hp-timing.h')
-rw-r--r-- | sysdeps/i386/i686/hp-timing.h | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/sysdeps/i386/i686/hp-timing.h b/sysdeps/i386/i686/hp-timing.h index a5906835f7..b924869649 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 Free Software Foundation, Inc. + Copyright (C) 1998, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -119,26 +119,24 @@ 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 { \ - char __not_done; \ + int __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 %4, %%ebx\n\t" \ + __asm__ __volatile__ ("xchgl %0, %%ebx\n\t" \ "lock; cmpxchg8b %1\n\t" \ - "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"); \ + "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)); \ } \ - while (__not_done); \ + while ((unsigned char) __not_done); \ } while (0) /* No threads, no extra work. */ |