reload1.c (gen_reload): Don't use REGNO on SUBREGs.

* reload1.c (gen_reload): Don't use REGNO on SUBREGs.
	* print-rtl.c (print_rtx): Don't segfault on negative regno.

From-SVN: r180983
This commit is contained in:
Alan Modra 2011-11-05 07:35:46 +10:30 committed by Alan Modra
parent 7a83e5bc55
commit c62c54419c
3 changed files with 10 additions and 6 deletions

View file

@ -1,3 +1,8 @@
2011-11-05 Alan Modra <amodra@gmail.com>
* reload1.c (gen_reload): Don't use REGNO on SUBREGs.
* print-rtl.c (print_rtx): Don't segfault on negative regno.
2011-11-03 David S. Miller <davem@davemloft.net>
PR target/49965

View file

@ -466,11 +466,10 @@ print_rtx (const_rtx in_rtx)
const char *name;
#ifndef GENERATOR_FILE
if (REG_P (in_rtx) && value < FIRST_PSEUDO_REGISTER)
fprintf (outfile, " %d %s", REGNO (in_rtx),
reg_names[REGNO (in_rtx)]);
if (REG_P (in_rtx) && (unsigned) value < FIRST_PSEUDO_REGISTER)
fprintf (outfile, " %d %s", value, reg_names[value]);
else if (REG_P (in_rtx)
&& value <= LAST_VIRTUAL_REGISTER)
&& (unsigned) value <= LAST_VIRTUAL_REGISTER)
{
if (value == VIRTUAL_INCOMING_ARGS_REGNUM)
fprintf (outfile, " %d virtual-incoming-args", value);

View file

@ -8601,10 +8601,10 @@ gen_reload (rtx out, rtx in, int opnum, enum reload_type type)
rtx loc = get_secondary_mem (in, GET_MODE (out), opnum, type);
if (GET_MODE (loc) != GET_MODE (out))
out = gen_rtx_REG (GET_MODE (loc), REGNO (out));
out = gen_rtx_REG (GET_MODE (loc), reg_or_subregno (out));
if (GET_MODE (loc) != GET_MODE (in))
in = gen_rtx_REG (GET_MODE (loc), REGNO (in));
in = gen_rtx_REG (GET_MODE (loc), reg_or_subregno (in));
gen_reload (loc, in, opnum, type);
gen_reload (out, loc, opnum, type);