mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-06-11 04:29:37 +00:00
Improve nuinterpreter.h
This commit is contained in:
parent
cc56e391bd
commit
95fb5d053d
|
@ -4,29 +4,7 @@
|
|||
#include "ppcmmu.h"
|
||||
#include "ppcdefs.h"
|
||||
#include "jittables.h"
|
||||
|
||||
struct CachedInstr; // forward declaration
|
||||
|
||||
typedef void (*ImplSubr)(const CachedInstr *);
|
||||
|
||||
struct CachedInstr {
|
||||
ImplSubr call_me;
|
||||
|
||||
union {
|
||||
struct {
|
||||
uint8_t d1;
|
||||
uint8_t d2;
|
||||
uint8_t d3;
|
||||
uint8_t d4;
|
||||
};
|
||||
int32_t bt; // branch target
|
||||
};
|
||||
|
||||
union {
|
||||
int32_t simm;
|
||||
uint32_t uimm;
|
||||
};
|
||||
};
|
||||
#include "nuinterpreter.h"
|
||||
|
||||
CachedInstr* interp_tpc;
|
||||
bool interp_running;
|
||||
|
@ -133,12 +111,6 @@ bool PreDecode(uint32_t next_pc, CachedInstr* c_instr)
|
|||
|
||||
c_instr->call_me = p_instr->emu_fn;
|
||||
|
||||
if (p_instr->info.cflow_type == CFlowType::CFL_UNCOND_BRANCH) {
|
||||
// finish translation block when an uncoditional branch is encountered
|
||||
done = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* pre-decode operands, immediate values etc. */
|
||||
switch (p_instr->info.ops_fmt) {
|
||||
case InstrOps::opDA:
|
||||
|
|
|
@ -1,2 +1,30 @@
|
|||
//void PreDecode(uint32_t next_pc);
|
||||
#ifndef NU_INTERPRETER_H
|
||||
#define NU_INTERPRETER_H
|
||||
|
||||
struct CachedInstr; // forward declaration
|
||||
|
||||
typedef void (*ImplSubr)(const CachedInstr *);
|
||||
|
||||
struct CachedInstr {
|
||||
ImplSubr call_me;
|
||||
|
||||
union {
|
||||
struct {
|
||||
uint8_t d1;
|
||||
uint8_t d2;
|
||||
uint8_t d3;
|
||||
uint8_t d4;
|
||||
};
|
||||
int32_t bt; // branch target
|
||||
};
|
||||
|
||||
union {
|
||||
int32_t simm;
|
||||
uint32_t uimm;
|
||||
};
|
||||
};
|
||||
|
||||
bool PreDecode(uint32_t next_pc, CachedInstr* c_instr);
|
||||
void NuInterpExec(uint32_t start_addr);
|
||||
|
||||
#endif // NU_INTERPRETER_H
|
||||
|
|
Loading…
Reference in New Issue
Block a user