<div dir="ltr">Sorry, I spoke too soon. This only happens for intel style inline assembly in LLVM IR. I don't have a good suggestion.</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 12, 2018 at 1:44 PM Reid Kleckner <<a href="mailto:rnk@google.com">rnk@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I think we should revert r301390 just on principle from looking at the code. If I understand correctly, it flips the bit for "is parsing inline asm" to true when encountering a plain .intel_syntax directive. That's just wrong.</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 12, 2018 at 6:34 AM Francis Visoiu Mistrih via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
We have a significant regression since llvm 5.0.0 in the x86 assembler.<br>
<br>
The following snippets fail:<br>
<br>
1)<br>
<br>
.intel_syntax<br>
0:<br>
  jmp 0b<br>
<br>
2)<br>
<br>
.intel_syntax<br>
  and edi, 0b010101<br>
<br>
when running through `llvm-mc -arch x86-64`.<br>
<br>
This regression was introduced in r301390, which was driven by PR27884.<br>
<br>
I think <a href="https://llvm.org/PR36144" rel="noreferrer" target="_blank">https://llvm.org/PR36144</a> describes this very well, and I think we should<br>
get this fixed, since it's a pretty basic thing to support in the assembler.<br>
<br>
Here are a few solutions to this:<br>
<br>
1) Introduce a new asm dialect/flavor/style to assemble masm files.<br>
<br>
2) Only set the flags based on the target triple. Also suggested in PR27884.<br>
<br>
3) Only set the flags based on a new command line flag.<br>
<br>
Let me know if any other solution comes to mind.<br>
<br>
While we get this issue fixed, is it reasonable to revert r301390?<br>
<br>
Thanks,<br>
<br>
-- <br>
Francis<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>
</blockquote></div>