Date: Tue, 24 Apr 2018 17:31:20 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332945 - head/sys/mips/mips Message-ID: <201804241731.w3OHVKDF038580@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804241731.w3OHVKDF038580>