Page MenuHomeFreeBSD

divmoddi4: Handle negative remainders.
ClosedPublic

Authored by jhb on Jul 1 2023, 9:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jun 28, 10:40 PM
Unknown Object (File)
Thu, Jun 27, 6:16 PM
Unknown Object (File)
May 14 2024, 11:10 AM
Unknown Object (File)
May 14 2024, 7:36 AM
Unknown Object (File)
Apr 29 2024, 7:33 AM
Unknown Object (File)
Mar 16 2024, 8:41 PM
Unknown Object (File)
Mar 16 2024, 8:41 PM
Unknown Object (File)
Mar 16 2024, 8:41 PM
Subscribers

Details

Summary

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

Reported by: jrtc27

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.Jul 1 2023, 9:32 PM

negq = negr = [01] is slightly shorter and what I did but eh, debatable which is clearer

This revision is now accepted and ready to land.Jul 1 2023, 9:35 PM
sys/libkern/divmoddi4.c
58–59
This revision was automatically updated to reflect the committed changes.