<div dir="ltr">Looping in people with at least some interest in this side of things...<br><br><div class="gmail_quote"><div dir="ltr">On Tue, May 17, 2016 at 2:59 PM Petr Hosek via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">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"><div dir="ltr">I've created a patch which adds support for symbolic expressions in absolute expressions which matches the behavior of GNU assembler, would someone be willing to review it?<div><br></div><div><a href="http://reviews.llvm.org/D20337" target="_blank">http://reviews.llvm.org/D20337</a></div></div><div dir="ltr"><div><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Apr 19, 2016 at 2:19 PM Petr Hosek <<a href="mailto:phosek@chromium.org" target="_blank">phosek@chromium.org</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">While trying to compile an existing codebase which uses handwritten assembly with LLVM, I ran into an issue around using backward references in assembly absolute expressions. A simple example can be the following snippet:<div><br></div><div>_foo:</div><div> .fill 0x100</div><div>_bar:</div><div> .fill _bar - _foo</div><div>_baz:</div><div> .fill 0x100</div><div><br></div><div>While gas compiles this snippet without any errors, the integrated assembler throws an error: expected absolute expression for _bar - _foo.</div><div><br></div><div>I haven't found any definition of absolute expression in gas manual, and it's arguable whether this case should be considered an absolute expression, but at the point of evaluating the directive, the addresses of backward labels should be already known so this expression could be treated as absolute. A quick search also revealed several bug reports related to this issue so it seems like this use case is fairly common.</div><div><br></div><div>I'd be happy to try and implement the support for backward references in MC (unless someone else is already working on this), but before I do invest more time on this issue, I'd like to ask if this is desirable or if the lack of support for backward references is intentional?</div></div></blockquote></div></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="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></div>