* hooks.c (hook_uint_mode_0): Return 0 unit hook.
* hooks.h (hook_uint_mode_0): Prototype.
* target.def (atomic_align_for_mode): define hook.
* tm.texi (TARGET_ATOMIC_TYPE_FOR_MODE): Define.
* doc/tm.texi.in (TARGET_ATOMIC_TYPE_FOR_MODE): Add.
===================================================================
*************** hook_rtx_tree_int_null (tree a ATTRIBUTE
return NULL;
}
+ /* Generic hook that takes a machine mode and returns an unsigned int 0. */
+ unsigned int
+ hook_uint_mode_0 (enum machine_mode m ATTRIBUTE_UNUSED)
+ {
+ return 0;
+ }
+
/* Generic hook that takes three trees and returns the last one as is. */
tree
hook_tree_tree_tree_tree_3rd_identity (tree a ATTRIBUTE_UNUSED,
===================================================================
*************** extern tree hook_tree_tree_tree_tree_3rd
extern tree hook_tree_tree_int_treep_bool_null (tree, int, tree *, bool);
extern unsigned hook_uint_void_0 (void);
+ extern unsigned int hook_uint_mode_0 (enum machine_mode);
extern bool default_can_output_mi_thunk_no_vcall (const_tree, HOST_WIDE_INT,
HOST_WIDE_INT, const_tree);
===================================================================
*************** DEFHOOKPOD
@code{atomic_test_and_set} is not exactly 1, i.e. the\
@code{bool} @code{true}.",
unsigned char, 1)
!
/* Leave the boolean fields at the end. */
/* True if we can create zeroed data by switching to a BSS section
@code{atomic_test_and_set} is not exactly 1, i.e. the\
@code{bool} @code{true}.",
unsigned char, 1)
!
! /* Return an unsigned int representing the alignment (in bits) of the atomic
! type which maps to machine MODE. This allows alignment to be overridden
! as needed. */
! DEFHOOK
! (atomic_align_for_mode,
! "If defined, this function returns an appropriate alignment in bits for an\
! atomic object of machine_mode @var{mode}. If 0 is returned then the\
! default alignment for the specified mode is used. ",
! unsigned int, (enum machine_mode mode),
! hook_uint_mode_0)
!
!
/* Leave the boolean fields at the end. */
/* True if we can create zeroed data by switching to a BSS section
===================================================================
*************** It returns true if the target supports G
The support includes the assembler, linker and dynamic linker.
The default value of this hook is based on target's libc.
@end deftypefn
+
+ @deftypefn {Target Hook} {unsigned int} TARGET_ATOMIC_ALIGN_FOR_MODE (enum machine_mode @var{mode})
+ If defined, this function returns an appropriate alignment in bits for an atomic object of machine_mode @var{mode}. If 0 is returned then the default alignment for the specified mode is used.
+ @end deftypefn
===================================================================
*************** and the associated definitions of those
@hook TARGET_ATOMIC_TEST_AND_SET_TRUEVAL
@hook TARGET_HAS_IFUNC_P
+
+ @hook TARGET_ATOMIC_ALIGN_FOR_MODE