]> gcc.gnu.org Git - gcc.git/commitdiff
m68k.c (m68k_delegitimize_address): Don't do anything if the argument is not a MEM.
authorAndreas Schwab <schwab@linux-m68k.org>
Mon, 14 Jun 2010 20:00:21 +0000 (20:00 +0000)
committerAndreas Schwab <schwab@gcc.gnu.org>
Mon, 14 Jun 2010 20:00:21 +0000 (20:00 +0000)
* config/m68k/m68k.c (m68k_delegitimize_address): Don't do
anything if the argument is not a MEM.

From-SVN: r160763

gcc/ChangeLog
gcc/config/m68k/m68k.c

index 8cad980875bcbf544d5b8e9b9c2cd2fb9e2766d2..c20349431f1f54c1cd06a7db1214e3bba173c8be 100644 (file)
@@ -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
index de6442aa6be5c421c84e9ea37cc5fa59afe3e0d6..76be38d35a7767823bd74ac1d59ee500e602c710 100644 (file)
@@ -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
This page took 0.094363 seconds and 5 git commands to generate.