On 09/28/2009 07:25 AM, Mohamed Shafi wrote:
Hope someone suggests me a solution.
The solution is almost certainly something involving the TARGET_SECONDARY_RELOAD hook. You need to inform reload that it's going to need some scratch registers in order to perform the operation.
It's been a long time since I had to fiddle with this sort of thing, so I forget all the details involved. Perhaps someone else has some additional advice.
P.S Can i have commutative operation for the constraint combination (t, 0, t) i.e (t, %0, t). If so what will be the output template?
You can use commutative operations for constraints. You do not need to adjust the output template at all; if reload decides that a swap is needed, it will swap the operands in the rtl too.
r~