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
3a2ea258
Commit
3a2ea258
authored
Oct 19, 1999
by
Richard Earnshaw
Committed by
Nick Clifton
Oct 19, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix APCS violation.
From-SVN: r30087
parent
db025289
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
7 deletions
+24
-7
gcc/ChangeLog
+5
-0
gcc/config/arm/arm.c
+19
-7
No files found.
gcc/ChangeLog
View file @
3a2ea258
Tue
Oct
19
15
:
26
:
11
1999
Richard
Earnshaw
(
rearnsha
@arm
.
com
)
*
arm
.
c
(
arm_return_in_memory
)
:
APCS
rules
state
that
the
elements
of
a
structure
returned
in
a
register
must
be
'
integer
-
like
'
.
1999
-
10
-
19
Bruce
Korb
<
autogen
@linuxbox
.
com
>
*
fixinc
/
Makefile
.
in
:
Change
the
generation
rules
to
run
`
genfixes
'
...
...
gcc/config/arm/arm.c
View file @
3a2ea258
...
...
@@ -1404,12 +1404,12 @@ arm_return_in_memory (type)
{
tree
field
;
/* For a struct the APCS says that we
must return in a register if
every addressable element has an offset of zero. For practical
purposes this means that the structure can have at most one non
bit-field element and that this element must be the first one in
the structure. */
/* For a struct the APCS says that we
only return in a register
if the type is 'integer like' and every addressable element
has an offset of zero. For practical purposes this means
that the structure can have at most one non bit-field element
and that this element must be the first one in
the structure. */
/* Find the first field, ignoring non FIELD_DECL things which will
have been created by C++. */
for
(
field
=
TYPE_FIELDS
(
type
);
...
...
@@ -1420,7 +1420,19 @@ arm_return_in_memory (type)
if
(
field
==
NULL
)
return
0
;
/* An empty structure. Allowed by an extension to ANSI C. */
/* Now check the remaining fields, if any. */
/* Check that the first field is valid for returning in a register... */
/* ... Floats are not allowed */
if
(
FLOAT_TYPE_P
(
TREE_TYPE
(
field
)))
return
1
;
/* ... Aggregates that are not themselves valid for returning in
a register are not allowed. */
if
(
RETURN_IN_MEMORY
(
TREE_TYPE
(
field
)))
return
1
;
/* Now check the remaining fields, if any. Only bitfields are allowed,
since they are not addressable. */
for
(
field
=
TREE_CHAIN
(
field
);
field
;
field
=
TREE_CHAIN
(
field
))
...
...
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