mirror of git://gcc.gnu.org/git/gcc.git
lower-subreg.c (can_decompose_p): Check every word of a hard register.
gcc/ * lower-subreg.c (can_decompose_p): Check every word of a hard register. From-SVN: r182500
This commit is contained in:
parent
176fcc5d18
commit
488c8379f4
|
@ -1,3 +1,8 @@
|
||||||
|
2011-12-19 Richard Sandiford <rdsandiford@googlemail.com>
|
||||||
|
|
||||||
|
* lower-subreg.c (can_decompose_p): Check every word of a hard
|
||||||
|
register.
|
||||||
|
|
||||||
2011-12-19 Sandra Loosemore <sandra@codesourcery.com>
|
2011-12-19 Sandra Loosemore <sandra@codesourcery.com>
|
||||||
Tom de Vries <tom@codesourcery.com>
|
Tom de Vries <tom@codesourcery.com>
|
||||||
|
|
||||||
|
|
|
@ -634,8 +634,15 @@ can_decompose_p (rtx x)
|
||||||
unsigned int regno = REGNO (x);
|
unsigned int regno = REGNO (x);
|
||||||
|
|
||||||
if (HARD_REGISTER_NUM_P (regno))
|
if (HARD_REGISTER_NUM_P (regno))
|
||||||
return (validate_subreg (word_mode, GET_MODE (x), x, UNITS_PER_WORD)
|
{
|
||||||
&& HARD_REGNO_MODE_OK (regno, word_mode));
|
unsigned int byte, num_bytes;
|
||||||
|
|
||||||
|
num_bytes = GET_MODE_SIZE (GET_MODE (x));
|
||||||
|
for (byte = 0; byte < num_bytes; byte += UNITS_PER_WORD)
|
||||||
|
if (simplify_subreg_regno (regno, GET_MODE (x), byte, word_mode) < 0)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return !bitmap_bit_p (subreg_context, regno);
|
return !bitmap_bit_p (subreg_context, regno);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue