summaryrefslogtreecommitdiffstats
path: root/gas/config
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2005-08-12 18:00:56 +0000
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2005-08-12 18:00:56 +0000
commit6c639ef96454b5b9b0cd9aed854607af7937f600 (patch)
tree71416ce3f9f9ee0426d353c680b8abc32f21057c /gas/config
parent42e9a5a09c7bb1c3a030beefc9609ff620fa7831 (diff)
downloadppe42-binutils-6c639ef96454b5b9b0cd9aed854607af7937f600.tar.gz
ppe42-binutils-6c639ef96454b5b9b0cd9aed854607af7937f600.zip
* config/tc-s390.c (md_parse_option): Add cpu type z9-109.
(md_gather_operands): Add support for optional operands.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-s390.c47
1 files changed, 41 insertions, 6 deletions
diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c
index 87c7a88f32..56b5b2594f 100644
--- a/gas/config/tc-s390.c
+++ b/gas/config/tc-s390.c
@@ -410,6 +410,8 @@ md_parse_option (c, arg)
current_cpu = S390_OPCODE_Z900;
else if (strcmp (arg + 5, "z990") == 0)
current_cpu = S390_OPCODE_Z990;
+ else if (strcmp (arg + 5, "z9-109") == 0)
+ current_cpu = S390_OPCODE_Z9_109;
else
{
as_bad (_("invalid switch -m%s"), arg);
@@ -1353,8 +1355,19 @@ md_gather_operands (str, insn, opcode)
/* If there is a next operand it must be separated by a comma. */
if (opindex_ptr[1] != '\0')
{
- if (*str++ != ',')
- as_bad (_("syntax error; expected ,"));
+ if (*str != ',')
+ {
+ while (opindex_ptr[1] != '\0')
+ {
+ operand = s390_operands + *(++opindex_ptr);
+ if (operand->flags & S390_OPERAND_OPTIONAL)
+ continue;
+ as_bad (_("syntax error; expected ,"));
+ break;
+ }
+ }
+ else
+ str++;
}
}
else
@@ -1386,8 +1399,19 @@ md_gather_operands (str, insn, opcode)
/* If there is a next operand it must be separated by a comma. */
if (opindex_ptr[1] != '\0')
{
- if (*str++ != ',')
- as_bad (_("syntax error; expected ,"));
+ if (*str != ',')
+ {
+ while (opindex_ptr[1] != '\0')
+ {
+ operand = s390_operands + *(++opindex_ptr);
+ if (operand->flags & S390_OPERAND_OPTIONAL)
+ continue;
+ as_bad (_("syntax error; expected ,"));
+ break;
+ }
+ }
+ else
+ str++;
}
}
else
@@ -1405,8 +1429,19 @@ md_gather_operands (str, insn, opcode)
/* If there is a next operand it must be separated by a comma. */
if (opindex_ptr[1] != '\0')
{
- if (*str++ != ',')
- as_bad (_("syntax error; expected ,"));
+ if (*str != ',')
+ {
+ while (opindex_ptr[1] != '\0')
+ {
+ operand = s390_operands + *(++opindex_ptr);
+ if (operand->flags & S390_OPERAND_OPTIONAL)
+ continue;
+ as_bad (_("syntax error; expected ,"));
+ break;
+ }
+ }
+ else
+ str++;
}
}
}
OpenPOWER on IntegriCloud