aboutsummaryrefslogtreecommitdiff
path: root/sys/conf/files.mips
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2013-06-08 13:19:11 +0000
committerEd Schouten <ed@FreeBSD.org>2013-06-08 13:19:11 +0000
commit2e5d5dc936f4b8f54734ca690e4061e250592d9d (patch)
tree9cf919cf8c648029ada2c496b50207d4e967706d /sys/conf/files.mips
parent995d706909e7917a9d8f63d4266902ddc97897ce (diff)
Add proper __sync_*() intrinsics for MIPS.
To make <stdatomic.h> work on MIPS (and ARM) using GCC, we need to provide implementations of the __sync_*() functions. I already added these functions for 4 and 8 byte types to libcompiler-rt some time ago, based on top of <machine/atomic.h>. Unfortunately, <machine/atomic.h> only provides a subset of the features needed to implement <stdatomic.h>. This means that in some cases we had to do compare-and-exchange calls in loops, where a simple ll/sc would suffice. Also implement these functions for 1 and 2 byte types. MIPS only provides ll/sc instructions for 4 and 8 byte types, but this is of course no limitation. We can simply load 4 bytes and use some bitmask tricks to modify only the bytes affected. Discussed on: mips, arch Tested with: QEMU
Notes
Notes: svn path=/head/; revision=251524
Diffstat (limited to 'sys/conf/files.mips')
-rw-r--r--sys/conf/files.mips2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/conf/files.mips b/sys/conf/files.mips
index 7308143bbebf..79676b992887 100644
--- a/sys/conf/files.mips
+++ b/sys/conf/files.mips
@@ -35,6 +35,8 @@ mips/mips/pmap.c standard
mips/mips/ptrace_machdep.c standard
mips/mips/sc_machdep.c standard
mips/mips/stack_machdep.c optional ddb | stack
+mips/mips/stdatomic.c standard \
+ compile-with "${NORMAL_C:N-Wmissing-prototypes}"
mips/mips/support.S standard
mips/mips/swtch.S standard
mips/mips/sys_machdep.c standard