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
3daf36a4
Commit
3daf36a4
authored
Feb 13, 1994
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use ASM_GENERATE_INTERNAL_LABEL rather than assuming what it does
From-SVN: r6548
parent
266f3aac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
10 deletions
+52
-10
gcc/config/rs6000/rs6000.c
+30
-7
gcc/config/rs6000/rs6000.h
+22
-3
No files found.
gcc/config/rs6000/rs6000.c
View file @
3daf36a4
...
...
@@ -1490,7 +1490,14 @@ output_prolog (file, size)
/* If TARGET_MINIMAL_TOC, and the constant pool is needed, then load the
TOC_TABLE address into register 30. */
if
(
TARGET_MINIMAL_TOC
&&
get_pool_size
()
!=
0
)
asm_fprintf
(
file
,
"
\t
{l|lwz} 30,LCTOC..0(2)
\n
"
);
{
char
buf
[
100
];
ASM_GENERATE_INTERNAL_LABEL
(
buf
,
"LCTOC"
,
0
);
asm_fprintf
(
file
,
"
\t
{l|lwz} 30,"
);
assemble_name
(
file
,
buf
);
asm_fprintf
(
file
,
"(2)
\n
"
);
}
}
/* Write function epilogue. */
...
...
@@ -1586,7 +1593,7 @@ output_epilog (file, size)
from the function start. */
if
(
*
fname
==
'*'
)
++
fname
;
fprintf
(
file
,
"LT..
"
);
ASM_OUTPUT_INTERNAL_LABEL_PREFIX
(
file
,
"LT
"
);
ASM_OUTPUT_LABEL
(
file
,
fname
);
/* The .tbtab pseudo-op can only be used for the first eight
...
...
@@ -1720,7 +1727,8 @@ output_epilog (file, size)
fprintf
(
file
,
"
\t
.long %d
\n
"
,
parm_info
);
/* Offset from start of code to tb table. */
fprintf
(
file
,
"
\t
.long LT.."
);
fprintf
(
file
,
"
\t
.long "
);
ASM_OUTPUT_INTERNAL_LABEL_PREFIX
(
file
,
"LT"
);
RS6000_OUTPUT_BASENAME
(
file
,
fname
);
fprintf
(
file
,
"-."
);
RS6000_OUTPUT_BASENAME
(
file
,
fname
);
...
...
@@ -1965,14 +1973,26 @@ output_function_profiler (file, labelno)
/* The last used parameter register. */
int
last_parm_reg
;
int
i
,
j
;
char
buf
[
100
];
/* Set up a TOC entry for the profiler label. */
toc_section
();
ASM_OUTPUT_INTERNAL_LABEL
(
file
,
"LPC"
,
labelno
);
ASM_GENERATE_INTERNAL_LABEL
(
buf
,
"LP"
,
labelno
);
if
(
TARGET_MINIMAL_TOC
)
fprintf
(
file
,
"LPC..%d:
\n\t
.long LP..%d
\n
"
,
labelno
,
labelno
);
{
fprintf
(
file
,
"
\t
.long "
);
assemble_name
(
file
,
buf
);
fprintf
(
file
,
"
\n
"
);
}
else
fprintf
(
file
,
"LPC..%d:
\n\t
.tc
\t
LP..%d[TC],LP..%d
\n
"
,
labelno
,
labelno
,
labelno
);
{
fprintf
(
file
,
"
\t
.tc
\t
"
);
assemble_name
(
file
,
buf
);
fprintf
(
file
,
"[TC],"
);
assemble_name
(
file
,
buf
);
fprintf
(
file
,
"
\n
"
);
}
text_section
();
/* Figure out last used parameter register. The proper thing to do is
...
...
@@ -1992,7 +2012,10 @@ output_function_profiler (file, labelno)
/* Load location address into r3, and call mcount. */
fprintf
(
file
,
"
\t
l 3,LPC..%d(2)
\n\t
bl .mcount
\n
"
,
labelno
);
ASM_GENERATE_INTERNAL_LABEL
(
buf
,
"LPC"
,
labelno
);
fprintf
(
file
,
"
\t
l 3,"
);
assemble_name
(
file
,
buf
);
fprintf
(
file
,
"(2)
\n\t
bl .mcount
\n
"
);
/* Restore parameter registers. */
...
...
gcc/config/rs6000/rs6000.h
View file @
3daf36a4
...
...
@@ -1869,6 +1869,12 @@ toc_section () \
#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
fprintf (FILE, "%s..%d:\n", PREFIX, NUM)
/* This is how to output an internal label prefix. rs6000.c uses this
when generating traceback tables. */
#define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX) \
fprintf (FILE, "%s..", PREFIX)
/* This is how to output a label for a jump table. Arguments are the same as
for ASM_OUTPUT_INTERNAL_LABEL, except the insn for the jump table is
passed. */
...
...
@@ -1971,13 +1977,26 @@ toc_section () \
(RS/6000 does not use such vectors, but we must define this macro
anyway.) */
#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
fprintf (FILE, "\t.long L..%d\n", VALUE)
#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
do { char buf[100]; \
fprintf (FILE, "\t.long "); \
ASM_GENERATE_INTERNAL_LABEL (buf, "L", VALUE); \
assemble_name (FILE, buf); \
fprintf (FILE, "\n"); \
} while (0)
/* This is how to output an element of a case-vector that is relative. */
#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \
fprintf (FILE, "\t.long L..%d-L..%d\n", VALUE, REL)
do { char buf[100]; \
fprintf (FILE, "\t.long "); \
ASM_GENERATE_INTERNAL_LABEL (buf, "L", VALUE); \
assemble_name (FILE, buf); \
fprintf (FILE, "-"); \
ASM_GENERATE_INTERNAL_LABEL (buf, "L", REL); \
assemble_name (FILE, buf); \
fprintf (FILE, "\n"); \
} while (0)
/* This is how to output an assembler line
that says to advance the location counter
...
...
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