AVX128: Implement support for vdd{ps,pd}

This commit is contained in:
Ryan Houdek 2024-06-19 03:21:57 -07:00 committed by Alyssa Rosenzweig
parent cc168ce0fb
commit a05644172a
2 changed files with 14 additions and 2 deletions

View File

@ -1147,6 +1147,8 @@ public:
template<size_t ElementSize>
void AVX128_InsertScalarRound(OpcodeArgs);
template<size_t ElementSize>
void AVX128_VDPP(OpcodeArgs);
// End of AVX 128-bit implementation
void InvalidOp(OpcodeArgs);

View File

@ -362,8 +362,8 @@ void OpDispatchBuilder::InstallAVX128Handlers() {
{OPD(3, 0b01, 0x38), 1, &OpDispatchBuilder::AVX128_VINSERT},
{OPD(3, 0b01, 0x39), 1, &OpDispatchBuilder::AVX128_VEXTRACT128},
// TODO: {OPD(3, 0b01, 0x40), 1, &OpDispatchBuilder::VDPPOp<4>},
// TODO: {OPD(3, 0b01, 0x41), 1, &OpDispatchBuilder::VDPPOp<8>},
{OPD(3, 0b01, 0x40), 1, &OpDispatchBuilder::AVX128_VDPP<4>},
{OPD(3, 0b01, 0x41), 1, &OpDispatchBuilder::AVX128_VDPP<8>},
// TODO: {OPD(3, 0b01, 0x42), 1, &OpDispatchBuilder::VMPSADBWOp},
// TODO: {OPD(3, 0b01, 0x46), 1, &OpDispatchBuilder::VPERM2Op},
@ -1718,4 +1718,14 @@ void OpDispatchBuilder::AVX128_InsertScalarRound(OpcodeArgs) {
AVX128_StoreResult_WithOpSize(Op, Op->Dest, AVX128_Zext(Result));
}
template<size_t ElementSize>
void OpDispatchBuilder::AVX128_VDPP(OpcodeArgs) {
const uint64_t Literal = Op->Src[2].Literal();
AVX128_VectorBinaryImpl(Op, GetSrcSize(Op), ElementSize, [this, Literal](size_t, Ref Src1, Ref Src2) {
return DPPOpImpl(OpSize::i128Bit, Src1, Src2, Literal, ElementSize);
});
}
} // namespace FEXCore::IR