[llvm-dev] clang/llvm support for %= in inline assembly
Sean Silva via llvm-dev
llvm-dev at lists.llvm.org
Sun Feb 5 01:50:23 PST 2017
I think we may already support it. At least that's the implication from the
post-commit thread of r288093, in particular this reply from Reid
https://www.mail-archive.com/cfe-commits@lists.llvm.org/msg43592.html
Do you have a test case?
-- Sean Silva
On Sat, Feb 4, 2017 at 10:30 PM, Andrew Kelley via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> from https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html
>
> Under certain circumstances, GCC may duplicate (or remove duplicates of)
>> your assembly code when optimizing. This can lead to unexpected duplicate
>> symbol errors during compilation if your asm code defines symbols or
>> labels. Using ‘%=’ (see AssemblerTemplate) may help resolve this problem.
>
>
> ‘%=’
>> Outputs a number that is unique to each instance of the asm statement in
>> the entire compilation. This option is useful when creating local labels
>> and referring to them multiple times in a single template that generates
>> multiple assembler instructions.
>
>
>
> I tried to implement %= in my front-end but I ran into this problem with
> the optimizer. So in order to have this feature, LLVM would need to support
> it in the IR language.
>
> As far as I can tell, Clang does not support this feature. Is it a
> reasonable feature request?
>
> Regards,
> Andrew
>
> _______________________________________________
> 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/20170205/d4a229b1/attachment.html>
More information about the llvm-dev
mailing list