<div dir="ltr">LLVM itself is pretty unfriendly to non 8-bit bytes - how are you solving this everywhere else?<div><br></div><div>-eric</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jan 20, 2017 at 9:26 AM Jesper Antonsson 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 lang="SV" link="blue" vlink="purple" class="gmail_msg">
<div class="m_-7197897708198417076WordSection1 gmail_msg">
<p class="MsoNormal gmail_msg">Hi,<u class="gmail_msg"></u><u class="gmail_msg"></u></p>
<p class="MsoNormal gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg">I’m with a team using 16-bit bytes for an out-of-tree target. The AsmPrinter framework’s implementation of the DWARF debugging format is not very good at distinguishing between target-sized bytes (which is the more common
use) and 8-bit-bytes. The DWARF standard itself seems not very good in this regard, actually. So we have had to hack our way around this. I.e., at some call-sites of EmitSymbolValue(), EmitLabelDifference(), EmitIntValue() and EmitLabelReference(), an 8-bit-byte-sized
argument has had to be converted to target-byte-size (which is extra hacky for odd numbers of eight-bit-bytes).<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg">We’ve been thinking about what a good upstream fix would look like, and believe that perhaps converting all Size arguments in these call chains to BitSize would be the most practical way. The “cost” would be the multiplications
necessary at call-sites. Would this be a good suggestion, and would anybody like to view and accept our patches for this?<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg">Thanks, <u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg">Jesper<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
</div>
</div>
_______________________________________________<br class="gmail_msg">
LLVM Developers mailing list<br class="gmail_msg">
<a href="mailto:llvm-dev@lists.llvm.org" class="gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="gmail_msg">
</blockquote></div>