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
bfbf933a
Commit
bfbf933a
authored
Jun 02, 1992
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r1135
parent
69d6c854
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
45 deletions
+44
-45
gcc/calls.c
+44
-45
No files found.
gcc/calls.c
View file @
bfbf933a
...
@@ -1208,22 +1208,11 @@ expand_call (exp, target, ignore)
...
@@ -1208,22 +1208,11 @@ expand_call (exp, target, ignore)
highest_outgoing_arg_in_use
-
initial_highest_arg_in_use
);
highest_outgoing_arg_in_use
-
initial_highest_arg_in_use
);
needed
=
0
;
needed
=
0
;
/* The only way the stack pointer can change here is if some arguments
/* The address of the outgoing argument list must not be copied to a
which are passed in memory are constructed in place in the outgoing
register here, because argblock would be left pointing to the
argument area. All objects which are constructed in place have
wrong place after the call to allocate_dynamic_stack_space below. */
pass_on_stack == 1 (see store_one_arg ()).
The test for arguments being constructed on the stack is just an
optimization: it would be correct but suboptimal to call
copy_addr_to_reg () unconditionally. */
argblock
=
virtual_outgoing_args_rtx
;
argblock
=
virtual_outgoing_args_rtx
;
for
(
i
=
0
;
i
<
num_actuals
;
i
++
)
if
(
args
[
i
].
pass_on_stack
)
{
argblock
=
copy_addr_to_reg
(
argblock
);
break
;
}
#else
/* not ACCUMULATE_OUTGOING_ARGS */
#else
/* not ACCUMULATE_OUTGOING_ARGS */
if
(
inhibit_defer_pop
==
0
)
if
(
inhibit_defer_pop
==
0
)
...
@@ -1258,6 +1247,47 @@ expand_call (exp, target, ignore)
...
@@ -1258,6 +1247,47 @@ expand_call (exp, target, ignore)
#endif
/* not ACCUMULATE_OUTGOING_ARGS */
#endif
/* not ACCUMULATE_OUTGOING_ARGS */
}
}
#ifdef ACCUMULATE_OUTGOING_ARGS
/* The save/restore code in store_one_arg handles all cases except one:
a constructor call (including a C function returning a BLKmode struct)
to initialize an argument. */
if
(
stack_arg_under_construction
)
{
#if defined(REG_PARM_STACK_SPACE) && ! defined(OUTGOING_REG_PARM_STACK_SPACE)
rtx
push_size
=
gen_rtx
(
CONST_INT
,
VOIDmode
,
reg_parm_stack_space
+
args_size
.
constant
);
#else
rtx
push_size
=
gen_rtx
(
CONST_INT
,
VOIDmode
,
args_size
.
constant
);
#endif
if
(
old_stack_level
==
0
)
{
emit_stack_save
(
SAVE_BLOCK
,
&
old_stack_level
,
0
);
old_pending_adj
=
pending_stack_adjust
;
pending_stack_adjust
=
0
;
/* stack_arg_under_construction says whether a stack arg is
being constructed at the old stack level. Pushing the stack
gets a clean outgoing argument block. */
old_stack_arg_under_construction
=
stack_arg_under_construction
;
stack_arg_under_construction
=
0
;
/* Make a new map for the new argument list. */
stack_usage_map
=
(
char
*
)
alloca
(
highest_outgoing_arg_in_use
);
bzero
(
stack_usage_map
,
highest_outgoing_arg_in_use
);
highest_outgoing_arg_in_use
=
0
;
}
allocate_dynamic_stack_space
(
push_size
,
0
,
BITS_PER_UNIT
);
}
/* If argument evaluation might modify the stack pointer, copy the
address of the argument list to a register. */
for
(
i
=
0
;
i
<
num_actuals
;
i
++
)
if
(
args
[
i
].
pass_on_stack
)
{
argblock
=
copy_addr_to_reg
(
argblock
);
break
;
}
#endif
/* If we preallocated stack space, compute the address of each argument.
/* If we preallocated stack space, compute the address of each argument.
We need not ensure it is a valid memory address here; it will be
We need not ensure it is a valid memory address here; it will be
validized when it is used. */
validized when it is used. */
...
@@ -1310,37 +1340,6 @@ expand_call (exp, target, ignore)
...
@@ -1310,37 +1340,6 @@ expand_call (exp, target, ignore)
#endif
#endif
#endif
#endif
#ifdef ACCUMULATE_OUTGOING_ARGS
/* The save/restore code in store_one_arg handles all cases except one:
a constructor call (including a C function returning a BLKmode struct)
to initialize an argument. */
if
(
stack_arg_under_construction
)
{
#if defined(REG_PARM_STACK_SPACE) && ! defined(OUTGOING_REG_PARM_STACK_SPACE)
rtx
push_size
=
gen_rtx
(
CONST_INT
,
VOIDmode
,
reg_parm_stack_space
+
args_size
.
constant
);
#else
rtx
push_size
=
gen_rtx
(
CONST_INT
,
VOIDmode
,
args_size
.
constant
);
#endif
if
(
old_stack_level
==
0
)
{
emit_stack_save
(
SAVE_BLOCK
,
&
old_stack_level
,
0
);
old_pending_adj
=
pending_stack_adjust
;
pending_stack_adjust
=
0
;
/* stack_arg_under_construction says whether a stack arg is
being constructed at the old stack level. Pushing the stack
gets a clean outgoing argument block. */
old_stack_arg_under_construction
=
stack_arg_under_construction
;
stack_arg_under_construction
=
0
;
/* Make a new map for the new argument list. */
stack_usage_map
=
(
char
*
)
alloca
(
highest_outgoing_arg_in_use
);
bzero
(
stack_usage_map
,
highest_outgoing_arg_in_use
);
highest_outgoing_arg_in_use
=
0
;
}
allocate_dynamic_stack_space
(
push_size
,
0
,
BITS_PER_UNIT
);
}
#endif
/* Don't try to defer pops if preallocating, not even from the first arg,
/* Don't try to defer pops if preallocating, not even from the first arg,
since ARGBLOCK probably refers to the SP. */
since ARGBLOCK probably refers to the SP. */
if
(
argblock
)
if
(
argblock
)
...
...
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