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
F163615045: D45827.id140436.diff
Fri, Jul 24, 9:31 PM
Unknown Object (File)
Thu, Jul 23, 3:46 AM
Unknown Object (File)
Tue, Jul 21, 3:30 AM
Unknown Object (File)
Mon, Jul 20, 12:48 PM
Unknown Object (File)
Jun 24 2026, 11:40 AM
Unknown Object (File)
Jun 23 2026, 5:11 AM
Unknown Object (File)
Jun 23 2026, 12:42 AM
Unknown Object (File)
Jun 17 2026, 5:13 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