diff options
author | Michael Pavone <pavone@retrodev.com> | 2016-04-27 23:11:24 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2016-04-27 23:11:24 -0700 |
commit | 3bdd7df1517185e8a9ea9841f0d999b90ee07960 (patch) | |
tree | 7267f4930df8f951e6ca9eb84430a1d2cb4033c1 /m68k_core.c | |
parent | 77a5b1309cb7a510cf4ec659ee8aa34d605f92b1 (diff) |
Implement privelege violation exceptions
Diffstat (limited to 'm68k_core.c')
-rw-r--r-- | m68k_core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/m68k_core.c b/m68k_core.c index 69cd94d..16614a7 100644 --- a/m68k_core.c +++ b/m68k_core.c @@ -350,6 +350,7 @@ void translate_m68k_illegal(m68k_options *opts, m68kinst *inst) void translate_m68k_move_usp(m68k_options *opts, m68kinst *inst) { + m68k_trap_if_not_supervisor(opts, inst); cycles(&opts->gen, BUS); int8_t reg; if (inst->src.addr_mode == MODE_UNUSED) { @@ -532,8 +533,9 @@ void translate_m68k_reset(m68k_options *opts, m68kinst *inst) void translate_m68k_rte(m68k_options *opts, m68kinst *inst) { + m68k_trap_if_not_supervisor(opts, inst); + code_info *code = &opts->gen.code; - //TODO: Trap if not in system mode //Read saved SR areg_to_native(opts, 7, opts->gen.scratch1); call(code, opts->read_16); |