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

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

Issue 1685183003: [turbofan] Fix a bug in the RawMachineAssembler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixes one ARM unit test. Created 4 years, 10 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/raw-machine-assembler.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 <limits> 5 #include <limits>
6 6
7 #include "test/unittests/compiler/instruction-selector-unittest.h" 7 #include "test/unittests/compiler/instruction-selector-unittest.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after
1577 EXPECT_EQ(kFlags_set, s[0]->flags_mode()); 1577 EXPECT_EQ(kFlags_set, s[0]->flags_mode());
1578 EXPECT_EQ(cmp.flags_condition, s[0]->flags_condition()); 1578 EXPECT_EQ(cmp.flags_condition, s[0]->flags_condition());
1579 } 1579 }
1580 1580
1581 1581
1582 TEST_P(InstructionSelectorF32ComparisonTest, NegatedWithParameters) { 1582 TEST_P(InstructionSelectorF32ComparisonTest, NegatedWithParameters) {
1583 const Comparison& cmp = GetParam(); 1583 const Comparison& cmp = GetParam();
1584 StreamBuilder m(this, MachineType::Int32(), MachineType::Float32(), 1584 StreamBuilder m(this, MachineType::Int32(), MachineType::Float32(),
1585 MachineType::Float32()); 1585 MachineType::Float32());
1586 m.Return( 1586 m.Return(
1587 m.WordBinaryNot((m.*cmp.constructor)(m.Parameter(0), m.Parameter(1)))); 1587 m.Word32BinaryNot((m.*cmp.constructor)(m.Parameter(0), m.Parameter(1))));
1588 Stream const s = m.Build(); 1588 Stream const s = m.Build();
1589 ASSERT_EQ(1U, s.size()); 1589 ASSERT_EQ(1U, s.size());
1590 EXPECT_EQ(kArmVcmpF32, s[0]->arch_opcode()); 1590 EXPECT_EQ(kArmVcmpF32, s[0]->arch_opcode());
1591 ASSERT_EQ(2U, s[0]->InputCount()); 1591 ASSERT_EQ(2U, s[0]->InputCount());
1592 ASSERT_EQ(1U, s[0]->OutputCount()); 1592 ASSERT_EQ(1U, s[0]->OutputCount());
1593 EXPECT_EQ(kFlags_set, s[0]->flags_mode()); 1593 EXPECT_EQ(kFlags_set, s[0]->flags_mode());
1594 EXPECT_EQ(cmp.negated_flags_condition, s[0]->flags_condition()); 1594 EXPECT_EQ(cmp.negated_flags_condition, s[0]->flags_condition());
1595 } 1595 }
1596 1596
1597 1597
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
1660 EXPECT_EQ(kFlags_set, s[0]->flags_mode()); 1660 EXPECT_EQ(kFlags_set, s[0]->flags_mode());
1661 EXPECT_EQ(cmp.flags_condition, s[0]->flags_condition()); 1661 EXPECT_EQ(cmp.flags_condition, s[0]->flags_condition());
1662 } 1662 }
1663 1663
1664 1664
1665 TEST_P(InstructionSelectorF64ComparisonTest, NegatedWithParameters) { 1665 TEST_P(InstructionSelectorF64ComparisonTest, NegatedWithParameters) {
1666 const Comparison& cmp = GetParam(); 1666 const Comparison& cmp = GetParam();
1667 StreamBuilder m(this, MachineType::Int32(), MachineType::Float64(), 1667 StreamBuilder m(this, MachineType::Int32(), MachineType::Float64(),
1668 MachineType::Float64()); 1668 MachineType::Float64());
1669 m.Return( 1669 m.Return(
1670 m.WordBinaryNot((m.*cmp.constructor)(m.Parameter(0), m.Parameter(1)))); 1670 m.Word32BinaryNot((m.*cmp.constructor)(m.Parameter(0), m.Parameter(1))));
1671 Stream const s = m.Build(); 1671 Stream const s = m.Build();
1672 ASSERT_EQ(1U, s.size()); 1672 ASSERT_EQ(1U, s.size());
1673 EXPECT_EQ(kArmVcmpF64, s[0]->arch_opcode()); 1673 EXPECT_EQ(kArmVcmpF64, s[0]->arch_opcode());
1674 ASSERT_EQ(2U, s[0]->InputCount()); 1674 ASSERT_EQ(2U, s[0]->InputCount());
1675 ASSERT_EQ(1U, s[0]->OutputCount()); 1675 ASSERT_EQ(1U, s[0]->OutputCount());
1676 EXPECT_EQ(kFlags_set, s[0]->flags_mode()); 1676 EXPECT_EQ(kFlags_set, s[0]->flags_mode());
1677 EXPECT_EQ(cmp.negated_flags_condition, s[0]->flags_condition()); 1677 EXPECT_EQ(cmp.negated_flags_condition, s[0]->flags_condition());
1678 } 1678 }
1679 1679
1680 1680
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
2867 EXPECT_EQ(kArmClz, s[0]->arch_opcode()); 2867 EXPECT_EQ(kArmClz, s[0]->arch_opcode());
2868 ASSERT_EQ(1U, s[0]->InputCount()); 2868 ASSERT_EQ(1U, s[0]->InputCount());
2869 EXPECT_EQ(s.ToVreg(p0), s.ToVreg(s[0]->InputAt(0))); 2869 EXPECT_EQ(s.ToVreg(p0), s.ToVreg(s[0]->InputAt(0)));
2870 ASSERT_EQ(1U, s[0]->OutputCount()); 2870 ASSERT_EQ(1U, s[0]->OutputCount());
2871 EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output())); 2871 EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output()));
2872 } 2872 }
2873 2873
2874 } // namespace compiler 2874 } // namespace compiler
2875 } // namespace internal 2875 } // namespace internal
2876 } // namespace v8 2876 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/raw-machine-assembler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698