* config/tc-xtensa.h (struct xtensa_frag_type): Update comment about
authorBob Wilson <bob.wilson@acm.org>
Tue, 19 Jun 2007 19:08:37 +0000 (19:08 +0000)
committerBob Wilson <bob.wilson@acm.org>
Tue, 19 Jun 2007 19:08:37 +0000 (19:08 +0000)
use of literal_frag field.
* config/tc-xtensa.c (xtensa_mark_literal_pool_location): Record frag
in the literal_frag field.
(xtensa_move_literals): Use it here instead of searching.  Update
literal_frag field with new value.

gas/ChangeLog
gas/config/tc-xtensa.c
gas/config/tc-xtensa.h

index a418e704887b7e56ea600a780c8673124c8218cf..53850c6a4a5e7141ef0c7fb0ccb644735a3f71ee 100644 (file)
@@ -1,3 +1,12 @@
+2007-06-19  Sterling Augustine  <sterling@tensilica.com>
+
+       * config/tc-xtensa.h (struct xtensa_frag_type): Update comment about
+       use of literal_frag field.
+       * config/tc-xtensa.c (xtensa_mark_literal_pool_location): Record frag
+       in the literal_frag field.
+       (xtensa_move_literals): Use it here instead of searching.  Update
+       literal_frag field with new value.
+
 2007-06-14  Paul Brook  <paul@codesourcery.com>
 
        * config/tc-arm.c (do_t_mov_cmp): Handle shift by register and
index 5ed33a8e109aead90a01ae6f876c1924e56549f5..7011a17b959c363c2070b7733b956fb0fdf5d708 100644 (file)
@@ -4548,6 +4548,7 @@ xtensa_mark_literal_pool_location (void)
      fixes into this frchain's fix list.  */
   pool_location = frag_now;
   frag_now->tc_frag_data.lit_frchain = frchain_now;
+  frag_now->tc_frag_data.literal_frag = frag_now;
   frag_variant (rs_machine_dependent, 0, 0,
                RELAX_LITERAL_POOL_BEGIN, NULL, 0, NULL);
   xtensa_set_frag_assembly_state (frag_now);
@@ -9817,17 +9818,14 @@ xtensa_move_literals (void)
              frchain_to = literal_pool->tc_frag_data.lit_frchain;
              assert (frchain_to);
            }
-         insert_after = literal_pool;
-
-         while (insert_after->fr_next->fr_subtype != RELAX_LITERAL_POOL_END)
-           insert_after = insert_after->fr_next;
-
+         insert_after = literal_pool->tc_frag_data.literal_frag;
          dest_seg = insert_after->fr_next->tc_frag_data.lit_seg;
 
          *frag_splice = next_frag;
          search_frag->fr_next = insert_after->fr_next;
          insert_after->fr_next = search_frag;
          search_frag->tc_frag_data.lit_seg = dest_seg;
+         literal_pool->tc_frag_data.literal_frag = search_frag;
 
          /* Now move any fixups associated with this frag to the
             right section.  */
index 71481a9938e274a9d30615f55d758c64acd84209..251105ea2701ec03dfd9fd897801a80d82aa755c 100644 (file)
@@ -228,7 +228,9 @@ struct xtensa_frag_type
      variable points to the frag where the literal will be stored.  For
      literal frags, this variable points to the nearest literal pool
      location frag.  This literal frag will be moved to after this
-     location.  */
+     location.  For RELAX_LITERAL_POOL_BEGIN frags, this field points
+     to the frag immediately before the corresponding RELAX_LITERAL_POOL_END
+     frag, to make moving frags for this literal pool efficient.  */
   fragS *literal_frag;
 
   /* The destination segment for literal frags.  (Note that this is only
This page took 0.049449 seconds and 4 git commands to generate.