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
ff381587
Commit
ff381587
authored
Dec 30, 1998
by
Michael Meissner
Committed by
Michael Meissner
Dec 30, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix calculation of fpmem_offset on little endian systems; Silence warnings when building explow
From-SVN: r24443
parent
c2a26505
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
40 deletions
+56
-40
gcc/ChangeLog
+10
-0
gcc/config/rs6000/rs6000.c
+40
-36
gcc/config/rs6000/rs6000.md
+6
-4
No files found.
gcc/ChangeLog
View file @
ff381587
Wed
Dec
30
22
:
24
:
00
1998
Michael
Meissner
<
meissner
@cygnus
.
com
>
*
rs6000
.
md
({
save
,
restore
}
_stack_function
)
:
Take
2
operands
to
avoid
warnings
in
compiling
explow
.
c
.
(
patch
from
Ken
Raeburn
,
raeburn
@cygnus
.
com
)
*
rs6000
.
c
(
rs6000_stack_info
)
:
Force
8
-
byte
alignment
of
fpmem_offset
.
Compute
total
size
after
that
,
and
then
rs6000_fpmem_offset
using
both
values
.
Mon
Dec
28
19
:
26
:
32
1998
Gerald
Pfeifer
<
pfeifer
@dbai
.
tuwien
.
ac
.
at
>
*
gcc
.
texi
(
Non
-
bugs
)
:
``
Empty
''
loops
will
be
optimized
away
in
...
...
gcc/config/rs6000/rs6000.c
View file @
ff381587
...
...
@@ -3496,40 +3496,6 @@ rs6000_stack_info ()
+
info_ptr
->
toc_size
+
info_ptr
->
main_size
,
8
);
total_raw_size
=
(
info_ptr
->
vars_size
+
info_ptr
->
parm_size
+
info_ptr
->
fpmem_size
+
info_ptr
->
save_size
+
info_ptr
->
varargs_size
+
info_ptr
->
fixed_size
);
info_ptr
->
total_size
=
RS6000_ALIGN
(
total_raw_size
,
ABI_STACK_BOUNDARY
/
BITS_PER_UNIT
);
/* Determine if we need to allocate any stack frame:
For AIX we need to push the stack if a frame pointer is needed (because
the stack might be dynamically adjusted), if we are debugging, if we
make calls, or if the sum of fp_save, gp_save, fpmem, and local variables
are more than the space needed to save all non-volatile registers:
32-bit: 18*8 + 19*4 = 220 or 64-bit: 18*8 + 19*8 = 296
For V.4 we don't have the stack cushion that AIX uses, but assume that
the debugger can handle stackless frames. */
if
(
info_ptr
->
calls_p
)
info_ptr
->
push_p
=
1
;
else
if
(
abi
==
ABI_V4
||
abi
==
ABI_NT
||
abi
==
ABI_SOLARIS
)
info_ptr
->
push_p
=
(
total_raw_size
>
info_ptr
->
fixed_size
||
(
abi
==
ABI_NT
?
info_ptr
->
lr_save_p
:
info_ptr
->
calls_p
));
else
info_ptr
->
push_p
=
(
frame_pointer_needed
||
write_symbols
!=
NO_DEBUG
||
((
total_raw_size
-
info_ptr
->
fixed_size
)
>
(
TARGET_32BIT
?
220
:
296
)));
/* Calculate the offsets */
switch
(
abi
)
{
...
...
@@ -3569,6 +3535,44 @@ rs6000_stack_info ()
break
;
}
if
(
info_ptr
->
fpmem_p
&&
(
info_ptr
->
main_save_offset
-
info_ptr
->
fpmem_size
)
%
8
)
info_ptr
->
fpmem_size
+=
reg_size
;
total_raw_size
=
(
info_ptr
->
vars_size
+
info_ptr
->
parm_size
+
info_ptr
->
fpmem_size
+
info_ptr
->
save_size
+
info_ptr
->
varargs_size
+
info_ptr
->
fixed_size
);
info_ptr
->
total_size
=
RS6000_ALIGN
(
total_raw_size
,
ABI_STACK_BOUNDARY
/
BITS_PER_UNIT
);
/* Determine if we need to allocate any stack frame:
For AIX we need to push the stack if a frame pointer is needed (because
the stack might be dynamically adjusted), if we are debugging, if we
make calls, or if the sum of fp_save, gp_save, fpmem, and local variables
are more than the space needed to save all non-volatile registers:
32-bit: 18*8 + 19*4 = 220 or 64-bit: 18*8 + 19*8 = 296
For V.4 we don't have the stack cushion that AIX uses, but assume that
the debugger can handle stackless frames. */
if
(
info_ptr
->
calls_p
)
info_ptr
->
push_p
=
1
;
else
if
(
abi
==
ABI_V4
||
abi
==
ABI_NT
||
abi
==
ABI_SOLARIS
)
info_ptr
->
push_p
=
(
total_raw_size
>
info_ptr
->
fixed_size
||
(
abi
==
ABI_NT
?
info_ptr
->
lr_save_p
:
info_ptr
->
calls_p
));
else
info_ptr
->
push_p
=
(
frame_pointer_needed
||
write_symbols
!=
NO_DEBUG
||
((
total_raw_size
-
info_ptr
->
fixed_size
)
>
(
TARGET_32BIT
?
220
:
296
)));
if
(
info_ptr
->
fpmem_p
)
{
info_ptr
->
fpmem_offset
=
info_ptr
->
main_save_offset
-
info_ptr
->
fpmem_size
;
...
...
@@ -3581,10 +3585,10 @@ rs6000_stack_info ()
info_ptr
->
fpmem_offset
=
0
;
/* Zero offsets if we're not saving those registers */
if
(
info_ptr
->
fp_size
==
0
)
if
(
!
info_ptr
->
fp_size
)
info_ptr
->
fp_save_offset
=
0
;
if
(
info_ptr
->
gp_size
==
0
)
if
(
!
info_ptr
->
gp_size
)
info_ptr
->
gp_save_offset
=
0
;
if
(
!
info_ptr
->
lr_save_p
)
...
...
gcc/config/rs6000/rs6000.md
View file @
ff381587
...
...
@@ -7226,14 +7226,16 @@
;; save area is a memory location.
(define_expand "save_stack_function"
[
(use (const_int 0))
]
[
(match_operand 0 "any_operand" "")
(match_operand 1 "any_operand" "")]
""
"")
"
DONE;
")
(define_expand "restore_stack_function"
[
(use (const_int 0))
]
[
(match_operand 0 "any_operand" "")
(match_operand 1 "any_operand" "")]
""
"")
"
DONE;
")
(define_expand "restore_stack_block"
[
(use (match_operand 0 "register_operand" ""))
...
...
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