Commit 7ec47eadc7048435b54bc53ccb41307851098409
1 parent
adb86c37
Speed up m68k by 20%.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2855 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
8 additions
and
8 deletions
target-m68k/op.c
... | ... | @@ -48,23 +48,23 @@ static long qreg_offsets[] = { |
48 | 48 | uint32_t |
49 | 49 | get_op(int qreg) |
50 | 50 | { |
51 | - if (qreg == QREG_T0) { | |
51 | + if (qreg >= TARGET_NUM_QREGS) { | |
52 | + return env->qregs[qreg - TARGET_NUM_QREGS]; | |
53 | + } else if (qreg == QREG_T0) { | |
52 | 54 | return T0; |
53 | - } else if (qreg < TARGET_NUM_QREGS) { | |
54 | - return *(uint32_t *)(((long)env) + qreg_offsets[qreg]); | |
55 | 55 | } else { |
56 | - return env->qregs[qreg - TARGET_NUM_QREGS]; | |
56 | + return *(uint32_t *)(((long)env) + qreg_offsets[qreg]); | |
57 | 57 | } |
58 | 58 | } |
59 | 59 | |
60 | 60 | void set_op(int qreg, uint32_t val) |
61 | 61 | { |
62 | - if (qreg == QREG_T0) { | |
62 | + if (qreg >= TARGET_NUM_QREGS) { | |
63 | + env->qregs[qreg - TARGET_NUM_QREGS] = val; | |
64 | + } else if (qreg == QREG_T0) { | |
63 | 65 | T0 = val; |
64 | - } else if (qreg < TARGET_NUM_QREGS) { | |
65 | - *(uint32_t *)(((long)env) + qreg_offsets[qreg]) = val; | |
66 | 66 | } else { |
67 | - env->qregs[qreg - TARGET_NUM_QREGS] = val; | |
67 | + *(uint32_t *)(((long)env) + qreg_offsets[qreg]) = val; | |
68 | 68 | } |
69 | 69 | } |
70 | 70 | ... | ... |