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
8f802bfb
Commit
8f802bfb
authored
Jan 31, 1996
by
David Edelsohn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ld/std typos and TARGET_32BIT usage
From-SVN: r11145
parent
d52d8c9c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
28 deletions
+28
-28
gcc/config/rs6000/rs6000.c
+28
-28
No files found.
gcc/config/rs6000/rs6000.c
View file @
8f802bfb
...
...
@@ -2900,15 +2900,15 @@ output_prolog (file, size)
char
*
store_reg
;
char
*
load_reg
;
if
(
TARGET_
64
BIT
)
if
(
TARGET_
32
BIT
)
{
store_reg
=
"
\t
std %s,%d(%s)
"
;
load_reg
=
"
\t
lld %s,%d(%s)
"
;
store_reg
=
"
\t
{st|stw} %s,%d(%s)
\n
"
;
load_reg
=
"
\t
{l|lwz} %s,%d(%s)
\n
"
;
}
else
{
store_reg
=
"
\t
{st|stw}
%s,%d(%s)
\n
"
;
load_reg
=
"
\t
{l|lwz}
%s,%d(%s)
\n
"
;
store_reg
=
"
\t
std
%s,%d(%s)
\n
"
;
load_reg
=
"
\t
lld
%s,%d(%s)
\n
"
;
}
if
(
TARGET_DEBUG_STACK
)
...
...
@@ -3009,7 +3009,7 @@ output_prolog (file, size)
{
if
(
info
->
total_size
<
32767
)
asm_fprintf
(
file
,
(
TARGET_
64BIT
)
?
"
\t
stdu %s,%d(%s)
\n
"
:
"
\t
{stu|stwu}
%s,%d(%s)
\n
"
,
(
TARGET_
32BIT
)
?
"
\t
{stu|stwu} %s,%d(%s)
\n
"
:
"
\t
stdu
%s,%d(%s)
\n
"
,
reg_names
[
1
],
-
info
->
total_size
,
reg_names
[
1
]);
else
{
...
...
@@ -3018,7 +3018,7 @@ output_prolog (file, size)
reg_names
[
0
],
(
neg_size
>>
16
)
&
0xffff
,
reg_names
[
0
],
reg_names
[
0
],
neg_size
&
0xffff
);
asm_fprintf
(
file
,
(
TARGET_
64BIT
)
?
"
\t
stdux %s,%s,%s
\n
"
:
"
\t
{stux|stwux}
%s,%s,%s
\n
"
,
(
TARGET_
32BIT
)
?
"
\t
{stux|stwux} %s,%s,%s
\n
"
:
"
\t
stdux
%s,%s,%s
\n
"
,
reg_names
[
1
],
reg_names
[
1
],
reg_names
[
0
]);
}
}
...
...
@@ -3093,7 +3093,7 @@ output_prolog (file, size)
ASM_OUTPUT_INTERNAL_LABEL
(
file
,
"LCF"
,
rs6000_pic_labelno
);
fprintf
(
file
,
"
\t
mflr %s
\n
"
,
reg_names
[
30
]);
asm_fprintf
(
file
,
TARGET_
64BIT
?
"
\t
ld"
:
"
\t
{l|lwz}
"
);
asm_fprintf
(
file
,
TARGET_
32BIT
?
"
\t
{l|lwz}"
:
"
\t
ld
"
);
fprintf
(
file
,
" %s,("
,
reg_names
[
0
]);
ASM_GENERATE_INTERNAL_LABEL
(
buf
,
"LCL"
,
rs6000_pic_labelno
);
assemble_name
(
file
,
buf
);
...
...
@@ -3112,7 +3112,7 @@ output_prolog (file, size)
{
case
ABI_V4
:
case
ABI_AIX_NODESC
:
if
(
!
TARGET_64
BIT
)
if
(
TARGET_32
BIT
)
{
ASM_GENERATE_INTERNAL_LABEL
(
buf
,
"LCTOC"
,
1
);
asm_fprintf
(
file
,
"
\t
{cau|addis} %s,%s,"
,
reg_names
[
30
],
reg_names
[
0
]);
...
...
@@ -3161,7 +3161,7 @@ output_epilog (file, size)
int
size
;
{
rs6000_stack_t
*
info
=
rs6000_stack_info
();
char
*
load_reg
=
(
TARGET_
64BIT
)
?
"
\t
ld %s,%d(%s)"
:
"
\t
{l|lwz}
%s,%d(%s)
\n
"
;
char
*
load_reg
=
(
TARGET_
32BIT
)
?
"
\t
{l|lwz} %s,%d(%s)
\n
"
:
"
\t
ld
%s,%d(%s)
\n
"
;
rtx
insn
=
get_last_insn
();
int
i
;
...
...
@@ -3206,7 +3206,7 @@ output_epilog (file, size)
{
int
regno
=
info
->
first_gp_reg_save
;
int
loc
=
info
->
gp_save_offset
;
int
reg_size
=
(
TARGET_
64BIT
)
?
8
:
4
;
int
reg_size
=
(
TARGET_
32BIT
)
?
4
:
8
;
for
(
;
regno
<
32
;
regno
++
,
loc
+=
reg_size
)
asm_fprintf
(
file
,
load_reg
,
reg_names
[
regno
],
loc
,
reg_names
[
1
]);
...
...
@@ -3887,7 +3887,7 @@ rs6000_trampoline_template (file)
the address of the function, the second word is the TOC pointer (r2),
and the third word is the static chain value. */
case
ABI_AIX
:
fprintf
(
file
,
"
\t
.long %s
\n
"
,
(
TARGET_
64BIT
)
?
"0,0,0,0,0,0"
:
"
0,0,0"
);
fprintf
(
file
,
"
\t
.long %s
\n
"
,
(
TARGET_
32BIT
)
?
"0,0,0"
:
"0,0,0,
0,0,0"
);
break
;
...
...
@@ -3898,20 +3898,7 @@ rs6000_trampoline_template (file)
if
(
STATIC_CHAIN_REGNUM
==
0
||
!
TARGET_NEW_MNEMONICS
)
abort
();
if
(
TARGET_64BIT
)
{
fprintf
(
file
,
"
\t
mflr %s
\n
"
,
r0
);
/* offset 0 */
fprintf
(
file
,
"
\t
bl .LTRAMP1
\n
"
);
/* offset 4 */
fprintf
(
file
,
"
\t
.long 0,0,0,0
\n
"
);
/* offset 8 */
fprintf
(
file
,
".LTRAMP1:
\n
"
);
fprintf
(
file
,
"
\t
mflr %s
\n
"
,
sc
);
/* offset 28 */
fprintf
(
file
,
"
\t
mtlr %s
\n
"
,
r0
);
/* offset 32 */
fprintf
(
file
,
"
\t
ld %s,0(%s)
\n
"
,
r0
,
sc
);
/* offset 36 */
fprintf
(
file
,
"
\t
ld %s,8(%s)
\n
"
,
sc
,
sc
);
/* offset 40 */
fprintf
(
file
,
"
\t
mtctr %s
\n
"
,
r0
);
/* offset 44 */
fprintf
(
file
,
"
\t
bctr
\n
"
);
/* offset 48 */
}
else
if
(
TARGET_32BIT
)
{
fprintf
(
file
,
"
\t
mflr %s
\n
"
,
r0
);
/* offset 0 */
fprintf
(
file
,
"
\t
bl .LTRAMP1
\n
"
);
/* offset 4 */
...
...
@@ -3924,6 +3911,19 @@ rs6000_trampoline_template (file)
fprintf
(
file
,
"
\t
mtctr %s
\n
"
,
r0
);
/* offset 36 */
fprintf
(
file
,
"
\t
bctr
\n
"
);
/* offset 40 */
}
else
{
fprintf
(
file
,
"
\t
mflr %s
\n
"
,
r0
);
/* offset 0 */
fprintf
(
file
,
"
\t
bl .LTRAMP1
\n
"
);
/* offset 4 */
fprintf
(
file
,
"
\t
.long 0,0,0,0
\n
"
);
/* offset 8 */
fprintf
(
file
,
".LTRAMP1:
\n
"
);
fprintf
(
file
,
"
\t
mflr %s
\n
"
,
sc
);
/* offset 28 */
fprintf
(
file
,
"
\t
mtlr %s
\n
"
,
r0
);
/* offset 32 */
fprintf
(
file
,
"
\t
ld %s,0(%s)
\n
"
,
r0
,
sc
);
/* offset 36 */
fprintf
(
file
,
"
\t
ld %s,8(%s)
\n
"
,
sc
,
sc
);
/* offset 40 */
fprintf
(
file
,
"
\t
mtctr %s
\n
"
,
r0
);
/* offset 44 */
fprintf
(
file
,
"
\t
bctr
\n
"
);
/* offset 48 */
}
break
;
/* NT function pointers point to a two word area (real address, TOC)
...
...
@@ -3964,12 +3964,12 @@ rs6000_trampoline_size ()
abort
();
case
ABI_AIX
:
ret
=
(
TARGET_
64BIT
)
?
24
:
12
;
ret
=
(
TARGET_
32BIT
)
?
12
:
24
;
break
;
case
ABI_V4
:
case
ABI_AIX_NODESC
:
ret
=
(
TARGET_
64BIT
?
48
:
40
);
ret
=
(
TARGET_
32BIT
?
40
:
48
);
break
;
case
ABI_NT
:
...
...
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