<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 13, 2017 at 5:57 AM, PkmX via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="auto"><span class=""><div>On Thu, Jul 13, 2017 at 6:07 AM, Bruce Hoult <<a href="mailto:bruce@hoult.org" target="_blank">bruce@hoult.org</a>> wrote:<br></div></span><div dir="auto"><div class="gmail_extra" dir="auto"><span class=""><div dir="auto">> As a concrete suggestion, here is code for deciding how many bytes of<br>> padding to emit.<br>><br>> For the case of .align 2 (4 byte alignment), it will emit a minimum of 3 and<br>> a maximum of 6 bytes of padding. For .align 4 it emit a minimum of 15 and a<br>> maximum of 30 bytes of padding.<br></div><div dir="auto"><br></div></span><div>Why does .align 2 need 3 to 6 bytes of padding though? I think for `.p2align n` only 2^n - 2 (or 2^n - 4 without RVC) padding bytes would be needed.</div></div></div></div>
</div>
</blockquote></div><br></div><div class="gmail_extra">Because the PC can be left at an odd address by a .ascii or .byte</div><div class="gmail_extra"> </div></div>