diff options
author | Ian Lance Taylor <iant@google.com> | 2007-02-06 17:19:27 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2007-02-06 17:19:27 +0000 |
commit | 7e0c3f57e0bd40144eb662c221e284f3bbf1873c (patch) | |
tree | af2f107c3cde5cde08c5f71678902ed11cb3a012 /gcc/lower-subreg.c | |
parent | 44fb8659c3c8e9309dff1b58a651ab47be827871 (diff) | |
download | gcc-7e0c3f57e0bd40144eb662c221e284f3bbf1873c.zip gcc-7e0c3f57e0bd40144eb662c221e284f3bbf1873c.tar.gz gcc-7e0c3f57e0bd40144eb662c221e284f3bbf1873c.tar.bz2 |
lower-subreg.c (simple_move_operand): Reject CONST.
* lower-subreg.c (simple_move_operand): Reject CONST.
(resolve_clobber): Call validate_change rather than directly
assigning to XEXP (pat, 0).
From-SVN: r121652
Diffstat (limited to 'gcc/lower-subreg.c')
-rw-r--r-- | gcc/lower-subreg.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/lower-subreg.c b/gcc/lower-subreg.c index 62bfea0..8d04390 100644 --- a/gcc/lower-subreg.c +++ b/gcc/lower-subreg.c @@ -80,7 +80,8 @@ simple_move_operand (rtx x) if (GET_CODE (x) == LABEL_REF || GET_CODE (x) == SYMBOL_REF - || GET_CODE (x) == HIGH) + || GET_CODE (x) == HIGH + || GET_CODE (x) == CONST) return false; if (MEM_P (x) @@ -832,6 +833,7 @@ resolve_clobber (rtx pat, rtx insn) rtx reg; enum machine_mode orig_mode; unsigned int words, i; + int ret; reg = XEXP (pat, 0); if (!resolve_reg_p (reg) && !resolve_subreg_p (reg)) @@ -841,7 +843,12 @@ resolve_clobber (rtx pat, rtx insn) words = GET_MODE_SIZE (orig_mode); words = (words + UNITS_PER_WORD - 1) / UNITS_PER_WORD; - XEXP (pat, 0) = simplify_gen_subreg_concatn (word_mode, reg, orig_mode, 0); + ret = validate_change (NULL_RTX, &XEXP (pat, 0), + simplify_gen_subreg_concatn (word_mode, reg, + orig_mode, 0), + 0); + gcc_assert (ret != 0); + for (i = words - 1; i > 0; --i) { rtx x; |