Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static inline unsigned ccnt_read(void) {
- unsigned cc;
- __asm__ volatile ("mrc p15, 0, %0, c15, c12, 1" : "=r"(cc));
- return cc;
- }
- void init_counter() {
- // sets the cycle counter to work in /64 mode
- __asm__ volatile ("mcr p15, 0, %0, c15, c12, 0" :: "r"(13));
- }
- // http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0301h/Bihcjbaa.html
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement