diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-03-09 15:49:12 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-03-09 15:49:12 +0000 |
commit | 1e2b2ab300d68156c3b7dccc0991c3c0b443a8a0 (patch) | |
tree | 927487c5569fd7b5bd3e13ac22b5e59849a1eb7b /gcc/calls.c | |
parent | 4a215dc54ae1b2edc1f68f599b4d40b269583d57 (diff) | |
download | gcc-1e2b2ab300d68156c3b7dccc0991c3c0b443a8a0.tar.gz |
* calls.c (expand_call): Slightly reorganize code.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25655 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/calls.c')
-rw-r--r-- | gcc/calls.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/gcc/calls.c b/gcc/calls.c index a30bde9e37c..e45c3c23360 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -1754,11 +1754,6 @@ expand_call (exp, target, ignore) mark_addressable (fndecl); } - /* When calling a const function, we must pop the stack args right away, - so that the pop is deleted or moved with the call. */ - if (is_const) - NO_DEFER_POP; - function_call_count++; if (fndecl && DECL_NAME (fndecl)) @@ -1772,6 +1767,17 @@ expand_call (exp, target, ignore) if (may_be_alloca) current_function_calls_alloca = 1; + /* Operand 0 is a pointer-to-function; get the type of the function. */ + funtype = TREE_TYPE (TREE_OPERAND (exp, 0)); + if (! POINTER_TYPE_P (funtype)) + abort (); + funtype = TREE_TYPE (funtype); + + /* When calling a const function, we must pop the stack args right away, + so that the pop is deleted or moved with the call. */ + if (is_const) + NO_DEFER_POP; + /* Don't let pending stack adjusts add up to too much. Also, do all pending adjustments now if there is any chance this might be a call to alloca. */ @@ -1780,13 +1786,6 @@ expand_call (exp, target, ignore) || (pending_stack_adjust > 0 && may_be_alloca)) do_pending_stack_adjust (); - /* Operand 0 is a pointer-to-function; get the type of the function. */ - funtype = TREE_TYPE (TREE_OPERAND (exp, 0)); - if (! POINTER_TYPE_P (funtype)) - abort (); - - funtype = TREE_TYPE (funtype); - /* Push the temporary stack slot level so that we can free any temporaries we make. */ push_temp_slots (); |