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
5e0de251
Commit
5e0de251
authored
Apr 19, 1993
by
Doug Evans
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(expand_call): Use new FUNCTION_ARG_CALLEE_COPIES macro.
From-SVN: r4183
parent
fd6b2a6d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
28 deletions
+47
-28
gcc/calls.c
+47
-28
No files found.
gcc/calls.c
View file @
5e0de251
...
@@ -915,41 +915,60 @@ expand_call (exp, target, ignore)
...
@@ -915,41 +915,60 @@ expand_call (exp, target, ignore)
if
(
FUNCTION_ARG_PASS_BY_REFERENCE
(
args_so_far
,
TYPE_MODE
(
type
),
type
,
if
(
FUNCTION_ARG_PASS_BY_REFERENCE
(
args_so_far
,
TYPE_MODE
(
type
),
type
,
argpos
<
n_named_args
))
argpos
<
n_named_args
))
{
{
/* We make a copy of the object and pass the address to the function
#ifdef FUNCTION_ARG_CALLEE_COPIES
being called. */
if
(
FUNCTION_ARG_CALLEE_COPIES
(
args_so_far
,
TYPE_MODE
(
type
),
type
,
rtx
copy
;
argpos
<
n_named_args
)
/* If it's in a register, we must make a copy of it too. */
if
(
TYPE_SIZE
(
type
)
==
0
/* ??? Is this a sufficient test? Is there a better one? */
||
TREE_CODE
(
TYPE_SIZE
(
type
))
!=
INTEGER_CST
)
&&
!
(
TREE_CODE
(
args
[
i
].
tree_value
)
==
VAR_DECL
&&
REG_P
(
DECL_RTL
(
args
[
i
].
tree_value
))))
{
{
/* This is a variable-sized object. Make space on the stack
args
[
i
].
tree_value
=
build1
(
ADDR_EXPR
,
for it. */
build_pointer_type
(
type
),
rtx
size_rtx
=
expr_size
(
TREE_VALUE
(
p
));
args
[
i
].
tree_value
);
type
=
build_pointer_type
(
type
);
if
(
old_stack_level
==
0
)
{
emit_stack_save
(
SAVE_BLOCK
,
&
old_stack_level
,
NULL_RTX
);
old_pending_adj
=
pending_stack_adjust
;
pending_stack_adjust
=
0
;
}
copy
=
gen_rtx
(
MEM
,
BLKmode
,
allocate_dynamic_stack_space
(
size_rtx
,
NULL_RTX
,
TYPE_ALIGN
(
type
)));
}
}
else
else
#endif
{
{
int
size
=
int_size_in_bytes
(
type
);
/* We make a copy of the object and pass the address to the
copy
=
assign_stack_temp
(
TYPE_MODE
(
type
),
size
,
1
);
function being called. */
}
rtx
copy
;
store_expr
(
args
[
i
].
tree_value
,
copy
,
0
);
if
(
TYPE_SIZE
(
type
)
==
0
||
TREE_CODE
(
TYPE_SIZE
(
type
))
!=
INTEGER_CST
)
{
/* This is a variable-sized object. Make space on the stack
for it. */
rtx
size_rtx
=
expr_size
(
TREE_VALUE
(
p
));
if
(
old_stack_level
==
0
)
{
emit_stack_save
(
SAVE_BLOCK
,
&
old_stack_level
,
NULL_RTX
);
old_pending_adj
=
pending_stack_adjust
;
pending_stack_adjust
=
0
;
}
copy
=
gen_rtx
(
MEM
,
BLKmode
,
allocate_dynamic_stack_space
(
size_rtx
,
NULL_RTX
,
TYPE_ALIGN
(
type
)));
}
else
{
int
size
=
int_size_in_bytes
(
type
);
copy
=
assign_stack_temp
(
TYPE_MODE
(
type
),
size
,
1
);
}
args
[
i
].
tree_value
=
build1
(
ADDR_EXPR
,
build_pointer_type
(
type
),
store_expr
(
args
[
i
].
tree_value
,
copy
,
0
);
make_tree
(
type
,
copy
));
type
=
build_pointer_type
(
type
);
args
[
i
].
tree_value
=
build1
(
ADDR_EXPR
,
build_pointer_type
(
type
),
make_tree
(
type
,
copy
));
type
=
build_pointer_type
(
type
);
}
}
}
#endif
#endif
/* FUNCTION_ARG_PASS_BY_REFERENCE */
mode
=
TYPE_MODE
(
type
);
mode
=
TYPE_MODE
(
type
);
...
...
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