Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
3b917a55
Commit
3b917a55
authored
Jan 06, 1999
by
Jeff Law
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert changes which crept in by accident.
From-SVN: r24526
parent
44d22bef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
98 deletions
+1
-98
gcc/calls.c
+1
-98
No files found.
gcc/calls.c
View file @
3b917a55
...
...
@@ -33,10 +33,6 @@ Boston, MA 02111-1307, USA. */
#define PREFERRED_STACK_BOUNDARY STACK_BOUNDARY
#endif
extern
int
frame_offset
;
extern
rtx
tail_recursion_label
;
extern
rtx
tail_recursion_reentry
;
/* Decide whether a function's arguments should be processed
from first to last or from last to first.
...
...
@@ -66,8 +62,6 @@ struct arg_data
rtx
value
;
/* Initially-compute RTL value for argument; only for const functions. */
rtx
initial_value
;
/* */
rtx
sibcall_value
;
/* Register to pass this argument in, 0 if passed on stack, or an
PARALLEL if the arg is to be copied into multiple non-contiguous
registers. */
...
...
@@ -840,7 +834,6 @@ expand_call (exp, target, ignore)
tree
actparms
=
TREE_OPERAND
(
exp
,
1
);
/* RTX for the function to be called. */
rtx
funexp
;
rtx
tail_recursion_insns
=
NULL_RTX
;
/* Data type of the function. */
tree
funtype
;
/* Declaration of the function being called,
...
...
@@ -1923,7 +1916,6 @@ expand_call (exp, target, ignore)
once we have started filling any specific hard regs. */
precompute_register_parameters
(
num_actuals
,
args
,
&
reg_parm_seen
);
#if defined(ACCUMULATE_OUTGOING_ARGS) && defined(REG_PARM_STACK_SPACE)
/* Save the fixed argument area if it's part of the caller's frame and
...
...
@@ -2071,92 +2063,6 @@ expand_call (exp, target, ignore)
}
}
/* See if this is a potential tail recursive call. We can not know for
sure until we have expanded the entire function into RTL and can examine
the cfg and other data. But we have to mark it and save some information
now so that we can optimize it later. */
if
(
optimize
&&
TREE_CODE
(
exp
)
==
CALL_EXPR
&&
TREE_CODE
(
TREE_OPERAND
(
exp
,
0
))
==
ADDR_EXPR
&&
TREE_OPERAND
(
TREE_OPERAND
(
exp
,
0
),
0
)
==
current_function_decl
)
{
tree
actuals
,
formals
,
a
,
f
;
int
i
;
actuals
=
TREE_OPERAND
(
exp
,
1
);
formals
=
DECL_ARGUMENTS
(
current_function_decl
);
/* The caller and callee must have the same number of arguments and
they must be of compatible types and modes. */
for
(
a
=
actuals
,
f
=
formals
,
i
=
0
;
a
!=
NULL_TREE
&&
f
!=
NULL_TREE
;
a
=
TREE_CHAIN
(
a
)
,
f
=
TREE_CHAIN
(
f
),
i
++
)
{
if
(
TYPE_MAIN_VARIANT
(
TREE_TYPE
(
TREE_VALUE
(
a
)))
!=
TYPE_MAIN_VARIANT
(
TREE_TYPE
(
f
)))
break
;
if
(
GET_CODE
(
DECL_RTL
(
f
))
!=
REG
||
DECL_MODE
(
f
)
==
BLKmode
)
break
;
if
(
!
args
[
i
].
sibcall_value
)
args
[
i
].
sibcall_value
=
args
[
i
].
value
;
}
if
(
a
==
NULL_TREE
&&
f
==
NULL_TREE
)
{
/* Create the tail recursion label if it has not been created
already. */
if
(
tail_recursion_label
==
0
)
{
tail_recursion_label
=
gen_label_rtx
();
emit_label_after
(
tail_recursion_label
,
tail_recursion_reentry
);
}
/* We have a potential tail recursion site.
Start a new sequence for any RTL generated which might be used
to implement tail recursion optimizations later. */
push_to_sequence
(
0
);
/* Find which actual values refer to current values of previous
formals. Copy each of them now, before any formal is changed. */
for
(
a
=
actuals
,
i
=
0
;
a
!=
NULL_TREE
;
a
=
TREE_CHAIN
(
a
),
i
++
)
{
int
copy
=
0
,
j
;
for
(
f
=
formals
,
j
=
0
;
j
<
i
;
f
=
TREE_CHAIN
(
f
),
j
++
)
if
(
reg_mentioned_p
(
DECL_RTL
(
f
),
args
[
i
].
value
))
{
copy
=
1
;
break
;
}
if
(
copy
)
args
[
i
].
sibcall_value
=
copy_to_reg
(
args
[
i
].
value
);
}
/* Store the values of the actuals into the formals. */
for
(
f
=
formals
,
a
=
actuals
,
i
=
0
;
f
!=
NULL_TREE
;
f
=
TREE_CHAIN
(
f
),
a
=
TREE_CHAIN
(
a
),
i
++
)
{
if
(
GET_MODE
(
DECL_RTL
(
f
))
==
GET_MODE
(
args
[
i
].
sibcall_value
))
emit_move_insn
(
DECL_RTL
(
f
),
args
[
i
].
sibcall_value
);
else
convert_move
(
DECL_RTL
(
f
),
args
[
i
].
sibcall_value
,
TREE_UNSIGNED
(
TREE_TYPE
(
TREE_VALUE
(
a
))));
}
/* Emit any queued operations. */
emit_queue
();
/* Goto the tail recursion label. */
expand_goto_internal
(
NULL_TREE
,
tail_recursion_label
,
get_last_insn
);
tail_recursion_insns
=
get_insns
();
end_sequence
();
emit_insns
(
tail_recursion_insns
);
return
;
}
}
/* Perform postincrements before actually calling the function. */
emit_queue
();
...
...
@@ -3784,10 +3690,7 @@ store_one_arg (arg, argblock, may_be_alloca, variable_size,
arg->stack_slot and it matters when they are not the same.
It isn't totally clear that this is correct in all cases. */
if
(
partial
==
0
)
{
arg
->
sibcall_value
=
arg
->
value
;
arg
->
value
=
arg
->
stack_slot
;
}
arg
->
value
=
arg
->
stack_slot
;
/* Once we have pushed something, pops can't safely
be deferred during the rest of the arguments. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment