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

Side by Side Diff: test/unittests/compiler/arm64/instruction-selector-arm64-unittest.cc

Issue 1131573006: ARM64: Enable shorten-64-to-32 warning (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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-utils-arm64.h ('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. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "test/unittests/compiler/instruction-selector-unittest.h" 5 #include "test/unittests/compiler/instruction-selector-unittest.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 namespace compiler { 9 namespace compiler {
10 10
(...skipping 29 matching lines...) Expand all
40 return os << shift.mi; 40 return os << shift.mi;
41 } 41 }
42 42
43 43
44 // Helper to build Int32Constant or Int64Constant depending on the given 44 // Helper to build Int32Constant or Int64Constant depending on the given
45 // machine type. 45 // machine type.
46 Node* BuildConstant(InstructionSelectorTest::StreamBuilder& m, MachineType type, 46 Node* BuildConstant(InstructionSelectorTest::StreamBuilder& m, MachineType type,
47 int64_t value) { 47 int64_t value) {
48 switch (type) { 48 switch (type) {
49 case kMachInt32: 49 case kMachInt32:
50 return m.Int32Constant(value); 50 return m.Int32Constant(static_cast<int32_t>(value));
51 break; 51 break;
52 52
53 case kMachInt64: 53 case kMachInt64:
54 return m.Int64Constant(value); 54 return m.Int64Constant(value);
55 break; 55 break;
56 56
57 default: 57 default:
58 UNIMPLEMENTED(); 58 UNIMPLEMENTED();
59 } 59 }
60 return NULL; 60 return NULL;
(...skipping 2423 matching lines...) Expand 10 before | Expand all | Expand 10 after
2484 EXPECT_EQ(kArm64Float64Neg, s[0]->arch_opcode()); 2484 EXPECT_EQ(kArm64Float64Neg, s[0]->arch_opcode());
2485 ASSERT_EQ(1U, s[0]->InputCount()); 2485 ASSERT_EQ(1U, s[0]->InputCount());
2486 EXPECT_EQ(s.ToVreg(p0), s.ToVreg(s[0]->InputAt(0))); 2486 EXPECT_EQ(s.ToVreg(p0), s.ToVreg(s[0]->InputAt(0)));
2487 ASSERT_EQ(1U, s[0]->OutputCount()); 2487 ASSERT_EQ(1U, s[0]->OutputCount());
2488 EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output())); 2488 EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output()));
2489 } 2489 }
2490 2490
2491 } // namespace compiler 2491 } // namespace compiler
2492 } // namespace internal 2492 } // namespace internal
2493 } // namespace v8 2493 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/test-utils-arm64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698