This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Problem with REPEAT_READ in sysdeps/ia64/hp-timing.h
- From: "H. J. Lu" <hjl at lucon dot org>
- To: GNU C Library <libc-alpha at sources dot redhat dot com>
- Date: Fri, 18 Jul 2003 09:11:28 -0700
- Subject: Problem with REPEAT_READ in sysdeps/ia64/hp-timing.h
sysdeps/ia64/hp-timing.h has
#define REPEAT_READ(val) __builtin_expect ((int) val == -1, 0)
...
({ unsigned long int __itc;
do
asm volatile ("mov %0=ar.itc" : "=r" (__itc) : : "memory");
while (REPEAT_READ (__itc));
Var = __itc; })
__itc is long. When we cast it to int, 0x1ffffffff becomes an invalid
value. If ar.itc happens to be 0x1ffffffff, it will take a while for
the loop to exit.
H.J.