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)
Mon, Oct 28, 2:59 AM
Unknown Object (File)
Sun, Oct 27, 5:41 AM
Unknown Object (File)
Oct 5 2024, 11:23 PM
Unknown Object (File)
Oct 5 2024, 4:27 PM
Unknown Object (File)
Oct 5 2024, 9:03 AM
Unknown Object (File)
Oct 3 2024, 1:16 AM
Unknown Object (File)
Oct 2 2024, 11:04 PM
Unknown Object (File)
Sep 27 2024, 5:39 PM
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