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
0780f386
Commit
0780f386
authored
Jan 11, 1996
by
Michael Meissner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
insure eabi destructors get called
From-SVN: r10962
parent
ffc1e7b2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
5 deletions
+27
-5
gcc/config/rs6000/eabi-ctors.c
+12
-2
gcc/config/rs6000/eabi.asm
+13
-1
gcc/config/rs6000/rs6000.md
+2
-2
No files found.
gcc/config/rs6000/eabi-ctors.c
View file @
0780f386
...
@@ -34,6 +34,11 @@ extern func_ptr __CTOR_END__ [];
...
@@ -34,6 +34,11 @@ extern func_ptr __CTOR_END__ [];
extern
func_ptr
__DTOR_LIST__
[];
extern
func_ptr
__DTOR_LIST__
[];
extern
func_ptr
__DTOR_END__
[];
extern
func_ptr
__DTOR_END__
[];
extern
void
__do_global_ctors
(
void
);
extern
void
__do_global_dtors
(
void
);
void
(
*
__atexit
)(
func_ptr
);
/* Call all global constructors */
/* Call all global constructors */
void
void
__do_global_ctors
(
void
)
__do_global_ctors
(
void
)
...
@@ -41,8 +46,12 @@ __do_global_ctors (void)
...
@@ -41,8 +46,12 @@ __do_global_ctors (void)
func_ptr
*
ptr
=
&
__CTOR_LIST__
[
0
];
func_ptr
*
ptr
=
&
__CTOR_LIST__
[
0
];
func_ptr
*
end
=
&
__CTOR_END__
[
0
];
func_ptr
*
end
=
&
__CTOR_END__
[
0
];
if
(
__atexit
)
__atexit
(
__do_global_dtors
);
for
(
;
ptr
!=
end
;
ptr
++
)
for
(
;
ptr
!=
end
;
ptr
++
)
(
*
ptr
)();
if
(
*
ptr
)
(
*
ptr
)();
}
}
/* Call all global destructors */
/* Call all global destructors */
...
@@ -53,6 +62,7 @@ __do_global_dtors (void)
...
@@ -53,6 +62,7 @@ __do_global_dtors (void)
func_ptr
*
end
=
&
__DTOR_END__
[
0
];
func_ptr
*
end
=
&
__DTOR_END__
[
0
];
for
(
;
ptr
!=
end
;
ptr
++
)
for
(
;
ptr
!=
end
;
ptr
++
)
(
*
ptr
)();
if
(
*
ptr
)
(
*
ptr
)();
}
}
gcc/config/rs6000/eabi.asm
View file @
0780f386
...
@@ -80,6 +80,13 @@
...
@@ -80,6 +80,13 @@
.
Ldtore
=
.
-
.
LCTOC1
.
Ldtore
=
.
-
.
LCTOC1
.
long
__DTOR_END__
/*
end
of
.
dtor
section
*/
.
long
__DTOR_END__
/*
end
of
.
dtor
section
*/
.
Linit
=
.
-
.
LCTOC1
.
long
.
Linit_p
/*
address
of
variable
to
say
we
'
ve
been
called
*/
.
data
.
Linit_p
:
.
long
0
.
text
.
text
.
Lptr
:
.
Lptr
:
.
long
.
LCTOC1
-
.
Laddr
/*
PC
relative
pointer
to
.
got2
*/
.
long
.
LCTOC1
-
.
Laddr
/*
PC
relative
pointer
to
.
got2
*/
...
@@ -92,9 +99,14 @@ FUNC_START(__eabi)
...
@@ -92,9 +99,14 @@ FUNC_START(__eabi)
lwz
11
,(.
Lptr
-
.
Laddr
)(
12
)
/*
linker
generated
address
of
.
LCTOC1
*/
lwz
11
,(.
Lptr
-
.
Laddr
)(
12
)
/*
linker
generated
address
of
.
LCTOC1
*/
add
11
,
11
,
12
/*
correct
to
real
pointer
*/
add
11
,
11
,
12
/*
correct
to
real
pointer
*/
lwz
12
,.
Ltable
(
11
)
/*
get
linker
'
s
idea
of
where
.
Laddr
is
*/
lwz
12
,.
Ltable
(
11
)
/*
get
linker
'
s
idea
of
where
.
Laddr
is
*/
lwz
10
,.
Linit
(
11
)
/*
address
of
init
flag
*/
subf
.
12
,
12
,
11
/*
calculate
difference
*/
subf
.
12
,
12
,
11
/*
calculate
difference
*/
mtlr
0
/*
restore
link
register
*/
mtlr
0
/*
restore
link
register
*/
bc
4
,
2
,.
Lreloc
/*
skip
if
we
need
to
relocate
*/
lwzx
9
,
10
,
12
/*
done
flag
*/
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
*/
bne
0
,.
Lreloc
/*
skip
if
we
need
to
relocate
*/
/*
Only
load
up
register
2
if
there
is
a
.
got
section
*/
/*
Only
load
up
register
2
if
there
is
a
.
got
section
*/
...
...
gcc/config/rs6000/rs6000.md
View file @
0780f386
...
@@ -2917,7 +2917,7 @@
...
@@ -2917,7 +2917,7 @@
(match_operand:SF 2 "gpc_reg_operand" "f")))]
(match_operand:SF 2 "gpc_reg_operand" "f")))]
"! TARGET_POWERPC && TARGET_HARD_FLOAT"
"! TARGET_POWERPC && TARGET_HARD_FLOAT"
"{fm|fmul} %0,%1,%2"
"{fm|fmul} %0,%1,%2"
[
(set_attr "type" "
fp
")
]
)
[
(set_attr "type" "
dmul
")
]
)
(define_expand "divsf3"
(define_expand "divsf3"
[
(set (match_operand:SF 0 "gpc_reg_operand" "")
[
(set (match_operand:SF 0 "gpc_reg_operand" "")
...
@@ -2940,7 +2940,7 @@
...
@@ -2940,7 +2940,7 @@
(match_operand:SF 2 "gpc_reg_operand" "f")))]
(match_operand:SF 2 "gpc_reg_operand" "f")))]
"! TARGET_POWERPC && TARGET_HARD_FLOAT"
"! TARGET_POWERPC && TARGET_HARD_FLOAT"
"{fd|fdiv} %0,%1,%2"
"{fd|fdiv} %0,%1,%2"
[
(set_attr "type" "
s
div")
]
)
[
(set_attr "type" "
d
div")
]
)
(define_insn ""
(define_insn ""
[
(set (match_operand:SF 0 "gpc_reg_operand" "=f")
[
(set (match_operand:SF 0 "gpc_reg_operand" "=f")
...
...
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