Page MenuHomeFreeBSD

divmoddi4: Handle negative remainders.
ClosedPublic

Authored by jhb on Jul 1 2023, 9:32 PM.
Tags
None
Referenced Files
F151110327: D40832.id124080.diff
Mon, Apr 6, 3:38 AM
F151022472: D40832.id124080.diff
Sun, Apr 5, 12:29 PM
Unknown Object (File)
Thu, Mar 12, 6:38 AM
Unknown Object (File)
Thu, Mar 12, 6:32 AM
Unknown Object (File)
Feb 7 2026, 4:04 PM
Unknown Object (File)
Jan 31 2026, 2:36 PM
Unknown Object (File)
Dec 16 2025, 4:05 AM
Unknown Object (File)
Dec 10 2025, 9: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.