backport: i386.c (ix86_address_subreg_operand): Reject stack pointer.

Backport from mainline
	2012-08-01  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.c (ix86_address_subreg_operand): Reject
	stack pointer.
	(ix86_print_operand_address): Assert that parts.base and parts.index
	are non-NULL after call to simplify_subreg.

From-SVN: r190045
This commit is contained in:
Uros Bizjak 2012-08-01 19:03:34 +02:00
parent 2180887424
commit 24e7d1b745
2 changed files with 17 additions and 1 deletions

View File

@ -1,9 +1,19 @@
2012-08-01 Uros Bizjak <ubizjak@gmail.com>
Backport from mainline
2012-08-01 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (ix86_address_subreg_operand): Reject
stack pointer.
(ix86_print_operand_address): Assert that parts.base and parts.index
are non-NULL after call to simplify_subreg.
2012-07-22 Oleg Endo <olegendo@gcc.gnu.org>
PR target/33135
* config/sh/sh.opt (mieee): Use Var instead of Mask. Correct
description.
* config/sh/sh.c (sh_option_override): Do not change
* config/sh/sh.c (sh_option_override): Do not change
flag_finite_math_only. Set TARGET_IEEE to complement of
flag_finite_math_only.
* doc/invoke.texi (SH options): Add mno-ieee. Correct

View File

@ -11395,6 +11395,10 @@ ix86_address_subreg_operand (rtx op)
if (GET_MODE_SIZE (mode) > UNITS_PER_WORD)
return false;
/* simplify_subreg does not handle stack pointer. */
if (REGNO (op) == STACK_POINTER_REGNUM)
return false;
/* Allow only SUBREGs of non-eliminable hard registers. */
return register_no_elim_operand (op, mode);
}
@ -14508,6 +14512,7 @@ ix86_print_operand_address (FILE *file, rtx addr)
rtx tmp = SUBREG_REG (parts.base);
parts.base = simplify_subreg (GET_MODE (parts.base),
tmp, GET_MODE (tmp), 0);
gcc_assert (parts.base != NULL_RTX);
}
if (parts.index && GET_CODE (parts.index) == SUBREG)
@ -14515,6 +14520,7 @@ ix86_print_operand_address (FILE *file, rtx addr)
rtx tmp = SUBREG_REG (parts.index);
parts.index = simplify_subreg (GET_MODE (parts.index),
tmp, GET_MODE (tmp), 0);
gcc_assert (parts.index != NULL_RTX);
}
base = parts.base;