aboutsummaryrefslogtreecommitdiff
path: root/target-m68k
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-05-23 22:07:36 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-05-23 22:07:36 +0000
commit7ec47eadc7048435b54bc53ccb41307851098409 (patch)
tree588391989793206f060c648da62875e2159b2e6e /target-m68k
parentadb86c372e1596c07437682ff7aa71c905dbc14f (diff)
Speed up m68k by 20%.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2855 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-m68k')
-rw-r--r--target-m68k/op.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/target-m68k/op.c b/target-m68k/op.c
index ad6f403f5c..6134bb018e 100644
--- a/target-m68k/op.c
+++ b/target-m68k/op.c
@@ -48,23 +48,23 @@ static long qreg_offsets[] = {
uint32_t
get_op(int qreg)
{
- if (qreg == QREG_T0) {
+ if (qreg >= TARGET_NUM_QREGS) {
+ return env->qregs[qreg - TARGET_NUM_QREGS];
+ } else if (qreg == QREG_T0) {
return T0;
- } else if (qreg < TARGET_NUM_QREGS) {
- return *(uint32_t *)(((long)env) + qreg_offsets[qreg]);
} else {
- return env->qregs[qreg - TARGET_NUM_QREGS];
+ return *(uint32_t *)(((long)env) + qreg_offsets[qreg]);
}
}
void set_op(int qreg, uint32_t val)
{
- if (qreg == QREG_T0) {
+ if (qreg >= TARGET_NUM_QREGS) {
+ env->qregs[qreg - TARGET_NUM_QREGS] = val;
+ } else if (qreg == QREG_T0) {
T0 = val;
- } else if (qreg < TARGET_NUM_QREGS) {
- *(uint32_t *)(((long)env) + qreg_offsets[qreg]) = val;
} else {
- env->qregs[qreg - TARGET_NUM_QREGS] = val;
+ *(uint32_t *)(((long)env) + qreg_offsets[qreg]) = val;
}
}