Re: [RFC] bitops/non-atomic: make @nr unsigned to avoid any DIV

2021-08-06 Thread Vineet Gupta
On 8/6/21 6:42 AM, Will Deacon wrote: > On Thu, Aug 05, 2021 at 12:14:08PM -0700, Vineet Gupta wrote: >> signed math causes generation of costlier instructions such as DIV when >> they could be done by barrerl shifter. >> >> Worse part is this is not caught by things like bloat-o-meter since >>

Re: [RFC] bitops/non-atomic: make @nr unsigned to avoid any DIV

2021-08-06 Thread Will Deacon
On Thu, Aug 05, 2021 at 12:14:08PM -0700, Vineet Gupta wrote: > signed math causes generation of costlier instructions such as DIV when > they could be done by barrerl shifter. > > Worse part is this is not caught by things like bloat-o-meter since > instruction length / symbols are typically

[RFC] bitops/non-atomic: make @nr unsigned to avoid any DIV

2021-08-05 Thread Vineet Gupta
signed math causes generation of costlier instructions such as DIV when they could be done by barrerl shifter. Worse part is this is not caught by things like bloat-o-meter since instruction length / symbols are typically same size. e.g. stock (signed math) __ 919b4614 :