diff options
author | cognet <cognet@FreeBSD.org> | 2004-11-07 16:54:54 +0000 |
---|---|---|
committer | cognet <cognet@FreeBSD.org> | 2004-11-07 16:54:54 +0000 |
commit | 913f8c4e59f34d4a7b29814e5e2699ae9565ac1e (patch) | |
tree | 28ce7606f19c252a4c85d6313b1e5441ac66e9e4 /lib/libc/arm | |
parent | 964bf9d8f7224bc91023df9f0e4ed3694db44c62 (diff) | |
download | FreeBSD-src-913f8c4e59f34d4a7b29814e5e2699ae9565ac1e.zip FreeBSD-src-913f8c4e59f34d4a7b29814e5e2699ae9565ac1e.tar.gz |
MFKernel: Implement ffs with clz on Xscale.
Diffstat (limited to 'lib/libc/arm')
-rw-r--r-- | lib/libc/arm/string/ffs.S | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libc/arm/string/ffs.S b/lib/libc/arm/string/ffs.S index 8955130..e91b3bb 100644 --- a/lib/libc/arm/string/ffs.S +++ b/lib/libc/arm/string/ffs.S @@ -49,6 +49,7 @@ ENTRY(ffs) /* Standard trick to isolate bottom bit in r0 or 0 if r0 = 0 on entry */ rsb r1, r0, #0 ands r0, r0, r1 +#ifndef __XSCALE__ /* * now r0 has at most one set bit, call this X * if X = 0, all further instructions are skipped @@ -74,3 +75,8 @@ ENTRY(ffs) .byte 10, 0, 0, 25, 0, 0, 21, 27 /* 40-47 */ .byte 31, 0, 0, 0, 0, 24, 0, 20 /* 48-55 */ .byte 30, 0, 23, 19, 29, 18, 17, 0 /* 56-63 */ +#else + clzne r0, r0 + rsbne r0, r0, #32 + mov pc, lr +#endif |