config/tc-aarch64.c: Avoid trying to parse a vector mov as immediate.
authorWill Newton <will.newton@linaro.org>
Fri, 1 Nov 2013 00:21:11 +0000 (17:21 -0700)
committerWill Newton <will.newton@linaro.org>
Tue, 5 Nov 2013 14:28:30 +0000 (14:28 +0000)
Parsing a vector mov instruction currently leads to a phantom undefined
symbol being added to the symbol table. e.g.:

       .text
       mov     x0, v0.D[0]

Produces an undefined symbol called "v0.D".

gas/ChangeLog:

2013-11-05  Will Newton  <will.newton@linaro.org>

PR gas/16103
* config/tc-aarch64.c (parse_operands): Avoid trying to
parse a vector register as an immediate.

gas/testsuite/ChangeLog:

2013-11-05  Will Newton  <will.newton@linaro.org>

* gas/aarch64/advsimd-mov-bad.d: New file.
* gas/aarch64/advsimd-mov-bad.s: Likewise.

gas/ChangeLog
gas/config/tc-aarch64.c
gas/testsuite/ChangeLog
gas/testsuite/gas/aarch64/advsimd-mov-bad.d [new file with mode: 0644]
gas/testsuite/gas/aarch64/advsimd-mov-bad.s [new file with mode: 0644]

index b5202e0511b94e2a76208cac256f9674b83b0760..7078b22dfb1765fa4fc8f5663a545902c98ea1cd 100644 (file)
@@ -1,3 +1,9 @@
+2013-11-05  Will Newton  <will.newton@linaro.org>
+
+       PR gas/16103
+       * config/tc-aarch64.c (parse_operands): Avoid trying to
+       parse a vector register as an immediate.
+
 2013-11-04  Jan Beulich <jbeulich@suse.com>
 
        * config/tc-i386.c (check_long_reg): Correct comment indentation.
index 14ffdadc1399c2337a7bc352c871024ed5b64196..02fe4de04aec5c124e8923bffdf76f98b5d5935e 100644 (file)
@@ -4810,7 +4810,8 @@ parse_operands (char *str, const aarch64_opcode *opcode)
        case AARCH64_OPND_IMM_MOV:
          {
            char *saved = str;
-           if (reg_name_p (str, REG_TYPE_R_Z_SP))
+           if (reg_name_p (str, REG_TYPE_R_Z_SP) ||
+               reg_name_p (str, REG_TYPE_VN))
              goto failure;
            str = saved;
            po_misc_or_fail (my_get_expression (&inst.reloc.exp, &str,
index 1d01b33446b00845230d949a2f52252d66eb61c2..19a61388b84409432cacd8909d76b5a3b8c35a69 100644 (file)
@@ -1,3 +1,8 @@
+2013-11-05  Will Newton  <will.newton@linaro.org>
+
+       * gas/aarch64/advsimd-mov-bad.d: New file.
+       * gas/aarch64/advsimd-mov-bad.s: Likewise.
+
 2013-11-04  Jan Beulich <jbeulich@suse.com>
 
        * gas/i386/x86-64-suffix-bad.[sl]: New.
diff --git a/gas/testsuite/gas/aarch64/advsimd-mov-bad.d b/gas/testsuite/gas/aarch64/advsimd-mov-bad.d
new file mode 100644 (file)
index 0000000..6ca9887
--- /dev/null
@@ -0,0 +1,12 @@
+#source: advsimd-mov-bad.s
+#readelf: -s --wide
+
+Symbol table '.symtab' contains 6 entries:
+ +Num:.*
+ +[0-9]+:.*
+ +[0-9]+:.*
+ +[0-9]+:.*
+ +[0-9]+:.*
+ +[0-9]+:.*
+#failif
+ +[0-9]+: +[0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +UND v0.D
diff --git a/gas/testsuite/gas/aarch64/advsimd-mov-bad.s b/gas/testsuite/gas/aarch64/advsimd-mov-bad.s
new file mode 100644 (file)
index 0000000..d7ba226
--- /dev/null
@@ -0,0 +1,2 @@
+        .text
+        mov     x0, v0.D[0]