精简简化版的__rt_ffs()函数

This commit is contained in:
杨澄 2021-11-07 15:51:24 +08:00 committed by GitHub
parent e6e9062977
commit 46fe85e2c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1375,7 +1375,7 @@ const rt_uint8_t __lowest_bit_bitmap[] =
*/ */
int __rt_ffs(int value) int __rt_ffs(int value)
{ {
return __lowest_bit_bitmap_new[(rt_uint32_t)(value & (value - 1) ^ value) % 37]; return __lowest_bit_bitmap[(rt_uint32_t)(value & (value - 1) ^ value) % 37];
} }
#else #else
const rt_uint8_t __lowest_bit_bitmap[] = const rt_uint8_t __lowest_bit_bitmap[] =