Index: src/compiler/arm/instruction-selector-arm.cc |
diff --git a/src/compiler/arm/instruction-selector-arm.cc b/src/compiler/arm/instruction-selector-arm.cc |
index 4ccb04e4641001a2839e2cbfcd4f69d0ba0450aa..5cd464132eda84a5ef3f8eba683277d43384c410 100644 |
--- a/src/compiler/arm/instruction-selector-arm.cc |
+++ b/src/compiler/arm/instruction-selector-arm.cc |
@@ -92,6 +92,20 @@ void VisitRRR(InstructionSelector* selector, ArchOpcode opcode, Node* node) { |
g.UseRegister(node->InputAt(1))); |
} |
+void VisitRRI(InstructionSelector* selector, ArchOpcode opcode, Node* node) { |
+ ArmOperandGenerator g(selector); |
+ int32_t imm = OpParameter<int32_t>(node); |
+ selector->Emit(opcode, g.DefineAsRegister(node), |
+ g.UseRegister(node->InputAt(0)), g.UseImmediate(imm)); |
+} |
+ |
+void VisitRRIR(InstructionSelector* selector, ArchOpcode opcode, Node* node) { |
+ ArmOperandGenerator g(selector); |
+ int32_t imm = OpParameter<int32_t>(node); |
+ selector->Emit(opcode, g.DefineAsRegister(node), |
+ g.UseRegister(node->InputAt(0)), g.UseImmediate(imm), |
+ g.UseRegister(node->InputAt(1))); |
+} |
template <IrOpcode::Value kOpcode, int kImmMin, int kImmMax, |
AddressingMode kImmMode, AddressingMode kRegMode> |
@@ -1090,15 +1104,8 @@ void InstructionSelector::VisitWord32Ror(Node* node) { |
VisitShift(this, node, TryMatchROR); |
} |
- |
-void InstructionSelector::VisitWord32Clz(Node* node) { |
- VisitRR(this, kArmClz, node); |
-} |
- |
- |
void InstructionSelector::VisitWord32Ctz(Node* node) { UNREACHABLE(); } |
- |
void InstructionSelector::VisitWord32ReverseBits(Node* node) { |
DCHECK(IsSupported(ARMv7)); |
VisitRR(this, kArmRbit, node); |
@@ -1299,12 +1306,6 @@ void InstructionSelector::VisitInt32Mul(Node* node) { |
VisitRRR(this, kArmMul, node); |
} |
- |
-void InstructionSelector::VisitInt32MulHigh(Node* node) { |
- VisitRRR(this, kArmSmmul, node); |
-} |
- |
- |
void InstructionSelector::VisitUint32MulHigh(Node* node) { |
ArmOperandGenerator g(this); |
InstructionOperand outputs[] = {g.TempRegister(), g.DefineAsRegister(node)}; |
@@ -1333,73 +1334,76 @@ void InstructionSelector::VisitUint32Mod(Node* node) { |
VisitMod(this, node, kArmUdiv, kArmVcvtF64U32, kArmVcvtU32F64); |
} |
- |
-void InstructionSelector::VisitChangeFloat32ToFloat64(Node* node) { |
- VisitRR(this, kArmVcvtF64F32, node); |
-} |
- |
- |
-void InstructionSelector::VisitRoundInt32ToFloat32(Node* node) { |
- VisitRR(this, kArmVcvtF32S32, node); |
-} |
- |
- |
-void InstructionSelector::VisitRoundUint32ToFloat32(Node* node) { |
- VisitRR(this, kArmVcvtF32U32, node); |
-} |
- |
- |
-void InstructionSelector::VisitChangeInt32ToFloat64(Node* node) { |
- VisitRR(this, kArmVcvtF64S32, node); |
-} |
- |
- |
-void InstructionSelector::VisitChangeUint32ToFloat64(Node* node) { |
- VisitRR(this, kArmVcvtF64U32, node); |
-} |
- |
- |
-void InstructionSelector::VisitTruncateFloat32ToInt32(Node* node) { |
- VisitRR(this, kArmVcvtS32F32, node); |
-} |
- |
- |
-void InstructionSelector::VisitTruncateFloat32ToUint32(Node* node) { |
- VisitRR(this, kArmVcvtU32F32, node); |
-} |
- |
- |
-void InstructionSelector::VisitChangeFloat64ToInt32(Node* node) { |
- VisitRR(this, kArmVcvtS32F64, node); |
-} |
- |
- |
-void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) { |
- VisitRR(this, kArmVcvtU32F64, node); |
-} |
- |
-void InstructionSelector::VisitTruncateFloat64ToUint32(Node* node) { |
- VisitRR(this, kArmVcvtU32F64, node); |
-} |
-void InstructionSelector::VisitTruncateFloat64ToFloat32(Node* node) { |
- VisitRR(this, kArmVcvtF32F64, node); |
-} |
- |
-void InstructionSelector::VisitTruncateFloat64ToWord32(Node* node) { |
- VisitRR(this, kArchTruncateDoubleToI, node); |
-} |
- |
-void InstructionSelector::VisitRoundFloat64ToInt32(Node* node) { |
- VisitRR(this, kArmVcvtS32F64, node); |
-} |
- |
-void InstructionSelector::VisitBitcastFloat32ToInt32(Node* node) { |
- VisitRR(this, kArmVmovU32F32, node); |
-} |
- |
-void InstructionSelector::VisitBitcastInt32ToFloat32(Node* node) { |
- VisitRR(this, kArmVmovF32U32, node); |
-} |
+#define RR_OP_LIST(V) \ |
+ V(Word32Clz, kArmClz) \ |
+ V(ChangeFloat32ToFloat64, kArmVcvtF64F32) \ |
+ V(RoundInt32ToFloat32, kArmVcvtF32S32) \ |
+ V(RoundUint32ToFloat32, kArmVcvtF32U32) \ |
+ V(ChangeInt32ToFloat64, kArmVcvtF64S32) \ |
+ V(ChangeUint32ToFloat64, kArmVcvtF64U32) \ |
+ V(TruncateFloat32ToInt32, kArmVcvtS32F32) \ |
+ V(TruncateFloat32ToUint32, kArmVcvtU32F32) \ |
+ V(ChangeFloat64ToInt32, kArmVcvtS32F64) \ |
+ V(ChangeFloat64ToUint32, kArmVcvtU32F64) \ |
+ V(TruncateFloat64ToUint32, kArmVcvtU32F64) \ |
+ V(TruncateFloat64ToFloat32, kArmVcvtF32F64) \ |
+ V(TruncateFloat64ToWord32, kArchTruncateDoubleToI) \ |
+ V(RoundFloat64ToInt32, kArmVcvtS32F64) \ |
+ V(BitcastFloat32ToInt32, kArmVmovU32F32) \ |
+ V(BitcastInt32ToFloat32, kArmVmovF32U32) \ |
+ V(Float64ExtractLowWord32, kArmVmovLowU32F64) \ |
+ V(Float64ExtractHighWord32, kArmVmovHighU32F64) \ |
+ V(Float64SilenceNaN, kArmFloat64SilenceNaN) \ |
+ V(Float32Abs, kArmVabsF32) \ |
+ V(Float64Abs, kArmVabsF64) \ |
+ V(Float32Neg, kArmVnegF32) \ |
+ V(Float64Neg, kArmVnegF64) \ |
+ V(Float32Sqrt, kArmVsqrtF32) \ |
+ V(Float64Sqrt, kArmVsqrtF64) |
+ |
+#define RR_OP_LIST_V8(V) \ |
+ V(Float32RoundDown, kArmVrintmF32) \ |
+ V(Float64RoundDown, kArmVrintmF64) \ |
+ V(Float32RoundUp, kArmVrintpF32) \ |
+ V(Float64RoundUp, kArmVrintpF64) \ |
+ V(Float32RoundTruncate, kArmVrintzF32) \ |
+ V(Float64RoundTruncate, kArmVrintzF64) \ |
+ V(Float64RoundTiesAway, kArmVrintaF64) \ |
+ V(Float32RoundTiesEven, kArmVrintnF32) \ |
+ V(Float64RoundTiesEven, kArmVrintnF64) |
+ |
+#define RRR_OP_LIST(V) \ |
+ V(Int32MulHigh, kArmSmmul) \ |
+ V(Float32Mul, kArmVmulF32) \ |
+ V(Float64Mul, kArmVmulF64) \ |
+ V(Float32Div, kArmVdivF32) \ |
+ V(Float64Div, kArmVdivF64) \ |
+ V(Float32Max, kArmFloat32Max) \ |
+ V(Float64Max, kArmFloat64Max) \ |
+ V(Float32Min, kArmFloat32Min) \ |
+ V(Float64Min, kArmFloat64Min) |
+ |
+#define RR_VISITOR(Name, opcode) \ |
+ void InstructionSelector::Visit##Name(Node* node) { \ |
+ VisitRR(this, opcode, node); \ |
+ } |
+RR_OP_LIST(RR_VISITOR) |
+#undef RR_VISITOR |
+ |
+#define RR_VISITOR_V8(Name, opcode) \ |
+ void InstructionSelector::Visit##Name(Node* node) { \ |
+ DCHECK(CpuFeatures::IsSupported(ARMv8)); \ |
+ VisitRR(this, opcode, node); \ |
+ } |
+RR_OP_LIST_V8(RR_VISITOR_V8) |
+#undef RR_VISITOR_V8 |
+ |
+#define RRR_VISITOR(Name, opcode) \ |
+ void InstructionSelector::Visit##Name(Node* node) { \ |
+ VisitRRR(this, opcode, node); \ |
+ } |
+RRR_OP_LIST(RRR_VISITOR) |
+#undef RRR_VISITOR |
void InstructionSelector::VisitFloat32Add(Node* node) { |
ArmOperandGenerator g(this); |
@@ -1468,132 +1472,12 @@ void InstructionSelector::VisitFloat64Sub(Node* node) { |
VisitRRR(this, kArmVsubF64, node); |
} |
-void InstructionSelector::VisitFloat32Mul(Node* node) { |
- VisitRRR(this, kArmVmulF32, node); |
-} |
- |
- |
-void InstructionSelector::VisitFloat64Mul(Node* node) { |
- VisitRRR(this, kArmVmulF64, node); |
-} |
- |
- |
-void InstructionSelector::VisitFloat32Div(Node* node) { |
- VisitRRR(this, kArmVdivF32, node); |
-} |
- |
- |
-void InstructionSelector::VisitFloat64Div(Node* node) { |
- VisitRRR(this, kArmVdivF64, node); |
-} |
- |
- |
void InstructionSelector::VisitFloat64Mod(Node* node) { |
ArmOperandGenerator g(this); |
Emit(kArmVmodF64, g.DefineAsFixed(node, d0), g.UseFixed(node->InputAt(0), d0), |
g.UseFixed(node->InputAt(1), d1))->MarkAsCall(); |
} |
-void InstructionSelector::VisitFloat32Max(Node* node) { |
- VisitRRR(this, kArmFloat32Max, node); |
-} |
- |
-void InstructionSelector::VisitFloat64Max(Node* node) { |
- VisitRRR(this, kArmFloat64Max, node); |
-} |
- |
-void InstructionSelector::VisitFloat64SilenceNaN(Node* node) { |
- VisitRR(this, kArmFloat64SilenceNaN, node); |
-} |
- |
-void InstructionSelector::VisitFloat32Min(Node* node) { |
- VisitRRR(this, kArmFloat32Min, node); |
-} |
- |
-void InstructionSelector::VisitFloat64Min(Node* node) { |
- VisitRRR(this, kArmFloat64Min, node); |
-} |
- |
-void InstructionSelector::VisitFloat32Abs(Node* node) { |
- VisitRR(this, kArmVabsF32, node); |
-} |
- |
- |
-void InstructionSelector::VisitFloat64Abs(Node* node) { |
- VisitRR(this, kArmVabsF64, node); |
-} |
- |
-void InstructionSelector::VisitFloat32Sqrt(Node* node) { |
- VisitRR(this, kArmVsqrtF32, node); |
-} |
- |
- |
-void InstructionSelector::VisitFloat64Sqrt(Node* node) { |
- VisitRR(this, kArmVsqrtF64, node); |
-} |
- |
- |
-void InstructionSelector::VisitFloat32RoundDown(Node* node) { |
- DCHECK(CpuFeatures::IsSupported(ARMv8)); |
- VisitRR(this, kArmVrintmF32, node); |
-} |
- |
- |
-void InstructionSelector::VisitFloat64RoundDown(Node* node) { |
- DCHECK(CpuFeatures::IsSupported(ARMv8)); |
- VisitRR(this, kArmVrintmF64, node); |
-} |
- |
- |
-void InstructionSelector::VisitFloat32RoundUp(Node* node) { |
- DCHECK(CpuFeatures::IsSupported(ARMv8)); |
- VisitRR(this, kArmVrintpF32, node); |
-} |
- |
- |
-void InstructionSelector::VisitFloat64RoundUp(Node* node) { |
- DCHECK(CpuFeatures::IsSupported(ARMv8)); |
- VisitRR(this, kArmVrintpF64, node); |
-} |
- |
- |
-void InstructionSelector::VisitFloat32RoundTruncate(Node* node) { |
- DCHECK(CpuFeatures::IsSupported(ARMv8)); |
- VisitRR(this, kArmVrintzF32, node); |
-} |
- |
- |
-void InstructionSelector::VisitFloat64RoundTruncate(Node* node) { |
- DCHECK(CpuFeatures::IsSupported(ARMv8)); |
- VisitRR(this, kArmVrintzF64, node); |
-} |
- |
- |
-void InstructionSelector::VisitFloat64RoundTiesAway(Node* node) { |
- DCHECK(CpuFeatures::IsSupported(ARMv8)); |
- VisitRR(this, kArmVrintaF64, node); |
-} |
- |
- |
-void InstructionSelector::VisitFloat32RoundTiesEven(Node* node) { |
- DCHECK(CpuFeatures::IsSupported(ARMv8)); |
- VisitRR(this, kArmVrintnF32, node); |
-} |
- |
- |
-void InstructionSelector::VisitFloat64RoundTiesEven(Node* node) { |
- DCHECK(CpuFeatures::IsSupported(ARMv8)); |
- VisitRR(this, kArmVrintnF64, node); |
-} |
- |
-void InstructionSelector::VisitFloat32Neg(Node* node) { |
- VisitRR(this, kArmVnegF32, node); |
-} |
- |
-void InstructionSelector::VisitFloat64Neg(Node* node) { |
- VisitRR(this, kArmVnegF64, node); |
-} |
- |
void InstructionSelector::VisitFloat64Ieee754Binop(Node* node, |
InstructionCode opcode) { |
ArmOperandGenerator g(this); |
@@ -2188,17 +2072,6 @@ void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) { |
VisitFloat64Compare(this, node, &cont); |
} |
- |
-void InstructionSelector::VisitFloat64ExtractLowWord32(Node* node) { |
- VisitRR(this, kArmVmovLowU32F64, node); |
-} |
- |
- |
-void InstructionSelector::VisitFloat64ExtractHighWord32(Node* node) { |
- VisitRR(this, kArmVmovHighU32F64, node); |
-} |
- |
- |
void InstructionSelector::VisitFloat64InsertLowWord32(Node* node) { |
ArmOperandGenerator g(this); |
Node* left = node->InputAt(0); |
@@ -2286,178 +2159,96 @@ void InstructionSelector::VisitAtomicStore(Node* node) { |
Emit(code, 0, nullptr, input_count, inputs); |
} |
-// TODO(bbudge) Macro-ize SIMD methods. |
-void InstructionSelector::VisitCreateFloat32x4(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmFloat32x4Splat, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
-} |
- |
-void InstructionSelector::VisitFloat32x4ExtractLane(Node* node) { |
- ArmOperandGenerator g(this); |
- int32_t lane = OpParameter<int32_t>(node); |
- Emit(kArmFloat32x4ExtractLane, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseImmediate(lane)); |
-} |
- |
-void InstructionSelector::VisitFloat32x4ReplaceLane(Node* node) { |
- ArmOperandGenerator g(this); |
- int32_t lane = OpParameter<int32_t>(node); |
- Emit(kArmFloat32x4ReplaceLane, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseImmediate(lane), |
- g.Use(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitFloat32x4FromInt32x4(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmFloat32x4FromInt32x4, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0))); |
-} |
- |
-void InstructionSelector::VisitFloat32x4FromUint32x4(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmFloat32x4FromUint32x4, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0))); |
-} |
- |
-void InstructionSelector::VisitFloat32x4Abs(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmFloat32x4Abs, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0))); |
-} |
- |
-void InstructionSelector::VisitFloat32x4Neg(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmFloat32x4Neg, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0))); |
-} |
- |
-void InstructionSelector::VisitFloat32x4Add(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmFloat32x4Add, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitFloat32x4Sub(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmFloat32x4Sub, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitFloat32x4Equal(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmFloat32x4Eq, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitFloat32x4NotEqual(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmFloat32x4Ne, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitCreateInt32x4(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt32x4Splat, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
-} |
- |
-void InstructionSelector::VisitInt32x4ExtractLane(Node* node) { |
- ArmOperandGenerator g(this); |
- int32_t lane = OpParameter<int32_t>(node); |
- Emit(kArmInt32x4ExtractLane, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseImmediate(lane)); |
-} |
- |
-void InstructionSelector::VisitInt32x4ReplaceLane(Node* node) { |
- ArmOperandGenerator g(this); |
- int32_t lane = OpParameter<int32_t>(node); |
- Emit(kArmInt32x4ReplaceLane, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseImmediate(lane), |
- g.Use(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt32x4FromFloat32x4(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt32x4FromFloat32x4, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0))); |
-} |
- |
-void InstructionSelector::VisitUint32x4FromFloat32x4(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmUint32x4FromFloat32x4, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0))); |
-} |
- |
-void InstructionSelector::VisitInt32x4Neg(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt32x4Neg, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0))); |
-} |
- |
-void InstructionSelector::VisitInt32x4Add(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt32x4Add, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt32x4Sub(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt32x4Sub, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt32x4Mul(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt32x4Mul, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt32x4Min(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt32x4Min, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt32x4Max(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt32x4Max, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt32x4Equal(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt32x4Eq, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)), |
- g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt32x4NotEqual(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt32x4Ne, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)), |
- g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt32x4GreaterThan(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt32x4Gt, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)), |
- g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt32x4GreaterThanOrEqual(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt32x4Ge, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)), |
- g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitUint32x4GreaterThan(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmUint32x4Gt, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitUint32x4GreaterThanOrEqual(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmUint32x4Ge, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
-} |
+#define SIMD_TYPE_LIST(V) \ |
+ V(Float32x4) \ |
+ V(Int32x4) \ |
+ V(Int16x8) \ |
+ V(Int8x16) |
+ |
+#define SIMD_UNOP_LIST(V) \ |
+ V(Float32x4FromInt32x4) \ |
+ V(Float32x4FromUint32x4) \ |
+ V(Float32x4Abs) \ |
+ V(Float32x4Neg) \ |
+ V(Int32x4FromFloat32x4) \ |
+ V(Uint32x4FromFloat32x4) \ |
+ V(Int32x4Neg) \ |
+ V(Int16x8Neg) \ |
+ V(Int8x16Neg) |
+ |
+#define SIMD_BINOP_LIST(V) \ |
+ V(Float32x4Add) \ |
+ V(Float32x4Sub) \ |
+ V(Float32x4Equal) \ |
+ V(Float32x4NotEqual) \ |
+ V(Int32x4Add) \ |
+ V(Int32x4Sub) \ |
+ V(Int32x4Mul) \ |
+ V(Int32x4Min) \ |
+ V(Int32x4Max) \ |
+ V(Int32x4Equal) \ |
+ V(Int32x4NotEqual) \ |
+ V(Int32x4GreaterThan) \ |
+ V(Int32x4GreaterThanOrEqual) \ |
+ V(Uint32x4GreaterThan) \ |
+ V(Uint32x4GreaterThanOrEqual) \ |
+ V(Int16x8Add) \ |
+ V(Int16x8Sub) \ |
+ V(Int16x8Mul) \ |
+ V(Int16x8Min) \ |
+ V(Int16x8Max) \ |
+ V(Int16x8Equal) \ |
+ V(Int16x8NotEqual) \ |
+ V(Int16x8GreaterThan) \ |
+ V(Int16x8GreaterThanOrEqual) \ |
+ V(Uint16x8GreaterThan) \ |
+ V(Uint16x8GreaterThanOrEqual) \ |
+ V(Int8x16Add) \ |
+ V(Int8x16Sub) \ |
+ V(Int8x16Mul) \ |
+ V(Int8x16Min) \ |
+ V(Int8x16Max) \ |
+ V(Int8x16Equal) \ |
+ V(Int8x16NotEqual) \ |
+ V(Int8x16GreaterThan) \ |
+ V(Int8x16GreaterThanOrEqual) \ |
+ V(Uint8x16GreaterThan) \ |
+ V(Uint8x16GreaterThanOrEqual) |
+ |
+#define SIMD_VISIT_SPLAT(Type) \ |
+ void InstructionSelector::VisitCreate##Type(Node* node) { \ |
+ VisitRR(this, kArm##Type##Splat, node); \ |
+ } |
+SIMD_TYPE_LIST(SIMD_VISIT_SPLAT) |
+#undef SIMD_VISIT_SPLAT |
+ |
+#define SIMD_VISIT_EXTRACT_LANE(Type) \ |
+ void InstructionSelector::Visit##Type##ExtractLane(Node* node) { \ |
+ VisitRRI(this, kArm##Type##ExtractLane, node); \ |
+ } |
+SIMD_TYPE_LIST(SIMD_VISIT_EXTRACT_LANE) |
+#undef SIMD_VISIT_EXTRACT_LANE |
+ |
+#define SIMD_VISIT_REPLACE_LANE(Type) \ |
+ void InstructionSelector::Visit##Type##ReplaceLane(Node* node) { \ |
+ VisitRRIR(this, kArm##Type##ReplaceLane, node); \ |
+ } |
+SIMD_TYPE_LIST(SIMD_VISIT_REPLACE_LANE) |
+#undef SIMD_VISIT_REPLACE_LANE |
+ |
+#define SIMD_VISIT_UNOP(Name) \ |
+ void InstructionSelector::Visit##Name(Node* node) { \ |
+ VisitRR(this, kArm##Name, node); \ |
+ } |
+SIMD_UNOP_LIST(SIMD_VISIT_UNOP) |
+#undef SIMD_VISIT_UNOP |
+ |
+#define SIMD_VISIT_BINOP(Name) \ |
+ void InstructionSelector::Visit##Name(Node* node) { \ |
+ VisitRRR(this, kArm##Name, node); \ |
+ } |
+SIMD_BINOP_LIST(SIMD_VISIT_BINOP) |
+#undef SIMD_VISIT_BINOP |
void InstructionSelector::VisitSimd32x4Select(Node* node) { |
ArmOperandGenerator g(this); |
@@ -2466,190 +2257,6 @@ void InstructionSelector::VisitSimd32x4Select(Node* node) { |
g.UseRegister(node->InputAt(2))); |
} |
-void InstructionSelector::VisitCreateInt16x8(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt16x8Splat, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
-} |
- |
-void InstructionSelector::VisitInt16x8ExtractLane(Node* node) { |
- ArmOperandGenerator g(this); |
- int32_t lane = OpParameter<int32_t>(node); |
- Emit(kArmInt16x8ExtractLane, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseImmediate(lane)); |
-} |
- |
-void InstructionSelector::VisitInt16x8ReplaceLane(Node* node) { |
- ArmOperandGenerator g(this); |
- int32_t lane = OpParameter<int32_t>(node); |
- Emit(kArmInt16x8ReplaceLane, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseImmediate(lane), |
- g.Use(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt16x8Neg(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt16x8Neg, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0))); |
-} |
- |
-void InstructionSelector::VisitInt16x8Add(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt16x8Add, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt16x8Sub(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt16x8Sub, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt16x8Mul(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt16x8Mul, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt16x8Min(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt16x8Min, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt16x8Max(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt16x8Max, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt16x8Equal(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt16x8Eq, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)), |
- g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt16x8NotEqual(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt16x8Ne, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)), |
- g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt16x8GreaterThan(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt16x8Gt, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)), |
- g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt16x8GreaterThanOrEqual(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt16x8Ge, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)), |
- g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitUint16x8GreaterThan(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmUint16x8Gt, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitUint16x8GreaterThanOrEqual(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmUint16x8Ge, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitCreateInt8x16(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt8x16Splat, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
-} |
- |
-void InstructionSelector::VisitInt8x16ExtractLane(Node* node) { |
- ArmOperandGenerator g(this); |
- int32_t lane = OpParameter<int32_t>(node); |
- Emit(kArmInt8x16ExtractLane, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseImmediate(lane)); |
-} |
- |
-void InstructionSelector::VisitInt8x16ReplaceLane(Node* node) { |
- ArmOperandGenerator g(this); |
- int32_t lane = OpParameter<int32_t>(node); |
- Emit(kArmInt8x16ReplaceLane, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseImmediate(lane), |
- g.Use(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt8x16Neg(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt8x16Neg, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0))); |
-} |
- |
-void InstructionSelector::VisitInt8x16Add(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt8x16Add, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt8x16Sub(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt8x16Sub, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt8x16Mul(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt8x16Mul, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt8x16Min(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt8x16Min, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt8x16Max(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt8x16Max, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt8x16Equal(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt8x16Eq, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)), |
- g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt8x16NotEqual(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt8x16Ne, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)), |
- g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt8x16GreaterThan(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt8x16Gt, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)), |
- g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitInt8x16GreaterThanOrEqual(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmInt8x16Ge, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)), |
- g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitUint8x16GreaterThan(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmUint8x16Gt, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
-} |
- |
-void InstructionSelector::VisitUint8x16GreaterThanOrEqual(Node* node) { |
- ArmOperandGenerator g(this); |
- Emit(kArmUint8x16Ge, g.DefineAsRegister(node), |
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
-} |
- |
// static |
MachineOperatorBuilder::Flags |
InstructionSelector::SupportedMachineOperatorFlags() { |