summaryrefslogtreecommitdiff
path: root/target-arm
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-07-19 10:34:35 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-07-19 10:34:35 +0000
commit27c070e5f3f997e3a9aa1c141129f68143f5be3e (patch)
tree9b07fba4334e3de4d464ce5760febadd9e0697b2 /target-arm
parent20b1c3af604f617305afe4c1732673dec88373c0 (diff)
downloadqemu-27c070e5f3f997e3a9aa1c141129f68143f5be3e.tar.gz
qemu-27c070e5f3f997e3a9aa1c141129f68143f5be3e.tar.bz2
qemu-27c070e5f3f997e3a9aa1c141129f68143f5be3e.zip
ARM: fix CPS masks (Vincent Palatin).
According to ARM Reference Manual (DDI0100 A4.1.16), bit 5 is fixed to 0 (bit 4 is the MSB of the mode), so the instruction mask should be 0x0ff10020 not 0x0ff10010. Besides, mmod flag is bit 17 (b14 is SBZ) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4899 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-arm')
-rw-r--r--target-arm/translate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target-arm/translate.c b/target-arm/translate.c
index 8e3e1695bf..7ba78d9fce 100644
--- a/target-arm/translate.c
+++ b/target-arm/translate.c
@@ -5813,7 +5813,7 @@ static void disas_arm_insn(CPUState * env, DisasContext *s)
/* Coprocessor double register transfer. */
} else if ((insn & 0x0f000010) == 0x0e000010) {
/* Additional coprocessor register transfer. */
- } else if ((insn & 0x0ff10010) == 0x01000000) {
+ } else if ((insn & 0x0ff10020) == 0x01000000) {
uint32_t mask;
uint32_t val;
/* cps (privileged) */
@@ -5830,7 +5830,7 @@ static void disas_arm_insn(CPUState * env, DisasContext *s)
if (insn & (1 << 18))
val |= mask;
}
- if (insn & (1 << 14)) {
+ if (insn & (1 << 17)) {
mask |= CPSR_M;
val |= (insn & 0x1f);
}