This is an automated email from the ASF dual-hosted git repository. jiuzhudong pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 0b6188bfa242cd5d7af5db141a79fd91f6ff06f7 Author: yangao1 <yang...@xiaomi.com> AuthorDate: Mon May 12 20:54:44 2025 +0800 armv8-m: Optimize cfi instructions to debug Signed-off-by: yangao1 <yang...@xiaomi.com> --- libs/libc/machine/arm/armv8-m/gnu/arch_memcpy.S | 4 ++++ libs/libc/machine/arm/armv8-m/gnu/arch_memmove.S | 3 +++ libs/libc/machine/arm/armv8-m/gnu/arch_memset.S | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/libs/libc/machine/arm/armv8-m/gnu/arch_memcpy.S b/libs/libc/machine/arm/armv8-m/gnu/arch_memcpy.S index f503470986..a95474fce9 100644 --- a/libs/libc/machine/arm/armv8-m/gnu/arch_memcpy.S +++ b/libs/libc/machine/arm/armv8-m/gnu/arch_memcpy.S @@ -113,6 +113,8 @@ ARCH_LIBCFUN(memcpy): @ r0: dst @ r1: src @ r2: len + .cfi_sections .debug_frame + .cfi_startproc #if __ARM_FEATURE_PAC_DEFAULT # if __ARM_FEATURE_BTI_DEFAULT pacbti ip, lr, sp @@ -123,6 +125,7 @@ ARCH_LIBCFUN(memcpy): #endif /* __ARM_FEATURE_PAC_DEFAULT */ #ifdef __ARM_FEATURE_MVE mov r3, lr + .cfi_register lr,r3 wlstp.8 lr, r2, 2f mov r2, r0 1: @@ -395,6 +398,7 @@ ARCH_LIBCFUN(memcpy): #endif /* __ARM_FEATURE_PAC_DEFAULT */ bx lr #endif + .cfi_endproc .size ARCH_LIBCFUN(memcpy), .-ARCH_LIBCFUN(memcpy) #endif diff --git a/libs/libc/machine/arm/armv8-m/gnu/arch_memmove.S b/libs/libc/machine/arm/armv8-m/gnu/arch_memmove.S index e946061fd0..47c640caca 100644 --- a/libs/libc/machine/arm/armv8-m/gnu/arch_memmove.S +++ b/libs/libc/machine/arm/armv8-m/gnu/arch_memmove.S @@ -46,6 +46,8 @@ .global ARCH_LIBCFUN(memmove) .type ARCH_LIBCFUN(memmove), %function ARCH_LIBCFUN(memmove): + .cfi_sections .debug_frame + .cfi_startproc #if __ARM_FEATURE_PAC_DEFAULT # if __ARM_FEATURE_BTI_DEFAULT pacbti ip, lr, sp @@ -88,6 +90,7 @@ ARCH_LIBCFUN(memmove): aut ip, lr, sp #endif /* __ARM_FEATURE_PAC_DEFAULT */ bx lr + .cfi_endproc .size ARCH_LIBCFUN(memmove), . - ARCH_LIBCFUN(memmove) #endif diff --git a/libs/libc/machine/arm/armv8-m/gnu/arch_memset.S b/libs/libc/machine/arm/armv8-m/gnu/arch_memset.S index 424123b48c..7a232e60d9 100644 --- a/libs/libc/machine/arm/armv8-m/gnu/arch_memset.S +++ b/libs/libc/machine/arm/armv8-m/gnu/arch_memset.S @@ -72,6 +72,8 @@ .global ARCH_LIBCFUN(memset) .type ARCH_LIBCFUN(memset), %function ARCH_LIBCFUN(memset): + .cfi_sections .debug_frame + .cfi_startproc #if __ARM_FEATURE_PAC_DEFAULT # if __ARM_FEATURE_BTI_DEFAULT pacbti ip, lr, sp @@ -82,6 +84,7 @@ ARCH_LIBCFUN(memset): #ifdef __ARM_FEATURE_MVE vdup.8 q0, r1 mov r3, lr + .cfi_register lr,r3 mov r1, r0 wlstp.8 lr, r2, 2f 1: @@ -166,6 +169,7 @@ ARCH_LIBCFUN(memset): ldmfd sp!, {r0, r4-r7, pc} # endif /* __ARM_FEATURE_PAC_DEFAULT */ #endif + .cfi_endproc .size ARCH_LIBCFUN(memset), . - ARCH_LIBCFUN(memset) #endif