OSDN Git Service

* config/arm/arm.c (add_minipool_backward_ref): Check for
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 15 Aug 2008 20:12:01 +0000 (20:12 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 15 Aug 2008 20:12:01 +0000 (20:12 +0000)
8-byte-aligned entries in second case of forcing insertion after a
particular entry.  Change third case to avoid inserting
non-8-byte-aligned entries before 8-byte-aligned ones.

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

gcc/ChangeLog
gcc/config/arm/arm.c

index d823e22..3fd1b41 100644 (file)
@@ -1,3 +1,10 @@
+2008-08-15  Joseph Myers  <joseph@codesourcery.com>
+
+       * config/arm/arm.c (add_minipool_backward_ref): Check for
+       8-byte-aligned entries in second case of forcing insertion after a
+       particular entry.  Change third case to avoid inserting
+       non-8-byte-aligned entries before 8-byte-aligned ones.
+
 2008-08-15  Richard Guenther  <rguenther@suse.de>
 
        * tree-ssa-ccp.c (maybe_fold_offset_to_reference): Do not
index a3a49f7..61b1969 100644 (file)
@@ -8772,17 +8772,20 @@ add_minipool_backward_ref (Mfix *fix)
                 its maximum address (which can happen if we have
                 re-located a forwards fix); force the new fix to come
                 after it.  */
-             min_mp = mp;
-             min_address = mp->min_address + fix->fix_size;
+             if (ARM_DOUBLEWORD_ALIGN
+                 && fix->fix_size >= 8 && mp->fix_size < 8)
+               return NULL;
+             else
+               {
+                 min_mp = mp;
+                 min_address = mp->min_address + fix->fix_size;
+               }
            }
-         /* If we are inserting an 8-bytes aligned quantity and
-            we have not already found an insertion point, then
-            make sure that all such 8-byte aligned quantities are
-            placed at the start of the pool.  */
+         /* Do not insert a non-8-byte aligned quantity before 8-byte
+            aligned quantities.  */
          else if (ARM_DOUBLEWORD_ALIGN
-                  && min_mp == NULL
-                  && fix->fix_size >= 8
-                  && mp->fix_size < 8)
+                  && fix->fix_size < 8
+                  && mp->fix_size >= 8)
            {
              min_mp = mp;
              min_address = mp->min_address + fix->fix_size;