Advertisement
Guest User

Untitled

a guest
Aug 16th, 2012
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. static inline unsigned ccnt_read(void) {
  2. unsigned cc;
  3. __asm__ volatile ("mrc p15, 0, %0, c15, c12, 1" : "=r"(cc));
  4. return cc;
  5. }
  6. void init_counter() {
  7. // sets the cycle counter to work in /64 mode
  8. __asm__ volatile ("mcr p15, 0, %0, c15, c12, 0" :: "r"(13));
  9. }
  10. // http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0301h/Bihcjbaa.html
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement