Page MenuHomeFreeBSD

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

Authored by rlibby on Mon, Jul 1, 4:48 PM.
Tags
None
Referenced Files
F87606535: D45827.diff
Fri, Jul 5, 6:32 PM
Unknown Object (File)
Wed, Jul 3, 4:29 PM
Unknown Object (File)
Tue, Jul 2, 11:28 PM
Unknown Object (File)
Tue, Jul 2, 8:34 PM
Unknown Object (File)
Tue, Jul 2, 8:33 PM
Unknown Object (File)
Tue, Jul 2, 8:33 PM
Unknown Object (File)
Tue, Jul 2, 4:17 PM
Unknown Object (File)
Tue, Jul 2, 3:36 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.Mon, Jul 1, 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.Mon, Jul 1, 9:17 PM