Sorry for intruding in to the core. Fixed NoGUI mode in Linux, add back the instruction names as comments in the JIT tables, was a bit hard to find certain instructions.Trying to find a good way to get The JIT dependencies removed in a nice fashion

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3776 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Sonicadvance1 2009-07-13 06:34:12 +00:00
parent d779554ff3
commit 4cfcf9bdd5
14 changed files with 330 additions and 333 deletions

View File

@ -109,6 +109,7 @@ vars.AddVariables(
BoolVariable('sdlgl', 'Set For Building with SDL GL libs (WIP)', False),
BoolVariable('gltest', 'temp don\'t use (WIP)', False),
BoolVariable('jittest', 'temp don\'t use (WIP)', False),
BoolVariable('nojit', 'Remove entire jit cores', False),
EnumVariable('flavor', 'Choose a build flavor', 'release',
allowed_values = ('release', 'devel', 'debug', 'fastlog', 'prof'),
ignorecase = 2
@ -310,8 +311,13 @@ conf.Define('GLTEST', env['GLTEST'])
env['JITTEST'] = 0
if env['jittest']:
env['JITTEST'] = 1
env['NOJIT'] = 0
if env['nojit']:
env['NOJIT'] = 1
conf.Define('JITTEST', env['JITTEST'])
conf.Define('NOJIT', env['NOJIT'])
# Creating config.h defines
conf.Define('HAVE_SDL', env['HAVE_SDL'])

View File

@ -15,8 +15,6 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#include <xmmintrin.h>
#include "Common.h"
#include "MathUtil.h"

View File

@ -356,7 +356,9 @@ void icbi(UGeckoInstruction _inst)
// VERY IMPORTANT when we start linking blocks
// There are a TON of these so hopefully we can make this mechanism
// fast in the JIT
jit.GetBlockCache()->InvalidateCodeRange(address, 0x20);
// ector said that this isn't needed anymore, and that making
// a jit version of this instruction would be easy anyway
//jit.GetBlockCache()->InvalidateCodeRange(address, 0x20);
}
void lbzux(UGeckoInstruction _inst)

View File

@ -63,21 +63,13 @@ static GekkoOPTemplate primarytable[] =
{28, Interpreter::andi_rc, {"andi_rc", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_SET_CR0}},
{29, Interpreter::andis_rc, {"andis_rc", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_SET_CR0}},
#if JITTEST
{32, Interpreter::lwz, {"lwz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}},
{33, Interpreter::lwzu, {"lwzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}},
{34, Interpreter::lbz, {"lbz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}},
{35, Interpreter::lbzu, {"lbzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}},
{40, Interpreter::lhz, {"lhz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}},
{41, Interpreter::lhzu, {"lhzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}},
#else
{32, Interpreter::lwz, {"lwz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}},
{33, Interpreter::lwzu, {"lwzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}},
{34, Interpreter::lbz, {"lbz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}},
{35, Interpreter::lbzu, {"lbzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}},
{40, Interpreter::lhz, {"lhz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}},
{41, Interpreter::lhzu, {"lhzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}},
#endif
{42, Interpreter::lha, {"lha", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}},
{43, Interpreter::lhau, {"lhau", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}},
@ -213,7 +205,7 @@ static GekkoOPTemplate table31[] =
{470, Interpreter::dcbi, {"dcbi", OPTYPE_DCACHE, 0, 4}},
{758, Interpreter::dcba, {"dcba", OPTYPE_DCACHE, 0, 4}},
{1014, Interpreter::dcbz, {"dcbz", OPTYPE_DCACHE, 0, 4}},
#if JITTEST
//load word
{23, Interpreter::lwzx, {"lwzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}},
{55, Interpreter::lwzux, {"lwzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}},
@ -229,23 +221,7 @@ static GekkoOPTemplate table31[] =
//load byte
{87, Interpreter::lbzx, {"lbzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}},
{119, Interpreter::lbzux, {"lbzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}},
#else
//load word
{23, Interpreter::lwzx, {"lwzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}},
{55, Interpreter::lwzux, {"lwzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}},
//load halfword
{279, Interpreter::lhzx, {"lhzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}},
{311, Interpreter::lhzux, {"lhzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}},
//load halfword signextend
{343, Interpreter::lhax, {"lhax", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}},
{375, Interpreter::lhaux, {"lhaux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}},
//load byte
{87, Interpreter::lbzx, {"lbzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}},
{119, Interpreter::lbzux, {"lbzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}},
#endif
//load byte reverse
{534, Interpreter::lwbrx, {"lwbrx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}},
{790, Interpreter::lhbrx, {"lhbrx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}},
@ -321,11 +297,7 @@ static GekkoOPTemplate table31_2[] =
{10, Interpreter::addcx, {"addcx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}},
{138, Interpreter::addex, {"addex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
{234, Interpreter::addmex, {"addmex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
#if JITTEST
{202, Interpreter::addzex, {"addzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
#else
{202, Interpreter::addzex, {"addzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
#endif
{491, Interpreter::divwx, {"divwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}},
{459, Interpreter::divwux, {"divwux", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}},
{75, Interpreter::mulhwx, {"mulhwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}},

View File

@ -36,10 +36,6 @@
#include "../JitCommon/JitCache.h"
#include "../JitCommon/Jit_Tables.h"
#if !defined JITTEST || ! JITTEST
#error JitIL needs JITTEST define
#endif
using namespace Gen;
using namespace PowerPC;

View File

@ -44,356 +44,365 @@ struct GekkoOPTemplate
static GekkoOPTemplate primarytable[] =
{
{4, &Jit64::DynaRunTable4},
{19, &Jit64::DynaRunTable19},
{31, &Jit64::DynaRunTable31},
{59, &Jit64::DynaRunTable59},
{63, &Jit64::DynaRunTable63},
{4, &Jit64::DynaRunTable4}, //"RunTable4", OPTYPE_SUBTABLE | (4<<24), 0}},
{19, &Jit64::DynaRunTable19}, //"RunTable19", OPTYPE_SUBTABLE | (19<<24), 0}},
{31, &Jit64::DynaRunTable31}, //"RunTable31", OPTYPE_SUBTABLE | (31<<24), 0}},
{59, &Jit64::DynaRunTable59}, //"RunTable59", OPTYPE_SUBTABLE | (59<<24), 0}},
{63, &Jit64::DynaRunTable63}, //"RunTable63", OPTYPE_SUBTABLE | (63<<24), 0}},
{16, &Jit64::bcx},
{18, &Jit64::bx},
{16, &Jit64::bcx}, //"bcx", OPTYPE_SYSTEM, FL_ENDBLOCK}},
{18, &Jit64::bx}, //"bx", OPTYPE_SYSTEM, FL_ENDBLOCK}},
{1, &Jit64::HLEFunction},
{2, &Jit64::Default},
{3, &Jit64::Default},
{17, &Jit64::sc},
{1, &Jit64::HLEFunction}, //"HLEFunction", OPTYPE_SYSTEM, FL_ENDBLOCK}},
{2, &Jit64::Default}, //"DynaBlock", OPTYPE_SYSTEM, 0}},
{3, &Jit64::Default}, //"twi", OPTYPE_SYSTEM, 0}},
{17, &Jit64::sc}, //"sc", OPTYPE_SYSTEM, FL_ENDBLOCK, 1}},
{7, &Jit64::mulli},
{8, &Jit64::subfic},
{10, &Jit64::cmpXX},
{11, &Jit64::cmpXX},
{12, &Jit64::reg_imm},
{13, &Jit64::reg_imm},
{14, &Jit64::reg_imm},
{15, &Jit64::reg_imm},
{7, &Jit64::mulli}, //"mulli", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_RC_BIT, 2}},
{8, &Jit64::subfic}, //"subfic", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_SET_CA}},
{10, &Jit64::cmpXX}, //"cmpli", OPTYPE_INTEGER, FL_IN_A | FL_SET_CRn}},
{11, &Jit64::cmpXX}, //"cmpi", OPTYPE_INTEGER, FL_IN_A | FL_SET_CRn}},
{12, &Jit64::reg_imm}, //"addic", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_SET_CA}},
{13, &Jit64::reg_imm}, //"addic_rc", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_SET_CR0}},
{14, &Jit64::reg_imm}, //"addi", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A0}},
{15, &Jit64::reg_imm}, //"addis", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A0}},
{20, &Jit64::rlwimix},
{21, &Jit64::rlwinmx},
{23, &Jit64::rlwnmx},
{20, &Jit64::rlwimix}, //"rlwimix", OPTYPE_INTEGER, FL_OUT_A | FL_IN_A | FL_IN_S | FL_RC_BIT}},
{21, &Jit64::rlwinmx}, //"rlwinmx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}},
{23, &Jit64::rlwnmx}, //"rlwnmx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_IN_B | FL_RC_BIT}},
{24, &Jit64::reg_imm},
{25, &Jit64::reg_imm},
{26, &Jit64::reg_imm},
{27, &Jit64::reg_imm},
{28, &Jit64::reg_imm},
{29, &Jit64::reg_imm},
{32, &Jit64::lXz},
{33, &Jit64::Default},
{34, &Jit64::lXz},
{35, &Jit64::Default},
{40, &Jit64::lXz},
{41, &Jit64::Default},
{24, &Jit64::reg_imm}, //"ori", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S}},
{25, &Jit64::reg_imm}, //"oris", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S}},
{26, &Jit64::reg_imm}, //"xori", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S}},
{27, &Jit64::reg_imm}, //"xoris", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S}},
{28, &Jit64::reg_imm}, //"andi_rc", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_SET_CR0}},
{29, &Jit64::reg_imm}, //"andis_rc", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_SET_CR0}},
{42, &Jit64::lha},
{43, &Jit64::Default},
#if JITTEST
{32, &Jit64::lXz}, //"lwz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}},
{33, &Jit64::lXz}, //"lwzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}},
{34, &Jit64::lXz}, //"lbz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}},
{35, &Jit64::lXz}, //"lbzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}},
{40, &Jit64::lXz}, //"lhz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}},
{41, &Jit64::lXz}, //"lhzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}},
#else
{32, &Jit64::lXz}, //"lwz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}},
{33, &Jit64::Default}, //"lwzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}},
{34, &Jit64::lXz}, //"lbz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}},
{35, &Jit64::Default}, //"lbzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}},
{40, &Jit64::lXz}, //"lhz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}},
{41, &Jit64::Default}, //"lhzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}},
#endif
{42, &Jit64::lha}, //"lha", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}},
{43, &Jit64::Default}, //"lhau", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}},
{44, &Jit64::stX},
{45, &Jit64::stX},
{36, &Jit64::stX},
{37, &Jit64::stX},
{38, &Jit64::stX},
{39, &Jit64::stX},
{44, &Jit64::stX}, //"sth", OPTYPE_STORE, FL_IN_A | FL_IN_S}},
{45, &Jit64::stX}, //"sthu", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_S}},
{36, &Jit64::stX}, //"stw", OPTYPE_STORE, FL_IN_A | FL_IN_S}},
{37, &Jit64::stX}, //"stwu", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_S}},
{38, &Jit64::stX}, //"stb", OPTYPE_STORE, FL_IN_A | FL_IN_S}},
{39, &Jit64::stX}, //"stbu", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_S}},
{46, &Jit64::lmw},
{47, &Jit64::stmw},
{46, &Jit64::lmw}, //"lmw", OPTYPE_SYSTEM, FL_EVIL, 10}},
{47, &Jit64::stmw}, //"stmw", OPTYPE_SYSTEM, FL_EVIL, 10}},
{48, &Jit64::lfs},
{49, &Jit64::Default},
{50, &Jit64::lfd},
{51, &Jit64::Default},
{48, &Jit64::lfs}, //"lfs", OPTYPE_LOADFP, FL_IN_A}},
{49, &Jit64::Default}, //"lfsu", OPTYPE_LOADFP, FL_OUT_A | FL_IN_A}},
{50, &Jit64::lfd}, //"lfd", OPTYPE_LOADFP, FL_IN_A}},
{51, &Jit64::Default}, //"lfdu", OPTYPE_LOADFP, FL_OUT_A | FL_IN_A}},
{52, &Jit64::stfs},
{53, &Jit64::stfs},
{54, &Jit64::stfd},
{55, &Jit64::Default},
{52, &Jit64::stfs}, //"stfs", OPTYPE_STOREFP, FL_IN_A}},
{53, &Jit64::stfs}, //"stfsu", OPTYPE_STOREFP, FL_OUT_A | FL_IN_A}},
{54, &Jit64::stfd}, //"stfd", OPTYPE_STOREFP, FL_IN_A}},
{55, &Jit64::Default}, //"stfdu", OPTYPE_STOREFP, FL_OUT_A | FL_IN_A}},
{56, &Jit64::psq_l},
{57, &Jit64::psq_l},
{60, &Jit64::psq_st},
{61, &Jit64::psq_st},
{56, &Jit64::psq_l}, //"psq_l", OPTYPE_PS, FL_IN_A}},
{57, &Jit64::psq_l}, //"psq_lu", OPTYPE_PS, FL_OUT_A | FL_IN_A}},
{60, &Jit64::psq_st}, //"psq_st", OPTYPE_PS, FL_IN_A}},
{61, &Jit64::psq_st}, //"psq_stu", OPTYPE_PS, FL_OUT_A | FL_IN_A}},
//missing: 0, 5, 6, 9, 22, 30, 62, 58
{0, &Jit64::Default},
{5, &Jit64::Default},
{6, &Jit64::Default},
{9, &Jit64::Default},
{22, &Jit64::Default},
{30, &Jit64::Default},
{62, &Jit64::Default},
{58, &Jit64::Default},
{0, &Jit64::Default}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}},
{5, &Jit64::Default}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}},
{6, &Jit64::Default}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}},
{9, &Jit64::Default}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}},
{22, &Jit64::Default}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}},
{30, &Jit64::Default}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}},
{62, &Jit64::Default}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}},
{58, &Jit64::Default}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}},
};
static GekkoOPTemplate table4[] =
{ //SUBOP10
{0, &Jit64::Default},
{32, &Jit64::Default},
{40, &Jit64::ps_sign},
{136, &Jit64::ps_sign},
{264, &Jit64::ps_sign},
{64, &Jit64::Default},
{72, &Jit64::ps_mr},
{96, &Jit64::Default},
{528, &Jit64::ps_mergeXX},
{560, &Jit64::ps_mergeXX},
{592, &Jit64::ps_mergeXX},
{624, &Jit64::ps_mergeXX},
{0, &Jit64::Default}, //"ps_cmpu0", OPTYPE_PS, FL_SET_CRn}},
{32, &Jit64::Default}, //"ps_cmpo0", OPTYPE_PS, FL_SET_CRn}},
{40, &Jit64::ps_sign}, //"ps_neg", OPTYPE_PS, FL_RC_BIT}},
{136, &Jit64::ps_sign}, //"ps_nabs", OPTYPE_PS, FL_RC_BIT}},
{264, &Jit64::ps_sign}, //"ps_abs", OPTYPE_PS, FL_RC_BIT}},
{64, &Jit64::Default}, //"ps_cmpu1", OPTYPE_PS, FL_RC_BIT}},
{72, &Jit64::ps_mr}, //"ps_mr", OPTYPE_PS, FL_RC_BIT}},
{96, &Jit64::Default}, //"ps_cmpo1", OPTYPE_PS, FL_RC_BIT}},
{528, &Jit64::ps_mergeXX}, //"ps_merge00", OPTYPE_PS, FL_RC_BIT}},
{560, &Jit64::ps_mergeXX}, //"ps_merge01", OPTYPE_PS, FL_RC_BIT}},
{592, &Jit64::ps_mergeXX}, //"ps_merge10", OPTYPE_PS, FL_RC_BIT}},
{624, &Jit64::ps_mergeXX}, //"ps_merge11", OPTYPE_PS, FL_RC_BIT}},
{1014, &Jit64::Default},
{1014, &Jit64::Default}, //"dcbz_l", OPTYPE_SYSTEM, 0}},
};
static GekkoOPTemplate table4_2[] =
{
{10, &Jit64::ps_sum},
{11, &Jit64::ps_sum},
{12, &Jit64::ps_muls},
{13, &Jit64::ps_muls},
{14, &Jit64::ps_maddXX},
{15, &Jit64::ps_maddXX},
{18, &Jit64::ps_arith},
{20, &Jit64::ps_arith},
{21, &Jit64::ps_arith},
{23, &Jit64::ps_sel},
{24, &Jit64::Default},
{25, &Jit64::ps_arith},
{26, &Jit64::ps_rsqrte},
{28, &Jit64::ps_maddXX},
{29, &Jit64::ps_maddXX},
{30, &Jit64::ps_maddXX},
{31, &Jit64::ps_maddXX},
{10, &Jit64::ps_sum}, //"ps_sum0", OPTYPE_PS, 0}},
{11, &Jit64::ps_sum}, //"ps_sum1", OPTYPE_PS, 0}},
{12, &Jit64::ps_muls}, //"ps_muls0", OPTYPE_PS, 0}},
{13, &Jit64::ps_muls}, //"ps_muls1", OPTYPE_PS, 0}},
{14, &Jit64::ps_maddXX}, //"ps_madds0", OPTYPE_PS, 0}},
{15, &Jit64::ps_maddXX}, //"ps_madds1", OPTYPE_PS, 0}},
{18, &Jit64::ps_arith}, //"ps_div", OPTYPE_PS, 0, 16}},
{20, &Jit64::ps_arith}, //"ps_sub", OPTYPE_PS, 0}},
{21, &Jit64::ps_arith}, //"ps_add", OPTYPE_PS, 0}},
{23, &Jit64::ps_sel}, //"ps_sel", OPTYPE_PS, 0}},
{24, &Jit64::Default}, //"ps_res", OPTYPE_PS, 0}},
{25, &Jit64::ps_arith}, //"ps_mul", OPTYPE_PS, 0}},
{26, &Jit64::ps_rsqrte}, //"ps_rsqrte", OPTYPE_PS, 0, 1}},
{28, &Jit64::ps_maddXX}, //"ps_msub", OPTYPE_PS, 0}},
{29, &Jit64::ps_maddXX}, //"ps_madd", OPTYPE_PS, 0}},
{30, &Jit64::ps_maddXX}, //"ps_nmsub", OPTYPE_PS, 0}},
{31, &Jit64::ps_maddXX}, //"ps_nmadd", OPTYPE_PS, 0}},
};
static GekkoOPTemplate table4_3[] =
{
{6, &Jit64::Default},
{7, &Jit64::Default},
{38, &Jit64::Default},
{39, &Jit64::Default},
{6, &Jit64::Default}, //"psq_lx", OPTYPE_PS, 0}},
{7, &Jit64::Default}, //"psq_stx", OPTYPE_PS, 0}},
{38, &Jit64::Default}, //"psq_lux", OPTYPE_PS, 0}},
{39, &Jit64::Default}, //"psq_stux", OPTYPE_PS, 0}},
};
static GekkoOPTemplate table19[] =
{
{528, &Jit64::bcctrx},
{16, &Jit64::bclrx},
{257, &Jit64::Default},
{129, &Jit64::Default},
{289, &Jit64::Default},
{225, &Jit64::Default},
{33, &Jit64::Default},
{449, &Jit64::Default},
{417, &Jit64::Default},
{193, &Jit64::Default},
{528, &Jit64::bcctrx}, //"bcctrx", OPTYPE_BRANCH, FL_ENDBLOCK}},
{16, &Jit64::bclrx}, //"bclrx", OPTYPE_BRANCH, FL_ENDBLOCK}},
{257, &Jit64::Default}, //"crand", OPTYPE_CR, FL_EVIL}},
{129, &Jit64::Default}, //"crandc", OPTYPE_CR, FL_EVIL}},
{289, &Jit64::Default}, //"creqv", OPTYPE_CR, FL_EVIL}},
{225, &Jit64::Default}, //"crnand", OPTYPE_CR, FL_EVIL}},
{33, &Jit64::Default}, //"crnor", OPTYPE_CR, FL_EVIL}},
{449, &Jit64::Default}, //"cror", OPTYPE_CR, FL_EVIL}},
{417, &Jit64::Default}, //"crorc", OPTYPE_CR, FL_EVIL}},
{193, &Jit64::Default}, //"crxor", OPTYPE_CR, FL_EVIL}},
{150, &Jit64::DoNothing},
{0, &Jit64::Default},
{150, &Jit64::DoNothing}, //"isync", OPTYPE_ICACHE, FL_EVIL}},
{0, &Jit64::Default}, //"mcrf", OPTYPE_SYSTEM, FL_EVIL}},
{50, &Jit64::rfi},
{18, &Jit64::Default}
{50, &Jit64::rfi}, //"rfi", OPTYPE_SYSTEM, FL_ENDBLOCK | FL_CHECKEXCEPTIONS, 1}},
{18, &Jit64::Default}, //"rfid", OPTYPE_SYSTEM, FL_ENDBLOCK | FL_CHECKEXCEPTIONS}}
};
static GekkoOPTemplate table31[] =
{
{28, &Jit64::andx},
{60, &Jit64::Default},
{444, &Jit64::orx},
{124, &Jit64::Default},
{316, &Jit64::xorx},
{412, &Jit64::Default},
{476, &Jit64::Default},
{284, &Jit64::Default},
{0, &Jit64::cmpXX},
{32, &Jit64::cmpXX},
{26, &Jit64::cntlzwx},
{922, &Jit64::extshx},
{954, &Jit64::extsbx},
{536, &Jit64::srwx},
{792, &Jit64::srawx},
{824, &Jit64::srawix},
{24, &Jit64::slwx},
{28, &Jit64::andx}, //"andx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}},
{60, &Jit64::Default}, //"andcx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}},
{444, &Jit64::orx}, //"orx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}},
{124, &Jit64::Default}, //"norx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}},
{316, &Jit64::xorx}, //"xorx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}},
{412, &Jit64::Default}, //"orcx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}},
{476, &Jit64::Default}, //"nandx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}},
{284, &Jit64::Default}, //"eqvx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}},
{0, &Jit64::cmpXX}, //"cmp", OPTYPE_INTEGER, FL_IN_AB | FL_SET_CRn}},
{32, &Jit64::cmpXX}, //"cmpl", OPTYPE_INTEGER, FL_IN_AB | FL_SET_CRn}},
{26, &Jit64::cntlzwx}, //"cntlzwx",OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}},
{922, &Jit64::extshx}, //"extshx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}},
{954, &Jit64::extsbx}, //"extsbx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}},
{536, &Jit64::srwx}, //"srwx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_RC_BIT}},
{792, &Jit64::srawx}, //"srawx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_RC_BIT}},
{824, &Jit64::srawix}, //"srawix", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_RC_BIT}},
{24, &Jit64::slwx}, //"slwx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_RC_BIT}},
{54, &Jit64::Default},
{86, &Jit64::DoNothing},
{246, &Jit64::Default},
{278, &Jit64::Default},
{470, &Jit64::Default},
{758, &Jit64::Default},
{1014, &Jit64::dcbz},
{54, &Jit64::Default}, //"dcbst", OPTYPE_DCACHE, 0, 4}},
{86, &Jit64::DoNothing}, //"dcbf", OPTYPE_DCACHE, 0, 4}},
{246, &Jit64::Default}, //"dcbtst", OPTYPE_DCACHE, 0, 1}},
{278, &Jit64::Default}, //"dcbt", OPTYPE_DCACHE, 0, 1}},
{470, &Jit64::Default}, //"dcbi", OPTYPE_DCACHE, 0, 4}},
{758, &Jit64::Default}, //"dcba", OPTYPE_DCACHE, 0, 4}},
{1014, &Jit64::dcbz}, //"dcbz", OPTYPE_DCACHE, 0, 4}},
#if JITTEST
//load word
{23, &Jit64::lXzx},
{55, &Jit64::lXzx},
{23, &Jit64::lXzx}, //"lwzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}},
{55, &Jit64::lXzx}, //"lwzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}},
//load halfword
{279, &Jit64::lXzx},
{311, &Jit64::lXzx},
{279, &Jit64::lXzx}, //"lhzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}},
{311, &Jit64::lXzx}, //"lhzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}},
//load halfword signextend
{343, &Jit64::lhax},
{375, &Jit64::Default},
{343, &Jit64::lhax}, //"lhax", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}},
{375, &Jit64::Default}, //"lhaux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}},
//load byte
{87, &Jit64::lXzx},
{119, &Jit64::lXzx},
{87, &Jit64::lXzx}, //"lbzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}},
{119, &Jit64::lXzx}, //"lbzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}},
#else
//load word
{23, &Jit64::lwzx},
{55, &Jit64::lwzux},
{23, &Jit64::lwzx}, //"lwzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}},
{55, &Jit64::lwzux}, //"lwzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}},
//load halfword
{279, &Jit64::Default},
{311, &Jit64::Default},
{279, &Jit64::Default}, //"lhzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}},
{311, &Jit64::Default}, //"lhzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}},
//load halfword signextend
{343, &Jit64::lhax},
{375, &Jit64::Default},
{343, &Jit64::lhax}, //"lhax", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}},
{375, &Jit64::Default}, //"lhaux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}},
//load byte
{87, &Jit64::lbzx},
{119, &Jit64::Default},
{87, &Jit64::lbzx}, //"lbzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}},
{119, &Jit64::Default}, //"lbzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}},
#endif
//load byte reverse
{534, &Jit64::Default},
{790, &Jit64::Default},
{534, &Jit64::Default}, //"lwbrx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}},
{790, &Jit64::Default}, //"lhbrx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}},
// Conditional load/store (Wii SMP)
{150, &Jit64::Default},
{20, &Jit64::Default},
{150, &Jit64::Default}, //"stwcxd", OPTYPE_STORE, FL_EVIL | FL_SET_CR0}},
{20, &Jit64::Default}, //"lwarx", OPTYPE_LOAD, FL_EVIL | FL_OUT_D | FL_IN_A0B | FL_SET_CR0}},
//load string (interpret these)
{533, &Jit64::Default},
{597, &Jit64::Default},
{533, &Jit64::Default}, //"lswx", OPTYPE_LOAD, FL_EVIL | FL_IN_A | FL_OUT_D}},
{597, &Jit64::Default}, //"lswi", OPTYPE_LOAD, FL_EVIL | FL_IN_AB | FL_OUT_D}},
//store word
{151, &Jit64::stXx},
{183, &Jit64::stXx},
{151, &Jit64::stXx}, //"stwx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}},
{183, &Jit64::stXx}, //"stwux", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_B}},
//store halfword
{407, &Jit64::stXx},
{439, &Jit64::stXx},
{407, &Jit64::stXx}, //"sthx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}},
{439, &Jit64::stXx}, //"sthux", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_B}},
//store byte
{215, &Jit64::stXx},
{247, &Jit64::stXx},
{215, &Jit64::stXx}, //"stbx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}},
{247, &Jit64::stXx}, //"stbux", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_B}},
//store bytereverse
{662, &Jit64::Default},
{918, &Jit64::Default},
{662, &Jit64::Default}, //"stwbrx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}},
{918, &Jit64::Default}, //"sthbrx", OPTYPE_STORE, FL_IN_A | FL_IN_B}},
{661, &Jit64::Default},
{725, &Jit64::Default},
{661, &Jit64::Default}, //"stswx", OPTYPE_STORE, FL_EVIL}},
{725, &Jit64::Default}, //"stswi", OPTYPE_STORE, FL_EVIL}},
// fp load/store
{535, &Jit64::lfsx},
{567, &Jit64::Default},
{599, &Jit64::Default},
{631, &Jit64::Default},
{535, &Jit64::lfsx}, //"lfsx", OPTYPE_LOADFP, FL_IN_A0 | FL_IN_B}},
{567, &Jit64::Default}, //"lfsux", OPTYPE_LOADFP, FL_IN_A | FL_IN_B}},
{599, &Jit64::Default}, //"lfdx", OPTYPE_LOADFP, FL_IN_A0 | FL_IN_B}},
{631, &Jit64::Default}, //"lfdux", OPTYPE_LOADFP, FL_IN_A | FL_IN_B}},
{663, &Jit64::stfsx},
{695, &Jit64::Default},
{727, &Jit64::Default},
{759, &Jit64::Default},
{983, &Jit64::Default},
{663, &Jit64::stfsx}, //"stfsx", OPTYPE_STOREFP, FL_IN_A0 | FL_IN_B}},
{695, &Jit64::Default}, //"stfsux", OPTYPE_STOREFP, FL_IN_A | FL_IN_B}},
{727, &Jit64::Default}, //"stfdx", OPTYPE_STOREFP, FL_IN_A0 | FL_IN_B}},
{759, &Jit64::Default}, //"stfdux", OPTYPE_STOREFP, FL_IN_A | FL_IN_B}},
{983, &Jit64::Default}, //"stfiwx", OPTYPE_STOREFP, FL_IN_A0 | FL_IN_B}},
{19, &Jit64::mfcr},
{83, &Jit64::mfmsr},
{144, &Jit64::mtcrf},
{146, &Jit64::mtmsr},
{210, &Jit64::Default},
{242, &Jit64::Default},
{339, &Jit64::mfspr},
{467, &Jit64::mtspr},
{371, &Jit64::mftb},
{512, &Jit64::Default},
{595, &Jit64::Default},
{659, &Jit64::Default},
{19, &Jit64::mfcr}, //"mfcr", OPTYPE_SYSTEM, FL_OUT_D}},
{83, &Jit64::mfmsr}, //"mfmsr", OPTYPE_SYSTEM, FL_OUT_D}},
{144, &Jit64::mtcrf}, //"mtcrf", OPTYPE_SYSTEM, 0}},
{146, &Jit64::mtmsr}, //"mtmsr", OPTYPE_SYSTEM, FL_ENDBLOCK}},
{210, &Jit64::Default}, //"mtsr", OPTYPE_SYSTEM, 0}},
{242, &Jit64::Default}, //"mtsrin", OPTYPE_SYSTEM, 0}},
{339, &Jit64::mfspr}, //"mfspr", OPTYPE_SPR, FL_OUT_D}},
{467, &Jit64::mtspr}, //"mtspr", OPTYPE_SPR, 0, 2}},
{371, &Jit64::mftb}, //"mftb", OPTYPE_SYSTEM, FL_OUT_D | FL_TIMER}},
{512, &Jit64::Default}, //"mcrxr", OPTYPE_SYSTEM, 0}},
{595, &Jit64::Default}, //"mfsr", OPTYPE_SYSTEM, FL_OUT_D, 2}},
{659, &Jit64::Default}, //"mfsrin", OPTYPE_SYSTEM, FL_OUT_D, 2}},
{4, &Jit64::Default},
{598, &Jit64::DoNothing},
{982, &Jit64::Default},
{4, &Jit64::Default}, //"tw", OPTYPE_SYSTEM, 0, 1}},
{598, &Jit64::DoNothing}, //"sync", OPTYPE_SYSTEM, 0, 2}},
{982, &Jit64::Default}, //"icbi", OPTYPE_SYSTEM, 0, 3}},
// Unused instructions on GC
{310, &Jit64::Default},
{438, &Jit64::Default},
{854, &Jit64::Default},
{306, &Jit64::Default},
{370, &Jit64::Default},
{566, &Jit64::Default},
{310, &Jit64::Default}, //"eciwx", OPTYPE_INTEGER, FL_RC_BIT}},
{438, &Jit64::Default}, //"ecowx", OPTYPE_INTEGER, FL_RC_BIT}},
{854, &Jit64::Default}, //"eieio", OPTYPE_INTEGER, FL_RC_BIT}},
{306, &Jit64::Default}, //"tlbie", OPTYPE_SYSTEM, 0}},
{370, &Jit64::Default}, //"tlbia", OPTYPE_SYSTEM, 0}},
{566, &Jit64::Default}, //"tlbsync", OPTYPE_SYSTEM, 0}},
};
static GekkoOPTemplate table31_2[] =
{
{266, &Jit64::addx},
{10, &Jit64::Default},
{138, &Jit64::addex},
{234, &Jit64::Default},
{266, &Jit64::addx}, //"addx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}},
{10, &Jit64::Default}, //"addcx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}},
{138, &Jit64::addex}, //"addex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
{234, &Jit64::Default}, //"addmex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
#if JITTEST
{202, &Jit64::addzex},
{202, &Jit64::addzex}, //"addzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
#else
{202, &Jit64::Default},
{202, &Jit64::Default}, //"addzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
#endif
{491, &Jit64::Default},
{459, &Jit64::divwux},
{75, &Jit64::Default},
{11, &Jit64::mulhwux},
{235, &Jit64::mullwx},
{104, &Jit64::negx},
{40, &Jit64::subfx},
{8, &Jit64::subfcx},
{136, &Jit64::subfex},
{232, &Jit64::Default},
{200, &Jit64::Default},
{491, &Jit64::Default}, //"divwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}},
{459, &Jit64::divwux}, //"divwux", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}},
{75, &Jit64::Default}, //"mulhwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}},
{11, &Jit64::mulhwux}, //"mulhwux", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}},
{235, &Jit64::mullwx}, //"mullwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}},
{104, &Jit64::negx}, //"negx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}},
{40, &Jit64::subfx}, //"subfx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}},
{8, &Jit64::subfcx}, //"subfcx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}},
{136, &Jit64::subfex}, //"subfex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
{232, &Jit64::Default}, //"subfmex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
{200, &Jit64::Default}, //"subfzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
};
static GekkoOPTemplate table59[] =
{
{18, &Jit64::Default},
{20, &Jit64::fp_arith_s},
{21, &Jit64::fp_arith_s},
// {22, &Jit64::Default}, // Not implemented on gekko
{24, &Jit64::Default},
{25, &Jit64::fp_arith_s},
{28, &Jit64::fmaddXX},
{29, &Jit64::fmaddXX},
{30, &Jit64::fmaddXX},
{31, &Jit64::fmaddXX},
{18, &Jit64::Default}, //{"fdivsx", OPTYPE_FPU, FL_RC_BIT_F, 16}},
{20, &Jit64::fp_arith_s}, //"fsubsx", OPTYPE_FPU, FL_RC_BIT_F}},
{21, &Jit64::fp_arith_s}, //"faddsx", OPTYPE_FPU, FL_RC_BIT_F}},
// {22, &Jit64::Default}, //"fsqrtsx", OPTYPE_FPU, FL_RC_BIT_F}}, // Not implemented on gekko
{24, &Jit64::Default}, //"fresx", OPTYPE_FPU, FL_RC_BIT_F}},
{25, &Jit64::fp_arith_s}, //"fmulsx", OPTYPE_FPU, FL_RC_BIT_F}},
{28, &Jit64::fmaddXX}, //"fmsubsx", OPTYPE_FPU, FL_RC_BIT_F}},
{29, &Jit64::fmaddXX}, //"fmaddsx", OPTYPE_FPU, FL_RC_BIT_F}},
{30, &Jit64::fmaddXX}, //"fnmsubsx", OPTYPE_FPU, FL_RC_BIT_F}},
{31, &Jit64::fmaddXX}, //"fnmaddsx", OPTYPE_FPU, FL_RC_BIT_F}},
};
static GekkoOPTemplate table63[] =
{
{264, &Jit64::Default},
{32, &Jit64::fcmpx},
{0, &Jit64::fcmpx},
{14, &Jit64::Default},
{15, &Jit64::Default},
{72, &Jit64::fmrx},
{136, &Jit64::Default},
{40, &Jit64::Default},
{12, &Jit64::Default},
{264, &Jit64::Default}, //"fabsx", OPTYPE_FPU, FL_RC_BIT_F}},
{32, &Jit64::fcmpx}, //"fcmpo", OPTYPE_FPU, FL_RC_BIT_F}},
{0, &Jit64::fcmpx}, //"fcmpu", OPTYPE_FPU, FL_RC_BIT_F}},
{14, &Jit64::Default}, //"fctiwx", OPTYPE_FPU, FL_RC_BIT_F}},
{15, &Jit64::Default}, //"fctiwzx", OPTYPE_FPU, FL_RC_BIT_F}},
{72, &Jit64::fmrx}, //"fmrx", OPTYPE_FPU, FL_RC_BIT_F}},
{136, &Jit64::Default}, //"fnabsx", OPTYPE_FPU, FL_RC_BIT_F}},
{40, &Jit64::Default}, //"fnegx", OPTYPE_FPU, FL_RC_BIT_F}},
{12, &Jit64::Default}, //"frspx", OPTYPE_FPU, FL_RC_BIT_F}},
{64, &Jit64::Default},
{583, &Jit64::Default},
{70, &Jit64::Default},
{38, &Jit64::Default},
{134, &Jit64::Default},
{711, &Jit64::Default},
{64, &Jit64::Default}, //"mcrfs", OPTYPE_SYSTEMFP, 0}},
{583, &Jit64::Default}, //"mffsx", OPTYPE_SYSTEMFP, 0}},
{70, &Jit64::Default}, //"mtfsb0x", OPTYPE_SYSTEMFP, 0, 2}},
{38, &Jit64::Default}, //"mtfsb1x", OPTYPE_SYSTEMFP, 0, 2}},
{134, &Jit64::Default}, //"mtfsfix", OPTYPE_SYSTEMFP, 0, 2}},
{711, &Jit64::Default}, //"mtfsfx", OPTYPE_SYSTEMFP, 0, 2}},
};
static GekkoOPTemplate table63_2[] =
{
{18, &Jit64::Default},
{20, &Jit64::Default},
{21, &Jit64::Default},
{22, &Jit64::Default},
{23, &Jit64::Default},
{25, &Jit64::fp_arith_s},
{26, &Jit64::fp_arith_s},
{28, &Jit64::fmaddXX},
{29, &Jit64::fmaddXX},
{30, &Jit64::fmaddXX},
{31, &Jit64::fmaddXX},
{18, &Jit64::Default}, //"fdivx", OPTYPE_FPU, FL_RC_BIT_F, 30}},
{20, &Jit64::Default}, //"fsubx", OPTYPE_FPU, FL_RC_BIT_F}},
{21, &Jit64::Default}, //"faddx", OPTYPE_FPU, FL_RC_BIT_F}},
{22, &Jit64::Default}, //"fsqrtx", OPTYPE_FPU, FL_RC_BIT_F}},
{23, &Jit64::Default}, //"fselx", OPTYPE_FPU, FL_RC_BIT_F}},
{25, &Jit64::fp_arith_s}, //"fmulx", OPTYPE_FPU, FL_RC_BIT_F}},
{26, &Jit64::fp_arith_s}, //"frsqrtex", OPTYPE_FPU, FL_RC_BIT_F}},
{28, &Jit64::fmaddXX}, //"fmsubx", OPTYPE_FPU, FL_RC_BIT_F}},
{29, &Jit64::fmaddXX}, //"fmaddx", OPTYPE_FPU, FL_RC_BIT_F}},
{30, &Jit64::fmaddXX}, //"fnmsubx", OPTYPE_FPU, FL_RC_BIT_F}},
{31, &Jit64::fmaddXX}, //"fnmaddx", OPTYPE_FPU, FL_RC_BIT_F}},
};
namespace JitTables
{
void CompileInstruction(UGeckoInstruction _inst)

View File

@ -23,6 +23,7 @@
#include "StringUtil.h"
#include "Interpreter/Interpreter.h"
#include "Interpreter/Interpreter_Tables.h"
#ifndef NOJIT
#include "JitCommon/Jit_Tables.h"
#if defined(_M_IX86) || defined(_M_X64)
@ -30,6 +31,7 @@
#else
#error Unknown architecture!
#endif
#endif
struct op_inf
{
@ -158,7 +160,10 @@ void InitTables()
{
// Interpreter ALWAYS needs to be initialized
InterpreterTables::InitTables();
#ifndef NOJIT
// Should be able to do this a better way than defines in this function
JitTables::InitTables();
#endif
}
#define OPLOG

View File

@ -90,36 +90,36 @@ files = ["ActionReplay.cpp",
"HLE/HLE_Misc.cpp",
"HLE/HLE_OS.cpp",
]
if env['JITTEST']:
files += ["PowerPC/Jit64IL/Jit.cpp",
"PowerPC/Jit64IL/JitAsm.cpp",
"PowerPC/Jit64IL/Jit_Branch.cpp",
"PowerPC/Jit64IL/Jit_Integer.cpp",
"PowerPC/Jit64IL/Jit_FloatingPoint.cpp",
"PowerPC/Jit64IL/Jit_LoadStorePaired.cpp",
"PowerPC/Jit64IL/Jit_Paired.cpp",
"PowerPC/Jit64IL/Jit_LoadStore.cpp",
"PowerPC/Jit64IL/Jit_LoadStoreFloating.cpp",
"PowerPC/Jit64IL/Jit_SystemRegisters.cpp",
"PowerPC/Jit64IL/IR.cpp",
"PowerPC/Jit64IL/IR_X86.cpp",
"PowerPC/JitCommon//Jit_Tables.cpp",
]
else:
files += ["PowerPC/Jit64/Jit.cpp",
"PowerPC/Jit64/JitRegCache.cpp",
"PowerPC/Jit64/JitAsm.cpp",
"PowerPC/Jit64/Jit_Branch.cpp",
"PowerPC/Jit64/Jit_Integer.cpp",
"PowerPC/Jit64/Jit_FloatingPoint.cpp",
"PowerPC/Jit64/Jit_LoadStorePaired.cpp",
"PowerPC/Jit64/Jit_Paired.cpp",
"PowerPC/Jit64/Jit_LoadStore.cpp",
"PowerPC/Jit64/Jit_LoadStoreFloating.cpp",
"PowerPC/Jit64/Jit_SystemRegisters.cpp",
"PowerPC/JitCommon/Jit_Tables.cpp",
]
if not env['NOJIT']:
if env['JITTEST']:
files += ["PowerPC/Jit64IL/Jit.cpp",
"PowerPC/Jit64IL/JitAsm.cpp",
"PowerPC/Jit64IL/Jit_Branch.cpp",
"PowerPC/Jit64IL/Jit_Integer.cpp",
"PowerPC/Jit64IL/Jit_FloatingPoint.cpp",
"PowerPC/Jit64IL/Jit_LoadStorePaired.cpp",
"PowerPC/Jit64IL/Jit_Paired.cpp",
"PowerPC/Jit64IL/Jit_LoadStore.cpp",
"PowerPC/Jit64IL/Jit_LoadStoreFloating.cpp",
"PowerPC/Jit64IL/Jit_SystemRegisters.cpp",
"PowerPC/Jit64IL/IR.cpp",
"PowerPC/Jit64IL/IR_X86.cpp",
"PowerPC/JitCommon//Jit_Tables.cpp",
]
else:
files += ["PowerPC/Jit64/Jit.cpp",
"PowerPC/Jit64/JitRegCache.cpp",
"PowerPC/Jit64/JitAsm.cpp",
"PowerPC/Jit64/Jit_Branch.cpp",
"PowerPC/Jit64/Jit_Integer.cpp",
"PowerPC/Jit64/Jit_FloatingPoint.cpp",
"PowerPC/Jit64/Jit_LoadStorePaired.cpp",
"PowerPC/Jit64/Jit_Paired.cpp",
"PowerPC/Jit64/Jit_LoadStore.cpp",
"PowerPC/Jit64/Jit_LoadStoreFloating.cpp",
"PowerPC/Jit64/Jit_SystemRegisters.cpp",
"PowerPC/JitCommon/Jit_Tables.cpp",
]
if sys.platform == 'win32':
files += [ "stdafx.cpp",

View File

@ -1,12 +1,13 @@
# -*- python -*-
Import('env')
files = [
'CodeView.cpp',
'MemoryView.cpp',
'DebuggerUIUtil.cpp',
]
files = [] #So it's declared outside the if
if env['HAVE_WX']:
files += [
'CodeView.cpp',
'DebuggerUIUtil.cpp',
'MemoryView.cpp',
]
acenv = env.Clone()
acenv.Append(CXXFLAGS = [ '-fPIC' ])

View File

@ -3,8 +3,9 @@
#include <stdarg.h>
#ifndef _WIN32
//#include <curses.h>
#include <sys/param.h>
#else
#endif
#include "Common.h"
@ -208,7 +209,7 @@ int main(int argc, char* argv[])
if (!File::Exists(AppSupportDir) || !File::IsDirectory(AppSupportDir))
PanicAlert("Could not open ~/Library/Application Support");
strlcat(AppSupportDir, "/Dolphin", sizeof(AppSupportDir));
strncat(AppSupportDir, "/Dolphin", sizeof(AppSupportDir));
if (!File::Exists(AppSupportDir))
File::CreateDir(AppSupportDir);

View File

@ -1,7 +1,12 @@
#include "X11InputBase.h"
#include <string.h>
#include <stdio.h>
#include <ctype.h>
namespace InputCommon
{
#ifdef HAVE_WX
#include <wx/wx.h>
// Taken from wxw source code
KeySym wxCharCodeWXToX(int id)
{
@ -84,7 +89,7 @@ KeySym wxCharCodeWXToX(int id)
return keySym;
}
#endif
void XKeyToString(unsigned int keycode, char *keyStr) {
switch (keycode) {
@ -128,4 +133,4 @@ void XKeyToString(unsigned int keycode, char *keyStr) {
sprintf(keyStr, "%c", toupper(keycode));
}
}
}
}

View File

@ -4,7 +4,6 @@
#include <X11/X.h>
#include <X11/keysym.h>
#include <wx/wx.h>
namespace InputCommon
{
KeySym wxCharCodeWXToX(int id);

View File

@ -102,14 +102,17 @@ u32 DSPHost_CodeLoaded(const u8 *ptr, int size)
// Always add the ROM.
DSPSymbols::AutoDisassembly(0x8000, 0x9000);
#if defined(HAVE_WX) && HAVE_WX
if (m_DebuggerFrame)
m_DebuggerFrame->Refresh();
#endif
return crc;
}
void DSPHost_UpdateDebugger()
{
#if defined(HAVE_WX) && HAVE_WX
if (m_DebuggerFrame)
m_DebuggerFrame->Refresh();
#endif
}

View File

@ -1237,7 +1237,7 @@ bool Renderer::SaveRenderTarget(const char *filename, int W, int H, int YOffset)
OSD::AddMessage(StringFromFormat("Saved %i x %i %s\n", W, H, s_sScreenshotName.c_str()).c_str(), 2000);
#else
bool result = SaveTGA(filename, w, h, data);
bool result = SaveTGA(filename, W, H, data);
free(data);
#endif
return result;