aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2008-04-07 09:37:51 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2008-04-07 09:37:51 +0000
commit9dd9bf80a87fdd119261f5efb8a9ceceffb12963 (patch)
tree347d5e4db385dd943a52f0d226ebaf0dc3200e8a /gcc/ada
parentf9985df51b32cb265f429d024e955e71fd23a4f1 (diff)
downloadgcc-9dd9bf80a87fdd119261f5efb8a9ceceffb12963.zip
gcc-9dd9bf80a87fdd119261f5efb8a9ceceffb12963.tar.gz
gcc-9dd9bf80a87fdd119261f5efb8a9ceceffb12963.tar.bz2
Removal of Return with Depressed Stack Pointer support
Removal of Return with Depressed Stack Pointer support * tree.h (TYPE_RETURNS_STACK_DEPRESSED): Delete. (ECF_SP_DEPRESSED): Likewise. (ECF_LIBCALL_BLOCK, ECF_NOVOPS): Adjust. * calls.c (emit_call_1): Do not test ECF_SP_DEPRESSED. (flags_from_decl_or_type): Do not test TYPE_RETURNS_STACK_DEPRESSED. (expand_call): Do not test ECF_SP_DEPRESSED. * dse.c (dse_step0): Do not test TYPE_RETURNS_STACK_DEPRESSED. * function.c (keep_stack_depressed): Delete. (handle_epilogue_set): Likewise. (update_epilogue_consts): Likewise. (emit_equiv_load): Likewise. (thread_prologue_and_epilogue_insns): Remove support for Return with Depressed Stack Pointer. * print-tree.c (print_node): Do not test TYPE_RETURNS_STACK_DEPRESSED. ada/ * gigi.h (create_subprog_type): Remove returns_with_dsp parameter. * decl.c (gnat_to_gnu_entity): Adjust for above new prototype. * utils.c (create_subprog_type): Remove returns_with_dsp parameter. * trans.c (gnat_to_gnu) <N_Return_Statement>: Remove code dealing with Return by Depressed Stack Pointer. From-SVN: r133976
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog8
-rw-r--r--gcc/ada/decl.c8
-rw-r--r--gcc/ada/gigi.h8
-rw-r--r--gcc/ada/trans.c27
-rw-r--r--gcc/ada/utils.c13
5 files changed, 25 insertions, 39 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 4ed6a52..44c64ce 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,11 @@
+2008-04-07 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gigi.h (create_subprog_type): Remove returns_with_dsp parameter.
+ * decl.c (gnat_to_gnu_entity): Adjust for above new prototype.
+ * utils.c (create_subprog_type): Remove returns_with_dsp parameter.
+ * trans.c (gnat_to_gnu) <N_Return_Statement>: Remove code dealing with
+ Return by Depressed Stack Pointer.
+
2008-04-06 Eric Botcazou <ebotcazou@adacore.com>
* decl.c (is_variable_size): Do not unconditionally return false
diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c
index bda144e..c45492f 100644
--- a/gcc/ada/decl.c
+++ b/gcc/ada/decl.c
@@ -3863,17 +3863,13 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
gnu_type
= create_subprog_type (gnu_return_type, gnu_param_list,
gnu_return_list, returns_unconstrained,
- returns_by_ref,
- Function_Returns_With_DSP (gnat_entity),
- returns_by_target_ptr);
+ returns_by_ref, returns_by_target_ptr);
if (has_stub)
gnu_stub_type
= create_subprog_type (gnu_return_type, gnu_stub_param_list,
gnu_return_list, returns_unconstrained,
- returns_by_ref,
- Function_Returns_With_DSP (gnat_entity),
- returns_by_target_ptr);
+ returns_by_ref, returns_by_target_ptr);
/* A subprogram (something that doesn't return anything) shouldn't
be considered Pure since there would be no reason for such a
diff --git a/gcc/ada/gigi.h b/gcc/ada/gigi.h
index c57cd80..21ea4fe 100644
--- a/gcc/ada/gigi.h
+++ b/gcc/ada/gigi.h
@@ -522,13 +522,11 @@ extern void rest_of_record_type_compilation (tree record_type);
copy-in/copy-out list to be stored into TYPE_CI_CO_LIST.
RETURNS_UNCONSTRAINED is true if the function returns an unconstrained
object. RETURNS_BY_REF is true if the function returns by reference.
- RETURNS_WITH_DSP is true if the function is to return with a
- depressed stack pointer. RETURNS_BY_TARGET_PTR is true if the function
- is to be passed (as its first parameter) the address of the place to copy
- its result. */
+ RETURNS_BY_TARGET_PTR is true if the function is to be passed (as its
+ first parameter) the address of the place to copy its result. */
extern tree create_subprog_type (tree return_type, tree param_decl_list,
tree cico_list, bool returns_unconstrained,
- bool returns_by_ref, bool returns_with_dsp,
+ bool returns_by_ref,
bool returns_by_target_ptr);
/* Return a copy of TYPE, but safe to modify in any way. */
diff --git a/gcc/ada/trans.c b/gcc/ada/trans.c
index 8bf93d2..f3dc87d 100644
--- a/gcc/ada/trans.c
+++ b/gcc/ada/trans.c
@@ -4182,26 +4182,13 @@ gnat_to_gnu (Node_Id gnat_node)
else if (TYPE_RETURNS_UNCONSTRAINED_P (gnu_subprog_type))
{
gnu_ret_val = maybe_unconstrained_array (gnu_ret_val);
-
- /* We have two cases: either the function returns with
- depressed stack or not. If not, we allocate on the
- secondary stack. If so, we allocate in the stack frame.
- if no copy is needed, the front end will set By_Ref,
- which we handle in the case above. */
- if (TYPE_RETURNS_STACK_DEPRESSED (gnu_subprog_type))
- gnu_ret_val
- = build_allocator (TREE_TYPE (gnu_ret_val),
- gnu_ret_val,
- TREE_TYPE (gnu_subprog_type),
- 0, -1, gnat_node, false);
- else
- gnu_ret_val
- = build_allocator (TREE_TYPE (gnu_ret_val),
- gnu_ret_val,
- TREE_TYPE (gnu_subprog_type),
- Procedure_To_Call (gnat_node),
- Storage_Pool (gnat_node),
- gnat_node, false);
+ gnu_ret_val
+ = build_allocator (TREE_TYPE (gnu_ret_val),
+ gnu_ret_val,
+ TREE_TYPE (gnu_subprog_type),
+ Procedure_To_Call (gnat_node),
+ Storage_Pool (gnat_node),
+ gnat_node, false);
}
}
}
diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c
index d138976..5c96217 100644
--- a/gcc/ada/utils.c
+++ b/gcc/ada/utils.c
@@ -1255,17 +1255,15 @@ split_plus (tree in, tree *pvar)
otherwise we are dealing with a function. PARAM_DECL_LIST is a list of
PARM_DECL nodes that are the subprogram arguments. CICO_LIST is the
copy-in/copy-out list to be stored into TYPE_CICO_LIST.
- RETURNS_UNCONSTRAINED is nonzero if the function returns an unconstrained
- object. RETURNS_BY_REF is nonzero if the function returns by reference.
- RETURNS_WITH_DSP is nonzero if the function is to return with a
- depressed stack pointer. RETURNS_BY_TARGET_PTR is true if the function
- is to be passed (as its first parameter) the address of the place to copy
- its result. */
+ RETURNS_UNCONSTRAINED is true if the function returns an unconstrained
+ object. RETURNS_BY_REF is true if the function returns by reference.
+ RETURNS_BY_TARGET_PTR is true if the function is to be passed (as its
+ first parameter) the address of the place to copy its result. */
tree
create_subprog_type (tree return_type, tree param_decl_list, tree cico_list,
bool returns_unconstrained, bool returns_by_ref,
- bool returns_with_dsp, bool returns_by_target_ptr)
+ bool returns_by_target_ptr)
{
/* A chain of TREE_LIST nodes whose TREE_VALUEs are the data type nodes of
the subprogram formal parameters. This list is generated by traversing the
@@ -1302,7 +1300,6 @@ create_subprog_type (tree return_type, tree param_decl_list, tree cico_list,
TYPE_CI_CO_LIST (type) = cico_list;
TYPE_RETURNS_UNCONSTRAINED_P (type) = returns_unconstrained;
- TYPE_RETURNS_STACK_DEPRESSED (type) = returns_with_dsp;
TYPE_RETURNS_BY_REF_P (type) = returns_by_ref;
TYPE_RETURNS_BY_TARGET_PTR_P (type) = returns_by_target_ptr;
return type;