mirror of
https://github.com/libretro/Play-.git
synced 2025-01-10 18:42:53 +00:00
0c5fb983fd
git-svn-id: http://svn.purei.org/purei/trunk@40 b36208d7-6611-0410-8bec-b1987f11c4a2
43 lines
1.1 KiB
C++
43 lines
1.1 KiB
C++
#ifndef _MIPSREFLECTION_H_
|
|
#define _MIPSREFLECTION_H_
|
|
|
|
#include "Types.h"
|
|
|
|
class CMIPS;
|
|
|
|
namespace MIPSReflection
|
|
{
|
|
struct INSTRUCTION;
|
|
|
|
struct SUBTABLE
|
|
{
|
|
uint32 nShift;
|
|
uint32 nMask;
|
|
INSTRUCTION* pTable;
|
|
};
|
|
|
|
struct INSTRUCTION
|
|
{
|
|
const char* sMnemonic;
|
|
SUBTABLE* pSubTable;
|
|
void (*pGetMnemonic)(INSTRUCTION*, CMIPS*, uint32, char*, unsigned int);
|
|
void (*pGetOperands)(INSTRUCTION*, CMIPS*, uint32, uint32, char*, unsigned int);
|
|
bool (*pIsBranch)(INSTRUCTION*, CMIPS*, uint32);
|
|
uint32 (*pGetEffectiveAddress)(INSTRUCTION*, CMIPS*, uint32, uint32);
|
|
};
|
|
|
|
INSTRUCTION* DereferenceInstruction(SUBTABLE*, uint32);
|
|
|
|
void CopyMnemonic(INSTRUCTION*, CMIPS*, uint32, char*, unsigned int);
|
|
void SubTableMnemonic(INSTRUCTION*, CMIPS*, uint32, char*, unsigned int);
|
|
|
|
void SubTableOperands(INSTRUCTION*, CMIPS*, uint32, uint32, char*, unsigned int);
|
|
|
|
bool IsBranch(INSTRUCTION*, CMIPS*, uint32);
|
|
bool SubTableIsBranch(INSTRUCTION*, CMIPS*, uint32);
|
|
|
|
uint32 SubTableEffAddr(INSTRUCTION*, CMIPS*, uint32, uint32);
|
|
};
|
|
|
|
#endif
|