Use frag_make_room() to grow the obstack.
authorNick Clifton <nickc@redhat.com>
Wed, 14 Nov 2001 17:43:32 +0000 (17:43 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 14 Nov 2001 17:43:32 +0000 (17:43 +0000)
gas/ChangeLog
gas/frags.c

index 337c8dc5b04b24a0182604f4a13f9221ced9fad7..3fbbd2cd8d94aa207bf824fe071d3e3537f58fb6 100644 (file)
@@ -1,3 +1,8 @@
+2001-11-12  Nick Clifton  <nickc@cambridge.redhat.com>
+
+       * frags.c (frag_grow): Use frag_make_room() to grow the
+       obstack.
+
 2001-11-14  Nick Clifton  <nickc@cambridge.redhat.com>
 
        * config/tc-sparc.c (md_apply_fix3): Do not remove the symbol's
index 8d7ed2f58ab455b9aa8a19f7666fd4dcf0fe2c48..e80ccedd72db2a435f106f5607633b9b53b4dc0f 100644 (file)
@@ -65,6 +65,12 @@ void
 frag_grow (nchars)
      unsigned int nchars;
 {
+  /* Try really hard to grow the obstack.  Creating a new obstack can
+     disable expression optimisations that would otherwise occur if
+     two symbols were located in the same obstack.  */
+  if (obstack_room (&frchain_now->frch_obstack) < nchars)
+    obstack_make_room (& frchain_now->frch_obstack, 2 * nchars);
+
   if (obstack_room (&frchain_now->frch_obstack) < nchars)
     {
       unsigned int n;
This page took 0.030007 seconds and 4 git commands to generate.