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

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

Issue 1456543003: Fix gcc 4.9.2 signed-compare error. (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 | « no previous file | 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 5441 matching lines...) Expand 10 before | Expand all | Expand 10 after
5452 {0x3ffffffffff, 0x428ffffffffff800}, 5452 {0x3ffffffffff, 0x428ffffffffff800},
5453 {0x1ffffffffff, 0x427ffffffffff000}, 5453 {0x1ffffffffff, 0x427ffffffffff000},
5454 {0x8000008000000000, 0x43e0000010000000}, 5454 {0x8000008000000000, 0x43e0000010000000},
5455 {0x8000008000000001, 0x43e0000010000000}, 5455 {0x8000008000000001, 0x43e0000010000000},
5456 {0x8000000000000400, 0x43e0000000000000}, 5456 {0x8000000000000400, 0x43e0000000000000},
5457 {0x8000000000000401, 0x43e0000000000001}}; 5457 {0x8000000000000401, 0x43e0000000000001}};
5458 5458
5459 BufferedRawMachineAssemblerTester<double> m(kMachUint64); 5459 BufferedRawMachineAssemblerTester<double> m(kMachUint64);
5460 m.Return(m.RoundUint64ToFloat64(m.Parameter(0))); 5460 m.Return(m.RoundUint64ToFloat64(m.Parameter(0)));
5461 5461
5462 for (int i = 0; i < arraysize(values); i++) { 5462 for (size_t i = 0; i < arraysize(values); i++) {
5463 CHECK_EQ(bit_cast<double>(values[i].expected), m.Call(values[i].input)); 5463 CHECK_EQ(bit_cast<double>(values[i].expected), m.Call(values[i].input));
5464 } 5464 }
5465 } 5465 }
5466 5466
5467 5467
5468 TEST(RunRoundUint64ToFloat32) { 5468 TEST(RunRoundUint64ToFloat32) {
5469 struct { 5469 struct {
5470 uint64_t input; 5470 uint64_t input;
5471 uint32_t expected; 5471 uint32_t expected;
5472 } values[] = {{0x0, 0x0}, 5472 } values[] = {{0x0, 0x0},
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
5542 {0x3ffffffffff, 0x54800000}, 5542 {0x3ffffffffff, 0x54800000},
5543 {0x1ffffffffff, 0x54000000}, 5543 {0x1ffffffffff, 0x54000000},
5544 {0x8000008000000000, 0x5f000000}, 5544 {0x8000008000000000, 0x5f000000},
5545 {0x8000008000000001, 0x5f000001}, 5545 {0x8000008000000001, 0x5f000001},
5546 {0x8000000000000400, 0x5f000000}, 5546 {0x8000000000000400, 0x5f000000},
5547 {0x8000000000000401, 0x5f000000}}; 5547 {0x8000000000000401, 0x5f000000}};
5548 5548
5549 BufferedRawMachineAssemblerTester<float> m(kMachUint64); 5549 BufferedRawMachineAssemblerTester<float> m(kMachUint64);
5550 m.Return(m.RoundUint64ToFloat32(m.Parameter(0))); 5550 m.Return(m.RoundUint64ToFloat32(m.Parameter(0)));
5551 5551
5552 for (int i = 0; i < arraysize(values); i++) { 5552 for (size_t i = 0; i < arraysize(values); i++) {
5553 CHECK_EQ(bit_cast<float>(values[i].expected), m.Call(values[i].input)); 5553 CHECK_EQ(bit_cast<float>(values[i].expected), m.Call(values[i].input));
5554 } 5554 }
5555 } 5555 }
5556 5556
5557 5557
5558 #endif 5558 #endif
5559 5559
5560 5560
5561 TEST(RunBitcastFloat32ToInt32) { 5561 TEST(RunBitcastFloat32ToInt32) {
5562 float input = 32.25; 5562 float input = 32.25;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
5633 Node* call = r.AddNode(r.common()->Call(desc), phi); 5633 Node* call = r.AddNode(r.common()->Call(desc), phi);
5634 r.Return(call); 5634 r.Return(call);
5635 5635
5636 CHECK_EQ(33, r.Call(1)); 5636 CHECK_EQ(33, r.Call(1));
5637 CHECK_EQ(44, r.Call(0)); 5637 CHECK_EQ(44, r.Call(0));
5638 } 5638 }
5639 5639
5640 } // namespace compiler 5640 } // namespace compiler
5641 } // namespace internal 5641 } // namespace internal
5642 } // namespace v8 5642 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698