I just reviewed this bug and tried your patch in the bug report. It works and solve the problem. I make this patch in more formal form (see attachement). <div><br></div><div>It looks great. It reuses functions Count[Trailing|Leading]Zeros_32() just like ARMAsmPrinter::printBitfieldInvMaskImmOperand() does to decode special imm. encoded in BFC/BFI's MachineInstr. <div>

LGTM.<div><br></div><div>Zonr</div><div><br><div><br><div class="gmail_quote">On Tue, May 25, 2010 at 7:12 PM, Shih-wei Liao <span dir="ltr"><<a href="mailto:sliao@google.com">sliao@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Bug 7222 (<a href="http://llvm.org/bugs/show_bug.cgi?id=7222" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=7222</a>) can be taken care<br>


of in a straightforward manner from the ARM Architecture Reference<br>
Manual. Could someone please examine the solution too? Thanks.<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>
</blockquote></div><br></div></div></div></div>