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
53c428d0
Commit
53c428d0
authored
21 years ago
by
Paul Brook
Committed by
Paul Brook
21 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* function.c (assign_parms): Don't count pretend args for alignment.
From-SVN: r78563
parent
f4bdbead
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
6 deletions
+24
-6
gcc/ChangeLog
+4
-0
gcc/function.c
+20
-6
No files found.
gcc/ChangeLog
View file @
53c428d0
2004-02-27 Paul Brook <paul@codesourcery.com>
* function.c (assign_parms): Don't count pretend args for alignment.
2004-02-27 Richard Henderson <rth@redhat.com>
* passes.c: New file.
...
...
This diff is collapsed.
Click to expand it.
gcc/function.c
View file @
53c428d0
...
...
@@ -4285,6 +4285,7 @@ assign_parms (tree fndecl)
/* Total space needed so far for args on the stack,
given as a constant and a tree-expression. */
struct
args_size
stack_args_size
;
HOST_WIDE_INT
extra_pretend_bytes
=
0
;
tree
fntype
=
TREE_TYPE
(
fndecl
);
tree
fnargs
=
DECL_ARGUMENTS
(
fndecl
),
orig_fnargs
;
/* This is used for the arg pointer when referring to stack args. */
...
...
@@ -4569,15 +4570,19 @@ assign_parms (tree fndecl)
bits. We must preserve this invariant by rounding
CURRENT_FUNCTION_PRETEND_ARGS_SIZE up to a stack
boundary. */
/* We assume at most one partial arg, and it must be the first
argument on the stack. */
if
(
extra_pretend_bytes
||
current_function_pretend_args_size
)
abort
();
pretend_bytes
=
partial
*
UNITS_PER_WORD
;
current_function_pretend_args_size
=
CEIL_ROUND
(
pretend_bytes
,
STACK_BYTES
);
/* If PRETEND_BYTES != CURRENT_FUNCTION_PRETEND_ARGS_SIZE,
insert the padding before the start of the first pretend
argument. */
stack_args_size
.
constant
=
(
current_function_pretend_args_size
-
pretend_bytes
);
/* We want to align relative to the actual stack pointer, so
don't include this in the stack size until later. */
extra_pretend_bytes
=
current_function_pretend_args_size
;
}
}
#endif
...
...
@@ -4586,6 +4591,13 @@ assign_parms (tree fndecl)
locate_and_pad_parm
(
promoted_mode
,
passed_type
,
in_regs
,
entry_parm
?
partial
:
0
,
fndecl
,
&
stack_args_size
,
&
locate
);
/* Adjust offsets to include pretend args, unless this is the
split arg. */
if
(
pretend_bytes
==
0
)
{
locate
.
slot_offset
.
constant
+=
extra_pretend_bytes
;
locate
.
offset
.
constant
+=
extra_pretend_bytes
;
}
{
rtx
offset_rtx
;
...
...
@@ -4661,7 +4673,7 @@ assign_parms (tree fndecl)
#endif
)
{
stack_args_size
.
constant
+=
pretend_bytes
+
locate
.
size
.
constant
;
stack_args_size
.
constant
+=
locate
.
size
.
constant
;
if
(
locate
.
size
.
var
)
ADD_PARM_SIZE
(
stack_args_size
,
locate
.
size
.
var
);
}
...
...
@@ -5273,6 +5285,8 @@ assign_parms (tree fndecl)
last_parm_insn
=
get_last_insn
();
/* We have aligned all the args, so add space for the pretend args. */
stack_args_size
.
constant
+=
extra_pretend_bytes
;
current_function_args_size
=
stack_args_size
.
constant
;
/* Adjust function incoming argument size for alignment and
...
...
This diff is collapsed.
Click to expand it.
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