mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-23 05:00:48 +02:00
OpcodeDispatcher: Convert PUNPCKH to Bind handler
This commit is contained in:
3 files changed
+19
-33
No files matched your search
@@ -5036,8 +5036,8 @@ void OpDispatchBuilder::InstallHostSpecificOpcodeHandlers() {
|
||||
{OPD(1, 0b00, 0x14), 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::VPUNPCKLOp, 4>},
|
||||
{OPD(1, 0b01, 0x14), 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::VPUNPCKLOp, 8>},
|
||||
|
||||
{OPD(1, 0b00, 0x15), 1, &OpDispatchBuilder::VPUNPCKHOp<4>},
|
||||
{OPD(1, 0b01, 0x15), 1, &OpDispatchBuilder::VPUNPCKHOp<8>},
|
||||
{OPD(1, 0b00, 0x15), 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::VPUNPCKHOp, 4>},
|
||||
{OPD(1, 0b01, 0x15), 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::VPUNPCKHOp, 8>},
|
||||
|
||||
{OPD(1, 0b00, 0x16), 1, &OpDispatchBuilder::VMOVHPOp},
|
||||
{OPD(1, 0b01, 0x16), 1, &OpDispatchBuilder::VMOVHPOp},
|
||||
@@ -5140,12 +5140,12 @@ void OpDispatchBuilder::InstallHostSpecificOpcodeHandlers() {
|
||||
{OPD(1, 0b01, 0x65), 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::AVXVectorALUOp, IR::OP_VCMPGT, 2>},
|
||||
{OPD(1, 0b01, 0x66), 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::AVXVectorALUOp, IR::OP_VCMPGT, 4>},
|
||||
{OPD(1, 0b01, 0x67), 1, &OpDispatchBuilder::VPACKUSOp<2>},
|
||||
{OPD(1, 0b01, 0x68), 1, &OpDispatchBuilder::VPUNPCKHOp<1>},
|
||||
{OPD(1, 0b01, 0x69), 1, &OpDispatchBuilder::VPUNPCKHOp<2>},
|
||||
{OPD(1, 0b01, 0x6A), 1, &OpDispatchBuilder::VPUNPCKHOp<4>},
|
||||
{OPD(1, 0b01, 0x68), 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::VPUNPCKHOp, 1>},
|
||||
{OPD(1, 0b01, 0x69), 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::VPUNPCKHOp, 2>},
|
||||
{OPD(1, 0b01, 0x6A), 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::VPUNPCKHOp, 4>},
|
||||
{OPD(1, 0b01, 0x6B), 1, &OpDispatchBuilder::VPACKSSOp<4>},
|
||||
{OPD(1, 0b01, 0x6C), 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::VPUNPCKLOp, 8>},
|
||||
{OPD(1, 0b01, 0x6D), 1, &OpDispatchBuilder::VPUNPCKHOp<8>},
|
||||
{OPD(1, 0b01, 0x6D), 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::VPUNPCKHOp, 8>},
|
||||
{OPD(1, 0b01, 0x6E), 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::MOVBetweenGPR_FPR, OpDispatchBuilder::VectorOpType::AVX>},
|
||||
|
||||
{OPD(1, 0b01, 0x6F), 1, &OpDispatchBuilder::VMOVAPS_VMOVAPDOp},
|
||||
@@ -5638,7 +5638,7 @@ void InstallOpcodeHandlers(Context::OperatingMode Mode) {
|
||||
{0x10, 2, &OpDispatchBuilder::MOVVectorUnalignedOp},
|
||||
{0x12, 2, &OpDispatchBuilder::MOVLPOp},
|
||||
{0x14, 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::PUNPCKLOp, 4>},
|
||||
{0x15, 1, &OpDispatchBuilder::PUNPCKHOp<4>},
|
||||
{0x15, 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::PUNPCKHOp, 4>},
|
||||
{0x16, 2, &OpDispatchBuilder::MOVHPDOp},
|
||||
{0x28, 2, &OpDispatchBuilder::MOVVectorAlignedOp},
|
||||
{0x2A, 1, &OpDispatchBuilder::InsertMMX_To_XMM_Vector_CVT_Int_To_Float},
|
||||
@@ -5670,9 +5670,9 @@ void InstallOpcodeHandlers(Context::OperatingMode Mode) {
|
||||
{0x65, 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::VectorALUOp, IR::OP_VCMPGT, 2>},
|
||||
{0x66, 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::VectorALUOp, IR::OP_VCMPGT, 4>},
|
||||
{0x67, 1, &OpDispatchBuilder::PACKUSOp<2>},
|
||||
{0x68, 1, &OpDispatchBuilder::PUNPCKHOp<1>},
|
||||
{0x69, 1, &OpDispatchBuilder::PUNPCKHOp<2>},
|
||||
{0x6A, 1, &OpDispatchBuilder::PUNPCKHOp<4>},
|
||||
{0x68, 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::PUNPCKHOp, 1>},
|
||||
{0x69, 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::PUNPCKHOp, 2>},
|
||||
{0x6A, 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::PUNPCKHOp, 4>},
|
||||
{0x6B, 1, &OpDispatchBuilder::PACKSSOp<4>},
|
||||
{0x70, 1, &OpDispatchBuilder::PSHUFW8ByteOp},
|
||||
|
||||
@@ -5926,7 +5926,7 @@ void InstallOpcodeHandlers(Context::OperatingMode Mode) {
|
||||
{0x10, 2, &OpDispatchBuilder::MOVVectorUnalignedOp},
|
||||
{0x12, 2, &OpDispatchBuilder::MOVLPOp},
|
||||
{0x14, 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::PUNPCKLOp, 8>},
|
||||
{0x15, 1, &OpDispatchBuilder::PUNPCKHOp<8>},
|
||||
{0x15, 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::PUNPCKHOp, 8>},
|
||||
{0x16, 2, &OpDispatchBuilder::MOVHPDOp},
|
||||
{0x19, 7, &OpDispatchBuilder::NOPOp},
|
||||
{0x28, 2, &OpDispatchBuilder::MOVVectorAlignedOp},
|
||||
@@ -5959,12 +5959,12 @@ void InstallOpcodeHandlers(Context::OperatingMode Mode) {
|
||||
{0x65, 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::VectorALUOp, IR::OP_VCMPGT, 2>},
|
||||
{0x66, 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::VectorALUOp, IR::OP_VCMPGT, 4>},
|
||||
{0x67, 1, &OpDispatchBuilder::PACKUSOp<2>},
|
||||
{0x68, 1, &OpDispatchBuilder::PUNPCKHOp<1>},
|
||||
{0x69, 1, &OpDispatchBuilder::PUNPCKHOp<2>},
|
||||
{0x6A, 1, &OpDispatchBuilder::PUNPCKHOp<4>},
|
||||
{0x68, 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::PUNPCKHOp, 1>},
|
||||
{0x69, 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::PUNPCKHOp, 2>},
|
||||
{0x6A, 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::PUNPCKHOp, 4>},
|
||||
{0x6B, 1, &OpDispatchBuilder::PACKSSOp<4>},
|
||||
{0x6C, 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::PUNPCKLOp, 8>},
|
||||
{0x6D, 1, &OpDispatchBuilder::PUNPCKHOp<8>},
|
||||
{0x6D, 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::PUNPCKHOp, 8>},
|
||||
{0x6E, 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::MOVBetweenGPR_FPR, OpDispatchBuilder::VectorOpType::SSE>},
|
||||
{0x6F, 1, &OpDispatchBuilder::MOVVectorAlignedOp},
|
||||
{0x70, 1, &OpDispatchBuilder::PSHUFDOp},
|
||||
|
||||
@@ -465,8 +465,7 @@ public:
|
||||
void MOVMSKOp(OpcodeArgs);
|
||||
void MOVMSKOpOne(OpcodeArgs);
|
||||
void PUNPCKLOp(OpcodeArgs, size_t ElementSize);
|
||||
template<size_t ElementSize>
|
||||
void PUNPCKHOp(OpcodeArgs);
|
||||
void PUNPCKHOp(OpcodeArgs, size_t ElementSize);
|
||||
void PSHUFBOp(OpcodeArgs);
|
||||
template<bool Low>
|
||||
void PSHUFWOp(OpcodeArgs);
|
||||
@@ -720,8 +719,7 @@ public:
|
||||
void VPSRLDOp(OpcodeArgs);
|
||||
void VPSRLDQOp(OpcodeArgs);
|
||||
|
||||
template<size_t ElementSize>
|
||||
void VPUNPCKHOp(OpcodeArgs);
|
||||
void VPUNPCKHOp(OpcodeArgs, size_t ElementSize);
|
||||
|
||||
void VPUNPCKLOp(OpcodeArgs, size_t ElementSize);
|
||||
|
||||
|
||||
@@ -810,8 +810,7 @@ void OpDispatchBuilder::VPUNPCKLOp(OpcodeArgs, size_t ElementSize) {
|
||||
StoreResult(FPRClass, Op, Result, -1);
|
||||
}
|
||||
|
||||
template<size_t ElementSize>
|
||||
void OpDispatchBuilder::PUNPCKHOp(OpcodeArgs) {
|
||||
void OpDispatchBuilder::PUNPCKHOp(OpcodeArgs, size_t ElementSize) {
|
||||
auto Size = GetSrcSize(Op);
|
||||
Ref Dest = LoadSource(FPRClass, Op, Op->Dest, Op->Flags);
|
||||
Ref Src = LoadSource(FPRClass, Op, Op->Src[0], Op->Flags);
|
||||
@@ -820,13 +819,7 @@ void OpDispatchBuilder::PUNPCKHOp(OpcodeArgs) {
|
||||
StoreResult(FPRClass, Op, ALUOp, -1);
|
||||
}
|
||||
|
||||
template void OpDispatchBuilder::PUNPCKHOp<1>(OpcodeArgs);
|
||||
template void OpDispatchBuilder::PUNPCKHOp<2>(OpcodeArgs);
|
||||
template void OpDispatchBuilder::PUNPCKHOp<4>(OpcodeArgs);
|
||||
template void OpDispatchBuilder::PUNPCKHOp<8>(OpcodeArgs);
|
||||
|
||||
template<size_t ElementSize>
|
||||
void OpDispatchBuilder::VPUNPCKHOp(OpcodeArgs) {
|
||||
void OpDispatchBuilder::VPUNPCKHOp(OpcodeArgs, size_t ElementSize) {
|
||||
const auto SrcSize = GetSrcSize(Op);
|
||||
const auto Is128Bit = SrcSize == Core::CPUState::XMM_SSE_REG_SIZE;
|
||||
|
||||
@@ -846,11 +839,6 @@ void OpDispatchBuilder::VPUNPCKHOp(OpcodeArgs) {
|
||||
StoreResult(FPRClass, Op, Result, -1);
|
||||
}
|
||||
|
||||
template void OpDispatchBuilder::VPUNPCKHOp<1>(OpcodeArgs);
|
||||
template void OpDispatchBuilder::VPUNPCKHOp<2>(OpcodeArgs);
|
||||
template void OpDispatchBuilder::VPUNPCKHOp<4>(OpcodeArgs);
|
||||
template void OpDispatchBuilder::VPUNPCKHOp<8>(OpcodeArgs);
|
||||
|
||||
Ref OpDispatchBuilder::GeneratePSHUFBMask(uint8_t SrcSize) {
|
||||
// PSHUFB doesn't 100% match VTBL behaviour
|
||||
// VTBL will set the element zero if the index is greater than
|
||||
|
||||
Reference in new issue
Block a user