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:
Hans Petter Selasky 2022-10-04 12:28:25 +02:00
parent cd84e78f09
commit 1024bb2633
2 changed files with 2 additions and 2 deletions

View File

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

View File

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