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

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

Issue 2493173002: [turbofan] Fix more -Wsign-compare warnings. (Closed)
Patch Set: rebase Created 4 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
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 #include <cmath> 5 #include <cmath>
6 #include <functional> 6 #include <functional>
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/ieee754.h" 10 #include "src/base/ieee754.h"
(...skipping 6341 matching lines...) Expand 10 before | Expand all | Expand 10 after
6352 BufferedRawMachineAssemblerTester<int64_t> m(MachineType::Float64()); 6352 BufferedRawMachineAssemblerTester<int64_t> m(MachineType::Float64());
6353 Node* trunc = m.TryTruncateFloat64ToUint64(m.Parameter(0)); 6353 Node* trunc = m.TryTruncateFloat64ToUint64(m.Parameter(0));
6354 Node* val = m.Projection(0, trunc); 6354 Node* val = m.Projection(0, trunc);
6355 Node* check = m.Projection(1, trunc); 6355 Node* check = m.Projection(1, trunc);
6356 m.StoreToPointer(&success, MachineRepresentation::kWord64, check); 6356 m.StoreToPointer(&success, MachineRepresentation::kWord64, check);
6357 m.Return(val); 6357 m.Return(val);
6358 6358
6359 FOR_FLOAT64_INPUTS(i) { 6359 FOR_FLOAT64_INPUTS(i) {
6360 if (*i < 18446744073709551616.0 && *i > -1) { 6360 if (*i < 18446744073709551616.0 && *i > -1) {
6361 // Conversions within this range should succeed. 6361 // Conversions within this range should succeed.
6362 CHECK_EQ(static_cast<uint64_t>(*i), m.Call(*i)); 6362 CHECK_EQ(static_cast<uint64_t>(*i), static_cast<uint64_t>(m.Call(*i)));
6363 CHECK_NE(0, success); 6363 CHECK_NE(0, success);
6364 } else { 6364 } else {
6365 m.Call(*i); 6365 m.Call(*i);
6366 CHECK_EQ(0, success); 6366 CHECK_EQ(0, success);
6367 } 6367 }
6368 } 6368 }
6369 } 6369 }
6370 6370
6371 6371
6372 TEST(RunRoundInt64ToFloat32) { 6372 TEST(RunRoundInt64ToFloat32) {
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
6681 r.Goto(&merge); 6681 r.Goto(&merge);
6682 r.Bind(&merge); 6682 r.Bind(&merge);
6683 Node* phi = r.Phi(MachineRepresentation::kWord32, fa, fb); 6683 Node* phi = r.Phi(MachineRepresentation::kWord32, fa, fb);
6684 r.Return(phi); 6684 r.Return(phi);
6685 CHECK_EQ(1, r.Call(1)); 6685 CHECK_EQ(1, r.Call(1));
6686 } 6686 }
6687 6687
6688 } // namespace compiler 6688 } // namespace compiler
6689 } // namespace internal 6689 } // namespace internal
6690 } // namespace v8 6690 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-run-load-store.cc ('k') | test/cctest/compiler/test-run-wasm-machops.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698