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

Commit 5a7ebbf8 authored by Ralf Baechle's avatar Ralf Baechle
Browse files

MIPS: branch: New helpers to modify branch delay slot flag in struct pt_regs

parent 2209bcb1
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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)))