[llvm] [hwasan] Add intrinsics for fixed shadow on Aarch64 (PR #89319)
Thurston Dang via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 18 16:46:53 PDT 2024
================
@@ -551,8 +553,18 @@ void AArch64AsmPrinter::LowerKCFI_CHECK(const MachineInstr &MI) {
void AArch64AsmPrinter::LowerHWASAN_CHECK_MEMACCESS(const MachineInstr &MI) {
Register Reg = MI.getOperand(0).getReg();
bool IsShort =
- MI.getOpcode() == AArch64::HWASAN_CHECK_MEMACCESS_SHORTGRANULES;
+ ((MI.getOpcode() == AArch64::HWASAN_CHECK_MEMACCESS_SHORTGRANULES) ||
+ (MI.getOpcode() ==
+ AArch64::HWASAN_CHECK_MEMACCESS_SHORTGRANULES_FIXEDSHADOW));
uint32_t AccessInfo = MI.getOperand(1).getImm();
+
+ if ((MI.getOpcode() == AArch64::HWASAN_CHECK_MEMACCESS_FIXEDSHADOW) ||
----------------
thurstond wrote:
> optional: we can make this the condition for L641 below, that would maybe be a bit less indirect?
Done
> getFixedShadowBase().value_or(0) as fallback is LGTM
Done.
Thanks Florian and Vitaly!
https://github.com/llvm/llvm-project/pull/89319
More information about the llvm-commits
mailing list