summaryrefslogtreecommitdiff
path: root/gcc/tree-nested.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@gcc.gnu.org>2020-07-16 17:50:26 +0200
committerEric Botcazou <ebotcazou@gcc.gnu.org>2020-07-16 18:13:56 +0200
commitf569026aa3088aa895ea39618d2998333b08600b (patch)
treed8d1893f1871eae2ba5da2ae21162b79a053c97a /gcc/tree-nested.c
parenta54d71cb664199c98fbb2694e9314566d6ca0ed2 (diff)
Reunify x86 stack checking implementation
The stack clash protection mechanism in the x86 back-end was implemented by largely duplicating the existing stack checking implementation. Now the only significant difference between them is the probing window, which is shifted by 1 probing interval (not 2 as documented in explow.c), but we can certainly do 1 more probe for stack checking even if it is redundant in almost all cases. gcc/ChangeLog: * config/i386/i386.c (ix86_compute_frame_layout): Minor tweak. (ix86_adjust_stack_and_probe): Delete. (ix86_adjust_stack_and_probe_stack_clash): Rename to above and add PROTECTION_AREA parameter. If it is true, probe PROBE_INTERVAL plus a small dope beyond SIZE bytes. (ix86_emit_probe_stack_range): Use local variable. (ix86_expand_prologue): Adjust calls to ix86_adjust_stack_and_probe and tidy up the stack checking code. * explow.c (get_stack_check_protect): Fix head comment. (anti_adjust_stack_and_probe_stack_clash): Likewise. (allocate_dynamic_stack_space): Add comment. * tree-nested.c (lookup_field_for_decl): Set the DECL_IGNORED_P and TREE_NO_WARNING but not TREE_ADDRESSABLE flags on the field.
Diffstat (limited to 'gcc/tree-nested.c')
-rw-r--r--gcc/tree-nested.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c
index de168df70a1..4dc5533be84 100644
--- a/gcc/tree-nested.c
+++ b/gcc/tree-nested.c
@@ -305,13 +305,14 @@ lookup_field_for_decl (struct nesting_info *info, tree decl,
}
else
{
- TREE_TYPE (field) = TREE_TYPE (decl);
- DECL_SOURCE_LOCATION (field) = DECL_SOURCE_LOCATION (decl);
- SET_DECL_ALIGN (field, DECL_ALIGN (decl));
- DECL_USER_ALIGN (field) = DECL_USER_ALIGN (decl);
- TREE_ADDRESSABLE (field) = TREE_ADDRESSABLE (decl);
- DECL_NONADDRESSABLE_P (field) = !TREE_ADDRESSABLE (decl);
- TREE_THIS_VOLATILE (field) = TREE_THIS_VOLATILE (decl);
+ TREE_TYPE (field) = TREE_TYPE (decl);
+ DECL_SOURCE_LOCATION (field) = DECL_SOURCE_LOCATION (decl);
+ SET_DECL_ALIGN (field, DECL_ALIGN (decl));
+ DECL_USER_ALIGN (field) = DECL_USER_ALIGN (decl);
+ DECL_IGNORED_P (field) = DECL_IGNORED_P (decl);
+ DECL_NONADDRESSABLE_P (field) = !TREE_ADDRESSABLE (decl);
+ TREE_NO_WARNING (field) = TREE_NO_WARNING (decl);
+ TREE_THIS_VOLATILE (field) = TREE_THIS_VOLATILE (decl);
/* Declare the transformation and adjust the original DECL. For a
variable or for a parameter when not optimizing, we make it point