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

Side by Side Diff: src/compiler/x64/instruction-selector-x64-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/x64/instruction-selector-x64.cc ('k') | src/ia32/macro-assembler-ia32.h » ('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
11 // ----------------------------------------------------------------------------- 11 // -----------------------------------------------------------------------------
12 // Conversions. 12 // Conversions.
13 13
14 14
15 TEST_F(InstructionSelectorTest, ChangeInt32ToInt64WithParameter) { 15 TEST_F(InstructionSelectorTest, ChangeInt32ToInt64WithParameter) {
16 StreamBuilder m(this, kMachInt64, kMachInt32); 16 StreamBuilder m(this, kMachInt64, kMachInt32);
17 m.Return(m.ChangeInt32ToInt64(m.Parameter(0))); 17 m.Return(m.ChangeInt32ToInt64(m.Parameter(0)));
18 Stream s = m.Build(); 18 Stream s = m.Build();
19 ASSERT_EQ(1U, s.size()); 19 ASSERT_EQ(1U, s.size());
20 EXPECT_EQ(kX64Movsxlq, s[0]->arch_opcode()); 20 EXPECT_EQ(kX64Movsxlq, s[0]->arch_opcode());
21 } 21 }
22 22
23 23
24 TEST_F(InstructionSelectorTest, ChangeUint32ToFloat64WithParameter) {
25 StreamBuilder m(this, kMachFloat64, kMachUint32);
26 m.Return(m.ChangeUint32ToFloat64(m.Parameter(0)));
27 Stream s = m.Build();
28 ASSERT_EQ(1U, s.size());
29 EXPECT_EQ(kSSEUint32ToFloat64, s[0]->arch_opcode());
30 }
31
32
24 TEST_F(InstructionSelectorTest, ChangeUint32ToUint64WithParameter) { 33 TEST_F(InstructionSelectorTest, ChangeUint32ToUint64WithParameter) {
25 StreamBuilder m(this, kMachUint64, kMachUint32); 34 StreamBuilder m(this, kMachUint64, kMachUint32);
26 m.Return(m.ChangeUint32ToUint64(m.Parameter(0))); 35 m.Return(m.ChangeUint32ToUint64(m.Parameter(0)));
27 Stream s = m.Build(); 36 Stream s = m.Build();
28 ASSERT_EQ(1U, s.size()); 37 ASSERT_EQ(1U, s.size());
29 EXPECT_EQ(kX64Movl, s[0]->arch_opcode()); 38 EXPECT_EQ(kX64Movl, s[0]->arch_opcode());
30 } 39 }
31 40
32 41
33 TEST_F(InstructionSelectorTest, TruncateInt64ToInt32WithParameter) { 42 TEST_F(InstructionSelectorTest, TruncateInt64ToInt32WithParameter) {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 } 111 }
103 112
104 113
105 INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, 114 INSTANTIATE_TEST_CASE_P(InstructionSelectorTest,
106 InstructionSelectorMemoryAccessTest, 115 InstructionSelectorMemoryAccessTest,
107 ::testing::ValuesIn(kMemoryAccesses)); 116 ::testing::ValuesIn(kMemoryAccesses));
108 117
109 } // namespace compiler 118 } // namespace compiler
110 } // namespace internal 119 } // namespace internal
111 } // namespace v8 120 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x64/instruction-selector-x64.cc ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698