Quantcast
Channel: lkml.org : Shesha Sreenivasamurthy
Viewing all articles
Browse latest Browse all 1267

Re: bit tweaks [was: Re: [nfsd4] potentially hardware breaking reg ...

$
0
0
Linus Torvalds writes: (Summary) The alternatives of doing it _entirely_ by hand tend to be much worse (ie you end up using a macro from hell that checks which of the two bits are bigger and shifting in the right direction by using multiplication or division).
multiplication or division).
So let's just rewrite that mnt_flags conversion that way, justr to get gcc to generate the obvious code.
gcc to generate the obvious code.
It's a bit sad how gcc didn't pick up on the original code, especially since it had already done the much more complicated translation of doing the if-conversion.
doing the if-conversion.
Thanks for pointing out the gcc pattern.
Thanks for pointing out the gcc pattern.
Linus
Linus
Linus

Viewing all articles
Browse latest Browse all 1267

Trending Articles