<div>I should be a bit more clear with my answer. The file test/CodeGen/ARM/pack.ll does contain tests for pkhbt and pkhtb, but they do not test the actual encoding of the instruction bits. The readable assembly code is correct, but it is the encoding where the problem shows up. If there are actual encoding tests for the classic code generation path on ARM, I would be more than happy to update them. The MC version does correctly generate the proper encoding (as seen in test/MC/ARM/simple-encoding.ll).</div>
<div><br></div><div>Steve</div><br><div class="gmail_quote">On Tue, May 3, 2011 at 6:35 PM, Stephen Hines <span dir="ltr"><<a href="mailto:srhines@google.com">srhines@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
The MC path is actually fine. This is for the non-MC path which seems to not have any tests.<div><br></div><div>Steve<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Tue, May 3, 2011 at 6:34 PM, Bruno Cardoso Lopes <span dir="ltr"><<a href="mailto:bruno.cardoso@gmail.com" target="_blank">bruno.cardoso@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Stephen,<br>
<div><div></div><div><br>
On Tue, May 3, 2011 at 10:24 PM, Stephen Hines <<a href="mailto:srhines@google.com" target="_blank">srhines@google.com</a>> wrote:<br>
> Hi,<br>
> I am sending this patch because I found that the non-MC ARM path was<br>
> incorrectly encoding ARM PKH* instructions. They would essentially be<br>
> encoded twice, where the second encoding would unwrap the shift amount in a<br>
> way that register fields could be clobbered (by the shift amount/encoding).<br>
> I do not have commit privileges, so I would appreciate it if someone could<br>
> submit this for me. All current tests pass with this change, since I am<br>
> using the non-MC path.<br>
<br>
</div></div>Nice! Could you add an encoding test to the patch? See test/MC/ARM for examples.<br>
<font color="#888888"><br>
--<br>
Bruno Cardoso Lopes<br>
<a href="http://www.brunocardoso.cc" target="_blank">http://www.brunocardoso.cc</a><br>
</font></blockquote></div><br></div></div></div>
</blockquote></div><br>