[LLVMdev] problem when use inline asm for msp430 target

Anton Korobeynikov anton at korobeynikov.info
Fri Dec 18 02:20:29 PST 2009


> inline asm code is like below:
> void test(unsigned short a) {
>    asm("myinstr          my16bitreg, %0"::"r"(a));
> }
> I want it generate instruction "myinstr          my16bitreg, r15"
> I execute
> llc test.bc -march = msp430 -o test.s
> then it reports
> "LLVM ERROR: Couldn't allocate input reg for constraint 'r' !"
Works for me. Make sure you're using latest LLVM trunk. inline asm for
msp430 were not available with 2,6 release iirc.

With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University

More information about the llvm-dev mailing list