This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]