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
d1d27b4c
Commit
d1d27b4c
authored
Apr 14, 1995
by
Michael Meissner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Emit eabi's main call to __eabi before setting up the minimal TOC, rather than after.
From-SVN: r9382
parent
9973f4a2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletions
+19
-1
gcc/config/rs6000/eabi.h
+0
-1
gcc/config/rs6000/rs6000.c
+19
-0
No files found.
gcc/config/rs6000/eabi.h
View file @
d1d27b4c
...
...
@@ -50,7 +50,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
((TARGET_RELOCATABLE) ? "\t.section\t\".got2\",\"aw\"" : "\t.section\t\".got1\",\"aw\"")
/* Invoke an initializer function to set up the GOT */
#define INVOKE__main 1
#define NAME__MAIN "__eabi"
#undef TARGET_VERSION
...
...
gcc/config/rs6000/rs6000.c
View file @
d1d27b4c
...
...
@@ -1612,6 +1612,19 @@ output_prolog (file, size)
int
total_size
=
(
basic_size
+
size
+
current_function_outgoing_args_size
);
char
buf
[
256
];
/* If this is eabi, call __eabi with main, but do so before the minimal TOC
is setup, so we can't use the normal mechanism. */
#if defined(USING_SVR4_H) && defined(NAME__MAIN) && !defined(INVOKE__main)
int
main_p
=
0
;
if
(
IDENTIFIER_LENGTH
(
DECL_NAME
(
current_function_decl
))
==
4
&&
!
strcmp
(
IDENTIFIER_POINTER
(
DECL_NAME
(
current_function_decl
)),
"main"
))
{
main_p
=
1
;
regs_ever_live
[
65
]
=
1
;
}
#endif
/* Round size to multiple of 8 bytes. */
total_size
=
(
total_size
+
7
)
&
~
7
;
...
...
@@ -1715,6 +1728,12 @@ output_prolog (file, size)
if
(
frame_pointer_needed
)
asm_fprintf
(
file
,
"
\t
mr 31,1
\n
"
);
/* If this is eabi, call __eabi before loading up the minimal TOC */
#if defined(USING_SVR4_H) && defined(NAME__MAIN) && !defined(INVOKE__main)
if
(
main_p
)
fprintf
(
file
,
"
\t
bl %s
\n
"
,
NAME__MAIN
);
#endif
/* 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
)
...
...
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