Hi Stéphane. MIPS do have a way to access count register from user space. Unfortunately there is no GCC intrinsic function for it, you may try following inline assembly. static inline unsigned long get_count() { unsigned long count; asm volatile ("rdhwr %[rt], $2" : [rt] "=d" (count)); return count; } return Val_long (get_count()); Thanks. - Jiaxun |