Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
int pc_inc;
/* XXX NEC Vr54xx bug workaround */
int pc_inc;
/* XXX NEC Vr54xx bug workaround */
- if (xcp->cp0_cause & CAUSEF_BD) {
if (dec_insn.micro_mips_mode) {
if (!mm_isBranchInstr(xcp, dec_insn, &contpc))
if (dec_insn.micro_mips_mode) {
if (!mm_isBranchInstr(xcp, dec_insn, &contpc))
- xcp->cp0_cause &= ~CAUSEF_BD;
} else {
if (!isBranchInstr(xcp, dec_insn, &contpc))
} else {
if (!isBranchInstr(xcp, dec_insn, &contpc))
- xcp->cp0_cause &= ~CAUSEF_BD;
- if (xcp->cp0_cause & CAUSEF_BD) {
/*
* The instruction to be emulated is in a branch delay slot
* which means that we have to emulate the branch instruction
/*
* The instruction to be emulated is in a branch delay slot
* which means that we have to emulate the branch instruction
case bc_op:{
int likely = 0;
case bc_op:{
int likely = 0;
- if (xcp->cp0_cause & CAUSEF_BD)
return SIGILL;
#if __mips >= 4
return SIGILL;
#if __mips >= 4
- xcp->cp0_cause |= CAUSEF_BD;
if (cond) {
/* branch taken: emulate dslot
* instruction
if (cond) {
/* branch taken: emulate dslot
* instruction
/* we did it !! */
xcp->cp0_epc = contpc;
/* we did it !! */
xcp->cp0_epc = contpc;
- xcp->cp0_cause &= ~CAUSEF_BD;
(ir == 0)) {
/* NOP is easy */
regs->cp0_epc = cpc;
(ir == 0)) {
/* NOP is easy */
regs->cp0_epc = cpc;
- regs->cp0_cause &= ~CAUSEF_BD;
+ clear_delay_slot(regs);
return 0;
}
#ifdef DSEMUL_TRACE
return 0;
}
#ifdef DSEMUL_TRACE