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
937868a2
Commit
937868a2
authored
Dec 12, 1992
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(alpha_builtin_savregs): Correctly compute ARGSIZE and NREGS.
From-SVN: r2867
parent
aca49971
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
13 deletions
+8
-13
gcc/config/alpha/alpha.c
+8
-13
No files found.
gcc/config/alpha/alpha.c
View file @
937868a2
...
@@ -1013,7 +1013,7 @@ print_operand (file, x, code)
...
@@ -1013,7 +1013,7 @@ print_operand (file, x, code)
}
}
/* Do what is necessary for `va_start'. The argument is ignored;
/* Do what is necessary for `va_start'. The argument is ignored;
We look at the current function to determine if stdarg
s
or varargs
We look at the current function to determine if stdarg or varargs
is used and fill in an initial va_list. A pointer to this constructor
is used and fill in an initial va_list. A pointer to this constructor
is returned. */
is returned. */
...
@@ -1023,7 +1023,7 @@ alpha_builtin_saveregs (arglist)
...
@@ -1023,7 +1023,7 @@ alpha_builtin_saveregs (arglist)
{
{
rtx
block
,
addr
,
argsize
;
rtx
block
,
addr
,
argsize
;
tree
fntype
=
TREE_TYPE
(
current_function_decl
);
tree
fntype
=
TREE_TYPE
(
current_function_decl
);
int
stdarg
s
=
(
TYPE_ARG_TYPES
(
fntype
)
!=
0
int
stdarg
=
(
TYPE_ARG_TYPES
(
fntype
)
!=
0
&&
(
TREE_VALUE
(
tree_last
(
TYPE_ARG_TYPES
(
fntype
)))
&&
(
TREE_VALUE
(
tree_last
(
TYPE_ARG_TYPES
(
fntype
)))
!=
void_type_node
));
!=
void_type_node
));
int
nregs
=
current_function_args_info
;
int
nregs
=
current_function_args_info
;
...
@@ -1034,27 +1034,22 @@ alpha_builtin_saveregs (arglist)
...
@@ -1034,27 +1034,22 @@ alpha_builtin_saveregs (arglist)
if
(
GET_CODE
(
current_function_arg_offset_rtx
)
!=
CONST_INT
)
if
(
GET_CODE
(
current_function_arg_offset_rtx
)
!=
CONST_INT
)
{
{
argsize
=
plus_constant
(
current_function_arg_offset_rtx
,
argsize
=
plus_constant
(
current_function_arg_offset_rtx
,
((
6
-
stdargs
)
*
UNITS_PER_WORD
(
6
*
UNITS_PER_WORD
+
UNITS_PER_WORD
-
1
));
+
UNITS_PER_WORD
-
1
));
argsize
=
expand_shift
(
RSHIFT_EXPR
,
Pmode
,
argsize
,
argsize
=
expand_shift
(
RSHIFT_EXPR
,
Pmode
,
argsize
,
build_int_2
(
3
,
0
),
argsize
,
0
);
build_int_2
(
3
,
0
),
argsize
,
0
);
}
}
else
else
{
{
/* If we are using memory, deduct the stdarg adjustment from it,
/* Compute the number of args in memory and number of arguments already
otherwise from the number of registers. Then compute the current
processed. Then adjust the number of registers if this is stdarg. */
argument number. */
int
memargs
=
((
INTVAL
(
current_function_arg_offset_rtx
)
int
memargs
=
((
INTVAL
(
current_function_arg_offset_rtx
)
+
UNITS_PER_WORD
-
1
)
+
UNITS_PER_WORD
-
1
)
/
UNITS_PER_WORD
);
/
UNITS_PER_WORD
);
if
(
memargs
)
memargs
-=
stdargs
;
else
nregs
-=
stdargs
;
argsize
=
GEN_INT
(
MIN
(
nregs
,
6
)
+
memargs
);
argsize
=
GEN_INT
(
MIN
(
nregs
,
6
)
+
memargs
);
if
(
nregs
<=
6
)
nregs
-=
stdarg
;
}
}
/* Allocate the va_list constructor */
/* Allocate the va_list constructor */
...
...
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