mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 21:12:18 +01:00
2f98dcf9ba
Stabilize s390x inline assembly This stabilizes inline assembly for s390x (SystemZ). Corresponding reference PR: https://github.com/rust-lang/reference/pull/1643 --- From the requirements of stabilization mentioned in https://github.com/rust-lang/rust/issues/93335 > Each architecture needs to be reviewed before stabilization: > - It must have clobber_abi. Done in https://github.com/rust-lang/rust/pull/130630. > - It must be possible to clobber every register that is normally clobbered by a function call. Done in the PR that added support for clobber_abi. > - Generally review that the exposed register classes make sense. The followings can be used as input/output: - `reg` (`r[0-10]`, `r[12-14]`): General-purpose register - `reg_addr` (`r[1-10]`, `r[12-14]`): General-purpose register except `r0` which is evaluated as zero in an address context This class is needed because `r0`, which may be allocated when using the `reg` class, cannot be used as a register in certain contexts. This is identical to the `a` constraint in LLVM and GCC. See https://github.com/rust-lang/rust/pull/119431 for details. - `freg` (`f[0-15]`): Floating-point register The followings are clobber-only: - `vreg` (`v[0-31]`): Vector register Technically `vreg` should be able to accept `#[repr(simd)]` types as input/output if the unstable `vector` target feature added is enabled, but `core::arch` has no s390x vector type and both `#[repr(simd)]` and `core::simd` are unstable. Everything related is unstable, so the fact that this is currently a clobber-only should not be considered a stabilization blocker. (https://github.com/rust-lang/rust/issues/130869 tracks unstable stuff here) - `areg` (`a[2-15]`): Access register All of the above register classes except `reg_addr` are needed for `clobber_abi`. The followings cannot be used as operands for inline asm (see also [getReservedRegs](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp#L258-L282) and [SystemZELFRegisters](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/SystemZ/SystemZRegisterInfo.h#L107-L128) in LLVM): - `r11`: frame pointer - `r15`: stack pointer - `a0`, `a1`: Reserved for system use - `c[0-15]` (control register) Reserved by the kernel Although not listed in the above requirements, `preserves_flags` is implemented in https://github.com/rust-lang/rust/pull/111331. --- cc ``@uweigand`` r? ``@Amanieu`` ``@rustbot`` label +O-SystemZ +A-inline-assembly |
||
---|---|---|
.. | ||
asm | ||
auxiliary | ||
compiletest-self-test | ||
libs | ||
nvptx-kernel-abi | ||
simd | ||
stack-protector | ||
targets | ||
aarch64-naked-fn-no-bti-prolog.rs | ||
aarch64-pointer-auth.rs | ||
align_offset.rs | ||
closure-inherit-target-feature.rs | ||
cmse.rs | ||
dwarf4.rs | ||
dwarf5.rs | ||
is_aligned.rs | ||
issue-83585-small-pod-struct-equality.rs | ||
manual-eq-efficient.rs | ||
niche-prefer-zero.rs | ||
nvptx-arch-default.rs | ||
nvptx-arch-emit-asm.rs | ||
nvptx-arch-link-arg.rs | ||
nvptx-arch-target-cpu.rs | ||
nvptx-atomics.rs | ||
nvptx-c-abi-arg-v7.rs | ||
nvptx-c-abi-ret-v7.rs | ||
nvptx-internalizing.rs | ||
nvptx-linking-binary.rs | ||
nvptx-linking-cdylib.rs | ||
nvptx-safe-naming.rs | ||
panic-no-unwind-no-uwtable.rs | ||
panic-unwind-no-uwtable.rs | ||
pic-relocation-model.rs | ||
pie-relocation-model.rs | ||
powerpc64-struct-abi.rs | ||
riscv-soft-abi-with-float-features.rs | ||
rust-abi-arg-attr.rs | ||
s390x-backchain-toggle.rs | ||
simd-bitmask.rs | ||
simd-intrinsic-gather.rs | ||
simd-intrinsic-mask-load.rs | ||
simd-intrinsic-mask-reduce.rs | ||
simd-intrinsic-mask-store.rs | ||
simd-intrinsic-scatter.rs | ||
simd-intrinsic-select.rs | ||
slice-is_ascii.rs | ||
small_data_threshold.rs | ||
sparc-struct-abi.rs | ||
stack-probes.rs | ||
static-relocation-model.rs | ||
strict_provenance.rs | ||
target-feature-multiple.rs | ||
wasm_exceptions.rs | ||
x86_64-array-pair-load-store-merge.rs | ||
x86_64-cmp.rs | ||
x86_64-floating-point-clamp.rs | ||
x86_64-fortanix-unknown-sgx-lvi-generic-load.rs | ||
x86_64-fortanix-unknown-sgx-lvi-generic-ret.rs | ||
x86_64-fortanix-unknown-sgx-lvi-inline-assembly.rs | ||
x86_64-function-return.rs | ||
x86_64-naked-fn-no-cet-prolog.rs | ||
x86_64-no-jump-tables.rs | ||
x86_64-sse_crc.rs | ||
x86_64-typed-swap.rs | ||
x86_64-windows-float-abi.rs | ||
x86-return-float.rs |