diff options
author | Naohiro Tamura <naohirot@jp.fujitsu.com> | 2021-05-12 09:27:20 +0000 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2021-05-26 12:01:06 +0100 |
commit | bd4317fbd60a0fa416761aaafb4e32ca1ad22d38 (patch) | |
tree | ab8272bb217557cda99574502364bcb5e6e520fc /sysdeps/aarch64 | |
parent | 77d175e14e5f4cf24e9579c03eef5d006a286316 (diff) | |
download | glibc-bd4317fbd60a0fa416761aaafb4e32ca1ad22d38.tar glibc-bd4317fbd60a0fa416761aaafb4e32ca1ad22d38.tar.gz glibc-bd4317fbd60a0fa416761aaafb4e32ca1ad22d38.tar.bz2 glibc-bd4317fbd60a0fa416761aaafb4e32ca1ad22d38.zip |
aarch64: define BTI_C and BTI_J macros as NOP unless HAVE_AARCH64_BTI
This patch defines BTI_C and BTI_J macros conditionally for
performance.
If HAVE_AARCH64_BTI is true, BTI_C and BTI_J are defined as HINT
instruction for ARMv8.5 BTI (Branch Target Identification).
If HAVE_AARCH64_BTI is false, both BTI_C and BTI_J are defined as
NOP.
Diffstat (limited to 'sysdeps/aarch64')
-rw-r--r-- | sysdeps/aarch64/sysdep.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sysdeps/aarch64/sysdep.h b/sysdeps/aarch64/sysdep.h index 90acca4e42..b936e29cbd 100644 --- a/sysdeps/aarch64/sysdep.h +++ b/sysdeps/aarch64/sysdep.h @@ -62,8 +62,13 @@ strip_pac (void *p) #define ASM_SIZE_DIRECTIVE(name) .size name,.-name /* Branch Target Identitication support. */ -#define BTI_C hint 34 -#define BTI_J hint 36 +#if HAVE_AARCH64_BTI +# define BTI_C hint 34 +# define BTI_J hint 36 +#else +# define BTI_C nop +# define BTI_J nop +#endif /* Return address signing support (pac-ret). */ #define PACIASP hint 25 |