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

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

Issue 1020223002: MIPS: [turbofan] Turn Math.clz32 into an inlinable builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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/unittests/compiler/mips/instruction-selector-mips-unittest.cc ('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 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 ASSERT_EQ(1U, s.size()); 794 ASSERT_EQ(1U, s.size());
795 EXPECT_EQ(kMips64Cmp, s[0]->arch_opcode()); 795 EXPECT_EQ(kMips64Cmp, s[0]->arch_opcode());
796 EXPECT_EQ(kMode_None, s[0]->addressing_mode()); 796 EXPECT_EQ(kMode_None, s[0]->addressing_mode());
797 ASSERT_EQ(2U, s[0]->InputCount()); 797 ASSERT_EQ(2U, s[0]->InputCount());
798 EXPECT_EQ(1U, s[0]->OutputCount()); 798 EXPECT_EQ(1U, s[0]->OutputCount());
799 EXPECT_EQ(kFlags_set, s[0]->flags_mode()); 799 EXPECT_EQ(kFlags_set, s[0]->flags_mode());
800 EXPECT_EQ(kEqual, s[0]->flags_condition()); 800 EXPECT_EQ(kEqual, s[0]->flags_condition());
801 } 801 }
802 } 802 }
803 803
804
805 TEST_F(InstructionSelectorTest, Word32Clz) {
806 StreamBuilder m(this, kMachUint32, kMachUint32);
807 Node* const p0 = m.Parameter(0);
808 Node* const n = m.Word32Clz(p0);
809 m.Return(n);
810 Stream s = m.Build();
811 ASSERT_EQ(1U, s.size());
812 EXPECT_EQ(kMips64Clz, s[0]->arch_opcode());
813 ASSERT_EQ(1U, s[0]->InputCount());
814 EXPECT_EQ(s.ToVreg(p0), s.ToVreg(s[0]->InputAt(0)));
815 ASSERT_EQ(1U, s[0]->OutputCount());
816 EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output()));
817 }
818
804 } // namespace compiler 819 } // namespace compiler
805 } // namespace internal 820 } // namespace internal
806 } // namespace v8 821 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/mips/instruction-selector-mips-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698