diff options
author | David Howells | 2008-11-12 16:35:20 +0100 |
---|---|---|
committer | Linus Torvalds | 2008-11-12 19:41:17 +0100 |
commit | f911c685d65ea1855eb3f95b8eaf871e5d9342fa (patch) | |
tree | 26c2ac08ef38829006c5c8f99ac5ed5d8c660ba2 /arch | |
parent | MN10300: Extract the displacement from an insn correctly in misalignment fixup (diff) | |
download | kernel-qcow2-linux-f911c685d65ea1855eb3f95b8eaf871e5d9342fa.tar.gz kernel-qcow2-linux-f911c685d65ea1855eb3f95b8eaf871e5d9342fa.tar.xz kernel-qcow2-linux-f911c685d65ea1855eb3f95b8eaf871e5d9342fa.zip |
MN10300: Fix register-postinc addressing misalignment handling
Fix misalignment handling of operands with register postincrement addressing.
The flag to indicate that postincrement is required should not be interpreted
as an specification of a value to be added to the address.
Also add BUGs to catch unimplemented parameter markings in the opcodes table.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mn10300/mm/misalignment.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/mn10300/mm/misalignment.c b/arch/mn10300/mm/misalignment.c index 614c32b6325b..066ddc625a14 100644 --- a/arch/mn10300/mm/misalignment.c +++ b/arch/mn10300/mm/misalignment.c @@ -543,7 +543,7 @@ static int misalignment_addr(unsigned long *registers, unsigned params, { unsigned long *postinc = NULL, address = 0, tmp; - params &= 0x7fffffff; + params &= 0x00ffffff; do { switch (params & 0xff) { @@ -631,6 +631,7 @@ static int misalignment_addr(unsigned long *registers, unsigned params, address += disp; break; default: + BUG(); return 0; } } while ((params >>= 8)); @@ -697,6 +698,7 @@ static int misalignment_reg(unsigned long *registers, unsigned params, break; default: + BUG(); return 0; } |