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
034f9101
Commit
034f9101
authored
Nov 10, 1993
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(expand_expr): Use a smaller alignment when reading from a field
with a variable offset. From-SVN: r6054
parent
29d40fa4
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 @
034f9101
...
@@ -4314,6 +4314,7 @@ expand_expr (exp, target, tmode, modifier)
...
@@ -4314,6 +4314,7 @@ expand_expr (exp, target, tmode, modifier)
int
volatilep
=
0
;
int
volatilep
=
0
;
tree
tem
=
get_inner_reference
(
exp
,
&
bitsize
,
&
bitpos
,
&
offset
,
tree
tem
=
get_inner_reference
(
exp
,
&
bitsize
,
&
bitpos
,
&
offset
,
&
mode1
,
&
unsignedp
,
&
volatilep
);
&
mode1
,
&
unsignedp
,
&
volatilep
);
int
alignment
;
/* If we got back the original object, something is wrong. Perhaps
/* If we got back the original object, something is wrong. Perhaps
we are evaluating an expression too early. In any event, don't
we are evaluating an expression too early. In any event, don't
...
@@ -4337,6 +4338,7 @@ expand_expr (exp, target, tmode, modifier)
...
@@ -4337,6 +4338,7 @@ expand_expr (exp, target, tmode, modifier)
op0
=
validize_mem
(
force_const_mem
(
mode
,
op0
));
op0
=
validize_mem
(
force_const_mem
(
mode
,
op0
));
}
}
alignment
=
TYPE_ALIGN
(
TREE_TYPE
(
tem
))
/
BITS_PER_UNIT
;
if
(
offset
!=
0
)
if
(
offset
!=
0
)
{
{
rtx
offset_rtx
=
expand_expr
(
offset
,
NULL_RTX
,
VOIDmode
,
0
);
rtx
offset_rtx
=
expand_expr
(
offset
,
NULL_RTX
,
VOIDmode
,
0
);
...
@@ -4346,6 +4348,14 @@ expand_expr (exp, target, tmode, modifier)
...
@@ -4346,6 +4348,14 @@ expand_expr (exp, target, tmode, modifier)
op0
=
change_address
(
op0
,
VOIDmode
,
op0
=
change_address
(
op0
,
VOIDmode
,
gen_rtx
(
PLUS
,
Pmode
,
XEXP
(
op0
,
0
),
gen_rtx
(
PLUS
,
Pmode
,
XEXP
(
op0
,
0
),
force_reg
(
Pmode
,
offset_rtx
)));
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
size of an element of the innermost array, but no need.) */
if
(
TREE_CODE
(
exp
)
==
COMPONENT_REF
||
TREE_CODE
(
exp
)
==
BIT_FIELD_REF
)
alignment
=
(
TYPE_ALIGN
(
TREE_TYPE
(
TREE_OPERAND
(
exp
,
0
)))
/
BITS_PER_UNIT
);
}
}
/* Don't forget about volatility even if this is a bitfield. */
/* Don't forget about volatility even if this is a bitfield. */
...
@@ -4382,7 +4392,7 @@ expand_expr (exp, target, tmode, modifier)
...
@@ -4382,7 +4392,7 @@ expand_expr (exp, target, tmode, modifier)
op0
=
extract_bit_field
(
validize_mem
(
op0
),
bitsize
,
bitpos
,
op0
=
extract_bit_field
(
validize_mem
(
op0
),
bitsize
,
bitpos
,
unsignedp
,
target
,
ext_mode
,
ext_mode
,
unsignedp
,
target
,
ext_mode
,
ext_mode
,
TYPE_ALIGN
(
TREE_TYPE
(
tem
))
/
BITS_PER_UNIT
,
alignment
,
int_size_in_bytes
(
TREE_TYPE
(
tem
)));
int_size_in_bytes
(
TREE_TYPE
(
tem
)));
if
(
mode
==
BLKmode
)
if
(
mode
==
BLKmode
)
{
{
...
...
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