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
ba325eba
Commit
ba325eba
authored
Apr 14, 1997
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When clobbering a reg, check for later words of a multi word reg value
From-SVN: r13899
parent
a22ad972
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
gcc/reload1.c
+37
-0
No files found.
gcc/reload1.c
View file @
ba325eba
...
...
@@ -7551,6 +7551,12 @@ count_occurrences (x, find)
static
rtx
*
reg_values
;
/* This is a preallocated REG rtx which we use as a temporary in
reload_cse_invalidate_regno, so that we don't need to allocate a
new one each time through a loop in that function. */
static
rtx
invalidate_regno_rtx
;
/* Invalidate any entries in reg_values which depend on REGNO,
including those for REGNO itself. This is called if REGNO is
changing. If CLOBBER is true, then always forget anything we
...
...
@@ -7608,6 +7614,33 @@ reload_cse_invalidate_regno (regno, mode, clobber)
}
}
}
/* We must look at earlier registers, in case REGNO is part of a
multi word value but is not the first register. If an earlier
register has a value in a mode which overlaps REGNO, then we must
invalidate that earlier register. Note that we do not need to
check REGNO or later registers (we must not check REGNO itself,
because we would incorrectly conclude that there was a conflict). */
for
(
i
=
0
;
i
<
regno
;
i
++
)
{
rtx
x
;
for
(
x
=
reg_values
[
i
];
x
;
x
=
XEXP
(
x
,
1
))
{
if
(
XEXP
(
x
,
0
)
!=
0
)
{
PUT_MODE
(
invalidate_regno_rtx
,
GET_MODE
(
XEXP
(
x
,
0
)));
REGNO
(
invalidate_regno_rtx
)
=
i
;
if
(
refers_to_regno_p
(
regno
,
endregno
,
invalidate_regno_rtx
,
NULL_PTR
))
{
reload_cse_invalidate_regno
(
i
,
VOIDmode
,
1
);
break
;
}
}
}
}
}
/* The memory at address (plus MEM_BASE MEM_OFFSET), where MEM_OFFSET
...
...
@@ -7800,6 +7833,10 @@ reload_cse_regs (first)
memory for a non-const call instruction. */
callmem
=
gen_rtx
(
MEM
,
BLKmode
,
const0_rtx
);
/* This is used in reload_cse_invalidate_regno to avoid consing a
new REG in a loop in that function. */
invalidate_regno_rtx
=
gen_rtx
(
REG
,
VOIDmode
,
0
);
for
(
insn
=
first
;
insn
;
insn
=
NEXT_INSN
(
insn
))
{
rtx
body
;
...
...
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