[binutils-gdb] x86: remove pointless 2nd parameter from check_VecOperations()
Jan Beulich
jbeulich@sourceware.org
Mon Jun 7 10:02:29 GMT 2021
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f70c6814bb5127c155246c24cffe9d3405137c01
commit f70c6814bb5127c155246c24cffe9d3405137c01
Author: Jan Beulich <jbeulich@suse.com>
Date: Mon Jun 7 12:01:14 2021 +0200
x86: remove pointless 2nd parameter from check_VecOperations()
In the one case where non-NULL gets passed, passing NULL has the same
effect. Hence the parameter is not needed at all.
Diff:
---
gas/ChangeLog | 6 ++++++
gas/config/tc-i386-intel.c | 2 +-
gas/config/tc-i386.c | 9 ++++-----
3 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/gas/ChangeLog b/gas/ChangeLog
index a87815c5d43..2f11767b5be 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2021-06-07 Jan Beulich <jbeulich@suse.com>
* config/tc-i386.c (i386_immediate): Don't call check_VecOperations.
diff --git a/gas/config/tc-i386-intel.c b/gas/config/tc-i386-intel.c
index 3c01b5ee9e2..d49d50d7d5e 100644
--- a/gas/config/tc-i386-intel.c
+++ b/gas/config/tc-i386-intel.c
@@ -606,7 +606,7 @@ i386_intel_operand (char *operand_string, int got_a_float)
/* Handle vector operations. */
if (*input_line_pointer == '{')
{
- char *end = check_VecOperations (input_line_pointer, NULL);
+ char *end = check_VecOperations (input_line_pointer);
if (end)
input_line_pointer = end;
else
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 9e7a97f37fd..3a59ea086ac 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -10510,14 +10510,13 @@ pe_directive_secrel (int dummy ATTRIBUTE_UNUSED)
/* Handle Vector operations. */
static char *
-check_VecOperations (char *op_string, char *op_end)
+check_VecOperations (char *op_string)
{
const reg_entry *mask;
const char *saved;
char *end_op;
- while (*op_string
- && (op_end == NULL || op_string < op_end))
+ while (*op_string)
{
saved = op_string;
if (*op_string == '{')
@@ -11446,7 +11445,7 @@ i386_att_operand (char *operand_string)
/* Handle vector operations. */
if (*op_string == '{')
{
- op_string = check_VecOperations (op_string, NULL);
+ op_string = check_VecOperations (op_string);
if (op_string == NULL)
return 0;
}
@@ -11520,7 +11519,7 @@ i386_att_operand (char *operand_string)
vop_start = strchr (op_string, '{');
if (vop_start && vop_start < base_string)
{
- if (check_VecOperations (vop_start, base_string) == NULL)
+ if (check_VecOperations (vop_start) == NULL)
return 0;
base_string = vop_start;
}
More information about the Binutils-cvs
mailing list