]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2009-08-19 Sterling Augustine <sterling@tensilica.com>
authorSterling Augustine <saugustine@google.com>
Wed, 19 Aug 2009 16:10:46 +0000 (16:10 +0000)
committerSterling Augustine <saugustine@google.com>
Wed, 19 Aug 2009 16:10:46 +0000 (16:10 +0000)
* config/tc-xtensa.h (xtensa_frag_data): Rename unused field fr_prev
to no_transform_end.
* config/tc-xtensa.c (xtensa_mark_difference_of_two_symbols): Set
and use no_transform_end.

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

index 00b093b3dff36177fdea7bbb4c03a0f1ed200d31..2292534214bde97f7cb5fb02449f57a63be7803e 100644 (file)
@@ -1,3 +1,10 @@
+2009-08-19  Sterling Augustine  <sterling@tensilica.com>
+
+       * config/tc-xtensa.h (xtensa_frag_data): Rename unused field fr_prev
+       to no_transform_end.
+       * config/tc-xtensa.c (xtensa_mark_difference_of_two_symbols): Set
+       and use no_transform_end.
+
 2009-08-18  Kai Tietz  <kai.tietz@onevision.com>
 
        * config/obj-coff-seh.c: Add copyright notice.
index caea25c4829367f71aa92867bef1e1c133795932..645af97be856d06cec7a2cf3718ceea631118494 100644 (file)
@@ -7460,6 +7460,7 @@ xtensa_mark_difference_of_two_symbols (void)
            {
              fragS *start;
              fragS *end;
+             fragS *walk;
 
              if (symbol_get_frag (left)->fr_address 
                  <= symbol_get_frag (right)->fr_address)
@@ -7472,12 +7473,19 @@ xtensa_mark_difference_of_two_symbols (void)
                  start = symbol_get_frag (right);
                  end = symbol_get_frag (left);
                }
+
+             if (start->tc_frag_data.no_transform_end != NULL)
+               walk = start->tc_frag_data.no_transform_end;
+             else
+               walk = start;
              do 
                {
-                 start->tc_frag_data.is_no_transform = 1;
-                 start = start->fr_next;
+                 walk->tc_frag_data.is_no_transform = 1;
+                 walk = walk->fr_next;
                }
-             while (start && start->fr_address < end->fr_address);
+             while (walk && walk->fr_address < end->fr_address);
+
+             start->tc_frag_data.no_transform_end = walk;
            }
        }
     }
index 91607aff61af7bb07f0a2540c9fd60ec60730c60..ba613e4ed1b206814d633944a65af28c11bc7f64 100644 (file)
@@ -263,9 +263,10 @@ struct xtensa_frag_type
   symbolS *slot_symbols[MAX_SLOTS];
   offsetT slot_offsets[MAX_SLOTS];
 
-  /* The global aligner needs to walk backward through the list of
-     frags.  This field is only valid after xtensa_end.  */
-  fragS *fr_prev;
+  /* When marking frags after this one in the chain as no transform,
+     cache the last one in the chain, so that we can skip to the
+     end of the chain.  */
+  fragS *no_transform_end;
 };