summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2016-03-15 10:09:26 +0300
committerIvan Maidanski <ivmai@mail.ru>2016-03-15 10:09:26 +0300
commit4b005ee56898309e8afba9b3c48cf94f0f5f78e4 (patch)
tree922e172a296a6e751b73ca6162bf7a32a96f3731
parent0453506c71fde323829ad35a17efd5c39a108b36 (diff)
downloadlibatomic_ops-4b005ee56898309e8afba9b3c48cf94f0f5f78e4.tar.gz
Add initial nios2 architecture support
* src/Makefile.am (nobase_private_HEADERS): Add nios2.h. * src/atomic_ops.h: Include nios2.h if __nios2__. * src/atomic_ops/sysdeps/gcc/nios2.h: New file.
-rw-r--r--src/Makefile.am1
-rw-r--r--src/atomic_ops.h3
-rw-r--r--src/atomic_ops/sysdeps/gcc/nios2.h17
3 files changed, 21 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index fc09b27..d463427 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -79,6 +79,7 @@ nobase_private_HEADERS = atomic_ops/ao_version.h \
atomic_ops/sysdeps/gcc/ia64.h \
atomic_ops/sysdeps/gcc/m68k.h \
atomic_ops/sysdeps/gcc/mips.h \
+ atomic_ops/sysdeps/gcc/nios2.h \
atomic_ops/sysdeps/gcc/powerpc.h \
atomic_ops/sysdeps/gcc/s390.h \
atomic_ops/sysdeps/gcc/sh.h \
diff --git a/src/atomic_ops.h b/src/atomic_ops.h
index 33fe00e..ec02ba4 100644
--- a/src/atomic_ops.h
+++ b/src/atomic_ops.h
@@ -262,6 +262,9 @@
# if defined(__m68k__)
# include "atomic_ops/sysdeps/gcc/m68k.h"
# endif /* __m68k__ */
+# if defined(__nios2__)
+# include "atomic_ops/sysdeps/gcc/nios2.h"
+# endif /* __nios2__ */
# if defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) \
|| defined(__powerpc64__) || defined(__ppc64__)
# include "atomic_ops/sysdeps/gcc/powerpc.h"
diff --git a/src/atomic_ops/sysdeps/gcc/nios2.h b/src/atomic_ops/sysdeps/gcc/nios2.h
new file mode 100644
index 0000000..f402cbb
--- /dev/null
+++ b/src/atomic_ops/sysdeps/gcc/nios2.h
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2016 Marek Vasut <marex@denx.de>
+ *
+ * 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 "../test_and_set_t_is_ao_t.h"
+#include "generic.h"
+
+#define AO_T_IS_INT