Signed-off-by: Richard Henderson <r...@twiddle.net> --- hw/alpha_palcode.c | 29 +++++++++++++++++++++++++++-- 1 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/hw/alpha_palcode.c b/hw/alpha_palcode.c index c48a297..44b2ca4 100644 --- a/hw/alpha_palcode.c +++ b/hw/alpha_palcode.c @@ -1062,6 +1062,16 @@ void call_pal (CPUState *env, int palcode) qemu_log("%s: palcode %02x\n", __func__, palcode); switch (palcode) { + case 0x80: + /* BPT */ + qemu_log("BPT\n"); + /* FIXME: Sends SIGTRAP, si_code=TRAP_BRKPT. */ + exit(1); + case 0x81: + /* BUGCHK */ + qemu_log("BUGCHK\n"); + /* FIXME: Sends SIGTRAP, si_code=SI_FAULT. */ + exit(1); case 0x83: /* CALLSYS */ qemu_log("CALLSYS n " TARGET_FMT_ld "\n", env->ir[0]); @@ -1076,6 +1086,11 @@ void call_pal (CPUState *env, int palcode) env->ir[IR_V0] = -ret; } break; + case 0x86: + /* IMB */ + qemu_log("IMB\n"); + tb_flush(env); + break; case 0x9E: /* RDUNIQUE */ env->ir[IR_V0] = env->unique; @@ -1086,9 +1101,19 @@ void call_pal (CPUState *env, int palcode) env->unique = env->ir[IR_A0]; qemu_log("WRUNIQUE: " TARGET_FMT_lx "\n", env->unique); break; + case 0xAA: + /* GENTRAP */ + qemu_log("GENTRAP: " TARGET_FMT_lx "\n", env->ir[IR_A0]); + /* FIXME: This is supposed to send a signal: + SIGFPE: + GEN_INTOVF, GEN_INTDIV, GEN_FLTOVF, GEN_FLTDIV, + GEN_FLTUND, GEN_FLTINV, GEN_FLTINE, GEN_ROPRAND + SIGTRAP: + others + with various settings of si_code. */ + exit(1); default: - qemu_log("%s: unhandled palcode %02x\n", - __func__, palcode); + qemu_log("%s: unhandled palcode %02x\n", __func__, palcode); exit(1); } } -- 1.6.5.2