Don't fetch the current instruction for faults on user "trap" instructions.
The value of 'instr' was not used to handle the fault. Reported by: GCC's -Wunused-but-set-variable
This commit is contained in:
parent
beea560039
commit
e920aebafe
@ -875,15 +875,12 @@ trap(struct trapframe *trapframe)
|
||||
case T_TRAP + T_USER:
|
||||
{
|
||||
intptr_t va;
|
||||
uint32_t instr;
|
||||
struct trapframe *locr0 = td->td_frame;
|
||||
|
||||
/* compute address of trap instruction */
|
||||
va = trapframe->pc;
|
||||
if (DELAYBRANCH(trapframe->cause))
|
||||
va += sizeof(int);
|
||||
/* read break instruction */
|
||||
instr = fuword32((caddr_t)va);
|
||||
|
||||
if (DELAYBRANCH(trapframe->cause)) { /* Check BD bit */
|
||||
locr0->pc = MipsEmulateBranch(locr0, trapframe->pc, 0,
|
||||
|
Loading…
Reference in New Issue
Block a user