mirror of https://github.com/ARMmbed/mbed-os.git
Fixed incorrect instruction in IAR ctz implementation
The RBIT instruction reverses the bits of a word, not REVpull/5538/head
parent
383677f604
commit
6fc33f4d9c
|
@ -38,7 +38,7 @@ static inline uint32_t lfs_min(uint32_t a, uint32_t b) {
|
||||||
|
|
||||||
static inline uint32_t lfs_ctz(uint32_t a) {
|
static inline uint32_t lfs_ctz(uint32_t a) {
|
||||||
#ifdef __ICCARM__
|
#ifdef __ICCARM__
|
||||||
return __CLZ(__REV(a));
|
return __CLZ(__RBIT(a));
|
||||||
#else
|
#else
|
||||||
return __builtin_ctz(a);
|
return __builtin_ctz(a);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue