[PING^1] [AArch64] Implement Bitwise AND and Set Flags

Marcus Shawcroft marcus.shawcroft@arm.com
Tue Mar 26 10:59:00 GMT 2013


On 26/03/13 10:17, Marcus Shawcroft wrote:
> On 26/03/13 10:06, Hurugalawadi, Naveen wrote:
>>>>>> the second "set" in each pattern should have the "=r,rk" constraint
>>>>>> rather than just "=r,r".
>> If the destination operand is stack register, assembler generates error
>> as follows:-
>> Error: operand 1 should be an integer register -- `ands sp,x0,x1'
>> The ands instruction does not support sp in any of the operand as per
>> the assembler.
>>
>> adds and subs instruction can use SP as the first operand.
>> adds    x2, sp, 1                  -> No Assembler error
>> subs    x3, sp, #1                -> No Assembler error
>> adds    x2, sp, x1                -> No Assembler error
>> subs    x3, sp, x1                -> No Assembler error
>> adds    x3, sp, x1, lsl 3        -> No Assembler error
>> subs    x3, sp, x1, lsl 3        -> No Assembler error
>> Hence, their implementations are modified to support stack pointer as
>> the first operand.
>>
>
> Umm, I think Ian meant 'K' rather than 'k', these patterns should be
> able to deal with constants in the 2nd operand. The SP is irrelevant here.
>
> /M
>
>
Hi,

Ignore my last comment.  This patch now has two changes in it, the 
original 'and' patch with test case and the modification to add/sub 
patterns with test cases.  Can we split them into two different patches 
please. Just and in one, add/sub in the other.


Thanks
/Marcus



More information about the Gcc-patches mailing list