[PATCH] D20337: [MC] Support symbolic expressions in assembly directives

Nirav Davé via llvm-commits llvm-commits at lists.llvm.org
Wed May 25 09:12:03 PDT 2016


Both clang and GCC expect such directives to have a # prefix for input.

That said, GCC isn't not consistent for output. For instance, my version of
arm-linux-gnueabi-gcc emits this directive with the line comment prefix '@'
(but still emits #APP for inline assembly) which the correspodning gas
interprets as a line comment and not a line directive.

-Nirav









On Wed, May 25, 2016 at 11:36 AM, Joerg Sonnenberger via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> On Wed, May 25, 2016 at 10:45:00AM -0400, James Y Knight via llvm-commits
> wrote:
> > The .s does have a way to carry the location. GCC emits location lines
> > around inline asm, like this:
> > #APP
> > # 3 "/tmp/test-asm.c" 1
> >         cmp %ax, %ax
> > # 0 "" 2
> > #NO_APP
> >
> > Clang doesn't do that. Clang emits for the same code:
> >         #APP
> >         cmpw    %ax, %ax
> >         #NO_APP
>
> What do we use on architectures where # is not a comment marker?
>
> Joerg
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160525/4d83cb72/attachment.html>


More information about the llvm-commits mailing list