[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2/2] arm64: fix fls()



At 13:38 +0000 on 22 Jan (1421930334), Jan Beulich wrote:
> It using CLZ on a 64-bit register while specifying the input operand as
> only 32 bits wide is wrong: An operand intentionally shrunk down to 32
> bits at the source level doesn't imply respective zero extension also
> happens at the machine instruction level, and hence the wrong result
> could get returned.
> 
> Add suitable inline assembly abstraction so that the function can
> remain shared between arm32 and arm64.

Would casting the asm arguments to unsigned long DTRT withuot
needing #ifdefs?

Cheers,

Tim.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.