diff options
author | Chung-Lin Tang <cltang@codesourcery.com> | 2016-11-17 06:26:56 +0000 |
---|---|---|
committer | Chung-Lin Tang <cltang@gcc.gnu.org> | 2016-11-17 06:26:56 +0000 |
commit | 9bd99cce5b3769fd98b3db0d858222fa67e56486 (patch) | |
tree | 289c77c852da5ded79da5208441b4479e61c6275 /gcc | |
parent | 82e435c396a2b50386952ad2ae79aaee2469f5ee (diff) | |
download | gcc-9bd99cce5b3769fd98b3db0d858222fa67e56486.zip gcc-9bd99cce5b3769fd98b3db0d858222fa67e56486.tar.gz gcc-9bd99cce5b3769fd98b3db0d858222fa67e56486.tar.bz2 |
re PR target/78357 (nios2 uses non-standard atomic functions)
2016-11-17 Chung-Lin Tang <cltang@codesourcery.com>
PR target/78357
* config/nios2/nios2.c (nios2_init_libfuncs): Remove TARGET_LINUX_ABI
condition.
(TARGET_INIT_LIBFUNCS): Delete definition and...
* config/nios2/linux.h (TARGET_INIT_LIBFUNCS): ...move to here, add
comments.
From-SVN: r242534
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/config/nios2/linux.h | 4 | ||||
-rw-r--r-- | gcc/config/nios2/nios2.c | 7 |
3 files changed, 14 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7a7d6e6..c1c5b8b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2016-11-17 Chung-Lin Tang <cltang@codesourcery.com> + + PR target/78357 + * config/nios2/nios2.c (nios2_init_libfuncs): Remove TARGET_LINUX_ABI + condition. + (TARGET_INIT_LIBFUNCS): Delete definition and... + * config/nios2/linux.h (TARGET_INIT_LIBFUNCS): ...move to here, add + comments. + 2016-11-17 Krister Walfridsson <krister.walfridsson@gmail.com> * config/netbsd-stdint.h: New. diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h index 4ef55b5..7b9e59a 100644 --- a/gcc/config/nios2/linux.h +++ b/gcc/config/nios2/linux.h @@ -44,3 +44,7 @@ Nios II Processor Reference Handbook. */ #define TARGET_LINUX_ABI 1 +/* For Linux, we have access to kernel support for atomic operations, + add initialization for __sync_* builtins. */ +#undef TARGET_INIT_LIBFUNCS +#define TARGET_INIT_LIBFUNCS nios2_init_libfuncs diff --git a/gcc/config/nios2/nios2.c b/gcc/config/nios2/nios2.c index 2a28fad..b8e21fb 100644 --- a/gcc/config/nios2/nios2.c +++ b/gcc/config/nios2/nios2.c @@ -3607,9 +3607,7 @@ nios2_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED, static void nios2_init_libfuncs (void) { - /* For Linux, we have access to kernel support for atomic operations. */ - if (TARGET_LINUX_ABI) - init_sync_libfuncs (UNITS_PER_WORD); + init_sync_libfuncs (UNITS_PER_WORD); } @@ -4986,9 +4984,6 @@ nios2_adjust_reg_alloc_order (void) #undef TARGET_BUILTIN_DECL #define TARGET_BUILTIN_DECL nios2_builtin_decl -#undef TARGET_INIT_LIBFUNCS -#define TARGET_INIT_LIBFUNCS nios2_init_libfuncs - #undef TARGET_FUNCTION_OK_FOR_SIBCALL #define TARGET_FUNCTION_OK_FOR_SIBCALL hook_bool_tree_tree_true |