wip! random debugging stuff, halt/debug on illegal insn
This commit is contained in:
parent
0b6b0ee425
commit
d3c73feda0
2 changed files with 4 additions and 1 deletions
|
|
@ -8,7 +8,9 @@
|
||||||
void helper_raise_illegal_instruction(CPUCR16CState* env) {
|
void helper_raise_illegal_instruction(CPUCR16CState* env) {
|
||||||
qemu_printf("Illegal instruction, CPU state was:\n");
|
qemu_printf("Illegal instruction, CPU state was:\n");
|
||||||
cr16c_debug_dump_state(env_cpu(env));
|
cr16c_debug_dump_state(env_cpu(env));
|
||||||
qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
|
//qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
|
||||||
|
qemu_system_debug_request();
|
||||||
|
//qemu_system_reset_request(SHUTDOWN)
|
||||||
}
|
}
|
||||||
|
|
||||||
void helper_raise_unimplemented_instruction(void) {
|
void helper_raise_unimplemented_instruction(void) {
|
||||||
|
|
|
||||||
|
|
@ -1473,6 +1473,7 @@ static void cr16c_tr_translate_insn(DisasContextBase *base, CPUState *cs) {
|
||||||
uint64_t insn = decode_load(ctx);
|
uint64_t insn = decode_load(ctx);
|
||||||
if(!decode(ctx, insn)) {
|
if(!decode(ctx, insn)) {
|
||||||
// TOOD: Illegal Instruction
|
// TOOD: Illegal Instruction
|
||||||
|
error_report("cr16c_tr_translate_insn, illegal instr, insn: 0x%04lx @ 0x%04x\n", insn, ctx->env->pc);
|
||||||
gen_helper_raise_illegal_instruction(tcg_env);
|
gen_helper_raise_illegal_instruction(tcg_env);
|
||||||
base->is_jmp = DISAS_NORETURN;
|
base->is_jmp = DISAS_NORETURN;
|
||||||
base->pc_next += 2;
|
base->pc_next += 2;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue