aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/nios2/linux.h4
-rw-r--r--gcc/config/nios2/nios2.c7
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