<div dir="ltr">Hi Bastien,<div><br></div><div style>You have accounted for both ARM and Thumb1, but not Thumb2, which has yet another representation for UDFs, and I'm not sure you can accommodate all three into one representation (since the immediate slots are on odd places).</div>
<div style><br></div><div style>From (A8.8.247):</div><div style><br></div><div style><div>* Encoding A1:</div><div>*  1110 0111 1111 iiii iiii iiii 1111 iiii</div><div style>* Encoding T2:</div><div style>*  1111 0111 1111 iiii 1010 iiii iiii iiii</div>
<div>* Encoding T1:</div><div>*  1101 1110 iiii iiii</div><div><br></div><div style>cheers,</div><div style>--renato</div></div><div style><br></div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On 16 January 2013 20:46, JF Bastien <span dir="ltr"><<a href="mailto:jfb@chromium.org" target="_blank">jfb@chromium.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">I've attached a patch from PNaCl with changes the ARM halt encoding so that it also looks like a halt in Thumb. This can catch bugs when executing ARM code as Thumb, whether it be in the context of compiler/JIT bugs, or an attacker trying to get validated ARM code to execute as Thumb (which is a concern for PNaCl).<br>

<div><br></div><div>Note that the instruction itself isn't changing (it's still UDF), only the immediate.</div></div>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>