gcc - "Error: unsupported relocation against <register>" error with inline PPC assembly code in .c file -
i have below inline assembly code. when try compile it, throws error mentioned after code snippet.
unsigned int func(void) { __asm__ ("mfspr r3, svr;"); }
below errors.
{standard input}: assembler messages: {standard input}:3349: error: unsupported relocation against r3 {standard input}:3349: error: unsupported relocation against svr {standard input}:3375: error: unsupported relocation against r3 {standard input}:3375: error: unsupported relocation against svr {standard input}:3510: error: unsupported relocation against r3 {standard input}:3510: error: unsupported relocation against svr {standard input}:3517: error: unsupported relocation against r3 {standard input}:3517: error: unsupported relocation against svr
can me fixing these?
apparently gas has no built-in support these registers. in order use should either define them or use indexes explicitly like:
mfspr 3, <some_index_here>
alternatively include: ppc_asm.tmpl.
if core e500 svr index 1023.
Comments
Post a Comment