diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2015-07-30 20:49:35 +0000 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2015-07-30 20:49:35 +0000 |
commit | bfe1eaf0fe255eae44fa6ac041ee3e9889115c1e (patch) | |
tree | 8904aefaf99394ea21fa79b4dad1baefa213f81e /llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp | |
parent | 7ed10b84cca123a20dfdd7ac36eaf9c1c336ac0f (diff) | |
download | bcm5719-llvm-bfe1eaf0fe255eae44fa6ac041ee3e9889115c1e.tar.gz bcm5719-llvm-bfe1eaf0fe255eae44fa6ac041ee3e9889115c1e.zip |
Enable dfsan for aarch64
This patch enable DFSan memory transformation for aarch64 (39-bit VMA).
llvm-svn: 243684
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp index 2de6e1afaba..8344e087a95 100644 --- a/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp @@ -420,6 +420,8 @@ bool DataFlowSanitizer::doInitialization(Module &M) { 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(Module &M) { 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"); |