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

Side by Side Diff: test/cctest/test-simd.cc

Issue 1241533004: Revert of Expose SIMD.Float32x4 type to Javascript. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « test/cctest/test-heap-profiler.cc ('k') | test/mjsunit/harmony/simd.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "src/v8.h"
6
7 #include "src/objects.h"
8 #include "src/ostreams.h"
9 #include "test/cctest/cctest.h"
10
11 using namespace v8::internal;
12
13
14 TEST(SameValue) {
15 CcTest::InitializeVM();
16 Isolate* isolate = CcTest::i_isolate();
17 Factory* factory = isolate->factory();
18
19 HandleScope sc(isolate);
20
21 float nan = std::numeric_limits<float>::quiet_NaN();
22
23 Handle<Float32x4> a = factory->NewFloat32x4(0, 0, 0, 0);
24 Handle<Float32x4> b = factory->NewFloat32x4(0, 0, 0, 0);
25 CHECK(a->SameValue(*b));
26 for (int i = 0; i < 4; i++) {
27 a->set_lane(i, nan);
28 CHECK(!a->SameValue(*b));
29 CHECK(!a->SameValueZero(*b));
30 b->set_lane(i, nan);
31 CHECK(a->SameValue(*b));
32 CHECK(a->SameValueZero(*b));
33 a->set_lane(i, -0.0);
34 CHECK(!a->SameValue(*b));
35 b->set_lane(i, 0);
36 CHECK(!a->SameValue(*b));
37 CHECK(a->SameValueZero(*b));
38 b->set_lane(i, -0.0);
39 CHECK(a->SameValue(*b));
40 CHECK(a->SameValueZero(*b));
41
42 a->set_lane(i, 0);
43 b->set_lane(i, 0);
44 }
45 }
OLDNEW
« no previous file with comments | « test/cctest/test-heap-profiler.cc ('k') | test/mjsunit/harmony/simd.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698