<div dir="ltr">Guys, may I commit this?<div><br></div><div>The absence of this additional constraint triggers an unfortunate behaviour in the disassembler. For example:</div><div><br></div><div><font face="courier new, monospace">echo "<span style="background-color:rgb(255,0,0)">0xb0 0x00 0x10 0xe6</span>" | llvm-mc -disassemble -show-inst -triple=armv7 -show-encoding<br>
</font></div><div><div><span class="" style="white-space:pre"><font face="courier new, monospace"><br></font></span></div><div><font face="courier new, monospace"><span class="" style="white-space:pre">    </span>ldr<span class="" style="white-space:pre">       </span>r0, [r0], -r0, lsr #1   @ encoding: [<span style="background-color:rgb(255,0,0)">0xa0,0x00,0x10,0xe6</span>]<br>
</font></div><div><font face="courier new, monospace">                                        @ <MCInst #205 LDR_POST_REG</font></div><div><font face="courier new, monospace">                                        @  <MCOperand Reg:60></font></div>
<div><font face="courier new, monospace">                                        @  <MCOperand Reg:60></font></div><div><font face="courier new, monospace">                                        @  <MCOperand Reg:60></font></div>
<div><font face="courier new, monospace">                                        @  <MCOperand Reg:60></font></div><div><font face="courier new, monospace">                                        @  <MCOperand Imm:159745></font></div>
<div><font face="courier new, monospace">                                        @  <MCOperand Imm:14></font></div><div><font face="courier new, monospace">                                        @  <MCOperand Reg:0>></font></div>
</div><div><br></div><div style>Note the input and output encodings differ! This is because the input encoding is actually undefined but accepted as a LDR.</div><div style>We don't want that in a disassembler. I can also produce about 15 million additional similar failures due to this oversight alone!</div>
<div style><br></div><div style>Thanks,</div><div style>Mihai</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 26, 2013 at 5:59 PM, Owen Anderson <span dir="ltr"><<a href="mailto:resistor@mac.com" target="_blank">resistor@mac.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It looks OK to me offhand, but I have no memory of why the test was XFAIL'd initially.<br>
<span class="HOEnZb"><font color="#888888"><br>
--Owen<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Apr 26, 2013, at 8:54 AM, Rafael Espíndola <<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>> wrote:<br>
<br>
> Owen, this patch looks good to me, but it has been disabled since the<br>
> switch to the new arm disassembler. Would you mind double checking<br>
> that it is the correct fix?<br>
><br>
> On 26 April 2013 11:46, Mihail Popa <<a href="mailto:mihail.popa@arm.com">mihail.popa@arm.com</a>> wrote:<br>
>> Hello.<br>
>><br>
>> This tightens up the encoding description for ARM post-indexed ldr<br>
>> instructions. All instructions in this class have bit 4 cleared. It turns<br>
>> out that there is a test case for this, but it was marked XFAIL.<br>
>><br>
>> Regards,<br>
>> Mihai<br>
>><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>
<br>
<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>
</div></div></blockquote></div><br></div>