aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2010-06-14 20:00:21 +0000
committerAndreas Schwab <schwab@gcc.gnu.org>2010-06-14 20:00:21 +0000
commit33d6748532861388e9644438ac5bc5e3de1222db (patch)
tree2e5d7aba7dc33ac41b1cf1b323ad28860a502196 /gcc
parent22963fee5bbfa9de82c08664af99fa24de267872 (diff)
downloadgcc-33d6748532861388e9644438ac5bc5e3de1222db.zip
gcc-33d6748532861388e9644438ac5bc5e3de1222db.tar.gz
gcc-33d6748532861388e9644438ac5bc5e3de1222db.tar.bz2
m68k.c (m68k_delegitimize_address): Don't do anything if the argument is not a MEM.
* config/m68k/m68k.c (m68k_delegitimize_address): Don't do anything if the argument is not a MEM. From-SVN: r160763
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/m68k/m68k.c13
2 files changed, 12 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8cad980..c203494 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-14 Andreas Schwab <schwab@linux-m68k.org>
+
+ * config/m68k/m68k.c (m68k_delegitimize_address): Don't do
+ anything if the argument is not a MEM.
+
2010-06-14 Alexandre Oliva <aoliva@redhat.com>
PR debug/43650
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index de6442a..76be38d 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -4624,16 +4624,17 @@ m68k_output_dwarf_dtprel (FILE *file, int size, rtx x)
and turn them back into a direct symbol reference. */
static rtx
-m68k_delegitimize_address (rtx x)
+m68k_delegitimize_address (rtx orig_x)
{
- rtx orig_x = delegitimize_mem_from_attrs (x);
- rtx y;
+ rtx x, y;
rtx addend = NULL_RTX;
rtx result;
- x = orig_x;
- if (MEM_P (x))
- x = XEXP (x, 0);
+ orig_x = delegitimize_mem_from_attrs (orig_x);
+ if (! MEM_P (orig_x))
+ return orig_x;
+
+ x = XEXP (orig_x, 0);
if (GET_CODE (x) == PLUS
&& GET_CODE (XEXP (x, 1)) == CONST