[LLVMdev] Sub registers in inline assembly
Chris Lattner
clattner at apple.com
Tue Mar 1 14:59:28 PST 2011
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
More information about the llvm-dev
mailing list