rust/tests/ui/asm
Stuart Cook db654cb421
Rollup merge of #150863 - ferrocene:add-aarch64v8r-targets, r=wesleywiser
Adds two new Tier 3 targets - `aarch64v8r-unknown-none{,-softfloat}`

## New Tier 3 targets - `aarch64v8r-unknown-none` and `aarch64v8r-unknown-none-softfloat`

This PR adds two new Tier 3 targets - `aarch64v8r-unknown-none` and `aarch64v8r-unknown-none-softfloat`.

The existing `aarch64-unknown-none` target assumes Armv8.0-A as a baseline. However, Arm recently released the Arm Cortex-R82 processor which is the first to implement the Armv8-R AArch64 mode architecture. This architecture is similar to Armv8-A AArch64, however it has a different set of mandatory features, and is based off of Armv8.4. It is largely unrelated to the existing Armv8-R architecture target (`armv8r-none-eabihf`), which only operates in AArch32 mode.

The second `aarch64v8r-unknown-none-softfloat` target allows for possible Armv8-R AArch64 CPUs with no FPU, or for use-cases where FPU register stacking is not desired. As with the existing `aarch64-unknown-none` target we have coupled FPU support and Neon support together - there is no 'has FPU but does not have NEON' target proposed even though the architecture technically allows for it.

These targets are in support of firmware development on upcoming systems using the Arm Cortex-R82, particularly safety-critical firmware development. For now, it can be tested using the Arm's Armv8-R AArch64 Fixed Virtual Platform emulator, which we have used to test this target. We are also in the process of testing this target with the full compiler test suite as part of Ferrocene, in the same way we test `aarch64-unknown-none` to a safety-qualified standard. We have not identified any issues as yet, but if we do, we will send the fixes upstream to you.

## Ownership

This PR was developed by Ferrous Systems on behalf of Arm. Arm is the owner of these changes.

## Tier 3 Policy Notes

To cover off the Tier 3 requirements:

> A tier 3 target must have a designated developer or developers

Arm will maintain this target, and I have presumed the Embedded Devices Working Group will also take an interest, as they maintain the existing Arm bare-metal targets.

> Targets must use naming consistent with any existing targets

We prefix this target with `aarch64` because it generates A64 machine code (like `arm*` generates A32 and `thumb*` generates T32). In an ideal world I'd get to rename the existing target `aarch64v8a-unknown-none` but that's basically impossible at this point. You can assume `v6` for any `arm*` target where unspecified, and you can assume `v8a` for any `aarch64*` target where not specified.

> Tier 3 targets may have unusual requirements to build or use, but must not create legal issues or impose onerous legal terms for the Rust project or for Rust developers or users.

It works just like the existing AArch64 bare-metal target.

> Neither this policy nor any decisions made regarding targets shall create any binding agreement or estoppel by any party. If any member of an approving Rust team serves as one of the maintainers of a target, or has any legal or employment requirement (explicit or implicit) that might affect their decisions regarding a target, they must recuse themselves from any approval decisions regarding the target's tier status, though they may otherwise participate in discussions.

Noted.

> Tier 3 targets should attempt to implement as much of the standard libraries as possible and appropriate.

It's a bare-metal target, offering libcore and liballoc.

> The target must provide documentation for the Rust community explaining how to build for the target, using cross-compilation if possible.

Done

> Tier 3 targets must not impose burden on the authors of pull requests, or other developers in the community, to maintain the target.

AArch64 is a Tier 1 architecture, so I don't expect this target to cause any issues.

> Patches adding or updating tier 3 targets must not break any existing tier 2 or tier 1 target, and must not knowingly break another tier 3 target without approval of either the compiler team or the maintainers of the other tier 3 target.

Noted.

> Tier 3 targets must be able to produce assembly using at least one of rustc's supported backends from any host target.

It's AArch64 and so works with LLVM.
2026-01-27 12:50:51 +11:00
..
aarch64 Do not mention -Zmacro-backtrace for std macros that are a wrapper around a compiler intrinsic 2026-01-26 17:34:31 +00:00
loongarch compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
powerpc Restrict spe_acc to PowerPC SPE targets 2025-12-05 08:37:22 -06:00
riscv compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
s390x s390x: support f16 and f16x8 in inline assembly 2026-01-09 18:42:46 +01:00
sparc compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
x86_64 Do not mention -Zmacro-backtrace for std macros that are a wrapper around a compiler intrinsic 2026-01-26 17:34:31 +00:00
aarch64v8r.rs Adds two new Tier 3 targets - aarch64v8r-unknown-none and aarch64v8r-unknown-none-softfloat. 2026-01-26 12:43:52 +00:00
arm-low-dreg.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
asm-with-nested-closure.rs Make a fake body to store typeck results for global_asm 2025-02-22 00:12:07 +00:00
bad-template.aarch64.stderr Ignore more failing ui tests for GCC backend 2025-10-13 15:30:26 +02:00
bad-template.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
bad-template.x86_64.stderr Ignore more failing ui tests for GCC backend 2025-10-13 15:30:26 +02:00
binary_asm_labels.rs add lint for inline asm labels that look like binary 2024-07-09 01:23:49 +00:00
binary_asm_labels.stderr Update the binary_asm_label message 2024-07-18 17:00:43 -04:00
binary_asm_labels_allowed.rs Change binary_asm_labels to only fire on x86 and x86_64 2024-07-18 15:00:56 -05:00
cfg-parse-error.rs stabilize asm_cfg 2025-10-15 20:43:53 +02:00
cfg-parse-error.stderr stabilize asm_cfg 2025-10-15 20:43:53 +02:00
cfg.rs stabilize asm_cfg 2025-10-15 20:43:53 +02:00
conditionally-sized-ptr-fail.rs Better error message for unsized pointers 2025-02-24 16:20:50 +00:00
conditionally-sized-ptr-fail.stderr Better error message for unsized pointers 2025-02-24 16:20:50 +00:00
conditionally-sized-ptr.rs Properly support thin ptrs that are only thin due to their param-env in asm macro 2025-02-24 16:20:35 +00:00
const-error.rs adjust test 2024-09-29 08:49:37 +02:00
const-refs-to-static.rs Stabilize const_refs_to_static 2024-09-26 13:21:15 +02:00
const-refs-to-static.stderr Stabilize const_refs_to_static 2024-09-26 13:21:15 +02:00
const-resolve-error.rs Bless tests 2025-02-26 19:27:19 +00:00
const-resolve-error.stderr Bless tests 2025-02-26 19:27:19 +00:00
empty_global_asm.rs Move 100 entries from tests/ui into subdirs 2024-05-20 19:55:59 -07:00
fail-const-eval-issue-121099.rs Bless tests 2025-02-26 19:27:19 +00:00
fail-const-eval-issue-121099.stderr Clarify why we are talking about a failed const eval at a random place 2025-06-02 15:37:15 +00:00
generic-const.rs stabilize asm_const 2024-08-13 23:18:31 +02:00
generic_const_simd_vec_len.rs Clarify why a type is rejected for asm! 2024-12-11 20:17:37 +00:00
generic_const_simd_vec_len.stderr Clarify why a type is rejected for asm! 2024-12-11 20:17:37 +00:00
global-asm-isnt-really-a-mir-body.rs Ignore more failing ui tests for GCC backend 2025-09-26 15:33:48 +02:00
global-asm-mono-sym-fn.rs Resolve instance for SymFn in global/naked asm 2025-05-05 13:17:35 +00:00
global-asm-with-error.rs Construct MIR error body for global_asm correctly 2025-03-06 17:34:17 +00:00
global-asm-with-error.stderr Exclude global_asm from mir_keys 2025-03-06 17:34:17 +00:00
global-asm-with-lifetimes.rs Make a fake body to store typeck results for global_asm 2025-02-22 00:12:07 +00:00
hexagon-register-pairs.rs CI fixes after recent rebase changes 2025-11-05 19:43:29 -06:00
hexagon-register-pairs.stderr CI fixes after recent rebase changes 2025-11-05 19:43:29 -06:00
ice-bad-err-span-in-template-129503.rs Fix error span when arg to asm!() is a macro call 2024-09-27 09:49:15 +05:30
ice-bad-err-span-in-template-129503.stderr Do not suggest using -Zmacro-backtrace for builtin macros 2025-03-14 19:50:03 +00:00
inline-asm-with-lifetimes.bad.stderr Make a fake body to store typeck results for global_asm 2025-02-22 00:12:07 +00:00
inline-asm-with-lifetimes.rs Make a fake body to store typeck results for global_asm 2025-02-22 00:12:07 +00:00
inline-syntax.arm.stderr Remove needs-asm-support directive in tests with explicit targets 2025-10-16 14:05:04 +02:00
inline-syntax.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
inline-syntax.x86_64.stderr Remove needs-asm-support directive in tests with explicit targets 2025-10-16 14:05:04 +02:00
invalid-const-operand.rs Pass InferCtxt to InlineAsmCtxt to properly taint on error 2025-03-10 14:28:09 +00:00
invalid-const-operand.stderr Pass InferCtxt to InlineAsmCtxt to properly taint on error 2025-03-10 14:28:09 +00:00
invalid-repr-simd-on-enum-148634.rs add Tainted for NonAsmTypeReason 2025-11-14 12:42:50 +08:00
invalid-repr-simd-on-enum-148634.stderr add Tainted for NonAsmTypeReason 2025-11-14 12:42:50 +08:00
invalid-sym-operand.rs add needs-asm-support to invalid-sym-operand 2024-08-02 19:59:34 +01:00
invalid-sym-operand.stderr add needs-asm-support to invalid-sym-operand 2024-08-02 19:59:34 +01:00
issue-72570.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-72570.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-85247.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
issue-85247.rwpi.stderr Ignore more failing ui tests for GCC backend 2025-10-13 15:30:26 +02:00
issue-87802.rs Update test directives for wasm32-wasip1 2024-03-11 09:36:35 -07:00
issue-87802.stderr Update test directives for wasm32-wasip1 2024-03-11 09:36:35 -07:00
issue-89305.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-89305.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-92378.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
issue-97490.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-99071.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
issue-99071.stderr Remove needs-asm-support directive in tests with explicit targets 2025-10-16 14:05:04 +02:00
issue-99122-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-99122.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-99122.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-113788.rs Merge E0412 into E0425 2025-12-02 18:25:13 +00:00
issue-113788.stderr Merge E0412 into E0425 2025-12-02 18:25:13 +00:00
label-operand.rs add multi-arch asm! label operand test 2025-10-06 05:54:53 +02:00
may_unwind.rs Add ignore-backends annotations in failing GCC backend ui tests 2025-07-23 13:48:04 +02:00
may_unwind_ffi_unwind.rs Handle inline asm in has_ffi_unwind_calls 2025-11-25 16:01:02 +00:00
may_unwind_ffi_unwind.stderr Handle inline asm in has_ffi_unwind_calls 2025-11-25 16:01:02 +00:00
naked-asm-mono-sym-fn.rs Rename Instance::new to Instance::new_raw and add a note that it is raw 2025-05-05 13:17:35 +00:00
naked-asm-outside-naked-fn.rs stabilize naked_functions 2025-04-20 11:18:38 +02:00
naked-asm-outside-naked-fn.stderr stabilize naked_functions 2025-04-20 11:18:38 +02:00
naked-function-shim.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
naked-functions-ffi.rs Remove i128 and u128 from improper_ctypes_definitions 2025-05-29 12:55:26 +00:00
naked-functions-ffi.stderr Remove i128 and u128 from improper_ctypes_definitions 2025-05-29 12:55:26 +00:00
naked-functions-inline.rs Remove uses of cfg(any()/all()) 2025-12-10 23:41:19 +00:00
naked-functions-inline.stderr Remove uses of cfg(any()/all()) 2025-12-10 23:41:19 +00:00
naked-functions-instruction-set.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
naked-functions-rustic-abi.rs stabilize naked_functions 2025-04-20 11:18:38 +02:00
naked-functions-target-feature.rs stabilize naked_functions 2025-04-20 11:18:38 +02:00
naked-functions-testattrs.rs stabilize naked_functions 2025-04-20 11:18:38 +02:00
naked-functions-testattrs.stderr stabilize naked_functions 2025-04-20 11:18:38 +02:00
naked-functions-unused.aarch64.stderr stabilize naked_functions 2025-04-20 11:18:38 +02:00
naked-functions-unused.rs stabilize naked_functions 2025-04-20 11:18:38 +02:00
naked-functions-unused.x86_64.stderr stabilize naked_functions 2025-04-20 11:18:38 +02:00
naked-functions.rs allow #[rustfmt::skip] in combination with #[naked] 2025-05-03 19:15:19 +02:00
naked-functions.stderr stabilize naked_functions 2025-04-20 11:18:38 +02:00
naked-invalid-attr.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
naked-invalid-attr.stderr Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
naked-with-invalid-repr-attr.rs Mitigate #[align] name resolution ambiguity regression with a rename 2025-07-19 01:42:30 +08:00
naked-with-invalid-repr-attr.stderr Mitigate #[align] name resolution ambiguity regression with a rename 2025-07-19 01:42:30 +08:00
named-asm-labels.rs Don't lint against named labels in naked_asm! 2025-07-26 00:42:21 +01:00
named-asm-labels.s Move /src/test to /tests 2023-01-11 09:32:08 +00:00
named-asm-labels.stderr Don't lint against named labels in naked_asm! 2025-07-26 00:42:21 +01:00
named_const_simd_vec_len.rs Move inline_asm to typeck, properly handle aliases 2025-04-27 22:05:07 +00:00
non-const.rs Note def descr in NonConstFunctionCall 2024-12-23 22:15:32 +00:00
non-const.stderr review comments 2025-11-02 20:12:26 +00:00
noreturn.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
normalizable-asm-ty.rs Move inline_asm to typeck, properly handle aliases 2025-04-27 22:05:07 +00:00
parse-error.rs delay error for unsupported options 2025-05-18 11:28:31 +02:00
parse-error.stderr Do not mention -Zmacro-backtrace for std macros that are a wrapper around a compiler intrinsic 2026-01-26 17:34:31 +00:00
reg-conflict.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
reg-conflict.stderr Ignore more failing ui tests for GCC backend 2025-10-13 15:30:26 +02:00
simple_global_asm.rs stabilize naked_functions 2025-04-20 11:18:38 +02:00
tainting-on-error.rs Pass InferCtxt to InlineAsmCtxt to properly taint on error 2025-03-10 14:28:09 +00:00
tainting-on-error.stderr Pass InferCtxt to InlineAsmCtxt to properly taint on error 2025-03-10 14:28:09 +00:00
type-check-1.rs stabilize asm_const 2024-08-13 23:18:31 +02:00
type-check-1.stderr stabilize asm_const 2024-08-13 23:18:31 +02:00
type-check-4.rs UI tests: add missing diagnostic kinds where possible 2025-04-08 23:06:31 +03:00
type-check-4.stderr Update test directives for wasm32-wasip1 2024-03-11 09:36:35 -07:00
unpretty-expanded.rs Explicitly annotate edition for unpretty=expanded and unpretty=hir tests 2025-04-16 11:10:10 +02:00
unpretty-expanded.stdout Explicitly export core and std macros 2026-01-13 08:47:48 +01:00
unsupported-option.fixed add needs-asm-support to tests/ui/asm/unsupported-option.rs 2024-07-27 19:27:20 +02:00
unsupported-option.rs add needs-asm-support to tests/ui/asm/unsupported-option.rs 2024-07-27 19:27:20 +02:00
unsupported-option.stderr add needs-asm-support to tests/ui/asm/unsupported-option.rs 2024-07-27 19:27:20 +02:00