Commit 90e9fe52 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Russell King

[ARM PATCH] 1302/1: ARMv5 optimized findbit

Question: is there any reason to do all this with byte access rather than 
word access besides alignment issues?  Word access would be much faster.
parent ddacbff2
......@@ -83,7 +83,15 @@ ENTRY(_find_next_zero_bit_be)
/*
* One or more bits in the LSB of r3 are assumed to be set.
*/
.found: tst r3, #0x0f
.found:
#if __LINUX_ARM_ARCH__ >= 5
rsb r1, r3, #0
and r3, r3, r1
clz r3, r3
rsb r3, r3, #31
add r0, r2, r3
#else
tst r3, #0x0f
addeq r2, r2, #4
movne r3, r3, lsl #4
tst r3, #0x30
......@@ -92,5 +100,6 @@ ENTRY(_find_next_zero_bit_be)
tst r3, #0x40
addeq r2, r2, #1
mov r0, r2
#endif
RETINSTR(mov,pc,lr)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment