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
e165f3f0
Commit
e165f3f0
authored
Mar 28, 1992
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r610
parent
aae75261
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
3 deletions
+55
-3
gcc/config/rs6000/rs6000.c
+55
-3
No files found.
gcc/config/rs6000/rs6000.c
View file @
e165f3f0
...
...
@@ -1016,7 +1016,7 @@ print_operand (file, x, code)
write 'l'. Otherwise, write 'r'. This is a kludge to fix a bug
in the RS/6000 assembler where "sri" with a zero shift count
write a trash instruction. */
if
(
GET_CODE
(
x
)
!
=
CONST_INT
&&
(
INTVAL
(
x
)
&
31
)
==
0
)
if
(
GET_CODE
(
x
)
=
=
CONST_INT
&&
(
INTVAL
(
x
)
&
31
)
==
0
)
fprintf
(
file
,
"l"
);
else
fprintf
(
file
,
"r"
);
...
...
@@ -1090,6 +1090,15 @@ first_reg_to_save ()
if
(
regs_ever_live
[
first_reg
])
break
;
/* If profiling, then we must save/restore every register that contains
a parameter before/after the .mcount call. Use registers from 30 down
to 23 to do this. Don't use the frame pointer in reg 31.
For now, save enough room for all of the parameter registers. */
if
(
profile_flag
)
if
(
first_reg
>
23
)
first_reg
=
23
;
return
first_reg
;
}
...
...
@@ -1194,8 +1203,9 @@ output_prolog (file, size)
trunc_defined
=
1
;
}
/* If we have to call a function to save fpr's, we will be using LR. */
if
(
first_fp_reg
<
62
)
/* If we have to call a function to save fpr's, or if we are doing profiling,
then we will be using LR. */
if
(
first_fp_reg
<
62
||
profile_flag
)
regs_ever_live
[
65
]
=
1
;
/* If we use the link register, get it into r0. */
...
...
@@ -1511,3 +1521,45 @@ rs6000_gen_section_name (buf, filename, section_desc)
else
*
p
=
'\0'
;
}
/* Write function profiler code. */
void
output_function_profiler
(
file
,
labelno
)
FILE
*
file
;
int
labelno
;
{
/* The last used parameter register. */
int
last_parm_reg
;
int
i
,
j
;
/* Set up a TOC entry for the profiler label. */
toc_section
();
fprintf
(
file
,
"LPTOC..%d:
\n\t
.tc
\t
LP..%d[TC], LP..%d
\n
"
,
labelno
,
labelno
,
labelno
);
text_section
();
/* Figure out last used parameter register. The proper thing to do is
to walk incoming args of the function. A function might have live
parameter registers even if it has no incoming args. */
for
(
last_parm_reg
=
10
;
last_parm_reg
>
2
&&
!
regs_ever_live
[
last_parm_reg
];
last_parm_reg
--
)
;
/* Save parameter registers in regs 23-30. Don't overwrite reg 31, since
it might be set up as the frame pointer. */
for
(
i
=
3
,
j
=
30
;
i
<=
last_parm_reg
;
i
++
,
j
--
)
fprintf
(
file
,
"
\t
ai %d,%d,0
\n
"
,
j
,
i
);
/* Load location address into r3, and call mcount. */
fprintf
(
file
,
"
\t
l 3,LPTOC..%d(2)
\n\t
bl .mcount
\n
"
,
labelno
);
/* Restore parameter registers. */
for
(
i
=
3
,
j
=
30
;
i
<=
last_parm_reg
;
i
++
,
j
--
)
fprintf
(
file
,
"
\t
ai %d,%d,0
\n
"
,
i
,
j
);
}
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