summaryrefslogtreecommitdiff
path: root/target-sh4/op.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2006-06-18 19:12:54 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2006-06-18 19:12:54 +0000
commit9c2a9ea1b1fe221566ca6c3f873da1454cadd263 (patch)
treeb0384568db3ada60f572ef5750a8d316d0f266d1 /target-sh4/op.c
parent397e923f7f78e99bc547b0a730c225d78dfe878b (diff)
downloadqemu-9c2a9ea1b1fe221566ca6c3f873da1454cadd263.zip
SH bugfixes.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1991 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sh4/op.c')
-rw-r--r--target-sh4/op.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/target-sh4/op.c b/target-sh4/op.c
index 64f952fc54..d3b68bc665 100644
--- a/target-sh4/op.c
+++ b/target-sh4/op.c
@@ -109,17 +109,15 @@ void OPPROTO op_not_T0(void)
void OPPROTO op_bf_s(void)
{
- T2 = ~env->sr;
env->delayed_pc = PARAM1;
- set_flag(DELAY_SLOT_CONDITIONAL);
+ set_flag(DELAY_SLOT_CONDITIONAL | ((~env->sr) & SR_T));
RETURN();
}
void OPPROTO op_bt_s(void)
{
- T2 = env->sr;
env->delayed_pc = PARAM1;
- set_flag(DELAY_SLOT_CONDITIONAL);
+ set_flag(DELAY_SLOT_CONDITIONAL | (env->sr & SR_T));
RETURN();
}
@@ -888,9 +886,12 @@ void OPPROTO op_jT(void)
RETURN();
}
-void OPPROTO op_jTT2(void)
+void OPPROTO op_jdelayed(void)
{
- if (T2 & SR_T)
+ uint32_t flags;
+ flags = env->flags;
+ env->flags &= ~(DELAY_SLOT | DELAY_SLOT_CONDITIONAL);
+ if (flags & DELAY_SLOT)
GOTO_LABEL_PARAM(1);
RETURN();
}