提交 f911c685 编写于 作者: D David Howells 提交者: Linus Torvalds

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: NDavid Howells <dhowells@redhat.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 b308bf3b
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册