[PATCH v1 1/1] gas: expr: fix support .long 0U and .long 0u
Jan Beulich
jbeulich@suse.com
Wed Sep 27 13:33:13 GMT 2023
On 27.09.2023 15:21, Neal Frager via Binutils wrote:
> 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(+)
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
More information about the Binutils
mailing list