Mercurial > repos > blastem
diff m68k_core.c @ 990:33a46d35b913
Implement privelege violation exceptions
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 27 Apr 2016 23:11:24 -0700 |
parents | d70000fdff0b |
children | 261995d06897 |
line wrap: on
line diff
--- a/m68k_core.c Wed Apr 27 21:39:17 2016 -0700 +++ b/m68k_core.c Wed Apr 27 23:11:24 2016 -0700 @@ -350,6 +350,7 @@ 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_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);