[3/8] x86/Intel: drop unnecessary bracket matching from parse_operands()

Message ID 52f83362-8640-dcd5-2fa7-f0cf3ba13fbf@suse.com
State New
Headers show
Series
  • x86: some tidying and quoted symbols fixes
Related show

Commit Message

Jan Beulich via Binutils June 4, 2021, 1:40 p.m.
While subsequent processing in AT&T mode relies on this simplistic early
checking, Intel mode hasn't been for quite a long time (or perhaps never
really did).

gas/
2021-06-XX  Jan Beulich  <jbeulich@suse.com>

	* config/tc-i386.c (parse_operands): Don't check for matched
	square brackets.

Patch

--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -5556,12 +5556,9 @@  parse_operands (char *l, const char *mne
 	    {
 	      if (paren_not_balanced)
 		{
-		  if (!intel_syntax)
-		    as_bad (_("unbalanced parenthesis in operand %d."),
-			    i.operands + 1);
-		  else
-		    as_bad (_("unbalanced brackets in operand %d."),
-			    i.operands + 1);
+		  know (!intel_syntax);
+		  as_bad (_("unbalanced parenthesis in operand %d."),
+			  i.operands + 1);
 		  return NULL;
 		}
 	      else
@@ -5581,13 +5578,6 @@  parse_operands (char *l, const char *mne
 	      if (*l == ')')
 		--paren_not_balanced;
 	    }
-	  else
-	    {
-	      if (*l == '[')
-		++paren_not_balanced;
-	      if (*l == ']')
-		--paren_not_balanced;
-	    }
 	  l++;
 	}
       if (l != token_start)