ARM64: Add support for ARM BTI.

Note: this is not enabled by default, look for CET in lj_arch.h.
Thanks to Yuichiro Naito. #1398
This commit is contained in:
Mike Pall
2025-10-28 04:46:10 +01:00
parent e34a78acf6
commit 8651ef6df4
7 changed files with 124 additions and 3 deletions

View File

@@ -288,6 +288,11 @@
#if !defined(LJ_ABI_PAUTH) && defined(__arm64e__)
#define LJ_ABI_PAUTH 1
#endif
#if !defined(LJ_ABI_BRANCH_TRACK) && (__ARM_FEATURE_BTI_DEFAULT & 1) && \
defined(LUAJIT_ENABLE_CET_BR)
/* See comments about LUAJIT_ENABLE_CET_BR above. */
#define LJ_ABI_BRANCH_TRACK 1
#endif
#define LJ_TARGET_ARM64 1
#define LJ_TARGET_EHRETREG 0
#define LJ_TARGET_EHRAREG 30