rust/compiler
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
..
rustc
rustc_abi Auto merge of #130867 - michirakara:steps_between, r=dtolnay 2024-11-22 10:54:22 +00:00
rustc_arena
rustc_ast Implement the unsafe-fields RFC. 2024-11-21 19:32:07 +01:00
rustc_ast_ir
rustc_ast_lowering Rollup merge of #131664 - taiki-e:s390x-asm-vreg-inout, r=Amanieu 2024-11-25 07:01:37 +01:00
rustc_ast_passes Implement the unsafe-fields RFC. 2024-11-21 19:32:07 +01:00
rustc_ast_pretty Introduce InvisibleOrigin on invisible delimiters. 2024-11-21 08:16:54 +11:00
rustc_attr
rustc_baked_icu_data
rustc_borrowck reduce false positives of tail-expr-drop-order from consumed values 2024-11-20 20:53:11 +08:00
rustc_builtin_macros Support use of asm goto with outputs and options(noreturn) 2024-11-24 14:18:10 +00:00
rustc_codegen_cranelift Rollup merge of #131664 - taiki-e:s390x-asm-vreg-inout, r=Amanieu 2024-11-25 07:01:37 +01:00
rustc_codegen_gcc Make s390x non-clobber-only vector register support unstable 2024-11-24 21:42:22 +09:00
rustc_codegen_llvm Rollup merge of #131664 - taiki-e:s390x-asm-vreg-inout, r=Amanieu 2024-11-25 07:01:37 +01:00
rustc_codegen_ssa Rollup merge of #133384 - RalfJung:vector-abi-check-tests, r=jieyouxu 2024-11-25 00:39:06 +08:00
rustc_const_eval remove is_trivially_const_drop 2024-11-23 08:41:06 +01:00
rustc_data_structures Add UnordMap::clear method 2024-11-20 18:11:37 +01:00
rustc_driver
rustc_driver_impl Rollup merge of #130236 - yaahc:unstable-feature-usage, r=estebank 2024-11-21 11:58:36 +01:00
rustc_error_codes
rustc_error_messages
rustc_errors
rustc_expand Implement the unsafe-fields RFC. 2024-11-21 19:32:07 +01:00
rustc_feature Rollup merge of #131664 - taiki-e:s390x-asm-vreg-inout, r=Amanieu 2024-11-25 07:01:37 +01:00
rustc_fluent_macro
rustc_fs_util
rustc_graphviz
rustc_hir Implement the unsafe-fields RFC. 2024-11-21 19:32:07 +01:00
rustc_hir_analysis Rollup merge of #131664 - taiki-e:s390x-asm-vreg-inout, r=Amanieu 2024-11-25 07:01:37 +01:00
rustc_hir_pretty
rustc_hir_typeck Auto merge of #131859 - chriskrycho:update-trpl, r=onur-ozkan 2024-11-23 23:26:19 +00:00
rustc_incremental
rustc_index reduce false positives of tail-expr-drop-order from consumed values 2024-11-20 20:53:11 +08:00
rustc_index_macros Auto merge of #130867 - michirakara:steps_between, r=dtolnay 2024-11-22 10:54:22 +00:00
rustc_infer Auto merge of #133242 - lcnr:questionable-uwu, r=compiler-errors,BoxyUwU 2024-11-23 18:01:21 +00:00
rustc_interface
rustc_lexer
rustc_lint no more Reveal :( 2024-11-23 13:52:54 +01:00
rustc_lint_defs show abi_unsupported_vector_types lint in future breakage reports 2024-11-23 09:15:25 +01:00
rustc_llvm Rollup merge of #127483 - BertalanD:no_sanitize-global-var, r=rcvalle 2024-11-23 20:19:51 +08:00
rustc_log
rustc_macros
rustc_metadata Rollup merge of #133300 - Enselic:build-std-instrument-coverage, r=jieyouxu 2024-11-24 11:08:18 +01:00
rustc_middle Rollup merge of #133371 - RalfJung:is_trivially_const_drop, r=compiler-errors 2024-11-24 11:08:19 +01:00
rustc_mir_build Auto merge of #131859 - chriskrycho:update-trpl, r=onur-ozkan 2024-11-23 23:26:19 +00:00
rustc_mir_dataflow ElaborateDrops: use typing_env directly 2024-11-23 13:46:07 +01:00
rustc_mir_transform rebase 2024-11-23 13:52:57 +01:00
rustc_monomorphize remove remaining references to Reveal 2024-11-23 13:52:56 +01:00
rustc_next_trait_solver remove remaining references to Reveal 2024-11-23 13:52:56 +01:00
rustc_parse Update messages which reference book chs. 17-20 2024-11-23 08:57:24 -07:00
rustc_parse_format
rustc_passes Auto merge of #133379 - jieyouxu:rollup-00jxo71, r=jieyouxu 2024-11-23 20:45:19 +00:00
rustc_pattern_analysis no more Reveal :( 2024-11-23 13:52:54 +01:00
rustc_privacy
rustc_query_impl
rustc_query_system
rustc_resolve Rollup merge of #133105 - bvanjoi:issue-132743, r=petrochenkov 2024-11-25 00:39:04 +08:00
rustc_sanitizers
rustc_serialize
rustc_session Rollup merge of #133159 - Zalathar:unstable-options-no-value, r=jieyouxu 2024-11-22 21:07:40 -05:00
rustc_smir reduce false positives of tail-expr-drop-order from consumed values 2024-11-20 20:53:11 +08:00
rustc_span Rollup merge of #131664 - taiki-e:s390x-asm-vreg-inout, r=Amanieu 2024-11-25 07:01:37 +01:00
rustc_symbol_mangling additional TypingEnv cleanups 2024-11-19 21:36:23 +01:00
rustc_target Rollup merge of #131664 - taiki-e:s390x-asm-vreg-inout, r=Amanieu 2024-11-25 07:01:37 +01:00
rustc_trait_selection Auto merge of #133242 - lcnr:questionable-uwu, r=compiler-errors,BoxyUwU 2024-11-23 18:01:21 +00:00
rustc_traits
rustc_transmute
rustc_ty_utils rebase 2024-11-23 13:52:57 +01:00
rustc_type_ir Auto merge of #133242 - lcnr:questionable-uwu, r=compiler-errors,BoxyUwU 2024-11-23 18:01:21 +00:00
rustc_type_ir_macros
stable_mir