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

Unified Diff: runtime/platform/globals.h

Issue 148043003: Add Float64x2, Float64x2List, etc... with runtime and dart2js implementations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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
Index: runtime/platform/globals.h
diff --git a/runtime/platform/globals.h b/runtime/platform/globals.h
index 52adc16c79a292a586e918f525a852a65ddf28d3..b35c4f57e24fd1783d120216bed9b2d18b79b26f 100644
--- a/runtime/platform/globals.h
+++ b/runtime/platform/globals.h
@@ -76,6 +76,7 @@ struct simd128_value_t {
union {
float float_storage[4];
int32_t int_storage[4];
+ double double_storage[2];
};
simd128_value_t& readFrom(const float* v) {
float_storage[0] = v[0];
@@ -91,6 +92,11 @@ struct simd128_value_t {
int_storage[3] = v[3];
return *this;
}
+ simd128_value_t& readFrom(const double* v) {
+ double_storage[0] = v[0];
+ double_storage[1] = v[1];
+ return *this;
+ }
simd128_value_t& readFrom(const simd128_value_t* v) {
*this = *v;
return *this;
@@ -107,6 +113,10 @@ struct simd128_value_t {
v[2] = int_storage[2];
v[3] = int_storage[3];
}
+ void writeTo(double* v) {
+ v[0] = double_storage[0];
+ v[1] = double_storage[1];
+ }
void writeTo(simd128_value_t* v) {
*v = *this;
}

Powered by Google App Engine
This is Rietveld 408576698