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
d181c154
Commit
d181c154
authored
Sep 15, 1993
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(aggregate_value_p): Allow type node as argument.
From-SVN: r5328
parent
9a7f678c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
+17
-9
gcc/function.c
+17
-9
No files found.
gcc/function.c
View file @
d181c154
...
...
@@ -2768,8 +2768,10 @@ get_first_block_beg ()
return
NULL_RTX
;
}
/* Return 1 if EXP returns an aggregate value, for which an address
must be passed to the function or returned by the function. */
/* Return 1 if EXP is an aggregate type (or a value with aggregate type).
This means a type for which function calls must pass an address to the
function or get an address back from the function.
EXP may be a type node or an expression (whose type is tested). */
int
aggregate_value_p
(
exp
)
...
...
@@ -2777,19 +2779,25 @@ aggregate_value_p (exp)
{
int
i
,
regno
,
nregs
;
rtx
reg
;
if
(
RETURN_IN_MEMORY
(
TREE_TYPE
(
exp
)))
tree
type
;
if
(
TREE_CODE_CLASS
(
TREE_CODE
(
exp
))
==
't'
)
type
=
exp
;
else
type
=
TREE_TYPE
(
exp
);
if
(
RETURN_IN_MEMORY
(
type
))
return
1
;
if
(
flag_pcc_struct_return
&&
(
TREE_CODE
(
TREE_TYPE
(
exp
)
)
==
RECORD_TYPE
||
TREE_CODE
(
TREE_TYPE
(
exp
)
)
==
UNION_TYPE
||
TREE_CODE
(
TREE_TYPE
(
exp
)
)
==
QUAL_UNION_TYPE
||
TREE_CODE
(
TREE_TYPE
(
exp
)
)
==
ARRAY_TYPE
))
&&
(
TREE_CODE
(
type
)
==
RECORD_TYPE
||
TREE_CODE
(
type
)
==
UNION_TYPE
||
TREE_CODE
(
type
)
==
QUAL_UNION_TYPE
||
TREE_CODE
(
type
)
==
ARRAY_TYPE
))
return
1
;
/* Make sure we have suitable call-clobbered regs to return
the value in; if not, we must return it in memory. */
reg
=
hard_function_value
(
TREE_TYPE
(
exp
)
,
0
);
reg
=
hard_function_value
(
type
,
0
);
regno
=
REGNO
(
reg
);
nregs
=
HARD_REGNO_NREGS
(
regno
,
TYPE_MODE
(
TREE_TYPE
(
exp
)
));
nregs
=
HARD_REGNO_NREGS
(
regno
,
TYPE_MODE
(
type
));
for
(
i
=
0
;
i
<
nregs
;
i
++
)
if
(
!
call_used_regs
[
regno
+
i
])
return
1
;
...
...
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