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
Hide 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)
...
@@ -2900,15 +2900,15 @@ output_prolog (file, size)
char
*
store_reg
;
char
*
store_reg
;
char
*
load_reg
;
char
*
load_reg
;
if
(
TARGET_
64
BIT
)
if
(
TARGET_
32
BIT
)
{
{
store_reg
=
"
\t
std %s,%d(%s)
"
;
store_reg
=
"
\t
{st|stw} %s,%d(%s)
\n
"
;
load_reg
=
"
\t
lld %s,%d(%s)
"
;
load_reg
=
"
\t
{l|lwz} %s,%d(%s)
\n
"
;
}
}
else
else
{
{
store_reg
=
"
\t
{st|stw}
%s,%d(%s)
\n
"
;
store_reg
=
"
\t
std
%s,%d(%s)
\n
"
;
load_reg
=
"
\t
{l|lwz}
%s,%d(%s)
\n
"
;
load_reg
=
"
\t
lld
%s,%d(%s)
\n
"
;
}
}
if
(
TARGET_DEBUG_STACK
)
if
(
TARGET_DEBUG_STACK
)
...
@@ -3009,7 +3009,7 @@ output_prolog (file, size)
...
@@ -3009,7 +3009,7 @@ output_prolog (file, size)
{
{
if
(
info
->
total_size
<
32767
)
if
(
info
->
total_size
<
32767
)
asm_fprintf
(
file
,
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
]);
reg_names
[
1
],
-
info
->
total_size
,
reg_names
[
1
]);
else
else
{
{
...
@@ -3018,7 +3018,7 @@ output_prolog (file, size)
...
@@ -3018,7 +3018,7 @@ output_prolog (file, size)
reg_names
[
0
],
(
neg_size
>>
16
)
&
0xffff
,
reg_names
[
0
],
(
neg_size
>>
16
)
&
0xffff
,
reg_names
[
0
],
reg_names
[
0
],
neg_size
&
0xffff
);
reg_names
[
0
],
reg_names
[
0
],
neg_size
&
0xffff
);
asm_fprintf
(
file
,
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
]);
reg_names
[
1
],
reg_names
[
1
],
reg_names
[
0
]);
}
}
}
}
...
@@ -3093,7 +3093,7 @@ output_prolog (file, size)
...
@@ -3093,7 +3093,7 @@ output_prolog (file, size)
ASM_OUTPUT_INTERNAL_LABEL
(
file
,
"LCF"
,
rs6000_pic_labelno
);
ASM_OUTPUT_INTERNAL_LABEL
(
file
,
"LCF"
,
rs6000_pic_labelno
);
fprintf
(
file
,
"
\t
mflr %s
\n
"
,
reg_names
[
30
]);
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
]);
fprintf
(
file
,
" %s,("
,
reg_names
[
0
]);
ASM_GENERATE_INTERNAL_LABEL
(
buf
,
"LCL"
,
rs6000_pic_labelno
);
ASM_GENERATE_INTERNAL_LABEL
(
buf
,
"LCL"
,
rs6000_pic_labelno
);
assemble_name
(
file
,
buf
);
assemble_name
(
file
,
buf
);
...
@@ -3112,7 +3112,7 @@ output_prolog (file, size)
...
@@ -3112,7 +3112,7 @@ output_prolog (file, size)
{
{
case
ABI_V4
:
case
ABI_V4
:
case
ABI_AIX_NODESC
:
case
ABI_AIX_NODESC
:
if
(
!
TARGET_64
BIT
)
if
(
TARGET_32
BIT
)
{
{
ASM_GENERATE_INTERNAL_LABEL
(
buf
,
"LCTOC"
,
1
);
ASM_GENERATE_INTERNAL_LABEL
(
buf
,
"LCTOC"
,
1
);
asm_fprintf
(
file
,
"
\t
{cau|addis} %s,%s,"
,
reg_names
[
30
],
reg_names
[
0
]);
asm_fprintf
(
file
,
"
\t
{cau|addis} %s,%s,"
,
reg_names
[
30
],
reg_names
[
0
]);
...
@@ -3161,7 +3161,7 @@ output_epilog (file, size)
...
@@ -3161,7 +3161,7 @@ output_epilog (file, size)
int
size
;
int
size
;
{
{
rs6000_stack_t
*
info
=
rs6000_stack_info
();
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
();
rtx
insn
=
get_last_insn
();
int
i
;
int
i
;
...
@@ -3206,7 +3206,7 @@ output_epilog (file, size)
...
@@ -3206,7 +3206,7 @@ output_epilog (file, size)
{
{
int
regno
=
info
->
first_gp_reg_save
;
int
regno
=
info
->
first_gp_reg_save
;
int
loc
=
info
->
gp_save_offset
;
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
)
for
(
;
regno
<
32
;
regno
++
,
loc
+=
reg_size
)
asm_fprintf
(
file
,
load_reg
,
reg_names
[
regno
],
loc
,
reg_names
[
1
]);
asm_fprintf
(
file
,
load_reg
,
reg_names
[
regno
],
loc
,
reg_names
[
1
]);
...
@@ -3887,7 +3887,7 @@ rs6000_trampoline_template (file)
...
@@ -3887,7 +3887,7 @@ rs6000_trampoline_template (file)
the address of the function, the second word is the TOC pointer (r2),
the address of the function, the second word is the TOC pointer (r2),
and the third word is the static chain value. */
and the third word is the static chain value. */
case
ABI_AIX
:
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
;
break
;
...
@@ -3898,20 +3898,7 @@ rs6000_trampoline_template (file)
...
@@ -3898,20 +3898,7 @@ rs6000_trampoline_template (file)
if
(
STATIC_CHAIN_REGNUM
==
0
||
!
TARGET_NEW_MNEMONICS
)
if
(
STATIC_CHAIN_REGNUM
==
0
||
!
TARGET_NEW_MNEMONICS
)
abort
();
abort
();
if
(
TARGET_64BIT
)
if
(
TARGET_32BIT
)
{
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
{
{
fprintf
(
file
,
"
\t
mflr %s
\n
"
,
r0
);
/* offset 0 */
fprintf
(
file
,
"
\t
mflr %s
\n
"
,
r0
);
/* offset 0 */
fprintf
(
file
,
"
\t
bl .LTRAMP1
\n
"
);
/* offset 4 */
fprintf
(
file
,
"
\t
bl .LTRAMP1
\n
"
);
/* offset 4 */
...
@@ -3924,6 +3911,19 @@ rs6000_trampoline_template (file)
...
@@ -3924,6 +3911,19 @@ rs6000_trampoline_template (file)
fprintf
(
file
,
"
\t
mtctr %s
\n
"
,
r0
);
/* offset 36 */
fprintf
(
file
,
"
\t
mtctr %s
\n
"
,
r0
);
/* offset 36 */
fprintf
(
file
,
"
\t
bctr
\n
"
);
/* offset 40 */
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
;
break
;
/* NT function pointers point to a two word area (real address, TOC)
/* NT function pointers point to a two word area (real address, TOC)
...
@@ -3964,12 +3964,12 @@ rs6000_trampoline_size ()
...
@@ -3964,12 +3964,12 @@ rs6000_trampoline_size ()
abort
();
abort
();
case
ABI_AIX
:
case
ABI_AIX
:
ret
=
(
TARGET_
64BIT
)
?
24
:
12
;
ret
=
(
TARGET_
32BIT
)
?
12
:
24
;
break
;
break
;
case
ABI_V4
:
case
ABI_V4
:
case
ABI_AIX_NODESC
:
case
ABI_AIX_NODESC
:
ret
=
(
TARGET_
64BIT
?
48
:
40
);
ret
=
(
TARGET_
32BIT
?
40
:
48
);
break
;
break
;
case
ABI_NT
:
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