[PATCH] ARM: bitops: Fix low-level code to be Thumb-2 compatible
Russell King - ARM Linux
linux at arm.linux.org.uk
Wed Feb 2 14:50:52 EST 2011
On Wed, Feb 02, 2011 at 02:33:55PM -0500, Nicolas Pitre wrote:
> On Wed, 2 Feb 2011, Dave Martin wrote:
>
> > The new bitops code cunningly str <Rt>, [r1, -r1] to trigger
> > a fault by attempting to store to address zero.
> >
> > This code doesn't assemble in Thumb-2, since Thumb-2 doesn't
> > allow negative register offsets at all for loads and stores.
> >
> > The patch loads 0 into r2 and uses that as a base register
> > instead for the Thumb-2 case: r2 seems non-live at every
> > instance of this problem.
> >
> > The ARM case is unaffected.
> >
> > Signed-off-by: Dave Martin <dave.martin at linaro.org>
>
> Russell proposed a better solution already:
>
> http://mid.gmane.org/alpine.LFD.2.00.1101181312360.8580@xanadu.home
>
> No idea why this wasn't folded in his series yet though.
Because I haven't got a round tuit.
http://www.quantumenterprises.co.uk/roundtuit/traditional_round_tuits.htm
More information about the linux-arm-kernel
mailing list