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

Side by Side Diff: src/compiler/ia32/instruction-selector-ia32-unittest.cc

Issue 583963002: [turbofan] IA: Uint32ToFloat64 supports mem operand. (Closed) Base URL: https://github.com/v8/v8.git@bleeding_edge
Patch Set: Add tests Created 6 years, 2 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 | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/compiler/x64/code-generator-x64.cc » ('j') | 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 "src/compiler/instruction-selector-unittest.h" 5 #include "src/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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 Stream s = m.Build(); 68 Stream s = m.Build();
69 ASSERT_EQ(1U, s.size()); 69 ASSERT_EQ(1U, s.size());
70 EXPECT_EQ(kIA32Sub, s[0]->arch_opcode()); 70 EXPECT_EQ(kIA32Sub, s[0]->arch_opcode());
71 ASSERT_EQ(2U, s[0]->InputCount()); 71 ASSERT_EQ(2U, s[0]->InputCount());
72 EXPECT_EQ(imm, s.ToInt32(s[0]->InputAt(1))); 72 EXPECT_EQ(imm, s.ToInt32(s[0]->InputAt(1)));
73 } 73 }
74 } 74 }
75 75
76 76
77 // ----------------------------------------------------------------------------- 77 // -----------------------------------------------------------------------------
78 // Conversions.
79
80 TEST_F(InstructionSelectorTest, ChangeUint32ToFloat64WithParameter) {
81 StreamBuilder m(this, kMachFloat64, kMachUint32);
82 m.Return(m.ChangeUint32ToFloat64(m.Parameter(0)));
83 Stream s = m.Build();
84 ASSERT_EQ(1U, s.size());
85 EXPECT_EQ(kSSEUint32ToFloat64, s[0]->arch_opcode());
86 }
87
88
89 // -----------------------------------------------------------------------------
78 // Loads and stores 90 // Loads and stores
79 91
80 namespace { 92 namespace {
81 93
82 struct MemoryAccess { 94 struct MemoryAccess {
83 MachineType type; 95 MachineType type;
84 ArchOpcode load_opcode; 96 ArchOpcode load_opcode;
85 ArchOpcode store_opcode; 97 ArchOpcode store_opcode;
86 }; 98 };
87 99
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 } 214 }
203 215
204 216
205 INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, 217 INSTANTIATE_TEST_CASE_P(InstructionSelectorTest,
206 InstructionSelectorMemoryAccessTest, 218 InstructionSelectorMemoryAccessTest,
207 ::testing::ValuesIn(kMemoryAccesses)); 219 ::testing::ValuesIn(kMemoryAccesses));
208 220
209 } // namespace compiler 221 } // namespace compiler
210 } // namespace internal 222 } // namespace internal
211 } // namespace v8 223 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/compiler/x64/code-generator-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698