Commit 9bd99cce by Chung-Lin Tang Committed by Chung-Lin Tang

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
parent 82e435c3
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> 2016-11-17 Krister Walfridsson <krister.walfridsson@gmail.com>
* config/netbsd-stdint.h: New. * config/netbsd-stdint.h: New.
...@@ -44,3 +44,7 @@ ...@@ -44,3 +44,7 @@
Nios II Processor Reference Handbook. */ Nios II Processor Reference Handbook. */
#define TARGET_LINUX_ABI 1 #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
...@@ -3607,9 +3607,7 @@ nios2_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED, ...@@ -3607,9 +3607,7 @@ nios2_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
static void static void
nios2_init_libfuncs (void) nios2_init_libfuncs (void)
{ {
/* For Linux, we have access to kernel support for atomic operations. */ init_sync_libfuncs (UNITS_PER_WORD);
if (TARGET_LINUX_ABI)
init_sync_libfuncs (UNITS_PER_WORD);
} }
...@@ -4986,9 +4984,6 @@ nios2_adjust_reg_alloc_order (void) ...@@ -4986,9 +4984,6 @@ nios2_adjust_reg_alloc_order (void)
#undef TARGET_BUILTIN_DECL #undef TARGET_BUILTIN_DECL
#define TARGET_BUILTIN_DECL nios2_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 #undef TARGET_FUNCTION_OK_FOR_SIBCALL
#define TARGET_FUNCTION_OK_FOR_SIBCALL hook_bool_tree_tree_true #define TARGET_FUNCTION_OK_FOR_SIBCALL hook_bool_tree_tree_true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment