aboutsummaryrefslogtreecommitdiff
path: root/target-mips
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-15 19:52:12 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-15 19:52:12 +0000
commita85427b147f3174748a4eed13a7379a769bb05fd (patch)
treebf8f60fe26ec312f56eca8cbe1202c4621c4b69c /target-mips
parentfff739ccd55a5fd2a15f51fedbad3debc1c8cd4a (diff)
downloadqemu-a85427b147f3174748a4eed13a7379a769bb05fd.zip
qemu-a85427b147f3174748a4eed13a7379a769bb05fd.tar.gz
qemu-a85427b147f3174748a4eed13a7379a769bb05fd.tar.bz2
Small code generation optimization.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2672 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips')
-rw-r--r--target-mips/translate.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/target-mips/translate.c b/target-mips/translate.c
index b0cc3e7..59868f6 100644
--- a/target-mips/translate.c
+++ b/target-mips/translate.c
@@ -5238,6 +5238,9 @@ gen_intermediate_code_internal (CPUState *env, TranslationBlock *tb,
switch (ctx.bstate) {
case BS_EXCP:
gen_op_interrupt_restart();
+ gen_op_reset_T0();
+ /* Generate the return instruction. */
+ gen_op_exit_tb();
break;
case BS_STOP:
gen_op_interrupt_restart();
@@ -5248,11 +5251,11 @@ gen_intermediate_code_internal (CPUState *env, TranslationBlock *tb,
break;
case BS_BRANCH:
default:
+ gen_op_reset_T0();
+ /* Generate the return instruction. */
+ gen_op_exit_tb();
break;
}
- gen_op_reset_T0();
- /* Generate the return instruction. */
- gen_op_exit_tb();
}
done_generating:
*gen_opc_ptr = INDEX_op_end;