mirror of git://git.musl-libc.org/musl
92637bb0d8
other archs use asm for the thread pointer load, so making that asm volatile is sufficient to inform the compiler that it has a "side effect" (crashing or giving the wrong result if the thread pointer was not yet initialized) that prevents reordering. however, powerpc and or1k have dedicated general purpose registers for the thread pointer and did not need to use any asm to access it; instead, "local register variables with a specified register" were used. however, there is no specification for ordering constraints on this type of usage, and presumably use of the thread pointer could be reordered across its initialization. to impose an ordering, I have added empty volatile asm blocks that produce the "local register variable with a specified register" as an output constraint. |
||
---|---|---|
.. | ||
aarch64 | ||
arm | ||
i386 | ||
microblaze | ||
mips | ||
or1k | ||
powerpc | ||
sh | ||
x32 | ||
x86_64 |