From c1a44b0823606ed5813c912c66f1a67d904656dd Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 14 Nov 2001 17:43:32 +0000 Subject: [PATCH] Use frag_make_room() to grow the obstack. --- gas/ChangeLog | 5 +++++ gas/frags.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/gas/ChangeLog b/gas/ChangeLog index 337c8dc5b04..3fbbd2cd8d9 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2001-11-12 Nick Clifton + + * frags.c (frag_grow): Use frag_make_room() to grow the + obstack. + 2001-11-14 Nick Clifton * config/tc-sparc.c (md_apply_fix3): Do not remove the symbol's diff --git a/gas/frags.c b/gas/frags.c index 8d7ed2f58ab..e80ccedd72d 100644 --- a/gas/frags.c +++ b/gas/frags.c @@ -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; -- 2.30.2