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
d78d243c
Commit
d78d243c
authored
Nov 10, 1993
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(expand_assignment): Use a smaller alignment when storing
into a field with a variable offset. From-SVN: r6051
parent
f820ace7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletions
+11
-1
gcc/expr.c
+11
-1
No files found.
gcc/expr.c
View file @
d78d243c
...
...
@@ -2347,6 +2347,7 @@ expand_assignment (to, from, want_value, suggest_reg)
int
unsignedp
;
int
volatilep
=
0
;
tree
tem
;
int
alignment
;
push_temp_slots
();
tem
=
get_inner_reference
(
to
,
&
bitsize
,
&
bitpos
,
&
offset
,
...
...
@@ -2358,6 +2359,7 @@ expand_assignment (to, from, want_value, suggest_reg)
if
(
mode1
==
VOIDmode
&&
want_value
)
tem
=
stabilize_reference
(
tem
);
alignment
=
TYPE_ALIGN
(
TREE_TYPE
(
tem
))
/
BITS_PER_UNIT
;
to_rtx
=
expand_expr
(
tem
,
NULL_RTX
,
VOIDmode
,
0
);
if
(
offset
!=
0
)
{
...
...
@@ -2368,6 +2370,14 @@ expand_assignment (to, from, want_value, suggest_reg)
to_rtx
=
change_address
(
to_rtx
,
VOIDmode
,
gen_rtx
(
PLUS
,
Pmode
,
XEXP
(
to_rtx
,
0
),
force_reg
(
Pmode
,
offset_rtx
)));
/* If we have a variable offset, the known alignment
is only that of the innermost structure containing the field.
(Actually, we could sometimes do better by using the
align of an element of the innermost array, but no need.) */
if
(
TREE_CODE
(
to
)
==
COMPONENT_REF
||
TREE_CODE
(
to
)
==
BIT_FIELD_REF
)
alignment
=
TYPE_ALIGN
(
TREE_TYPE
(
TREE_OPERAND
(
to
,
0
)))
/
BITS_PER_UNIT
;
}
if
(
volatilep
)
{
...
...
@@ -2388,7 +2398,7 @@ expand_assignment (to, from, want_value, suggest_reg)
:
VOIDmode
),
unsignedp
,
/* Required alignment of containing datum. */
TYPE_ALIGN
(
TREE_TYPE
(
tem
))
/
BITS_PER_UNIT
,
alignment
,
int_size_in_bytes
(
TREE_TYPE
(
tem
)));
preserve_temp_slots
(
result
);
free_temp_slots
();
...
...
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