diff options
author | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-09-15 08:49:15 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-09-15 08:49:15 +0000 |
commit | fe25591e7b98386cce2c9ec8a8878947b50e3741 (patch) | |
tree | 27d32c62052b636a4392987bf31ed6ca3382cf8c /cpu-exec.c | |
parent | 0b6d3ae0723ba226cf07c549a948d4680fb7923b (diff) |
SH4: Privilege check for instructions
This patch adds check for all SH4 instructions which are
executed only in privileged mode.
(Shin-ichiro KAWASAKI)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5224 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'cpu-exec.c')
-rw-r--r-- | cpu-exec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cpu-exec.c b/cpu-exec.c index 95d128553c..8637e2a3cf 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -209,7 +209,10 @@ static inline TranslationBlock *tb_find_fast(void) 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) |