<div dir="ltr"><div dir="ltr"></div>Hi James,<div><br></div><div>Comments inlined. </div><div><br></div><div>Thanks,</div><div>Jian</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 10, 2019 at 1:35 PM James Y Knight <<a href="mailto:jyknight@google.com">jyknight@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">I'm a bit confused by this. All of the test cases, except the one (directive_if.s) you've only just added seem to already work in llvm-as prior to the patch. AFAICT, there should be no need to compute deltas across MC fragments. (GNU as certainly doesn't do anything complex like that). It's hard for me to tell what the issue being reported in <a href="https://llvm.org/PR43795" target="_blank">https://llvm.org/PR43795</a> is, because there's no standalone reproduction, and extracting the snippet reported and attempting to assemble, appears to work already as well.</div></div></blockquote><div><br></div><div>Ah, I accidentally removed a nop instruction required to reproduce the issue. I have updated my test cases. Thanks for catching this.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div><div><div></div><div><br></div><div>The other problem, in <a href="https://llvm.org/PR41825" target="_blank">https://llvm.org/PR41825</a> is clear, at least -- this fails with "error: expected absolute expression", which is unexpected and incorrect:</div></div></div><div><br></div><div>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(46,174,187)"><span style="font-variant-ligatures:no-common-ligatures">foo</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">:</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(46,174,187)">.if</span><span style="font-variant-ligatures:no-common-ligatures"> (. - foo) != 0</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><span> </span></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(46,174,187)">nop</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(46,174,187)"><span style="font-variant-ligatures:no-common-ligatures">.endif</span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(46,174,187)"><br></p></div></div><div class="gmail_quote"><div class="gmail_attr">I believe <a href="https://reviews.llvm.org/D70062" target="_blank">https://reviews.llvm.org/D70062</a> is a simple fix for that problem.</div></div></div></blockquote><div><br></div><div>Thanks for the fix!</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div class="gmail_attr"><br></div><div class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">On Tue, Nov 5, 2019 at 4:20 PM Reid Kleckner 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I think you meant to link to this patch here:<div><a href="https://reviews.llvm.org/D69411" target="_blank">https://reviews.llvm.org/D69411</a></div><div><br></div><div>There's too much discussion for me to read and understand, but I think what would help the most is developing a clear summary of what the gnu assembler's behavior is. Do they defer evaluation of the if condition? Do they under or overestimate offsets in the ambiguous cases? Or do they just error out cases where there are relaxable fragments between labels? That should help us pick a more general direction for this feature.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 5, 2019 at 12:08 PM Jian Cai 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>I've been trying to add support to the integrated assembler to handle cases like below</div><div><br></div><div>foo:instr; .if . - foo; instr; .endif<br></div><div><br></div><div>when the dot symbol and foo are <a href="https://github.com/ClangBuiltLinux/linux/issues/744" target="_blank">assigned to consecutive MCDataFragments</a>. I have a <a href="https://reviews.llvm.org/D6941" target="_blank">patch</a> under review. And even though it seems to solve the problem, the concern is it complicates the code and we would like to know if there is more decent way to handle this. Please feel free to share your thoughts. </div><div><br></div><div>Thanks,</div><div>Jian</div></div>
_______________________________________________<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="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>
_______________________________________________<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="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>
</div>
</blockquote></div></div></div>