[5224] SH4: Privilege check for instructions
Revision: 5224
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5224 Author: aurel32 Date: 2008-09-15 08:49:15 +0000 (Mon, 15 Sep 2008)
Log Message:
-----------
SH4: Privilege check for instructions
This patch adds check for all SH4 instructions which are executed only in privileged mode.
(Shin-ichiro KAWASAKI)
Modified Paths:
--------------
trunk/cpu-exec.c
trunk/target-sh4/translate.c
Modified: trunk/cpu-exec.c
===================================================================
cpu-exec.c +4 -1
@@ -209,7 +209,10 @@ cs_base =0 ; pc = env->pc;#elif defined(TARGET_SH4 ) - flags = env->flags; + flags = (env->flags & (DELAY_SLOT |DELAY_SLOT_CONDITIONAL + |DELAY_SLOT_TRUE |DELAY_SLOT_CLEARME ))/* Bits 0- 3 */ + | (env->fpscr & (FPSCR_FR |FPSCR_SZ |FPSCR_PR ))/* Bits 19-21 */ + | (env->sr & (SR_MD |SR_RB ));/* Bits 29-30 */ cs_base =0 ; pc = env->pc;#elif defined(TARGET_ALPHA )
Modified: trunk/target-sh4/translate.c
===================================================================
target-sh4/translate.c +43 -24
150 lines not on this page · raw message