diff options
author | Jiong Wang <jiong.wang@arm.com> | 2014-06-16 17:22:19 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2014-06-16 17:22:19 +0100 |
commit | f4c51f600ed2fcf9f29bdaae71aa767b9b1bc4ac (patch) | |
tree | d97cf438a17a872f8fcce3d10d99a85573e9a1f5 /gas/testsuite | |
parent | 9f19ab6dfa13c3971423624d18f20d90ab70c9cc (diff) | |
download | gdb-f4c51f600ed2fcf9f29bdaae71aa767b9b1bc4ac.zip gdb-f4c51f600ed2fcf9f29bdaae71aa767b9b1bc4ac.tar.gz gdb-f4c51f600ed2fcf9f29bdaae71aa767b9b1bc4ac.tar.bz2 |
This fixes the aarch64 assembler so that it will generate error messages when
a syntax error is detected in an optional operand.
* config/tc-aarch64.c (END_OF_INSN): New macro.
(parse_operands): Handle operand given and be in wrong
format when operand is optional.
* gas/aarch64/diagnostic.s: New test patterns.
* gas/aarch64/diagnostic.l: Likewise.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/aarch64/diagnostic.l | 9 | ||||
-rw-r--r-- | gas/testsuite/gas/aarch64/diagnostic.s | 9 |
3 files changed, 22 insertions, 1 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index c146d66..70aa400 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-06-16 Jiong Wang <jiong.wang@arm.com> + + * gas/aarch64/diagnostic.s: Add new test patterns. + * gas/aarch64/diagnostic.l: Update expected diagnostic output. + 2014-06-16 Alan Modra <amodra@gmail.com> * gas/elf/bad-group.s: Use %function. diff --git a/gas/testsuite/gas/aarch64/diagnostic.l b/gas/testsuite/gas/aarch64/diagnostic.l index 00a0d7a..88a004f 100644 --- a/gas/testsuite/gas/aarch64/diagnostic.l +++ b/gas/testsuite/gas/aarch64/diagnostic.l @@ -14,7 +14,7 @@ [^:]*:16: Error: immediate value out of range 0 to 31 at operand 2 -- `ccmp x0,-1,10,le' [^:]*:17: Error: extraneous register at operand 2 -- `tlbi alle3is,x0' [^:]*:18: Error: missing register at operand 2 -- `tlbi vaale1is' -[^:]*:19: Error: unexpected characters following instruction at operand 1 -- `tlbi vaale1is x0' +[^:]*:19: Error: comma expected between operands at operand 2 -- `tlbi vaale1is x0' [^:]*:20: Error: immediate value out of range 0 to 1 at operand 1 -- `msr spsel,3' [^:]*:21: Error: immediate value out of range 1 to 64 at operand 3 -- `fcvtzu x15,d31,#66' [^:]*:22: Error: immediate value out of range 1 to 32 at operand 3 -- `scvtf s0,w0,33' @@ -97,3 +97,10 @@ [^:]*:99: Error: operand 3 should be one of the standard conditions, excluding AL and NV. -- `cinc w0,w1,nv' [^:]*:100: Error: operand 2 should be one of the standard conditions, excluding AL and NV. -- `cset w0,al' [^:]*:101: Error: operand 2 should be one of the standard conditions, excluding AL and NV. -- `cset w0,nv' +[^:]*:104: Error: operand 1 should be an integer register -- `ret lr' +[^:]*:105: Error: operand 1 should be an integer register -- `ret kk' +[^:]*:106: Error: immediate operand required at operand 1 -- `clrex x0' +[^:]*:107: Error: immediate operand required at operand 1 -- `clrex w0' +[^:]*:108: Error: constant expression required at operand 1 -- `clrex kk' +[^:]*:109: Error: operand 5 should be an integer register -- `sys #0,c0,c0,#0,kk' +[^:]*:110: Error: unexpected comma before the omitted optional operand at operand 5 -- `sys #0,c0,c0,#0,' diff --git a/gas/testsuite/gas/aarch64/diagnostic.s b/gas/testsuite/gas/aarch64/diagnostic.s index 2bb16b0..241f0cc 100644 --- a/gas/testsuite/gas/aarch64/diagnostic.s +++ b/gas/testsuite/gas/aarch64/diagnostic.s @@ -99,3 +99,12 @@ cinc w0, w1, nv cset w0, al cset w0, nv + + # test diagnostic info on optional operand + ret lr + ret kk + clrex x0 + clrex w0 + clrex kk + sys #0, c0, c0, #0, kk + sys #0, c0, c0, #0, |