rust/tests/assembly
Matthias Krüger 762acf53cb
Rollup merge of #137816 - folkertdev:naked-asm-xcoff, r=Noratrieb
attempt to support `BinaryFormat::Xcoff` in `naked_asm!`

Fixes https://github.com/rust-lang/rust/issues/137219

So, the inline assembly support for xcoff is extremely limited. The LLVM [XCOFFAsmParser](1b25c0c4da/llvm/lib/MC/MCParser/XCOFFAsmParser.cpp) does not support many of the attributes that LLVM itself emits, and that should exist based on [the assembler docs](https://www.ibm.com/docs/en/ssw_aix_71/assembler/assembler_pdf.pdf). It also does accept some that should not exist based on those docs.

So, I've tried to do the best I can given those limitations. At least it's better than emitting the directives for elf and having that fail somewhere deep in LLVM. Given that inline assembly for this target is incomplete (under `asm_experimental_arch`), I think that's OK (and again I don't see how we can do better given the limitations in LLVM).

r? ```@Noratrieb``` (given that you reviewed https://github.com/rust-lang/rust/pull/136637)

It seems reasonable to ping the [`powerpc64-ibm-aix` target maintainers](https://doc.rust-lang.org/rustc/platform-support/aix.html), hopefully they have thoughts too: ```@daltenty``` ```@gilamn5tr```
2025-03-13 11:28:20 +01:00
..
asm Create a generic AVR target: avr-none 2025-02-19 19:01:51 +01:00
auxiliary Add tests for -Zdwarf-version lto behavior 2025-02-08 16:33:36 +00:00
compiletest-self-test tests/assembly: add minicore compiletest self-test 2024-10-31 18:20:11 +08:00
libs tests/assembly: use -Copt-level=3 instead of -O 2025-02-08 19:02:32 -08:00
naked-functions support XCOFF in naked_asm! 2025-03-08 14:10:29 +01:00
nvptx-kernel-abi Restore previous ABI for f_single_u8_arg 2025-01-26 14:14:33 +00:00
simd tests/assembly: use -Copt-level=3 instead of -O 2025-02-08 19:02:32 -08:00
stack-protector Rollup merge of #137957 - Noratrieb:no, r=wesleywiser 2025-03-07 21:57:50 -05:00
targets Target definition for wasm32-wali-linux-musl to support the Wasm Linux 2025-03-10 21:26:45 -04:00
aarch64-pointer-auth.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
align_offset.rs Run rustfmt on tests/assembly/. 2024-05-30 16:15:46 +10:00
breakpoint.rs Add core::arch::breakpoint and test 2024-12-02 23:56:24 -08:00
closure-inherit-target-feature.rs x86-sse2 ABI: use SSE registers for floats and SIMD 2025-02-18 16:11:41 +01:00
cmse.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
dwarf-mixed-versions-lto.rs DWARF mixed versions with LTO on MIPS 2025-02-24 11:58:38 +01:00
dwarf4.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
dwarf5.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
is_aligned.rs Run rustfmt on tests/assembly/. 2024-05-30 16:15:46 +10:00
issue-83585-small-pod-struct-equality.rs Fix tests for 32 bits targets 2024-06-11 07:45:16 +00:00
manual-eq-efficient.rs tests/assembly: use -Copt-level=3 instead of -O 2025-02-08 19:02:32 -08:00
niche-prefer-zero.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
nvptx-arch-default.rs NVPTX: Enable previously disabled tests 2024-03-11 13:35:58 +01:00
nvptx-arch-emit-asm.rs NVPTX: Enable previously disabled tests 2024-03-11 13:35:58 +01:00
nvptx-arch-link-arg.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
nvptx-arch-target-cpu.rs NVPTX: Enable previously disabled tests 2024-03-11 13:35:58 +01:00
nvptx-atomics.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
nvptx-c-abi-arg-v7.rs NVPTX:_Especially add the DoubleI32 struct as a nvptx abi test case since it was used as an example when discussing possible problems 2024-05-31 23:12:33 +02:00
nvptx-c-abi-ret-v7.rs NVPTX:_Especially add the DoubleI32 struct as a nvptx abi test case since it was used as an example when discussing possible problems 2024-05-31 23:12:33 +02:00
nvptx-internalizing.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
nvptx-linking-binary.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
nvptx-linking-cdylib.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
nvptx-safe-naming.rs NVPTX: Enable previously disabled tests 2024-03-11 13:35:58 +01:00
panic-no-unwind-no-uwtable.rs tests/assembly: use -Copt-level=3 instead of -O 2025-02-08 19:02:32 -08:00
panic-unwind-no-uwtable.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
pic-relocation-model.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
pie-relocation-model.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
powerpc64-struct-abi.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
riscv-soft-abi-with-float-features.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
rust-abi-arg-attr.rs remove support for rustc_intrinsic_must_be_overridden from the compiler 2025-02-24 07:53:59 +01:00
s390x-backchain-toggle.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
s390x-vector-abi.rs tests/assembly: use -Copt-level=3 instead of -O 2025-02-08 19:02:32 -08:00
simd-bitmask.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
simd-intrinsic-gather.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
simd-intrinsic-mask-load.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
simd-intrinsic-mask-reduce.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
simd-intrinsic-mask-store.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
simd-intrinsic-scatter.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
simd-intrinsic-select.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
slice-is_ascii.rs tests/assembly: use -Copt-level=3 instead of -O 2025-02-08 19:02:32 -08:00
small_data_threshold.rs Remove a footgun-y feature / relic of the past from the compiletest DSL 2025-02-03 05:45:18 +01:00
sparc-struct-abi.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
stack-probes.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
static-relocation-model.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
strict_provenance.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
target-feature-multiple.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
wasm_exceptions.rs Fix wasm_exceptions test 2024-06-19 21:26:48 +01:00
x86-return-float.rs x86-sse2 ABI: use SSE registers for floats and SIMD 2025-02-18 16:11:41 +01:00
x86_64-array-pair-load-store-merge.rs tests/assembly: use -Copt-level=3 instead of -O 2025-02-08 19:02:32 -08:00
x86_64-bigint-helpers.rs tests/assembly: use -Copt-level=3 instead of -O 2025-02-08 19:02:32 -08:00
x86_64-cmp.rs tests: use max-llvm-major-version instead of ignore-llvm-version range like N - 99 2024-11-14 17:44:54 +08:00
x86_64-floating-point-clamp.rs tests/assembly: use -Copt-level=3 instead of -O 2025-02-08 19:02:32 -08:00
x86_64-fortanix-unknown-sgx-lvi-generic-load.rs Run rustfmt on tests/assembly/. 2024-05-30 16:15:46 +10:00
x86_64-fortanix-unknown-sgx-lvi-generic-ret.rs Run rustfmt on tests/assembly/. 2024-05-30 16:15:46 +10:00
x86_64-fortanix-unknown-sgx-lvi-inline-assembly.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
x86_64-function-return.rs tests/assembly: use -Copt-level=3 instead of -O 2025-02-08 19:02:32 -08:00
x86_64-no-jump-tables.rs tests/assembly: use -Copt-level=3 instead of -O 2025-02-08 19:02:32 -08:00
x86_64-sse_crc.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
x86_64-typed-swap.rs tests/assembly: make typed-swap test much less fragile 2025-02-08 19:02:04 -08:00
x86_64-windows-float-abi.rs tests/assembly: make windows ABI test cross-compile 2025-02-08 19:02:01 -08:00
x86_64-windows-i128-abi.rs x86_win64 ABI: do not use xmm0 with softfloat ABI 2025-02-19 08:41:19 +01:00