aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2021-06-07 12:01:45 +0200
committerJan Beulich <jbeulich@suse.com>2021-06-07 12:01:45 +0200
commit98ff9f1c5d0bff7545d508288a5699522277d570 (patch)
tree124eb80dc91916f841ea27307924883328e14e00 /gas
parentf70c6814bb5127c155246c24cffe9d3405137c01 (diff)
downloadgdb-98ff9f1c5d0bff7545d508288a5699522277d570.zip
gdb-98ff9f1c5d0bff7545d508288a5699522277d570.tar.gz
gdb-98ff9f1c5d0bff7545d508288a5699522277d570.tar.bz2
x86/Intel: drop unnecessary bracket matching from parse_operands()
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).
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-i386.c16
2 files changed, 8 insertions, 13 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 2f11767..66e040a 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,10 @@
2021-06-07 Jan Beulich <jbeulich@suse.com>
+ * config/tc-i386.c (parse_operands): Don't check for matched
+ square brackets.
+
+2021-06-07 Jan Beulich <jbeulich@suse.com>
+
* config/tc-i386.c (check_VecOperations): Remove 2nd parameter.
(i386_att_operand): Adjust calls to check_VecOperations.
* config/tc-i386-intel.c (i386_intel_operand): Likewise.
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 3a59ea0..a20aea2 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -5556,12 +5556,9 @@ parse_operands (char *l, const char *mnemonic)
{
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 *mnemonic)
if (*l == ')')
--paren_not_balanced;
}
- else
- {
- if (*l == '[')
- ++paren_not_balanced;
- if (*l == ']')
- --paren_not_balanced;
- }
l++;
}
if (l != token_start)