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
3002e160
Commit
3002e160
authored
Dec 31, 1992
by
Jim Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(gen_input_reload): Also handle PLUS of a MEM and CONSTANT specially.
From-SVN: r3029
parent
c3eebffb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
gcc/reload1.c
+14
-11
No files found.
gcc/reload1.c
View file @
3002e160
...
@@ -5698,9 +5698,10 @@ gen_input_reload (reloadreg, in, before_insn)
...
@@ -5698,9 +5698,10 @@ gen_input_reload (reloadreg, in, before_insn)
register that didn't get a hard register. In that case we can just
register that didn't get a hard register. In that case we can just
call emit_move_insn.
call emit_move_insn.
We can also be asked to reload a PLUS that adds either two registers or
We can also be asked to reload a PLUS that adds either two registers, or
a register and a constant or MEM. This can occur during frame pointer
a register and a constant or MEM, or a MEM and a constant. This can
elimination. That case if handled by trying to emit a single insn
occur during frame pointer elimination and while reloading addresses.
This case is handled by trying to emit a single insn
to perform the add. If it is not valid, we use a two insn sequence.
to perform the add. If it is not valid, we use a two insn sequence.
Finally, we could be called to handle an 'o' constraint by putting
Finally, we could be called to handle an 'o' constraint by putting
...
@@ -5719,16 +5720,18 @@ gen_input_reload (reloadreg, in, before_insn)
...
@@ -5719,16 +5720,18 @@ gen_input_reload (reloadreg, in, before_insn)
??? At some point, this whole thing needs to be rethought. */
??? At some point, this whole thing needs to be rethought. */
if
(
GET_CODE
(
in
)
==
PLUS
if
(
GET_CODE
(
in
)
==
PLUS
&&
GET_CODE
(
XEXP
(
in
,
0
))
==
REG
&&
((
GET_CODE
(
XEXP
(
in
,
0
))
==
REG
&&
(
GET_CODE
(
XEXP
(
in
,
1
))
==
REG
&&
(
GET_CODE
(
XEXP
(
in
,
1
))
==
REG
||
CONSTANT_P
(
XEXP
(
in
,
1
))
||
CONSTANT_P
(
XEXP
(
in
,
1
))
||
GET_CODE
(
XEXP
(
in
,
1
))
==
MEM
))
||
GET_CODE
(
XEXP
(
in
,
1
))
==
MEM
))
||
(
GET_CODE
(
XEXP
(
in
,
0
))
==
MEM
&&
CONSTANT_P
(
XEXP
(
in
,
1
)))))
{
{
/* We need to compute the sum of what is either a register and a
/* We need to compute the sum of what is either a register and a
constant, a register and memory,
or
a hard register and a pseudo
constant, a register and memory, a hard register and a pseudo
register
and put it into the reload register. The best possible way
register
, or memory and a constant and put it into the reload
of doing this is if the machine has a three-operand ADD insn that
register. The best possible way of doing this is if the machine
accepts the required operands.
has a three-operand ADD insn that
accepts the required operands.
The simplest approach is to try to generate such an insn and see if it
The simplest approach is to try to generate such an insn and see if it
is recognized and matches its constraints. If so, it can be used.
is recognized and matches its constraints. If so, it can be used.
...
...
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