This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: frags patch [was Re: Rework MIPS macro relaxation, ...]


Hans-Peter Nilsson <hp@bitrange.com> writes:
> On Sat, 17 Jan 2004, Richard Sandiford wrote:
>> 	* frags.h (frag_room): Declare.
>> 	* frags.c (frag_room): New function.
>
> Update the docs in internals.texi?

New one to me, I have to admit.  How's this?

Richard


	* frags.h (frag_room): Declare.
	* frags.c (frag_room): New function.
	* doc/internals.texi: Document it.

Index: doc/internals.texi
===================================================================
RCS file: /cvs/src/src/gas/doc/internals.texi,v
retrieving revision 1.37
diff -c -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.37 internals.texi
*** doc/internals.texi	26 Oct 2003 18:12:03 -0000	1.37
--- doc/internals.texi	19 Jan 2004 20:31:44 -0000
*************** processing.  After this point, it is saf
*** 704,712 ****
  
  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}).
  
  @node GAS processing
  @section What GAS does when it runs
--- 704,713 ----
  
  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.  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: frags.h
===================================================================
RCS file: /cvs/src/src/gas/frags.h,v
retrieving revision 1.14
diff -c -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.14 frags.h
*** frags.h	22 Nov 2003 16:03:03 -0000	1.14
--- frags.h	19 Jan 2004 20:31:44 -0000
*************** void frag_align_pattern (int alignment, 
*** 141,146 ****
--- 141,147 ----
  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,
Index: frags.c
===================================================================
RCS file: /cvs/src/src/gas/frags.c,v
retrieving revision 1.14
diff -c -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.14 frags.c
*** frags.c	22 Nov 2003 16:03:03 -0000	1.14
--- frags.c	19 Jan 2004 20:31:44 -0000
*************** frag_wane (register fragS *fragP)
*** 262,267 ****
--- 262,275 ----
    fragP->fr_var = 0;
  }
  
+ /* Return the number of bytes by which the current frag can be grown.  */
+ 
+ int
+ frag_room (void)
+ {
+   return obstack_room (&frchain_now->frch_obstack);
+ }
+ 
  /* 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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]