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
034e84c4
Commit
034e84c4
authored
Nov 26, 1997
by
Michael Meissner
Committed by
Michael Meissner
Nov 26, 1997
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix System V profiling.
From-SVN: r16756
parent
92dcf4c8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
12 deletions
+30
-12
gcc/ChangeLog
+8
-0
gcc/config/rs6000/rs6000.c
+14
-9
gcc/config/rs6000/rs6000.h
+8
-3
No files found.
gcc/ChangeLog
View file @
034e84c4
Wed Nov 26 15:47:30 1997 Michael Meissner <meissner@cygnus.com>
* rs6000.c (output_function_profiler): Put label address in r0, and
store LR in 4(sp) for System V/eabi.
* rs6000.h (ASM_OUTPUT_REG_{PUSH,POP}): Keep stack aligned to 16
byte boundary, and maintain stack backchain.
Wed Nov 26 11:12:26 1997 Jason Merrill <jason@yorick.cygnus.com>
* toplev.c (main): Complain about -gdwarfn.
...
...
gcc/config/rs6000/rs6000.c
View file @
034e84c4
...
...
@@ -4436,28 +4436,33 @@ output_function_profiler (file, labelno)
if
(
flag_pic
==
1
)
{
fprintf
(
file
,
"
\t
bl _GLOBAL_OFFSET_TABLE_@local-4
\n
"
);
fprintf
(
file
,
"
\t
%s %s,4(%s)
\n
"
,
(
TARGET_NEW_MNEMONICS
)
?
"stw"
:
"st"
,
reg_names
[
0
],
reg_names
[
1
]);
fprintf
(
file
,
"
\t
mflr %s
\n
"
,
reg_names
[
11
]);
fprintf
(
file
,
"
\t
%s %s,"
,
(
TARGET_NEW_MNEMONICS
)
?
"lwz"
:
"l"
,
reg_names
[
11
]);
reg_names
[
0
]);
assemble_name
(
file
,
buf
);
fprintf
(
file
,
"@got(%s)
\n
"
,
reg_names
[
11
]);
}
#if TARGET_ELF
else
if
(
flag_pic
>
1
||
TARGET_RELOCATABLE
)
{
fprintf
(
file
,
"
\t
stw %s,4(%s)
\n
"
,
reg_names
[
0
],
reg_names
[
1
]);
fprintf
(
file
,
"%s
\n
"
,
MINIMAL_TOC_SECTION_ASM_OP
);
assemble_name
(
file
,
buf
);
fprintf
(
file
,
"X = .-.LCTOC1
\n
"
);
fprintf
(
file
,
"
\t
.long "
);
assemble_name
(
file
,
buf
);
fputs
(
"
\n\t
.previous
\n
"
,
file
);
fprintf
(
file
,
"
\t
%s %s,4(%s)
\n
"
,
(
TARGET_NEW_MNEMONICS
)
?
"stw"
:
"st"
,
reg_names
[
0
],
reg_names
[
1
]);
rs6000_pic_func_labelno
=
rs6000_pic_labelno
;
rs6000_output_load_toc_table
(
file
,
11
);
fprintf
(
file
,
"
\t
%s %s,"
,
(
TARGET_NEW_MNEMONICS
)
?
"lwz"
:
"l"
,
reg_names
[
11
]);
assemble_name
(
file
,
buf
);
fprintf
(
file
,
"X(%s)
\n
"
,
reg_names
[
11
]);
fprintf
(
file
,
"%s
\n
"
,
MINIMAL_TOC_SECTION_ASM_OP
);
assemble_name
(
file
,
buf
);
fprintf
(
file
,
"X = .-.LCTOC1
\n
"
);
fprintf
(
file
,
"
\t
.long "
);
assemble_name
(
file
,
buf
);
fputs
(
"
\n\t
.previous
\n
"
,
file
);
}
#endif
else
if
(
TARGET_NEW_MNEMONICS
)
...
...
@@ -4466,7 +4471,7 @@ output_function_profiler (file, labelno)
assemble_name
(
file
,
buf
);
fprintf
(
file
,
"@ha
\n
"
);
fprintf
(
file
,
"
\t
stw %s,4(%s)
\n
"
,
reg_names
[
0
],
reg_names
[
1
]);
fprintf
(
file
,
"
\t
addi %s,%s,"
,
reg_names
[
11
],
reg_names
[
11
]);
fprintf
(
file
,
"
\t
addi %s,%s,"
,
reg_names
[
0
],
reg_names
[
11
]);
assemble_name
(
file
,
buf
);
fputs
(
"@l
\n
"
,
file
);
}
...
...
gcc/config/rs6000/rs6000.h
View file @
034e84c4
...
...
@@ -2904,12 +2904,17 @@ do { \
#define ASM_OUTPUT_ASCII(FILE, P, N) output_ascii ((FILE), (P), (N))
/* This is how to output code to push a register on the stack.
It need not be very fast code. */
It need not be very fast code.
On the rs6000, we must keep the backchain up to date. In order
to simplify things, always allocate 16 bytes for a push (System V
wants to keep stack aligned to a 16 byte boundary). */
#define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \
do { \
extern char *reg_names[]; \
asm_fprintf (FILE, "\{tstu|stwu} %s,-4(%s)\n", reg_names[REGNO], \
asm_fprintf (FILE, "\t{stu|stwu} %s,-16(%s)\n\t{st|stw} %s,8(%s)\n", \
reg_names[1], reg_names[1], reg_names[REGNO], \
reg_names[1]); \
} while (0)
...
...
@@ -2919,7 +2924,7 @@ do { \
#define ASM_OUTPUT_REG_POP(FILE,REGNO) \
do { \
extern char *reg_names[]; \
asm_fprintf (FILE, "\t{l|lwz} %s,
0(%s)\n\t{ai|addic} %s,%s,4
\n", \
asm_fprintf (FILE, "\t{l|lwz} %s,
8(%s)\n\t{ai|addic} %s,%s,16
\n", \
reg_names[REGNO], reg_names[1], reg_names[1], \
reg_names[1]); \
} while (0)
...
...
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