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:
commit
2d2c20cd45
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue