ppsspp/Core/MIPS/x86/Asm.h

64 lines
1.4 KiB
C
Raw Normal View History

2012-11-01 15:19:01 +00:00
// Copyright (C) 2003 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0 or later versions.
2012-11-01 15:19:01 +00:00
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#ifndef _JIT64ASM_H
#define _JIT64ASM_H
#include "x64Emitter.h"
#include "../MIPS.h"
// Runtime generated assembly routines, like the Dispatcher.
2012-11-01 15:19:01 +00:00
namespace MIPSComp
{
class Jit;
}
class AsmRoutineManager : public Gen::XCodeBlock
{
private:
void Generate(MIPSState *mips, MIPSComp::Jit *jit);
void GenerateCommon();
public:
AsmRoutineManager()
{
}
2013-01-07 23:26:42 +00:00
~AsmRoutineManager()
{
FreeCodeSpace();
}
2012-11-01 15:19:01 +00:00
void Init(MIPSState *mips, MIPSComp::Jit *jit)
{
AllocCodeSpace(8192);
Generate(mips, jit);
WriteProtect();
}
const u8 *enterCode;
const u8 *outerLoop;
const u8 *dispatcher;
const u8 *dispatcherCheckCoreState;
2012-11-01 15:19:01 +00:00
const u8 *dispatcherNoCheck;
const u8 *breakpointBailout;
};
#endif // _JIT64ASM_H