AVX128: Implement support for vinsertps

This one actually reuses the core base implementation which is nice.
This commit is contained in:
Ryan Houdek authored and Alyssa Rosenzweig committed 2024-06-24 14:27:19 -04:00
1 parent 6012eb051b
commit c19d489c9a
2 files changed
+7 -1

No files matched your search

@@ -1087,6 +1087,7 @@ public:
void AVX128_VPSLLDQ(OpcodeArgs);
void AVX128_VINSERT(OpcodeArgs);
void AVX128_VINSERTPS(OpcodeArgs);
// End of AVX 128-bit implementation
@@ -356,7 +356,7 @@ void OpDispatchBuilder::InstallAVX128Handlers() {
{OPD(3, 0b01, 0x18), 1, &OpDispatchBuilder::AVX128_VINSERT},
// TODO: {OPD(3, 0b01, 0x19), 1, &OpDispatchBuilder::VEXTRACT128Op},
{OPD(3, 0b01, 0x20), 1, &OpDispatchBuilder::AVX128_VPINSRB},
// TODO: {OPD(3, 0b01, 0x21), 1, &OpDispatchBuilder::VINSERTPSOp},
{OPD(3, 0b01, 0x21), 1, &OpDispatchBuilder::VINSERTPSOp},
{OPD(3, 0b01, 0x22), 1, &OpDispatchBuilder::AVX128_VPINSRDQ},
{OPD(3, 0b01, 0x38), 1, &OpDispatchBuilder::AVX128_VINSERT},
@@ -1369,4 +1369,9 @@ void OpDispatchBuilder::AVX128_VINSERT(OpcodeArgs) {
AVX128_StoreResult_WithOpSize(Op, Op->Dest, Result);
}
void OpDispatchBuilder::AVX128_VINSERTPS(OpcodeArgs) {
Ref Result = InsertPSOpImpl(Op, Op->Src[0], Op->Src[1], Op->Src[2]);
AVX128_StoreResult_WithOpSize(Op, Op->Dest, AVX128_Zext(Result));
}
} // namespace FEXCore::IR