public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] gas: expr: fix support .long 0U and .long 0u
@ 2023-09-27 13:21 Neal Frager
  2023-09-27 13:33 ` Jan Beulich
  0 siblings, 1 reply; 7+ messages in thread
From: Neal Frager @ 2023-09-27 13:21 UTC (permalink / raw)
  To: binutils
  Cc: ibai.erkiaga-elorza, nagaraju.mekala, mark.hatle,
	sadanand.mutyala, appa.rao.nali, vidhumouli.hunsigida,
	luca.ceresoli, Neal Frager

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/recipes-devtools/binutils/binutils

Signed-off-by: Neal Frager <neal.frager@amd.com>
---
 gas/expr.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gas/expr.c b/gas/expr.c
index 204cfebc4c7..0d4e955b63a 100644
--- 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)
 	{
-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-10-16  9:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-27 13:21 [PATCH v1 1/1] gas: expr: fix support .long 0U and .long 0u Neal Frager
2023-09-27 13:33 ` Jan Beulich
2023-09-28 19:27   ` Michael Eager
2023-10-01 16:22     ` Frager, Neal
2023-10-01 16:34       ` Michael Eager
2023-10-01 18:06         ` Frager, Neal
2023-10-16  9:18       ` Jan Beulich

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).