From: David Howells Date: Wed, 12 Nov 2008 15:35:40 +0000 (+0000) Subject: MN10300: Fix misaligned index-register addressing handling X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=852c15b7362cf34e0d7949abefbfeeb0845d93b4;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git MN10300: Fix misaligned index-register addressing handling Fix misalignment handling for an address calculated from the sum of two registers. Signed-off-by: David Howells Signed-off-by: Linus Torvalds --- diff --git a/arch/mn10300/mm/misalignment.c b/arch/mn10300/mm/misalignment.c index 61e65ec47db8..a59836804bc6 100644 --- a/arch/mn10300/mm/misalignment.c +++ b/arch/mn10300/mm/misalignment.c @@ -570,11 +570,11 @@ static int misalignment_addr(unsigned long *registers, unsigned params, address += *postinc; break; case DM1: - postinc = ®isters[Dreg_index[opcode >> 2 & 0x0c]]; + postinc = ®isters[Dreg_index[opcode >> 2 & 0x03]]; address += *postinc; break; case DM2: - postinc = ®isters[Dreg_index[opcode >> 4 & 0x30]]; + postinc = ®isters[Dreg_index[opcode >> 4 & 0x03]]; address += *postinc; break; case AM0: @@ -582,11 +582,11 @@ static int misalignment_addr(unsigned long *registers, unsigned params, address += *postinc; break; case AM1: - postinc = ®isters[Areg_index[opcode >> 2 & 0x0c]]; + postinc = ®isters[Areg_index[opcode >> 2 & 0x03]]; address += *postinc; break; case AM2: - postinc = ®isters[Areg_index[opcode >> 4 & 0x30]]; + postinc = ®isters[Areg_index[opcode >> 4 & 0x03]]; address += *postinc; break; case RM0: