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

Reply via email to