[Backport Ping][AArch64] PR target/20666, fix wrong encoding of new introduced BFC pseudo

Jiong Wang jiong.wang@foss.arm.com
Wed Oct 19 13:30:00 GMT 2016


On 11/10/16 10:41, Richard Earnshaw (lists) wrote:
> On 10/10/16 17:40, Jiong Wang wrote:
>> On 24/11/15 11:17, Matthew Wahab wrote:
>>> opcodes/
>>> 2015-11-24  Matthew Wahab  <matthew.wahab@arm.com>
>>>
>>>      * aarch64-asm-2.c: Regenerate.
>>>      * aarch64-asm.c (convert_bfc_to_bfm): New.
>> There looks like a copy & paste error in this function, and caused PR
>> target/20666.
>>
>> +convert_bfc_to_bfm (aarch64_inst *inst)
>> +{
>> +  int64_t lsb, width;
>> +
>> +  /* Insert XZR.  */
>> +  copy_operand_info (inst, 3, 2);
>> +  copy_operand_info (inst, 2, 1);
>> +  copy_operand_info (inst, 2, 0);
>>                              ^~~~~~~ should be "0".
>>
>> "BFC Xd, lsb, width" is simplified form of "BFI Xd, XZR, lsb, width",
>> and both
>> are alias and will be transformed into "BFM Xd, XZR, immr, imms" during
>> encoding,
>> we inserting XZR into operand 1 of BFM, and the operand 0 (Xd) is not
>> changed.
>>
>> The expected results in the testcase are also wrong. Both fixed.
>>
>> OK for master?
>>
> OK.  You'll need Tristan's ack for the backports, but as a wrong code
> bug I hope he'll approve.
>
> R.

Ping ~

Tristan, OK to backport?  This is an important wrong encoding fix.

I want to backport to 2.26 and 2.27.  Patch applies cleanly on both.

Thanks.



More information about the Binutils mailing list