This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 1/5] S/390: Remove optional operand flag.
- From: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- To: binutils at sourceware dot org
- Date: Tue, 30 May 2017 10:52:08 +0200
- Subject: [PATCH 1/5] S/390: Remove optional operand flag.
- Authentication-results: sourceware.org; auth=none
- References: <20170530085212.26083-1-krebbel@linux.vnet.ibm.com>
The per operand optional flag hasn't been used for quite some time.
Cleanup some remains.
include/ChangeLog:
2017-05-30 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* opcode/s390.h: Remove S390_OPERAND_OPTIONAL.
gas/ChangeLog:
2017-05-30 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/tc-s390.c (md_gather_operands): Remove code dealing with
S390_OPERAND_OPTIONAL.
---
gas/config/tc-s390.c | 19 -------------------
include/opcode/s390.h | 16 ++++++----------
2 files changed, 6 insertions(+), 29 deletions(-)
diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c
index 40c9f6f..a31cb3a 100644
--- a/gas/config/tc-s390.c
+++ b/gas/config/tc-s390.c
@@ -1304,19 +1304,6 @@ md_gather_operands (char *str,
as_bad (_("illegal operand"));
else if (ex.X_op == O_absent)
{
- /* No operands, check if all operands can be skipped. */
- while (*opindex_ptr != 0 && operand->flags & S390_OPERAND_OPTIONAL)
- {
- if (operand->flags & S390_OPERAND_DISP)
- {
- /* An optional displacement makes the whole D(X,B)
- D(L,B) or D(B) block optional. */
- do {
- operand = s390_operands + *(++opindex_ptr);
- } while (!(operand->flags & S390_OPERAND_BASE));
- }
- operand = s390_operands + *(++opindex_ptr);
- }
if (opindex_ptr[0] == '\0')
break;
as_bad (_("missing operand"));
@@ -1486,8 +1473,6 @@ md_gather_operands (char *str,
while (opindex_ptr[1] != '\0')
{
operand = s390_operands + *(++opindex_ptr);
- if (operand->flags & S390_OPERAND_OPTIONAL)
- continue;
as_bad (_("syntax error; expected ','"));
break;
}
@@ -1530,8 +1515,6 @@ md_gather_operands (char *str,
while (opindex_ptr[1] != '\0')
{
operand = s390_operands + *(++opindex_ptr);
- if (operand->flags & S390_OPERAND_OPTIONAL)
- continue;
as_bad (_("syntax error; expected ','"));
break;
}
@@ -1564,8 +1547,6 @@ md_gather_operands (char *str,
while (opindex_ptr[1] != '\0')
{
operand = s390_operands + *(++opindex_ptr);
- if (operand->flags & S390_OPERAND_OPTIONAL)
- continue;
as_bad (_("syntax error; expected ','"));
break;
}
diff --git a/include/opcode/s390.h b/include/opcode/s390.h
index 2e07664..a2d42e0 100644
--- a/include/opcode/s390.h
+++ b/include/opcode/s390.h
@@ -156,21 +156,17 @@ extern const struct s390_operand s390_operands[];
/* This operand is a length. */
#define S390_OPERAND_LENGTH 0x200
-/* This operand is optional. Only a single operand at the end of
- the instruction may be optional. */
-#define S390_OPERAND_OPTIONAL 0x400
-
/* The operand needs to be a valid GP or FP register pair. */
-#define S390_OPERAND_REG_PAIR 0x800
+#define S390_OPERAND_REG_PAIR 0x400
/* This operand names a vector register. The disassembler uses this
to print register names with a leading 'v'. */
-#define S390_OPERAND_VR 0x1000
+#define S390_OPERAND_VR 0x800
-#define S390_OPERAND_CP16 0x2000
+#define S390_OPERAND_CP16 0x1000
-#define S390_OPERAND_OR1 0x4000
-#define S390_OPERAND_OR2 0x8000
-#define S390_OPERAND_OR8 0x10000
+#define S390_OPERAND_OR1 0x2000
+#define S390_OPERAND_OR2 0x4000
+#define S390_OPERAND_OR8 0x8000
#endif /* S390_H */
--
2.9.1