mirror of
https://github.com/libretro/Play-.git
synced 2025-01-25 10:37:56 +00:00
d280b36592
git-svn-id: http://svn.purei.org/purei/trunk@262 b36208d7-6611-0410-8bec-b1987f11c4a2
58 lines
1.7 KiB
C++
58 lines
1.7 KiB
C++
#ifndef _MIPSCODEGEN_H_
|
|
#define _MIPSCODEGEN_H_
|
|
|
|
#include "CodeGen.h"
|
|
|
|
class CMipsCodeGen : public CCodeGen
|
|
{
|
|
public:
|
|
CMipsCodeGen();
|
|
virtual ~CMipsCodeGen();
|
|
|
|
virtual void EndQuota();
|
|
|
|
virtual void PushRel(size_t);
|
|
virtual void PullRel(size_t);
|
|
|
|
virtual void FP_PushSingle(size_t);
|
|
virtual void FP_PushWord(size_t);
|
|
virtual void FP_PullSingle(size_t);
|
|
virtual void FP_PullWordTruncate(size_t);
|
|
|
|
virtual void MD_PushRel(size_t);
|
|
virtual void MD_PushRelExpand(size_t);
|
|
virtual void MD_PullRel(size_t);
|
|
|
|
virtual void BeginIf(bool);
|
|
virtual void EndIf();
|
|
virtual void BeginIfElse(bool);
|
|
virtual void BeginIfElseAlt();
|
|
|
|
virtual void Call(void*, unsigned int, bool);
|
|
|
|
void SetVariableAsConstant(size_t, uint32);
|
|
void DumpVariables(unsigned int);
|
|
|
|
private:
|
|
struct VARIABLESTATUS
|
|
{
|
|
uint32 operandType;
|
|
uint32 operandValue;
|
|
bool isDirty;
|
|
unsigned int ifStackLevel;
|
|
};
|
|
|
|
typedef std::map< size_t, VARIABLESTATUS > VariableStatusMap;
|
|
|
|
void DumpVariable(size_t);
|
|
void DumpAllVariablesAndKeepState();
|
|
VARIABLESTATUS* GetVariableStatus(size_t);
|
|
void SetVariableStatus(size_t, const VARIABLESTATUS&);
|
|
void SaveVariableStatus(size_t, const VARIABLESTATUS&);
|
|
void InvalidateVariableStatus(size_t);
|
|
|
|
VariableStatusMap m_variableStatus;
|
|
};
|
|
|
|
#endif
|