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
3cfa4909
Commit
3cfa4909
authored
May 29, 1996
by
Michael Meissner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add code to print rs6000 specific info in .s file; make eabi.asm assemble on Solaris
From-SVN: r12123
parent
802a0058
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
78 additions
and
19 deletions
+78
-19
gcc/config/rs6000/eabi.asm
+19
-1
gcc/config/rs6000/rs6000.c
+49
-0
gcc/config/rs6000/rs6000.h
+2
-0
gcc/config/rs6000/sysv4.h
+2
-1
gcc/config/rs6000/win-nt.h
+6
-17
No files found.
gcc/config/rs6000/eabi.asm
View file @
3cfa4909
...
...
@@ -105,10 +105,18 @@
.
long
0
.
text
#
ifdef
_RELOCATABLE
.
Lptr
:
.
long
.
LCTOC1
-
.
Laddr
/*
PC
relative
pointer
to
.
got2
*/
#
endif
FUNC_START
(
__eabi
)
/*
Eliminate
-
mrelocatable
code
if
not
-
mrelocatable
,
so
that
this
file
can
be
assembled
with
other
assemblers
than
GAS
,
such
as
the
Solaris
PowerPC
assembler
.
*/
#
ifdef
_RELOCATABLE
mflr
0
bl
.
Laddr
/*
get
current
address
*/
.
Laddr
:
...
...
@@ -120,6 +128,13 @@ FUNC_START(__eabi)
subf
.
12
,
12
,
11
/*
calculate
difference
*/
mtlr
0
/*
restore
link
register
*/
lwzx
9
,
10
,
12
/*
done
flag
*/
#
else
/*
!
-
mrelocatable
*/
addis
11
,
0
,.
LCTOC1
@
ha
/*
load
address
of
.
LCTOC1
*/
addi
11
,
11
,.
LCTOC1
@
l
lwz
10
,.
Linit
(
11
)
/*
init
flag
*/
#
endif
/*
!
-
mrelocatable
*/
cmplwi
2
,
9
,
0
/*
init
flag
!
=
0
?
*/
bnelr
2
/*
return
now
,
if
we
'
ve
been
called
already
*/
stwx
1
,
10
,
12
/*
store
a
non
-
zero
value
in
the
done
flag
*/
...
...
@@ -145,9 +160,11 @@ FUNC_START(__eabi)
lwz
2
,.
Lsda2
(
11
)
/*
load
r2
with
_SDA2_BASE
address
*/
b
FUNC_NAME
(
__do_global_ctors
)
/*
do
any
C
++
global
constructors
(
which
returns
to
caller
)
*/
.
Lreloc
:
#
ifdef
_RELOCATABLE
/*
We
need
to
relocate
the
.
got2
pointers
.
Don
'
t
load
registers
2
or
13
*/
.
Lreloc
:
lwz
3
,.
Lgot2s
(
11
)
/*
GOT
pointers
start
*/
lwz
4
,.
Lgot2e
(
11
)
/*
GOT
pointers
end
*/
add
3
,
12
,
3
/*
adjust
pointers
*/
...
...
@@ -237,6 +254,7 @@ FUNC_START(__eabi)
addi
3
,
3
,
4
/*
bump
to
next
word
*/
cmpw
1
,
3
,
4
/*
more
pointers
to
adjust
?
*/
bc
4
,
6
,.
Lfloop
#
endif
/*
_RELOCATABLE
*/
/*
Done
adjusting
pointers
,
return
*/
...
...
gcc/config/rs6000/rs6000.c
View file @
3cfa4909
...
...
@@ -296,6 +296,55 @@ rs6000_override_options (default_cpu)
#endif
}
/* Do anything needed at the start of the asm file. */
void
rs6000_file_start
(
file
,
default_cpu
)
FILE
*
file
;
char
*
default_cpu
;
{
int
i
;
char
buffer
[
80
];
char
*
start
=
buffer
;
struct
rs6000_cpu_select
*
ptr
;
if
(
flag_verbose_asm
)
{
sprintf
(
buffer
,
"
\n
%s rs6000/powerpc options:"
,
ASM_COMMENT_START
);
rs6000_select
[
0
].
string
=
default_cpu
;
for
(
i
=
0
;
i
<
sizeof
(
rs6000_select
)
/
sizeof
(
rs6000_select
[
0
]);
i
++
)
{
ptr
=
&
rs6000_select
[
i
];
if
(
ptr
->
string
!=
(
char
*
)
0
&&
ptr
->
string
[
0
]
!=
'\0'
)
{
fprintf
(
file
,
"%s %s%s"
,
start
,
ptr
->
name
,
ptr
->
string
);
start
=
""
;
}
}
#ifdef USING_SVR4_H
switch
(
rs6000_sdata
)
{
case
SDATA_NONE
:
fprintf
(
file
,
"%s -msdata=none"
,
start
);
start
=
""
;
break
;
case
SDATA_DATA
:
fprintf
(
file
,
"%s -msdata=data"
,
start
);
start
=
""
;
break
;
case
SDATA_SYSV
:
fprintf
(
file
,
"%s -msdata=sysv"
,
start
);
start
=
""
;
break
;
case
SDATA_EABI
:
fprintf
(
file
,
"%s -msdata=eabi"
,
start
);
start
=
""
;
break
;
}
if
(
rs6000_sdata
&&
g_switch_value
)
{
fprintf
(
file
,
"%s -G %d"
,
start
,
g_switch_value
);
start
=
""
;
}
#endif
if
(
*
start
==
'\0'
)
fputs
(
"
\n
"
,
file
);
}
}
/* Create a CONST_DOUBLE from a string. */
struct
rtx_def
*
...
...
gcc/config/rs6000/rs6000.h
View file @
3cfa4909
...
...
@@ -2244,6 +2244,7 @@ extern int rs6000_trunc_used;
text_section (); \
if (profile_flag) \
fputs ("\t.extern .mcount\n", FILE); \
rs6000_file_start (FILE, TARGET_CPU_DEFAULT); \
}
/* Output at end of assembler file.
...
...
@@ -3012,6 +3013,7 @@ extern int flag_expensive_optimizations;
/* Declare functions in rs6000.c */
extern
void
output_options
();
extern
void
rs6000_override_options
();
extern
void
rs6000_file_start
();
extern
struct
rtx_def
*
rs6000_float_const
();
extern
struct
rtx_def
*
rs6000_immed_double_const
();
extern
int
direct_return
();
...
...
gcc/config/rs6000/sysv4.h
View file @
3cfa4909
...
...
@@ -691,6 +691,7 @@ do { \
#define ASM_FILE_START(FILE) \
do { \
output_file_directive ((FILE), main_input_filename); \
rs6000_file_start (FILE, TARGET_CPU_DEFAULT); \
} while (0)
...
...
@@ -919,7 +920,7 @@ do { \
#undef CPP_SYSV_SPEC
#define CPP_SYSV_SPEC \
"%{mrelocatable: -D_RELOCATABLE} \
"%{mrelocatable
*
: -D_RELOCATABLE} \
%{mcall-sysv: -D_CALL_SYSV} %{mcall-nt: -D_CALL_NT} \
%{mcall-aix: -D_CALL_AIX} %{mcall-aixdesc: -D_CALL_AIX -D_CALL_AIXDESC} \
%{!mcall-sysv: %{!mcall-aix: %{!mcall-aixdesc: %{!mcall-nt: %(cpp_sysv_default) }}}} \
...
...
gcc/config/rs6000/win-nt.h
View file @
3cfa4909
...
...
@@ -177,23 +177,12 @@ do { \
/* Stuff to force fit us into the Motorola PPC assembler */
#if 0
#undef ASM_FILE_START
#define ASM_FILE_START(FILE) \
{ \
output_file_directive (FILE, main_input_filename); \
fprintf (FILE, "\n#\tDirective section\n"); \
fprintf (FILE, "\t.section\t.drectve,\"iR\"\n"); \
fprintf (FILE, "\t.byte\t\"-defaultlib:LIBC\" \n"); \
fprintf (FILE, "\t.previous\n\n"); \
}
#endif
#undef ASM_FILE_START
#define ASM_FILE_START(FILE) \
do { \
output_file_directive ((FILE), main_input_filename); \
data_section (); \
#undef ASM_FILE_START \
#define ASM_FILE_START(FILE) \
do { \
output_file_directive ((FILE), main_input_filename); \
rs6000_file_start (FILE, TARGET_CPU_DEFAULT); \
data_section (); \
} while (0)
#undef ASM_FILE_END
...
...
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