[LLVMdev] problem when use inline asm for msp430 target

Heyu Zhu zhu.heyu at gmail.com
Fri Dec 18 05:04:42 PST 2009


Mine is LLVM2.6's release version, so it doesn't work

Thank you!



2009/12/18 Anton Korobeynikov <anton at korobeynikov.info>

> Hello
>
> > 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091218/f7506414/attachment.html>


More information about the llvm-dev mailing list