S/390: Add check for length field operand
authorAndreas Krebbel <krebbel@linux.vnet.ibm.com>
Tue, 10 Mar 2015 11:41:57 +0000 (12:41 +0100)
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>
Tue, 10 Mar 2015 11:49:34 +0000 (12:49 +0100)
gas/
2015-03-10  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

* gas/config/tc-s390.c (md_gather_operands): Check for valid
length field operands.

gas/ChangeLog
gas/config/tc-s390.c

index 0a6a4b925486600b4be45a907ce222687a9eed3f..577a1cd046003cdafa65674d9743f6031882af9b 100644 (file)
@@ -1,3 +1,8 @@
+2015-03-10  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
+
+       * config/tc-s390.c (md_gather_operands): Check for valid
+       length field operands.
+
 2015-03-10  Michael Perkins  <perkinsmg75@yahoo.co.uk>
 
        * config/tc-arm.c (parse_operands): Fix bug setting writeback
index 9102c609b4a5a9c160c28dab449b5f64c8d03255..5051baf01372b69bb84deae04513dafb31a416de 100644 (file)
@@ -1216,6 +1216,9 @@ md_gather_operands (char *str,
            }
          else
            {
+             if ((operand->flags & S390_OPERAND_LENGTH)
+                 && ex.X_op != O_constant)
+               as_fatal (_("invalid length field specified"));
              if ((operand->flags & S390_OPERAND_INDEX)
                  && ex.X_add_number == 0
                  && warn_areg_zero)