mirror of https://github.com/PCSX2/pcsx2.git
pcsx2-ee: more cleaning of BaseBlockArray
* Remove useless erase(first) * Move reserve in private section * if 0 GetByX86
This commit is contained in:
parent
9c75c84e83
commit
2f0077a081
|
@ -45,6 +45,7 @@ int BaseBlocks::LastIndex(u32 startpc) const
|
||||||
return imin;
|
return imin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
BASEBLOCKEX* BaseBlocks::GetByX86(uptr ip)
|
BASEBLOCKEX* BaseBlocks::GetByX86(uptr ip)
|
||||||
{
|
{
|
||||||
if (0 == blocks.size())
|
if (0 == blocks.size())
|
||||||
|
@ -67,6 +68,7 @@ BASEBLOCKEX* BaseBlocks::GetByX86(uptr ip)
|
||||||
|
|
||||||
return &blocks[imin];
|
return &blocks[imin];
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void BaseBlocks::Link(u32 pc, s32* jumpptr)
|
void BaseBlocks::Link(u32 pc, s32* jumpptr)
|
||||||
{
|
{
|
||||||
|
|
|
@ -60,6 +60,12 @@ class BaseBlockArray {
|
||||||
blocks = newMem;
|
blocks = newMem;
|
||||||
pxAssert(blocks != NULL);
|
pxAssert(blocks != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void reserve(u32 size)
|
||||||
|
{
|
||||||
|
resize(size);
|
||||||
|
_Reserved = size;
|
||||||
|
}
|
||||||
public:
|
public:
|
||||||
~BaseBlockArray()
|
~BaseBlockArray()
|
||||||
{
|
{
|
||||||
|
@ -80,6 +86,7 @@ public:
|
||||||
reserve(_Reserved + 0x2000); // some games requires even more!
|
reserve(_Reserved + 0x2000); // some games requires even more!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Insert the the new BASEBLOCKEX by startpc order
|
||||||
int imin = 0, imax = _Size, imid;
|
int imin = 0, imax = _Size, imid;
|
||||||
|
|
||||||
while (imin < imax) {
|
while (imin < imax) {
|
||||||
|
@ -106,12 +113,6 @@ public:
|
||||||
return &blocks[imin];
|
return &blocks[imin];
|
||||||
}
|
}
|
||||||
|
|
||||||
void reserve(u32 size)
|
|
||||||
{
|
|
||||||
resize(size);
|
|
||||||
_Reserved = size;
|
|
||||||
}
|
|
||||||
|
|
||||||
__fi BASEBLOCKEX &operator[](int idx) const
|
__fi BASEBLOCKEX &operator[](int idx) const
|
||||||
{
|
{
|
||||||
return *(blocks + idx);
|
return *(blocks + idx);
|
||||||
|
@ -127,11 +128,6 @@ public:
|
||||||
return _Size;
|
return _Size;
|
||||||
}
|
}
|
||||||
|
|
||||||
__fi void erase(s32 first)
|
|
||||||
{
|
|
||||||
return erase(first, first + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
__fi void erase(s32 first, s32 last)
|
__fi void erase(s32 first, s32 last)
|
||||||
{
|
{
|
||||||
int range = last - first;
|
int range = last - first;
|
||||||
|
@ -161,12 +157,6 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
BaseBlocks(uptr recompiler_) :
|
|
||||||
recompiler(recompiler_),
|
|
||||||
blocks(0x4000)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetJITCompile( void (*recompiler_)() )
|
void SetJITCompile( void (*recompiler_)() )
|
||||||
{
|
{
|
||||||
recompiler = (uptr)recompiler_;
|
recompiler = (uptr)recompiler_;
|
||||||
|
@ -174,7 +164,7 @@ public:
|
||||||
|
|
||||||
BASEBLOCKEX* New(u32 startpc, uptr fnptr);
|
BASEBLOCKEX* New(u32 startpc, uptr fnptr);
|
||||||
int LastIndex (u32 startpc) const;
|
int LastIndex (u32 startpc) const;
|
||||||
BASEBLOCKEX* GetByX86(uptr ip);
|
//BASEBLOCKEX* GetByX86(uptr ip);
|
||||||
|
|
||||||
__fi int Index (u32 startpc) const
|
__fi int Index (u32 startpc) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -881,6 +881,7 @@ void R5900::Dynarec::OpcodeImpl::recBREAK()
|
||||||
//g_branch = 2;
|
//g_branch = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Size is in dwords (4 bytes)
|
||||||
void recClear(u32 addr, u32 size)
|
void recClear(u32 addr, u32 size)
|
||||||
{
|
{
|
||||||
// necessary since recompiler doesn't call femms/emms
|
// necessary since recompiler doesn't call femms/emms
|
||||||
|
|
Loading…
Reference in New Issue