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
8fbc67c0
Commit
8fbc67c0
authored
Feb 12, 2004
by
Richard Kenner
Committed by
Richard Kenner
Feb 12, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* function.c (update_epilogue_consts): Teach about binary operations.
From-SVN: r77727
parent
a90a16f3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
3 deletions
+29
-3
gcc/ChangeLog
+2
-0
gcc/function.c
+27
-3
No files found.
gcc/ChangeLog
View file @
8fbc67c0
...
...
@@ -30,6 +30,8 @@
2004-02-12 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* function.c (update_epilogue_consts): Teach about binary operations.
* emit-rtl.c (set_mem_attributes_minus_bitpos): Don't kill
previous MEM_VOLATILE in REF.
* function.c (fixup_var_refs): Save volatile_ok and set to 1.
...
...
gcc/function.c
View file @
8fbc67c0
...
...
@@ -7654,14 +7654,38 @@ static void
update_epilogue_consts
(
rtx
dest
,
rtx
x
,
void
*
data
)
{
struct
epi_info
*
p
=
(
struct
epi_info
*
)
data
;
rtx
new
;
if
(
GET_CODE
(
dest
)
!=
REG
||
REGNO
(
dest
)
>=
FIRST_PSEUDO_REGISTER
)
return
;
else
if
(
GET_CODE
(
x
)
==
CLOBBER
||
!
rtx_equal_p
(
dest
,
SET_DEST
(
x
))
||
GET_CODE
(
SET_SRC
(
x
))
!=
CONST_INT
)
/* If we are either clobbering a register or doing a partial set,
show we don't know the value. */
else
if
(
GET_CODE
(
x
)
==
CLOBBER
||
!
rtx_equal_p
(
dest
,
SET_DEST
(
x
)))
p
->
const_equiv
[
REGNO
(
dest
)]
=
0
;
else
/* If we are setting it to a constant, record that constant. */
else
if
(
GET_CODE
(
SET_SRC
(
x
))
==
CONST_INT
)
p
->
const_equiv
[
REGNO
(
dest
)]
=
SET_SRC
(
x
);
/* If this is a binary operation between a register we have been tracking
and a constant, see if we can compute a new constant value. */
else
if
((
GET_RTX_CLASS
(
GET_CODE
(
SET_SRC
(
x
)))
==
'c'
||
GET_RTX_CLASS
(
GET_CODE
(
SET_SRC
(
x
)))
==
'2'
)
&&
GET_CODE
(
XEXP
(
SET_SRC
(
x
),
0
))
==
REG
&&
REGNO
(
XEXP
(
SET_SRC
(
x
),
0
))
<
FIRST_PSEUDO_REGISTER
&&
p
->
const_equiv
[
REGNO
(
XEXP
(
SET_SRC
(
x
),
0
))]
!=
0
&&
GET_CODE
(
XEXP
(
SET_SRC
(
x
),
1
))
==
CONST_INT
&&
0
!=
(
new
=
simplify_binary_operation
(
GET_CODE
(
SET_SRC
(
x
)),
GET_MODE
(
dest
),
p
->
const_equiv
[
REGNO
(
XEXP
(
SET_SRC
(
x
),
0
))],
XEXP
(
SET_SRC
(
x
),
1
)))
&&
GET_CODE
(
new
)
==
CONST_INT
)
p
->
const_equiv
[
REGNO
(
dest
)]
=
new
;
/* Otherwise, we can't do anything with this value. */
else
p
->
const_equiv
[
REGNO
(
dest
)]
=
0
;
}
/* Emit an insn to do the load shown in p->equiv_reg_src, if needed. */
...
...
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