Commit c1853da7 by Richard Kenner Committed by Richard Kenner

expr.c (store_field): Don't clobber TEMP in shift: it might be a variable.

	* expr.c (store_field): Don't clobber TEMP in shift: it might be
	a variable.
	(get_inner_reference): Don't go through a VIEW_CONVERT_EXPR
	whose purpose is to step up the alignment.
	(expand_expr, case ADDR_EXPR): Force LO_SUM into memory, just like REG.

From-SVN: r66465
parent 41dd7402
2003-05-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 2003-05-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* expr.c (store_field): Don't clobber TEMP in shift: it might be
a variable.
(get_inner_reference): Don't go through a VIEW_CONVERT_EXPR
whose purpose is to step up the alignment.
(expand_expr, case ADDR_EXPR): Force LO_SUM into memory, just like REG.
* stor-layout.c (compute_record_mode): Relax restriction * stor-layout.c (compute_record_mode): Relax restriction
on fields crossing word boundaries forcing BLKmode. on fields crossing word boundaries forcing BLKmode.
......
...@@ -5648,7 +5648,7 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode, unsignedp, type, ...@@ -5648,7 +5648,7 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode, unsignedp, type,
temp = expand_shift (RSHIFT_EXPR, GET_MODE (temp), temp, temp = expand_shift (RSHIFT_EXPR, GET_MODE (temp), temp,
size_int (GET_MODE_BITSIZE (GET_MODE (temp)) size_int (GET_MODE_BITSIZE (GET_MODE (temp))
- bitsize), - bitsize),
temp, 1); NULL_RTX, 1);
/* Unless MODE is VOIDmode or BLKmode, convert TEMP to /* Unless MODE is VOIDmode or BLKmode, convert TEMP to
MODE. */ MODE. */
...@@ -5888,8 +5888,20 @@ get_inner_reference (exp, pbitsize, pbitpos, poffset, pmode, ...@@ -5888,8 +5888,20 @@ get_inner_reference (exp, pbitsize, pbitpos, poffset, pmode,
continue; continue;
} }
/* We can go inside most conversions: all NON_VALUE_EXPRs, all normal
conversions that don't change the mode, and all view conversions
except those that need to "step up" the alignment. */
else if (TREE_CODE (exp) != NON_LVALUE_EXPR else if (TREE_CODE (exp) != NON_LVALUE_EXPR
&& TREE_CODE (exp) != VIEW_CONVERT_EXPR && ! (TREE_CODE (exp) == VIEW_CONVERT_EXPR
&& ! ((TYPE_ALIGN (TREE_TYPE (exp))
> TYPE_ALIGN (TREE_TYPE (TREE_OPERAND (exp, 0))))
&& STRICT_ALIGNMENT
&& (TYPE_ALIGN (TREE_TYPE (TREE_OPERAND (exp, 0)))
< BIGGEST_ALIGNMENT)
&& (TYPE_ALIGN_OK (TREE_TYPE (exp))
|| TYPE_ALIGN_OK (TREE_TYPE
(TREE_OPERAND (exp, 0))))))
&& ! ((TREE_CODE (exp) == NOP_EXPR && ! ((TREE_CODE (exp) == NOP_EXPR
|| TREE_CODE (exp) == CONVERT_EXPR) || TREE_CODE (exp) == CONVERT_EXPR)
&& (TYPE_MODE (TREE_TYPE (exp)) && (TYPE_MODE (TREE_TYPE (exp))
...@@ -9245,7 +9257,7 @@ expand_expr (exp, target, tmode, modifier) ...@@ -9245,7 +9257,7 @@ expand_expr (exp, target, tmode, modifier)
op0); op0);
else if (GET_CODE (op0) == REG || GET_CODE (op0) == SUBREG else if (GET_CODE (op0) == REG || GET_CODE (op0) == SUBREG
|| GET_CODE (op0) == CONCAT || GET_CODE (op0) == ADDRESSOF || GET_CODE (op0) == CONCAT || GET_CODE (op0) == ADDRESSOF
|| GET_CODE (op0) == PARALLEL) || GET_CODE (op0) == PARALLEL || GET_CODE (op0) == LO_SUM)
{ {
/* If the operand is a SAVE_EXPR, we can deal with this by /* If the operand is a SAVE_EXPR, we can deal with this by
forcing the SAVE_EXPR into memory. */ forcing the SAVE_EXPR into memory. */
......
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