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 | |
parent | MIPS: math-emu: Get rid of typedefs. (diff) | |
download | linux-5a7ebbf89395392f16cb5dd342b7edd154ca2d11.tar.xz linux-5a7ebbf89395392f16cb5dd342b7edd154ca2d11.zip |
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')
-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 e28a3e0eb3cb..c842e7de21c7 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))) |