svn commit: r332944 - head/sys/mips/mips
John Baldwin
jhb at FreeBSD.org
Tue Apr 24 17:22:21 UTC 2018
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
More information about the svn-src-all
mailing list