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/instruction-selector.cc

Issue 2785773002: [turbofan] introduce Int32/64AbsWithOverflow optional operator (Closed)
Patch Set: add base impl 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/ia32/instruction-selector-ia32.cc ('k') | src/compiler/machine-operator.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 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.h" 5 #include "src/compiler/instruction-selector.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/assembler-inl.h" 9 #include "src/assembler-inl.h"
10 #include "src/base/adapters.h" 10 #include "src/base/adapters.h"
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 case IrOpcode::kWord32Equal: 1119 case IrOpcode::kWord32Equal:
1120 return VisitWord32Equal(node); 1120 return VisitWord32Equal(node);
1121 case IrOpcode::kWord32Clz: 1121 case IrOpcode::kWord32Clz:
1122 return MarkAsWord32(node), VisitWord32Clz(node); 1122 return MarkAsWord32(node), VisitWord32Clz(node);
1123 case IrOpcode::kWord32Ctz: 1123 case IrOpcode::kWord32Ctz:
1124 return MarkAsWord32(node), VisitWord32Ctz(node); 1124 return MarkAsWord32(node), VisitWord32Ctz(node);
1125 case IrOpcode::kWord32ReverseBits: 1125 case IrOpcode::kWord32ReverseBits:
1126 return MarkAsWord32(node), VisitWord32ReverseBits(node); 1126 return MarkAsWord32(node), VisitWord32ReverseBits(node);
1127 case IrOpcode::kWord32ReverseBytes: 1127 case IrOpcode::kWord32ReverseBytes:
1128 return MarkAsWord32(node), VisitWord32ReverseBytes(node); 1128 return MarkAsWord32(node), VisitWord32ReverseBytes(node);
1129 case IrOpcode::kInt32AbsWithOverflow:
1130 return MarkAsWord32(node), VisitInt32AbsWithOverflow(node);
1129 case IrOpcode::kWord32Popcnt: 1131 case IrOpcode::kWord32Popcnt:
1130 return MarkAsWord32(node), VisitWord32Popcnt(node); 1132 return MarkAsWord32(node), VisitWord32Popcnt(node);
1131 case IrOpcode::kWord64Popcnt: 1133 case IrOpcode::kWord64Popcnt:
1132 return MarkAsWord32(node), VisitWord64Popcnt(node); 1134 return MarkAsWord32(node), VisitWord64Popcnt(node);
1133 case IrOpcode::kWord64And: 1135 case IrOpcode::kWord64And:
1134 return MarkAsWord64(node), VisitWord64And(node); 1136 return MarkAsWord64(node), VisitWord64And(node);
1135 case IrOpcode::kWord64Or: 1137 case IrOpcode::kWord64Or:
1136 return MarkAsWord64(node), VisitWord64Or(node); 1138 return MarkAsWord64(node), VisitWord64Or(node);
1137 case IrOpcode::kWord64Xor: 1139 case IrOpcode::kWord64Xor:
1138 return MarkAsWord64(node), VisitWord64Xor(node); 1140 return MarkAsWord64(node), VisitWord64Xor(node);
1139 case IrOpcode::kWord64Shl: 1141 case IrOpcode::kWord64Shl:
1140 return MarkAsWord64(node), VisitWord64Shl(node); 1142 return MarkAsWord64(node), VisitWord64Shl(node);
1141 case IrOpcode::kWord64Shr: 1143 case IrOpcode::kWord64Shr:
1142 return MarkAsWord64(node), VisitWord64Shr(node); 1144 return MarkAsWord64(node), VisitWord64Shr(node);
1143 case IrOpcode::kWord64Sar: 1145 case IrOpcode::kWord64Sar:
1144 return MarkAsWord64(node), VisitWord64Sar(node); 1146 return MarkAsWord64(node), VisitWord64Sar(node);
1145 case IrOpcode::kWord64Ror: 1147 case IrOpcode::kWord64Ror:
1146 return MarkAsWord64(node), VisitWord64Ror(node); 1148 return MarkAsWord64(node), VisitWord64Ror(node);
1147 case IrOpcode::kWord64Clz: 1149 case IrOpcode::kWord64Clz:
1148 return MarkAsWord64(node), VisitWord64Clz(node); 1150 return MarkAsWord64(node), VisitWord64Clz(node);
1149 case IrOpcode::kWord64Ctz: 1151 case IrOpcode::kWord64Ctz:
1150 return MarkAsWord64(node), VisitWord64Ctz(node); 1152 return MarkAsWord64(node), VisitWord64Ctz(node);
1151 case IrOpcode::kWord64ReverseBits: 1153 case IrOpcode::kWord64ReverseBits:
1152 return MarkAsWord64(node), VisitWord64ReverseBits(node); 1154 return MarkAsWord64(node), VisitWord64ReverseBits(node);
1153 case IrOpcode::kWord64ReverseBytes: 1155 case IrOpcode::kWord64ReverseBytes:
1154 return MarkAsWord64(node), VisitWord64ReverseBytes(node); 1156 return MarkAsWord64(node), VisitWord64ReverseBytes(node);
1157 case IrOpcode::kInt64AbsWithOverflow:
1158 return MarkAsWord64(node), VisitInt64AbsWithOverflow(node);
1155 case IrOpcode::kWord64Equal: 1159 case IrOpcode::kWord64Equal:
1156 return VisitWord64Equal(node); 1160 return VisitWord64Equal(node);
1157 case IrOpcode::kInt32Add: 1161 case IrOpcode::kInt32Add:
1158 return MarkAsWord32(node), VisitInt32Add(node); 1162 return MarkAsWord32(node), VisitInt32Add(node);
1159 case IrOpcode::kInt32AddWithOverflow: 1163 case IrOpcode::kInt32AddWithOverflow:
1160 return MarkAsWord32(node), VisitInt32AddWithOverflow(node); 1164 return MarkAsWord32(node), VisitInt32AddWithOverflow(node);
1161 case IrOpcode::kInt32Sub: 1165 case IrOpcode::kInt32Sub:
1162 return MarkAsWord32(node), VisitInt32Sub(node); 1166 return MarkAsWord32(node), VisitInt32Sub(node);
1163 case IrOpcode::kInt32SubWithOverflow: 1167 case IrOpcode::kInt32SubWithOverflow:
1164 return VisitInt32SubWithOverflow(node); 1168 return VisitInt32SubWithOverflow(node);
(...skipping 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after
2439 case IrOpcode::kTryTruncateFloat32ToInt64: 2443 case IrOpcode::kTryTruncateFloat32ToInt64:
2440 case IrOpcode::kTryTruncateFloat64ToInt64: 2444 case IrOpcode::kTryTruncateFloat64ToInt64:
2441 case IrOpcode::kTryTruncateFloat32ToUint64: 2445 case IrOpcode::kTryTruncateFloat32ToUint64:
2442 case IrOpcode::kTryTruncateFloat64ToUint64: 2446 case IrOpcode::kTryTruncateFloat64ToUint64:
2443 case IrOpcode::kInt32PairAdd: 2447 case IrOpcode::kInt32PairAdd:
2444 case IrOpcode::kInt32PairSub: 2448 case IrOpcode::kInt32PairSub:
2445 case IrOpcode::kInt32PairMul: 2449 case IrOpcode::kInt32PairMul:
2446 case IrOpcode::kWord32PairShl: 2450 case IrOpcode::kWord32PairShl:
2447 case IrOpcode::kWord32PairShr: 2451 case IrOpcode::kWord32PairShr:
2448 case IrOpcode::kWord32PairSar: 2452 case IrOpcode::kWord32PairSar:
2453 case IrOpcode::kInt32AbsWithOverflow:
2454 case IrOpcode::kInt64AbsWithOverflow:
2449 if (ProjectionIndexOf(node->op()) == 0u) { 2455 if (ProjectionIndexOf(node->op()) == 0u) {
2450 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); 2456 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value));
2451 } else { 2457 } else {
2452 DCHECK(ProjectionIndexOf(node->op()) == 1u); 2458 DCHECK(ProjectionIndexOf(node->op()) == 1u);
2453 MarkAsUsed(value); 2459 MarkAsUsed(value);
2454 } 2460 }
2455 break; 2461 break;
2456 default: 2462 default:
2457 break; 2463 break;
2458 } 2464 }
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
2744 return new (instruction_zone()) FrameStateDescriptor( 2750 return new (instruction_zone()) FrameStateDescriptor(
2745 instruction_zone(), state_info.type(), state_info.bailout_id(), 2751 instruction_zone(), state_info.type(), state_info.bailout_id(),
2746 state_info.state_combine(), parameters, locals, stack, 2752 state_info.state_combine(), parameters, locals, stack,
2747 state_info.shared_info(), outer_state); 2753 state_info.shared_info(), outer_state);
2748 } 2754 }
2749 2755
2750 2756
2751 } // namespace compiler 2757 } // namespace compiler
2752 } // namespace internal 2758 } // namespace internal
2753 } // namespace v8 2759 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/compiler/machine-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698