diff options
author | Nick Clifton <nickc@redhat.com> | 2021-02-26 16:37:30 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2021-02-26 16:37:30 +0000 |
commit | fe0171d248e6d4cbc59c3101b9e74e18a9292294 (patch) | |
tree | 78d7b4f5d6ef5e564a2ad5fca9b645d0af08fb90 | |
parent | 0e12f6c8020062fa520b8e17be98bd84a473fc20 (diff) | |
download | fsf-binutils-gdb-fe0171d248e6d4cbc59c3101b9e74e18a9292294.zip fsf-binutils-gdb-fe0171d248e6d4cbc59c3101b9e74e18a9292294.tar.gz fsf-binutils-gdb-fe0171d248e6d4cbc59c3101b9e74e18a9292294.tar.bz2 |
Correct an error message in the ARM assembler.
PR 27411
* config/tc-arm.c (do_t_add_sub): Correct error message.
* testsuite/gas/arm/pr27411.s: New test.
* testsuite/gas/arm/pr27411.d: New test driver.
* testsuite/gas/arm/pr27411.l: Expected error output for new test.
-rw-r--r-- | gas/ChangeLog | 8 | ||||
-rw-r--r-- | gas/config/tc-arm.c | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/pr27411.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/pr27411.l | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/pr27411.s | 14 |
5 files changed, 31 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 8086006..8dd9a59 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,11 @@ +2021-02-26 Nick Clifton <nickc@redhat.com> + + PR 27411 + * config/tc-arm.c (do_t_add_sub): Correct error message. + * testsuite/gas/arm/pr27411.s: New test. + * testsuite/gas/arm/pr27411.d: New test driver. + * testsuite/gas/arm/pr27411.l: Expected error output for new test. + 2021-02-24 Alan Modra <amodra@gmail.com> PR 23691 diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index d3bb56d..e35cdd5 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -11635,7 +11635,7 @@ do_t_add_sub (void) } } else - constraint (inst.size_req == 2, BAD_HIREG); + constraint (inst.size_req == 2, _("cannot honor width suffix")); } if (inst.size_req == 4 || (inst.size_req != 2 && !opcode)) diff --git a/gas/testsuite/gas/arm/pr27411.d b/gas/testsuite/gas/arm/pr27411.d new file mode 100644 index 0000000..14dcf43 --- /dev/null +++ b/gas/testsuite/gas/arm/pr27411.d @@ -0,0 +1,2 @@ +# name: PR 27411: Invalid immediate constants produce wrong error message +# error_output: pr27411.l diff --git a/gas/testsuite/gas/arm/pr27411.l b/gas/testsuite/gas/arm/pr27411.l new file mode 100644 index 0000000..7201aa3 --- /dev/null +++ b/gas/testsuite/gas/arm/pr27411.l @@ -0,0 +1,6 @@ +[^:]*: Assembler messages: +[^:]*:6: Error: cannot honor width suffix -- `add.n r4,#8' +[^:]*:9: Error: cannot honor width suffix -- `sub.n r4,#8' +[^:]*:12: Error: cannot honor width suffix -- `lsl.n r4,#8' +[^:]*:13: Error: cannot honor width suffix -- `lsl.n sp,#8' +#pass diff --git a/gas/testsuite/gas/arm/pr27411.s b/gas/testsuite/gas/arm/pr27411.s new file mode 100644 index 0000000..0d1f25b --- /dev/null +++ b/gas/testsuite/gas/arm/pr27411.s @@ -0,0 +1,14 @@ + .syntax unified + .thumb + .align 2 + .thumb_func +f1: + add.n r4, #8 + add.n sp, #8 + add.w r4, #8 + sub.n r4, #8 + sub.n sp, #8 + sub.w r4, #8 + lsl.n r4, #8 + lsl.n sp, #8 + lsl.w r4, #8 |