diff options
author | Victor Do Nascimento <victor.donascimento@arm.com> | 2023-10-02 16:35:05 +0100 |
---|---|---|
committer | Victor Do Nascimento <victor.donascimento@arm.com> | 2023-12-06 10:39:02 +0000 |
commit | b3df8470261dcd55b78f68a2e982d3feb856d217 (patch) | |
tree | d1835a0f1cf9c34992a9180f9b46a4a3651ad934 /gcc/rust/resolve | |
parent | 056cce412862f8d9b56a40dfbcbc3f9fa7f92883 (diff) | |
download | gcc-b3df8470261dcd55b78f68a2e982d3feb856d217.zip gcc-b3df8470261dcd55b78f68a2e982d3feb856d217.tar.gz gcc-b3df8470261dcd55b78f68a2e982d3feb856d217.tar.bz2 |
aarch64: Sync system register information with Binutils
This patch adds the `aarch64-sys-regs.def' file, originally written
for Binutils, to GCC. In so doing, it provides GCC with the necessary
information for teaching the compiler about system registers known to
the assembler and how these can be used.
By aligning the representation of data common to different parts of
the toolchain we can greatly reduce the duplication of work,
facilitating the maintenance of the aarch64 back-end across different
parts of the toolchain; By keeping both copies of the file in sync,
any `SYSREG (...)' that is added in one project is automatically added
to its counterpart. This being the case, no change should be made in
the GCC copy of the file. Any modifications should first be made in
Binutils and the resulting file copied over to GCC.
GCC does not implement the full range of ISA flags present in
Binutils. Where this is the case, aliases must be added to aarch64.h
with the unknown architectural extension being mapped to its
associated base architecture, such that any flag present in Binutils
and used in system register definitions is understood in GCC. Again,
this is done such that flags can be used interchangeably between
projects making use of the aarch64-system-regs.def file. This is done
in the next patch in the series.
`.arch' directives missing from the emitted assembly files as a
consequence of this aliasing are accounted for by the compiler using
the S<op0>_<op1>_<Cn>_<Cm>_<op2> encoding of system registers when
issuing mrs/msr instructions. This design choice ensures the
assembler will accept anything that was deemed acceptable by the
compiler.
gcc/ChangeLog:
* config/aarch64/aarch64-sys-regs.def: New.
Diffstat (limited to 'gcc/rust/resolve')
0 files changed, 0 insertions, 0 deletions