Merge pull request #3700 from geniusgogo/master

[libcpu/arm/*/cpuport.c]fixed __rt_ffs bug on account of armclang LTO.
This commit is contained in:
Bernard Xiong 2020-06-18 10:05:24 +08:00 committed by GitHub
commit 2d2c20cd45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View File

@ -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)

View File

@ -475,13 +475,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"
"BX lr \n"
: "=r"(value)

View File

@ -472,13 +472,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)

View File

@ -472,13 +472,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)