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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=332945
@ -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