diff --git a/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp b/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp index 4e69415d6..1b2da542e 100644 --- a/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp +++ b/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp @@ -5136,8 +5136,8 @@ void OpDispatchBuilder::InstallHostSpecificOpcodeHandlers() { {OPD(1, 0b00, 0x77), 1, &OpDispatchBuilder::VZEROOp}, - {OPD(1, 0b01, 0x7C), 1, &OpDispatchBuilder::VHADDPOp}, - {OPD(1, 0b11, 0x7C), 1, &OpDispatchBuilder::VHADDPOp}, + {OPD(1, 0b01, 0x7C), 1, &OpDispatchBuilder::VHADDPOp}, + {OPD(1, 0b11, 0x7C), 1, &OpDispatchBuilder::VHADDPOp}, {OPD(1, 0b01, 0x7D), 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::VHSUBPOp, OpSize::i64Bit>}, {OPD(1, 0b11, 0x7D), 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::VHSUBPOp, OpSize::i32Bit>}, @@ -5218,8 +5218,8 @@ void OpDispatchBuilder::InstallHostSpecificOpcodeHandlers() { {OPD(1, 0b01, 0xFE), 1, &OpDispatchBuilder::Bind<&OpDispatchBuilder::AVXVectorALUOp, IR::OP_VADD, OpSize::i32Bit>}, {OPD(2, 0b01, 0x00), 1, &OpDispatchBuilder::VPSHUFBOp}, - {OPD(2, 0b01, 0x01), 1, &OpDispatchBuilder::VHADDPOp}, - {OPD(2, 0b01, 0x02), 1, &OpDispatchBuilder::VHADDPOp}, + {OPD(2, 0b01, 0x01), 1, &OpDispatchBuilder::VHADDPOp}, + {OPD(2, 0b01, 0x02), 1, &OpDispatchBuilder::VHADDPOp}, {OPD(2, 0b01, 0x03), 1, &OpDispatchBuilder::VPHADDSWOp}, {OPD(2, 0b01, 0x04), 1, &OpDispatchBuilder::VPMADDUBSWOp}, diff --git a/FEXCore/Source/Interface/Core/OpcodeDispatcher.h b/FEXCore/Source/Interface/Core/OpcodeDispatcher.h index 76855df6a..f422bbf78 100644 --- a/FEXCore/Source/Interface/Core/OpcodeDispatcher.h +++ b/FEXCore/Source/Interface/Core/OpcodeDispatcher.h @@ -583,7 +583,7 @@ public: void VEXTRACT128Op(OpcodeArgs); - template + template void VHADDPOp(OpcodeArgs); void VHSUBPOp(OpcodeArgs, IR::OpSize ElementSize); diff --git a/FEXCore/Source/Interface/Core/OpcodeDispatcher/Vector.cpp b/FEXCore/Source/Interface/Core/OpcodeDispatcher/Vector.cpp index 786fcab8d..fdb86b16a 100644 --- a/FEXCore/Source/Interface/Core/OpcodeDispatcher/Vector.cpp +++ b/FEXCore/Source/Interface/Core/OpcodeDispatcher/Vector.cpp @@ -1439,9 +1439,9 @@ void OpDispatchBuilder::VANDNOp(OpcodeArgs) { StoreResult(FPRClass, Op, Dest, OpSize::iInvalid); } -template +template void OpDispatchBuilder::VHADDPOp(OpcodeArgs) { - const auto SrcSize = GetSrcSize(Op); + const auto SrcSize = OpSizeFromSrc(Op); const auto Is256Bit = SrcSize == Core::CPUState::XMM_AVX_REG_SIZE; Ref Src1 = LoadSource(FPRClass, Op, Op->Src[0], Op->Flags); @@ -1458,10 +1458,10 @@ void OpDispatchBuilder::VHADDPOp(OpcodeArgs) { StoreResult(FPRClass, Op, Dest, OpSize::iInvalid); } -template void OpDispatchBuilder::VHADDPOp(OpcodeArgs); -template void OpDispatchBuilder::VHADDPOp(OpcodeArgs); -template void OpDispatchBuilder::VHADDPOp(OpcodeArgs); -template void OpDispatchBuilder::VHADDPOp(OpcodeArgs); +template void OpDispatchBuilder::VHADDPOp(OpcodeArgs); +template void OpDispatchBuilder::VHADDPOp(OpcodeArgs); +template void OpDispatchBuilder::VHADDPOp(OpcodeArgs); +template void OpDispatchBuilder::VHADDPOp(OpcodeArgs); void OpDispatchBuilder::VBROADCASTOp(OpcodeArgs, IR::OpSize ElementSize) { const auto DstSize = OpSizeFromDst(Op); @@ -4235,7 +4235,7 @@ template void OpDispatchBuilder::DPPOp(OpcodeArgs); Ref OpDispatchBuilder::VDPPSOpImpl(OpcodeArgs, const X86Tables::DecodedOperand& Src1, const X86Tables::DecodedOperand& Src2, const X86Tables::DecodedOperand& Imm) { - constexpr size_t ElementSize = OpSize::i32Bit; + constexpr auto ElementSize = OpSize::i32Bit; const uint8_t Mask = Imm.Literal(); const uint8_t SrcMask = Mask >> 4; const uint8_t DstMask = Mask & 0xF; diff --git a/FEXCore/Source/Interface/IR/IR.json b/FEXCore/Source/Interface/IR/IR.json index d0f724704..4b03b454e 100644 --- a/FEXCore/Source/Interface/IR/IR.json +++ b/FEXCore/Source/Interface/IR/IR.json @@ -2232,7 +2232,7 @@ "DestSize": "RegisterSize", "NumElements": "RegisterSize / ElementSize" }, - "FPR = VFAddP u8:#RegisterSize, u8:#ElementSize, FPR:$VectorLower, FPR:$VectorUpper": { + "FPR = VFAddP OpSize:#RegisterSize, OpSize:#ElementSize, FPR:$VectorLower, FPR:$VectorUpper": { "Desc": "Does a horizontal pairwise add of elements across the two source vectors with float element types", "DestSize": "RegisterSize", "NumElements": "RegisterSize / ElementSize"