diff options
author | Will Newton <will.newton@linaro.org> | 2013-10-31 17:21:11 -0700 |
---|---|---|
committer | Will Newton <will.newton@linaro.org> | 2013-11-05 14:36:13 +0000 |
commit | 05c4e689c3c66b22851b96fc99b9a5c6750d40c2 (patch) | |
tree | b15415305b5ec63360529b9cfc9d6c848b60803c | |
parent | a7b897de6bc3409e7b4c7d3d7a7e6effde650fff (diff) | |
download | ppe42-binutils-05c4e689c3c66b22851b96fc99b9a5c6750d40c2.tar.gz ppe42-binutils-05c4e689c3c66b22851b96fc99b9a5c6750d40c2.zip |
config/tc-aarch64.c: Avoid trying to parse a vector mov as immediate.
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.
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-aarch64.c | 3 | ||||
-rw-r--r-- | gas/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/aarch64/advsimd-mov-bad.d | 12 | ||||
-rw-r--r-- | gas/testsuite/gas/aarch64/advsimd-mov-bad.s | 2 |
5 files changed, 27 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 6d0fe3da51..2010f58740 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -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-09-20 Alan Modra <amodra@gmail.com> * configure: Regenerate. diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c index 14ffdadc13..02fe4de04a 100644 --- a/gas/config/tc-aarch64.c +++ b/gas/config/tc-aarch64.c @@ -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, diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 80c3cfc7ae..de79e5e311 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -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-10-12 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/mpx.s: Remove bndcl/bndcu/bndcn tests with AX. diff --git a/gas/testsuite/gas/aarch64/advsimd-mov-bad.d b/gas/testsuite/gas/aarch64/advsimd-mov-bad.d new file mode 100644 index 0000000000..6ca98873ac --- /dev/null +++ b/gas/testsuite/gas/aarch64/advsimd-mov-bad.d @@ -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 index 0000000000..d7ba2262a5 --- /dev/null +++ b/gas/testsuite/gas/aarch64/advsimd-mov-bad.s @@ -0,0 +1,2 @@ + .text + mov x0, v0.D[0] |