Hello Mr. / Mrs.
I am working on IVOR0. I checked sample code for enable IVOR0 by using MSR bit. I try to implent this sample assembly source code to my project on GCC compiler and s32 IDE. My source code like below;
void SetMSR_ME(void)
{
__asm__(
/* read spr MSR */
"mfmsr r3" "\n"
/* load mask to assert the ME bit */
//lis r4, 0x0000
//addi r4, r4, 0x1000
"e_lis r4,0x0000" "\n"
"e_add16i r4,r4,0x1000" "\n"
/* set ME bit */
//or r3, r3, r4
"se_or r3,r4" "\n"
/* write back to MSR */
"mtmsr r3" "\n"
);
}
I took this errors on IDE like that;
unsupported relocation against r3
unsupported relocation against r4.
What is your advice to handle this error?
Best Regards.
Hi,
error Unsupported relocation against r4 is caused by incorrect syntax. If you use inline assembler and GPR registers, you have to use following syntax:
asm("e_li %r0, 0");
There must be character % near the SPR register name.