DSPLLE: attempt to fix extended ops please review this patch carefully.

thinks to note
- All ext commands should call zeroWriteBackLog() (before changing any 
reg)
- increase/decrease ar functions now only return a value not actually 
change anything


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4018 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee
2009-08-19 21:37:24 +00:00
parent 8155439dd1
commit b787f5f8f7
9 changed files with 340 additions and 266 deletions

View File

@ -128,11 +128,13 @@ extern const int opcodes_ext_size;
extern u8 opSize[OPTABLE_SIZE];
extern const DSPOPCTemplate cw;
#define WRITEBACKLOGSIZE 7
extern dspInstFunc opTable[];
extern bool opTableUseExt[OPTABLE_SIZE];
extern dspInstFunc extOpTable[EXT_OPTABLE_SIZE];
extern dspInstFunc currentEpilogeFunc;
extern u16 writeBackLog[WRITEBACKLOGSIZE];
extern int writeBackLogIdx[WRITEBACKLOGSIZE];
// Predefined labels
struct pdlabel_t
@ -151,15 +153,16 @@ const char *pdregname(int val);
const char *pdregnamelong(int val);
void InitInstructionTable();
void applyWriteBackLog();
void zeroWriteBackLog();
inline void ExecuteInstruction(const UDSPInstruction& inst)
{
if (opTableUseExt[inst.hex])
extOpTable[inst.hex & 0xFF](inst);
opTable[inst.hex](inst);
if (currentEpilogeFunc) {
currentEpilogeFunc(inst);
currentEpilogeFunc = NULL;
if (opTableUseExt[inst.hex]) {
applyWriteBackLog();
}
}