Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 379b221

Browse files
authoredNov 21, 2024
Rollup merge of #131586 - taiki-e:s390x-vector-abi, r=compiler-errors,uweigand
Support s390x z13 vector ABI cc #130869 This resolves the following fixmes: - https://github.com/rust-lang/rust/blob/58420a065b68ecb3eec03b942740c761cdadd5c4/compiler/rustc_target/src/abi/call/s390x.rs#L1-L2 - https://github.com/rust-lang/rust/blob/58420a065b68ecb3eec03b942740c761cdadd5c4/compiler/rustc_target/src/spec/targets/s390x_unknown_linux_gnu.rs#L9-L11 Refs: Section 1.2.3 "Parameter Passing" and section 1.2.5 "Return Values" in ELF Application Binary Interface s390x Supplement, Version 1.6.1 (lzsabi_s390x.pdf in https://github.com/IBM/s390x-abi/releases/tag/v1.6.1) This PR extends ~~#127731 #132173 (merged) 's ABI check to handle cases where `vector` target feature is disabled. If we do not do ABI check, we run into the ABI problems as described in #116558 and #130869 (comment), and the problem of the compiler generating strange code (#131586 (comment)). cc `@uweigand` `@rustbot` label +O-SystemZ +A-ABI
2 parents 3956495 + 7652e34 commit 379b221

File tree

9 files changed

+865
-14
lines changed

9 files changed

+865
-14
lines changed
 

‎compiler/rustc_abi/src/layout/ty.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,24 @@ impl<'a, Ty> TyAndLayout<'a, Ty> {
209209
}
210210
}
211211

212+
pub fn is_single_vector_element<C>(self, cx: &C, expected_size: Size) -> bool
213+
where
214+
Ty: TyAbiInterface<'a, C>,
215+
C: HasDataLayout,
216+
{
217+
match self.backend_repr {
218+
BackendRepr::Vector { .. } => self.size == expected_size,
219+
BackendRepr::Memory { .. } => {
220+
if self.fields.count() == 1 && self.fields.offset(0).bytes() == 0 {
221+
self.field(cx, 0).is_single_vector_element(cx, expected_size)
222+
} else {
223+
false
224+
}
225+
}
226+
_ => false,
227+
}
228+
}
229+
212230
pub fn is_adt<C>(self) -> bool
213231
where
214232
Ty: TyAbiInterface<'a, C>,

‎compiler/rustc_target/src/callconv/s390x.rs

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
// FIXME: The assumes we're using the non-vector ABI, i.e., compiling
2-
// for a pre-z13 machine or using -mno-vx.
1+
// Reference: ELF Application Binary Interface s390x Supplement
2+
// https://github.com/IBM/s390x-abi
33

4-
use crate::abi::call::{ArgAbi, FnAbi, Reg};
5-
use crate::abi::{HasDataLayout, TyAbiInterface};
4+
use crate::abi::call::{ArgAbi, FnAbi, Reg, RegKind};
5+
use crate::abi::{BackendRepr, HasDataLayout, TyAbiInterface};
66
use crate::spec::HasTargetSpec;
77

88
fn classify_ret<Ty>(ret: &mut ArgAbi<'_, Ty>) {
9-
if !ret.layout.is_aggregate() && ret.layout.size.bits() <= 64 {
9+
let size = ret.layout.size;
10+
if size.bits() <= 128 && matches!(ret.layout.backend_repr, BackendRepr::Vector { .. }) {
11+
return;
12+
}
13+
if !ret.layout.is_aggregate() && size.bits() <= 64 {
1014
ret.extend_integer_width_to(64);
1115
} else {
1216
ret.make_indirect();
@@ -32,19 +36,25 @@ where
3236
}
3337
return;
3438
}
35-
if !arg.layout.is_aggregate() && arg.layout.size.bits() <= 64 {
39+
40+
let size = arg.layout.size;
41+
if size.bits() <= 128 && arg.layout.is_single_vector_element(cx, size) {
42+
arg.cast_to(Reg { kind: RegKind::Vector, size });
43+
return;
44+
}
45+
if !arg.layout.is_aggregate() && size.bits() <= 64 {
3646
arg.extend_integer_width_to(64);
3747
return;
3848
}
3949

4050
if arg.layout.is_single_fp_element(cx) {
41-
match arg.layout.size.bytes() {
51+
match size.bytes() {
4252
4 => arg.cast_to(Reg::f32()),
4353
8 => arg.cast_to(Reg::f64()),
4454
_ => arg.make_indirect(),
4555
}
4656
} else {
47-
match arg.layout.size.bytes() {
57+
match size.bytes() {
4858
1 => arg.cast_to(Reg::i8()),
4959
2 => arg.cast_to(Reg::i16()),
5060
4 => arg.cast_to(Reg::i32()),

‎compiler/rustc_target/src/spec/targets/s390x_unknown_linux_gnu.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ pub(crate) fn target() -> Target {
66
base.endian = Endian::Big;
77
// z10 is the oldest CPU supported by LLVM
88
base.cpu = "z10".into();
9-
// FIXME: The ABI implementation in abi/call/s390x.rs is for now hard-coded to assume the no-vector
10-
// ABI. Pass the -vector feature string to LLVM to respect this assumption.
11-
base.features = "-vector".into();
129
base.max_atomic_width = Some(128);
1310
base.min_global_align = Some(16);
1411
base.stack_probes = StackProbeType::Inline;

‎compiler/rustc_target/src/spec/targets/s390x_unknown_linux_musl.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ pub(crate) fn target() -> Target {
66
base.endian = Endian::Big;
77
// z10 is the oldest CPU supported by LLVM
88
base.cpu = "z10".into();
9-
// FIXME: The ABI implementation in abi/call/s390x.rs is for now hard-coded to assume the no-vector
10-
// ABI. Pass the -vector feature string to LLVM to respect this assumption.
11-
base.features = "-vector".into();
129
base.max_atomic_width = Some(128);
1310
base.min_global_align = Some(16);
1411
base.static_position_independent_executables = true;

‎tests/assembly/s390x-vector-abi.rs

Lines changed: 322 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,322 @@
1+
//@ revisions: z10 z10_vector z13 z13_no_vector
2+
// ignore-tidy-linelength
3+
//@ assembly-output: emit-asm
4+
//@ compile-flags: -O -Z merge-functions=disabled
5+
//@[z10] compile-flags: --target s390x-unknown-linux-gnu --cfg no_vector
6+
//@[z10] needs-llvm-components: systemz
7+
//@[z10_vector] compile-flags: --target s390x-unknown-linux-gnu -C target-feature=+vector
8+
//@[z10_vector] needs-llvm-components: systemz
9+
//@[z13] compile-flags: --target s390x-unknown-linux-gnu -C target-cpu=z13
10+
//@[z13] needs-llvm-components: systemz
11+
//@[z13_no_vector] compile-flags: --target s390x-unknown-linux-gnu -C target-cpu=z13 -C target-feature=-vector --cfg no_vector
12+
//@[z13_no_vector] needs-llvm-components: systemz
13+
14+
#![feature(no_core, lang_items, repr_simd, s390x_target_feature)]
15+
#![no_core]
16+
#![crate_type = "lib"]
17+
#![allow(non_camel_case_types)]
18+
19+
// Cases where vector feature is disabled are rejected.
20+
// See tests/ui/simd-abi-checks-s390x.rs for test for them.
21+
22+
#[lang = "sized"]
23+
pub trait Sized {}
24+
#[lang = "copy"]
25+
pub trait Copy {}
26+
#[lang = "freeze"]
27+
pub trait Freeze {}
28+
29+
impl<T: Copy, const N: usize> Copy for [T; N] {}
30+
31+
#[lang = "phantom_data"]
32+
pub struct PhantomData<T: ?Sized>;
33+
impl<T: ?Sized> Copy for PhantomData<T> {}
34+
35+
#[repr(simd)]
36+
pub struct i8x8([i8; 8]);
37+
#[repr(simd)]
38+
pub struct i8x16([i8; 16]);
39+
#[repr(simd)]
40+
pub struct i8x32([i8; 32]);
41+
#[repr(C)]
42+
pub struct Wrapper<T>(T);
43+
#[repr(C, align(16))]
44+
pub struct WrapperAlign16<T>(T);
45+
#[repr(C)]
46+
pub struct WrapperWithZst<T>(T, PhantomData<()>);
47+
#[repr(transparent)]
48+
pub struct TransparentWrapper<T>(T);
49+
50+
impl Copy for i8 {}
51+
impl Copy for i64 {}
52+
impl Copy for i8x8 {}
53+
impl Copy for i8x16 {}
54+
impl Copy for i8x32 {}
55+
impl<T: Copy> Copy for Wrapper<T> {}
56+
impl<T: Copy> Copy for WrapperAlign16<T> {}
57+
impl<T: Copy> Copy for WrapperWithZst<T> {}
58+
impl<T: Copy> Copy for TransparentWrapper<T> {}
59+
60+
// CHECK-LABEL: vector_ret_small:
61+
// CHECK: vlrepg %v24, 0(%r2)
62+
// CHECK-NEXT: br %r14
63+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
64+
#[no_mangle]
65+
unsafe extern "C" fn vector_ret_small(x: &i8x8) -> i8x8 {
66+
*x
67+
}
68+
// CHECK-LABEL: vector_ret:
69+
// CHECK: vl %v24, 0(%r2), 3
70+
// CHECK-NEXT: br %r14
71+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
72+
#[no_mangle]
73+
unsafe extern "C" fn vector_ret(x: &i8x16) -> i8x16 {
74+
*x
75+
}
76+
// CHECK-LABEL: vector_ret_large:
77+
// z10: vl %v0, 16(%r3), 4
78+
// z10-NEXT: vl %v1, 0(%r3), 4
79+
// z10-NEXT: vst %v0, 16(%r2), 4
80+
// z10-NEXT: vst %v1, 0(%r2), 4
81+
// z10-NEXT: br %r14
82+
// z13: vl %v0, 0(%r3), 4
83+
// z13-NEXT: vl %v1, 16(%r3), 4
84+
// z13-NEXT: vst %v1, 16(%r2), 4
85+
// z13-NEXT: vst %v0, 0(%r2), 4
86+
// z13-NEXT: br %r14
87+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
88+
#[no_mangle]
89+
unsafe extern "C" fn vector_ret_large(x: &i8x32) -> i8x32 {
90+
*x
91+
}
92+
93+
// CHECK-LABEL: vector_wrapper_ret_small:
94+
// CHECK: mvc 0(8,%r2), 0(%r3)
95+
// CHECK-NEXT: br %r14
96+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
97+
#[no_mangle]
98+
unsafe extern "C" fn vector_wrapper_ret_small(x: &Wrapper<i8x8>) -> Wrapper<i8x8> {
99+
*x
100+
}
101+
// CHECK-LABEL: vector_wrapper_ret:
102+
// CHECK: mvc 0(16,%r2), 0(%r3)
103+
// CHECK-NEXT: br %r14
104+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
105+
#[no_mangle]
106+
unsafe extern "C" fn vector_wrapper_ret(x: &Wrapper<i8x16>) -> Wrapper<i8x16> {
107+
*x
108+
}
109+
// CHECK-LABEL: vector_wrapper_ret_large:
110+
// z10: vl %v0, 16(%r3), 4
111+
// z10-NEXT: vl %v1, 0(%r3), 4
112+
// z10-NEXT: vst %v0, 16(%r2), 4
113+
// z10-NEXT: vst %v1, 0(%r2), 4
114+
// z10-NEXT: br %r14
115+
// z13: vl %v0, 16(%r3), 4
116+
// z13-NEXT: vst %v0, 16(%r2), 4
117+
// z13-NEXT: vl %v0, 0(%r3), 4
118+
// z13-NEXT: vst %v0, 0(%r2), 4
119+
// z13-NEXT: br %r14
120+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
121+
#[no_mangle]
122+
unsafe extern "C" fn vector_wrapper_ret_large(x: &Wrapper<i8x32>) -> Wrapper<i8x32> {
123+
*x
124+
}
125+
126+
// CHECK-LABEL: vector_wrapper_padding_ret:
127+
// CHECK: mvc 0(16,%r2), 0(%r3)
128+
// CHECK-NEXT: br %r14
129+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
130+
#[no_mangle]
131+
unsafe extern "C" fn vector_wrapper_padding_ret(x: &WrapperAlign16<i8x8>) -> WrapperAlign16<i8x8> {
132+
*x
133+
}
134+
135+
// CHECK-LABEL: vector_wrapper_with_zst_ret_small:
136+
// CHECK: mvc 0(8,%r2), 0(%r3)
137+
// CHECK-NEXT: br %r14
138+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
139+
#[no_mangle]
140+
unsafe extern "C" fn vector_wrapper_with_zst_ret_small(
141+
x: &WrapperWithZst<i8x8>,
142+
) -> WrapperWithZst<i8x8> {
143+
*x
144+
}
145+
// CHECK-LABEL: vector_wrapper_with_zst_ret:
146+
// CHECK: mvc 0(16,%r2), 0(%r3)
147+
// CHECK-NEXT: br %r14
148+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
149+
#[no_mangle]
150+
unsafe extern "C" fn vector_wrapper_with_zst_ret(
151+
x: &WrapperWithZst<i8x16>,
152+
) -> WrapperWithZst<i8x16> {
153+
*x
154+
}
155+
// CHECK-LABEL: vector_wrapper_with_zst_ret_large:
156+
// z10: vl %v0, 16(%r3), 4
157+
// z10-NEXT: vl %v1, 0(%r3), 4
158+
// z10-NEXT: vst %v0, 16(%r2), 4
159+
// z10-NEXT: vst %v1, 0(%r2), 4
160+
// z10-NEXT: br %r14
161+
// z13: vl %v0, 16(%r3), 4
162+
// z13-NEXT: vst %v0, 16(%r2), 4
163+
// z13-NEXT: vl %v0, 0(%r3), 4
164+
// z13-NEXT: vst %v0, 0(%r2), 4
165+
// z13-NEXT: br %r14
166+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
167+
#[no_mangle]
168+
unsafe extern "C" fn vector_wrapper_with_zst_ret_large(
169+
x: &WrapperWithZst<i8x32>,
170+
) -> WrapperWithZst<i8x32> {
171+
*x
172+
}
173+
174+
// CHECK-LABEL: vector_transparent_wrapper_ret_small:
175+
// CHECK: vlrepg %v24, 0(%r2)
176+
// CHECK-NEXT: br %r14
177+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
178+
#[no_mangle]
179+
unsafe extern "C" fn vector_transparent_wrapper_ret_small(
180+
x: &TransparentWrapper<i8x8>,
181+
) -> TransparentWrapper<i8x8> {
182+
*x
183+
}
184+
// CHECK-LABEL: vector_transparent_wrapper_ret:
185+
// CHECK: vl %v24, 0(%r2), 3
186+
// CHECK-NEXT: br %r14
187+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
188+
#[no_mangle]
189+
unsafe extern "C" fn vector_transparent_wrapper_ret(
190+
x: &TransparentWrapper<i8x16>,
191+
) -> TransparentWrapper<i8x16> {
192+
*x
193+
}
194+
// CHECK-LABEL: vector_transparent_wrapper_ret_large:
195+
// z10: vl %v0, 16(%r3), 4
196+
// z10-NEXT: vl %v1, 0(%r3), 4
197+
// z10-NEXT: vst %v0, 16(%r2), 4
198+
// z10-NEXT: vst %v1, 0(%r2), 4
199+
// z10-NEXT: br %r14
200+
// z13: vl %v0, 0(%r3), 4
201+
// z13-NEXT: vl %v1, 16(%r3), 4
202+
// z13-NEXT: vst %v1, 16(%r2), 4
203+
// z13-NEXT: vst %v0, 0(%r2), 4
204+
// z13-NEXT: br %r14
205+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
206+
#[no_mangle]
207+
unsafe extern "C" fn vector_transparent_wrapper_ret_large(
208+
x: &TransparentWrapper<i8x32>,
209+
) -> TransparentWrapper<i8x32> {
210+
*x
211+
}
212+
213+
// CHECK-LABEL: vector_arg_small:
214+
// CHECK: vlgvg %r2, %v24, 0
215+
// CHECK-NEXT: br %r14
216+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
217+
#[no_mangle]
218+
unsafe extern "C" fn vector_arg_small(x: i8x8) -> i64 {
219+
unsafe { *(&x as *const i8x8 as *const i64) }
220+
}
221+
// CHECK-LABEL: vector_arg:
222+
// CHECK: vlgvg %r2, %v24, 0
223+
// CHECK-NEXT: br %r14
224+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
225+
#[no_mangle]
226+
unsafe extern "C" fn vector_arg(x: i8x16) -> i64 {
227+
unsafe { *(&x as *const i8x16 as *const i64) }
228+
}
229+
// CHECK-LABEL: vector_arg_large:
230+
// CHECK: lg %r2, 0(%r2)
231+
// CHECK-NEXT: br %r14
232+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
233+
#[no_mangle]
234+
unsafe extern "C" fn vector_arg_large(x: i8x32) -> i64 {
235+
unsafe { *(&x as *const i8x32 as *const i64) }
236+
}
237+
238+
// CHECK-LABEL: vector_wrapper_arg_small:
239+
// CHECK: vlgvg %r2, %v24, 0
240+
// CHECK-NEXT: br %r14
241+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
242+
#[no_mangle]
243+
unsafe extern "C" fn vector_wrapper_arg_small(x: Wrapper<i8x8>) -> i64 {
244+
unsafe { *(&x as *const Wrapper<i8x8> as *const i64) }
245+
}
246+
// CHECK-LABEL: vector_wrapper_arg:
247+
// CHECK: vlgvg %r2, %v24, 0
248+
// CHECK-NEXT: br %r14
249+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
250+
#[no_mangle]
251+
unsafe extern "C" fn vector_wrapper_arg(x: Wrapper<i8x16>) -> i64 {
252+
unsafe { *(&x as *const Wrapper<i8x16> as *const i64) }
253+
}
254+
// CHECK-LABEL: vector_wrapper_arg_large:
255+
// CHECK: lg %r2, 0(%r2)
256+
// CHECK-NEXT: br %r14
257+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
258+
#[no_mangle]
259+
unsafe extern "C" fn vector_wrapper_arg_large(x: Wrapper<i8x32>) -> i64 {
260+
unsafe { *(&x as *const Wrapper<i8x32> as *const i64) }
261+
}
262+
263+
// https://github.com/rust-lang/rust/pull/131586#discussion_r1837071121
264+
// CHECK-LABEL: vector_wrapper_padding_arg:
265+
// CHECK: lg %r2, 0(%r2)
266+
// CHECK-NEXT: br %r14
267+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
268+
#[no_mangle]
269+
unsafe extern "C" fn vector_wrapper_padding_arg(x: WrapperAlign16<i8x8>) -> i64 {
270+
unsafe { *(&x as *const WrapperAlign16<i8x8> as *const i64) }
271+
}
272+
273+
// CHECK-LABEL: vector_wrapper_with_zst_arg_small:
274+
// CHECK: .cfi_startproc
275+
// CHECK-NOT: vlgvg
276+
// CHECK-NEXT: br %r14
277+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
278+
#[no_mangle]
279+
unsafe extern "C" fn vector_wrapper_with_zst_arg_small(x: WrapperWithZst<i8x8>) -> i64 {
280+
unsafe { *(&x as *const WrapperWithZst<i8x8> as *const i64) }
281+
}
282+
// CHECK-LABEL: vector_wrapper_with_zst_arg:
283+
// CHECK: lg %r2, 0(%r2)
284+
// CHECK-NEXT: br %r14
285+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
286+
#[no_mangle]
287+
unsafe extern "C" fn vector_wrapper_with_zst_arg(x: WrapperWithZst<i8x16>) -> i64 {
288+
unsafe { *(&x as *const WrapperWithZst<i8x16> as *const i64) }
289+
}
290+
// CHECK-LABEL: vector_wrapper_with_zst_arg_large:
291+
// CHECK: lg %r2, 0(%r2)
292+
// CHECK-NEXT: br %r14
293+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
294+
#[no_mangle]
295+
unsafe extern "C" fn vector_wrapper_with_zst_arg_large(x: WrapperWithZst<i8x32>) -> i64 {
296+
unsafe { *(&x as *const WrapperWithZst<i8x32> as *const i64) }
297+
}
298+
299+
// CHECK-LABEL: vector_transparent_wrapper_arg_small:
300+
// CHECK: vlgvg %r2, %v24, 0
301+
// CHECK-NEXT: br %r14
302+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
303+
#[no_mangle]
304+
unsafe extern "C" fn vector_transparent_wrapper_arg_small(x: TransparentWrapper<i8x8>) -> i64 {
305+
unsafe { *(&x as *const TransparentWrapper<i8x8> as *const i64) }
306+
}
307+
// CHECK-LABEL: vector_transparent_wrapper_arg:
308+
// CHECK: vlgvg %r2, %v24, 0
309+
// CHECK-NEXT: br %r14
310+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
311+
#[no_mangle]
312+
unsafe extern "C" fn vector_transparent_wrapper_arg(x: TransparentWrapper<i8x16>) -> i64 {
313+
unsafe { *(&x as *const TransparentWrapper<i8x16> as *const i64) }
314+
}
315+
// CHECK-LABEL: vector_transparent_wrapper_arg_large:
316+
// CHECK: lg %r2, 0(%r2)
317+
// CHECK-NEXT: br %r14
318+
#[cfg_attr(no_vector, target_feature(enable = "vector"))]
319+
#[no_mangle]
320+
unsafe extern "C" fn vector_transparent_wrapper_arg_large(x: TransparentWrapper<i8x32>) -> i64 {
321+
unsafe { *(&x as *const TransparentWrapper<i8x32> as *const i64) }
322+
}

‎tests/ui/simd-abi-checks-s390x.rs

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
//@ revisions: z10 z13_no_vector z13_soft_float
2+
//@ build-fail
3+
//@[z10] compile-flags: --target s390x-unknown-linux-gnu
4+
//@[z10] needs-llvm-components: systemz
5+
//@[z13_no_vector] compile-flags: --target s390x-unknown-linux-gnu -C target-cpu=z13 -C target-feature=-vector
6+
//@[z13_no_vector] needs-llvm-components: systemz
7+
// FIXME: +soft-float itself doesn't set -vector
8+
//@[z13_soft_float] compile-flags: --target s390x-unknown-linux-gnu -C target-cpu=z13 -C target-feature=-vector,+soft-float
9+
//@[z13_soft_float] needs-llvm-components: systemz
10+
11+
#![feature(no_core, lang_items, repr_simd, s390x_target_feature)]
12+
#![no_core]
13+
#![crate_type = "lib"]
14+
#![allow(non_camel_case_types, improper_ctypes_definitions)]
15+
#![deny(abi_unsupported_vector_types)]
16+
17+
#[lang = "sized"]
18+
pub trait Sized {}
19+
#[lang = "copy"]
20+
pub trait Copy {}
21+
#[lang = "freeze"]
22+
pub trait Freeze {}
23+
24+
impl<T: Copy, const N: usize> Copy for [T; N] {}
25+
26+
#[repr(simd)]
27+
pub struct i8x8([i8; 8]);
28+
#[repr(simd)]
29+
pub struct i8x16([i8; 16]);
30+
#[repr(simd)]
31+
pub struct i8x32([i8; 32]);
32+
#[repr(C)]
33+
pub struct Wrapper<T>(T);
34+
#[repr(transparent)]
35+
pub struct TransparentWrapper<T>(T);
36+
37+
impl Copy for i8 {}
38+
impl Copy for i64 {}
39+
impl Copy for i8x8 {}
40+
impl Copy for i8x16 {}
41+
impl Copy for i8x32 {}
42+
impl<T: Copy> Copy for Wrapper<T> {}
43+
impl<T: Copy> Copy for TransparentWrapper<T> {}
44+
45+
#[no_mangle]
46+
extern "C" fn vector_ret_small(x: &i8x8) -> i8x8 {
47+
//~^ ERROR this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
48+
//~^^ WARN this was previously accepted
49+
*x
50+
}
51+
#[no_mangle]
52+
extern "C" fn vector_ret(x: &i8x16) -> i8x16 {
53+
//~^ ERROR this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
54+
//~^^ WARN this was previously accepted
55+
*x
56+
}
57+
#[no_mangle]
58+
extern "C" fn vector_ret_large(x: &i8x32) -> i8x32 {
59+
// Ok
60+
*x
61+
}
62+
63+
#[no_mangle]
64+
#[target_feature(enable = "vector")]
65+
unsafe extern "C" fn vector_ret_target_feature_small(x: &i8x8) -> i8x8 {
66+
// Ok
67+
*x
68+
}
69+
#[no_mangle]
70+
#[target_feature(enable = "vector")]
71+
unsafe extern "C" fn vector_target_feature_ret(x: &i8x16) -> i8x16 {
72+
// Ok
73+
*x
74+
}
75+
#[no_mangle]
76+
#[target_feature(enable = "vector")]
77+
unsafe extern "C" fn vector_ret_target_feature_large(x: &i8x32) -> i8x32 {
78+
// Ok
79+
*x
80+
}
81+
82+
#[no_mangle]
83+
extern "C" fn vector_wrapper_ret_small(x: &Wrapper<i8x8>) -> Wrapper<i8x8> {
84+
// Ok
85+
*x
86+
}
87+
#[no_mangle]
88+
extern "C" fn vector_wrapper_ret(x: &Wrapper<i8x16>) -> Wrapper<i8x16> {
89+
// Ok
90+
*x
91+
}
92+
#[no_mangle]
93+
extern "C" fn vector_wrapper_ret_large(x: &Wrapper<i8x32>) -> Wrapper<i8x32> {
94+
// Ok
95+
*x
96+
}
97+
98+
#[no_mangle]
99+
extern "C" fn vector_transparent_wrapper_ret_small(
100+
x: &TransparentWrapper<i8x8>,
101+
) -> TransparentWrapper<i8x8> {
102+
//~^^^ ERROR this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
103+
//~^^^^ WARN this was previously accepted
104+
*x
105+
}
106+
#[no_mangle]
107+
extern "C" fn vector_transparent_wrapper_ret(
108+
x: &TransparentWrapper<i8x16>,
109+
) -> TransparentWrapper<i8x16> {
110+
//~^^^ ERROR this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
111+
//~^^^^ WARN this was previously accepted
112+
*x
113+
}
114+
#[no_mangle]
115+
extern "C" fn vector_transparent_wrapper_ret_large(
116+
x: &TransparentWrapper<i8x32>,
117+
) -> TransparentWrapper<i8x32> {
118+
// Ok
119+
*x
120+
}
121+
122+
#[no_mangle]
123+
extern "C" fn vector_arg_small(x: i8x8) -> i64 {
124+
//~^ ERROR this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
125+
//~^^ WARN this was previously accepted
126+
unsafe { *(&x as *const i8x8 as *const i64) }
127+
}
128+
#[no_mangle]
129+
extern "C" fn vector_arg(x: i8x16) -> i64 {
130+
//~^ ERROR this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
131+
//~^^ WARN this was previously accepted
132+
unsafe { *(&x as *const i8x16 as *const i64) }
133+
}
134+
#[no_mangle]
135+
extern "C" fn vector_arg_large(x: i8x32) -> i64 {
136+
// Ok
137+
unsafe { *(&x as *const i8x32 as *const i64) }
138+
}
139+
140+
#[no_mangle]
141+
extern "C" fn vector_wrapper_arg_small(x: Wrapper<i8x8>) -> i64 {
142+
//~^ ERROR this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
143+
//~^^ WARN this was previously accepted
144+
unsafe { *(&x as *const Wrapper<i8x8> as *const i64) }
145+
}
146+
#[no_mangle]
147+
extern "C" fn vector_wrapper_arg(x: Wrapper<i8x16>) -> i64 {
148+
//~^ ERROR this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
149+
//~^^ WARN this was previously accepted
150+
unsafe { *(&x as *const Wrapper<i8x16> as *const i64) }
151+
}
152+
#[no_mangle]
153+
extern "C" fn vector_wrapper_arg_large(x: Wrapper<i8x32>) -> i64 {
154+
// Ok
155+
unsafe { *(&x as *const Wrapper<i8x32> as *const i64) }
156+
}
157+
158+
#[no_mangle]
159+
extern "C" fn vector_transparent_wrapper_arg_small(x: TransparentWrapper<i8x8>) -> i64 {
160+
//~^ ERROR this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
161+
//~^^ WARN this was previously accepted
162+
unsafe { *(&x as *const TransparentWrapper<i8x8> as *const i64) }
163+
}
164+
#[no_mangle]
165+
extern "C" fn vector_transparent_wrapper_arg(x: TransparentWrapper<i8x16>) -> i64 {
166+
//~^ ERROR this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
167+
//~^^ WARN this was previously accepted
168+
unsafe { *(&x as *const TransparentWrapper<i8x16> as *const i64) }
169+
}
170+
#[no_mangle]
171+
extern "C" fn vector_transparent_wrapper_arg_large(x: TransparentWrapper<i8x32>) -> i64 {
172+
// Ok
173+
unsafe { *(&x as *const TransparentWrapper<i8x32> as *const i64) }
174+
}
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
2+
--> $DIR/simd-abi-checks-s390x.rs:46:1
3+
|
4+
LL | extern "C" fn vector_ret_small(x: &i8x8) -> i8x8 {
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
6+
|
7+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
9+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
10+
note: the lint level is defined here
11+
--> $DIR/simd-abi-checks-s390x.rs:15:9
12+
|
13+
LL | #![deny(abi_unsupported_vector_types)]
14+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15+
16+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
17+
--> $DIR/simd-abi-checks-s390x.rs:52:1
18+
|
19+
LL | extern "C" fn vector_ret(x: &i8x16) -> i8x16 {
20+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
21+
|
22+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
23+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
24+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
25+
26+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
27+
--> $DIR/simd-abi-checks-s390x.rs:99:1
28+
|
29+
LL | / extern "C" fn vector_transparent_wrapper_ret_small(
30+
LL | | x: &TransparentWrapper<i8x8>,
31+
LL | | ) -> TransparentWrapper<i8x8> {
32+
| |_____________________________^ function defined here
33+
|
34+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
35+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
36+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
37+
38+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
39+
--> $DIR/simd-abi-checks-s390x.rs:107:1
40+
|
41+
LL | / extern "C" fn vector_transparent_wrapper_ret(
42+
LL | | x: &TransparentWrapper<i8x16>,
43+
LL | | ) -> TransparentWrapper<i8x16> {
44+
| |______________________________^ function defined here
45+
|
46+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
47+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
48+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
49+
50+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
51+
--> $DIR/simd-abi-checks-s390x.rs:123:1
52+
|
53+
LL | extern "C" fn vector_arg_small(x: i8x8) -> i64 {
54+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
55+
|
56+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
57+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
58+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
59+
60+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
61+
--> $DIR/simd-abi-checks-s390x.rs:129:1
62+
|
63+
LL | extern "C" fn vector_arg(x: i8x16) -> i64 {
64+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
65+
|
66+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
67+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
68+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
69+
70+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
71+
--> $DIR/simd-abi-checks-s390x.rs:141:1
72+
|
73+
LL | extern "C" fn vector_wrapper_arg_small(x: Wrapper<i8x8>) -> i64 {
74+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
75+
|
76+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
77+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
78+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
79+
80+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
81+
--> $DIR/simd-abi-checks-s390x.rs:147:1
82+
|
83+
LL | extern "C" fn vector_wrapper_arg(x: Wrapper<i8x16>) -> i64 {
84+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
85+
|
86+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
87+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
88+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
89+
90+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
91+
--> $DIR/simd-abi-checks-s390x.rs:159:1
92+
|
93+
LL | extern "C" fn vector_transparent_wrapper_arg_small(x: TransparentWrapper<i8x8>) -> i64 {
94+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
95+
|
96+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
97+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
98+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
99+
100+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
101+
--> $DIR/simd-abi-checks-s390x.rs:165:1
102+
|
103+
LL | extern "C" fn vector_transparent_wrapper_arg(x: TransparentWrapper<i8x16>) -> i64 {
104+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
105+
|
106+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
107+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
108+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
109+
110+
error: aborting due to 10 previous errors
111+
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
2+
--> $DIR/simd-abi-checks-s390x.rs:46:1
3+
|
4+
LL | extern "C" fn vector_ret_small(x: &i8x8) -> i8x8 {
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
6+
|
7+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
9+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
10+
note: the lint level is defined here
11+
--> $DIR/simd-abi-checks-s390x.rs:15:9
12+
|
13+
LL | #![deny(abi_unsupported_vector_types)]
14+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15+
16+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
17+
--> $DIR/simd-abi-checks-s390x.rs:52:1
18+
|
19+
LL | extern "C" fn vector_ret(x: &i8x16) -> i8x16 {
20+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
21+
|
22+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
23+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
24+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
25+
26+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
27+
--> $DIR/simd-abi-checks-s390x.rs:99:1
28+
|
29+
LL | / extern "C" fn vector_transparent_wrapper_ret_small(
30+
LL | | x: &TransparentWrapper<i8x8>,
31+
LL | | ) -> TransparentWrapper<i8x8> {
32+
| |_____________________________^ function defined here
33+
|
34+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
35+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
36+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
37+
38+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
39+
--> $DIR/simd-abi-checks-s390x.rs:107:1
40+
|
41+
LL | / extern "C" fn vector_transparent_wrapper_ret(
42+
LL | | x: &TransparentWrapper<i8x16>,
43+
LL | | ) -> TransparentWrapper<i8x16> {
44+
| |______________________________^ function defined here
45+
|
46+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
47+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
48+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
49+
50+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
51+
--> $DIR/simd-abi-checks-s390x.rs:123:1
52+
|
53+
LL | extern "C" fn vector_arg_small(x: i8x8) -> i64 {
54+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
55+
|
56+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
57+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
58+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
59+
60+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
61+
--> $DIR/simd-abi-checks-s390x.rs:129:1
62+
|
63+
LL | extern "C" fn vector_arg(x: i8x16) -> i64 {
64+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
65+
|
66+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
67+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
68+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
69+
70+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
71+
--> $DIR/simd-abi-checks-s390x.rs:141:1
72+
|
73+
LL | extern "C" fn vector_wrapper_arg_small(x: Wrapper<i8x8>) -> i64 {
74+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
75+
|
76+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
77+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
78+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
79+
80+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
81+
--> $DIR/simd-abi-checks-s390x.rs:147:1
82+
|
83+
LL | extern "C" fn vector_wrapper_arg(x: Wrapper<i8x16>) -> i64 {
84+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
85+
|
86+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
87+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
88+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
89+
90+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
91+
--> $DIR/simd-abi-checks-s390x.rs:159:1
92+
|
93+
LL | extern "C" fn vector_transparent_wrapper_arg_small(x: TransparentWrapper<i8x8>) -> i64 {
94+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
95+
|
96+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
97+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
98+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
99+
100+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
101+
--> $DIR/simd-abi-checks-s390x.rs:165:1
102+
|
103+
LL | extern "C" fn vector_transparent_wrapper_arg(x: TransparentWrapper<i8x16>) -> i64 {
104+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
105+
|
106+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
107+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
108+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
109+
110+
error: aborting due to 10 previous errors
111+
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
2+
--> $DIR/simd-abi-checks-s390x.rs:46:1
3+
|
4+
LL | extern "C" fn vector_ret_small(x: &i8x8) -> i8x8 {
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
6+
|
7+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
9+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
10+
note: the lint level is defined here
11+
--> $DIR/simd-abi-checks-s390x.rs:15:9
12+
|
13+
LL | #![deny(abi_unsupported_vector_types)]
14+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15+
16+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
17+
--> $DIR/simd-abi-checks-s390x.rs:52:1
18+
|
19+
LL | extern "C" fn vector_ret(x: &i8x16) -> i8x16 {
20+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
21+
|
22+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
23+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
24+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
25+
26+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
27+
--> $DIR/simd-abi-checks-s390x.rs:99:1
28+
|
29+
LL | / extern "C" fn vector_transparent_wrapper_ret_small(
30+
LL | | x: &TransparentWrapper<i8x8>,
31+
LL | | ) -> TransparentWrapper<i8x8> {
32+
| |_____________________________^ function defined here
33+
|
34+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
35+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
36+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
37+
38+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
39+
--> $DIR/simd-abi-checks-s390x.rs:107:1
40+
|
41+
LL | / extern "C" fn vector_transparent_wrapper_ret(
42+
LL | | x: &TransparentWrapper<i8x16>,
43+
LL | | ) -> TransparentWrapper<i8x16> {
44+
| |______________________________^ function defined here
45+
|
46+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
47+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
48+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
49+
50+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
51+
--> $DIR/simd-abi-checks-s390x.rs:123:1
52+
|
53+
LL | extern "C" fn vector_arg_small(x: i8x8) -> i64 {
54+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
55+
|
56+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
57+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
58+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
59+
60+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
61+
--> $DIR/simd-abi-checks-s390x.rs:129:1
62+
|
63+
LL | extern "C" fn vector_arg(x: i8x16) -> i64 {
64+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
65+
|
66+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
67+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
68+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
69+
70+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
71+
--> $DIR/simd-abi-checks-s390x.rs:141:1
72+
|
73+
LL | extern "C" fn vector_wrapper_arg_small(x: Wrapper<i8x8>) -> i64 {
74+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
75+
|
76+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
77+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
78+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
79+
80+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
81+
--> $DIR/simd-abi-checks-s390x.rs:147:1
82+
|
83+
LL | extern "C" fn vector_wrapper_arg(x: Wrapper<i8x16>) -> i64 {
84+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
85+
|
86+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
87+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
88+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
89+
90+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
91+
--> $DIR/simd-abi-checks-s390x.rs:159:1
92+
|
93+
LL | extern "C" fn vector_transparent_wrapper_arg_small(x: TransparentWrapper<i8x8>) -> i64 {
94+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
95+
|
96+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
97+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
98+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
99+
100+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
101+
--> $DIR/simd-abi-checks-s390x.rs:165:1
102+
|
103+
LL | extern "C" fn vector_transparent_wrapper_arg(x: TransparentWrapper<i8x16>) -> i64 {
104+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
105+
|
106+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
107+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
108+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
109+
110+
error: aborting due to 10 previous errors
111+

0 commit comments

Comments
 (0)
Please sign in to comment.