History log of /freebsd-current/sys/libkern/divmoddi4.c
Revision Date Author Comments
# 9ac841e9 07-Jul-2023 John Baldwin <jhb@FreeBSD.org>

divmoddi*: Use separate statements instead of the comma operator.

Differential Revision: https://reviews.freebsd.org/D40835


# 84deca4d 01-Jul-2023 John Baldwin <jhb@FreeBSD.org>

libkern: Trim OBE comment from divmoddi routines.

-1/2 is defined to be 0 in modern C.

Reviewed by: jrtc27
Differential Revision: https://reviews.freebsd.org/D40833


# df11fb9b 01-Jul-2023 John Baldwin <jhb@FreeBSD.org>

divmoddi4: Handle negative remainders.

The sign of the remainder matches the sign of the numerator in C.

Reported by: jrtc27
Reviewed by: jrtc27
Differential Revision: https://reviews.freebsd.org/D40832


# cc4f247f 01-Jul-2023 John Baldwin <jhb@FreeBSD.org>

sys: Add [u]divmoddi4 intrinsics on i386.

GCC 12 uses these in several places when building the i386 kernel.
They are very similar to [u]divdiv3 except that they return both
the quotient and the remainder.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D40817