Date: Tue, 24 Apr 2018 17:22:18 +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: r332944 - head/sys/mips/mips Message-ID: <201804241722.w3OHMId3037534@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Tue Apr 24 17:22:17 2018 New Revision: 332944 URL: https://svnweb.freebsd.org/changeset/base/332944 Log: Use a cleaner test for the branch delay (BD) bit in DELAYBRANCH. Rather than casting the value of cause to int and checking for a negative value to determine if bit 31 is set, use a binary and with MIPS_CR_BR_DELAY. Modified: head/sys/mips/mips/trap.c Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Tue Apr 24 17:13:31 2018 (r332943) +++ head/sys/mips/mips/trap.c Tue Apr 24 17:22:17 2018 (r332944) @@ -281,7 +281,7 @@ struct trapdebug trapdebug[TRAPSIZE], *trp = trapdebug #endif #define KERNLAND(x) ((vm_offset_t)(x) >= VM_MIN_KERNEL_ADDRESS && (vm_offset_t)(x) < VM_MAX_KERNEL_ADDRESS) -#define DELAYBRANCH(x) ((int)(x) < 0) +#define DELAYBRANCH(x) ((x) & MIPS_CR_BR_DELAY) /* * MIPS load/store access type
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804241722.w3OHMId3037534>