[llvm-commits] [PATCH] Fix decoding of 16-bit LDRSB

Owen Anderson resistor at me.com
Mon Aug 15 11:53:03 PDT 2011


On Aug 15, 2011, at 11:40 AM, Eric Christopher wrote:

> 
> On Aug 15, 2011, at 7:23 AM, James Molloy wrote:
> 
>> Hi,
>>  
>> The attached patch fixes decoding of LDRSB and LDRSH in 16-bit Thumb mode. Testcase added.
>>  
>> Cheers,
>>  
> 
>    let EncoderMethod = "getThumbAddrModeRegRegOpValue";
>    let PrintMethod = "printThumbAddrModeRROperand";
> +  let DecoderMethod = "DecodeThumbAddrModeRR";
>    let MIOperandInfo = (ops tGPR:$base, tGPR:$offsreg);
>  }
> 
> This appears to be the actual fix and the rest is some random renaming? Also could you add a test for ldrsh as well?

No, the renaming is necessary because the auto-generated decoder emitter can only auto-generate operand parsers when the names match up.

Otherwise, this looks fine, and I'll apply it, but please do submit a testcase when you can.

--Owen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110815/30c9a01c/attachment.html>


More information about the llvm-commits mailing list