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
1554c2c6
Commit
1554c2c6
authored
Mar 11, 1992
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r436
parent
a03618e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
42 deletions
+71
-42
gcc/config/romp/romp.md
+3
-3
gcc/reload1.c
+68
-39
No files found.
gcc/config/romp/romp.md
View file @
1554c2c6
...
@@ -245,9 +245,9 @@
...
@@ -245,9 +245,9 @@
;; NO_REGS, so we need not have any predicates here.
;; NO_REGS, so we need not have any predicates here.
(define_expand "reload_outsi"
(define_expand "reload_outsi"
[(set (match_operand:SI 0 "symbolic_memory_operand" "=m")
[(
parallel [(
set (match_operand:SI 0 "symbolic_memory_operand" "=m")
(match_operand:SI 1 "" "r"))
(match_operand:SI 1 "" "r"))
(match_operand:SI 2 "" "=&b"
)]
(clobber (match_operand:SI 2 "" "=&b"))]
)]
""
""
"")
"")
...
...
gcc/reload1.c
View file @
1554c2c6
...
@@ -4732,6 +4732,22 @@ emit_reload_insns (insn)
...
@@ -4732,6 +4732,22 @@ emit_reload_insns (insn)
if
(
reload_secondary_reload
[
j
]
>=
0
)
if
(
reload_secondary_reload
[
j
]
>=
0
)
{
{
int
secondary_reload
=
reload_secondary_reload
[
j
];
int
secondary_reload
=
reload_secondary_reload
[
j
];
rtx
real_oldequiv
=
oldequiv
;
rtx
real_old
=
old
;
/* If OLDEQUIV is a pseudo with a MEM, get the real MEM
and similarly for OLD.
See comments in find_secondary_reload in reload.c. */
if
(
GET_CODE
(
oldequiv
)
==
REG
&&
REGNO
(
oldequiv
)
>=
FIRST_PSEUDO_REGISTER
&&
reg_equiv_mem
[
REGNO
(
oldequiv
)]
!=
0
)
real_oldequiv
=
reg_equiv_mem
[
REGNO
(
oldequiv
)];
if
(
GET_CODE
(
old
)
==
REG
&&
REGNO
(
old
)
>=
FIRST_PSEUDO_REGISTER
&&
reg_equiv_mem
[
REGNO
(
old
)]
!=
0
)
real_old
=
reg_equiv_mem
[
REGNO
(
old
)];
second_reload_reg
=
reload_reg_rtx
[
secondary_reload
];
second_reload_reg
=
reload_reg_rtx
[
secondary_reload
];
icode
=
reload_secondary_icode
[
j
];
icode
=
reload_secondary_icode
[
j
];
...
@@ -4740,7 +4756,7 @@ emit_reload_insns (insn)
...
@@ -4740,7 +4756,7 @@ emit_reload_insns (insn)
{
{
enum
reg_class
new_class
enum
reg_class
new_class
=
SECONDARY_INPUT_RELOAD_CLASS
(
reload_reg_class
[
j
],
=
SECONDARY_INPUT_RELOAD_CLASS
(
reload_reg_class
[
j
],
mode
,
oldequiv
);
mode
,
real_
oldequiv
);
if
(
new_class
==
NO_REGS
)
if
(
new_class
==
NO_REGS
)
second_reload_reg
=
0
;
second_reload_reg
=
0
;
...
@@ -4751,7 +4767,7 @@ emit_reload_insns (insn)
...
@@ -4751,7 +4767,7 @@ emit_reload_insns (insn)
if
(
!
TEST_HARD_REG_BIT
(
reg_class_contents
[(
int
)
new_class
],
if
(
!
TEST_HARD_REG_BIT
(
reg_class_contents
[(
int
)
new_class
],
REGNO
(
second_reload_reg
)))
REGNO
(
second_reload_reg
)))
oldequiv
=
old
;
oldequiv
=
old
,
real_oldequiv
=
real_old
;
else
else
{
{
new_icode
=
reload_in_optab
[(
int
)
mode
];
new_icode
=
reload_in_optab
[(
int
)
mode
];
...
@@ -4761,7 +4777,7 @@ emit_reload_insns (insn)
...
@@ -4761,7 +4777,7 @@ emit_reload_insns (insn)
(
reloadreg
,
mode
)))
(
reloadreg
,
mode
)))
||
(
insn_operand_predicate
[(
int
)
new_icode
][
1
]
||
(
insn_operand_predicate
[(
int
)
new_icode
][
1
]
&&
!
((
*
insn_operand_predicate
[(
int
)
new_icode
][
1
])
&&
!
((
*
insn_operand_predicate
[(
int
)
new_icode
][
1
])
(
oldequiv
,
mode
)))))
(
real_
oldequiv
,
mode
)))))
new_icode
=
CODE_FOR_nothing
;
new_icode
=
CODE_FOR_nothing
;
if
(
new_icode
==
CODE_FOR_nothing
)
if
(
new_icode
==
CODE_FOR_nothing
)
...
@@ -4773,7 +4789,7 @@ emit_reload_insns (insn)
...
@@ -4773,7 +4789,7 @@ emit_reload_insns (insn)
{
{
if
(
!
HARD_REGNO_MODE_OK
(
REGNO
(
second_reload_reg
),
if
(
!
HARD_REGNO_MODE_OK
(
REGNO
(
second_reload_reg
),
new_mode
))
new_mode
))
oldequiv
=
old
;
oldequiv
=
old
,
real_oldequiv
=
real_old
;
else
else
second_reload_reg
second_reload_reg
=
gen_reg_rtx
(
REG
,
new_mode
,
=
gen_reg_rtx
(
REG
,
new_mode
,
...
@@ -4785,14 +4801,18 @@ emit_reload_insns (insn)
...
@@ -4785,14 +4801,18 @@ emit_reload_insns (insn)
/* If we still need a secondary reload register, check
/* If we still need a secondary reload register, check
to see if it is being used as a scratch or intermediate
to see if it is being used as a scratch or intermediate
register and generate code appropriately. */
register and generate code appropriately. If we need
a scratch register, use REAL_OLDEQUIV since the form of
the insn may depend on the actual address if it is
a MEM. */
if
(
second_reload_reg
)
if
(
second_reload_reg
)
{
{
if
(
icode
!=
CODE_FOR_nothing
)
if
(
icode
!=
CODE_FOR_nothing
)
{
{
reload_insn
=
emit_insn_before
(
GEN_FCN
(
icode
)
reload_insn
=
emit_insn_before
(
GEN_FCN
(
icode
)
(
reloadreg
,
oldequiv
,
(
reloadreg
,
real_oldequiv
,
second_reload_reg
),
second_reload_reg
),
where
);
where
);
if
(
this_reload_insn
==
0
)
if
(
this_reload_insn
==
0
)
...
@@ -4814,7 +4834,7 @@ emit_reload_insns (insn)
...
@@ -4814,7 +4834,7 @@ emit_reload_insns (insn)
reload_insn
reload_insn
=
emit_insn_before
((
GEN_FCN
(
tertiary_icode
)
=
emit_insn_before
((
GEN_FCN
(
tertiary_icode
)
(
second_reload_reg
,
(
second_reload_reg
,
oldequiv
,
real_
oldequiv
,
third_reload_reg
)),
third_reload_reg
)),
where
);
where
);
if
(
this_reload_insn
==
0
)
if
(
this_reload_insn
==
0
)
...
@@ -5100,46 +5120,55 @@ emit_reload_insns (insn)
...
@@ -5100,46 +5120,55 @@ emit_reload_insns (insn)
one, since it will be stored into OUT. We might need a secondary
one, since it will be stored into OUT. We might need a secondary
register only for an input reload, so check again here. */
register only for an input reload, so check again here. */
if
(
reload_secondary_reload
[
j
]
>=
0
if
(
reload_secondary_reload
[
j
]
>=
0
)
&&
(
SECONDARY_OUTPUT_RELOAD_CLASS
(
reload_reg_class
[
j
],
mode
,
old
)
!=
NO_REGS
))
{
{
second_reloadreg
=
reloadreg
;
rtx
real_old
=
old
;
reloadreg
=
reload_reg_rtx
[
reload_secondary_reload
[
j
]];
/* See if RELOADREG is to be used as a scratch register
if
(
GET_CODE
(
old
)
==
REG
&&
REGNO
(
old
)
>=
FIRST_PSEUDO_REGISTER
or as an intermediate register. */
&&
reg_equiv_mem
[
REGNO
(
old
)]
!=
0
)
if
(
reload_secondary_icode
[
j
]
!=
CODE_FOR_nothing
)
real_old
=
reg_equiv_mem
[
REGNO
(
old
)];
{
emit_insn_before
((
GEN_FCN
(
reload_secondary_icode
[
j
])
(
old
,
second_reloadreg
,
reloadreg
)),
first_output_reload_insn
);
special
=
1
;
}
else
{
/* See if we need both a scratch and intermediate reload
register. */
int
secondary_reload
=
reload_secondary_reload
[
j
];
enum
insn_code
tertiary_icode
=
reload_secondary_icode
[
secondary_reload
];
rtx
pat
;
if
(
GET_MODE
(
reloadreg
)
!=
mode
)
if
((
SECONDARY_OUTPUT_RELOAD_CLASS
(
reload_reg_class
[
j
],
reloadreg
=
gen_rtx
(
REG
,
mode
,
REGNO
(
reloadreg
));
mode
,
real_old
)
!=
NO_REGS
))
{
second_reloadreg
=
reloadreg
;
reloadreg
=
reload_reg_rtx
[
reload_secondary_reload
[
j
]];
if
(
tertiary_icode
!=
CODE_FOR_nothing
)
/* See if RELOADREG is to be used as a scratch register
or as an intermediate register. */
if
(
reload_secondary_icode
[
j
]
!=
CODE_FOR_nothing
)
{
{
rtx
third_reloadreg
emit_insn_before
((
GEN_FCN
(
reload_secondary_icode
[
j
])
=
reload_reg_rtx
[
reload_secondary_reload
[
secondary_reload
]];
(
real_old
,
second_reloadreg
,
pat
=
(
GEN_FCN
(
tertiary_icode
)
reloadreg
)),
(
reloadreg
,
second_reloadreg
,
third_reloadreg
));
first_output_reload_insn
);
special
=
1
;
}
}
else
else
pat
=
gen_move_insn
(
reloadreg
,
second_reloadreg
);
{
/* See if we need both a scratch and intermediate reload
register. */
int
secondary_reload
=
reload_secondary_reload
[
j
];
enum
insn_code
tertiary_icode
=
reload_secondary_icode
[
secondary_reload
];
rtx
pat
;
emit_insn_before
(
pat
,
first_output_reload_insn
);
if
(
GET_MODE
(
reloadreg
)
!=
mode
)
reloadreg
=
gen_rtx
(
REG
,
mode
,
REGNO
(
reloadreg
));
if
(
tertiary_icode
!=
CODE_FOR_nothing
)
{
rtx
third_reloadreg
=
reload_reg_rtx
[
reload_secondary_reload
[
secondary_reload
]];
pat
=
(
GEN_FCN
(
tertiary_icode
)
(
reloadreg
,
second_reloadreg
,
third_reloadreg
));
}
else
pat
=
gen_move_insn
(
reloadreg
,
second_reloadreg
);
emit_insn_before
(
pat
,
first_output_reload_insn
);
}
}
}
}
}
#endif
#endif
...
...
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