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

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

Issue 1028313003: PPC: [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 | « 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/compiler/instruction-selector-impl.h" 5 #include "src/compiler/instruction-selector-impl.h"
6 #include "src/compiler/node-matchers.h" 6 #include "src/compiler/node-matchers.h"
7 #include "src/compiler/node-properties.h" 7 #include "src/compiler/node-properties.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 730
731 731
732 #if V8_TARGET_ARCH_PPC64 732 #if V8_TARGET_ARCH_PPC64
733 // TODO(mbrandy): Absorb logical-and into rldic? 733 // TODO(mbrandy): Absorb logical-and into rldic?
734 void InstructionSelector::VisitWord64Ror(Node* node) { 734 void InstructionSelector::VisitWord64Ror(Node* node) {
735 VisitRRO(this, node, kPPC_RotRight64, kShift64Imm); 735 VisitRRO(this, node, kPPC_RotRight64, kShift64Imm);
736 } 736 }
737 #endif 737 #endif
738 738
739 739
740 void InstructionSelector::VisitWord32Clz(Node* node) {
741 PPCOperandGenerator g(this);
742 Emit(kPPC_Cntlz32, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)));
743 }
744
745
740 void InstructionSelector::VisitInt32Add(Node* node) { 746 void InstructionSelector::VisitInt32Add(Node* node) {
741 VisitBinop<Int32BinopMatcher>(this, node, kPPC_Add32, kInt16Imm); 747 VisitBinop<Int32BinopMatcher>(this, node, kPPC_Add32, kInt16Imm);
742 } 748 }
743 749
744 750
745 #if V8_TARGET_ARCH_PPC64 751 #if V8_TARGET_ARCH_PPC64
746 void InstructionSelector::VisitInt64Add(Node* node) { 752 void InstructionSelector::VisitInt64Add(Node* node) {
747 VisitBinop<Int64BinopMatcher>(this, node, kPPC_Add64, kInt16Imm); 753 VisitBinop<Int64BinopMatcher>(this, node, kPPC_Add64, kInt16Imm);
748 } 754 }
749 #endif 755 #endif
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
1499 MachineOperatorBuilder::kFloat64Min | 1505 MachineOperatorBuilder::kFloat64Min |
1500 MachineOperatorBuilder::kFloat64RoundDown | 1506 MachineOperatorBuilder::kFloat64RoundDown |
1501 MachineOperatorBuilder::kFloat64RoundTruncate | 1507 MachineOperatorBuilder::kFloat64RoundTruncate |
1502 MachineOperatorBuilder::kFloat64RoundTiesAway; 1508 MachineOperatorBuilder::kFloat64RoundTiesAway;
1503 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. 1509 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f.
1504 } 1510 }
1505 1511
1506 } // namespace compiler 1512 } // namespace compiler
1507 } // namespace internal 1513 } // namespace internal
1508 } // namespace v8 1514 } // 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