qdivrem: Predict division by zero as false.
Division by zero triggers an arithmetic exception and should not be very common. Predict this. No functional change intended. MFC after: 1 week Sponsored by: NVIDIA Networking
This commit is contained in:
parent
cd84e78f09
commit
1024bb2633
@ -94,7 +94,7 @@ __qdivrem(u_quad_t uq, u_quad_t vq, u_quad_t *arq)
|
||||
/*
|
||||
* Take care of special cases: divide by zero, and u < v.
|
||||
*/
|
||||
if (vq == 0) {
|
||||
if (__predict_false(vq == 0)) {
|
||||
/* divide by zero. */
|
||||
static volatile const unsigned int zero = 0;
|
||||
|
||||
|
@ -91,7 +91,7 @@ __qdivrem(u_quad_t uq, u_quad_t vq, u_quad_t *arq)
|
||||
/*
|
||||
* Take care of special cases: divide by zero, and u < v.
|
||||
*/
|
||||
if (vq == 0) {
|
||||
if (__predict_false(vq == 0)) {
|
||||
/* divide by zero. */
|
||||
static volatile const unsigned int zero = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user