diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2014-04-16 01:52:32 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-05-21 11:12:49 +0200 |
commit | 5a7ebbf89395392f16cb5dd342b7edd154ca2d11 (patch) | |
tree | fb5079c0827b61826e8fb0c6854ff60f00b49ed2 /arch/mips/include/asm/branch.h | |
parent | 2209bcb1310ffa9ee1af12573f1413581c712b15 (diff) |
MIPS: branch: New helpers to modify branch delay slot flag in struct pt_regs
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/branch.h')
-rw-r--r-- | arch/mips/include/asm/branch.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/mips/include/asm/branch.h b/arch/mips/include/asm/branch.h index e28a3e0eb3c..c842e7de21c 100644 --- a/arch/mips/include/asm/branch.h +++ b/arch/mips/include/asm/branch.h @@ -24,6 +24,16 @@ static inline int delay_slot(struct pt_regs *regs) return regs->cp0_cause & CAUSEF_BD; } +static inline void clear_delay_slot(struct pt_regs *regs) +{ + regs->cp0_cause &= ~CAUSEF_BD; +} + +static inline void set_delay_slot(struct pt_regs *regs) +{ + regs->cp0_cause |= CAUSEF_BD; +} + static inline unsigned long exception_epc(struct pt_regs *regs) { if (likely(!delay_slot(regs))) |