rust/src
Matthias Krüger 3f86eddf83
Rollup merge of #131664 - taiki-e:s390x-asm-vreg-inout, r=Amanieu
Support input/output in vector registers of s390x inline assembly (under asm_experimental_reg feature)

This extends currently clobber-only vector registers (`vreg`) support to allow passing `#[repr(simd)]` types, floats (f32/f64/f128), and integers (i32/i64/i128) as input/output.

This is unstable and gated under new `#![feature(asm_experimental_reg)]` (tracking issue: https://github.com/rust-lang/rust/issues/133416). If the feature is not enabled, only clober is supported as before.

| Architecture | Register class | Target feature | Allowed types |
| ------------ | -------------- | -------------- | -------------- |
| s390x | `vreg` | `vector` | `i32`, `f32`, `i64`, `f64`, `i128`, `f128`, `i8x16`, `i16x8`, `i32x4`, `i64x2`, `f32x4`, `f64x2` |

This matches the list of types that are supported by the vector registers in LLVM:
https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/SystemZ/SystemZRegisterInfo.td#L301-L313

In addition to `core::simd` types and floats listed above, custom `#[repr(simd)]` types of the same size and type are also allowed. All allowed types other than i32/f32/i64/f64/i128, and relevant target features are currently unstable.

Currently there is no SIMD type for s390x in `core::arch`, but this is tracked in https://github.com/rust-lang/rust/issues/130869.

cc https://github.com/rust-lang/rust/issues/130869 about vector facility support in s390x
cc https://github.com/rust-lang/rust/issues/125398 & https://github.com/rust-lang/rust/issues/116909 about f128 support in asm

`@rustbot` label +O-SystemZ +A-inline-assembly
2024-11-25 07:01:37 +01:00
..
bootstrap Auto merge of #133068 - jieyouxu:download-rustc-default-only-for-tools, r=clubby789 2024-11-24 16:28:55 +00:00
build_helper move src/tools/build_helper into src/build_helper 2024-11-11 11:19:11 +03:00
ci ci: don't force CI rustc for x86_64-gnu-tools 2024-11-23 23:58:44 +08:00
doc Rollup merge of #131664 - taiki-e:s390x-asm-vreg-inout, r=Amanieu 2024-11-25 07:01:37 +01:00
etc Bump bootstrap deps 2024-11-13 17:58:04 +00:00
gcc@fd3498bff0 Update GCC version 2024-09-06 16:01:46 +02:00
librustdoc do not to_string, use display 2024-11-23 23:16:26 +03:00
llvm-project@104d0d16c3 Update LLVM to 19.1.4 2024-11-20 16:59:48 +01:00
rustc-std-workspace update rustc-std-workspace crates 2024-11-04 07:45:15 +01:00
rustdoc-json-types Auto merge of #131980 - matthiaskrgr:rollup-iy5nw71, r=matthiaskrgr 2024-10-20 21:40:21 +00:00
tools Rollup merge of #133405 - Zalathar:style-file, r=jieyouxu 2024-11-24 11:08:21 +01:00
README.md
stage0 bump stage0 to 1.83.0-beta.1 2024-10-15 20:13:55 -07:00
version Bump to 1.85 2024-11-22 11:08:33 +00:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.