[mips64][wasm-simd] Implement v128.load32_zero v128.load64_zero
Port9124b7f973
https://chromium-review.googlesource.com/c/v8/v8/+/2485250 Portf89869a213
https://chromium-review.googlesource.com/c/v8/v8/+/2486236 Bug: v8:11038 Change-Id: Ia524e6ca11650b35916f1a78e7c859a570146a50 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2513870 Reviewed-by: Zhi An Ng <zhin@chromium.org> Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn> Cr-Commit-Position: refs/heads/master@{#70937}
This commit is contained in:
parent
a63243f8f6
commit
efff3d18ec
@ -1949,6 +1949,22 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
||||
__ ilvr_w(dst, kSimd128RegZero, dst);
|
||||
break;
|
||||
}
|
||||
case kMips64S128Load32Zero: {
|
||||
CpuFeatureScope msa_scope(tasm(), MIPS_SIMD);
|
||||
Simd128Register dst = i.OutputSimd128Register();
|
||||
__ xor_v(dst, dst, dst);
|
||||
__ Lwu(kScratchReg, i.MemoryOperand());
|
||||
__ insert_w(dst, 0, kScratchReg);
|
||||
break;
|
||||
}
|
||||
case kMips64S128Load64Zero: {
|
||||
CpuFeatureScope msa_scope(tasm(), MIPS_SIMD);
|
||||
Simd128Register dst = i.OutputSimd128Register();
|
||||
__ xor_v(dst, dst, dst);
|
||||
__ Ld(kScratchReg, i.MemoryOperand());
|
||||
__ insert_d(dst, 0, kScratchReg);
|
||||
break;
|
||||
}
|
||||
case kWord32AtomicLoadInt8:
|
||||
ASSEMBLE_ATOMIC_LOAD_INTEGER(Lb);
|
||||
break;
|
||||
|
@ -359,6 +359,8 @@ namespace compiler {
|
||||
V(Mips64S128Load16x4U) \
|
||||
V(Mips64S128Load32x2S) \
|
||||
V(Mips64S128Load32x2U) \
|
||||
V(Mips64S128Load32Zero) \
|
||||
V(Mips64S128Load64Zero) \
|
||||
V(Mips64MsaLd) \
|
||||
V(Mips64MsaSt) \
|
||||
V(Mips64I32x4SConvertI16x8Low) \
|
||||
|
@ -359,6 +359,8 @@ int InstructionScheduler::GetTargetInstructionFlags(
|
||||
case kMips64S128Load16x4U:
|
||||
case kMips64S128Load32x2S:
|
||||
case kMips64S128Load32x2U:
|
||||
case kMips64S128Load32Zero:
|
||||
case kMips64S128Load64Zero:
|
||||
case kMips64Word64AtomicLoadUint8:
|
||||
case kMips64Word64AtomicLoadUint16:
|
||||
case kMips64Word64AtomicLoadUint32:
|
||||
|
@ -416,6 +416,12 @@ void InstructionSelector::VisitLoadTransform(Node* node) {
|
||||
case LoadTransformation::kS128Load32x2U:
|
||||
opcode = kMips64S128Load32x2U;
|
||||
break;
|
||||
case LoadTransformation::kS128Load32Zero:
|
||||
opcode = kMips64S128Load32Zero;
|
||||
break;
|
||||
case LoadTransformation::kS128Load64Zero:
|
||||
opcode = kMips64S128Load64Zero;
|
||||
break;
|
||||
default:
|
||||
UNIMPLEMENTED();
|
||||
}
|
||||
|
@ -1509,6 +1509,16 @@ void LiftoffAssembler::LoadTransform(LiftoffRegister dst, Register src_addr,
|
||||
fill_d(dst_msa, scratch);
|
||||
ilvr_w(dst_msa, kSimd128RegZero, dst_msa);
|
||||
}
|
||||
} else if (transform == LoadTransformationKind::kZeroExtend) {
|
||||
xor_v(dst_msa, dst_msa, dst_msa);
|
||||
if (memtype == MachineType::Int32()) {
|
||||
Lwu(scratch, src_op);
|
||||
insert_w(dst_msa, 0, scratch);
|
||||
} else {
|
||||
DCHECK_EQ(MachineType::Int64(), memtype);
|
||||
Ld(scratch, src_op);
|
||||
insert_d(dst_msa, 0, scratch);
|
||||
}
|
||||
} else {
|
||||
DCHECK_EQ(LoadTransformationKind::kSplat, transform);
|
||||
if (memtype == MachineType::Int8()) {
|
||||
|
Loading…
Reference in New Issue
Block a user