[llvm] r243684 - Enable dfsan for aarch64
Adhemerval Zanella
adhemerval.zanella at linaro.org
Thu Jul 30 13:49:36 PDT 2015
Author: azanella
Date: Thu Jul 30 15:49:35 2015
New Revision: 243684
URL: http://llvm.org/viewvc/llvm-project?rev=243684&view=rev
Log:
Enable dfsan for aarch64
This patch enable DFSan memory transformation for aarch64 (39-bit VMA).
Modified:
llvm/trunk/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
Modified: llvm/trunk/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp?rev=243684&r1=243683&r2=243684&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp Thu Jul 30 15:49:35 2015
@@ -420,6 +420,8 @@ bool DataFlowSanitizer::doInitialization
bool IsX86_64 = TargetTriple.getArch() == llvm::Triple::x86_64;
bool IsMIPS64 = TargetTriple.getArch() == llvm::Triple::mips64 ||
TargetTriple.getArch() == llvm::Triple::mips64el;
+ bool IsAArch64 = TargetTriple.getArch() == llvm::Triple::aarch64 ||
+ TargetTriple.getArch() == llvm::Triple::aarch64_be;
const DataLayout &DL = M.getDataLayout();
@@ -434,6 +436,8 @@ bool DataFlowSanitizer::doInitialization
ShadowPtrMask = ConstantInt::getSigned(IntptrTy, ~0x700000000000LL);
else if (IsMIPS64)
ShadowPtrMask = ConstantInt::getSigned(IntptrTy, ~0xF000000000LL);
+ else if (IsAArch64)
+ ShadowPtrMask = ConstantInt::getSigned(IntptrTy, ~0x7800000000LL);
else
report_fatal_error("unsupported triple");
More information about the llvm-commits
mailing list