Count cycles

Home Forums MIPS Insider MIPS FAQ Count cycles

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

Viewing 1 post (of 1 total)
  • Author
  • #64591


    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)

Forums are currently locked.