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

Unified Diff: runtime/vm/raw_object.h

Issue 2067443004: Fix struct alignment for SIMD objects. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object.h
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 518b0274d127508404f81076410d6d8c555ee358..8f6f624160be228c177535c1b1b0afae06aad9e0 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -1996,7 +1996,7 @@ class RawLinkedHashMap : public RawInstance {
class RawFloat32x4 : public RawInstance {
RAW_HEAP_OBJECT_IMPLEMENTATION(Float32x4);
- float value_[4];
+ ALIGN8 float value_[4];
friend class SnapshotReader;
public:
@@ -2005,12 +2005,13 @@ class RawFloat32x4 : public RawInstance {
float z() const { return value_[2]; }
float w() const { return value_[3]; }
};
+COMPILE_ASSERT(sizeof(RawFloat32x4) == 24);
class RawInt32x4 : public RawInstance {
RAW_HEAP_OBJECT_IMPLEMENTATION(Int32x4);
- int32_t value_[4];
+ ALIGN8 int32_t value_[4];
friend class SnapshotReader;
public:
@@ -2019,18 +2020,20 @@ class RawInt32x4 : public RawInstance {
int32_t z() const { return value_[2]; }
int32_t w() const { return value_[3]; }
};
+COMPILE_ASSERT(sizeof(RawInt32x4) == 24);
class RawFloat64x2 : public RawInstance {
RAW_HEAP_OBJECT_IMPLEMENTATION(Float64x2);
- double value_[2];
+ ALIGN8 double value_[2];
friend class SnapshotReader;
public:
double x() const { return value_[0]; }
double y() const { return value_[1]; }
};
+COMPILE_ASSERT(sizeof(RawFloat64x2) == 24);
// Define an aliases for intptr_t.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698