Re: [RESEND,PATCH] ARM: fix __div64_32() error when compiling with clang

From: Russell King - ARM Linux admin
Date: Mon Nov 30 2020 - 09:19:32 EST


On Mon, Nov 30, 2020 at 01:58:27PM +0000, David Laight wrote:
> > And actually, the same applies on BE, but the other way around. So we
> > should mark __xl as an output register as well, as __xl will assume
> > the right value depending on the endianness.
>
> Why not use "+r" to indicate than an 'output' parameter is also
> used as an input.
>
> Rather cleaner than specifying the same C variable as both
> input and output.

You have an incorrect understanding. "__n" is the input operand in r0.
"__rem" is the output operand in r0/r1.

No single C variable is used as both an input and an output.

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!