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

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

Issue 2815903002: s390: add new mul support on branches and deopts (Closed)
Patch Set: 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 | « no previous file | 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 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 2032 matching lines...) Expand 10 before | Expand all | Expand 10 after
2043 switch (node->opcode()) { 2043 switch (node->opcode()) {
2044 case IrOpcode::kInt32AddWithOverflow: 2044 case IrOpcode::kInt32AddWithOverflow:
2045 cont->OverwriteAndNegateIfEqual(kOverflow); 2045 cont->OverwriteAndNegateIfEqual(kOverflow);
2046 return VisitWord32BinOp(selector, node, kS390_Add32, 2046 return VisitWord32BinOp(selector, node, kS390_Add32,
2047 AddOperandMode, cont); 2047 AddOperandMode, cont);
2048 case IrOpcode::kInt32SubWithOverflow: 2048 case IrOpcode::kInt32SubWithOverflow:
2049 cont->OverwriteAndNegateIfEqual(kOverflow); 2049 cont->OverwriteAndNegateIfEqual(kOverflow);
2050 return VisitWord32BinOp(selector, node, kS390_Sub32, 2050 return VisitWord32BinOp(selector, node, kS390_Sub32,
2051 SubOperandMode, cont); 2051 SubOperandMode, cont);
2052 case IrOpcode::kInt32MulWithOverflow: 2052 case IrOpcode::kInt32MulWithOverflow:
2053 cont->OverwriteAndNegateIfEqual(kNotEqual); 2053 if (CpuFeatures::IsSupported(MISC_INSTR_EXT2)) {
2054 return VisitWord32BinOp( 2054 cont->OverwriteAndNegateIfEqual(kOverflow);
2055 selector, node, kS390_Mul32WithOverflow, 2055 return VisitWord32BinOp(
2056 OperandMode::kInt32Imm | OperandMode::kAllowDistinctOps, 2056 selector, node, kS390_Mul32,
2057 cont); 2057 OperandMode::kAllowRRR | OperandMode::kAllowRM, cont);
2058 } else {
2059 cont->OverwriteAndNegateIfEqual(kNotEqual);
2060 return VisitWord32BinOp(
2061 selector, node, kS390_Mul32WithOverflow,
2062 OperandMode::kInt32Imm | OperandMode::kAllowDistinctOps,
2063 cont);
2064 }
2058 case IrOpcode::kInt32AbsWithOverflow: 2065 case IrOpcode::kInt32AbsWithOverflow:
2059 cont->OverwriteAndNegateIfEqual(kOverflow); 2066 cont->OverwriteAndNegateIfEqual(kOverflow);
2060 return VisitWord32UnaryOp(selector, node, kS390_Abs32, 2067 return VisitWord32UnaryOp(selector, node, kS390_Abs32,
2061 OperandMode::kNone, cont); 2068 OperandMode::kNone, cont);
2062 #if V8_TARGET_ARCH_S390X 2069 #if V8_TARGET_ARCH_S390X
2063 case IrOpcode::kInt64AbsWithOverflow: 2070 case IrOpcode::kInt64AbsWithOverflow:
2064 cont->OverwriteAndNegateIfEqual(kOverflow); 2071 cont->OverwriteAndNegateIfEqual(kOverflow);
2065 return VisitWord64UnaryOp(selector, node, kS390_Abs64, 2072 return VisitWord64UnaryOp(selector, node, kS390_Abs64,
2066 OperandMode::kNone, cont); 2073 OperandMode::kNone, cont);
2067 case IrOpcode::kInt64AddWithOverflow: 2074 case IrOpcode::kInt64AddWithOverflow:
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
2494 // static 2501 // static
2495 MachineOperatorBuilder::AlignmentRequirements 2502 MachineOperatorBuilder::AlignmentRequirements
2496 InstructionSelector::AlignmentRequirements() { 2503 InstructionSelector::AlignmentRequirements() {
2497 return MachineOperatorBuilder::AlignmentRequirements:: 2504 return MachineOperatorBuilder::AlignmentRequirements::
2498 FullUnalignedAccessSupport(); 2505 FullUnalignedAccessSupport();
2499 } 2506 }
2500 2507
2501 } // namespace compiler 2508 } // namespace compiler
2502 } // namespace internal 2509 } // namespace internal
2503 } // namespace v8 2510 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698