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
2132517d
Commit
2132517d
authored
Dec 02, 1994
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(expand_inline_function): If called function calls alloca, save and
restore SP around its call. From-SVN: r8601
parent
83b93f40
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
gcc/integrate.c
+12
-0
No files found.
gcc/integrate.c
View file @
2132517d
...
...
@@ -1167,6 +1167,7 @@ expand_inline_function (fndecl, parms, target, ignore, type, structure_value_add
int
nargs
;
rtx
local_return_label
=
0
;
rtx
loc
;
rtx
stack_save
=
0
;
rtx
temp
;
struct
inline_remap
*
map
;
rtx
cc0_insn
=
0
;
...
...
@@ -1648,6 +1649,13 @@ expand_inline_function (fndecl, parms, target, ignore, type, structure_value_add
global_const_equiv_map
=
map
->
const_equiv_map
;
global_const_equiv_map_size
=
map
->
const_equiv_map_size
;
/* If the called fucntion does an alloca, save and restore the
frame pointer around the call. This saves stack space, but
also is required if this inline is being done between two
pushes. */
if
(
FUNCTION_FLAGS
(
header
)
&
FUNCTION_FLAGS_CALLS_ALLOCA
)
emit_stack_save
(
SAVE_BLOCK
,
&
stack_save
,
NULL_RTX
);
/* Now copy the insns one by one. Do this in two passes, first the insns and
then their REG_NOTES, just like save_for_inline. */
...
...
@@ -1868,6 +1876,10 @@ expand_inline_function (fndecl, parms, target, ignore, type, structure_value_add
if
(
local_return_label
)
emit_label
(
local_return_label
);
/* Restore the stack pointer if we saved it above. */
if
(
FUNCTION_FLAGS
(
header
)
&
FUNCTION_FLAGS_CALLS_ALLOCA
)
emit_stack_restore
(
SAVE_BLOCK
,
stack_save
,
NULL_RTX
);
/* Make copies of the decls of the symbols in the inline function, so that
the copies of the variables get declared in the current function. Set
up things so that lookup_static_chain knows that to interpret registers
...
...
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