// Compare Cached microProgram to mVU.regs().Micro __fi bool mVUcmpProg(microVU& mVU, microProgram& prog, const bool cmpWholeProg) { if ((cmpWholeProg && !memcmp_mmx((u8*)prog.data, mVU.regs().Micro, mVU.microMemSize)) || (!cmpWholeProg && mVUcmpPartial(mVU, prog))) { mVU.prog.cleared = 0; mVU.prog.cur = &prog; mVU.prog.isSame = cmpWholeProg ? 1 : -1; return true; } return false; }
// Compare partial program by only checking compiled ranges... __ri bool mVUcmpPartial(microVU& mVU, microProgram& prog) { std::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; } } return 1; }
// Compare Cached microProgram to mVU->regs().Micro _mVUt __fi bool mVUcmpProg(microProgram& prog, const bool cmpWholeProg) { microVU* mVU = mVUx; if ((cmpWholeProg && !memcmp_mmx((u8*)prog.data, mVU->regs().Micro, mVU->microMemSize)) || (!cmpWholeProg && mVUcmpPartial<vuIndex>(prog))) { mVU->prog.cleared = 0; mVU->prog.cur = &prog; mVU->prog.isSame = cmpWholeProg ? 1 : -1; return 1; } return 0; }
/*__forceinline*/ bool Cmp_ClutBuffer_SavedClut<u32>(u32* saved_clut, u32 csa, u32 clutsize) { u32* clut = GetClutBufferAddress<u32>(csa); return !!memcmp_mmx(saved_clut, clut, clutsize); }