Commit f9409c3a by Jim Wilson

(expand_expr, case COMPONENT_REF): Don't fetch unaligned

field if we only want its address.

From-SVN: r9069
parent 2b10af4f
...@@ -4761,16 +4761,16 @@ expand_expr (exp, target, tmode, modifier) ...@@ -4761,16 +4761,16 @@ expand_expr (exp, target, tmode, modifier)
(which we know to be the width of a basic mode), then (which we know to be the width of a basic mode), then
storing into memory, and changing the mode to BLKmode. */ storing into memory, and changing the mode to BLKmode. */
if (mode1 == VOIDmode if (mode1 == VOIDmode
|| (mode1 != BLKmode && ! direct_load[(int) mode1]
&& modifier != EXPAND_CONST_ADDRESS
&& modifier != EXPAND_SUM && modifier != EXPAND_INITIALIZER)
|| GET_CODE (op0) == REG || GET_CODE (op0) == SUBREG || GET_CODE (op0) == REG || GET_CODE (op0) == SUBREG
/* If the field isn't aligned enough to fetch as a memref, || (modifier != EXPAND_CONST_ADDRESS
fetch it as a bit field. */ && modifier != EXPAND_SUM
|| (SLOW_UNALIGNED_ACCESS && modifier != EXPAND_INITIALIZER
&& TYPE_ALIGN (TREE_TYPE (tem)) < GET_MODE_ALIGNMENT (mode)) && ((mode1 != BLKmode && ! direct_load[(int) mode1])
|| (SLOW_UNALIGNED_ACCESS /* If the field isn't aligned enough to fetch as a memref,
&& bitpos % GET_MODE_ALIGNMENT (mode) != 0)) fetch it as a bit field. */
|| (SLOW_UNALIGNED_ACCESS
&& ((TYPE_ALIGN (TREE_TYPE (tem)) < GET_MODE_ALIGNMENT (mode))
|| (bitpos % GET_MODE_ALIGNMENT (mode) != 0))))))
{ {
enum machine_mode ext_mode = mode; enum machine_mode ext_mode = mode;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment