sh: Fix unaligned memory access for branches without delay slots
authorPhil Edworthy <Phil.Edworthy@renesas.com>
Mon, 22 Aug 2011 15:56:08 +0000 (15:56 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 29 Aug 2011 06:32:04 +0000 (15:32 +0900)
This patch just clears the return code for those cases where an
unaligned memory access occurs on branch instructions without a
delay slot.

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/traps_32.c

index d9006f8ffc142532d99b0ff539f88831f4027999..61fa4a5bc72b79b07d56df4563e3ce2817d0b425 100644 (file)
@@ -466,6 +466,7 @@ int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs,
                case 0x0500: /* mov.w @(disp,Rm),R0 */
                        goto simple;
                case 0x0B00: /* bf   lab - no delayslot*/
+                       ret = 0;
                        break;
                case 0x0F00: /* bf/s lab */
                        ret = handle_delayslot(regs, instruction, ma);
@@ -479,6 +480,7 @@ int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs,
                        }
                        break;
                case 0x0900: /* bt   lab - no delayslot */
+                       ret = 0;
                        break;
                case 0x0D00: /* bt/s lab */
                        ret = handle_delayslot(regs, instruction, ma);