]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
mips: Fix sub-word atomics implementation
authorjrtc27 <jrtc27@FreeBSD.org>
Mon, 14 Dec 2020 00:47:59 +0000 (00:47 +0000)
committerjrtc27 <jrtc27@FreeBSD.org>
Mon, 14 Dec 2020 00:47:59 +0000 (00:47 +0000)
commit1876929d266a7e2aa177ce8d5a29b6a26e90c2fb
tree162ddf64ee1f253e1735318dbd25c7af8c41a47b
parentd11c1cf1b1d5d6689727f2f39b850c66d619f2cb
mips: Fix sub-word atomics implementation

These aligned the address but then always used the least significant
bits of the value in memory, which is the wrong half 50% of the time for
16-bit atomics and the wrong quarter 75% of the time for 8-bit atomics.
These bugs were all present in r178172, the commit that added the mips
port, and have remained for its entire existence to date.

Reviewed by: jhb (mentor)
Approved by: jhb (mentor)
Differential Revision: https://reviews.freebsd.org/D27343
sys/mips/mips/support.S