未验证 提交 b010e434 编写于 作者: J JonasWen 提交者: GitHub

[libcpu][arm] ArmClang 编译优化错误 (#6071)

上级 ccbecfc2
......@@ -15,6 +15,7 @@
* 2013-06-23 aozima support lazy stack optimized.
* 2018-07-24 aozima enhancement hard fault exception handler.
* 2019-07-03 yangjie add __rt_ffs() for armclang.
* 2022-06-12 jonas fixed __rt_ffs() for armclang.
*/
#include <rtthread.h>
......@@ -473,12 +474,12 @@ exit
int __rt_ffs(int value)
{
__asm volatile(
"CMP r0, #0x00 \n"
"CMP %0, #0x00 \n"
"BEQ 1f \n"
"RBIT r0, r0 \n"
"CLZ r0, r0 \n"
"ADDS r0, r0, #0x01 \n"
"RBIT %0, %0 \n"
"CLZ %0, %0 \n"
"ADDS %0, %0, #0x01 \n"
"1: \n"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册