From 8e0a666f7840c745fcb9fe9d977a95c3d13ae246 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Thu, 17 Nov 2022 10:32:55 +0000 Subject: string: arm: Fix build failure asmdefs.h ifdef logic was wrong: arm only macro definitions were outside of defined(__arm__). Added some ifdef indentation to make the code more readable. --- string/asmdefs.h | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/string/asmdefs.h b/string/asmdefs.h index a814190..b4e5123 100644 --- a/string/asmdefs.h +++ b/string/asmdefs.h @@ -12,15 +12,12 @@ #define ARM_FNSTART .fnstart #if defined (IS_LEAF) -#define ARM_FNEND \ +# define ARM_FNEND \ .cantunwind \ .fnend #else -#define ARM_FNEND .fnend -# endif -#else -#define ARM_FNSTART -#define ARM_FNEND +# define ARM_FNEND .fnend +#endif /* Check whether leaf function PAC signing has been requested in the -mbranch-protect compile-time option. */ @@ -142,16 +139,16 @@ .endif .endif #if HAVE_PAC_LEAF -#if __ARM_FEATURE_BTI_DEFAULT +# if __ARM_FEATURE_BTI_DEFAULT pacbti ip, lr, sp -#else +# else pac ip, lr, sp -#endif /* __ARM_FEATURE_BTI_DEFAULT */ +# endif /* __ARM_FEATURE_BTI_DEFAULT */ .cfi_register 143, 12 #else -#if __ARM_FEATURE_BTI_DEFAULT +# if __ARM_FEATURE_BTI_DEFAULT bti -#endif /* __ARM_FEATURE_BTI_DEFAULT */ +# endif /* __ARM_FEATURE_BTI_DEFAULT */ #endif /* HAVE_PAC_LEAF */ .if \first != -1 .if \last != \first @@ -459,6 +456,11 @@ .endif .endm +#else /* !defined (__arm__) */ + +#define ARM_FNSTART +#define ARM_FNEND + #endif #if defined(__aarch64__) -- cgit v1.2.3