summaryrefslogtreecommitdiff
path: root/libcpu/arm/cortex-m4
diff options
context:
space:
mode:
authortfx2001 <[email protected]>2022-08-11 14:45:43 +0800
committerMan, Jianting (Meco) <[email protected]>2022-08-11 08:35:42 -0400
commit21ee452661d754848e7975ad41fb8da7bedb54ae (patch)
treeec87734cfb1701c43fed0dfbf04e28bbaee43f40 /libcpu/arm/cortex-m4
parent1f134b8dc46d16bd26a58ac08f430a524d23a45a (diff)
[libcpu][arm] fix armclang error when enable LTO
Diffstat (limited to 'libcpu/arm/cortex-m4')
-rw-r--r--libcpu/arm/cortex-m4/cpuport.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libcpu/arm/cortex-m4/cpuport.c b/libcpu/arm/cortex-m4/cpuport.c
index f060fa122d..717b4ba3df 100644
--- a/libcpu/arm/cortex-m4/cpuport.c
+++ b/libcpu/arm/cortex-m4/cpuport.c
@@ -474,11 +474,11 @@ exit
int __rt_ffs(int value)
{
__asm volatile(
- "CMP %0, #0x00 \n"
+ "CMP %1, #0x00 \n"
"BEQ 1f \n"
- "RBIT %0, %0 \n"
- "CLZ %0, %0 \n"
+ "RBIT %1, %1 \n"
+ "CLZ %0, %1 \n"
"ADDS %0, %0, #0x01 \n"
"1: \n"