Attachment 'C11atomic1.patch'
Download 1 Index: gcc/hooks.c
2 ===================================================================
3 *** gcc/hooks.c (revision 202709)
4 --- gcc/hooks.c (working copy)
5 *************** hook_rtx_tree_int_null (tree a ATTRIBUTE
6 *** 352,357 ****
7 --- 352,364 ----
8 return NULL;
9 }
10
11 + /* Generic hook that takes a machine mode and returns an unsigned int 0. */
12 + unsigned int
13 + hook_uint_mode_0 (enum machine_mode m ATTRIBUTE_UNUSED)
14 + {
15 + return 0;
16 + }
17 +
18 /* Generic hook that takes three trees and returns the last one as is. */
19 tree
20 hook_tree_tree_tree_tree_3rd_identity (tree a ATTRIBUTE_UNUSED,
21 Index: gcc/hooks.h
22 ===================================================================
23 *** gcc/hooks.h (revision 202709)
24 --- gcc/hooks.h (working copy)
25 *************** extern tree hook_tree_tree_tree_tree_3rd
26 *** 89,94 ****
27 --- 89,95 ----
28 extern tree hook_tree_tree_int_treep_bool_null (tree, int, tree *, bool);
29
30 extern unsigned hook_uint_void_0 (void);
31 + extern unsigned int hook_uint_mode_0 (enum machine_mode);
32
33 extern bool default_can_output_mi_thunk_no_vcall (const_tree, HOST_WIDE_INT,
34 HOST_WIDE_INT, const_tree);
35 Index: gcc/target.def
36 ===================================================================
37 *** gcc/target.def (revision 202709)
38 --- gcc/target.def (working copy)
39 *************** DEFHOOKPOD
40 *** 5123,5129 ****
41 @code{atomic_test_and_set} is not exactly 1, i.e. the\
42 @code{bool} @code{true}.",
43 unsigned char, 1)
44 !
45 /* Leave the boolean fields at the end. */
46
47 /* True if we can create zeroed data by switching to a BSS section
48 --- 5123,5141 ----
49 @code{atomic_test_and_set} is not exactly 1, i.e. the\
50 @code{bool} @code{true}.",
51 unsigned char, 1)
52 !
53 ! /* Return an unsigned int representing the alignment (in bits) of the atomic
54 ! type which maps to machine MODE. This allows alignment to be overridden
55 ! as needed. */
56 ! DEFHOOK
57 ! (atomic_align_for_mode,
58 ! "If defined, this function returns an appropriate alignment in bits for an\
59 ! atomic object of machine_mode @var{mode}. If 0 is returned then the\
60 ! default alignment for the specified mode is used. ",
61 ! unsigned int, (enum machine_mode mode),
62 ! hook_uint_mode_0)
63 !
64 !
65 /* Leave the boolean fields at the end. */
66
67 /* True if we can create zeroed data by switching to a BSS section
68 Index: gcc/doc/tm.texi
69 ===================================================================
70 *** gcc/doc/tm.texi (revision 202709)
71 --- gcc/doc/tm.texi (working copy)
72 *************** It returns true if the target supports G
73 *** 11353,11355 ****
74 --- 11353,11359 ----
75 The support includes the assembler, linker and dynamic linker.
76 The default value of this hook is based on target's libc.
77 @end deftypefn
78 +
79 + @deftypefn {Target Hook} {unsigned int} TARGET_ATOMIC_ALIGN_FOR_MODE (enum machine_mode @var{mode})
80 + 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.
81 + @end deftypefn
82 Index: gcc/doc/tm.texi.in
83 ===================================================================
84 *** gcc/doc/tm.texi.in (revision 202709)
85 --- gcc/doc/tm.texi.in (working copy)
86 *************** and the associated definitions of those
87 *** 8388,8390 ****
88 --- 8388,8392 ----
89 @hook TARGET_ATOMIC_TEST_AND_SET_TRUEVAL
90
91 @hook TARGET_HAS_IFUNC_P
92 +
93 + @hook TARGET_ATOMIC_ALIGN_FOR_MODE
94
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.