Problem with REPEAT_READ in sysdeps/ia64/hp-timing.h

H. J. Lu hjl@lucon.org
Sat Jul 19 00:04:00 GMT 2003


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.



More information about the Libc-alpha mailing list