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

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

Issue 2239813002: [compiler] Allow matcher to work on arch without scaling capability (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move out of Matcher template Created 4 years, 4 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/node-matchers.h ('k') | src/compiler/x64/instruction-selector-x64.cc » ('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/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 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 #endif 870 #endif
871 871
872 #if V8_TARGET_ARCH_PPC64 872 #if V8_TARGET_ARCH_PPC64
873 void InstructionSelector::VisitWord64Sar(Node* node) { 873 void InstructionSelector::VisitWord64Sar(Node* node) {
874 PPCOperandGenerator g(this); 874 PPCOperandGenerator g(this);
875 Int64BinopMatcher m(node); 875 Int64BinopMatcher m(node);
876 if (CanCover(m.node(), m.left().node()) && m.left().IsLoad() && 876 if (CanCover(m.node(), m.left().node()) && m.left().IsLoad() &&
877 m.right().Is(32)) { 877 m.right().Is(32)) {
878 // Just load and sign-extend the interesting 4 bytes instead. This happens, 878 // Just load and sign-extend the interesting 4 bytes instead. This happens,
879 // for example, when we're loading and untagging SMIs. 879 // for example, when we're loading and untagging SMIs.
880 BaseWithIndexAndDisplacement64Matcher mleft(m.left().node(), true); 880 BaseWithIndexAndDisplacement64Matcher mleft(m.left().node(),
881 AddressOption::kAllowAll);
881 if (mleft.matches() && mleft.index() == nullptr) { 882 if (mleft.matches() && mleft.index() == nullptr) {
882 int64_t offset = 0; 883 int64_t offset = 0;
883 Node* displacement = mleft.displacement(); 884 Node* displacement = mleft.displacement();
884 if (displacement != nullptr) { 885 if (displacement != nullptr) {
885 Int64Matcher mdisplacement(displacement); 886 Int64Matcher mdisplacement(displacement);
886 DCHECK(mdisplacement.HasValue()); 887 DCHECK(mdisplacement.HasValue());
887 offset = mdisplacement.Value(); 888 offset = mdisplacement.Value();
888 } 889 }
889 offset = SmiWordOffset(offset); 890 offset = SmiWordOffset(offset);
890 if (g.CanBeImmediate(offset, kInt16Imm_4ByteAligned)) { 891 if (g.CanBeImmediate(offset, kInt16Imm_4ByteAligned)) {
(...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after
2038 // static 2039 // static
2039 MachineOperatorBuilder::AlignmentRequirements 2040 MachineOperatorBuilder::AlignmentRequirements
2040 InstructionSelector::AlignmentRequirements() { 2041 InstructionSelector::AlignmentRequirements() {
2041 return MachineOperatorBuilder::AlignmentRequirements:: 2042 return MachineOperatorBuilder::AlignmentRequirements::
2042 FullUnalignedAccessSupport(); 2043 FullUnalignedAccessSupport();
2043 } 2044 }
2044 2045
2045 } // namespace compiler 2046 } // namespace compiler
2046 } // namespace internal 2047 } // namespace internal
2047 } // namespace v8 2048 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/node-matchers.h ('k') | src/compiler/x64/instruction-selector-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698