aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/decl.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@gcc.gnu.org>2012-03-25 17:11:33 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2012-03-25 17:11:33 +0000
commitd3cef56c989dca82d696678afb723dc79fbb1c30 (patch)
tree6ec6aa76ee94e248b4070213fa5454231c9ae999 /gcc/ada/gcc-interface/decl.c
parenta5695aa2c93dec00bfeb7eed1ff6d62858699ba7 (diff)
downloadgcc-d3cef56c989dca82d696678afb723dc79fbb1c30.zip
gcc-d3cef56c989dca82d696678afb723dc79fbb1c30.tar.gz
gcc-d3cef56c989dca82d696678afb723dc79fbb1c30.tar.bz2
decl.c (SS_MARK_NAME): New define.
* gcc-interface/decl.c (SS_MARK_NAME): New define. (gnat_to_gnu_entity) <E_Function>: Prepend leaf attribute on entities whose name is SS_MARK_NAME. From-SVN: r185780
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
-rw-r--r--gcc/ada/gcc-interface/decl.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 2139fbd..abd5185 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -81,6 +81,9 @@
#define FOREIGN_FORCE_REALIGN_STACK 0
#endif
+/* The (internal) name of the System.Secondary_Stack.SS_Mark function. */
+#define SS_MARK_NAME "system__secondary_stack__ss_mark"
+
struct incomplete
{
struct incomplete *next;
@@ -4405,6 +4408,21 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
get_identifier ("force_align_arg_pointer"), NULL_TREE,
gnat_entity);
+ /* ??? Declare System.Secondary_Stack.SS_Mark as leaf, in order to
+ avoid creating abnormal edges in SJLJ mode, which can break the
+ dominance relationship if there is a dynamic stack allocation.
+ We cannot do this in System.Secondary_Stack directly since it's
+ a compiler unit and this would introduce bootstrap path issues. */
+ if (IDENTIFIER_LENGTH (gnu_entity_name) == strlen (SS_MARK_NAME)
+ && IDENTIFIER_POINTER (gnu_entity_name)[0] == SS_MARK_NAME[0]
+ && IDENTIFIER_POINTER (gnu_entity_name)[1] == SS_MARK_NAME[1]
+ && IDENTIFIER_POINTER (gnu_entity_name)[2] == SS_MARK_NAME[2]
+ && gnu_entity_name == get_identifier (SS_MARK_NAME))
+ prepend_one_attribute_to
+ (&attr_list, ATTR_MACHINE_ATTRIBUTE,
+ get_identifier ("leaf"), NULL_TREE,
+ gnat_entity);
+
/* The lists have been built in reverse. */
gnu_param_list = nreverse (gnu_param_list);
if (has_stub)