Add RISC-V support
authorShea Levy <shea@shealevy.com>
Sun, 18 Feb 2018 05:47:44 +0000 (00:47 -0500)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 5 Mar 2018 21:38:13 +0000 (00:38 +0300)
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).

src/Makefile.am
src/atomic_ops.h
src/atomic_ops/sysdeps/gcc/riscv.h [new file with mode: 0644]

index dadc932..084dd3c 100644 (file)
@@ -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 \
index 187e1f9..22e516f 100644 (file)
 # 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 (file)
index 0000000..412c395
--- /dev/null
@@ -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"