Commit fca1d52b authored by Liu Yu's avatar Liu Yu Committed by Commit Bot

[mips][wasm-simd] Prototype i8x16.popcnt

Port: e2aa734a

Bug: v8:11002
Change-Id: I8564a810938a07031afab20bd5448f048d4bb5de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2674182
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: 's avatarZhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#72520}
parent 251ab1f6
......@@ -3006,6 +3006,11 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
kSimd128RegZero);
break;
}
case kMipsI8x16Popcnt: {
CpuFeatureScope msa_scope(tasm(), MIPS_SIMD);
__ pcnt_b(i.OutputSimd128Register(), i.InputSimd128Register(0));
break;
}
case kMipsI8x16BitMask: {
CpuFeatureScope msa_scope(tasm(), MIPS_SIMD);
Register dst = i.OutputRegister();
......
......@@ -292,6 +292,7 @@ namespace compiler {
V(MipsI8x16GeU) \
V(MipsI8x16RoundingAverageU) \
V(MipsI8x16Abs) \
V(MipsI8x16Popcnt) \
V(MipsI8x16BitMask) \
V(MipsS128And) \
V(MipsS128Or) \
......
......@@ -229,6 +229,7 @@ int InstructionScheduler::GetTargetInstructionFlags(
case kMipsI8x16SubSatU:
case kMipsI8x16UConvertI16x8:
case kMipsI8x16Abs:
case kMipsI8x16Popcnt:
case kMipsI8x16BitMask:
case kMipsIns:
case kMipsLsa:
......
......@@ -2151,6 +2151,7 @@ void InstructionSelector::VisitInt64AbsWithOverflow(Node* node) {
V(I16x8UConvertI8x16Low, kMipsI16x8UConvertI8x16Low) \
V(I16x8UConvertI8x16High, kMipsI16x8UConvertI8x16High) \
V(I8x16Neg, kMipsI8x16Neg) \
V(I8x16Popcnt, kMipsI8x16Popcnt) \
V(I8x16BitMask, kMipsI8x16BitMask) \
V(S128Not, kMipsS128Not) \
V(V32x4AllTrue, kMipsV32x4AllTrue) \
......
......@@ -3206,6 +3206,11 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
kSimd128RegZero);
break;
}
case kMips64I8x16Popcnt: {
CpuFeatureScope msa_scope(tasm(), MIPS_SIMD);
__ pcnt_b(i.OutputSimd128Register(), i.InputSimd128Register(0));
break;
}
case kMips64I8x16BitMask: {
CpuFeatureScope msa_scope(tasm(), MIPS_SIMD);
Register dst = i.OutputRegister();
......
......@@ -317,6 +317,7 @@ namespace compiler {
V(Mips64I8x16GeU) \
V(Mips64I8x16RoundingAverageU) \
V(Mips64I8x16Abs) \
V(Mips64I8x16Popcnt) \
V(Mips64I8x16BitMask) \
V(Mips64S128And) \
V(Mips64S128Or) \
......
......@@ -250,6 +250,7 @@ int InstructionScheduler::GetTargetInstructionFlags(
case kMips64I8x16SubSatU:
case kMips64I8x16RoundingAverageU:
case kMips64I8x16Abs:
case kMips64I8x16Popcnt:
case kMips64I8x16BitMask:
case kMips64Ins:
case kMips64Lsa:
......
......@@ -2889,6 +2889,7 @@ void InstructionSelector::VisitInt64AbsWithOverflow(Node* node) {
V(I16x8BitMask, kMips64I16x8BitMask) \
V(I8x16Neg, kMips64I8x16Neg) \
V(I8x16Abs, kMips64I8x16Abs) \
V(I8x16Popcnt, kMips64I8x16Popcnt) \
V(I8x16BitMask, kMips64I8x16BitMask) \
V(S128Not, kMips64S128Not) \
V(V32x4AllTrue, kMips64V32x4AllTrue) \
......
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