Skip to content

Commit d0d7ace

Browse files
Rollup merge of #154184 - folkertdev:stabilize-s390x-vector-registers, r=Amanieu
stabilize s390x vector registers tracking issue: rust-lang/rust#133416 reference PR: rust-lang/reference#2215 Stabilizes s390x vector registers, e.g. ```rust unsafe fn vreg_128(x: i128) -> i128 { let y; asm!("vlr {}, {}", out(vreg) y, in(vreg) x); y } ``` The types that are accepted for vreg registers are - all float types `f16`, `f32`, `f64`, `f128` - integer types `i32`, `i64` and `i128` and their unsigned counterparts - integer vector types `i8x16`, `i16x8`, `i32x4`, `i64x2` and their unsigned counterparts - float vector types `f16x8`, `f32x4` and `f64x2` Support for all of these is tested in https://github.com/rust-lang/rust/blob/main/tests/assembly-llvm/asm/s390x-types.rs, and the types correspond with the LLVM definition in https://github.com/llvm/llvm-project/blob/df9eb79970c012990e829d174d181d575d414efe/llvm/lib/Target/SystemZ/SystemZRegisterInfo.td#L312-L339 The `f16`, `f16x8` and `f128` types are unstable, and so can't be used on stable in practice. They do show up in some error messages though. `vreg` was previously only accepted as a clobber. --- Currently the vector types in `core::arch::s390x` are still unstable. Separately stabilizing `vreg` is still useful because scalar types can also be put into `vreg`s. ## Implementation history - rust-lang/rust#131664 - rust-lang/rust#150826 cc @uweigand @taiki-e r? @Amanieu
2 parents d3adcf1 + ab542b5 commit d0d7ace

0 file changed

File tree

    0 commit comments

    Comments
     (0)