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
429baef5
Commit
429baef5
authored
Jul 28, 1997
by
Jason Merrill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
From-SVN: r14542
parent
f0eebf28
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
gcc/stor-layout.c
+16
-4
No files found.
gcc/stor-layout.c
View file @
429baef5
...
...
@@ -835,6 +835,8 @@ layout_type (type)
if
(
TREE_CODE
(
TYPE_SIZE
(
type
))
==
INTEGER_CST
)
{
tree
field
;
enum
machine_mode
mode
=
VOIDmode
;
/* A record which has any BLKmode members must itself be BLKmode;
it can't go in a register.
Unless the member is BLKmode only because it isn't aligned. */
...
...
@@ -860,13 +862,23 @@ layout_type (type)
!=
((
TREE_INT_CST_LOW
(
DECL_SIZE
(
field
))
+
bitpos
-
1
)
/
BITS_PER_WORD
)
/* But there is no problem if the field is entire words. */
&&
TREE_INT_CST_LOW
(
DECL_SIZE
(
field
))
%
BITS_PER_WORD
=
=
0
)
&&
TREE_INT_CST_LOW
(
DECL_SIZE
(
field
))
%
BITS_PER_WORD
!
=
0
)
goto
record_lose
;
/* If this field is the whole struct, remember its mode so
that, say, we can put a double in a class into a DF
register instead of forcing it to live in the stack. */
if
(
simple_cst_equal
(
TYPE_SIZE
(
type
),
DECL_SIZE
(
field
)))
mode
=
DECL_MODE
(
field
);
}
TYPE_MODE
(
type
)
=
mode_for_size
(
TREE_INT_CST_LOW
(
TYPE_SIZE
(
type
)),
MODE_INT
,
1
);
if
(
mode
!=
VOIDmode
)
/* We only have one real field; use its mode. */
TYPE_MODE
(
type
)
=
mode
;
else
TYPE_MODE
(
type
)
=
mode_for_size
(
TREE_INT_CST_LOW
(
TYPE_SIZE
(
type
)),
MODE_INT
,
1
);
/* If structure's known alignment is less than
what the scalar mode would need, and it matters,
...
...
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