summaryrefslogtreecommitdiffstats
path: root/arch/arc/kernel/unaligned.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arc/kernel/unaligned.c')
-rw-r--r--arch/arc/kernel/unaligned.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arc/kernel/unaligned.c b/arch/arc/kernel/unaligned.c
index 28d17006074..7ff5b5c183b 100644
--- a/arch/arc/kernel/unaligned.c
+++ b/arch/arc/kernel/unaligned.c
@@ -245,6 +245,12 @@ int misaligned_fixup(unsigned long address, struct pt_regs *regs,
regs->status32 &= ~STATUS_DE_MASK;
} else {
regs->ret += state.instr_len;
+
+ /* handle zero-overhead-loop */
+ if ((regs->ret == regs->lp_end) && (regs->lp_count)) {
+ regs->ret = regs->lp_start;
+ regs->lp_count--;
+ }
}
return 0;