Hi All
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
);
printf("after mfmsr");
asm("mtmsr %0;"
: "r" (toMSR) // input operand
);
printf(" after mtmsr");
Output:
after mfmsr
illegal instruction -- error
what could be the possible error in the above code?
is the syntax is correct?
c