summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2018-02-18 00:47:44 -0500
committerIvan Maidanski <ivmai@mail.ru>2018-02-19 09:03:20 +0300
commit27ca1b0f306cb99f14f863b22d490bb30c778300 (patch)
treef37b907d0386bafa00b67f25c66786efd81586c7 /src
parent62b96095a3db430c45a8dbca7294dec52b3a1658 (diff)
downloadlibatomic_ops-27ca1b0f306cb99f14f863b22d490bb30c778300.tar.gz
Add RISC-V support
Issue #31 (libatomic_ops). * src/Makefile.am (nobase_private_HEADERS): Add riscv.h entry. * src/atomic_ops.h [__riscv]: Include riscv.h file. * src/atomic_ops/sysdeps/gcc/riscv.h: New file (just include generic.h).
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am1
-rw-r--r--src/atomic_ops.h3
-rw-r--r--src/atomic_ops/sysdeps/gcc/riscv.h12
3 files changed, 16 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index dadc932..084dd3c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -92,6 +92,7 @@ nobase_private_HEADERS = atomic_ops/ao_version.h \
atomic_ops/sysdeps/gcc/mips.h \
atomic_ops/sysdeps/gcc/nios2.h \
atomic_ops/sysdeps/gcc/powerpc.h \
+ atomic_ops/sysdeps/gcc/riscv.h \
atomic_ops/sysdeps/gcc/s390.h \
atomic_ops/sysdeps/gcc/sh.h \
atomic_ops/sysdeps/gcc/sparc.h \
diff --git a/src/atomic_ops.h b/src/atomic_ops.h
index 187e1f9..22e516f 100644
--- a/src/atomic_ops.h
+++ b/src/atomic_ops.h
@@ -352,6 +352,9 @@
# if defined(__tile__)
# include "atomic_ops/sysdeps/gcc/tile.h"
# endif
+# if defined(__riscv)
+# include "atomic_ops/sysdeps/gcc/riscv.h"
+# endif
#endif /* __GNUC__ && !AO_USE_PTHREAD_DEFS */
#if (defined(__IBMC__) || defined(__IBMCPP__)) && !defined(__GNUC__) \
diff --git a/src/atomic_ops/sysdeps/gcc/riscv.h b/src/atomic_ops/sysdeps/gcc/riscv.h
new file mode 100644
index 0000000..412c395
--- /dev/null
+++ b/src/atomic_ops/sysdeps/gcc/riscv.h
@@ -0,0 +1,12 @@
+/*
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose, provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ */
+
+#include "generic.h"