about summary refs log tree commit diff
path: root/src/internal/intscan.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-07-19 13:51:35 -0400
committerRich Felker <dalias@aerifal.cx>2014-07-19 13:51:35 -0400
commita294f539c78c6ba0a2786ef3c5b2a1210a33864e (patch)
treedff5f8aebb95b1131805a984dd378fd3cc487108 /src/internal/intscan.h
parentbb3a3befeaa01531c273ef9130f3fbcaaf8a25e2 (diff)
downloadmusl-a294f539c78c6ba0a2786ef3c5b2a1210a33864e.tar.gz
musl-a294f539c78c6ba0a2786ef3c5b2a1210a33864e.tar.xz
musl-a294f539c78c6ba0a2786ef3c5b2a1210a33864e.zip
use memory constraints for mips atomic asm
despite lacking the semantic content that the asm accesses the
pointed-to object rather than just using its address as a value, the
mips asm was not actually broken. the asm blocks were declared
volatile, meaning that the compiler must treat them as having unknown
side effects.

however changing the asm to use memory constraints is desirable not
just from a semantic correctness and consistency standpoint, but also
produces better code. the compiler is able to use base/offset
addressing expressions for the atomic object's address rather than
having to load the address into a single register. this improves
access to global locks in static libc, and access to non-zero-offset
atomic fields in synchronization primitives, etc.
Diffstat (limited to 'src/internal/intscan.h')
0 files changed, 0 insertions, 0 deletions