diff --git a/Source/ee/COP_VU.cpp b/Source/ee/COP_VU.cpp index 8b83866e..32d6aba9 100644 --- a/Source/ee/COP_VU.cpp +++ b/Source/ee/COP_VU.cpp @@ -546,7 +546,7 @@ void CCOP_VU::VADDAbc() // void CCOP_VU::VSUBAbc() { - VUShared::SUBAbc(m_codeGen, m_nDest, m_nFS, m_nFT, m_nBc); + VUShared::SUBAbc(m_codeGen, m_nDest, m_nFS, m_nFT, m_nBc, 0); } // @@ -598,7 +598,7 @@ void CCOP_VU::VADDA() //0B void CCOP_VU::VSUBA() { - VUShared::SUBA(m_codeGen, m_nDest, m_nFS, m_nFT); + VUShared::SUBA(m_codeGen, m_nDest, m_nFS, m_nFT, 0); } //0C diff --git a/Source/ee/MA_VU_Upper.cpp b/Source/ee/MA_VU_Upper.cpp index 6204e99e..8325d10e 100644 --- a/Source/ee/MA_VU_Upper.cpp +++ b/Source/ee/MA_VU_Upper.cpp @@ -283,7 +283,7 @@ void CMA_VU::CUpper::ADDAbc() //01 void CMA_VU::CUpper::SUBAbc() { - VUShared::SUBAbc(m_codeGen, m_nDest, m_nFS, m_nFT, m_nBc); + VUShared::SUBAbc(m_codeGen, m_nDest, m_nFS, m_nFT, m_nBc, m_relativePipeTime); } //02 @@ -335,7 +335,7 @@ void CMA_VU::CUpper::ADDA() //0B void CMA_VU::CUpper::SUBA() { - VUShared::SUBA(m_codeGen, m_nDest, m_nFS, m_nFT); + VUShared::SUBA(m_codeGen, m_nDest, m_nFS, m_nFT, m_relativePipeTime); } ////////////////////////////////////////////////// @@ -403,7 +403,7 @@ void CMA_VU::CUpper::ADDAi() //09 void CMA_VU::CUpper::SUBAi() { - VUShared::SUBAi(m_codeGen, m_nDest, m_nFS); + VUShared::SUBAi(m_codeGen, m_nDest, m_nFS, m_relativePipeTime); } //0A diff --git a/Source/ee/VUShared.cpp b/Source/ee/VUShared.cpp index f95c56d5..409f7795 100644 --- a/Source/ee/VUShared.cpp +++ b/Source/ee/VUShared.cpp @@ -263,7 +263,7 @@ void VUShared::MADDA_base(CMipsJitter* codeGen, uint8 dest, size_t fs, size_t ft TestSZFlags(codeGen, dest, offsetof(CMIPS, m_State.nCOP2A), relativePipeTime); } -void VUShared::SUBA_base(CMipsJitter* codeGen, uint8 dest, size_t fs, size_t ft, bool expand) +void VUShared::SUBA_base(CMipsJitter* codeGen, uint8 dest, size_t fs, size_t ft, bool expand, uint32 relativePipeTime) { codeGen->MD_PushRel(fs); if(expand) @@ -276,6 +276,7 @@ void VUShared::SUBA_base(CMipsJitter* codeGen, uint8 dest, size_t fs, size_t ft, } codeGen->MD_SubS(); PullVector(codeGen, dest, offsetof(CMIPS, m_State.nCOP2A)); + TestSZFlags(codeGen, dest, offsetof(CMIPS, m_State.nCOP2A), relativePipeTime); } void VUShared::MSUB_base(CMipsJitter* codeGen, uint8 dest, size_t fd, size_t fs, size_t ft, bool expand) @@ -1308,28 +1309,28 @@ void VUShared::SUBq(CMipsJitter* codeGen, uint8 dest, uint8 fd, uint8 fs) PullVector(codeGen, dest, offsetof(CMIPS, m_State.nCOP2[fd])); } -void VUShared::SUBA(CMipsJitter* codeGen, uint8 dest, uint8 fs, uint8 ft) +void VUShared::SUBA(CMipsJitter* codeGen, uint8 dest, uint8 fs, uint8 ft, uint32 relativePipeTime) { SUBA_base(codeGen, dest, offsetof(CMIPS, m_State.nCOP2[fs]), offsetof(CMIPS, m_State.nCOP2[ft]), - false); + false, relativePipeTime); } -void VUShared::SUBAbc(CMipsJitter* codeGen, uint8 dest, uint8 fs, uint8 ft, uint8 bc) +void VUShared::SUBAbc(CMipsJitter* codeGen, uint8 dest, uint8 fs, uint8 ft, uint8 bc, uint32 relativePipeTime) { SUBA_base(codeGen, dest, offsetof(CMIPS, m_State.nCOP2[fs]), offsetof(CMIPS, m_State.nCOP2[ft].nV[bc]), - true); + true, relativePipeTime); } -void VUShared::SUBAi(CMipsJitter* codeGen, uint8 dest, uint8 fs) +void VUShared::SUBAi(CMipsJitter* codeGen, uint8 dest, uint8 fs, uint32 relativePipeTime) { SUBA_base(codeGen, dest, offsetof(CMIPS, m_State.nCOP2[fs]), offsetof(CMIPS, m_State.nCOP2I), - true); + true, relativePipeTime); } void VUShared::WAITQ(CMipsJitter* codeGen) diff --git a/Source/ee/VUShared.h b/Source/ee/VUShared.h index 14939acd..531f10b5 100644 --- a/Source/ee/VUShared.h +++ b/Source/ee/VUShared.h @@ -80,7 +80,7 @@ namespace VUShared void ADDA_base(CMipsJitter*, uint8, size_t, size_t, bool); void MADD_base(CMipsJitter*, uint8, size_t, size_t, size_t, bool, uint32); void MADDA_base(CMipsJitter*, uint8, size_t, size_t, bool, uint32); - void SUBA_base(CMipsJitter*, uint8, size_t, size_t, bool); + void SUBA_base(CMipsJitter*, uint8, size_t, size_t, bool, uint32); void MSUB_base(CMipsJitter*, uint8, size_t, size_t, size_t, bool); void MSUBA_base(CMipsJitter*, uint8, size_t, size_t, bool, uint32); @@ -162,9 +162,9 @@ namespace VUShared void SUBbc(CMipsJitter*, uint8, uint8, uint8, uint8, uint8, uint32); void SUBi(CMipsJitter*, uint8, uint8, uint8, uint32); void SUBq(CMipsJitter*, uint8, uint8, uint8); - void SUBA(CMipsJitter*, uint8, uint8, uint8); - void SUBAbc(CMipsJitter*, uint8, uint8, uint8, uint8); - void SUBAi(CMipsJitter*, uint8, uint8); + void SUBA(CMipsJitter*, uint8, uint8, uint8, uint32); + void SUBAbc(CMipsJitter*, uint8, uint8, uint8, uint8, uint32); + void SUBAi(CMipsJitter*, uint8, uint8, uint32); void WAITQ(CMipsJitter*); void FlushPipeline(const PIPEINFO&, CMipsJitter*);