<div dir="ltr">Hi David,<div><br></div><div>I'd rather not have things like this:</div><div><br></div><div><div>+  /// isARMTarget - special handling for ARM parsing</div><div>+  virtual bool isARMTarget() { return false; }</div>
</div><div><br></div><div>Something more specific to the problem at hand would be better, or even re-using the infrastructure to determine if the target is ARM, or if it has @ as comments, or something like that.</div><div>
<br></div><div>cheers,</div><div>--renato</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 11 January 2014 02:24, David Peixotto <span dir="ltr"><<a href="mailto:dpeixott@codeaurora.org" target="_blank">dpeixott@codeaurora.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">> >> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=196607&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=196607&view=rev</a><br>

> >> Log:<br>
> >> Integrated assembler incorrectly lexes ARM-style comments<br>
> >><br>
> >> The integrated assembler fails to properly lex arm comments when they<br>
> >> are adjacent to an identifier in the input stream. The reason is that<br>
> >> the arm comment symbol '@' is also used as symbol variant in other<br>
> >> assembly languages so when lexing an identifier it allows the '@'<br>
> >> symbol as part of the identifier.<br>
> ><br>
> > This has broken .symver for ELF targets on ARM. Do you plan to fix this?<br>
> > Otherwise I'd ask for a revert.<br>
><br>
> Ugh. Yet another example of why I hate the comment character choice of '@'<br>
> on ARM (no, I don't think we should/can change it; too much history).<br>
><br>
> I agree it's important that symver work as documented. We should:<br>
><br>
> a) fix this bug, it's nasty<br>
> b) write some better test cases for .symver as we obviously have crappy<br>
> ones since they're passing even with this change in the tree.<br>
><br>
> David, do you think you'll have a change to have a look at this soon?<br>
<br>
</div>I've attached a patch that fixes the issue. I added a test for .symver based<br>
on the one for x86. To get the expected output I first undid my change to<br>
allow @ in identifiers and then captured the output. I am not familiar with<br>
what that directive is trying to do, so it would be good if someone could<br>
sanity-check the test.<br>
<br>
Modifying the Lexer to allow @ in the symbol for that one directive was<br>
relatively easy. The harder part was only doing it for ARM in the<br>
ELFAsmParser. Any feedback to improve the patch is appreciated.<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>