This is the mail archive of the 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]

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

Thiemo Seufer <> writes:
> Richard Sandiford wrote:
>>   - It makes it possible to relax n64 NO_PIC sequences into GP-relative
>>     sequences.
>> However, the patch doesn't try to do any of these.  In particular,
>> it keeps the macro_build() argument, even though its value is no
>> longer used.  I thought this was better than drowning the main change
>> (which is quite finicky) in a sea of other stuff.  I'll try to clean
>> things up in a follow-on patch.
> You may however adjust the comment about GP optimization in the
> three n64 NO_PIC cases.

OK, will do.

>> Also tested on mips64vrel-elf, which, with all its multlibs, should
>> cover all the NO_PIC cases.  Tested against the binutils testsuite
>> on mips64{,el}-linux-gnu and mips64{,el}-elf.  OK to install?
> Ok for the mips-specific part.

Thanks.  Since the target-indepedent part was buried in a big patch,
I thought I'd better post it separately.  OK to install?


	* frags.h (frag_room): Declare.
	* frags.c (frag_room): New function.

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	15 Jan 2004 21:20:23 -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	15 Jan 2004 21:20:23 -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]