aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mn10300/mm
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2008-11-12 10:35:20 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-11-12 13:41:17 -0500
commitf911c685d65ea1855eb3f95b8eaf871e5d9342fa (patch)
tree26c2ac08ef38829006c5c8f99ac5ed5d8c660ba2 /arch/mn10300/mm
parentb308bf3be1f75207c307eea9ada90e0b76194911 (diff)
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/mn10300/mm')
-rw-r--r--arch/mn10300/mm/misalignment.c4
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,
543{ 543{
544 unsigned long *postinc = NULL, address = 0, tmp; 544 unsigned long *postinc = NULL, address = 0, tmp;
545 545
546 params &= 0x7fffffff; 546 params &= 0x00ffffff;
547 547
548 do { 548 do {
549 switch (params & 0xff) { 549 switch (params & 0xff) {
@@ -631,6 +631,7 @@ static int misalignment_addr(unsigned long *registers, unsigned params,
631 address += disp; 631 address += disp;
632 break; 632 break;
633 default: 633 default:
634 BUG();
634 return 0; 635 return 0;
635 } 636 }
636 } while ((params >>= 8)); 637 } while ((params >>= 8));
@@ -697,6 +698,7 @@ static int misalignment_reg(unsigned long *registers, unsigned params,
697 break; 698 break;
698 699
699 default: 700 default:
701 BUG();
700 return 0; 702 return 0;
701 } 703 }
702 704