added SH4_OP_SLEEP branch type info

This commit is contained in:
Anthony Pesch 2017-07-18 17:33:57 -04:00
parent f26631c8fc
commit deff598409
4 changed files with 18 additions and 5 deletions

View File

@ -8,8 +8,13 @@ int armv3_optable[ARMV3_LOOKUP_SIZE];
struct jit_opdef armv3_opdefs[NUM_ARMV3_OPS] = {
#define ARMV3_INSTR(name, desc, sig, cycles, flags) \
{ARMV3_OP_##name, desc, #sig, \
cycles, flags, (jit_fallback)&armv3_fallback_##name},
{ARMV3_OP_##name, \
#name, \
desc, \
#sig, \
cycles, \
flags, \
(jit_fallback)&armv3_fallback_##name},
#include "armv3_instr.inc"
#undef ARMV3_INSTR
};

View File

@ -13,6 +13,7 @@ typedef void (*jit_fallback)(struct jit_guest *, uint32_t, uint32_t);
struct jit_opdef {
int op;
const char *name;
const char *desc;
const char *sig;
int cycles;

View File

@ -8,8 +8,13 @@ int sh4_optable[UINT16_MAX + 1];
struct jit_opdef sh4_opdefs[NUM_SH4_OPS] = {
#define SH4_INSTR(name, desc, sig, cycles, flags) \
{SH4_OP_##name, desc, #sig, \
cycles, flags, (jit_fallback)&sh4_fallback_##name},
{SH4_OP_##name, \
#name, \
desc, \
#sig, \
cycles, \
flags, \
(jit_fallback)&sh4_fallback_##name},
#include "jit/frontend/sh4/sh4_instr.inc"
#undef SH4_INSTR
};

View File

@ -221,10 +221,12 @@ static void sh4_frontend_analyze_code(struct jit_frontend *base,
block->branch_type = JIT_BRANCH_DYNAMIC;
} else if (def->op == SH4_OP_RTE) {
block->branch_type = JIT_BRANCH_DYNAMIC;
} else if (def->op == SH4_OP_SLEEP) {
block->branch_type = JIT_BRANCH_DYNAMIC;
} else if (def->op == SH4_OP_TRAPA) {
block->branch_type = JIT_BRANCH_DYNAMIC;
} else {
LOG_FATAL("unexpected branch op %d", def->op);
LOG_FATAL("unexpected branch op %d", def->name);
}
break;