diff options
author | Will Newton <willnewton@sourceware.org> | 2013-09-16 09:34:30 +0000 |
---|---|---|
committer | Will Newton <willnewton@sourceware.org> | 2013-09-16 09:34:30 +0000 |
commit | 1d50d57ca2c58167dc7ba142c6d38fad3d10b980 (patch) | |
tree | 39bf2c8fbdd135d5981236ef56824e69add89dca | |
parent | fe75ecec829a6a957f9db1f17faac7c9f506a4a1 (diff) | |
download | gdb-1d50d57ca2c58167dc7ba142c6d38fad3d10b980.zip gdb-1d50d57ca2c58167dc7ba142c6d38fad3d10b980.tar.gz gdb-1d50d57ca2c58167dc7ba142c6d38fad3d10b980.tar.bz2 |
gas/config/tc-arm.c: Fix parsing of NEON load/store element sizes.
The existing code would accept VLD2.64 and similar undefined
instructions.
gas/ChangeLog:
2013-09-16 Will Newton <will.newton@linaro.org>
* config/tc-arm.c (do_neon_ld_st_interleave): Add constraint
disallowing element size 64 with interleave other than 1.
gas/testsuite/ChangeLog:
2013-09-16 Will Newton <will.newton@linaro.org>
* gas/arm/neon-ldst-es.d: Add VLD1.64 instructions.
* gas/arm/neon-ldst-es.s: Likewise.
* testsuite/gas/arm/neon-ldst-es-bad.d: New file.
* testsuite/gas/arm/neon-ldst-es-bad.l: Likewise.
* testsuite/gas/arm/neon-ldst-es-bad.s: Likewise.
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-arm.c | 2 | ||||
-rw-r--r-- | gas/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/neon-ldst-es-bad.d | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/neon-ldst-es-bad.l | 12 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/neon-ldst-es-bad.s | 12 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/neon-ldst-es.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/neon-ldst-es.s | 3 |
8 files changed, 47 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 8434721..8177107 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2013-09-16 Will Newton <will.newton@linaro.org> + + * config/tc-arm.c (do_neon_ld_st_interleave): Add constraint + disallowing element size 64 with interleave other than 1. + 2013-09-12 Chao-ying Fu <Chao-ying.Fu@imgtec.com> * config/tc-mips.c (match_insn): Set error when $31 is used for diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 8c405a8..9c8211d 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -15783,6 +15783,8 @@ do_neon_ld_st_interleave (void) typebits = typetable[idx]; constraint (typebits == -1, _("bad list type for instruction")); + constraint (((inst.instruction >> 8) & 3) && et.size == 64, + _("bad element type for instruction")); inst.instruction &= ~0xf00; inst.instruction |= typebits << 8; diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index ac33815..f2d5d56 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2013-09-16 Will Newton <will.newton@linaro.org> + + * gas/arm/neon-ldst-es.d: Add VLD1.64 instructions. + * gas/arm/neon-ldst-es.s: Likewise. + * testsuite/gas/arm/neon-ldst-es-bad.d: New file. + * testsuite/gas/arm/neon-ldst-es-bad.l: Likewise. + * testsuite/gas/arm/neon-ldst-es-bad.s: Likewise. + 2013-09-12 Chao-ying Fu <Chao-ying.Fu@imgtec.com> * gas/mips/bltzal.s: New file. diff --git a/gas/testsuite/gas/arm/neon-ldst-es-bad.d b/gas/testsuite/gas/arm/neon-ldst-es-bad.d new file mode 100644 index 0000000..576ee7a --- /dev/null +++ b/gas/testsuite/gas/arm/neon-ldst-es-bad.d @@ -0,0 +1,3 @@ +# name: Bad element size combinations in Neon load/store instructions +# as: -mfpu=neon +# error-output: neon-ldst-es-bad.l diff --git a/gas/testsuite/gas/arm/neon-ldst-es-bad.l b/gas/testsuite/gas/arm/neon-ldst-es-bad.l new file mode 100644 index 0000000..b0c854e --- /dev/null +++ b/gas/testsuite/gas/arm/neon-ldst-es-bad.l @@ -0,0 +1,12 @@ +[^:]*: Assembler messages: +[^:]*:2: Error: bad type in Neon instruction -- `vld1\.64 {d0\[1\]},\[r0\]' +[^:]*:3: Error: bad type in Neon instruction -- `vld1\.64 {d0\[\]},\[r0\]' +[^:]*:4: Error: bad type in Neon instruction -- `vld2\.64 {d0\[1\]},\[r0\]' +[^:]*:5: Error: bad type in Neon instruction -- `vld2\.64 {d0\[\]},\[r0\]' +[^:]*:6: Error: bad element type for instruction -- `vld2\.64 {d0-d1},\[r0\]' +[^:]*:7: Error: bad type in Neon instruction -- `vld3\.64 {d0\[1\]},\[r0\]' +[^:]*:8: Error: bad type in Neon instruction -- `vld3\.64 {d0\[\]},\[r0\]' +[^:]*:9: Error: bad element type for instruction -- `vld3\.64 {d0-d2},\[r0\]' +[^:]*:10: Error: bad type in Neon instruction -- `vld4\.64 {d0\[1\]},\[r0\]' +[^:]*:11: Error: bad type in Neon instruction -- `vld4\.64 {d0\[\]},\[r0\]' +[^:]*:12: Error: bad element type for instruction -- `vld4\.64 {d0-d3},\[r0\]' diff --git a/gas/testsuite/gas/arm/neon-ldst-es-bad.s b/gas/testsuite/gas/arm/neon-ldst-es-bad.s new file mode 100644 index 0000000..f7e335e --- /dev/null +++ b/gas/testsuite/gas/arm/neon-ldst-es-bad.s @@ -0,0 +1,12 @@ + .text + vld1.64 {d0[1]}, [r0] + vld1.64 {d0[]}, [r0] + vld2.64 {d0[1]}, [r0] + vld2.64 {d0[]}, [r0] + vld2.64 {d0-d1}, [r0] + vld3.64 {d0[1]}, [r0] + vld3.64 {d0[]}, [r0] + vld3.64 {d0-d2}, [r0] + vld4.64 {d0[1]}, [r0] + vld4.64 {d0[]}, [r0] + vld4.64 {d0-d3}, [r0] diff --git a/gas/testsuite/gas/arm/neon-ldst-es.d b/gas/testsuite/gas/arm/neon-ldst-es.d index 6c22c69..e9c0734 100644 --- a/gas/testsuite/gas/arm/neon-ldst-es.d +++ b/gas/testsuite/gas/arm/neon-ldst-es.d @@ -56,3 +56,5 @@ Disassembly of section \.text: 0[0-9a-f]+ <[^>]+> f427208f vld4\.32 {d2-d5}, \[r7\] 0[0-9a-f]+ <[^>]+> f467c08f vld4\.32 {d28-d31}, \[r7\] 0[0-9a-f]+ <[^>]+> f4a21c83 vld1\.32 {d1\[\]}, \[r2\], r3 +0[0-9a-f]+ <[^>]+> f42007cf vld1\.64 {d0}, \[r0\] +0[0-9a-f]+ <[^>]+> f42002cf vld1\.64 {d0-d3}, \[r0\] diff --git a/gas/testsuite/gas/arm/neon-ldst-es.s b/gas/testsuite/gas/arm/neon-ldst-es.s index 79f4b0c..cb93f06 100644 --- a/gas/testsuite/gas/arm/neon-ldst-es.s +++ b/gas/testsuite/gas/arm/neon-ldst-es.s @@ -60,3 +60,6 @@ @ PR 14987 and 14887: Allow for whitespace in the instruction. vld1.32 { d1 [ ] } , [ r2 ] , r3 + + vld1.64 {d0}, [r0] + vld1.64 {d0-d3}, [r0] |