summaryrefslogtreecommitdiff
path: root/sysdeps/tile/tilegx/bits/atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/tile/tilegx/bits/atomic.h')
-rw-r--r--sysdeps/tile/tilegx/bits/atomic.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/sysdeps/tile/tilegx/bits/atomic.h b/sysdeps/tile/tilegx/bits/atomic.h
index ac654b8946..e75efb1c41 100644
--- a/sysdeps/tile/tilegx/bits/atomic.h
+++ b/sysdeps/tile/tilegx/bits/atomic.h
@@ -21,7 +21,15 @@
#include <arch/spr_def.h>
-#define __HAVE_64B_ATOMICS 1
+#ifdef _LP64
+# define __HAVE_64B_ATOMICS 1
+#else
+/* tilegx32 does have 64-bit atomics, but assumptions in the semaphore
+ code mean that unaligned 64-bit atomics will be used if this symbol
+ is true, and unaligned atomics are not supported on tile. */
+# define __HAVE_64B_ATOMICS 0
+#endif
+
#define USE_ATOMIC_COMPILER_BUILTINS 0
/* Pick appropriate 8- or 4-byte instruction. */