Jamie wrote:
Even after correcting this, the 'Compiler failed' error is still occuring.
Code: Select all
asm("ldaw r11, cp[0]" ::: "r11");
asm("ldw %0, r11[%1]" : "=r"(procAddr) : "r"(procIndex) : "r11");
The clobber on the first asm is wrong: it should be an output instead, since you use
r11 later.
The clobber on the second asm is wrong: it should be an input.
Alternatively, write the whole thing as a single asm, e.g.
Code: Select all
asm("ldaw r11,cp[0] ; ldw %0,r11[%1]" : "=r"(procAddr) : "r"(procIndex) : "r11");
Or, probably best, just write this in C code instead of asm; or if you really want to use asm,
write the whole thing in assembler, i.e. a .s file.
Segher