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

Unified Diff: runtime/lib/simd128.cc

Issue 23018009: Add add and subtract operations to Uint32x4 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 | runtime/lib/typed_data.dart » ('j') | runtime/lib/typed_data.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/simd128.cc
diff --git a/runtime/lib/simd128.cc b/runtime/lib/simd128.cc
index 9b7941269876e1c20485377cdce769d4e84da09e..d786733f8d62951d3a3ae3115958336a06b0b4c3 100644
--- a/runtime/lib/simd128.cc
+++ b/runtime/lib/simd128.cc
@@ -471,6 +471,28 @@ DEFINE_NATIVE_ENTRY(Uint32x4_xor, 2) {
}
+DEFINE_NATIVE_ENTRY(Uint32x4_add, 2) {
+ GET_NON_NULL_NATIVE_ARGUMENT(Uint32x4, self, arguments->NativeArgAt(0));
+ GET_NON_NULL_NATIVE_ARGUMENT(Uint32x4, other, arguments->NativeArgAt(1));
+ uint32_t _x = self.x() + other.x();
+ uint32_t _y = self.y() + other.y();
+ uint32_t _z = self.z() + other.z();
+ uint32_t _w = self.w() + other.w();
+ return Uint32x4::New(_x, _y, _z, _w);
+}
+
+
+DEFINE_NATIVE_ENTRY(Uint32x4_sub, 2) {
+ GET_NON_NULL_NATIVE_ARGUMENT(Uint32x4, self, arguments->NativeArgAt(0));
+ GET_NON_NULL_NATIVE_ARGUMENT(Uint32x4, other, arguments->NativeArgAt(1));
+ uint32_t _x = self.x() - other.x();
+ uint32_t _y = self.y() - other.y();
+ uint32_t _z = self.z() - other.z();
+ uint32_t _w = self.w() - other.w();
+ return Uint32x4::New(_x, _y, _z, _w);
+}
+
+
DEFINE_NATIVE_ENTRY(Uint32x4_getX, 1) {
GET_NON_NULL_NATIVE_ARGUMENT(Uint32x4, self, arguments->NativeArgAt(0));
uint32_t value = self.x();
« no previous file with comments | « no previous file | runtime/lib/typed_data.dart » ('j') | runtime/lib/typed_data.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698