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.
This commit is contained in:
John Baldwin 2018-04-24 17:22:17 +00:00
parent 989b861f5c
commit beea560039

View File

@ -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