aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Gretton-Dann <matthew.gretton-dann@arm.com>2010-06-28 09:10:25 +0000
committerMatthew Gretton-Dann <matthew.gretton-dann@arm.com>2010-06-28 09:10:25 +0000
commit8e56076649ea3bc861ad1f5ddad9fd931293af10 (patch)
tree3c1a88726835e19814e772b93e1c910c97d8bbee
parentfc63f3ec4e4bae44c92ad1477c53453579dbc743 (diff)
downloadgdb-8e56076649ea3bc861ad1f5ddad9fd931293af10.zip
gdb-8e56076649ea3bc861ad1f5ddad9fd931293af10.tar.gz
gdb-8e56076649ea3bc861ad1f5ddad9fd931293af10.tar.bz2
* gas/config/tc-arm.c (parse_neon_alignment): New function.
(parse_address_main): Fix Neon load/store alignment parsing. * gas/testsuite/gas/arm/neon-ldst-align-bad.l: Update for Neon alignment syntax fix. * gas/testsuite/gas/arm/neon-ldst-align-bad.s: Likewise. * gas/testsuite/gas/arm/neon-ldst-es.d: Likewise. * gas/testsuite/gas/arm/neon-ldst-es.s: Likewise. * opcodes/arm-disc.c (parse_insn_neon): Fix Neon alignment syntax.
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-arm.c61
-rw-r--r--gas/testsuite/ChangeLog7
-rw-r--r--gas/testsuite/gas/arm/neon-ldst-align-bad.l4
-rw-r--r--gas/testsuite/gas/arm/neon-ldst-align-bad.s4
-rw-r--r--gas/testsuite/gas/arm/neon-ldst-es.d40
-rw-r--r--gas/testsuite/gas/arm/neon-ldst-es.s26
-rw-r--r--opcodes/ChangeLog4
-rw-r--r--opcodes/arm-dis.c8
9 files changed, 102 insertions, 57 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 1d6f0e0..80aae5b 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-28 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
+ * config/tc-arm.c (parse_neon_alignment): New function.
+ (parse_address_main): Fix Neon load/store alignment parsing.
+
2010-06-22 Jan Beulich <jbeulich@novell.com>
PR gas/11732
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 2e4880a..0a713d4 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -4948,6 +4948,33 @@ parse_shifter_operand_group_reloc (char **str, int i)
/* Never reached. */
}
+/* Parse a Neon alignment expression. Information is written to
+ inst.operands[i]. We assume the initial ':' has been skipped.
+
+ align .imm = align << 8, .immisalign=1, .preind=0 */
+static parse_operand_result
+parse_neon_alignment (char **str, int i)
+{
+ char *p = *str;
+ expressionS exp;
+
+ my_get_expression (&exp, &p, GE_NO_PREFIX);
+
+ if (exp.X_op != O_constant)
+ {
+ inst.error = _("alignment must be constant");
+ return PARSE_OPERAND_FAIL;
+ }
+
+ inst.operands[i].imm = exp.X_add_number << 8;
+ inst.operands[i].immisalign = 1;
+ /* Alignments are not pre-indexes. */
+ inst.operands[i].preind = 0;
+
+ *str = p;
+ return PARSE_OPERAND_SUCCESS;
+}
+
/* Parse all forms of an ARM address expression. Information is written
to inst.operands[i] and/or inst.reloc.
@@ -5031,22 +5058,15 @@ parse_address_main (char **str, int i, int group_relocations,
return PARSE_OPERAND_FAIL;
}
else if (skip_past_char (&p, ':') == SUCCESS)
- {
- /* FIXME: '@' should be used here, but it's filtered out by generic
- code before we get to see it here. This may be subject to
- change. */
- expressionS exp;
- my_get_expression (&exp, &p, GE_NO_PREFIX);
- if (exp.X_op != O_constant)
- {
- inst.error = _("alignment must be constant");
- return PARSE_OPERAND_FAIL;
- }
- inst.operands[i].imm = exp.X_add_number << 8;
- inst.operands[i].immisalign = 1;
- /* Alignments are not pre-indexes. */
- inst.operands[i].preind = 0;
- }
+ {
+ /* FIXME: '@' should be used here, but it's filtered out by generic
+ code before we get to see it here. This may be subject to
+ change. */
+ parse_operand_result result = parse_neon_alignment (&p, i);
+
+ if (result != PARSE_OPERAND_SUCCESS)
+ return result;
+ }
else
{
if (inst.operands[i].negative)
@@ -5110,6 +5130,15 @@ parse_address_main (char **str, int i, int group_relocations,
return PARSE_OPERAND_FAIL;
}
}
+ else if (skip_past_char (&p, ':') == SUCCESS)
+ {
+ /* FIXME: '@' should be used here, but it's filtered out by generic code
+ before we get to see it here. This may be subject to change. */
+ parse_operand_result result = parse_neon_alignment (&p, i);
+
+ if (result != PARSE_OPERAND_SUCCESS)
+ return result;
+ }
if (skip_past_char (&p, ']') == FAIL)
{
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index d46c075..2198986 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2010-06-28 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
+ * gas/arm/neon-ldst-align-bad.l: Update for Neon alignment syntax fix.
+ * gas/arm/neon-ldst-align-bad.s: Likewise.
+ * gas/arm/neon-ldst-es.d: Likewise.
+ * gas/arm/neon-ldst-es.s: Likewise.
+
2010-06-22 Jan Beulich <jbeulich@novell.com>
PR gas/11732
diff --git a/gas/testsuite/gas/arm/neon-ldst-align-bad.l b/gas/testsuite/gas/arm/neon-ldst-align-bad.l
index 89cafba..5d32ace 100644
--- a/gas/testsuite/gas/arm/neon-ldst-align-bad.l
+++ b/gas/testsuite/gas/arm/neon-ldst-align-bad.l
@@ -1,3 +1,3 @@
[^:]*: Assembler messages:
-[^:]*:1: Error: bad alignment -- `vld1.8 {d0},\[r0,:128\]'
-[^:]*:2: Error: bad alignment -- `vld1.8 {q0},\[r0,:256\]'
+[^:]*:1: Error: bad alignment -- `vld1.8 {d0},\[r0:128\]'
+[^:]*:2: Error: bad alignment -- `vld1.8 {q0},\[r0:256\]'
diff --git a/gas/testsuite/gas/arm/neon-ldst-align-bad.s b/gas/testsuite/gas/arm/neon-ldst-align-bad.s
index 0efb0a0..a899f81 100644
--- a/gas/testsuite/gas/arm/neon-ldst-align-bad.s
+++ b/gas/testsuite/gas/arm/neon-ldst-align-bad.s
@@ -1,2 +1,2 @@
-vld1.8 {d0}, [r0, :128]
-vld1.8 {q0}, [r0, :256]
+vld1.8 {d0}, [r0 :128]
+vld1.8 {q0}, [r0 :256]
diff --git a/gas/testsuite/gas/arm/neon-ldst-es.d b/gas/testsuite/gas/arm/neon-ldst-es.d
index c520ac9..82bbab3 100644
--- a/gas/testsuite/gas/arm/neon-ldst-es.d
+++ b/gas/testsuite/gas/arm/neon-ldst-es.d
@@ -5,50 +5,50 @@
.*: +file format .*arm.*
Disassembly of section \.text:
-0[0-9a-f]+ <[^>]+> f406282f vst2\.8 {d2-d3}, \[r6, :128\]
+0[0-9a-f]+ <[^>]+> f406282f vst2\.8 {d2-d3}, \[r6 :128\]
0[0-9a-f]+ <[^>]+> f427140d vld3\.8 {d1-d3}, \[r7\]!
-0[0-9a-f]+ <[^>]+> f4091553 vst3\.16 {d1,d3,d5}, \[r9, :64\], r3
+0[0-9a-f]+ <[^>]+> f4091553 vst3\.16 {d1,d3,d5}, \[r9 :64\], r3
0[0-9a-f]+ <[^>]+> f42a208f vld4\.32 {d2-d5}, \[sl\]
0[0-9a-f]+ <[^>]+> f40a114f vst4\.16 {d1,d3,d5,d7}, \[sl\]
0[0-9a-f]+ <[^>]+> f4aa1c6f vld1\.16 {d1\[\]-d2\[\]}, \[sl\]
-0[0-9a-f]+ <[^>]+> f4aa1c5f vld1\.16 {d1\[\]}, \[sl, :16\]
-0[0-9a-f]+ <[^>]+> f4aa1dbf vld2\.32 {d1\[\],d3\[\]}, \[sl, :64\]
+0[0-9a-f]+ <[^>]+> f4aa1c5f vld1\.16 {d1\[\]}, \[sl :16\]
+0[0-9a-f]+ <[^>]+> f4aa1dbf vld2\.32 {d1\[\],d3\[\]}, \[sl :64\]
0[0-9a-f]+ <[^>]+> f4aa3e0c vld3\.8 {d3\[\]-d5\[\]}, \[sl\], ip
0[0-9a-f]+ <[^>]+> f4a9af6d vld4\.16 {d10\[\],d12\[\],d14\[\],d16\[\]}, \[r9\]!
-0[0-9a-f]+ <[^>]+> f4a9af5f vld4\.16 {d10\[\]-d13\[\]}, \[r9, :64\]
-0[0-9a-f]+ <[^>]+> f4a9af9f vld4\.32 {d10\[\]-d13\[\]}, \[r9, :64\]
-0[0-9a-f]+ <[^>]+> f4a9afdf vld4\.32 {d10\[\]-d13\[\]}, \[r9, :128\]
+0[0-9a-f]+ <[^>]+> f4a9af5f vld4\.16 {d10\[\]-d13\[\]}, \[r9 :64\]
+0[0-9a-f]+ <[^>]+> f4a9af9f vld4\.32 {d10\[\]-d13\[\]}, \[r9 :64\]
+0[0-9a-f]+ <[^>]+> f4a9afdf vld4\.32 {d10\[\]-d13\[\]}, \[r9 :128\]
0[0-9a-f]+ <[^>]+> f4a530ed vld1\.8 {d3\[7\]}, \[r5\]!
-0[0-9a-f]+ <[^>]+> f48554df vst1\.16 {d5\[3\]}, \[r5, :16\]
-0[0-9a-f]+ <[^>]+> f4a535dd vld2\.16 {d3\[3\],d4\[3\]}, \[r5, :32\]!
+0[0-9a-f]+ <[^>]+> f48554df vst1\.16 {d5\[3\]}, \[r5 :16\]
+0[0-9a-f]+ <[^>]+> f4a535dd vld2\.16 {d3\[3\],d4\[3\]}, \[r5 :32\]!
0[0-9a-f]+ <[^>]+> f4858a83 vst3\.32 {d8\[1\],d9\[1\],d10\[1\]}, \[r5\], r3
0[0-9a-f]+ <[^>]+> f4a7804f vld1\.8 {d8\[2\]}, \[r7\]
0[0-9a-f]+ <[^>]+> f4a7848f vld1\.16 {d8\[2\]}, \[r7\]
-0[0-9a-f]+ <[^>]+> f4a7849f vld1\.16 {d8\[2\]}, \[r7, :16\]
+0[0-9a-f]+ <[^>]+> f4a7849f vld1\.16 {d8\[2\]}, \[r7 :16\]
0[0-9a-f]+ <[^>]+> f4a7888f vld1\.32 {d8\[1\]}, \[r7\]
-0[0-9a-f]+ <[^>]+> f4a788bf vld1\.32 {d8\[1\]}, \[r7, :32\]
+0[0-9a-f]+ <[^>]+> f4a788bf vld1\.32 {d8\[1\]}, \[r7 :32\]
0[0-9a-f]+ <[^>]+> f4a7812f vld2\.8 {d8\[1\],d9\[1\]}, \[r7\]
-0[0-9a-f]+ <[^>]+> f4a7813f vld2\.8 {d8\[1\],d9\[1\]}, \[r7, :16\]
+0[0-9a-f]+ <[^>]+> f4a7813f vld2\.8 {d8\[1\],d9\[1\]}, \[r7 :16\]
0[0-9a-f]+ <[^>]+> f4a7854f vld2\.16 {d8\[1\],d9\[1\]}, \[r7\]
-0[0-9a-f]+ <[^>]+> f4a7855f vld2\.16 {d8\[1\],d9\[1\]}, \[r7, :32\]
+0[0-9a-f]+ <[^>]+> f4a7855f vld2\.16 {d8\[1\],d9\[1\]}, \[r7 :32\]
0[0-9a-f]+ <[^>]+> f4a7856f vld2\.16 {d8\[1\],d10\[1\]}, \[r7\]
-0[0-9a-f]+ <[^>]+> f4a7857f vld2\.16 {d8\[1\],d10\[1\]}, \[r7, :32\]
+0[0-9a-f]+ <[^>]+> f4a7857f vld2\.16 {d8\[1\],d10\[1\]}, \[r7 :32\]
0[0-9a-f]+ <[^>]+> f4a7898f vld2\.32 {d8\[1\],d9\[1\]}, \[r7\]
-0[0-9a-f]+ <[^>]+> f4a7899f vld2\.32 {d8\[1\],d9\[1\]}, \[r7, :64\]
+0[0-9a-f]+ <[^>]+> f4a7899f vld2\.32 {d8\[1\],d9\[1\]}, \[r7 :64\]
0[0-9a-f]+ <[^>]+> f4a789cf vld2\.32 {d8\[1\],d10\[1\]}, \[r7\]
-0[0-9a-f]+ <[^>]+> f4a789df vld2\.32 {d8\[1\],d10\[1\]}, \[r7, :64\]
+0[0-9a-f]+ <[^>]+> f4a789df vld2\.32 {d8\[1\],d10\[1\]}, \[r7 :64\]
0[0-9a-f]+ <[^>]+> f4a7822f vld3\.8 {d8\[1\],d9\[1\],d10\[1\]}, \[r7\]
0[0-9a-f]+ <[^>]+> f4a7864f vld3\.16 {d8\[1\],d9\[1\],d10\[1\]}, \[r7\]
0[0-9a-f]+ <[^>]+> f4a7866f vld3\.16 {d8\[1\],d10\[1\],d12\[1\]}, \[r7\]
0[0-9a-f]+ <[^>]+> f4a78a8f vld3\.32 {d8\[1\],d9\[1\],d10\[1\]}, \[r7\]
0[0-9a-f]+ <[^>]+> f4a78acf vld3\.32 {d8\[1\],d10\[1\],d12\[1\]}, \[r7\]
0[0-9a-f]+ <[^>]+> f4a7834f vld4\.8 {d8\[2\],d9\[2\],d10\[2\],d11\[2\]}, \[r7\]
-0[0-9a-f]+ <[^>]+> f4a7835f vld4\.8 {d8\[2\],d9\[2\],d10\[2\],d11\[2\]}, \[r7, :32\]
+0[0-9a-f]+ <[^>]+> f4a7835f vld4\.8 {d8\[2\],d9\[2\],d10\[2\],d11\[2\]}, \[r7 :32\]
0[0-9a-f]+ <[^>]+> f4a7876f vld4\.16 {d8\[1\],d10\[1\],d12\[1\],d14\[1\]}, \[r7\]
-0[0-9a-f]+ <[^>]+> f4a7875f vld4\.16 {d8\[1\],d9\[1\],d10\[1\],d11\[1\]}, \[r7, :64\]
+0[0-9a-f]+ <[^>]+> f4a7875f vld4\.16 {d8\[1\],d9\[1\],d10\[1\],d11\[1\]}, \[r7 :64\]
0[0-9a-f]+ <[^>]+> f4a78bcf vld4\.32 {d8\[1\],d10\[1\],d12\[1\],d14\[1\]}, \[r7\]
-0[0-9a-f]+ <[^>]+> f4a78bdf vld4\.32 {d8\[1\],d10\[1\],d12\[1\],d14\[1\]}, \[r7, :64\]
-0[0-9a-f]+ <[^>]+> f4a78bef vld4\.32 {d8\[1\],d10\[1\],d12\[1\],d14\[1\]}, \[r7, :128\]
+0[0-9a-f]+ <[^>]+> f4a78bdf vld4\.32 {d8\[1\],d10\[1\],d12\[1\],d14\[1\]}, \[r7 :64\]
+0[0-9a-f]+ <[^>]+> f4a78bef vld4\.32 {d8\[1\],d10\[1\],d12\[1\],d14\[1\]}, \[r7 :128\]
0[0-9a-f]+ <[^>]+> f3b43805 vtbl\.8 d3, {d4}, d5
0[0-9a-f]+ <[^>]+> f3b23b05 vtbl\.8 d3, {d2-d5}, d5
0[0-9a-f]+ <[^>]+> f3be3985 vtbl\.8 d3, {d30-d31}, d5
diff --git a/gas/testsuite/gas/arm/neon-ldst-es.s b/gas/testsuite/gas/arm/neon-ldst-es.s
index 5a29a43..c97794c 100644
--- a/gas/testsuite/gas/arm/neon-ldst-es.s
+++ b/gas/testsuite/gas/arm/neon-ldst-es.s
@@ -6,12 +6,12 @@
vst2.8 {d2,d3},[r6,:128]
vld3.8 {d1,d2,d3},[r7]!
- vst3.16 {d1,d3,d5},[r9,:64],r3
+ vst3.16 {d1,d3,d5},[r9:64],r3
vld4.32 {d2,d3,d4,d5},[r10]
vst4.16 {d1,d3,d5,d7},[r10]
vld1.16 {d1[],d2[]},[r10]
vld1.16 {d1[]},[r10,:16]
- vld2.32 {d1[],d3[]},[r10,:64]
+ vld2.32 {d1[],d3[]},[r10:64]
vld3.s8 {d3[],d4[],d5[]},[r10],r12
vld4.16 {d10[],d12[],d14[],d16[]},[r9]!
vld4.16 {d10[],d11[],d12[],d13[]},[r9,:64]
@@ -24,31 +24,31 @@
vld1.8 {d8[2]},[r7]
vld1.16 {d8[2]},[r7]
- vld1.16 {d8[2]},[r7,:16]
+ vld1.16 {d8[2]},[r7:16]
vld1.32 {d8[1]},[r7]
- vld1.32 {d8[1]},[r7,:32]
+ vld1.32 {d8[1]},[r7:32]
vld2.8 {d8[1],d9[1]},[r7]
- vld2.8 {d8[1],d9[1]},[r7,:16]
+ vld2.8 {d8[1],d9[1]},[r7:16]
vld2.16 {d8[1],d9[1]},[r7]
- vld2.16 {d8[1],d9[1]},[r7,:32]
+ vld2.16 {d8[1],d9[1]},[r7:32]
vld2.16 {d8[1],d10[1]},[r7]
- vld2.16 {d8[1],d10[1]},[r7,:32]
+ vld2.16 {d8[1],d10[1]},[r7:32]
vld2.32 {d8[1],d9[1]},[r7]
- vld2.32 {d8[1],d9[1]},[r7,:64]
+ vld2.32 {d8[1],d9[1]},[r7:64]
vld2.32 {d8[1],d10[1]},[r7]
- vld2.32 {d8[1],d10[1]},[r7,:64]
+ vld2.32 {d8[1],d10[1]},[r7:64]
vld3.8 {d8[1],d9[1],d10[1]},[r7]
vld3.16 {d8[1],d9[1],d10[1]},[r7]
vld3.16 {d8[1],d10[1],d12[1]},[r7]
vld3.32 {d8[1],d9[1],d10[1]},[r7]
vld3.32 {d8[1],d10[1],d12[1]},[r7]
vld4.8 {d8[2],d9[2],d10[2],d11[2]},[r7]
- vld4.8 {d8[2],d9[2],d10[2],d11[2]},[r7,:32]
+ vld4.8 {d8[2],d9[2],d10[2],d11[2]},[r7:32]
vld4.16 {d8[1],d10[1],d12[1],d14[1]},[r7]
- vld4.16 {d8[1],d9[1],d10[1],d11[1]},[r7,:64]
+ vld4.16 {d8[1],d9[1],d10[1],d11[1]},[r7:64]
vld4.32 {d8[1],d10[1],d12[1],d14[1]},[r7]
- vld4.32 {d8[1],d10[1],d12[1],d14[1]},[r7,:64]
- vld4.32 {d8[1],d10[1],d12[1],d14[1]},[r7,:128]
+ vld4.32 {d8[1],d10[1],d12[1],d14[1]},[r7:64]
+ vld4.32 {d8[1],d10[1],d12[1],d14[1]},[r7:128]
vtbl.8 d3,{d4},d5
vtbl.8 d3,{q1-q2},d5
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 2761067..bbeeae3 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,7 @@
+2010-06-28 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
+ * arm-disc.c (parse_insn_neon): Fix Neon alignment syntax.
+
2010-06-27 Alan Modra <amodra@gmail.com>
* arc-dis.c (arc_sprintf): Delete set but unused variables.
diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c
index 174de5a..1463c65 100644
--- a/opcodes/arm-dis.c
+++ b/opcodes/arm-dis.c
@@ -2470,7 +2470,7 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
func (stream, "d%d-d%d", rd, rd + n - 1);
func (stream, "}, [%s", arm_regnames[rn]);
if (align)
- func (stream, ", :%d", 32 << align);
+ func (stream, " :%d", 32 << align);
func (stream, "]");
if (rm == 0xd)
func (stream, "!");
@@ -2545,7 +2545,7 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
rd + i * stride, idx);
func (stream, "}, [%s", arm_regnames[rn]);
if (align)
- func (stream, ", :%d", align);
+ func (stream, " :%d", align);
func (stream, "]");
if (rm == 0xd)
func (stream, "!");
@@ -2586,9 +2586,9 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
if (type == 3)
align = (size > 1) ? align >> 1 : align;
if (type == 2 || (type == 0 && !size))
- func (stream, ", :<bad align %d>", align);
+ func (stream, " :<bad align %d>", align);
else
- func (stream, ", :%d", align);
+ func (stream, " :%d", align);
}
func (stream, "]");
if (rm == 0xd)