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

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 9e27506dd2b77ee001cd26958b8115a8b7753345..ef7cd0178906b06745073455271decf57dc8d4e0 100644
--- a/runtime/platform/globals.h
+++ b/runtime/platform/globals.h
@@ -89,6 +89,14 @@ struct simd128_value_t {
storage[3] = vv[3];
return *this;
}
+ simd128_value_t& readFrom(const double* v) {
+ const float* vv = reinterpret_cast<const float*>(v);
+ storage[0] = vv[0];
+ storage[1] = vv[1];
+ storage[2] = vv[2];
+ storage[3] = vv[3];
+ return *this;
+ }
simd128_value_t& readFrom(const simd128_value_t* v) {
*this = *v;
return *this;
@@ -106,6 +114,13 @@ struct simd128_value_t {
vv[2] = storage[2];
vv[3] = storage[3];
}
+ void writeTo(double* v) {
+ float* vv = reinterpret_cast<float*>(v);
+ vv[0] = storage[0];
+ vv[1] = storage[1];
+ vv[2] = storage[2];
+ vv[3] = storage[3];
+ }
void writeTo(simd128_value_t* v) {
*v = *this;
}

Powered by Google App Engine
This is Rietveld 408576698