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

Side by Side Diff: runtime/lib/simd128.cc

Issue 88983004: Support Bigint parameters in Int32x4 constructor (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/bigint_operations.h » ('j') | runtime/vm/object.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/bootstrap_natives.h" 5 #include "vm/bootstrap_natives.h"
6 6
7 #include "vm/exceptions.h" 7 #include "vm/exceptions.h"
8 #include "vm/native_entry.h" 8 #include "vm/native_entry.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/symbols.h" 10 #include "vm/symbols.h"
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 } 399 }
400 400
401 401
402 DEFINE_NATIVE_ENTRY(Int32x4_fromInts, 5) { 402 DEFINE_NATIVE_ENTRY(Int32x4_fromInts, 5) {
403 ASSERT(AbstractTypeArguments::CheckedHandle( 403 ASSERT(AbstractTypeArguments::CheckedHandle(
404 arguments->NativeArgAt(0)).IsNull()); 404 arguments->NativeArgAt(0)).IsNull());
405 GET_NON_NULL_NATIVE_ARGUMENT(Integer, x, arguments->NativeArgAt(1)); 405 GET_NON_NULL_NATIVE_ARGUMENT(Integer, x, arguments->NativeArgAt(1));
406 GET_NON_NULL_NATIVE_ARGUMENT(Integer, y, arguments->NativeArgAt(2)); 406 GET_NON_NULL_NATIVE_ARGUMENT(Integer, y, arguments->NativeArgAt(2));
407 GET_NON_NULL_NATIVE_ARGUMENT(Integer, z, arguments->NativeArgAt(3)); 407 GET_NON_NULL_NATIVE_ARGUMENT(Integer, z, arguments->NativeArgAt(3));
408 GET_NON_NULL_NATIVE_ARGUMENT(Integer, w, arguments->NativeArgAt(4)); 408 GET_NON_NULL_NATIVE_ARGUMENT(Integer, w, arguments->NativeArgAt(4));
409 int32_t _x = static_cast<int32_t>(x.AsInt64Value() & 0xFFFFFFFF); 409 int32_t _x = static_cast<int32_t>(x.AsTruncatedUint32Value());
410 int32_t _y = static_cast<int32_t>(y.AsInt64Value() & 0xFFFFFFFF); 410 int32_t _y = static_cast<int32_t>(y.AsTruncatedUint32Value());
411 int32_t _z = static_cast<int32_t>(z.AsInt64Value() & 0xFFFFFFFF); 411 int32_t _z = static_cast<int32_t>(z.AsTruncatedUint32Value());
412 int32_t _w = static_cast<int32_t>(w.AsInt64Value() & 0xFFFFFFFF); 412 int32_t _w = static_cast<int32_t>(w.AsTruncatedUint32Value());
413 return Int32x4::New(_x, _y, _z, _w); 413 return Int32x4::New(_x, _y, _z, _w);
414 } 414 }
415 415
416 416
417 DEFINE_NATIVE_ENTRY(Int32x4_fromBools, 5) { 417 DEFINE_NATIVE_ENTRY(Int32x4_fromBools, 5) {
418 ASSERT(AbstractTypeArguments::CheckedHandle( 418 ASSERT(AbstractTypeArguments::CheckedHandle(
419 arguments->NativeArgAt(0)).IsNull()); 419 arguments->NativeArgAt(0)).IsNull());
420 GET_NON_NULL_NATIVE_ARGUMENT(Bool, x, arguments->NativeArgAt(1)); 420 GET_NON_NULL_NATIVE_ARGUMENT(Bool, x, arguments->NativeArgAt(1));
421 GET_NON_NULL_NATIVE_ARGUMENT(Bool, y, arguments->NativeArgAt(2)); 421 GET_NON_NULL_NATIVE_ARGUMENT(Bool, y, arguments->NativeArgAt(2));
422 GET_NON_NULL_NATIVE_ARGUMENT(Bool, z, arguments->NativeArgAt(3)); 422 GET_NON_NULL_NATIVE_ARGUMENT(Bool, z, arguments->NativeArgAt(3));
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 // Perform select. 702 // Perform select.
703 float32_int32 tempX((_maskX & tvx.u) | (~_maskX & fvx.u)); 703 float32_int32 tempX((_maskX & tvx.u) | (~_maskX & fvx.u));
704 float32_int32 tempY((_maskY & tvy.u) | (~_maskY & fvy.u)); 704 float32_int32 tempY((_maskY & tvy.u) | (~_maskY & fvy.u));
705 float32_int32 tempZ((_maskZ & tvz.u) | (~_maskZ & fvz.u)); 705 float32_int32 tempZ((_maskZ & tvz.u) | (~_maskZ & fvz.u));
706 float32_int32 tempW((_maskW & tvw.u) | (~_maskW & fvw.u)); 706 float32_int32 tempW((_maskW & tvw.u) | (~_maskW & fvw.u));
707 return Float32x4::New(tempX.f, tempY.f, tempZ.f, tempW.f); 707 return Float32x4::New(tempX.f, tempY.f, tempZ.f, tempW.f);
708 } 708 }
709 709
710 710
711 } // namespace dart 711 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/bigint_operations.h » ('j') | runtime/vm/object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698