Count cycles

This topic contains 0 replies, has 1 voice, and was last updated by  wijdene 3 years, 5 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #31711

    wijdene
    Member

    Hello,
    I want to mesure the number of cycles made by my code.
    So that, I implemented this code:
    double c;
    __asm (“rdhwr $2,$0 n” :”=r” (c): “0” (c));
    printf(“Time is: %lf n “,c );

    Yet, the result is usually :Time is: 0.000000.(gcc compiler is used).
    There is no way to use the mfc0 instruction with register 9, select 0?
    What should I change?

    Thanks a lot!

Viewing 1 post (of 1 total)
You must be logged in to reply to this topic.