[binutils-gdb] C-Sky: use is_end_of_stmt()

Jan Beulich jbeulich@sourceware.org
Fri Mar 7 07:13:19 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4a87b58f9571eda712664d2046a0861b275800ec

commit 4a87b58f9571eda712664d2046a0861b275800ec
Author: Jan Beulich <jbeulich@suse.com>
Date:   Fri Mar 7 08:11:11 2025 +0100

    C-Sky: use is_end_of_stmt()
    
    ... instead of open-coding it.

Diff:
---
 gas/config/tc-csky.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/gas/config/tc-csky.c b/gas/config/tc-csky.c
index 5ff7458e2c5..81f1b759c15 100644
--- a/gas/config/tc-csky.c
+++ b/gas/config/tc-csky.c
@@ -2247,7 +2247,7 @@ lex_got (enum bfd_reloc_code_real *reloc,
   unsigned int j;
 
   for (cp = input_line_pointer; *cp != '@'; cp++)
-    if (is_end_of_line[(unsigned char) *cp])
+    if (is_end_of_stmt (*cp))
       return NULL;
 
   for (j = 0; j < sizeof (gotrel) / sizeof (gotrel[0]); j++)
@@ -2332,17 +2332,17 @@ parse_fexp (char *s, expressionS *e, unsigned char isdouble, uint64_t *dbnum)
   know (length <= 8);
   know (err != NULL || length > 0);
 
-  if (!is_end_of_line[(unsigned char) *input_line_pointer])
+  if (!is_end_of_stmt (*input_line_pointer))
     as_bad (_("immediate operand required"));
-  while (!is_end_of_line[(unsigned char) *input_line_pointer])
+  while (!is_end_of_stmt (*input_line_pointer))
     input_line_pointer++;
 
   if (err)
     {
       as_bad (_("bad floating literal: %s"), err);
-      while (!is_end_of_line[(unsigned char) *input_line_pointer])
+      while (!is_end_of_stmt (*input_line_pointer))
 	input_line_pointer++;
-      know (is_end_of_line[(unsigned char) input_line_pointer[-1]]);
+      know (is_end_of_stmt (input_line_pointer[-1]));
       return input_line_pointer;
     }
 
@@ -3278,14 +3278,14 @@ csky_count_operands (char *str)
   unsigned int oprnd_num;
   int bracket_cnt = 0;
 
-  if (is_end_of_line[(unsigned char) *oper_end])
+  if (is_end_of_stmt (*oper_end))
     oprnd_num = 0;
   else
     oprnd_num = 1;
 
   /* Count how many operands.  */
   if (oprnd_num)
-    while (!is_end_of_line[(unsigned char) *oper_end])
+    while (!is_end_of_stmt (*oper_end))
       {
 	if (*oper_end == '(' || *oper_end == '<')
 	  {
@@ -4353,7 +4353,7 @@ parse_operands_op (char *str, struct csky_opcode_info *op)
 		  break;
 		}
 	    }
-	  else if (!is_end_of_line[(unsigned char) *oper])
+	  else if (!is_end_of_stmt (*oper))
 	    {
 	      SET_ERROR_STRING (ERROR_BAD_END, NULL);
 	      flag_pass = false;


More information about the Binutils-cvs mailing list