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

Unified Diff: src/globals.h

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 | « no previous file | src/heap/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/globals.h
diff --git a/src/globals.h b/src/globals.h
index 7fdcc26cea74de84912a03291a9ce9b4b1015b98..c73f395cb6808672ffc19863112facb8c32c4752 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -197,6 +197,8 @@ typedef int32_t uc32;
const int kOneByteSize = kCharSize;
const int kUC16Size = sizeof(uc16); // NOLINT
+// 128 bit SIMD value size.
+const int kSimd128Size = 16;
// Round up n to be a multiple of sz, where sz is a power of 2.
#define ROUND_UP(n, sz) (((n) + ((sz) - 1)) & ~((sz) - 1))
@@ -309,6 +311,10 @@ const intptr_t kPointerAlignmentMask = kPointerAlignment - 1;
const intptr_t kDoubleAlignment = 8;
const intptr_t kDoubleAlignmentMask = kDoubleAlignment - 1;
+// Desired alignment for 128 bit SIMD values.
+const intptr_t kSimd128Alignment = 16;
+const intptr_t kSimd128AlignmentMask = kSimd128Alignment - 1;
+
// Desired alignment for generated code is 32 bytes (to improve cache line
// utilization).
const int kCodeAlignmentBits = 5;
@@ -449,7 +455,12 @@ enum AllocationSpace {
const int kSpaceTagSize = 3;
const int kSpaceTagMask = (1 << kSpaceTagSize) - 1;
-enum AllocationAlignment { kWordAligned, kDoubleAligned, kDoubleUnaligned };
+enum AllocationAlignment {
+ kWordAligned,
+ kDoubleAligned,
+ kDoubleUnaligned,
+ kSimd128Unaligned
+};
// A flag that indicates whether objects should be pretenured when
// allocated (allocated directly into the old generation) or not
« no previous file with comments | « no previous file | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698