[llvm-dev] clang/llvm support for %= in inline assembly

Reid Kleckner via llvm-dev llvm-dev at lists.llvm.org
Mon Feb 6 10:20:42 PST 2017


I documented this in r294204.

On Sun, Feb 5, 2017 at 8:19 AM, Andrew Kelley via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> On Sun, Feb 5, 2017 at 8:05 AM, Dimitry Andric <dimitry at andric.com> wrote:
>
>> Appending %= to the label name only works if you append at least one ':'
>> to the asm statement, otherwise it isn't seen as a so-called "assembler
>> template", apparently:
>
>
> Aha, ok, perfect, this results in LLVM IR:
>
>   tail call void asm sideeffect "named_label_${:uid}:\0Ajnz
> named_label_${:uid}\0A", "~{dirflag},~{fpsr},~{flags}"() #2, !dbg !20,
> !srcloc !25
>
> So LLVM IR does in fact already support it, and my use case is solved.
> However, it is undocumented in http://llvm.org/docs/LangRef.html. Might
> be night to add there for future developers.
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170206/dd6a33f7/attachment.html>


More information about the llvm-dev mailing list