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
4e7c9a22
Commit
4e7c9a22
authored
Feb 03, 1993
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(emit_library_call, emit_library_call_value):
Handle STACK_BOUNDARY when using push insns. From-SVN: r3420
parent
f79322f0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
0 deletions
+48
-0
gcc/expr.c
+48
-0
No files found.
gcc/expr.c
View file @
4e7c9a22
...
...
@@ -2074,7 +2074,10 @@ emit_library_call (va_alist)
va_dcl
{
va_list
p
;
/* Total size in bytes of all the stack-parms scanned so far. */
struct
args_size
args_size
;
/* Size of arguments before any adjustments (such as rounding). */
struct
args_size
original_args_size
;
register
int
argnum
;
enum
machine_mode
outmode
;
int
nargs
;
...
...
@@ -2196,6 +2199,7 @@ emit_library_call (va_alist)
functions, write one out. */
assemble_external_libcall
(
fun
);
original_args_size
=
args_size
;
#ifdef STACK_BOUNDARY
args_size
.
constant
=
(((
args_size
.
constant
+
(
STACK_BYTES
-
1
))
/
STACK_BYTES
)
*
STACK_BYTES
);
...
...
@@ -2220,6 +2224,16 @@ emit_library_call (va_alist)
#endif
#ifdef PUSH_ARGS_REVERSED
#ifdef STACK_BOUNDARY
/* If we push args individually in reverse order, perform stack alignment
before the first push (the last arg). */
if
(
argblock
==
0
)
anti_adjust_stack
(
GEN_INT
(
args_size
.
constant
-
original_args_size
.
constant
));
#endif
#endif
#ifdef PUSH_ARGS_REVERSED
inc
=
-
1
;
argnum
=
nargs
-
1
;
#else
...
...
@@ -2242,6 +2256,16 @@ emit_library_call (va_alist)
NO_DEFER_POP
;
}
#ifndef PUSH_ARGS_REVERSED
#ifdef STACK_BOUNDARY
/* If we pushed args in forward order, perform stack alignment
after pushing the last arg. */
if
(
argblock
==
0
)
anti_adjust_stack
(
GEN_INT
(
args_size
.
constant
-
original_args_size
.
constant
));
#endif
#endif
#ifdef PUSH_ARGS_REVERSED
argnum
=
nargs
-
1
;
#else
...
...
@@ -2301,7 +2325,10 @@ emit_library_call_value (va_alist)
va_dcl
{
va_list
p
;
/* Total size in bytes of all the stack-parms scanned so far. */
struct
args_size
args_size
;
/* Size of arguments before any adjustments (such as rounding). */
struct
args_size
original_args_size
;
register
int
argnum
;
enum
machine_mode
outmode
;
int
nargs
;
...
...
@@ -2438,6 +2465,7 @@ emit_library_call_value (va_alist)
functions, write one out. */
assemble_external_libcall
(
fun
);
original_args_size
=
args_size
;
#ifdef STACK_BOUNDARY
args_size
.
constant
=
(((
args_size
.
constant
+
(
STACK_BYTES
-
1
))
/
STACK_BYTES
)
*
STACK_BYTES
);
...
...
@@ -2462,6 +2490,16 @@ emit_library_call_value (va_alist)
#endif
#ifdef PUSH_ARGS_REVERSED
#ifdef STACK_BOUNDARY
/* If we push args individually in reverse order, perform stack alignment
before the first push (the last arg). */
if
(
argblock
==
0
)
anti_adjust_stack
(
GEN_INT
(
args_size
.
constant
-
original_args_size
.
constant
));
#endif
#endif
#ifdef PUSH_ARGS_REVERSED
inc
=
-
1
;
argnum
=
nargs
-
1
;
#else
...
...
@@ -2484,6 +2522,16 @@ emit_library_call_value (va_alist)
NO_DEFER_POP
;
}
#ifndef PUSH_ARGS_REVERSED
#ifdef STACK_BOUNDARY
/* If we pushed args in forward order, perform stack alignment
after pushing the last arg. */
if
(
argblock
==
0
)
anti_adjust_stack
(
GEN_INT
(
args_size
.
constant
-
original_args_size
.
constant
));
#endif
#endif
#ifdef PUSH_ARGS_REVERSED
argnum
=
nargs
-
1
;
#else
...
...
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