[LLVMdev] Sub registers in inline assembly

Damien Vincent damien.llvm at gmail.com
Tue Mar 1 15:55:35 PST 2011


Thank you Chris !
I didn't realize this was just an asm printing issue... and I just checked
X86ISelLowering.cpp where you have all the asm constraints...


On Tue, Mar 1, 2011 at 2:59 PM, Chris Lattner <clattner at apple.com> wrote:

>
> On Mar 1, 2011, at 1:24 PM, Damien Vincent wrote:
>
> >
> >   I was wondering if llvm supports sub registers in an inline asm string.
> >   For example, in gcc, using modifiers %w0 makes it possible to access ax
> if %0 refers to eax.
> >
> >   If there is any support, do you know where it is implemented ? I'd like
> to add such a support for another target.
>
> Hi Damien,
>
> It sure does.  These are considered "modifier" characters and are handled
> in (e.g.) X86AsmPrinter::PrintAsmOperand.
>
> You can send some C code with asms in it through x86 clang to see what IR
> it generates or use the llvm demo page.
>
> -Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110301/4d2df32a/attachment.html>


More information about the llvm-dev mailing list