* frags.h (frag_room): Declare.
authorRichard Sandiford <rdsandiford@googlemail.com>
Fri, 23 Jan 2004 12:52:20 +0000 (12:52 +0000)
committerRichard Sandiford <rdsandiford@googlemail.com>
Fri, 23 Jan 2004 12:52:20 +0000 (12:52 +0000)
* frags.c (frag_room): New function.
* doc/internals.texi: Document it.

gas/ChangeLog
gas/doc/internals.texi
gas/frags.c
gas/frags.h

index 438ea36765ec2c2deb751e8a21add3037c8314af..9133f7c21f194a6be3d4be8e457a93ef9d77d150 100644 (file)
@@ -1,3 +1,9 @@
+2004-01-23  Richard Sandiford  <rsandifo@redhat.com>
+
+       * frags.h (frag_room): Declare.
+       * frags.c (frag_room): New function.
+       * doc/internals.texi: Document it.
+
 2004-01-22  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
 
        * config/tc-mips.c (append_insn): Don't do r3900 interlock
index 3d94f43b105d588c4ed58f24992aee2976199294..c62f8298c384523eb5e40a35a1420e86ed2835d7 100644 (file)
@@ -704,9 +704,10 @@ processing.  After this point, it is safe to operate on one chain per section.
 
 The assembler always has a current frag, named @code{frag_now}.  More space is
 allocated for the current frag using the @code{frag_more} function; this
-returns a pointer to the amount of requested space.  Relaxing is done using
-variant frags allocated by @code{frag_var} or @code{frag_variant}
-(@pxref{Relaxation}).
+returns a pointer to the amount of requested space.  The function
+@code{frag_room} says by how much the current frag can be extended.
+Relaxing is done using variant frags allocated by @code{frag_var}
+or @code{frag_variant} (@pxref{Relaxation}).
 
 @node GAS processing
 @section What GAS does when it runs
index 1521d4bf0110056763144251cd21d8daba21f400..83625d7fbf608d357eac8c9093a9bfaa09376200 100644 (file)
@@ -262,6 +262,14 @@ frag_wane (register fragS *fragP)
   fragP->fr_var = 0;
 }
 \f
+/* Return the number of bytes by which the current frag can be grown.  */
+
+int
+frag_room (void)
+{
+  return obstack_room (&frchain_now->frch_obstack);
+}
+\f
 /* Make an alignment frag.  The size of this frag will be adjusted to
    force the next frag to have the appropriate alignment.  ALIGNMENT
    is the power of two to which to align.  FILL_CHARACTER is the
index 73b71821b9c816f86de52043d471165e0b225842..52a6cfeb4bd5e70fe0672cf4f5c619fb3e04b07f 100644 (file)
@@ -141,6 +141,7 @@ void frag_align_pattern (int alignment, const char *fill_pattern,
 void frag_align_code (int alignment, int max);
 void frag_new (int old_frags_var_max_size);
 void frag_wane (fragS * fragP);
+int frag_room (void);
 
 char *frag_variant (relax_stateT type,
                    int max_chars,
This page took 0.031177 seconds and 4 git commands to generate.