LLVM 22.0.0git
AArch64SLSHardening.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "aarch64-sls-hardening"
#define AARCH64_SLS_HARDENING_NAME   "AArch64 sls hardening pass"

Functions

static const ThunkKind * getThunkKind (unsigned OriginalOpcode)
static bool isBLR (const MachineInstr &MI)
static void insertSpeculationBarrier (const AArch64Subtarget *ST, MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, DebugLoc DL, bool AlwaysUseISBDSB=false)
static SmallString< 32 > createThunkName (const ThunkKind &Kind, Register Xn, Register Xm)
static std::tuple< const ThunkKind &, Register, RegisterparseThunkName (StringRef ThunkName)
 INITIALIZE_PASS (AArch64SLSHardening, "aarch64-sls-hardening", AARCH64_SLS_HARDENING_NAME, false, false) FunctionPass *llvm

Variables

static constexpr StringRef CommonNamePrefix = "__llvm_slsblr_thunk_"

Macro Definition Documentation

◆ AARCH64_SLS_HARDENING_NAME

#define AARCH64_SLS_HARDENING_NAME   "AArch64 sls hardening pass"

Definition at line 37 of file AArch64SLSHardening.cpp.

Referenced by INITIALIZE_PASS().

◆ DEBUG_TYPE

#define DEBUG_TYPE   "aarch64-sls-hardening"

Definition at line 35 of file AArch64SLSHardening.cpp.

Function Documentation

◆ createThunkName()

SmallString< 32 > createThunkName ( const ThunkKind & Kind,
Register Xn,
Register Xm )
static

Definition at line 279 of file AArch64SLSHardening.cpp.

References CommonNamePrefix, llvm::formatv(), and N.

◆ getThunkKind()

const ThunkKind * getThunkKind ( unsigned OriginalOpcode)
static

Definition at line 178 of file AArch64SLSHardening.cpp.

Referenced by isBLR().

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( AArch64SLSHardening ,
"aarch64-sls-hardening" ,
AARCH64_SLS_HARDENING_NAME ,
false ,
false  )

◆ insertSpeculationBarrier()

void insertSpeculationBarrier ( const AArch64Subtarget * ST,
MachineBasicBlock & MBB,
MachineBasicBlock::iterator MBBI,
DebugLoc DL,
bool AlwaysUseISBDSB = false )
static

Definition at line 221 of file AArch64SLSHardening.cpp.

References AlwaysUseISBDSB, assert(), llvm::BuildMI(), DL, MBB, MBBI, and TII.

Referenced by INITIALIZE_PASS().

◆ isBLR()

bool isBLR ( const MachineInstr & MI)
static

Definition at line 195 of file AArch64SLSHardening.cpp.

References getThunkKind(), and MI.

◆ parseThunkName()

Variable Documentation

◆ CommonNamePrefix

StringRef CommonNamePrefix = "__llvm_slsblr_thunk_"
staticconstexpr

Definition at line 45 of file AArch64SLSHardening.cpp.

Referenced by createThunkName(), and parseThunkName().