diff options
author | amodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-04 21:05:46 +0000 |
---|---|---|
committer | amodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-04 21:05:46 +0000 |
commit | 3546bf8dd55772566748690334e2cc26523054f3 (patch) | |
tree | 53b6e7dea7473fd468fa2d51f8e7aa9570360c7b /gcc | |
parent | 8b9506fe7db5f4157760f2317b16cae1f7353d2a (diff) | |
download | gcc-3546bf8dd55772566748690334e2cc26523054f3.tar.gz |
* reload1.c (gen_reload): Don't use REGNO on SUBREGs.
* print-rtl.c (print_rtx): Don't segfault on negative regno.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180983 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/print-rtl.c | 7 | ||||
-rw-r--r-- | gcc/reload1.c | 4 |
3 files changed, 10 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 438e33c0da1..2b9e5b35d18 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c index db9c0fbbdd0..edeeefa6071 100644 --- a/gcc/print-rtl.c +++ b/gcc/print-rtl.c @@ -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); diff --git a/gcc/reload1.c b/gcc/reload1.c index 04a839ede7b..c9fb57baa4c 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -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); |