|
|
881b8e |
commit 8db49cc2de52033990ae5d4d6aacedc8f986e803
|
|
|
881b8e |
Author: Will Newton <will.newton@linaro.org>
|
|
|
881b8e |
Date: Thu Oct 31 17:21:11 2013 -0700
|
|
|
881b8e |
|
|
|
881b8e |
config/tc-aarch64.c: Avoid trying to parse a vector mov as immediate.
|
|
|
881b8e |
|
|
|
881b8e |
Parsing a vector mov instruction currently leads to a phantom undefined
|
|
|
881b8e |
symbol being added to the symbol table. e.g.:
|
|
|
881b8e |
|
|
|
881b8e |
.text
|
|
|
881b8e |
mov x0, v0.D[0]
|
|
|
881b8e |
|
|
|
881b8e |
Produces an undefined symbol called "v0.D".
|
|
|
881b8e |
|
|
|
881b8e |
gas/ChangeLog:
|
|
|
881b8e |
|
|
|
881b8e |
2013-11-05 Will Newton <will.newton@linaro.org>
|
|
|
881b8e |
|
|
|
881b8e |
PR gas/16103
|
|
|
881b8e |
* config/tc-aarch64.c (parse_operands): Avoid trying to
|
|
|
881b8e |
parse a vector register as an immediate.
|
|
|
881b8e |
|
|
|
881b8e |
gas/testsuite/ChangeLog:
|
|
|
881b8e |
|
|
|
881b8e |
2013-11-05 Will Newton <will.newton@linaro.org>
|
|
|
881b8e |
|
|
|
881b8e |
* gas/aarch64/advsimd-mov-bad.d: New file.
|
|
|
881b8e |
* gas/aarch64/advsimd-mov-bad.s: Likewise.
|
|
|
881b8e |
|
|
|
881b8e |
|
|
|
881b8e |
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
|
|
|
881b8e |
index 14ffdad..02fe4de 100644
|
|
|
881b8e |
--- a/gas/config/tc-aarch64.c
|
|
|
881b8e |
+++ b/gas/config/tc-aarch64.c
|
|
|
881b8e |
@@ -4810,7 +4810,8 @@ parse_operands (char *str, const aarch64_opcode *opcode)
|
|
|
881b8e |
case AARCH64_OPND_IMM_MOV:
|
|
|
881b8e |
{
|
|
|
881b8e |
char *saved = str;
|
|
|
881b8e |
- if (reg_name_p (str, REG_TYPE_R_Z_SP))
|
|
|
881b8e |
+ if (reg_name_p (str, REG_TYPE_R_Z_SP) ||
|
|
|
881b8e |
+ reg_name_p (str, REG_TYPE_VN))
|
|
|
881b8e |
goto failure;
|
|
|
881b8e |
str = saved;
|
|
|
881b8e |
po_misc_or_fail (my_get_expression (&inst.reloc.exp, &str,
|
|
|
881b8e |
diff --git a/gas/testsuite/gas/aarch64/advsimd-mov-bad.d b/gas/testsuite/gas/aarch64/advsimd-mov-bad.d
|
|
|
881b8e |
new file mode 100644
|
|
|
881b8e |
index 0000000..6ca9887
|
|
|
881b8e |
--- /dev/null
|
|
|
881b8e |
+++ b/gas/testsuite/gas/aarch64/advsimd-mov-bad.d
|
|
|
881b8e |
@@ -0,0 +1,12 @@
|
|
|
881b8e |
+#source: advsimd-mov-bad.s
|
|
|
881b8e |
+#readelf: -s --wide
|
|
|
881b8e |
+
|
|
|
881b8e |
+Symbol table '.symtab' contains 6 entries:
|
|
|
881b8e |
+ +Num:.*
|
|
|
881b8e |
+ +[0-9]+:.*
|
|
|
881b8e |
+ +[0-9]+:.*
|
|
|
881b8e |
+ +[0-9]+:.*
|
|
|
881b8e |
+ +[0-9]+:.*
|
|
|
881b8e |
+ +[0-9]+:.*
|
|
|
881b8e |
+#failif
|
|
|
881b8e |
+ +[0-9]+: +[0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +UND v0.D
|
|
|
881b8e |
diff --git a/gas/testsuite/gas/aarch64/advsimd-mov-bad.s b/gas/testsuite/gas/aarch64/advsimd-mov-bad.s
|
|
|
881b8e |
new file mode 100644
|
|
|
881b8e |
index 0000000..d7ba226
|
|
|
881b8e |
--- /dev/null
|
|
|
881b8e |
+++ b/gas/testsuite/gas/aarch64/advsimd-mov-bad.s
|
|
|
881b8e |
@@ -0,0 +1,2 @@
|
|
|
881b8e |
+ .text
|
|
|
881b8e |
+ mov x0, v0.D[0]
|