microVU: minor changes...

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@967 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
cottonvibes 2009-04-13 05:39:18 +00:00
parent 557564edc2
commit 6e1805de36
2 changed files with 4 additions and 7 deletions

View File

@ -53,12 +53,10 @@ struct microAllocInfo {
microRegInfo regs; // Pipeline info microRegInfo regs; // Pipeline info
microTempRegInfo regsTemp; // Temp Pipeline info (used so that new pipeline info isn't conflicting between upper and lower instructions in the same cycle) microTempRegInfo regsTemp; // Temp Pipeline info (used so that new pipeline info isn't conflicting between upper and lower instructions in the same cycle)
u8 branch; // 0 = No Branch, 1 = B. 2 = BAL, 3~8 = Conditional Branches, 9 = JALR, 10 = JR u8 branch; // 0 = No Branch, 1 = B. 2 = BAL, 3~8 = Conditional Branches, 9 = JALR, 10 = JR
//u8 maxStall; // Helps in computing stalls (stores the max amount of cycles to stall for the current opcodes)
//u8 divFlag;
u32 cycles; // Cycles for current block u32 cycles; // Cycles for current block
u32 count; // Number of VU 64bit instructions ran (starts at 0 for each block) u32 count; // Number of VU 64bit instructions ran (starts at 0 for each block)
u32 curPC; // Current PC u32 curPC; // Current PC
u32 startPC; // Start PC for Cur Block u32 startPC; // Start PC for Cur Block
u32 info[pSize/8]; // Info for Instructions in current block u32 info[pSize/8]; // Info for Instructions in current block
u8 stall[pSize/8]; // Info on how much each instruction stalled u8 stall[pSize/8]; // Info on how much each instruction stalled (stores the max amount of cycles to stall for the current opcodes)
}; };

View File

@ -82,7 +82,7 @@ microVUt(void) mVUsetFlags(int* bStatus, int* bMac) {
// Ensure last ~4+ instructions update mac flags // Ensure last ~4+ instructions update mac flags
int endPC = iPC; int endPC = iPC;
int aCount = 1; // Amount of instructions needed to get 4 valid status/mac flag instances int aCount = 1; // Amount of instructions needed to get 4 valid status/mac flag instances
for (int i = mVUcount; i > 0; i++, aCount++;) { for (int i = mVUcount; i > 0; i--, aCount++) {
if (doStatus) { mVUinfo |= _doMac; if (i >= 4) { break; } } if (doStatus) { mVUinfo |= _doMac; if (i >= 4) { break; } }
incPC2(-2); incPC2(-2);
} }
@ -96,10 +96,9 @@ microVUt(void) mVUsetFlags(int* bStatus, int* bMac) {
int xS = 0, yS = 1, zS = 0; int xS = 0, yS = 1, zS = 0;
int xM = 0, yM = 1, zM = 0; int xM = 0, yM = 1, zM = 0;
int xCount = mVUcount; // Backup count int xCount = mVUcount; // Backup count
mVUcount = 0;
iPC = mVUstartPC; iPC = mVUstartPC;
for (int i = 0; i < xCount; i++) { for (mVUcount = 0; mVUcount < xCount; mVUcount++) {
if ((xCount - i) > aCount) mVUstatusFlagOp<vuIndex>(); // Don't Optimize out on the last ~4+ instructions if ((xCount - mVUcount) > aCount) mVUstatusFlagOp<vuIndex>(); // Don't Optimize out on the last ~4+ instructions
if (doStatus||isFSSET||doDivFlag) { mVUinfo |= (xStatus&3) << 12; } // _fsInstance if (doStatus||isFSSET||doDivFlag) { mVUinfo |= (xStatus&3) << 12; } // _fsInstance
if (doMac) { mVUinfo |= (xMac&3) << 10; } // _fmInstance if (doMac) { mVUinfo |= (xMac&3) << 10; } // _fmInstance