AVX128: Implement support for vphminposuw

Reuses the non-AVX implementation since it only operates on 128-bits.
This commit is contained in:
Ryan Houdek 2024-06-19 02:53:16 -07:00 committed by Alyssa Rosenzweig
parent 8e32763ada
commit cebb032bd3
2 changed files with 8 additions and 1 deletions

View File

@ -1135,6 +1135,8 @@ public:
void AVX128_VPCMPISTRI(OpcodeArgs);
void AVX128_VPCMPISTRM(OpcodeArgs);
void AVX128_PHMINPOSUW(OpcodeArgs);
// End of AVX 128-bit implementation
void InvalidOp(OpcodeArgs);

View File

@ -312,7 +312,7 @@ void OpDispatchBuilder::InstallAVX128Handlers() {
{OPD(2, 0b01, 0x3F), 1, &OpDispatchBuilder::AVX128_VectorALU<IR::OP_VUMAX, 4>},
{OPD(2, 0b01, 0x40), 1, &OpDispatchBuilder::AVX128_VectorALU<IR::OP_VMUL, 4>},
// TODO: {OPD(2, 0b01, 0x41), 1, &OpDispatchBuilder::PHMINPOSUWOp},
{OPD(2, 0b01, 0x41), 1, &OpDispatchBuilder::AVX128_PHMINPOSUW},
{OPD(2, 0b01, 0x45), 1, &OpDispatchBuilder::AVX128_VPSRLV},
{OPD(2, 0b01, 0x46), 1, &OpDispatchBuilder::AVX128_VPSRAVD},
{OPD(2, 0b01, 0x47), 1, &OpDispatchBuilder::AVX128_VPSLLV},
@ -1682,4 +1682,9 @@ void OpDispatchBuilder::AVX128_VPCMPISTRM(OpcodeArgs) {
AVX128_StoreXMMRegister(0, LoadZeroVector(OpSize::i128Bit), true);
}
void OpDispatchBuilder::AVX128_PHMINPOSUW(OpcodeArgs) {
Ref Result = PHMINPOSUWOpImpl(Op);
AVX128_StoreResult_WithOpSize(Op, Op->Dest, AVX128_Zext(Result));
}
} // namespace FEXCore::IR