microVU: minor changes to list traversing in-case the compiler doesn't already optimize these out.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3453 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
cottonvibes 2010-07-11 03:32:35 +00:00
parent 749b180005
commit b0ec1394d1
2 changed files with 12 additions and 12 deletions

View File

@ -133,8 +133,8 @@ _f void mVUreset(mV) {
mVU->prog.x86end = (u8*)((uptr)z + (uptr)(mVU->cacheSize - mVUcacheSafeZone)); // "Safe Zone"
for (u32 i = 0; i < (mVU->progSize / 2); i++) {
deque<microProgram*>::iterator it = mVU->prog.prog[i]->begin();
for ( ; it != mVU->prog.prog[i]->end(); it++) {
deque<microProgram*>::iterator it(mVU->prog.prog[i]->begin());
for ( ; it != mVU->prog.prog[i]->end(); ++it) {
if (!isVU1) mVUdeleteProg<0>(it[0]);
else mVUdeleteProg<1>(it[0]);
}
@ -152,8 +152,8 @@ _f void mVUclose(mV) {
// Delete Programs and Block Managers
for (u32 i = 0; i < (mVU->progSize / 2); i++) {
deque<microProgram*>::iterator it = mVU->prog.prog[i]->begin();
for ( ; it != mVU->prog.prog[i]->end(); it++) {
deque<microProgram*>::iterator it(mVU->prog.prog[i]->begin());
for ( ; it != mVU->prog.prog[i]->end(); ++it) {
if (!isVU1) mVUdeleteProg<0>(it[0]);
else mVUdeleteProg<1>(it[0]);
}
@ -251,8 +251,8 @@ _mVUt _f void mVUcacheProg(microProgram& prog) {
// Compare partial program by only checking compiled ranges...
_mVUt _f bool mVUcmpPartial(microProgram& prog) {
microVU* mVU = mVUx;
deque<microRange>::const_iterator it = prog.ranges->begin();
for ( ; it != prog.ranges->end(); it++) {
deque<microRange>::const_iterator it(prog.ranges->begin());
for ( ; it != prog.ranges->end(); ++it) {
if((it[0].start<0)||(it[0].end<0)) { DevCon.Error("microVU%d: Negative Range![%d][%d]", mVU->index, it[0].start, it[0].end); }
if (memcmp_mmx(cmpOffset(prog.data), cmpOffset(mVU->regs->Micro), ((it[0].end + 8) - it[0].start))) {
return 0;
@ -281,7 +281,7 @@ _mVUt _f void* mVUsearchProg(u32 startPC, uptr pState) {
microProgramList* list = mVU->prog.prog [startPC/8];
if(!quick.prog) { // If null, we need to search for new program
deque<microProgram*>::iterator it(list->begin());
for ( ; it != list->end(); it++) {
for ( ; it != list->end(); ++it) {
if (mVUcmpProg<vuIndex>(*it[0], 0)) {
quick.block = it[0]->block[startPC/8];
quick.prog = it[0];

View File

@ -60,8 +60,8 @@ void mVUsetupRange(microVU* mVU, s32 pc, bool isStartPC) {
pc &= mVU->microMemSize - 8;
if (isStartPC) { // Check if startPC is already within a block we've recompiled
deque<microRange>::const_iterator it = ranges->begin();
for ( ; it != ranges->end(); it++) {
deque<microRange>::const_iterator it(ranges->begin());
for ( ; it != ranges->end(); ++it) {
if ((pc >= it[0].start) && (pc <= it[0].end)) {
if (it[0].start != it[0].end)
return; // Last case makes sure its not a 1-opcode EvilBlock
@ -82,8 +82,8 @@ void mVUsetupRange(microVU* mVU, s32 pc, bool isStartPC) {
bool mergedRange = 0;
s32 rStart = mVUrange.start;
s32 rEnd = mVUrange.end;
deque<microRange>::iterator it = ranges->begin();
for (it++; it != ranges->end(); it++) {
deque<microRange>::iterator it(ranges->begin());
for (++it; it != ranges->end(); ++it) {
if((it[0].start >= rStart) && (it[0].start <= rEnd)) {
it[0].end = aMax(it[0].end, rEnd);
mergedRange = 1;