mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-05-23 12:17:20 +08:00
[libcpu/arm/*/cpuport.c]fixed __rt_ffs bug on account of armclang LTO.
This commit is contained in:
@@ -388,13 +388,13 @@ int __rt_ffs(int value)
|
||||
{
|
||||
__asm volatile(
|
||||
"CMP r0, #0x00 \n"
|
||||
"BEQ exit \n"
|
||||
"BEQ 1f \n"
|
||||
|
||||
"RBIT r0, r0 \n"
|
||||
"CLZ r0, r0 \n"
|
||||
"ADDS r0, r0, #0x01 \n"
|
||||
|
||||
"exit: \n"
|
||||
"1: \n"
|
||||
|
||||
: "=r"(value)
|
||||
: "r"(value)
|
||||
|
||||
Reference in New Issue
Block a user