Page MenuHomeFreeBSD

Reduce Duplication in sys/*/include files
ClosedPublic

Authored by pnagato_protonmail.com on Sep 2 2020, 6:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 28, 6:08 PM
Unknown Object (File)
Oct 12 2024, 10:03 PM
Unknown Object (File)
Oct 12 2024, 2:54 PM
Unknown Object (File)
Oct 12 2024, 4:59 AM
Unknown Object (File)
Oct 8 2024, 1:46 PM
Unknown Object (File)
Oct 6 2024, 7:43 PM
Unknown Object (File)
Oct 2 2024, 5:24 PM
Unknown Object (File)
Sep 30 2024, 5:26 AM
Subscribers

Details

Summary

@imp Opening a diff for feedback/discussion

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 33349
Build 30659: arc lint + arc unit

Event Timeline

Added the duplication to a new file

Would it make more sense to create sys/x86/include/x86_ieeefp.h and include it in amd64/include/ieeefp.h and i386/include/ieeefp.h?

BTW, please consider submitting/updating patch with arc tool: https://wiki.freebsd.org/Phabricator

Move duplicated code under x86/include

@lwhsu Thank you, i moved the duplicated code under x86/include/x86_ieeefp.h and i was able to arc to update the diff.

Add new line and space after #include

@imp : ping, do you think this makes sense? It looks good to me but I'm not sure the convention is naming it x86_ieeefp.h or _ieeefp.h, I saw both under x86/include.

I think this is fine

This revision is now accepted and ready to land.Sep 12 2020, 3:08 PM
pnagato_protonmail.com retitled this revision from WIP: Reduce Duplication in sys/*/include files to Reduce Duplication in sys/*/include files.Sep 16 2020, 3:50 AM

One final question, is the "Deprecated historical FPU control interface" comment also applicable to the remaining codes in amd64 and i386?

After checked these:

I've updated the differential at https://github.com/lwhsu/freebsd-src/commit/efdc084a247585588335beae9a0ef17fcff4c20e

Change summary:

  • Add copyright header for x86/include/x86_ieeefp.h
  • Restore "Deprecated historical FPU control interface" comments in {amd64,i386}/include/ieeefp.h as it is applicable to the remaining codes
  • Restore the warning of {FP,SSE}*FLD and {FP,SSE}*OFF in amd64/include/ieeefp.h as there are still applicable codes.
  • White space cleanup

@pnagato_protonmail.com: please let me know if those changes look good to you.