Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | From 4b005ee56898309e8afba9b3c48cf94f0f5f78e4 Mon Sep 17 00:00:00 2001 |
| 2 | From: Marek Vasut <marex@denx.de> |
| 3 | Date: Tue, 15 Mar 2016 10:09:26 +0300 |
| 4 | Subject: [PATCH] Add initial nios2 architecture support |
| 5 | |
| 6 | * src/Makefile.am (nobase_private_HEADERS): Add nios2.h. |
| 7 | * src/atomic_ops.h: Include nios2.h if __nios2__. |
| 8 | * src/atomic_ops/sysdeps/gcc/nios2.h: New file. |
| 9 | |
| 10 | Signed-off-by: Marek Vasut <marex@denx.de> |
| 11 | Upstream-Status: Backport [ https://github.com/ivmai/libatomic_ops.git 4b005ee56898309e8afba9b3c48cf94f0f5f78e4 ] |
| 12 | --- |
| 13 | src/Makefile.am | 1 + |
| 14 | src/atomic_ops.h | 3 +++ |
| 15 | src/atomic_ops/sysdeps/gcc/nios2.h | 17 +++++++++++++++++ |
| 16 | 3 files changed, 21 insertions(+) |
| 17 | create mode 100644 src/atomic_ops/sysdeps/gcc/nios2.h |
| 18 | |
| 19 | diff --git a/src/Makefile.am b/src/Makefile.am |
| 20 | index fc09b27..d463427 100644 |
| 21 | --- a/src/Makefile.am |
| 22 | +++ b/src/Makefile.am |
| 23 | @@ -79,6 +79,7 @@ nobase_private_HEADERS = atomic_ops/ao_version.h \ |
| 24 | atomic_ops/sysdeps/gcc/ia64.h \ |
| 25 | atomic_ops/sysdeps/gcc/m68k.h \ |
| 26 | atomic_ops/sysdeps/gcc/mips.h \ |
| 27 | + atomic_ops/sysdeps/gcc/nios2.h \ |
| 28 | atomic_ops/sysdeps/gcc/powerpc.h \ |
| 29 | atomic_ops/sysdeps/gcc/s390.h \ |
| 30 | atomic_ops/sysdeps/gcc/sh.h \ |
| 31 | diff --git a/src/atomic_ops.h b/src/atomic_ops.h |
| 32 | index 33fe00e..ec02ba4 100644 |
| 33 | --- a/src/atomic_ops.h |
| 34 | +++ b/src/atomic_ops.h |
| 35 | @@ -262,6 +262,9 @@ |
| 36 | # if defined(__m68k__) |
| 37 | # include "atomic_ops/sysdeps/gcc/m68k.h" |
| 38 | # endif /* __m68k__ */ |
| 39 | +# if defined(__nios2__) |
| 40 | +# include "atomic_ops/sysdeps/gcc/nios2.h" |
| 41 | +# endif /* __nios2__ */ |
| 42 | # if defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) \ |
| 43 | || defined(__powerpc64__) || defined(__ppc64__) |
| 44 | # include "atomic_ops/sysdeps/gcc/powerpc.h" |
| 45 | diff --git a/src/atomic_ops/sysdeps/gcc/nios2.h b/src/atomic_ops/sysdeps/gcc/nios2.h |
| 46 | new file mode 100644 |
| 47 | index 0000000..f402cbb |
| 48 | --- /dev/null |
| 49 | +++ b/src/atomic_ops/sysdeps/gcc/nios2.h |
| 50 | @@ -0,0 +1,17 @@ |
| 51 | +/* |
| 52 | + * Copyright (C) 2016 Marek Vasut <marex@denx.de> |
| 53 | + * |
| 54 | + * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED |
| 55 | + * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. |
| 56 | + * |
| 57 | + * Permission is hereby granted to use or copy this program |
| 58 | + * for any purpose, provided the above notices are retained on all copies. |
| 59 | + * Permission to modify the code and to distribute modified code is granted, |
| 60 | + * provided the above notices are retained, and a notice that the code was |
| 61 | + * modified is included with the above copyright notice. |
| 62 | + */ |
| 63 | + |
| 64 | +#include "../test_and_set_t_is_ao_t.h" |
| 65 | +#include "generic.h" |
| 66 | + |
| 67 | +#define AO_T_IS_INT |
| 68 | -- |
| 69 | 2.7.0 |
| 70 | |