From: Joseph Myers Date: Thu, 3 Aug 2006 15:59:00 +0000 (+0000) Subject: gas: X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=97f87066f657fc69b80af6f551964d7a3e80d054;p=binutils-gdb.git gas: * config/tc-arm.c (parse_operands): Handle invalid register name for OP_RIWR_RIWC. gas/testsuite: * gas/arm/iwmmxt-bad.s: Test invalid register names for wldrw and wstrw. * gas/arm/iwmmxt-bad.l: Update. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 278a5917300..90c6776e87d 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2006-08-03 Joseph Myers + + * config/tc-arm.c (parse_operands): Handle invalid register name + for OP_RIWR_RIWC. + 2006-08-03 Joseph Myers * config/tc-arm.c (enum operand_parse_code): Add OP_RIWC_RIWG. diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 408d95fc042..9bf1439b99c 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -5749,9 +5749,10 @@ parse_operands (char *str, const unsigned char *pattern) case OP_RIWR_RIWC: { struct reg_entry *rege = arm_reg_parse_multi (&str); - if (rege->type != REG_TYPE_MMXWR - && rege->type != REG_TYPE_MMXWC - && rege->type != REG_TYPE_MMXWCG) + if (!rege + || (rege->type != REG_TYPE_MMXWR + && rege->type != REG_TYPE_MMXWC + && rege->type != REG_TYPE_MMXWCG)) { inst.error = _("iWMMXt data or control register expected"); goto failure; diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 8acc4ff4bc2..f222a5a3bdf 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2006-08-03 Joseph Myers + + * gas/arm/iwmmxt-bad.s: Test invalid register names for wldrw and + wstrw. + * gas/arm/iwmmxt-bad.l: Update. + 2006-08-03 Joseph Myers * gas/arm/iwmmxt.s: Test tmcr and tmrc with wcgr registers. diff --git a/gas/testsuite/gas/arm/iwmmxt-bad.l b/gas/testsuite/gas/arm/iwmmxt-bad.l index 65889380cf1..d030a6da46a 100644 --- a/gas/testsuite/gas/arm/iwmmxt-bad.l +++ b/gas/testsuite/gas/arm/iwmmxt-bad.l @@ -8,3 +8,5 @@ [^:]*:7: Error: iWMMXt data register expected -- `wstrh wcgr0,\[r1\]' [^:]*:8: Error: iWMMXt data register expected -- `wstrd wcgr0,\[r1\]' [^:]*:9: Error: iWMMXt control register expected -- `tmcr wibble,r1' +[^:]*:10: Error: iWMMXt data or control register expected -- `wldrw wibble,\[r1\]' +[^:]*:11: Error: iWMMXt data or control register expected -- `wstrw wibble,\[r1\]' diff --git a/gas/testsuite/gas/arm/iwmmxt-bad.s b/gas/testsuite/gas/arm/iwmmxt-bad.s index 47d8d71f865..98fc239374b 100644 --- a/gas/testsuite/gas/arm/iwmmxt-bad.s +++ b/gas/testsuite/gas/arm/iwmmxt-bad.s @@ -7,3 +7,5 @@ wstrh wcgr0,[r1] wstrd wcgr0,[r1] tmcr wibble,r1 + wldrw wibble,[r1] + wstrw wibble,[r1]