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

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

Issue 1458423002: [turbofan] Renamed the ChangeFloat64ToInt64 operator to TruncateFloat64ToInt64. (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/compiler/x64/instruction-selector-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 5335 matching lines...) Expand 10 before | Expand all | Expand 10 after
5346 5346
5347 5347
5348 TEST(RunBitcastFloat64ToInt64) { 5348 TEST(RunBitcastFloat64ToInt64) {
5349 BufferedRawMachineAssemblerTester<int64_t> m(kMachFloat64); 5349 BufferedRawMachineAssemblerTester<int64_t> m(kMachFloat64);
5350 5350
5351 m.Return(m.BitcastFloat64ToInt64(m.Parameter(0))); 5351 m.Return(m.BitcastFloat64ToInt64(m.Parameter(0)));
5352 FOR_FLOAT64_INPUTS(i) { CHECK_EQ(bit_cast<int64_t>(*i), m.Call(*i)); } 5352 FOR_FLOAT64_INPUTS(i) { CHECK_EQ(bit_cast<int64_t>(*i), m.Call(*i)); }
5353 } 5353 }
5354 5354
5355 5355
5356 TEST(RunChangeFloat64ToInt64) { 5356 TEST(RunTruncateFloat64ToInt64) {
5357 BufferedRawMachineAssemblerTester<int64_t> m(kMachFloat64); 5357 BufferedRawMachineAssemblerTester<int64_t> m(kMachFloat64);
5358 m.Return(m.ChangeFloat64ToInt64(m.Parameter(0))); 5358 m.Return(m.TruncateFloat64ToInt64(m.Parameter(0)));
5359 5359
5360 FOR_INT64_INPUTS(i) { 5360 FOR_INT64_INPUTS(i) {
5361 double input = static_cast<double>(*i); 5361 double input = static_cast<double>(*i);
5362 CHECK_EQ(static_cast<int64_t>(input), m.Call(input)); 5362 CHECK_EQ(static_cast<int64_t>(input), m.Call(input));
5363 } 5363 }
5364 } 5364 }
5365 5365
5366 5366
5367 TEST(RunTruncateFloat64ToUint64) { 5367 TEST(RunTruncateFloat64ToUint64) {
5368 BufferedRawMachineAssemblerTester<uint64_t> m(kMachFloat64); 5368 BufferedRawMachineAssemblerTester<uint64_t> m(kMachFloat64);
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
5655 Node* call = r.AddNode(r.common()->Call(desc), phi); 5655 Node* call = r.AddNode(r.common()->Call(desc), phi);
5656 r.Return(call); 5656 r.Return(call);
5657 5657
5658 CHECK_EQ(33, r.Call(1)); 5658 CHECK_EQ(33, r.Call(1));
5659 CHECK_EQ(44, r.Call(0)); 5659 CHECK_EQ(44, r.Call(0));
5660 } 5660 }
5661 5661
5662 } // namespace compiler 5662 } // namespace compiler
5663 } // namespace internal 5663 } // namespace internal
5664 } // namespace v8 5664 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x64/instruction-selector-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698