I want to get PRID in MIPS64 platform with below C code, the make phase passes and the binary is generated successfully, but illegal instruction appear when run the binary. What should do to solve this problem?
uint32_t prid = 0;
__asm__ __volatile__ ("mfc0 %0, $15" : "=r" (prid));
I expect that the PRID in the MIPS64 platform should be read successfully with the asm instruction in C programming language.