* config/alpha/alpha.c (alpha_legitimate_address_p): Explicit
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Jan 2009 08:04:11 +0000 (08:04 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Jan 2009 08:04:11 +0000 (08:04 +0000)
relocations of local symbols  wider than UNITS_PER_WORD are not valid.
(alpha_legitimize_address): Do not split local symbols wider than
UNITS_PER_WORD into HIGH/LO_SUM parts.

testsuite/ChangeLog:

Revert:
2009-01-05  Uros Bizjak  <ubizjak@gmail.com>

* gcc.dg/compat/struct-layout-1_generate.c (dg-options): Add -mieee
for alpha*-*-* targets.
* g++.dg/compat/struct-layout-1_generate.c (dg-options): Ditto.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143332 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/alpha/alpha.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c

index 6e4aa8e..84354df 100644 (file)
@@ -1,3 +1,10 @@
+2009-01-13  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/alpha/alpha.c (alpha_legitimate_address_p): Explicit
+       relocations of local symbols  wider than UNITS_PER_WORD are not valid.
+       (alpha_legitimize_address): Do not split local symbols wider than
+       UNITS_PER_WORD into HIGH/LO_SUM parts.
+
 2009-01-13  Danny Smith  <dannysmith@users.sourceforge.net>
 
        PR bootstrap/38580
@@ -32,9 +39,9 @@
 2009-01-12  Tomas Bily  <tbily@suse.cz>
 
        PR middlend/38385
-        * tree-loop-distribution.c (prop_phis): New function.
-        (generate_builtin): Call prop_phis.
-        * testsuite/gcc.dg/tree-ssa/pr38385.c: New file.
+       * tree-loop-distribution.c (prop_phis): New function.
+       (generate_builtin): Call prop_phis.
+       * testsuite/gcc.dg/tree-ssa/pr38385.c: New file.
 
 2009-01-12  Jakub Jelinek  <jakub@redhat.com>
 
@@ -85,8 +92,7 @@
 2008-01-09  Vladimir Makarov  <vmakarov@redhat.com>
 
        PR rtl-optimization/38495
-       * ira-emit.c (print_move_list, ira_debug_move_list): New
-       functions.
+       * ira-emit.c (print_move_list, ira_debug_move_list): New functions.
        (add_range_and_copies_from_move_list): Print all added ranges.
        Add ranges to memory optimized destination.
 
        epilogue_size_needed to the epilogue expanders.
 
        PR c/35742
-       * c-pretty-print.c (pp_c_expression): Handle GOTO_EXPR like
-       BIND_EXPR.
+       * c-pretty-print.c (pp_c_expression): Handle GOTO_EXPR like BIND_EXPR.
 
 2009-01-09  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
index 9c79f88..7bafb0a 100644 (file)
@@ -864,9 +864,11 @@ alpha_legitimate_address_p (enum machine_mode mode, rtx x, int strict)
        }
     }
 
-  /* If we're managing explicit relocations, LO_SUM is valid, as
-     are small data symbols.  */
-  else if (TARGET_EXPLICIT_RELOCS)
+  /* If we're managing explicit relocations, LO_SUM is valid, as are small
+     data symbols.  Avoid explicit relocations of modes larger than word
+     mode since i.e. $LC0+8($1) can fold around +/- 32k offset.  */
+  else if (TARGET_EXPLICIT_RELOCS
+          && GET_MODE_SIZE (mode) <= UNITS_PER_WORD)
     {
       if (small_symbolic_operand (x, Pmode))
        return true;
@@ -916,8 +918,7 @@ get_tls_get_addr (void)
    to be legitimate.  If we find one, return the new, valid address.  */
 
 rtx
-alpha_legitimize_address (rtx x, rtx scratch,
-                         enum machine_mode mode ATTRIBUTE_UNUSED)
+alpha_legitimize_address (rtx x, rtx scratch, enum machine_mode mode)
 {
   HOST_WIDE_INT addend;
 
@@ -965,8 +966,12 @@ alpha_legitimize_address (rtx x, rtx scratch,
       goto split_addend;
     }
 
-  /* If this is a local symbol, split the address into HIGH/LO_SUM parts.  */
-  if (TARGET_EXPLICIT_RELOCS && symbolic_operand (x, Pmode))
+  /* If this is a local symbol, split the address into HIGH/LO_SUM parts.
+     Avoid modes larger than word mode since i.e. $LC0+8($1) can fold
+     around +/- 32k offset.  */
+  if (TARGET_EXPLICIT_RELOCS
+      && GET_MODE_SIZE (mode) <= UNITS_PER_WORD
+      && symbolic_operand (x, Pmode))
     {
       rtx r0, r16, eqv, tga, tp, insn, dest, seq;
 
index a34e95f..a59c294 100644 (file)
@@ -1,3 +1,12 @@
+2009-01-13  Uros Bizjak  <ubizjak@gmail.com>
+
+       Revert:
+       2009-01-05  Uros Bizjak  <ubizjak@gmail.com>
+
+       * gcc.dg/compat/struct-layout-1_generate.c (dg-options): Add -mieee
+       for alpha*-*-* targets.
+       * g++.dg/compat/struct-layout-1_generate.c (dg-options): Ditto.
+
 2009-01-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
        PR libfortran/38772
index b314d70..575ad61 100644 (file)
@@ -48,8 +48,7 @@ const char *dg_options[] = {
 "/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n",
 "/* { dg-options \"%s-I%s -mno-mmx -fno-common\" { target i?86-*-darwin* x86_64-*-darwin* } } */\n",
 "/* { dg-options \"%s-I%s -mno-base-addresses\" { target mmix-*-* } } */\n",
-"/* { dg-options \"%s-I%s -mlongcalls -mtext-section-literals\" { target xtensa*-*-* } } */\n",
-"/* { dg-options \"%s-I%s -mieee\" { target alpha*-*-* } } */\n"
+"/* { dg-options \"%s-I%s -mlongcalls -mtext-section-literals\" { target xtensa*-*-* } } */\n"
 #define NDG_OPTIONS (sizeof (dg_options) / sizeof (dg_options[0]))
 };
 
index 26e6572..a162dee 100644 (file)
@@ -48,8 +48,7 @@ const char *dg_options[] = {
 "/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n",
 "/* { dg-options \"%s-I%s -mno-mmx -fno-common\" { target i?86-*-darwin* x86_64-*-darwin* } } */\n",
 "/* { dg-options \"%s-I%s -mno-base-addresses\" { target mmix-*-* } } */\n",
-"/* { dg-options \"%s-I%s -mlongcalls -mtext-section-literals\" { target xtensa*-*-* } } */\n",
-"/* { dg-options \"%s-I%s -mieee\" { target alpha*-*-* } } */\n"
+"/* { dg-options \"%s-I%s -mlongcalls -mtext-section-literals\" { target xtensa*-*-* } } */\n"
 #define NDG_OPTIONS (sizeof (dg_options) / sizeof (dg_options[0]))
 };