Page MenuHomeFreeBSD

divmoddi4: Handle negative remainders.
ClosedPublic

Authored by jhb on Jul 1 2023, 9:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 5, 12:50 PM
Unknown Object (File)
Mon, Oct 5, 12:43 PM
Unknown Object (File)
Mon, Oct 5, 12:21 PM
Unknown Object (File)
Thu, Sep 24, 5:27 AM
Unknown Object (File)
Thu, Sep 17, 9:59 PM
Unknown Object (File)
Sun, Sep 13, 9:27 AM
Unknown Object (File)
Fri, Sep 11, 2:35 PM
Unknown Object (File)
Thu, Sep 10, 9:30 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.