diff options
author | David S. Miller <davem@davemloft.net> | 2012-05-23 19:20:20 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-23 19:20:20 -0700 |
commit | 4efcac3a244de86593a82ca4ed945e839eb4c5af (patch) | |
tree | 7456cbb6d71b3f92385d94cab546e2b93dc19c6a /lib/Makefile | |
parent | ff06dffbc8abfc60d6a0332f058f1d1bb01abb31 (diff) | |
download | op-kernel-dev-4efcac3a244de86593a82ca4ed945e839eb4c5af.zip op-kernel-dev-4efcac3a244de86593a82ca4ed945e839eb4c5af.tar.gz |
sparc: Optimize strncpy_from_user() zero byte search.
Compute a mask that will only have 0x80 in the bytes which
had a zero in them. The formula is:
~(((x & 0x7f7f7f7f) + 0x7f7f7f7f) | x | 0x7f7f7f7f)
In the inner word iteration, we have to compute the "x | 0x7f7f7f7f"
part, so we can reuse that in the above calculation.
Once we have this mask, we perform divide and conquer to find the
highest 0x80 location.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/Makefile')
0 files changed, 0 insertions, 0 deletions