We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
int main(void){ __asm__ __volatile__ ( "MCR p15, 0, Rd, c7, c0, 4" );}
For the instruction in question, it doesn't really matter which register you use; though you can let the compiler automatically select an arbitrary register containing the value zero, by using:void wfi(void){ __asm__ __volatile__ ("MCR p15,0,%0,c7,c0,4" ::"r"(0));}hths.
void wfi(void){ __asm__ __volatile__ ("MCR p15,0,%0,c7,c0,4" ::"r"(0));}