Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0710b91c authored by Phil Edworthy's avatar Phil Edworthy Committed by Paul Mundt
Browse files

sh: Fix unaligned memory access for branches without delay slots



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: default avatarPhil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 2d0b579a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);