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
42820a49
Commit
42820a49
authored
Sep 28, 1998
by
Michael Meissner
Committed by
Michael Meissner
Sep 28, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make ASM_OUTPUT_MI_THUNK ELF only for now and always use jump
From-SVN: r22628
parent
8ff0c1af
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
6 deletions
+28
-6
gcc/ChangeLog
+5
-0
gcc/config/rs6000/rs6000.c
+21
-6
gcc/config/rs6000/rs6000.h
+2
-0
No files found.
gcc/ChangeLog
View file @
42820a49
Mon
Sep
28
17
:
34
:
35
1998
Michael
Meissner
<
meissner
@cygnus
.
com
>
*
rs6000
.
h
(
ASM_OUTPUT_MI_THUNK
)
:
Only
define
on
ELF
systems
.
*
rs6000
.
c
(
output_mi_thunk
)
:
Always
use
a
raw
jump
for
now
.
Mon
Sep
28
14
:
24
:
03
1998
Mark
Mitchell
<
mark
@markmitchell
.
com
>
*
tree
.
h
(
TYPE_BINFO
)
:
Document
.
...
...
gcc/config/rs6000/rs6000.c
View file @
42820a49
...
...
@@ -4557,6 +4557,15 @@ output_mi_thunk (file, thunk_fndecl, delta, function)
Otherwise, load up its address and jump to it. */
fname
=
XSTR
(
XEXP
(
DECL_RTL
(
function
),
0
),
0
);
#if 1
/* For now, just emit a branch always, until we can figure out better when we
need to load the address into the count register and emit the slower bctr
instruction. */
fprintf
(
file
,
"
\t
b %s"
,
prefix
);
assemble_name
(
file
,
fname
);
fprintf
(
file
,
"
\n
"
);
#else
if
(
TREE_ASM_WRITTEN
(
function
)
&&
!
lookup_attribute
(
"longcall"
,
TYPE_ATTRIBUTES
(
TREE_TYPE
(
function
))))
{
...
...
@@ -4620,6 +4629,8 @@ output_mi_thunk (file, thunk_fndecl, delta, function)
asm_fprintf
(
file
,
"
\t
{l|lwz} %s,"
,
r0
);
assemble_name
(
file
,
fname
);
asm_fprintf
(
file
,
"@got(%s)
\n
"
,
r12
);
asm_fprintf
(
file
,
"
\t
mtctr %s
\n
"
,
r0
);
asm_fprintf
(
file
,
"
\t
bctr
\n
"
);
}
#if TARGET_ELF
else
if
(
flag_pic
>
1
||
TARGET_RELOCATABLE
)
...
...
@@ -4635,6 +4646,8 @@ output_mi_thunk (file, thunk_fndecl, delta, function)
asm_fprintf
(
file
,
"(%s)
\n
"
,
r12
);
asm_fprintf
(
file
,
"
\t
{l|lwz} %s,4(%s)
\n
"
,
r12
,
sp
);
asm_fprintf
(
file
,
"
\t
mtlr %s
\n
"
,
r12
);
asm_fprintf
(
file
,
"
\t
mtctr %s
\n
"
,
r0
);
asm_fprintf
(
file
,
"
\t
bctr
\n
"
);
asm_fprintf
(
file
,
"%s
\n
"
,
MINIMAL_TOC_SECTION_ASM_OP
);
assemble_name
(
file
,
buf
);
fputs
(
" = .-.LCTOC1
\n
"
,
file
);
...
...
@@ -4642,22 +4655,24 @@ output_mi_thunk (file, thunk_fndecl, delta, function)
assemble_name
(
file
,
fname
);
fputs
(
"
\n\t
.previous
\n
"
,
file
);
}
#endif
#endif
/* TARGET_ELF */
else
{
asm_fprintf
(
file
,
"
\t
{liu|lis} %s,"
,
r
0
);
asm_fprintf
(
file
,
"
\t
{liu|lis} %s,"
,
r
12
);
assemble_name
(
file
,
fname
);
asm_fprintf
(
file
,
"@ha
\n
"
);
asm_fprintf
(
file
,
"
\t
{cal|la} %s,"
,
r
0
);
asm_fprintf
(
file
,
"
\t
{cal|la} %s,"
,
r
12
);
assemble_name
(
file
,
fname
);
asm_fprintf
(
file
,
"@l(%s)
\n
"
,
r0
);
asm_fprintf
(
file
,
"@l(%s)
\n
"
,
r12
);
asm_fprintf
(
file
,
"
\t
mtctr %s
\n
"
,
r12
);
asm_fprintf
(
file
,
"
\t
bctr
\n
"
);
}
asm_fprintf
(
file
,
"
\t
mtctr %s
\n
"
,
r0
);
asm_fprintf
(
file
,
"
\t
bctr
\n
"
);
break
;
}
}
#endif
/* #if 0 out code to use bctr for far away jumps */
}
...
...
gcc/config/rs6000/rs6000.h
View file @
42820a49
...
...
@@ -1617,8 +1617,10 @@ typedef struct rs6000_args
frontend will generate a less efficient heavyweight thunk that calls
FUNCTION instead of jumping to it. The generic approach does not support
varargs. */
#if TARGET_ELF
#define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \
output_mi_thunk (FILE, THUNK_FNDECL, DELTA, FUNCTION)
#endif
/* TRAMPOLINE_TEMPLATE deleted */
...
...
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