[PATCH] D19292: [PATCH] [Mips] [MSan] VarArgMIPS64Helper: Use target's endian, not host's.
Marcin KoĆcielnicki via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 19 16:52:48 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL266833: [Mips] [MSan] VarArgMIPS64Helper: Use target's endian, not host's. (authored by koriakin).
Changed prior to commit:
http://reviews.llvm.org/D19292?vs=54283&id=54293#toc
Repository:
rL LLVM
http://reviews.llvm.org/D19292
Files:
llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp
Index: llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+++ llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp
@@ -2965,15 +2965,16 @@
const DataLayout &DL = F.getParent()->getDataLayout();
for (CallSite::arg_iterator ArgIt = CS.arg_begin() + 1, End = CS.arg_end();
ArgIt != End; ++ArgIt) {
+ llvm::Triple TargetTriple(F.getParent()->getTargetTriple());
Value *A = *ArgIt;
Value *Base;
uint64_t ArgSize = DL.getTypeAllocSize(A->getType());
-#if defined(__MIPSEB__) || defined(MIPSEB)
- // Adjusting the shadow for argument with size < 8 to match the placement
- // of bits in big endian system
- if (ArgSize < 8)
- VAArgOffset += (8 - ArgSize);
-#endif
+ if (TargetTriple.getArch() == llvm::Triple::mips64) {
+ // Adjusting the shadow for argument with size < 8 to match the placement
+ // of bits in big endian system
+ if (ArgSize < 8)
+ VAArgOffset += (8 - ArgSize);
+ }
Base = getShadowPtrForVAArgument(A->getType(), IRB, VAArgOffset);
VAArgOffset += ArgSize;
VAArgOffset = alignTo(VAArgOffset, 8);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19292.54293.patch
Type: text/x-patch
Size: 1290 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160419/833d384a/attachment.bin>
More information about the llvm-commits
mailing list