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
2d8d0db8
Commit
2d8d0db8
authored
Feb 27, 1994
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(expand_inline_function): Allow extra arguments and force their
evaluation for side-effects. From-SVN: r6661
parent
d391688a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
14 deletions
+24
-14
gcc/integrate.c
+24
-14
No files found.
gcc/integrate.c
View file @
2d8d0db8
/* Procedure integration for GNU CC.
/* Procedure integration for GNU CC.
Copyright (C) 1988, 1991, 1993 Free Software Foundation, Inc.
Copyright (C) 1988, 1991, 1993
, 1994
Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
This file is part of GNU CC.
...
@@ -1172,29 +1172,39 @@ expand_inline_function (fndecl, parms, target, ignore, type, structure_value_add
...
@@ -1172,29 +1172,39 @@ expand_inline_function (fndecl, parms, target, ignore, type, structure_value_add
nargs
=
list_length
(
DECL_ARGUMENTS
(
fndecl
));
nargs
=
list_length
(
DECL_ARGUMENTS
(
fndecl
));
/* We expect PARMS to have the right length; don't crash if not. */
/* Check that the parms type match and that sufficient arguments were
if
(
list_length
(
parms
)
!=
nargs
)
passed. Since the appropriate conversions or default promotions have
return
(
rtx
)
(
HOST_WIDE_INT
)
-
1
;
already been applied, the machine modes should match exactly. */
/* Also check that the parms type match. Since the appropriate
conversions or default promotions have already been applied,
the machine modes should match exactly. */
for
(
formal
=
DECL_ARGUMENTS
(
fndecl
),
for
(
formal
=
DECL_ARGUMENTS
(
fndecl
),
actual
=
parms
;
actual
=
parms
;
formal
;
formal
;
formal
=
TREE_CHAIN
(
formal
),
formal
=
TREE_CHAIN
(
formal
),
actual
=
TREE_CHAIN
(
actual
))
actual
=
TREE_CHAIN
(
actual
))
{
{
tree
arg
=
TREE_VALUE
(
actual
);
tree
arg
;
enum
machine_mode
mode
=
TYPE_MODE
(
DECL_ARG_TYPE
(
formal
));
enum
machine_mode
mode
;
if
(
mode
!=
TYPE_MODE
(
TREE_TYPE
(
arg
)))
if
(
actual
==
0
)
return
(
rtx
)
(
HOST_WIDE_INT
)
-
1
;
return
(
rtx
)
(
HOST_WIDE_INT
)
-
1
;
/* If they are block mode, the types should match exactly.
They don't match exactly if TREE_TYPE (FORMAL) == ERROR_MARK_NODE,
arg
=
TREE_VALUE
(
actual
);
which could happen if the parameter has incomplete type. */
mode
=
TYPE_MODE
(
DECL_ARG_TYPE
(
formal
));
if
(
mode
==
BLKmode
&&
TREE_TYPE
(
arg
)
!=
TREE_TYPE
(
formal
))
if
(
mode
!=
TYPE_MODE
(
TREE_TYPE
(
arg
))
/* If they are block mode, the types should match exactly.
They don't match exactly if TREE_TYPE (FORMAL) == ERROR_MARK_NODE,
which could happen if the parameter has incomplete type. */
||
(
mode
==
BLKmode
&&
TREE_TYPE
(
arg
)
!=
TREE_TYPE
(
formal
)))
return
(
rtx
)
(
HOST_WIDE_INT
)
-
1
;
return
(
rtx
)
(
HOST_WIDE_INT
)
-
1
;
}
}
/* Extra arguments are valid, but will be ignored below, so we must
evaluate them here for side-effects. */
for
(;
actual
;
actual
=
TREE_CHAIN
(
actual
))
expand_expr
(
TREE_VALUE
(
actual
),
const0_rtx
,
TYPE_MODE
(
TREE_TYPE
(
TREE_VALUE
(
actual
))),
0
);
/* Make a binding contour to keep inline cleanups called at
/* Make a binding contour to keep inline cleanups called at
outer function-scope level from looking like they are shadowing
outer function-scope level from looking like they are shadowing
parameter declarations. */
parameter declarations. */
...
...
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