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

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

Issue 1433733002: PPC64: Implemented the Word64Clz TurboFan operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/ppc/instruction-codes-ppc.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 "src/base/adapters.h" 5 #include "src/base/adapters.h"
6 #include "src/compiler/instruction-selector-impl.h" 6 #include "src/compiler/instruction-selector-impl.h"
7 #include "src/compiler/node-matchers.h" 7 #include "src/compiler/node-matchers.h"
8 #include "src/compiler/node-properties.h" 8 #include "src/compiler/node-properties.h"
9 #include "src/ppc/frames-ppc.h" 9 #include "src/ppc/frames-ppc.h"
10 10
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 } 730 }
731 #endif 731 #endif
732 732
733 733
734 void InstructionSelector::VisitWord32Clz(Node* node) { 734 void InstructionSelector::VisitWord32Clz(Node* node) {
735 PPCOperandGenerator g(this); 735 PPCOperandGenerator g(this);
736 Emit(kPPC_Cntlz32, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0))); 736 Emit(kPPC_Cntlz32, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)));
737 } 737 }
738 738
739 739
740 #if V8_TARGET_ARCH_PPC64
741 void InstructionSelector::VisitWord64Clz(Node* node) {
742 PPCOperandGenerator g(this);
743 Emit(kPPC_Cntlz64, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)));
744 }
745 #endif
746
747
740 void InstructionSelector::VisitWord32Popcnt(Node* node) { 748 void InstructionSelector::VisitWord32Popcnt(Node* node) {
741 PPCOperandGenerator g(this); 749 PPCOperandGenerator g(this);
742 Emit(kPPC_Popcnt32, g.DefineAsRegister(node), 750 Emit(kPPC_Popcnt32, g.DefineAsRegister(node),
743 g.UseRegister(node->InputAt(0))); 751 g.UseRegister(node->InputAt(0)));
744 } 752 }
745 753
746 754
747 void InstructionSelector::VisitWord32Ctz(Node* node) { UNREACHABLE(); } 755 void InstructionSelector::VisitWord32Ctz(Node* node) { UNREACHABLE(); }
748 756
749 757
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
1581 return MachineOperatorBuilder::kFloat64RoundDown | 1589 return MachineOperatorBuilder::kFloat64RoundDown |
1582 MachineOperatorBuilder::kFloat64RoundTruncate | 1590 MachineOperatorBuilder::kFloat64RoundTruncate |
1583 MachineOperatorBuilder::kFloat64RoundTiesAway | 1591 MachineOperatorBuilder::kFloat64RoundTiesAway |
1584 MachineOperatorBuilder::kWord32Popcnt; 1592 MachineOperatorBuilder::kWord32Popcnt;
1585 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. 1593 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f.
1586 } 1594 }
1587 1595
1588 } // namespace compiler 1596 } // namespace compiler
1589 } // namespace internal 1597 } // namespace internal
1590 } // namespace v8 1598 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ppc/instruction-codes-ppc.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698