This is the mail archive of the binutils@sourceware.org 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: [patch][GAS] combine NUMBERS_WITH_SUFFIX with LOCAL_LABELS_FB (forz80)


Op zaterdag 05 november 2005 14:04, schreef Alan Modra:
> On Sun, Oct 30, 2005 at 10:04:08PM +0200, Arnold Metselaar wrote:
> > The patch below allows the usage of backward references on
> > targets with NUMBERS_WITH_SUFFIX. If NUMBERS_WITH_SUFFIX
> > and LOCAL_LABELS_FB are both defined as 1, then suffix 'B'
> > indicates a binary number and suffix 'b' indicates a
> > backward reference to a local numeric label.
> > The Z80 target is currently the only one that has both
> > NUMBERS_WITH_SUFFIX and LOCAL_LABELS_FB.
>
> You neglect to mention that this block of code is entered for
> flag_m68k_mri as well as NUMBERS_WITH_SUFFIX. 
> (LOCAL_LABELS_FB isn't defined in tc-m68k.h, but might be
> defined by one of the te- files, eg. it will be defined for
> m68k-linux.)  I think you might want
>
> -	  if (c == 'B')
> +	  /* If we have both NUMBERS_WITH_SUFFIX and LOCAL_LABELS_FB,
> +             we distinguish between 'B' and  'b'.  This is the case for
> +             Z80.  */ 
> +	  if ((NUMBERS_WITH_SUFFIX && LOCAL_LABELS_FB ? *suffix : c) == 'B')
>
This change is fine for me.

> With that change, I guess this is a reasonable hack and OK to
> apply.
>


>
> BTW, at first I read your changelog entry to mean "Don't
> match 'B' as binary suffix when !LOCAL_LABELS_FB".  I think
> the following is clearer:
>
> gas/
> 	* expr.c (integer_constant): Only match 'B' as binary suffix
> if NUMBERS_WITH_SUFFIX and LOCAL_LABELS_FB.  Allow both 'b'
> and 'B' otherwise.
>
This is confusing to me since the first sentence makes me think that the word "only" 
modifies "match" rather than " 'B' " and then the second sentence makes no sense.
In the following it is clear that "only" modifies " 'B' " rather than "match":

gas/
 	* expr.c (integer_constant): Match only 'B' as binary suffix
 if NUMBERS_WITH_SUFFIX and LOCAL_LABELS_FB.  Allow both 'b'
 and 'B' otherwise.

Can you commit these changes for me? I don't have write access to the CVS-repository.
Arnold Metselaar


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]