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

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

Issue 2701003003: [V8] Implement remaining SIMD operations on ARM. (Closed)
Patch Set: Created 3 years, 10 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
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/base/bits.h" 6 #include "src/base/bits.h"
7 #include "src/compiler/instruction-selector-impl.h" 7 #include "src/compiler/instruction-selector-impl.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 78
79 namespace { 79 namespace {
80 80
81 void VisitRR(InstructionSelector* selector, ArchOpcode opcode, Node* node) { 81 void VisitRR(InstructionSelector* selector, ArchOpcode opcode, Node* node) {
82 ArmOperandGenerator g(selector); 82 ArmOperandGenerator g(selector);
83 selector->Emit(opcode, g.DefineAsRegister(node), 83 selector->Emit(opcode, g.DefineAsRegister(node),
84 g.UseRegister(node->InputAt(0))); 84 g.UseRegister(node->InputAt(0)));
85 } 85 }
86 86
87
88 void VisitRRR(InstructionSelector* selector, ArchOpcode opcode, Node* node) { 87 void VisitRRR(InstructionSelector* selector, ArchOpcode opcode, Node* node) {
89 ArmOperandGenerator g(selector); 88 ArmOperandGenerator g(selector);
90 selector->Emit(opcode, g.DefineAsRegister(node), 89 selector->Emit(opcode, g.DefineAsRegister(node),
91 g.UseRegister(node->InputAt(0)), 90 g.UseRegister(node->InputAt(0)),
92 g.UseRegister(node->InputAt(1))); 91 g.UseRegister(node->InputAt(1)));
93 } 92 }
94 93
95 void VisitRRRR(InstructionSelector* selector, ArchOpcode opcode, Node* node) { 94 void VisitRRRR(InstructionSelector* selector, ArchOpcode opcode, Node* node) {
96 ArmOperandGenerator g(selector); 95 ArmOperandGenerator g(selector);
96 // Use DefineSameAsFirst for ternary ops that clobber their first input,
97 // e.g. the NEON vbsl instruction.
97 selector->Emit( 98 selector->Emit(
98 opcode, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)), 99 opcode, g.DefineSameAsFirst(node), g.UseRegister(node->InputAt(0)),
99 g.UseRegister(node->InputAt(1)), g.UseRegister(node->InputAt(2))); 100 g.UseRegister(node->InputAt(1)), g.UseRegister(node->InputAt(2)));
100 } 101 }
101 102
102 void VisitRRI(InstructionSelector* selector, ArchOpcode opcode, Node* node) { 103 void VisitRRI(InstructionSelector* selector, ArchOpcode opcode, Node* node) {
103 ArmOperandGenerator g(selector); 104 ArmOperandGenerator g(selector);
104 int32_t imm = OpParameter<int32_t>(node); 105 int32_t imm = OpParameter<int32_t>(node);
105 selector->Emit(opcode, g.DefineAsRegister(node), 106 selector->Emit(opcode, g.DefineAsRegister(node),
106 g.UseRegister(node->InputAt(0)), g.UseImmediate(imm)); 107 g.UseRegister(node->InputAt(0)), g.UseImmediate(imm));
107 } 108 }
108 109
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 opcode = load_rep.IsUnsigned() ? kArmLdrh : kArmLdrsh; 421 opcode = load_rep.IsUnsigned() ? kArmLdrh : kArmLdrsh;
421 break; 422 break;
422 case MachineRepresentation::kTaggedSigned: // Fall through. 423 case MachineRepresentation::kTaggedSigned: // Fall through.
423 case MachineRepresentation::kTaggedPointer: // Fall through. 424 case MachineRepresentation::kTaggedPointer: // Fall through.
424 case MachineRepresentation::kTagged: // Fall through. 425 case MachineRepresentation::kTagged: // Fall through.
425 case MachineRepresentation::kWord32: 426 case MachineRepresentation::kWord32:
426 opcode = kArmLdr; 427 opcode = kArmLdr;
427 break; 428 break;
428 case MachineRepresentation::kWord64: // Fall through. 429 case MachineRepresentation::kWord64: // Fall through.
429 case MachineRepresentation::kSimd128: // Fall through. 430 case MachineRepresentation::kSimd128: // Fall through.
431 case MachineRepresentation::kSimd1x4: // Fall through.
432 case MachineRepresentation::kSimd1x8: // Fall through.
433 case MachineRepresentation::kSimd1x16: // Fall through.
430 case MachineRepresentation::kNone: 434 case MachineRepresentation::kNone:
431 UNREACHABLE(); 435 UNREACHABLE();
432 return; 436 return;
433 } 437 }
434 438
435 InstructionOperand output = g.DefineAsRegister(node); 439 InstructionOperand output = g.DefineAsRegister(node);
436 EmitLoad(this, opcode, &output, base, index); 440 EmitLoad(this, opcode, &output, base, index);
437 } 441 }
438 442
439 void InstructionSelector::VisitProtectedLoad(Node* node) { 443 void InstructionSelector::VisitProtectedLoad(Node* node) {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 opcode = kArmStrh; 509 opcode = kArmStrh;
506 break; 510 break;
507 case MachineRepresentation::kTaggedSigned: // Fall through. 511 case MachineRepresentation::kTaggedSigned: // Fall through.
508 case MachineRepresentation::kTaggedPointer: // Fall through. 512 case MachineRepresentation::kTaggedPointer: // Fall through.
509 case MachineRepresentation::kTagged: // Fall through. 513 case MachineRepresentation::kTagged: // Fall through.
510 case MachineRepresentation::kWord32: 514 case MachineRepresentation::kWord32:
511 opcode = kArmStr; 515 opcode = kArmStr;
512 break; 516 break;
513 case MachineRepresentation::kWord64: // Fall through. 517 case MachineRepresentation::kWord64: // Fall through.
514 case MachineRepresentation::kSimd128: // Fall through. 518 case MachineRepresentation::kSimd128: // Fall through.
519 case MachineRepresentation::kSimd1x4: // Fall through.
520 case MachineRepresentation::kSimd1x8: // Fall through.
521 case MachineRepresentation::kSimd1x16: // Fall through.
515 case MachineRepresentation::kNone: 522 case MachineRepresentation::kNone:
516 UNREACHABLE(); 523 UNREACHABLE();
517 return; 524 return;
518 } 525 }
519 526
520 InstructionOperand inputs[4]; 527 InstructionOperand inputs[4];
521 size_t input_count = 0; 528 size_t input_count = 0;
522 inputs[input_count++] = g.UseRegister(value); 529 inputs[input_count++] = g.UseRegister(value);
523 inputs[input_count++] = g.UseRegister(base); 530 inputs[input_count++] = g.UseRegister(base);
524 EmitStore(this, opcode, input_count, inputs, index); 531 EmitStore(this, opcode, input_count, inputs, index);
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 break; 675 break;
669 case MachineRepresentation::kFloat64: 676 case MachineRepresentation::kFloat64:
670 opcode = kCheckedLoadFloat64; 677 opcode = kCheckedLoadFloat64;
671 break; 678 break;
672 case MachineRepresentation::kBit: // Fall through. 679 case MachineRepresentation::kBit: // Fall through.
673 case MachineRepresentation::kTaggedSigned: // Fall through. 680 case MachineRepresentation::kTaggedSigned: // Fall through.
674 case MachineRepresentation::kTaggedPointer: // Fall through. 681 case MachineRepresentation::kTaggedPointer: // Fall through.
675 case MachineRepresentation::kTagged: // Fall through. 682 case MachineRepresentation::kTagged: // Fall through.
676 case MachineRepresentation::kWord64: // Fall through. 683 case MachineRepresentation::kWord64: // Fall through.
677 case MachineRepresentation::kSimd128: // Fall through. 684 case MachineRepresentation::kSimd128: // Fall through.
685 case MachineRepresentation::kSimd1x4: // Fall through.
686 case MachineRepresentation::kSimd1x8: // Fall through.
687 case MachineRepresentation::kSimd1x16: // Fall through.
678 case MachineRepresentation::kNone: 688 case MachineRepresentation::kNone:
679 UNREACHABLE(); 689 UNREACHABLE();
680 return; 690 return;
681 } 691 }
682 InstructionOperand offset_operand = g.UseRegister(offset); 692 InstructionOperand offset_operand = g.UseRegister(offset);
683 InstructionOperand length_operand = g.CanBeImmediate(length, kArmCmp) 693 InstructionOperand length_operand = g.CanBeImmediate(length, kArmCmp)
684 ? g.UseImmediate(length) 694 ? g.UseImmediate(length)
685 : g.UseRegister(length); 695 : g.UseRegister(length);
686 Emit(opcode | AddressingModeField::encode(kMode_Offset_RR), 696 Emit(opcode | AddressingModeField::encode(kMode_Offset_RR),
687 g.DefineAsRegister(node), offset_operand, length_operand, 697 g.DefineAsRegister(node), offset_operand, length_operand,
(...skipping 24 matching lines...) Expand all
712 break; 722 break;
713 case MachineRepresentation::kFloat64: 723 case MachineRepresentation::kFloat64:
714 opcode = kCheckedStoreFloat64; 724 opcode = kCheckedStoreFloat64;
715 break; 725 break;
716 case MachineRepresentation::kBit: // Fall through. 726 case MachineRepresentation::kBit: // Fall through.
717 case MachineRepresentation::kTaggedSigned: // Fall through. 727 case MachineRepresentation::kTaggedSigned: // Fall through.
718 case MachineRepresentation::kTaggedPointer: // Fall through. 728 case MachineRepresentation::kTaggedPointer: // Fall through.
719 case MachineRepresentation::kTagged: // Fall through. 729 case MachineRepresentation::kTagged: // Fall through.
720 case MachineRepresentation::kWord64: // Fall through. 730 case MachineRepresentation::kWord64: // Fall through.
721 case MachineRepresentation::kSimd128: // Fall through. 731 case MachineRepresentation::kSimd128: // Fall through.
732 case MachineRepresentation::kSimd1x4: // Fall through.
733 case MachineRepresentation::kSimd1x8: // Fall through.
734 case MachineRepresentation::kSimd1x16: // Fall through.
722 case MachineRepresentation::kNone: 735 case MachineRepresentation::kNone:
723 UNREACHABLE(); 736 UNREACHABLE();
724 return; 737 return;
725 } 738 }
726 InstructionOperand offset_operand = g.UseRegister(offset); 739 InstructionOperand offset_operand = g.UseRegister(offset);
727 InstructionOperand length_operand = g.CanBeImmediate(length, kArmCmp) 740 InstructionOperand length_operand = g.CanBeImmediate(length, kArmCmp)
728 ? g.UseImmediate(length) 741 ? g.UseImmediate(length)
729 : g.UseRegister(length); 742 : g.UseRegister(length);
730 Emit(opcode | AddressingModeField::encode(kMode_Offset_RR), g.NoOutput(), 743 Emit(opcode | AddressingModeField::encode(kMode_Offset_RR), g.NoOutput(),
731 offset_operand, length_operand, g.UseRegister(value), 744 offset_operand, length_operand, g.UseRegister(value),
(...skipping 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after
2172 V(Float32x4) \ 2185 V(Float32x4) \
2173 V(Int32x4) \ 2186 V(Int32x4) \
2174 V(Int16x8) \ 2187 V(Int16x8) \
2175 V(Int8x16) 2188 V(Int8x16)
2176 2189
2177 #define SIMD_FORMAT_LIST(V) \ 2190 #define SIMD_FORMAT_LIST(V) \
2178 V(32x4) \ 2191 V(32x4) \
2179 V(16x8) \ 2192 V(16x8) \
2180 V(8x16) 2193 V(8x16)
2181 2194
2182 #define SIMD_UNOP_LIST(V) \ 2195 #define SIMD_UNOP_LIST(V) \
2183 V(Float32x4FromInt32x4) \ 2196 V(Float32x4FromInt32x4, kArmFloat32x4FromInt32x4) \
2184 V(Float32x4FromUint32x4) \ 2197 V(Float32x4FromUint32x4, kArmFloat32x4FromUint32x4) \
2185 V(Float32x4Abs) \ 2198 V(Float32x4Abs, kArmFloat32x4Abs) \
2186 V(Float32x4Neg) \ 2199 V(Float32x4Neg, kArmFloat32x4Neg) \
2187 V(Int32x4FromFloat32x4) \ 2200 V(Int32x4FromFloat32x4, kArmInt32x4FromFloat32x4) \
2188 V(Uint32x4FromFloat32x4) \ 2201 V(Uint32x4FromFloat32x4, kArmUint32x4FromFloat32x4) \
2189 V(Int32x4Neg) \ 2202 V(Int32x4Neg, kArmInt32x4Neg) \
2190 V(Int16x8Neg) \ 2203 V(Int16x8Neg, kArmInt16x8Neg) \
2191 V(Int8x16Neg) \ 2204 V(Int8x16Neg, kArmInt8x16Neg) \
2192 V(Simd128Not) 2205 V(Simd128Not, kArmSimd128Not) \
2206 V(Simd1x4Not, kArmSimd128Not) \
2207 V(Simd1x4AnyTrue, kArmSimd1x4AnyTrue) \
2208 V(Simd1x4AllTrue, kArmSimd1x4AllTrue) \
2209 V(Simd1x8Not, kArmSimd128Not) \
2210 V(Simd1x8AnyTrue, kArmSimd1x8AnyTrue) \
2211 V(Simd1x8AllTrue, kArmSimd1x8AllTrue) \
2212 V(Simd1x16Not, kArmSimd128Not) \
2213 V(Simd1x16AnyTrue, kArmSimd1x16AnyTrue) \
2214 V(Simd1x16AllTrue, kArmSimd1x16AllTrue)
2193 2215
2194 #define SIMD_BINOP_LIST(V) \ 2216 #define SIMD_BINOP_LIST(V) \
2195 V(Float32x4Add) \ 2217 V(Float32x4Add, kArmFloat32x4Add) \
2196 V(Float32x4Sub) \ 2218 V(Float32x4Sub, kArmFloat32x4Sub) \
2197 V(Float32x4Equal) \ 2219 V(Float32x4Equal, kArmFloat32x4Equal) \
2198 V(Float32x4NotEqual) \ 2220 V(Float32x4NotEqual, kArmFloat32x4NotEqual) \
2199 V(Int32x4Add) \ 2221 V(Int32x4Add, kArmInt32x4Add) \
2200 V(Int32x4Sub) \ 2222 V(Int32x4Sub, kArmInt32x4Sub) \
2201 V(Int32x4Mul) \ 2223 V(Int32x4Mul, kArmInt32x4Mul) \
2202 V(Int32x4Min) \ 2224 V(Int32x4Min, kArmInt32x4Min) \
2203 V(Int32x4Max) \ 2225 V(Int32x4Max, kArmInt32x4Max) \
2204 V(Int32x4Equal) \ 2226 V(Int32x4Equal, kArmInt32x4Equal) \
2205 V(Int32x4NotEqual) \ 2227 V(Int32x4NotEqual, kArmInt32x4NotEqual) \
2206 V(Int32x4GreaterThan) \ 2228 V(Int32x4GreaterThan, kArmInt32x4GreaterThan) \
2207 V(Int32x4GreaterThanOrEqual) \ 2229 V(Int32x4GreaterThanOrEqual, kArmInt32x4GreaterThanOrEqual) \
2208 V(Uint32x4Min) \ 2230 V(Uint32x4Min, kArmUint32x4Min) \
2209 V(Uint32x4Max) \ 2231 V(Uint32x4Max, kArmUint32x4Max) \
2210 V(Uint32x4GreaterThan) \ 2232 V(Uint32x4GreaterThan, kArmUint32x4GreaterThan) \
2211 V(Uint32x4GreaterThanOrEqual) \ 2233 V(Uint32x4GreaterThanOrEqual, kArmUint32x4GreaterThanOrEqual) \
2212 V(Int16x8Add) \ 2234 V(Int16x8Add, kArmInt16x8Add) \
2213 V(Int16x8AddSaturate) \ 2235 V(Int16x8AddSaturate, kArmInt16x8AddSaturate) \
2214 V(Int16x8Sub) \ 2236 V(Int16x8Sub, kArmInt16x8Sub) \
2215 V(Int16x8SubSaturate) \ 2237 V(Int16x8SubSaturate, kArmInt16x8SubSaturate) \
2216 V(Int16x8Mul) \ 2238 V(Int16x8Mul, kArmInt16x8Mul) \
2217 V(Int16x8Min) \ 2239 V(Int16x8Min, kArmInt16x8Min) \
2218 V(Int16x8Max) \ 2240 V(Int16x8Max, kArmInt16x8Max) \
2219 V(Int16x8Equal) \ 2241 V(Int16x8Equal, kArmInt16x8Equal) \
2220 V(Int16x8NotEqual) \ 2242 V(Int16x8NotEqual, kArmInt16x8NotEqual) \
2221 V(Int16x8GreaterThan) \ 2243 V(Int16x8GreaterThan, kArmInt16x8GreaterThan) \
2222 V(Int16x8GreaterThanOrEqual) \ 2244 V(Int16x8GreaterThanOrEqual, kArmInt16x8GreaterThanOrEqual) \
2223 V(Uint16x8AddSaturate) \ 2245 V(Uint16x8AddSaturate, kArmUint16x8AddSaturate) \
2224 V(Uint16x8SubSaturate) \ 2246 V(Uint16x8SubSaturate, kArmUint16x8SubSaturate) \
2225 V(Uint16x8Min) \ 2247 V(Uint16x8Min, kArmUint16x8Min) \
2226 V(Uint16x8Max) \ 2248 V(Uint16x8Max, kArmUint16x8Max) \
2227 V(Uint16x8GreaterThan) \ 2249 V(Uint16x8GreaterThan, kArmUint16x8GreaterThan) \
2228 V(Uint16x8GreaterThanOrEqual) \ 2250 V(Uint16x8GreaterThanOrEqual, kArmUint16x8GreaterThanOrEqual) \
2229 V(Int8x16Add) \ 2251 V(Int8x16Add, kArmInt8x16Add) \
2230 V(Int8x16AddSaturate) \ 2252 V(Int8x16AddSaturate, kArmInt8x16AddSaturate) \
2231 V(Int8x16Sub) \ 2253 V(Int8x16Sub, kArmInt8x16Sub) \
2232 V(Int8x16SubSaturate) \ 2254 V(Int8x16SubSaturate, kArmInt8x16SubSaturate) \
2233 V(Int8x16Mul) \ 2255 V(Int8x16Mul, kArmInt8x16Mul) \
2234 V(Int8x16Min) \ 2256 V(Int8x16Min, kArmInt8x16Min) \
2235 V(Int8x16Max) \ 2257 V(Int8x16Max, kArmInt8x16Max) \
2236 V(Int8x16Equal) \ 2258 V(Int8x16Equal, kArmInt8x16Equal) \
2237 V(Int8x16NotEqual) \ 2259 V(Int8x16NotEqual, kArmInt8x16NotEqual) \
2238 V(Int8x16GreaterThan) \ 2260 V(Int8x16GreaterThan, kArmInt8x16GreaterThan) \
2239 V(Int8x16GreaterThanOrEqual) \ 2261 V(Int8x16GreaterThanOrEqual, kArmInt8x16GreaterThanOrEqual) \
2240 V(Uint8x16AddSaturate) \ 2262 V(Uint8x16AddSaturate, kArmUint8x16AddSaturate) \
2241 V(Uint8x16SubSaturate) \ 2263 V(Uint8x16SubSaturate, kArmUint8x16SubSaturate) \
2242 V(Uint8x16Min) \ 2264 V(Uint8x16Min, kArmUint8x16Min) \
2243 V(Uint8x16Max) \ 2265 V(Uint8x16Max, kArmUint8x16Max) \
2244 V(Uint8x16GreaterThan) \ 2266 V(Uint8x16GreaterThan, kArmUint8x16GreaterThan) \
2245 V(Uint8x16GreaterThanOrEqual) \ 2267 V(Uint8x16GreaterThanOrEqual, kArmUint8x16GreaterThanOrEqual) \
2246 V(Simd128And) \ 2268 V(Simd128And, kArmSimd128And) \
2247 V(Simd128Or) \ 2269 V(Simd128Or, kArmSimd128Or) \
2248 V(Simd128Xor) 2270 V(Simd128Xor, kArmSimd128Xor) \
2271 V(Simd1x4And, kArmSimd128And) \
2272 V(Simd1x4Or, kArmSimd128Or) \
2273 V(Simd1x4Xor, kArmSimd128Xor) \
2274 V(Simd1x8And, kArmSimd128And) \
2275 V(Simd1x8Or, kArmSimd128Or) \
2276 V(Simd1x8Xor, kArmSimd128Xor) \
2277 V(Simd1x16And, kArmSimd128And) \
2278 V(Simd1x16Or, kArmSimd128Or) \
2279 V(Simd1x16Xor, kArmSimd128Xor)
2249 2280
2250 #define SIMD_SHIFT_OP_LIST(V) \ 2281 #define SIMD_SHIFT_OP_LIST(V) \
2251 V(Int32x4ShiftLeftByScalar) \ 2282 V(Int32x4ShiftLeftByScalar) \
2252 V(Int32x4ShiftRightByScalar) \ 2283 V(Int32x4ShiftRightByScalar) \
2253 V(Uint32x4ShiftRightByScalar) \ 2284 V(Uint32x4ShiftRightByScalar) \
2254 V(Int16x8ShiftLeftByScalar) \ 2285 V(Int16x8ShiftLeftByScalar) \
2255 V(Int16x8ShiftRightByScalar) \ 2286 V(Int16x8ShiftRightByScalar) \
2256 V(Uint16x8ShiftRightByScalar) \ 2287 V(Uint16x8ShiftRightByScalar) \
2257 V(Int8x16ShiftLeftByScalar) \ 2288 V(Int8x16ShiftLeftByScalar) \
2258 V(Int8x16ShiftRightByScalar) \ 2289 V(Int8x16ShiftRightByScalar) \
2259 V(Uint8x16ShiftRightByScalar) 2290 V(Uint8x16ShiftRightByScalar)
2260 2291
2292 #define SIMD_BOOL_OP_LIST(V) \
2293 V(Int32x4AnyTrue) \
2294 V(Int32x4AllTrue) \
2295 V(Int16x8AnyTrue) \
2296 V(Int16x8AllTrue) \
2297 V(Int8x16AnyTrue) \
2298 V(Int8x16AllTrue)
2299
2261 #define SIMD_VISIT_SPLAT(Type) \ 2300 #define SIMD_VISIT_SPLAT(Type) \
2262 void InstructionSelector::VisitCreate##Type(Node* node) { \ 2301 void InstructionSelector::VisitCreate##Type(Node* node) { \
2263 VisitRR(this, kArm##Type##Splat, node); \ 2302 VisitRR(this, kArm##Type##Splat, node); \
2264 } 2303 }
2265 SIMD_TYPE_LIST(SIMD_VISIT_SPLAT) 2304 SIMD_TYPE_LIST(SIMD_VISIT_SPLAT)
2266 #undef SIMD_VISIT_SPLAT 2305 #undef SIMD_VISIT_SPLAT
2267 2306
2268 #define SIMD_VISIT_EXTRACT_LANE(Type) \ 2307 #define SIMD_VISIT_EXTRACT_LANE(Type) \
2269 void InstructionSelector::Visit##Type##ExtractLane(Node* node) { \ 2308 void InstructionSelector::Visit##Type##ExtractLane(Node* node) { \
2270 VisitRRI(this, kArm##Type##ExtractLane, node); \ 2309 VisitRRI(this, kArm##Type##ExtractLane, node); \
2271 } 2310 }
2272 SIMD_TYPE_LIST(SIMD_VISIT_EXTRACT_LANE) 2311 SIMD_TYPE_LIST(SIMD_VISIT_EXTRACT_LANE)
2273 #undef SIMD_VISIT_EXTRACT_LANE 2312 #undef SIMD_VISIT_EXTRACT_LANE
2274 2313
2275 #define SIMD_VISIT_REPLACE_LANE(Type) \ 2314 #define SIMD_VISIT_REPLACE_LANE(Type) \
2276 void InstructionSelector::Visit##Type##ReplaceLane(Node* node) { \ 2315 void InstructionSelector::Visit##Type##ReplaceLane(Node* node) { \
2277 VisitRRIR(this, kArm##Type##ReplaceLane, node); \ 2316 VisitRRIR(this, kArm##Type##ReplaceLane, node); \
2278 } 2317 }
2279 SIMD_TYPE_LIST(SIMD_VISIT_REPLACE_LANE) 2318 SIMD_TYPE_LIST(SIMD_VISIT_REPLACE_LANE)
2280 #undef SIMD_VISIT_REPLACE_LANE 2319 #undef SIMD_VISIT_REPLACE_LANE
2281 2320
2282 #define SIMD_VISIT_UNOP(Name) \ 2321 #define SIMD_VISIT_UNOP(Name, instruction) \
2283 void InstructionSelector::Visit##Name(Node* node) { \ 2322 void InstructionSelector::Visit##Name(Node* node) { \
2284 VisitRR(this, kArm##Name, node); \ 2323 VisitRR(this, instruction, node); \
2285 } 2324 }
2286 SIMD_UNOP_LIST(SIMD_VISIT_UNOP) 2325 SIMD_UNOP_LIST(SIMD_VISIT_UNOP)
2287 #undef SIMD_VISIT_UNOP 2326 #undef SIMD_VISIT_UNOP
2288 2327
2289 #define SIMD_VISIT_BINOP(Name) \ 2328 #define SIMD_VISIT_BINOP(Name, instruction) \
2290 void InstructionSelector::Visit##Name(Node* node) { \ 2329 void InstructionSelector::Visit##Name(Node* node) { \
2291 VisitRRR(this, kArm##Name, node); \ 2330 VisitRRR(this, instruction, node); \
2292 } 2331 }
2293 SIMD_BINOP_LIST(SIMD_VISIT_BINOP) 2332 SIMD_BINOP_LIST(SIMD_VISIT_BINOP)
2294 #undef SIMD_VISIT_BINOP 2333 #undef SIMD_VISIT_BINOP
2295 2334
2296 #define SIMD_VISIT_SHIFT_OP(Name) \ 2335 #define SIMD_VISIT_SHIFT_OP(Name) \
2297 void InstructionSelector::Visit##Name(Node* node) { \ 2336 void InstructionSelector::Visit##Name(Node* node) { \
2298 VisitRRI(this, kArm##Name, node); \ 2337 VisitRRI(this, kArm##Name, node); \
2299 } 2338 }
2300 SIMD_SHIFT_OP_LIST(SIMD_VISIT_SHIFT_OP) 2339 SIMD_SHIFT_OP_LIST(SIMD_VISIT_SHIFT_OP)
2301 #undef SIMD_VISIT_SHIFT_OP 2340 #undef SIMD_VISIT_SHIFT_OP
2302 2341
2303 #define SIMD_VISIT_SELECT_OP(format) \ 2342 #define SIMD_VISIT_SELECT_OP(format) \
2304 void InstructionSelector::VisitSimd##format##Select(Node* node) { \ 2343 void InstructionSelector::VisitSimd##format##Select(Node* node) { \
2305 VisitRRRR(this, kArmSimd##format##Select, node); \ 2344 VisitRRRR(this, kArmSimd128Select, node); \
2306 } 2345 }
2307 SIMD_FORMAT_LIST(SIMD_VISIT_SELECT_OP) 2346 SIMD_FORMAT_LIST(SIMD_VISIT_SELECT_OP)
2308 #undef SIMD_VISIT_SELECT_OP 2347 #undef SIMD_VISIT_SELECT_OP
2309 2348
2310 // static 2349 // static
2311 MachineOperatorBuilder::Flags 2350 MachineOperatorBuilder::Flags
2312 InstructionSelector::SupportedMachineOperatorFlags() { 2351 InstructionSelector::SupportedMachineOperatorFlags() {
2313 MachineOperatorBuilder::Flags flags; 2352 MachineOperatorBuilder::Flags flags;
2314 if (CpuFeatures::IsSupported(SUDIV)) { 2353 if (CpuFeatures::IsSupported(SUDIV)) {
2315 // The sdiv and udiv instructions correctly return 0 if the divisor is 0, 2354 // The sdiv and udiv instructions correctly return 0 if the divisor is 0,
(...skipping 24 matching lines...) Expand all
2340 Vector<MachineType> req_aligned = Vector<MachineType>::New(2); 2379 Vector<MachineType> req_aligned = Vector<MachineType>::New(2);
2341 req_aligned[0] = MachineType::Float32(); 2380 req_aligned[0] = MachineType::Float32();
2342 req_aligned[1] = MachineType::Float64(); 2381 req_aligned[1] = MachineType::Float64();
2343 return MachineOperatorBuilder::AlignmentRequirements:: 2382 return MachineOperatorBuilder::AlignmentRequirements::
2344 SomeUnalignedAccessUnsupported(req_aligned, req_aligned); 2383 SomeUnalignedAccessUnsupported(req_aligned, req_aligned);
2345 } 2384 }
2346 2385
2347 } // namespace compiler 2386 } // namespace compiler
2348 } // namespace internal 2387 } // namespace internal
2349 } // namespace v8 2388 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm/instruction-scheduler-arm.cc ('k') | src/compiler/arm64/instruction-selector-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698