about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/errors.rs
diff options
context:
space:
mode:
authorTakayuki Maeda <takoyaki0316@gmail.com>2023-11-27 22:38:23 +0900
committerGitHub <noreply@github.com>2023-11-27 22:38:23 +0900
commit7b4eb520418a13af499231b62e1d98396436c827 (patch)
treed167b74887c5c6e2569d090cd38455a9f0bcc951 /compiler/rustc_parse/src/errors.rs
parentb29a1e00f850e548f3021ea523d0e143724fa9b7 (diff)
parent4741f4496392976b014b76d4d14cfcb6bbc15d73 (diff)
downloadrust-7b4eb520418a13af499231b62e1d98396436c827.tar.gz
rust-7b4eb520418a13af499231b62e1d98396436c827.zip
Rollup merge of #118095 - ferrocene:apply-cortex-a53-fix, r=davidtwco
Enable the Arm Cortex-A53 errata mitigation on aarch64-unknown-none

Arm Cortex-A53 CPUs have an errata related to a specific sequence of instructions - errata number 843419 (https://documentation-service.arm.com/static/5fa29fddb209f547eebd361d). There is a mitigation that can be applied at link-time which detects the when sequence of instructions exists at a specific alignment. When detected, the linker re-writes those instructions and either changes an ADRP to an ADR, or bounces to a veneer to break the sequence.

The linker argument to enable the mitigation is "--fix-cortex-a53-843419", and this is supported by GNU ld and LLVM lld. The gcc argument to enable the flag is "-mfix-cortex-a53-843419".

Because the aarch64-unknown-none target uses rust-lld directly, this patch causes rustc to emit the "--fix-cortex-a53-843419" argument when calling the linker, just like aarch64-linux-gnu-gcc on Ubuntu 22.04 does.

Failure to enable this mitigation in the linker can cause the production of instruction sequences that do not execute correctly on Arm Cortex-A53.
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
0 files changed, 0 insertions, 0 deletions