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
30ea98f1
Commit
30ea98f1
authored
Jul 11, 1996
by
Michael Meissner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check for whether GOT_TOC register was eliminated
From-SVN: r12429
parent
1ff7789b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
3 deletions
+29
-3
gcc/config/rs6000/rs6000.c
+18
-3
gcc/config/rs6000/rs6000.h
+11
-0
No files found.
gcc/config/rs6000/rs6000.c
View file @
30ea98f1
...
...
@@ -2153,12 +2153,10 @@ rs6000_replace_regno (x, from, reg)
void
rs6000_finalize_pic
()
{
if
(
DEFAULT_ABI
==
ABI_V4
||
DEFAULT_ABI
==
ABI_SOLARIS
)
{
/* Loop through all of the insns, replacing the special GOT_TOC_REGNUM
with an appropriate pseduo register. If we find we need GOT/TOC,
add the appropriate init code. */
if
(
flag_pic
)
if
(
flag_pic
&&
(
DEFAULT_ABI
==
ABI_V4
||
DEFAULT_ABI
==
ABI_SOLARIS
)
)
{
rtx
insn
=
get_insns
();
rtx
reg
=
NULL_RTX
;
...
...
@@ -2189,6 +2187,23 @@ rs6000_finalize_pic ()
emit_insn_before
(
init
,
first_insn
);
}
}
}
/* Search for any occurrance of the GOT_TOC register marker that should
have been eliminated, but may have crept back in. */
void
rs6000_reorg
(
insn
)
rtx
insn
;
{
if
(
flag_pic
&&
(
DEFAULT_ABI
==
ABI_V4
||
DEFAULT_ABI
==
ABI_SOLARIS
))
{
rtx
got_reg
=
gen_rtx
(
REG
,
Pmode
,
GOT_TOC_REGNUM
);
for
(
;
insn
!=
NULL_RTX
;
insn
=
NEXT_INSN
(
insn
))
if
(
GET_RTX_CLASS
(
GET_CODE
(
insn
))
==
'i'
&&
reg_mentioned_p
(
got_reg
,
PATTERN
(
insn
)))
fatal_insn
(
"GOT/TOC register marker not removed:"
,
PATTERN
(
insn
));
}
}
...
...
gcc/config/rs6000/rs6000.h
View file @
30ea98f1
...
...
@@ -1954,6 +1954,16 @@ typedef struct rs6000_args
/* #define LEGITIMATE_PIC_OPERAND_P (X) */
/* In rare cases, correct code generation requires extra machine
dependent processing between the second jump optimization pass and
delayed branch scheduling. On those machines, define this macro
as a C statement to act on the code starting at INSN.
On the RS/6000, we use it to make sure the GOT_TOC register marker
that FINALIZE_PIC is supposed to remove actually got removed. */
#define MACHINE_DEPENDENT_REORG(INSN) rs6000_reorg (INSN)
/* Define this if some processing needs to be done immediately before
emitting code for an insn. */
...
...
@@ -3081,6 +3091,7 @@ extern int addrs_ok_for_quad_peep ();
extern
enum
reg_class
secondary_reload_class
();
extern
int
ccr_bit
();
extern
void
rs6000_finalize_pic
();
extern
void
rs6000_reorg
();
extern
void
rs6000_save_machine_status
();
extern
void
rs6000_restore_machine_status
();
extern
void
rs6000_init_expanders
();
...
...
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