diff options
author | matz <matz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-09 00:43:36 +0000 |
---|---|---|
committer | matz <matz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-09 00:43:36 +0000 |
commit | 088c4b7b873836b684ed7079c63fa5a4c8b29d92 (patch) | |
tree | a983d9f99d48e2a96d50bdf1d707e518b0f89c42 /gcc | |
parent | 2e24255fdc02fc2f96f79d0ec571cb304c107e4a (diff) | |
download | gcc-088c4b7b873836b684ed7079c63fa5a4c8b29d92.tar.gz |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/cfgexpand.c | 8 | ||||
-rw-r--r-- | gcc/rtl.h | 14 |
3 files changed, 23 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 664c03d3a58..f0be5934a06 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2009-09-09 Michael Matz <matz@suse.de> + + 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 <dj@redhat.com> * config/mep/mep.c (conversions[]): Add "ml" pattern. diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index e840da88bcf..d1c2be29b32 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 88b93f19fb0..3427347225d 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) |