Skip to content

Commit

Permalink
Revert "aarch64: Removed BTI macro from ASM ENTRY unless HAVE_AARCH64…
Browse files Browse the repository at this point in the history
…_BTI"

This reverts commit 07ea389.
  • Loading branch information
NaohiroTamura committed Apr 15, 2021
1 parent c204a74 commit 0f45fff
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions sysdeps/aarch64/sysdep.h
Expand Up @@ -97,7 +97,6 @@ GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI)
#endif

/* Define an entry point visible from C. */
#if HAVE_AARCH64_BTI
#define ENTRY(name) \
.globl C_SYMBOL_NAME(name); \
.type C_SYMBOL_NAME(name),%function; \
Expand All @@ -106,18 +105,8 @@ GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI)
cfi_startproc; \
BTI_C; \
CALL_MCOUNT
#else
#define ENTRY(name) \
.globl C_SYMBOL_NAME(name); \
.type C_SYMBOL_NAME(name),%function; \
.p2align 6; \
C_LABEL(name) \
cfi_startproc; \
CALL_MCOUNT
#endif

/* Define an entry point visible from C. */
#if HAVE_AARCH64_BTI
#define ENTRY_ALIGN(name, align) \
.globl C_SYMBOL_NAME(name); \
.type C_SYMBOL_NAME(name),%function; \
Expand All @@ -126,22 +115,12 @@ GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI)
cfi_startproc; \
BTI_C; \
CALL_MCOUNT
#else
#define ENTRY_ALIGN(name, align) \
.globl C_SYMBOL_NAME(name); \
.type C_SYMBOL_NAME(name),%function; \
.p2align align; \
C_LABEL(name) \
cfi_startproc; \
CALL_MCOUNT
#endif

/* Define an entry point visible from C with a specified alignment and
pre-padding with NOPs. This can be used to ensure that a critical
loop within a function is cache line aligned. Note this version
does not adjust the padding if CALL_MCOUNT is defined. */

#if HAVE_AARCH64_BTI
#define ENTRY_ALIGN_AND_PAD(name, align, padding) \
.globl C_SYMBOL_NAME(name); \
.type C_SYMBOL_NAME(name),%function; \
Expand All @@ -153,18 +132,6 @@ GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI)
cfi_startproc; \
BTI_C; \
CALL_MCOUNT
#else
#define ENTRY_ALIGN_AND_PAD(name, align, padding) \
.globl C_SYMBOL_NAME(name); \
.type C_SYMBOL_NAME(name),%function; \
.p2align align; \
.rep padding - 1; /* -1 for bti c. */ \
nop; \
.endr; \
C_LABEL(name) \
cfi_startproc; \
CALL_MCOUNT
#endif

#undef END
#define END(name) \
Expand Down

0 comments on commit 0f45fff

Please sign in to comment.