[PATCH][GAS] aarch64: Fix DSB instruction 'missing immediate expression' errors

Przemyslaw Wirkus Przemyslaw.Wirkus@arm.com
Thu Oct 29 10:10:40 GMT 2020


This patch fixes errors with DSB instruction after introduction of DSB nXS
variant. That change would cause GAS to reject valid DSB immediate string
operands, for example:

$ cat error.s
dsb ish
$ ./aarch64-none-linux-gnu-as error.s
error.s: Assembler messages:
error.s:2: Error: missing immediate expression at operand 1 -- `dsb ish'

In this patch:
+ Fix check for in-range C0-C15 value represented by string immediate operand
  of DSB instruction.
+ Add missing tests for DSB's immediate operands: oshld, oshst, osh,
  nshld, nshst, nsh, #0x08, ishld, ishst, ish, #0x0c, ld, st and sy.

Testing:
+ Regression tested on aarch64-none-linux-gnu binutils.
+ Bootstrapped GCC with Binutils for aarch64-none-linux-gnu and
  aarch64-none-elf targets.

OK for master branch ?

gas/ChangeLog:

2020-10-28  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	* config/tc-aarch64.c (parse_operands): Check for C0-C15 value of DSB
	immediate string operand.
	* testsuite/gas/aarch64/system-4.d: Update test.
	* testsuite/gas/aarch64/system-4.s: Update test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dsb_fix.patch
Type: application/octet-stream
Size: 2024 bytes
Desc: dsb_fix.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20201029/fed314ea/attachment.obj>


More information about the Binutils mailing list