aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Do Nascimento <Victor.DoNascimento@arm.com>2022-06-22 14:56:00 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2022-06-22 14:56:23 +0100
commit40b662ce7b65d5eaefa40fd8046d6f3c6b3238c1 (patch)
tree106dff8d4976435bb2aafd372965b88e55cafe87
parentca02337e93b28f6a9442f479ee019d553996fbd1 (diff)
downloadarm-optimized-routines-40b662ce7b65d5eaefa40fd8046d6f3c6b3238c1.tar.gz
string: add .fnstart and .fnend directives to ENTRY/END macros
Modify the ENTRY_ALIGN and END assembler macros to mark the start and end of functions for arm unwind tables. Enables the pacbti epilogue function to emit .save{} directives for stack unwinding.
-rw-r--r--string/asmdefs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/string/asmdefs.h b/string/asmdefs.h
index 0d6ebd7..e84626f 100644
--- a/string/asmdefs.h
+++ b/string/asmdefs.h
@@ -8,6 +8,11 @@
#ifndef _ASMDEFS_H
#define _ASMDEFS_H
+#if defined (__arm__)
+#define ARM_FNSTART .fnstart
+#define ARM_FNEND .fnend
+#endif
+
#if defined(__aarch64__)
/* Branch Target Identitication support. */
@@ -52,6 +57,7 @@ GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI|FEATURE_1_PAC)
.type name,%function; \
.align alignment; \
name: \
+ ARM_FNSTART; \
.cfi_startproc; \
BTI_C;
@@ -64,6 +70,7 @@ GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI|FEATURE_1_PAC)
.type name,%function; \
.align alignment; \
name: \
+ ARM_FNSTART; \
.cfi_startproc;
#endif
@@ -77,6 +84,7 @@ GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI|FEATURE_1_PAC)
#define END(name) \
.cfi_endproc; \
+ ARM_FNEND; \
.size name, .-name;
#define L(l) .L ## l