svn commit: r332945 - head/sys/mips/mips
John Baldwin
jhb at FreeBSD.org
Tue Apr 24 17:31:21 UTC 2018
Author: jhb
Date: Tue Apr 24 17:31:20 2018
New Revision: 332945
URL: https://svnweb.freebsd.org/changeset/base/332945
Log:
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
Modified:
head/sys/mips/mips/trap.c
Modified: head/sys/mips/mips/trap.c
==============================================================================
--- head/sys/mips/mips/trap.c Tue Apr 24 17:22:17 2018 (r332944)
+++ head/sys/mips/mips/trap.c Tue Apr 24 17:31:20 2018 (r332945)
@@ -875,15 +875,12 @@ dofault:
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,
More information about the svn-src-all
mailing list