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
874a0744
Commit
874a0744
authored
Mar 02, 1995
by
Michael Meissner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move -mrelocatable word before function prologue.
From-SVN: r9105
parent
a6d8d7ae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
11 deletions
+41
-11
gcc/config/rs6000/rs6000.c
+24
-11
gcc/config/rs6000/sysv4.h
+17
-0
No files found.
gcc/config/rs6000/rs6000.c
View file @
874a0744
...
...
@@ -63,6 +63,12 @@ static int common_mode_defined;
rtx
rs6000_compare_op0
,
rs6000_compare_op1
;
int
rs6000_compare_fp_p
;
#ifdef USING_SVR4_H
/* Label number of label created for -mrelocatable, to call to so we can
get the address of the GOT section */
int
rs6000_pic_labelno
;
#endif
/* Override command line options. Mostly we process the processor
type and sometimes adjust other TARGET_ options. */
...
...
@@ -1588,6 +1594,7 @@ output_prolog (file, size)
int
first_fp_reg
=
first_fp_reg_to_save
();
int
basic_size
=
rs6000_sa_size
();
int
total_size
=
(
basic_size
+
size
+
current_function_outgoing_args_size
);
char
buf
[
256
];
/* Round size to multiple of 8 bytes. */
total_size
=
(
total_size
+
7
)
&
~
7
;
...
...
@@ -1701,24 +1708,30 @@ output_prolog (file, size)
#ifdef USING_SVR4_H
if
(
TARGET_RELOCATABLE
)
{
static
int
labelno
=
0
;
ASM_GENERATE_INTERNAL_LABEL
(
buf
,
"LCF"
,
labelno
);
ASM_GENERATE_INTERNAL_LABEL
(
buf
,
"LCF"
,
rs6000_pic_labelno
);
fprintf
(
file
,
"
\t
bl "
);
assemble_name
(
file
,
buf
);
fprintf
(
file
,
"
\n
"
);
ASM_GENERATE_INTERNAL_LABEL
(
buf
,
"LCTOC"
,
1
);
fprintf
(
file
,
(
TARGET_POWERPC64
)
?
"
\t
.quad "
:
"
\t
.long "
);
assemble_name
(
file
,
buf
);
fprintf
(
file
,
"-.
\n
"
);
ASM_OUTPUT_INTERNAL_LABEL
(
file
,
"LCF"
,
labelno
);
ASM_OUTPUT_INTERNAL_LABEL
(
file
,
"LCF"
,
rs6000_pic_labelno
);
fprintf
(
file
,
"
\t
mflr 30
\n
"
);
asm_fprintf
(
file
,
(
TARGET_POWERPC64
)
?
"
\t
ld 0,0(30)
\n
"
:
"
\t
{l|lwz} 0,0(30)
\n
"
);
if
(
TARGET_POWERPC64
)
fprintf
(
file
,
"
\t
ld 0,"
);
else
if
(
TARGET_NEW_MNEMONICS
)
fprintf
(
file
,
"
\t
lwz 0,"
);
else
fprintf
(
file
,
"
\t
l 0,"
);
fprintf
(
file
,
"("
);
ASM_GENERATE_INTERNAL_LABEL
(
buf
,
"LCL"
,
rs6000_pic_labelno
);
assemble_name
(
file
,
buf
);
fprintf
(
file
,
"-"
);
ASM_GENERATE_INTERNAL_LABEL
(
buf
,
"LCF"
,
rs6000_pic_labelno
);
assemble_name
(
file
,
buf
);
fprintf
(
file
,
")(30)
\n
"
);
asm_fprintf
(
file
,
"
\t
{cax|add} 30,0,30
\n
"
);
labelno
++
;
rs6000_pic_
labelno
++
;
}
else
#endif
/* USING_SVR4_H */
...
...
gcc/config/rs6000/sysv4.h
View file @
874a0744
...
...
@@ -188,10 +188,27 @@ toc_section () \
function's return value. We allow for that here. */
extern
void
svr4_traceback
();
extern
int
rs6000_pic_labelno
;
#undef ASM_DECLARE_FUNCTION_NAME
#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
do { \
if (TARGET_RELOCATABLE && get_pool_size () != 0) \
{ \
char buf[256]; \
\
ASM_OUTPUT_INTERNAL_LABEL (FILE, "LCL", rs6000_pic_labelno); \
\
ASM_GENERATE_INTERNAL_LABEL (buf, "LCTOC", 1); \
fprintf (FILE, (TARGET_POWERPC64) ? "\t.quad " : "\t.long "); \
assemble_name (FILE, buf); \
putc ('-', FILE); \
\
ASM_GENERATE_INTERNAL_LABEL (buf, "LCF", rs6000_pic_labelno); \
assemble_name (FILE, buf); \
putc ('\n', FILE); \
} \
\
fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \
assemble_name (FILE, NAME); \
putc (',', FILE); \
...
...
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