Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Unified Diff: src/heap/heap.cc

Issue 1159453004: Add SIMD 128 alignment support to Heap. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Only mark aligned object memory as MSAN uninitialized. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/globals.h ('k') | src/heap/spaces-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index ff9cc5b46b4cf1be4cb8eb636021ef1b00922d64..9e684927a86b862372c3d9a47b6c48bdfee11a02 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -1995,6 +1995,8 @@ int Heap::GetMaximumFillToAlign(AllocationAlignment alignment) {
case kDoubleAligned:
case kDoubleUnaligned:
return kDoubleSize - kPointerSize;
+ case kSimd128Unaligned:
+ return kSimd128Size - kPointerSize;
default:
UNREACHABLE();
}
@@ -2008,6 +2010,10 @@ int Heap::GetFillToAlign(Address address, AllocationAlignment alignment) {
return kPointerSize;
if (alignment == kDoubleUnaligned && (offset & kDoubleAlignmentMask) == 0)
return kDoubleSize - kPointerSize; // No fill if double is always aligned.
+ if (alignment == kSimd128Unaligned) {
+ return (kSimd128Size - (static_cast<int>(offset) + kPointerSize)) &
+ kSimd128AlignmentMask;
+ }
return 0;
}
« no previous file with comments | « src/globals.h ('k') | src/heap/spaces-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698