Commit a8421ddd authored by dusan.simicic's avatar dusan.simicic Committed by Commit bot

MIPS[64]: Support for some SIMD operations (7)

Add support for I8x16Add, I8x16AddSaturateS, I8x16Sub, I8x16SubSaturateS,
I8x16Mul, I8x16MaxS, I8x16MinS, I8x16Eq, I8x16Ne, I8x16LtS,
I8x16LeS, I8x16ShrU, I8x16AddSaturateU, I8x16SubSaturateU, I8x16MaxU,
I8x16MinU, I8x16LtU, I8x16LeU, S128And, S128Or, S128Xor, S128Not for
mips32 and mips64 architectures.

BUG=

Review-Url: https://codereview.chromium.org/2798853003
Cr-Commit-Position: refs/heads/master@{#45512}
parent 5ccd2558
......@@ -2334,15 +2334,14 @@ void InstructionSelector::VisitI8x16SConvertI16x8(Node* node) {
}
#endif // !V8_TARGET_ARCH_ARM
#if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_ARM
#if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_MIPS && \
!V8_TARGET_ARCH_MIPS64
void InstructionSelector::VisitI8x16Add(Node* node) { UNIMPLEMENTED(); }
void InstructionSelector::VisitI8x16AddSaturateS(Node* node) {
UNIMPLEMENTED();
}
#endif // !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_ARM
#if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_ARM
void InstructionSelector::VisitI8x16Sub(Node* node) { UNIMPLEMENTED(); }
void InstructionSelector::VisitI8x16SubSaturateS(Node* node) {
......@@ -2356,9 +2355,10 @@ void InstructionSelector::VisitI8x16MaxS(Node* node) { UNIMPLEMENTED(); }
void InstructionSelector::VisitI8x16Eq(Node* node) { UNIMPLEMENTED(); }
void InstructionSelector::VisitI8x16Ne(Node* node) { UNIMPLEMENTED(); }
#endif // !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_ARM
#endif // !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_MIPS &&
// !V8_TARGET_ARCH_MIPS64
#if !V8_TARGET_ARCH_ARM
#if !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_MIPS && !V8_TARGET_ARCH_MIPS64
void InstructionSelector::VisitI8x16Mul(Node* node) { UNIMPLEMENTED(); }
void InstructionSelector::VisitI8x16GtS(Node* node) { UNIMPLEMENTED(); }
......@@ -2366,13 +2366,16 @@ void InstructionSelector::VisitI8x16GtS(Node* node) { UNIMPLEMENTED(); }
void InstructionSelector::VisitI8x16GeS(Node* node) { UNIMPLEMENTED(); }
void InstructionSelector::VisitI8x16ShrU(Node* node) { UNIMPLEMENTED(); }
#endif // !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_MIPS && !V8_TARGET_ARCH_MIPS64
#if !V8_TARGET_ARCH_ARM
void InstructionSelector::VisitI8x16UConvertI16x8(Node* node) {
UNIMPLEMENTED();
}
#endif // !V8_TARGET_ARCH_ARM
#if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_ARM
#if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_MIPS && \
!V8_TARGET_ARCH_MIPS64
void InstructionSelector::VisitI8x16AddSaturateU(Node* node) {
UNIMPLEMENTED();
}
......@@ -2384,15 +2387,17 @@ void InstructionSelector::VisitI8x16SubSaturateU(Node* node) {
void InstructionSelector::VisitI8x16MinU(Node* node) { UNIMPLEMENTED(); }
void InstructionSelector::VisitI8x16MaxU(Node* node) { UNIMPLEMENTED(); }
#endif // !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_ARM
#endif // !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_MIPS &&
// !V8_TARGET_ARCH_MIPS64
#if !V8_TARGET_ARCH_ARM
#if !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_MIPS && !V8_TARGET_ARCH_MIPS64
void InstructionSelector::VisitI8x16GtU(Node* node) { UNIMPLEMENTED(); }
void InstructionSelector::VisitI8x16GeU(Node* node) { UNIMPLEMENTED(); }
#endif // !V8_TARGET_ARCH_ARM
#endif // !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_MIPS && !V8_TARGET_ARCH_MIPS64
#if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_ARM
#if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_MIPS && \
!V8_TARGET_ARCH_MIPS64
void InstructionSelector::VisitS128And(Node* node) { UNIMPLEMENTED(); }
void InstructionSelector::VisitS128Or(Node* node) { UNIMPLEMENTED(); }
......@@ -2400,7 +2405,8 @@ void InstructionSelector::VisitS128Or(Node* node) { UNIMPLEMENTED(); }
void InstructionSelector::VisitS128Xor(Node* node) { UNIMPLEMENTED(); }
void InstructionSelector::VisitS128Not(Node* node) { UNIMPLEMENTED(); }
#endif // !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_ARM
#endif // !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_MIPS &&
// !V8_TARGET_ARCH_MIPS64
#if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_MIPS && \
!V8_TARGET_ARCH_MIPS64
......
......@@ -2093,6 +2093,139 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
i.InputInt3(1));
break;
}
case kMipsI8x16Add: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ addv_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMipsI8x16AddSaturateS: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ adds_s_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMipsI8x16Sub: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ subv_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMipsI8x16SubSaturateS: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ subs_s_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMipsI8x16Mul: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ mulv_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMipsI8x16MaxS: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ max_s_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMipsI8x16MinS: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ min_s_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMipsI8x16Eq: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ ceq_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMipsI8x16Ne: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
Simd128Register dst = i.OutputSimd128Register();
__ ceq_b(dst, i.InputSimd128Register(0), i.InputSimd128Register(1));
__ nor_v(dst, dst, dst);
break;
}
case kMipsI8x16GtS: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ clt_s_b(i.OutputSimd128Register(), i.InputSimd128Register(1),
i.InputSimd128Register(0));
break;
}
case kMipsI8x16GeS: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ cle_s_b(i.OutputSimd128Register(), i.InputSimd128Register(1),
i.InputSimd128Register(0));
break;
}
case kMipsI8x16ShrU: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ srli_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputInt3(1));
break;
}
case kMipsI8x16AddSaturateU: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ adds_u_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMipsI8x16SubSaturateU: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ subs_u_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMipsI8x16MaxU: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ max_u_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMipsI8x16MinU: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ min_u_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMipsI8x16GtU: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ clt_u_b(i.OutputSimd128Register(), i.InputSimd128Register(1),
i.InputSimd128Register(0));
break;
}
case kMipsI8x16GeU: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ cle_u_b(i.OutputSimd128Register(), i.InputSimd128Register(1),
i.InputSimd128Register(0));
break;
}
case kMipsS128And: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ and_v(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMipsS128Or: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ or_v(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMipsS128Xor: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ xor_v(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMipsS128Not: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ nor_v(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(0));
break;
}
}
return kSuccess;
} // NOLINT(readability/fn_size)
......
......@@ -206,7 +206,29 @@ namespace compiler {
V(MipsI8x16Shl) \
V(MipsI8x16ShrS) \
V(MipsS16x8Select) \
V(MipsS8x16Select)
V(MipsS8x16Select) \
V(MipsI8x16Add) \
V(MipsI8x16AddSaturateS) \
V(MipsI8x16Sub) \
V(MipsI8x16SubSaturateS) \
V(MipsI8x16Mul) \
V(MipsI8x16MaxS) \
V(MipsI8x16MinS) \
V(MipsI8x16Eq) \
V(MipsI8x16Ne) \
V(MipsI8x16GtS) \
V(MipsI8x16GeS) \
V(MipsI8x16ShrU) \
V(MipsI8x16AddSaturateU) \
V(MipsI8x16SubSaturateU) \
V(MipsI8x16MaxU) \
V(MipsI8x16MinU) \
V(MipsI8x16GtU) \
V(MipsI8x16GeU) \
V(MipsS128And) \
V(MipsS128Or) \
V(MipsS128Xor) \
V(MipsS128Not)
// Addressing modes represent the "shape" of inputs to an instruction.
// Many instructions support multiple addressing modes. Addressing modes
......
......@@ -2253,6 +2253,94 @@ void InstructionSelector::VisitS8x16Select(Node* node) {
VisitRRRR(this, kMipsS8x16Select, node);
}
void InstructionSelector::VisitI8x16Add(Node* node) {
VisitRRR(this, kMipsI8x16Add, node);
}
void InstructionSelector::VisitI8x16AddSaturateS(Node* node) {
VisitRRR(this, kMipsI8x16AddSaturateS, node);
}
void InstructionSelector::VisitI8x16Sub(Node* node) {
VisitRRR(this, kMipsI8x16Sub, node);
}
void InstructionSelector::VisitI8x16SubSaturateS(Node* node) {
VisitRRR(this, kMipsI8x16SubSaturateS, node);
}
void InstructionSelector::VisitI8x16Mul(Node* node) {
VisitRRR(this, kMipsI8x16Mul, node);
}
void InstructionSelector::VisitI8x16MaxS(Node* node) {
VisitRRR(this, kMipsI8x16MaxS, node);
}
void InstructionSelector::VisitI8x16MinS(Node* node) {
VisitRRR(this, kMipsI8x16MinS, node);
}
void InstructionSelector::VisitI8x16Eq(Node* node) {
VisitRRR(this, kMipsI8x16Eq, node);
}
void InstructionSelector::VisitI8x16Ne(Node* node) {
VisitRRR(this, kMipsI8x16Ne, node);
}
void InstructionSelector::VisitI8x16GtS(Node* node) {
VisitRRR(this, kMipsI8x16GtS, node);
}
void InstructionSelector::VisitI8x16GeS(Node* node) {
VisitRRR(this, kMipsI8x16GeS, node);
}
void InstructionSelector::VisitI8x16ShrU(Node* node) {
VisitRRI(this, kMipsI8x16ShrU, node);
}
void InstructionSelector::VisitI8x16AddSaturateU(Node* node) {
VisitRRR(this, kMipsI8x16AddSaturateU, node);
}
void InstructionSelector::VisitI8x16SubSaturateU(Node* node) {
VisitRRR(this, kMipsI8x16SubSaturateU, node);
}
void InstructionSelector::VisitI8x16MaxU(Node* node) {
VisitRRR(this, kMipsI8x16MaxU, node);
}
void InstructionSelector::VisitI8x16MinU(Node* node) {
VisitRRR(this, kMipsI8x16MinU, node);
}
void InstructionSelector::VisitI8x16GtU(Node* node) {
VisitRRR(this, kMipsI8x16GtU, node);
}
void InstructionSelector::VisitI8x16GeU(Node* node) {
VisitRRR(this, kMipsI8x16GeU, node);
}
void InstructionSelector::VisitS128And(Node* node) {
VisitRRR(this, kMipsS128And, node);
}
void InstructionSelector::VisitS128Or(Node* node) {
VisitRRR(this, kMipsS128Or, node);
}
void InstructionSelector::VisitS128Xor(Node* node) {
VisitRRR(this, kMipsS128Xor, node);
}
void InstructionSelector::VisitS128Not(Node* node) {
VisitRR(this, kMipsS128Not, node);
}
// static
MachineOperatorBuilder::Flags
InstructionSelector::SupportedMachineOperatorFlags() {
......
......@@ -2413,6 +2413,139 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
i.InputInt3(1));
break;
}
case kMips64I8x16Add: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ addv_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMips64I8x16AddSaturateS: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ adds_s_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMips64I8x16Sub: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ subv_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMips64I8x16SubSaturateS: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ subs_s_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMips64I8x16Mul: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ mulv_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMips64I8x16MaxS: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ max_s_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMips64I8x16MinS: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ min_s_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMips64I8x16Eq: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ ceq_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMips64I8x16Ne: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
Simd128Register dst = i.OutputSimd128Register();
__ ceq_b(dst, i.InputSimd128Register(0), i.InputSimd128Register(1));
__ nor_v(dst, dst, dst);
break;
}
case kMips64I8x16GtS: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ clt_s_b(i.OutputSimd128Register(), i.InputSimd128Register(1),
i.InputSimd128Register(0));
break;
}
case kMips64I8x16GeS: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ cle_s_b(i.OutputSimd128Register(), i.InputSimd128Register(1),
i.InputSimd128Register(0));
break;
}
case kMips64I8x16ShrU: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ srli_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputInt3(1));
break;
}
case kMips64I8x16AddSaturateU: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ adds_u_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMips64I8x16SubSaturateU: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ subs_u_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMips64I8x16MaxU: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ max_u_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMips64I8x16MinU: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ min_u_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMips64I8x16GtU: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ clt_u_b(i.OutputSimd128Register(), i.InputSimd128Register(1),
i.InputSimd128Register(0));
break;
}
case kMips64I8x16GeU: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ cle_u_b(i.OutputSimd128Register(), i.InputSimd128Register(1),
i.InputSimd128Register(0));
break;
}
case kMips64S128And: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ and_v(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMips64S128Or: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ or_v(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMips64S128Xor: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ xor_v(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1));
break;
}
case kMips64S128Not: {
CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
__ nor_v(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(0));
break;
}
}
return kSuccess;
} // NOLINT(readability/fn_size)
......
......@@ -240,7 +240,29 @@ namespace compiler {
V(Mips64I8x16Shl) \
V(Mips64I8x16ShrS) \
V(Mips64S16x8Select) \
V(Mips64S8x16Select)
V(Mips64S8x16Select) \
V(Mips64I8x16Add) \
V(Mips64I8x16AddSaturateS) \
V(Mips64I8x16Sub) \
V(Mips64I8x16SubSaturateS) \
V(Mips64I8x16Mul) \
V(Mips64I8x16MaxS) \
V(Mips64I8x16MinS) \
V(Mips64I8x16Eq) \
V(Mips64I8x16Ne) \
V(Mips64I8x16GtS) \
V(Mips64I8x16GeS) \
V(Mips64I8x16ShrU) \
V(Mips64I8x16AddSaturateU) \
V(Mips64I8x16SubSaturateU) \
V(Mips64I8x16MaxU) \
V(Mips64I8x16MinU) \
V(Mips64I8x16GtU) \
V(Mips64I8x16GeU) \
V(Mips64S128And) \
V(Mips64S128Or) \
V(Mips64S128Xor) \
V(Mips64S128Not)
// Addressing modes represent the "shape" of inputs to an instruction.
// Many instructions support multiple addressing modes. Addressing modes
......
......@@ -3005,6 +3005,94 @@ void InstructionSelector::VisitS8x16Select(Node* node) {
VisitRRRR(this, kMips64S8x16Select, node);
}
void InstructionSelector::VisitI8x16Add(Node* node) {
VisitRRR(this, kMips64I8x16Add, node);
}
void InstructionSelector::VisitI8x16AddSaturateS(Node* node) {
VisitRRR(this, kMips64I8x16AddSaturateS, node);
}
void InstructionSelector::VisitI8x16Sub(Node* node) {
VisitRRR(this, kMips64I8x16Sub, node);
}
void InstructionSelector::VisitI8x16SubSaturateS(Node* node) {
VisitRRR(this, kMips64I8x16SubSaturateS, node);
}
void InstructionSelector::VisitI8x16Mul(Node* node) {
VisitRRR(this, kMips64I8x16Mul, node);
}
void InstructionSelector::VisitI8x16MaxS(Node* node) {
VisitRRR(this, kMips64I8x16MaxS, node);
}
void InstructionSelector::VisitI8x16MinS(Node* node) {
VisitRRR(this, kMips64I8x16MinS, node);
}
void InstructionSelector::VisitI8x16Eq(Node* node) {
VisitRRR(this, kMips64I8x16Eq, node);
}
void InstructionSelector::VisitI8x16Ne(Node* node) {
VisitRRR(this, kMips64I8x16Ne, node);
}
void InstructionSelector::VisitI8x16GtS(Node* node) {
VisitRRR(this, kMips64I8x16GtS, node);
}
void InstructionSelector::VisitI8x16GeS(Node* node) {
VisitRRR(this, kMips64I8x16GeS, node);
}
void InstructionSelector::VisitI8x16ShrU(Node* node) {
VisitRRI(this, kMips64I8x16ShrU, node);
}
void InstructionSelector::VisitI8x16AddSaturateU(Node* node) {
VisitRRR(this, kMips64I8x16AddSaturateU, node);
}
void InstructionSelector::VisitI8x16SubSaturateU(Node* node) {
VisitRRR(this, kMips64I8x16SubSaturateU, node);
}
void InstructionSelector::VisitI8x16MaxU(Node* node) {
VisitRRR(this, kMips64I8x16MaxU, node);
}
void InstructionSelector::VisitI8x16MinU(Node* node) {
VisitRRR(this, kMips64I8x16MinU, node);
}
void InstructionSelector::VisitI8x16GtU(Node* node) {
VisitRRR(this, kMips64I8x16GtU, node);
}
void InstructionSelector::VisitI8x16GeU(Node* node) {
VisitRRR(this, kMips64I8x16GeU, node);
}
void InstructionSelector::VisitS128And(Node* node) {
VisitRRR(this, kMips64S128And, node);
}
void InstructionSelector::VisitS128Or(Node* node) {
VisitRRR(this, kMips64S128Or, node);
}
void InstructionSelector::VisitS128Xor(Node* node) {
VisitRRR(this, kMips64S128Xor, node);
}
void InstructionSelector::VisitS128Not(Node* node) {
VisitRR(this, kMips64S128Not, node);
}
// static
MachineOperatorBuilder::Flags
InstructionSelector::SupportedMachineOperatorFlags() {
......
......@@ -1009,19 +1009,13 @@ WASM_EXEC_COMPILED_TEST(I32x4Sub) { RunI32x4BinOpTest(kExprI32x4Sub, Sub); }
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || SIMD_LOWERING_TARGET || \
V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
WASM_EXEC_COMPILED_TEST(I32x4Mul) { RunI32x4BinOpTest(kExprI32x4Mul, Mul); }
#endif // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || SIMD_LOWERING_TARGET ||
// V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_X64
WASM_EXEC_COMPILED_TEST(S128And) { RunI32x4BinOpTest(kExprS128And, And); }
WASM_EXEC_COMPILED_TEST(S128Or) { RunI32x4BinOpTest(kExprS128Or, Or); }
WASM_EXEC_COMPILED_TEST(S128Xor) { RunI32x4BinOpTest(kExprS128Xor, Xor); }
#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_X64
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || SIMD_LOWERING_TARGET || \
V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
WASM_EXEC_COMPILED_TEST(I32x4Min) {
RunI32x4BinOpTest(kExprI32x4MinS, Minimum);
}
......@@ -1420,7 +1414,8 @@ WASM_EXEC_COMPILED_TEST(I8x16ConvertI16x8) {
}
#endif // V8_TARGET_ARCH_ARM
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || SIMD_LOWERING_TARGET
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || SIMD_LOWERING_TARGET || \
V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
void RunI8x16BinOpTest(WasmOpcode simd_op, Int8BinOp expected_op) {
FLAG_wasm_simd_prototype = true;
WasmRunner<int32_t, int32_t, int32_t, int32_t> r(kExecuteCompiled);
......@@ -1502,14 +1497,18 @@ WASM_EXEC_COMPILED_TEST(I8x16Eq) { RunI8x16CompareOpTest(kExprI8x16Eq, Equal); }
WASM_EXEC_COMPILED_TEST(I8x16Ne) {
RunI8x16CompareOpTest(kExprI8x16Ne, NotEqual);
}
#endif // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || SIMD_LOWERING_TARGET
#endif // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || SIMD_LOWERING_TARGET ||
// V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS || \
V8_TARGET_ARCH_MIPS64
WASM_EXEC_COMPILED_TEST(I8x16Mul) { RunI8x16BinOpTest(kExprI8x16Mul, Mul); }
#endif // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64
#endif // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_MIPS ||
// V8_TARGET_ARCH_MIPS64
// TODO(gdeepti): Remove special case for ARM64 after v8:6421 is fixed
#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET && !V8_TARGET_ARCH_ARM64
#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET && !V8_TARGET_ARCH_ARM64 || \
V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
WASM_EXEC_COMPILED_TEST(I8x16GtS) {
RunI8x16CompareOpTest(kExprI8x16GtS, Greater);
}
......@@ -1542,6 +1541,7 @@ WASM_EXEC_COMPILED_TEST(I8x16LeU) {
RunI8x16CompareOpTest(kExprI8x16LeU, UnsignedLessEqual);
}
#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET && !V8_TARGET_ARCH_ARM64
// || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
void RunI8x16ShiftOpTest(WasmOpcode simd_op, Int8ShiftOp expected_op,
int shift) {
......@@ -1570,11 +1570,13 @@ WASM_EXEC_COMPILED_TEST(I8x16ShrS) {
#endif // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 ||
// SIMD_LOWERING_TARGET
#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS || \
V8_TARGET_ARCH_MIPS64
WASM_EXEC_COMPILED_TEST(I8x16ShrU) {
RunI8x16ShiftOpTest(kExprI8x16ShrU, LogicalShiftRight, 1);
}
#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS ||
// V8_TARGET_ARCH_MIPS64
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_MIPS || \
V8_TARGET_ARCH_MIPS64
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment