[ARM] Add support for ARMv8-R in assembler and readelf
authorThomas Preud'homme <thomas.preudhomme@arm.com>
Sat, 24 Jun 2017 09:37:47 +0000 (10:37 +0100)
committerThomas Preud'homme <thomas.preudhomme@arm.com>
Sat, 24 Jun 2017 09:37:47 +0000 (10:37 +0100)
commitced40572e478927f43a849d5c39f794868da8d38
tree594df703e4e997a4c3902058902d35147786675c
parent173205ca3356cab0590c2debaac97107fb9a7fcd
[ARM] Add support for ARMv8-R in assembler and readelf

=== Context ===

This patch is part of a patch series to add support for ARMv8-R
architecture. Its purpose is to add support for ARMv8-R in GAS:
instructions, build attributes and readelf.

=== Patch description ===

Although some differences exist for system registers, from GAS point of
view ARMv8-R supports the same instructions as ARMv8-A Aarch32 state
and a subset of its extensions. This patch therefore introduce a new
feature bit to distinguish the availability of the pan, ras and rdma
extensions between ARMv8-A and ARMv8-R and allow crypto, fp and simd
extensions to be used by ARMv8-R.

Most of the changes are then in the testsuite to (i) rename source files
and error output to be shared between ARMv8-A and ARMv8-R, (ii) rename
files with expected output for ARMv8-A build attributes and (iii) add
new files with expected output for ARMv8-R build attributes.

2017-06-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>

binutils/
* readelf.c (arm_attr_tag_CPU_arch): Fill value for ARMv8-R.

gas/
* NEWS: Mention support for ARMv8-R architecture.
* config/tc-arm.c (arm_archs): Add entry for ARMv8-R.
(arm_extensions): Restrict pan, ras and rdma extension to
ARMv8-A and make crypto, fp and simd extensions available to
ARMv8-R.
(cpu_arch_ver): Add entry for ARMv8-R.
(aeabi_set_public_attributes): Update gas_assert for Tag_DIV_use
logic.
* testsuite/gas/arm/armv8-a+fp.s: Rename into ...
* testsuite/gas/arm/armv8-ar+fp.s: This.  Remove .arch directive.
* testsuite/gas/arm/armv8-a+fp.d: Specify source to assemble and
architecture to assemble for.
* testsuite/gas/arm/armv8-r+fp.d: New.
* testsuite/gas/arm/armv8-a+simd.s: Rename into ...
* testsuite/gas/arm/armv8-ar+simd.s: This.  Remove .arch directive.
* testsuite/gas/arm/armv8-a+simd.d: Specify source to assemble and
architecture to assemble for.
* testsuite/gas/arm/armv8-r+simd.d: New.
* testsuite/gas/arm/armv8-a-bad.s: Rename into ...
* testsuite/gas/arm/armv8-ar-bad.s: This.  Remove .arch directive.
* testsuite/gas/arm/armv8-a-bad.l: Rename into ...
* testsuite/gas/arm/armv8-ar-bad.l: This.  Decrement line number by 1.
* testsuite/gas/arm/armv8-a-bad.d: Specify source to assemble,
architecture to assemble for and adjust error output file.
* testsuite/gas/arm/armv8-r-bad.d: New.
* testsuite/gas/arm/armv8-a-barrier.s: Rename into ...
* testsuite/gas/arm/armv8-ar-barrier.s: This.
* testsuite/gas/arm/armv8-a-barrier-arm.d: Adjust source.
* testsuite/gas/arm/armv8-a-barrier-thumb.d: Likewise.
* testsuite/gas/arm/armv8-r-barrier-arm.d: New.
* testsuite/gas/arm/armv8-r-barrier-thumb.d: New.
* testsuite/gas/arm/armv8-a-it-bad.s: Rename into ...
* testsuite/gas/arm/armv8-ar-it-bad.s: This.  Remove .arch directive.
* testsuite/gas/arm/armv8-a-it-bad.l: Rename into ...
* testsuite/gas/arm/armv8-ar-it-bad.l: This.  Decrement line number
by 1.
* testsuite/gas/arm/armv8-a-it-bad.d: Specify source to assemble,
architecture to assemble for and adjust error output file.
* testsuite/gas/arm/armv8-r-it-bad.d: New.
* testsuite/gas/arm/armv8-a.s: Rename into ...
* testsuite/gas/arm/armv8-ar.s: This.  Remove .arch directive.
* testsuite/gas/arm/armv8-a.d: Specify source to assemble and
architecture to assemble for.
* testsuite/gas/arm/armv8-r.d: New.
* testsuite/gas/arm/attr-march-armv8-r+crypto.d: New.
* testsuite/gas/arm/attr-march-armv8-r+fp.d: New.
* testsuite/gas/arm/attr-march-armv8-r+simd.d: New.
* testsuite/gas/arm/attr-march-armv8-r.d: New.
* testsuite/gas/arm/crc32.s: Rename into ...
* testsuite/gas/arm/crc32-armv8-ar.s: This.
* testsuite/gas/arm/crc32.d: Rename into ...
* testsuite/gas/arm/crc32-armv8-a.d: This.  Specify source to assemble.
* testsuite/gas/arm/crc32-armv8-r.d: New.
* testsuite/gas/arm/crc32-bad.s: Rename into ...
* testsuite/gas/arm/crc32-armv8-ar-bad.s: This.
* testsuite/gas/arm/crc32-bad.d: Rename into ...
* testsuite/gas/arm/crc32-armv8-a-bad.d: This.  Specify source to
assemble.
* testsuite/gas/arm/crc32-armv8-r-bad.d: New.
* testsuite/gas/arm/mask_1.s: Rename into ...
* testsuite/gas/arm/mask_1-armv8-ar.s: This.
* testsuite/gas/arm/mask_1.d: Rename into ...
* testsuite/gas/arm/mask_1-armv8-a.d: This.  Specify source to
assemble.
* testsuite/gas/arm/mask_1-armv8-r.d: new.

include/
* elf/arm.h (TAG_CPU_ARCH_V8R): New macro.
* opcode/arm.h (ARM_EXT2_V8A): New macro.
(ARM_AEXT2_V8A): Rename into ...
(ARM_AEXT2_V8AR): This.
(ARM_AEXT2_V8A): New macro.
(ARM_AEXT_V8R): New macro.
(ARM_AEXT2_V8R): New macro.
(ARM_ARCH_V8R): New macro.
58 files changed:
binutils/ChangeLog
binutils/readelf.c
gas/ChangeLog
gas/NEWS
gas/config/tc-arm.c
gas/doc/c-arm.texi
gas/testsuite/gas/arm/armv8-a+fp.d
gas/testsuite/gas/arm/armv8-a+fp.s [deleted file]
gas/testsuite/gas/arm/armv8-a+simd.d
gas/testsuite/gas/arm/armv8-a+simd.s [deleted file]
gas/testsuite/gas/arm/armv8-a-bad.d
gas/testsuite/gas/arm/armv8-a-bad.l [deleted file]
gas/testsuite/gas/arm/armv8-a-bad.s [deleted file]
gas/testsuite/gas/arm/armv8-a-barrier-arm.d
gas/testsuite/gas/arm/armv8-a-barrier-thumb.d
gas/testsuite/gas/arm/armv8-a-barrier.s [deleted file]
gas/testsuite/gas/arm/armv8-a-it-bad.d
gas/testsuite/gas/arm/armv8-a-it-bad.l [deleted file]
gas/testsuite/gas/arm/armv8-a-it-bad.s [deleted file]
gas/testsuite/gas/arm/armv8-a.d
gas/testsuite/gas/arm/armv8-a.s [deleted file]
gas/testsuite/gas/arm/armv8-ar+fp.s [new file with mode: 0644]
gas/testsuite/gas/arm/armv8-ar+simd.s [new file with mode: 0644]
gas/testsuite/gas/arm/armv8-ar-bad.l [new file with mode: 0644]
gas/testsuite/gas/arm/armv8-ar-bad.s [new file with mode: 0644]
gas/testsuite/gas/arm/armv8-ar-barrier.s [new file with mode: 0644]
gas/testsuite/gas/arm/armv8-ar-it-bad.l [new file with mode: 0644]
gas/testsuite/gas/arm/armv8-ar-it-bad.s [new file with mode: 0644]
gas/testsuite/gas/arm/armv8-ar.s [new file with mode: 0644]
gas/testsuite/gas/arm/armv8-r+fp.d [new file with mode: 0644]
gas/testsuite/gas/arm/armv8-r+simd.d [new file with mode: 0644]
gas/testsuite/gas/arm/armv8-r-bad.d [new file with mode: 0644]
gas/testsuite/gas/arm/armv8-r-barrier-arm.d [new file with mode: 0644]
gas/testsuite/gas/arm/armv8-r-barrier-thumb.d [new file with mode: 0644]
gas/testsuite/gas/arm/armv8-r-it-bad.d [new file with mode: 0644]
gas/testsuite/gas/arm/armv8-r.d [new file with mode: 0644]
gas/testsuite/gas/arm/attr-march-armv8-r+crypto.d [new file with mode: 0644]
gas/testsuite/gas/arm/attr-march-armv8-r+fp.d [new file with mode: 0644]
gas/testsuite/gas/arm/attr-march-armv8-r+simd.d [new file with mode: 0644]
gas/testsuite/gas/arm/attr-march-armv8-r.d [new file with mode: 0644]
gas/testsuite/gas/arm/crc32-armv8-a-bad.d [new file with mode: 0644]
gas/testsuite/gas/arm/crc32-armv8-a.d [new file with mode: 0644]
gas/testsuite/gas/arm/crc32-armv8-ar-bad.s [new file with mode: 0644]
gas/testsuite/gas/arm/crc32-armv8-ar.s [new file with mode: 0644]
gas/testsuite/gas/arm/crc32-armv8-r-bad.d [new file with mode: 0644]
gas/testsuite/gas/arm/crc32-armv8-r.d [new file with mode: 0644]
gas/testsuite/gas/arm/crc32-bad.d [deleted file]
gas/testsuite/gas/arm/crc32-bad.s [deleted file]
gas/testsuite/gas/arm/crc32.d [deleted file]
gas/testsuite/gas/arm/crc32.s [deleted file]
gas/testsuite/gas/arm/mask_1-armv8-a.d [new file with mode: 0644]
gas/testsuite/gas/arm/mask_1-armv8-ar.s [new file with mode: 0644]
gas/testsuite/gas/arm/mask_1-armv8-r.d [new file with mode: 0644]
gas/testsuite/gas/arm/mask_1.d [deleted file]
gas/testsuite/gas/arm/mask_1.s [deleted file]
include/ChangeLog
include/elf/arm.h
include/opcode/arm.h