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
5fd5ec31
Commit
5fd5ec31
authored
Oct 29, 2004
by
Stan Shebs
Committed by
Stan Shebs
Oct 29, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* config/rs6000/darwin-tramp.asm: Make more 64-bit-friendly.
From-SVN: r89861
parent
158414d6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
22 deletions
+46
-22
gcc/ChangeLog
+4
-0
gcc/config/rs6000/darwin-tramp.asm
+42
-22
No files found.
gcc/ChangeLog
View file @
5fd5ec31
2004
-
10
-
29
Stan
Shebs
<
shebs
@
apple
.
com
>
*
config
/
rs6000
/
darwin
-
tramp
.
asm
:
Make
more
64
-
bit
-
friendly
.
2004
-
10
-
29
Kazu
Hirata
<
kazu
@
cs
.
umass
.
edu
>
2004
-
10
-
29
Kazu
Hirata
<
kazu
@
cs
.
umass
.
edu
>
*
tree
-
phinodes
.
c
(
allocate_phi_node
):
New
.
*
tree
-
phinodes
.
c
(
allocate_phi_node
):
New
.
...
...
gcc/config/rs6000/darwin-tramp.asm
View file @
5fd5ec31
...
@@ -33,22 +33,46 @@
...
@@ -33,22 +33,46 @@
*
executable
file
might
be
covered
by
the
GNU
General
Public
License
.
*
executable
file
might
be
covered
by
the
GNU
General
Public
License
.
*/
*/
/*
Some
32
/
64
macros
,
donated
from
/
usr
/
include
/
architecture
/
ppc
.
*/
#
if
defined
(
__ppc64__
)
#
define
MODE_CHOICE
(
x
,
y
)
y
#
else
#
define
MODE_CHOICE
(
x
,
y
)
x
#
endif
#
define
cmpg
MODE_CHOICE
(
cmpw
,
cmpd
)
#
define
lg
MODE_CHOICE
(
lwz
,
ld
)
#
define
stg
MODE_CHOICE
(
stw
,
std
)
#
define
lgx
MODE_CHOICE
(
lwzx
,
ldx
)
#
define
stgx
MODE_CHOICE
(
stwx
,
stdx
)
#
define
lgu
MODE_CHOICE
(
lwzu
,
ldu
)
#
define
stgu
MODE_CHOICE
(
stwu
,
stdu
)
#
define
lgux
MODE_CHOICE
(
lwzux
,
ldux
)
#
define
stgux
MODE_CHOICE
(
stwux
,
stdux
)
#
define
lgwa
MODE_CHOICE
(
lwz
,
lwa
)
#
define
g_long
MODE_CHOICE
(
long
,
quad
)
/*
usage
is
".g_long"
*/
#
define
GPR_BYTES
MODE_CHOICE
(
4
,
8
)
/*
size
of
a
GPR
in
bytes
*/
#
define
LOG2_GPR_BYTES
MODE_CHOICE
(
2
,
3
)
/*
log2
(
GPR_BYTES
)
*/
/*
Set
up
trampolines
.
*/
/*
Set
up
trampolines
.
*/
.
text
.
text
.
align
2
.
align
LOG2_GPR_BYTES
Ltrampoline_initial
:
Ltrampoline_initial
:
mflr
r0
mflr
r0
bl
1
f
bl
1
f
Lfunc
=
.
-
Ltrampoline_initial
Lfunc
=
.
-
Ltrampoline_initial
.
long
0
/*
will
be
replaced
with
function
address
*/
.
g_
long
0
/*
will
be
replaced
with
function
address
*/
Lchain
=
.
-
Ltrampoline_initial
Lchain
=
.
-
Ltrampoline_initial
.
long
0
/*
will
be
replaced
with
static
chain
*/
.
g_
long
0
/*
will
be
replaced
with
static
chain
*/
1
:
mflr
r11
1
:
mflr
r11
l
wz
r12
,
0
(
r11
)
/*
function
address
*/
l
g
r12
,
0
(
r11
)
/*
function
address
*/
mtlr
r0
mtlr
r0
mtctr
r12
mtctr
r12
l
wz
r11
,
4
(
r11
)
/*
static
chain
*/
l
g
r11
,
GPR_BYTES
(
r11
)
/*
static
chain
*/
bctr
bctr
trampoline_size
=
.
-
Ltrampoline_initial
trampoline_size
=
.
-
Ltrampoline_initial
...
@@ -65,12 +89,12 @@ ___trampoline_setup:
...
@@ -65,12 +89,12 @@ ___trampoline_setup:
LCF0
:
LCF0
:
mflr
r11
mflr
r11
addis
r7
,
r11
,
ha16
(
LTRAMP
-
LCF0
)
addis
r7
,
r11
,
ha16
(
LTRAMP
-
LCF0
)
l
wz
r7
,
lo16
(
LTRAMP
-
LCF0
)(
r7
)
l
g
r7
,
lo16
(
LTRAMP
-
LCF0
)(
r7
)
subi
r7
,
r7
,
4
subi
r7
,
r7
,
GPR_BYTES
li
r8
,
trampoline_size
/*
verify
trampoline
big
enough
*/
li
r8
,
trampoline_size
/*
verify
trampoline
big
enough
*/
cmp
w
cr1
,
r8
,
r4
cmp
g
cr1
,
r8
,
r4
srwi
r4
,
r4
,
2
/*
#
words
to
move
*/
srwi
r4
,
r4
,
2
/*
#
words
to
move
(
insns
always
4
-
byte
)
*/
addi
r9
,
r3
,
-
4
/*
adjust
pointer
for
lwz
u
*/
addi
r9
,
r3
,
-
GPR_BYTES
/*
adjust
pointer
for
lg
u
*/
mtctr
r4
mtctr
r4
blt
cr1
,
Labort
blt
cr1
,
Labort
...
@@ -78,13 +102,13 @@ LCF0:
...
@@ -78,13 +102,13 @@ LCF0:
/*
Copy
the
instructions
to
the
stack
*/
/*
Copy
the
instructions
to
the
stack
*/
Lmove
:
Lmove
:
l
wzu
r10
,
4
(
r7
)
l
gu
r10
,
GPR_BYTES
(
r7
)
st
wu
r10
,
4
(
r9
)
st
gu
r10
,
GPR_BYTES
(
r9
)
bdnz
Lmove
bdnz
Lmove
/*
Store
correct
function
and
static
chain
*/
/*
Store
correct
function
and
static
chain
*/
st
w
r5
,
Lfunc
(
r3
)
st
g
r5
,
Lfunc
(
r3
)
st
w
r6
,
Lchain
(
r3
)
st
g
r6
,
Lchain
(
r3
)
/*
Now
flush
both
caches
*/
/*
Now
flush
both
caches
*/
mtctr
r4
mtctr
r4
...
@@ -113,23 +137,19 @@ L0$_abort:
...
@@ -113,23 +137,19 @@ L0$_abort:
mflr
r11
mflr
r11
addis
r11
,
r11
,
ha16
(
L_abort
$
lazy_ptr
-
L0
$
_abort
)
addis
r11
,
r11
,
ha16
(
L_abort
$
lazy_ptr
-
L0
$
_abort
)
mtlr
r0
mtlr
r0
l
wz
u
r12
,
lo16
(
L_abort
$
lazy_ptr
-
L0
$
_abort
)(
r11
)
l
g
u
r12
,
lo16
(
L_abort
$
lazy_ptr
-
L0
$
_abort
)(
r11
)
mtctr
r12
mtctr
r12
bctr
bctr
.
data
.
data
.
lazy_symbol_pointer
.
lazy_symbol_pointer
L_abort
$
lazy_ptr
:
L_abort
$
lazy_ptr
:
.
indirect_symbol
_abort
.
indirect_symbol
_abort
#
ifdef
__ppc64__
.
g_long
dyld_stub_binding_helper
.
quad
dyld_stub_binding_helper
#
else
.
long
dyld_stub_binding_helper
#
endif
#
else
#
else
bl
_abort
bl
_abort
#
endif
#
endif
.
data
.
data
.
align
2
.
align
LOG2_GPR_BYTES
LTRAMP
:
LTRAMP
:
.
long
Ltrampoline_initial
.
g_
long
Ltrampoline_initial
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