public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Frager, Neal" <neal.frager@amd.com>
To: Michael Eager <eager@eagercon.com>, Jan Beulich <jbeulich@suse.com>
Cc: "Erkiaga Elorza, Ibai" <ibai.erkiaga-elorza@amd.com>,
	"Mekala, Nagaraju" <nagaraju.mekala@amd.com>,
	"Hatle, Mark" <mark.hatle@amd.com>,
	"Mutyala, Sadanand" <sadanand.mutyala@amd.com>,
	"Nali, Appa Rao" <appa.rao.nali@amd.com>,
	"Hunsigida, Vidhumouli" <vidhumouli.hunsigida@amd.com>,
	"luca.ceresoli@bootlin.com" <luca.ceresoli@bootlin.com>,
	"binutils@sourceware.org" <binutils@sourceware.org>
Subject: RE: [PATCH v1 1/1] gas: expr: fix support .long 0U and .long 0u
Date: Sun, 1 Oct 2023 16:22:12 +0000	[thread overview]
Message-ID: <CH2PR12MB500486E747FD95AC4EC6B796F0C6A@CH2PR12MB5004.namprd12.prod.outlook.com> (raw)
In-Reply-To: <1eb5429b-94dc-e394-14f3-9063f19125eb@eagercon.com>

>> Fix support for .long 0U and .long 0u in GCC.
>>
>> This patch has been tested for years of AMD Xilinx Yocto releases as 
>> part of the following patch set:
>>
>> https://github.com/Xilinx/meta-xilinx/tree/master/meta-microblaze/rec
>> ipes-devtools/binutils/binutils
>>
>> Signed-off-by: Neal Frager <neal.frager@amd.com>
>> ---
>>   gas/expr.c | 9 +++++++++
>>   1 file changed, 9 insertions(+)
> 
> Without a testcase demonstrating what's wrong, I'd almost be inclined 
> to say that ...
> 
>> --- a/gas/expr.c
>> +++ b/gas/expr.c
>> @@ -824,6 +824,15 @@ operand (expressionS *expressionP, enum expr_mode mode)
>>   	      break;
>>   	    }
>>   	}
>> +      if ((*input_line_pointer == 'U') || (*input_line_pointer == 'u'))
>> +	{
>> +	  input_line_pointer--;
>> +
>> +	  integer_constant ((NUMBERS_WITH_SUFFIX || flag_m68k_mri)
>> +	                    ? 0 : 10,
>> +	                    expressionP);
>> +	  break;
>> +	}
>>         c = *input_line_pointer;
>>         switch (c)
>>   	{
> 
> ... this ought to be covered by logic in integer_constant() already. 
> But I think I see what the issue is. Nevertheless, go look for 
> tc_allow_U_suffix, which wants using here as well. Further I think the 
> same issue then exists for L/l suffixes?
> 
> Plus I think you want to add the new code to the switch() statement 
> rather than immediately ahead of it.
> 
> Jan
> 

Hi Michael, Jan,

> Neal --

> Can you provide a test case for this patch?  I'm not able to reproduce any error.

>Please take a look at gas/expr.c:541-543 (PR 19910: Look for, and ignore, a U suffix to the number).  Is this a fix for the same issue?
> https://sourceware.org/bugzilla/show_bug.cgi?id=19910

>As Jan says, it looks like this code, if needed, should be in the switch
>  statement.

Thank you for your review.

I would just like to clarify where this patch is coming from.  
I am not actually the author of the patches I am submitting.
When we provide a Microblaze toolchain with PetaLinux, Yocto or Vitis, we are actually applying all of the following patches to the binutils portion of the toolchain:
https://github.com/Xilinx/meta-xilinx/tree/master/meta-microblaze/recipes-devtools/binutils/binutils

Instead of continuing to carry the maintenance of this patch set with all of our releases, I would like to get as many of these patches upstreamed as possible.

This particular patch is coming from here:
https://github.com/Xilinx/meta-xilinx/blob/master/meta-microblaze/recipes-devtools/binutils/binutils/0009-Patch-Microblaze-fixed-bug-in-GCC-so-that-It-will-su.patch

It is possible that this patch is not required anymore.  I will check internally at AMD Xilinx to see if I can identify a way to reproduce the error that this patch is solving.

Until I can prove that this patch is still needed, let's skip it.  If it is really no longer necessary, I will try to get it removed from our list of patches.

Thanks for your help!

Best regards,
Neal Frager
AMD

  reply	other threads:[~2023-10-01 16:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-27 13:21 Neal Frager
2023-09-27 13:33 ` Jan Beulich
2023-09-28 19:27   ` Michael Eager
2023-10-01 16:22     ` Frager, Neal [this message]
2023-10-01 16:34       ` Michael Eager
2023-10-01 18:06         ` Frager, Neal
2023-10-16  9:18       ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CH2PR12MB500486E747FD95AC4EC6B796F0C6A@CH2PR12MB5004.namprd12.prod.outlook.com \
    --to=neal.frager@amd.com \
    --cc=appa.rao.nali@amd.com \
    --cc=binutils@sourceware.org \
    --cc=eager@eagercon.com \
    --cc=ibai.erkiaga-elorza@amd.com \
    --cc=jbeulich@suse.com \
    --cc=luca.ceresoli@bootlin.com \
    --cc=mark.hatle@amd.com \
    --cc=nagaraju.mekala@amd.com \
    --cc=sadanand.mutyala@amd.com \
    --cc=vidhumouli.hunsigida@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).