From: matz Date: Wed, 9 Sep 2009 00:43:36 +0000 (+0000) Subject: PR middle-end/41268 X-Git-Tag: upstream/4.9.2~33864 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=088c4b7b873836b684ed7079c63fa5a4c8b29d92;p=platform%2Fupstream%2Flinaro-gcc.git PR middle-end/41268 * cfgexpand.c (expand_gimple_stmt_1): Use an int for storing SUBREG_PROMOTED_UNSIGNED_P, instead of a bool. * rtl.h (struct rtx, SUBREG_PROMOTED_UNSIGNED_P): Update comments to reflect reality. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151544 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 664c03d..f0be593 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2009-09-09 Michael Matz + + PR middle-end/41268 + * cfgexpand.c (expand_gimple_stmt_1): Use an int for storing + SUBREG_PROMOTED_UNSIGNED_P, instead of a bool. + * rtl.h (struct rtx, SUBREG_PROMOTED_UNSIGNED_P): Update comments + to reflect reality. + 2009-09-08 DJ Delorie * config/mep/mep.c (conversions[]): Add "ml" pattern. diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index e840da8..d1c2be2 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -1920,19 +1920,19 @@ expand_gimple_stmt_1 (gimple stmt) ; else if (promoted) { - bool unsigndp = SUBREG_PROMOTED_UNSIGNED_P (target); + int unsignedp = SUBREG_PROMOTED_UNSIGNED_P (target); /* If TEMP is a VOIDmode constant, use convert_modes to make sure that we properly convert it. */ if (CONSTANT_P (temp) && GET_MODE (temp) == VOIDmode) { temp = convert_modes (GET_MODE (target), TYPE_MODE (ops.type), - temp, unsigndp); + temp, unsignedp); temp = convert_modes (GET_MODE (SUBREG_REG (target)), - GET_MODE (target), temp, unsigndp); + GET_MODE (target), temp, unsignedp); } - convert_move (SUBREG_REG (target), temp, unsigndp); + convert_move (SUBREG_REG (target), temp, unsignedp); } else if (nontemporal && emit_storent_insn (target, temp)) ; diff --git a/gcc/rtl.h b/gcc/rtl.h index 88b93f1..3427347 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -255,8 +255,7 @@ struct GTY((chain_next ("RTX_NEXT (&%h)"), ECF_LOOPING_CONST_OR_PURE and DECL_LOOPING_CONST_OR_PURE_P. */ unsigned int call : 1; /* 1 in a REG, MEM, or CONCAT if the value is set at most once, anywhere. - 1 in a SUBREG if it references an unsigned object whose mode has been - from a promoted to a wider mode. + 1 in a SUBREG used for SUBREG_PROMOTED_UNSIGNED_P. 1 in a SYMBOL_REF if it addresses something in the per-function constants pool. 1 in a CALL_INSN logically equivalent to ECF_CONST and TREE_READONLY. @@ -268,7 +267,7 @@ struct GTY((chain_next ("RTX_NEXT (&%h)"), if it has been deleted. 1 in a REG expression if corresponds to a variable declared by the user, 0 for an internally generated temporary. - 1 in a SUBREG with a negative value. + 1 in a SUBREG used for SUBREG_PROMOTED_UNSIGNED_P. 1 in a LABEL_REF, REG_LABEL_TARGET or REG_LABEL_OPERAND note for a non-local label. In a SYMBOL_REF, this flag is used for machine-specific purposes. @@ -1161,6 +1160,15 @@ do { \ _rtx->unchanging = (VAL); \ } \ } while (0) + +/* Valid for subregs which are SUBREG_PROMOTED_VAR_P(). In that case + this gives the necessary extensions: + 0 - signed + 1 - normal unsigned + -1 - pointer unsigned, which most often can be handled like unsigned + extension, except for generating instructions where we need to + emit special code (ptr_extend insns) on some architectures. */ + #define SUBREG_PROMOTED_UNSIGNED_P(RTX) \ ((RTL_FLAG_CHECK1("SUBREG_PROMOTED_UNSIGNED_P", (RTX), SUBREG)->volatil) \ ? -1 : (int) (RTX)->unchanging)