This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: [PATCH 5/6] gas/arc: Allow greater range of characters into flag names
- From: Claudiu Zissulescu <Claudiu dot Zissulescu at synopsys dot com>
- To: Andrew Burgess <andrew dot burgess at embecosm dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Cc: "noamca at mellanox dot com" <noamca at mellanox dot com>
- Date: Mon, 4 Apr 2016 07:49:35 +0000
- Subject: RE: [PATCH 5/6] gas/arc: Allow greater range of characters into flag names
- Authentication-results: sourceware.org; auth=none
- References: <1459637470-30538-1-git-send-email-andrew dot burgess at embecosm dot com> <1459637470-30538-5-git-send-email-andrew dot burgess at embecosm dot com>
Ok.
Cheers,
Claudiu
> -----Original Message-----
> From: Andrew Burgess [mailto:andrew.burgess@embecosm.com]
> Sent: Sunday, April 03, 2016 12:51 AM
> To: binutils@sourceware.org
> Cc: Claudiu.Zissulescu@synopsys.com; noamca@mellanox.com; Andrew
> Burgess
> Subject: [PATCH 5/6] gas/arc: Allow greater range of characters into flag
> names
>
> There's little point limiting the characters that can be accepted into
> flag names. It does mean earlier error detection, but invalid flags
> will be detected later in the process anyway, and limiting the
> acceptable character range earlier only means that when a new flag is
> added that uses a previously unused character the programmer must
> remember to update this part of the assembler.
>
> For now all alpha-numeric characters seems like a reasonable set to
> allow.
>
> gas/ChangeLog:
>
> * config/tc-arc.c (tokenize_flags): Allow greater range of
> characters into flag names.
> ---
> gas/ChangeLog | 5 +++++
> gas/config/tc-arc.c | 3 ++-
> 2 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c
> index 45bf30f..4fd5403 100644
> --- a/gas/config/tc-arc.c
> +++ b/gas/config/tc-arc.c
> @@ -1152,7 +1152,8 @@ tokenize_flags (const char *str,
> if (num_flags >= nflg)
> goto err;
>
> - flgnamelen = strspn (input_line_pointer,
> "abcdefghilmnopqrstvwxz");
> + flgnamelen = strspn (input_line_pointer,
> + "abcdefghijklmnopqrstuvwxyz0123456789");
> if (flgnamelen > MAX_FLAG_NAME_LENGTH)
> goto err;
>
> --
> 2.5.1