Add flags checking in SUBA instructions.

This commit is contained in:
Jean-Philip Desjardins 2016-08-30 18:12:04 -04:00
parent 54ffc643f4
commit 1001c0ded9
4 changed files with 17 additions and 16 deletions

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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*);