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