[binutils-gdb] Sparc: use is_end_of_stmt()
Jan Beulich
jbeulich@sourceware.org
Fri Mar 7 07:19:44 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=16856962c73eda312870b26cabd350c35f632d93
commit 16856962c73eda312870b26cabd350c35f632d93
Author: Jan Beulich <jbeulich@suse.com>
Date: Fri Mar 7 08:17:54 2025 +0100
Sparc: use is_end_of_stmt()
... instead of open-coding it. This also fixes two array underrun
issues, when plain char is a signed type.
Diff:
---
gas/config/tc-sparc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c
index a22efbf5deb..e303169e73d 100644
--- a/gas/config/tc-sparc.c
+++ b/gas/config/tc-sparc.c
@@ -4450,7 +4450,7 @@ s_data1 (void)
static void
s_proc (int ignore ATTRIBUTE_UNUSED)
{
- while (!is_end_of_line[(unsigned char) *input_line_pointer])
+ while (!is_end_of_stmt (*input_line_pointer))
{
++input_line_pointer;
}
@@ -4817,7 +4817,7 @@ sparc_cons (expressionS *exp, int size)
char *end = ++input_line_pointer;
int npar = 0;
- while (! is_end_of_line[(c = *end)])
+ while (! is_end_of_stmt (c = *end))
{
if (c == '(')
npar++;
@@ -4848,7 +4848,7 @@ sparc_cons (expressionS *exp, int size)
input_line_pointer++;
SKIP_WHITESPACE ();
c = *input_line_pointer;
- if (! is_end_of_line[c] && c != ',')
+ if (! is_end_of_stmt (c) && c != ',')
as_bad (_("Illegal operands: garbage after %%r_%s%d()"),
sparc_cons_special_reloc, size * 8);
}
More information about the Binutils-cvs
mailing list