I am facing some issue with mtmsr assembly instruction while trying to write into msr register of MPC8641D.
below is my code which is compiling successfully but get runtime error as illegal instruction.
register long toMSR;
register long fromMSR;
asm ("mfmsr %0;"
: "=r" (fromMSR) // output operand
: "r" (toMSR) // input operand
printf(" after mtmsr");
illegal instruction -- error
what could be the possible error in the above code?
is the syntax is correct?