]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
mips: Fix sub-word atomics implementation
authorJessica Clarke <jrtc27@FreeBSD.org>
Mon, 14 Dec 2020 00:47:59 +0000 (00:47 +0000)
committerJessica Clarke <jrtc27@FreeBSD.org>
Mon, 14 Dec 2020 00:47:59 +0000 (00:47 +0000)
commit36a690573031322773c2487242fc3b630a959872
tree162ddf64ee1f253e1735318dbd25c7af8c41a47b
parentc46f7610d4c5a57fdb2aac5fcbf66aa7124ec703
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