diff options
author | Shea Levy <shea@shealevy.com> | 2018-02-18 00:47:44 -0500 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2018-03-06 00:38:13 +0300 |
commit | 137643f1417ded071c56e05401ca6a3c16492d96 (patch) | |
tree | 4c5cc3f8bd50109cc8d99b3821113306e6707ae7 | |
parent | 372e9890ddc05b6fa9f7a358a448617652508c96 (diff) | |
download | libatomic_ops-137643f1417ded071c56e05401ca6a3c16492d96.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).
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/atomic_ops.h | 3 | ||||
-rw-r--r-- | src/atomic_ops/sysdeps/gcc/riscv.h | 12 |
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" |