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

Side by Side Diff: test/cctest/compiler/test-run-machops.cc

Issue 1436943002: Implemented the RoundUint64ToFloat64 TurboFan operator for x64 and arm64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 | « src/x64/macro-assembler-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. Use of this 1 // Copyright 2014 the V8 project authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 // TODO(jochen): Remove this after the setting is turned on globally. 5 // TODO(jochen): Remove this after the setting is turned on globally.
6 #define V8_IMMINENT_DEPRECATION_WARNINGS 6 #define V8_IMMINENT_DEPRECATION_WARNINGS
7 7
8 #include <cmath> 8 #include <cmath>
9 #include <functional> 9 #include <functional>
10 #include <limits> 10 #include <limits>
(...skipping 5363 matching lines...) Expand 10 before | Expand all | Expand 10 after
5374 } 5374 }
5375 5375
5376 5376
5377 TEST(RunRoundInt64ToFloat64) { 5377 TEST(RunRoundInt64ToFloat64) {
5378 BufferedRawMachineAssemblerTester<double> m(kMachInt64); 5378 BufferedRawMachineAssemblerTester<double> m(kMachInt64);
5379 m.Return(m.RoundInt64ToFloat64(m.Parameter(0))); 5379 m.Return(m.RoundInt64ToFloat64(m.Parameter(0)));
5380 FOR_INT64_INPUTS(i) { CHECK_EQ(static_cast<double>(*i), m.Call(*i)); } 5380 FOR_INT64_INPUTS(i) { CHECK_EQ(static_cast<double>(*i), m.Call(*i)); }
5381 } 5381 }
5382 5382
5383 5383
5384 TEST(RunRoundUint64ToFloat64) {
5385 BufferedRawMachineAssemblerTester<double> m(kMachUint64);
5386 m.Return(m.RoundUint64ToFloat64(m.Parameter(0)));
5387 FOR_UINT64_INPUTS(i) { CHECK_EQ(static_cast<double>(*i), m.Call(*i)); }
5388 }
5389
5390
5384 #endif 5391 #endif
5385 5392
5386 5393
5387 TEST(RunBitcastFloat32ToInt32) { 5394 TEST(RunBitcastFloat32ToInt32) {
5388 float input = 32.25; 5395 float input = 32.25;
5389 RawMachineAssemblerTester<int32_t> m; 5396 RawMachineAssemblerTester<int32_t> m;
5390 m.Return(m.BitcastFloat32ToInt32(m.LoadFromPointer(&input, kMachFloat32))); 5397 m.Return(m.BitcastFloat32ToInt32(m.LoadFromPointer(&input, kMachFloat32)));
5391 FOR_FLOAT32_INPUTS(i) { 5398 FOR_FLOAT32_INPUTS(i) {
5392 input = *i; 5399 input = *i;
5393 int32_t expected = bit_cast<int32_t>(input); 5400 int32_t expected = bit_cast<int32_t>(input);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
5459 Node* call = r.AddNode(r.common()->Call(desc), phi); 5466 Node* call = r.AddNode(r.common()->Call(desc), phi);
5460 r.Return(call); 5467 r.Return(call);
5461 5468
5462 CHECK_EQ(33, r.Call(1)); 5469 CHECK_EQ(33, r.Call(1));
5463 CHECK_EQ(44, r.Call(0)); 5470 CHECK_EQ(44, r.Call(0));
5464 } 5471 }
5465 5472
5466 } // namespace compiler 5473 } // namespace compiler
5467 } // namespace internal 5474 } // namespace internal
5468 } // namespace v8 5475 } // namespace v8
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698