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

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

Issue 2795803003: s390: exploit new mul in TF (Closed)
Patch Set: rebase Created 3 years, 8 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/s390/code-generator-s390.cc ('k') | src/s390/constants-s390.h » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/s390/frames-s390.h" 9 #include "src/s390/frames-s390.h"
10 10
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 1352
1353 static inline bool TryMatchInt32SubWithOverflow(InstructionSelector* selector, 1353 static inline bool TryMatchInt32SubWithOverflow(InstructionSelector* selector,
1354 Node* node) { 1354 Node* node) {
1355 return TryMatchInt32OpWithOverflow<kS390_Sub32>(selector, node, 1355 return TryMatchInt32OpWithOverflow<kS390_Sub32>(selector, node,
1356 SubOperandMode); 1356 SubOperandMode);
1357 } 1357 }
1358 1358
1359 static inline bool TryMatchInt32MulWithOverflow(InstructionSelector* selector, 1359 static inline bool TryMatchInt32MulWithOverflow(InstructionSelector* selector,
1360 Node* node) { 1360 Node* node) {
1361 if (Node* ovf = NodeProperties::FindProjection(node, 1)) { 1361 if (Node* ovf = NodeProperties::FindProjection(node, 1)) {
1362 FlagsContinuation cont = FlagsContinuation::ForSet(kNotEqual, ovf); 1362 if (CpuFeatures::IsSupported(MISC_INSTR_EXT2)) {
1363 VisitWord32BinOp(selector, node, kS390_Mul32WithOverflow, 1363 DCHECK(TryMatchInt32OpWithOverflow<kS390_Mul32>(
1364 OperandMode::kInt32Imm | OperandMode::kAllowDistinctOps, 1364 selector, node,
1365 &cont); 1365 OperandMode::kAllowRRR | OperandMode::kAllowRM) == true);
1366 } else {
1367 FlagsContinuation cont = FlagsContinuation::ForSet(kNotEqual, ovf);
1368 VisitWord32BinOp(selector, node, kS390_Mul32WithOverflow,
1369 OperandMode::kInt32Imm | OperandMode::kAllowDistinctOps,
1370 &cont);
1371 }
1366 return true; 1372 return true;
1367 } 1373 }
1368 return TryMatchShiftFromMul<Int32BinopMatcher, kS390_ShiftLeft32>(selector, 1374 return TryMatchShiftFromMul<Int32BinopMatcher, kS390_ShiftLeft32>(selector,
1369 node); 1375 node);
1370 } 1376 }
1371 1377
1372 #if V8_TARGET_ARCH_S390X 1378 #if V8_TARGET_ARCH_S390X
1373 template <ArchOpcode opcode> 1379 template <ArchOpcode opcode>
1374 static inline bool TryMatchInt64OpWithOverflow(InstructionSelector* selector, 1380 static inline bool TryMatchInt64OpWithOverflow(InstructionSelector* selector,
1375 Node* node, OperandModes mode) { 1381 Node* node, OperandModes mode) {
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after
2479 // static 2485 // static
2480 MachineOperatorBuilder::AlignmentRequirements 2486 MachineOperatorBuilder::AlignmentRequirements
2481 InstructionSelector::AlignmentRequirements() { 2487 InstructionSelector::AlignmentRequirements() {
2482 return MachineOperatorBuilder::AlignmentRequirements:: 2488 return MachineOperatorBuilder::AlignmentRequirements::
2483 FullUnalignedAccessSupport(); 2489 FullUnalignedAccessSupport();
2484 } 2490 }
2485 2491
2486 } // namespace compiler 2492 } // namespace compiler
2487 } // namespace internal 2493 } // namespace internal
2488 } // namespace v8 2494 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/s390/code-generator-s390.cc ('k') | src/s390/constants-s390.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698