diff options
Diffstat (limited to 'gas')
-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 |