<div dir="ltr">Hi,<div><br></div><div>Thanks Aaron! Joey also looked at it on IRC and noticed that the testcase would fail in release mode. I've fixed that and committed in r208231.<br></div><div><br></div><div>Cheers,</div>
<div><br></div><div>James</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 7 May 2014 16:36, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">LGTM! But this is far enough outside of my area of expertise, you may<br>
want to wait for a second confirmation.<br>
<br>
~Aaron<br>
<div><div class="h5"><br>
On Wed, May 7, 2014 at 10:45 AM, James Molloy <<a href="mailto:james@jamesmolloy.co.uk">james@jamesmolloy.co.uk</a>> wrote:<br>
> Hi,<br>
><br>
> When doing int<->ptr coercion for big-endian architectures, the shift amount<br>
> is currently incorrectly calculated.<br>
><br>
> The shift amount is based upon DataLayout::getTypeAllocSizeInBits. This will<br>
> only work for legal types - types such as i24 that are created as part of<br>
> structs for bitfields will return "32" from that function. This patch<br>
> changes to using getTypeSizeInBits.<br>
><br>
> It turns out that AArch64 didn't run across this problem because it always<br>
> returned [1 x i64] as the type for a bitfield, whereas ARM64 returns i64 so<br>
> goes down this (better, but wrong) codepath.<br>
><br>
> I'm almost certain this change is good, but as I'm not a clang expert and<br>
> this is generic (big-endian only though) code, I'd appreciate if someone<br>
> else would also give it the once-over.<br>
><br>
> Cheers,<br>
><br>
> James<br>
><br>
</div></div>> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
><br>
</blockquote></div><br></div>