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
96237362
Commit
96237362
authored
Jun 19, 1993
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(stack_result_p): New function.
(stack_reg_life_analysis): Use that. From-SVN: r4699
parent
af0da0b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
2 deletions
+26
-2
gcc/reg-stack.c
+26
-2
No files found.
gcc/reg-stack.c
View file @
96237362
...
...
@@ -1217,6 +1217,30 @@ find_blocks (first)
record_label_references
(
insn
,
PATTERN
(
insn
));
}
}
/* If current function returns its result in an fp stack register,
return the register number. Otherwise return -1. */
static
int
stack_result_p
(
decl
)
tree
decl
;
{
rtx
result
=
DECL_RTL
(
DECL_RESULT
(
decl
));
if
(
result
!=
0
&&
!
(
GET_CODE
(
result
)
==
REG
&&
REGNO
(
result
)
<
FIRST_PSEUDO_REGISTER
))
{
#ifdef FUNCTION_OUTGOING_VALUE
result
=
FUNCTION_OUTGOING_VALUE
(
TREE_TYPE
(
DECL_RESULT
(
decl
)),
decl
);
#else
result
=
FUNCTION_VALUE
(
TREE_TYPE
(
DECL_RESULT
(
decl
)),
decl
);
#endif
}
return
STACK_REG_P
(
result
)
?
REGNO
(
result
)
:
-
1
;
}
/* Determine the which registers are live at the start of each basic
block of the function whose first insn is FIRST.
...
...
@@ -1256,11 +1280,11 @@ stack_reg_life_analysis (first)
struct
stack_def
regstack
;
if
(
current_function_returns_real
&&
STACK_REG_P
(
DECL_RTL
(
DECL_RESULT
(
current_function_decl
)))
)
&&
stack_result_p
(
current_function_decl
)
>=
0
)
{
/* Find all RETURN insns and mark them. */
int
value_regno
=
REGNO
(
DECL_RTL
(
DECL_RESULT
(
current_function_decl
))
);
int
value_regno
=
stack_result_p
(
current_function_decl
);
for
(
block
=
blocks
-
1
;
block
>=
0
;
block
--
)
if
(
GET_CODE
(
block_end
[
block
])
==
JUMP_INSN
...
...
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