diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1993-11-23 15:26:10 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1993-11-23 15:26:10 -0500 |
commit | adc22a04eb01ef0563b1ec3382fc56f0b5101c90 (patch) | |
tree | ad10528d277050a91c265c72d3572bb0fb3aba8a /gcc | |
parent | 1f17868aa6caa16f285b15c5c8fc221c5f83b781 (diff) | |
download | gcc-adc22a04eb01ef0563b1ec3382fc56f0b5101c90.zip gcc-adc22a04eb01ef0563b1ec3382fc56f0b5101c90.tar.gz gcc-adc22a04eb01ef0563b1ec3382fc56f0b5101c90.tar.bz2 |
(expand_expr...
(expand_expr, case SAVE_EXPR): Properly recompute the value of
UNSIGNEDP when SAVE_EXPR_RTL is nonzero and we have promoted.
From-SVN: r6143
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/expr.c | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -3945,12 +3945,24 @@ expand_expr (exp, target, tmode, modifier) /* If the mode of SAVE_EXPR_RTL does not match that of the expression, it must be a promoted value. We return a SUBREG of the wanted mode, - but mark it so that we know that it was already extended. Note - that `unsignedp' was modified above in this case. */ + but mark it so that we know that it was already extended. */ if (GET_CODE (SAVE_EXPR_RTL (exp)) == REG && GET_MODE (SAVE_EXPR_RTL (exp)) != mode) { + enum machine_mode var_mode = mode; + + if (TREE_CODE (type) == INTEGER_TYPE + || TREE_CODE (type) == ENUMERAL_TYPE + || TREE_CODE (type) == BOOLEAN_TYPE + || TREE_CODE (type) == CHAR_TYPE + || TREE_CODE (type) == REAL_TYPE + || TREE_CODE (type) == POINTER_TYPE + || TREE_CODE (type) == OFFSET_TYPE) + { + PROMOTE_MODE (var_mode, unsignedp, type); + } + temp = gen_rtx (SUBREG, mode, SAVE_EXPR_RTL (exp), 0); SUBREG_PROMOTED_VAR_P (temp) = 1; SUBREG_PROMOTED_UNSIGNED_P (temp) = unsignedp; |