Page MenuHomeFreeBSD

amd64 pcpu: fix clobbers, suppress warnings, and clean up
ClosedPublic

Authored by rlibby on Jul 1 2024, 4:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Aug 14, 7:01 AM
Unknown Object (File)
Thu, Aug 13, 1:46 AM
Unknown Object (File)
Tue, Aug 11, 2:53 PM
Unknown Object (File)
Tue, Aug 11, 2:49 PM
Unknown Object (File)
Tue, Aug 11, 2:48 PM
Unknown Object (File)
Mon, Aug 10, 1:10 PM
Unknown Object (File)
Sat, Aug 8, 6:14 AM
Unknown Object (File)
Thu, Aug 6, 2:21 AM
Subscribers

Details

Summary

These changes mostly apply to the !__SEG_GS section, which is no longer
the normal compilation path. They're made to be consistent with changes
to i386.

  • Add missing cc clobber to __PCPU_ADD (which is currently unused).
  • Allow the compiler the opportunity to marginally improve code generation from __PCPU_PTR by letting it figure out how to do the add (also removing the addition fixes a missing cc clobber).
  • Quiet gcc -Warray-bounds by using constant operands instead of bogus memory references.
  • Remove the struct s s temporaries, just cast through the type.

Diff Detail

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

Event Timeline

rlibby requested review of this revision.Jul 1 2024, 4:48 PM

diff -u1000 sys/{i386,amd64}/include/pcpu.h for comparison to D45826. Ignore the #if 0 for testing.

This revision is now accepted and ready to land.Jul 1 2024, 9:17 PM