diff --git a/gas/ChangeLog b/gas/ChangeLog
index 2f19a40b6d2229171a2bb4dba7340b5aa6288a44..075d6f07fddfd295cf2c1027533e58ec223a2a0c 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2009-06-19  Martin Schwidefsky  <schwidefsky@de.ibm.com>
+
+	* config/tc-s390.c (md_gather_operands): Accept an instruction
+	without operands if all operands are tagged as optional.
+
 2009-06-18  Nick Clifton  <nickc@redhat.com>
 
 	PR 10169
diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c
index da7d4c5fa056b7837e5267614a76752bde6c699a..f5c2a2ec481c7c7b23aace52d41896ef181d4ed9 100644
--- a/gas/config/tc-s390.c
+++ b/gas/config/tc-s390.c
@@ -1188,7 +1188,24 @@ md_gather_operands (char *str,
       if (ex.X_op == O_illegal)
 	as_bad (_("illegal operand"));
       else if (ex.X_op == O_absent)
-	as_bad (_("missing operand"));
+	{
+	  /* 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"));
+	}
       else if (ex.X_op == O_register || ex.X_op == O_constant)
 	{
 	  s390_lit_suffix (&str, &ex, ELF_SUFFIX_NONE);