From d5a5079bde7a8f97d643f71c8255433ff092179c Mon Sep 17 00:00:00 2001 From: Jean-Philip Desjardins Date: Thu, 19 Dec 2024 17:23:52 -0500 Subject: [PATCH] =?UTF-8?q?=EF=BB=BFUse=20MD=5FPushRelElementExpand=20for?= =?UTF-8?q?=20broadcast=20operations.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/ee/VUShared.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/ee/VUShared.cpp b/Source/ee/VUShared.cpp index 79af4c136d..739f2b7140 100644 --- a/Source/ee/VUShared.cpp +++ b/Source/ee/VUShared.cpp @@ -189,6 +189,14 @@ void VUShared::PushBcElement(CMipsJitter* codeGen, size_t offset) { codeGen->MD_PushCstExpand(1.0f); } + else if( + (offset >= offsetof(CMIPS, m_State.nCOP2[1].nV0)) && + (offset <= offsetof(CMIPS, m_State.nCOP2[31].nV3))) + { + size_t vectorOffset = offset & ~(sizeof(uint128) - 1); + size_t vectorElem = (offset - offsetof(CMIPS, m_State.nCOP2[0].nV0)) % sizeof(uint128); + codeGen->MD_PushRelElementExpand(vectorOffset, vectorElem / 4); + } else { codeGen->MD_PushRelExpand(offset);