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
8441bc30
Commit
8441bc30
authored
Sep 07, 2000
by
Bernd Schmidt
Committed by
Bernd Schmidt
Sep 07, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle multiword modes in regno_clobbered_p
From-SVN: r36233
parent
ff427764
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
11 deletions
+26
-11
gcc/ChangeLog
+4
-1
gcc/reload.c
+19
-7
gcc/reload.h
+1
-1
gcc/reload1.c
+2
-2
No files found.
gcc/ChangeLog
View file @
8441bc30
...
...
@@ -2,7 +2,10 @@
* rtl.c (class_narrowest_mode): Add entries for MODE_VECTOR_INT and
MODE_VECTOR_FLOAT.
* reload.c (regno_clobbered_p): Accept new arg, MODE, and use it
to handle multiword modes correctly. All callers and the declaration
changed.
2000-09-06 Mark Mitchell <mark@codesourcery.com>
* c-common.h (prep_stmt): Declare.
...
...
gcc/reload.c
View file @
8441bc30
...
...
@@ -4519,7 +4519,7 @@ find_reloads_address (mode, memrefloc, ad, loc, opnum, type, ind_levels, insn)
else
if
(
regno
<
FIRST_PSEUDO_REGISTER
&&
REGNO_MODE_OK_FOR_BASE_P
(
regno
,
mode
)
&&
!
regno_clobbered_p
(
regno
,
this_insn
))
&&
!
regno_clobbered_p
(
regno
,
this_insn
,
mode
))
return
0
;
/* If we do not have one of the cases above, we must do the reload. */
...
...
@@ -5427,7 +5427,7 @@ find_reloads_address_1 (mode, x, context, loc, opnum, type, ind_levels, insn)
in this insn, reload it into some other register to be safe.
The CLOBBER is supposed to make the register unavailable
from before this insn to after it. */
if
(
regno_clobbered_p
(
regno
,
this_insn
))
if
(
regno_clobbered_p
(
regno
,
this_insn
,
GET_MODE
(
x
)
))
{
push_reload
(
x
,
NULL_RTX
,
loc
,
NULL_PTR
,
(
context
?
INDEX_REG_CLASS
:
BASE_REG_CLASS
),
...
...
@@ -6544,13 +6544,21 @@ find_inc_amount (x, inced)
/* Return 1 if register REGNO is the subject of a clobber in insn INSN. */
int
regno_clobbered_p
(
regno
,
insn
)
regno_clobbered_p
(
regno
,
insn
,
mode
)
unsigned
int
regno
;
rtx
insn
;
enum
machine_mode
mode
;
{
int
nregs
=
HARD_REGNO_NREGS
(
regno
,
mode
);
int
endregno
=
regno
+
nregs
;
if
(
GET_CODE
(
PATTERN
(
insn
))
==
CLOBBER
&&
GET_CODE
(
XEXP
(
PATTERN
(
insn
),
0
))
==
REG
)
return
REGNO
(
XEXP
(
PATTERN
(
insn
),
0
))
==
regno
;
{
int
test
=
REGNO
(
XEXP
(
PATTERN
(
insn
),
0
));
return
regno
>=
test
&&
test
<
endregno
;
}
if
(
GET_CODE
(
PATTERN
(
insn
))
==
PARALLEL
)
{
...
...
@@ -6559,9 +6567,13 @@ regno_clobbered_p (regno, insn)
for
(;
i
>=
0
;
i
--
)
{
rtx
elt
=
XVECEXP
(
PATTERN
(
insn
),
0
,
i
);
if
(
GET_CODE
(
elt
)
==
CLOBBER
&&
GET_CODE
(
XEXP
(
elt
,
0
))
==
REG
&&
REGNO
(
XEXP
(
elt
,
0
))
==
regno
)
return
1
;
if
(
GET_CODE
(
elt
)
==
CLOBBER
&&
GET_CODE
(
XEXP
(
elt
,
0
))
==
REG
)
{
int
test
=
REGNO
(
XEXP
(
elt
,
0
));
if
(
regno
>=
test
&&
test
<
endregno
)
return
1
;
}
}
}
...
...
gcc/reload.h
View file @
8441bc30
...
...
@@ -335,7 +335,7 @@ extern rtx find_equiv_reg PARAMS ((rtx, rtx, enum reg_class, int, short *,
int
,
enum
machine_mode
));
/* Return 1 if register REGNO is the subject of a clobber in insn INSN. */
extern
int
regno_clobbered_p
PARAMS
((
unsigned
int
,
rtx
));
extern
int
regno_clobbered_p
PARAMS
((
unsigned
int
,
rtx
,
enum
machine_mode
));
/* Return 1 if X is an operand of an insn that is being earlyclobbered. */
int
earlyclobber_operand_p
PARAMS
((
rtx
));
...
...
gcc/reload1.c
View file @
8441bc30
...
...
@@ -5514,7 +5514,7 @@ choose_reload_regs (chain)
In particular, we then can't use EQUIV for a
RELOAD_FOR_OUTPUT_ADDRESS reload. */
if
(
equiv
!=
0
&&
regno_clobbered_p
(
regno
,
insn
))
if
(
equiv
!=
0
&&
regno_clobbered_p
(
regno
,
insn
,
rld
[
r
].
mode
))
{
switch
(
rld
[
r
].
when_needed
)
{
...
...
@@ -6536,7 +6536,7 @@ emit_output_reload_insns (chain, rl, j)
||
!
(
set
=
single_set
(
insn
))
||
rtx_equal_p
(
old
,
SET_DEST
(
set
))
||
!
reg_mentioned_p
(
old
,
SET_SRC
(
set
))
||
!
regno_clobbered_p
(
REGNO
(
old
),
insn
))
||
!
regno_clobbered_p
(
REGNO
(
old
),
insn
,
rl
->
mode
))
gen_reload
(
old
,
reloadreg
,
rl
->
opnum
,
rl
->
when_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