|
1 | 1 | //@ add-core-stubs
|
2 | 2 | //@ needs-asm-support
|
3 |
| -//@ revisions: s390x s390x_vector |
| 3 | +//@ revisions: s390x s390x_vector s390x_vector_stable |
4 | 4 | //@[s390x] compile-flags: --target s390x-unknown-linux-gnu
|
5 | 5 | //@[s390x] needs-llvm-components: systemz
|
6 | 6 | //@[s390x_vector] compile-flags: --target s390x-unknown-linux-gnu -C target-feature=+vector
|
7 | 7 | //@[s390x_vector] needs-llvm-components: systemz
|
| 8 | +//@[s390x_vector_stable] compile-flags: --target s390x-unknown-linux-gnu -C target-feature=+vector |
| 9 | +//@[s390x_vector_stable] needs-llvm-components: systemz |
8 | 10 |
|
9 | 11 | #![crate_type = "rlib"]
|
10 | 12 | #![feature(no_core, rustc_attrs, repr_simd)]
|
| 13 | +#![cfg_attr(not(s390x_vector_stable), feature(asm_experimental_reg))] |
11 | 14 | #![no_core]
|
12 | 15 | #![allow(non_camel_case_types)]
|
13 | 16 |
|
@@ -68,29 +71,48 @@ fn f() {
|
68 | 71 |
|
69 | 72 | // vreg
|
70 | 73 | asm!("", out("v0") _); // always ok
|
71 |
| - asm!("", in("v0") v); // requires vector |
| 74 | + asm!("", in("v0") v); // requires vector & asm_experimental_reg |
72 | 75 | //[s390x]~^ ERROR register class `vreg` requires the `vector` target feature
|
73 |
| - asm!("", out("v0") v); // requires vector |
| 76 | + //[s390x_vector_stable]~^^ ERROR this register class can only be used as a clobber in stable [E0658] |
| 77 | + //[s390x_vector_stable]~| ERROR type `i64x2` cannot be used with this register class |
| 78 | + asm!("", out("v0") v); // requires vector & asm_experimental_reg |
74 | 79 | //[s390x]~^ ERROR register class `vreg` requires the `vector` target feature
|
75 |
| - asm!("", in("v0") x); // requires vector |
| 80 | + //[s390x_vector_stable]~^^ ERROR this register class can only be used as a clobber in stable [E0658] |
| 81 | + //[s390x_vector_stable]~| ERROR type `i64x2` cannot be used with this register class |
| 82 | + asm!("", in("v0") x); // requires vector & asm_experimental_reg |
76 | 83 | //[s390x]~^ ERROR register class `vreg` requires the `vector` target feature
|
77 |
| - asm!("", out("v0") x); // requires vector |
| 84 | + //[s390x_vector_stable]~^^ ERROR this register class can only be used as a clobber in stable [E0658] |
| 85 | + //[s390x_vector_stable]~| ERROR type `i32` cannot be used with this register class |
| 86 | + asm!("", out("v0") x); // requires vector & asm_experimental_reg |
78 | 87 | //[s390x]~^ ERROR register class `vreg` requires the `vector` target feature
|
| 88 | + //[s390x_vector_stable]~^^ ERROR this register class can only be used as a clobber in stable [E0658] |
| 89 | + //[s390x_vector_stable]~| ERROR type `i32` cannot be used with this register class |
79 | 90 | asm!("", in("v0") b);
|
80 | 91 | //[s390x]~^ ERROR register class `vreg` requires the `vector` target feature
|
81 | 92 | //[s390x_vector]~^^ ERROR type `u8` cannot be used with this register class
|
| 93 | + //[s390x_vector_stable]~^^^ ERROR this register class can only be used as a clobber in stable [E0658] |
| 94 | + //[s390x_vector_stable]~| ERROR type `u8` cannot be used with this register class |
82 | 95 | asm!("", out("v0") b);
|
83 | 96 | //[s390x]~^ ERROR register class `vreg` requires the `vector` target feature
|
84 | 97 | //[s390x_vector]~^^ ERROR type `u8` cannot be used with this register class
|
85 |
| - asm!("/* {} */", in(vreg) v); // requires vector |
| 98 | + //[s390x_vector_stable]~^^^ ERROR this register class can only be used as a clobber in stable [E0658] |
| 99 | + //[s390x_vector_stable]~| ERROR type `u8` cannot be used with this register class |
| 100 | + asm!("/* {} */", in(vreg) v); // requires vector & asm_experimental_reg |
86 | 101 | //[s390x]~^ ERROR register class `vreg` requires the `vector` target feature
|
87 |
| - asm!("/* {} */", in(vreg) x); // requires vector |
| 102 | + //[s390x_vector_stable]~^^ ERROR this register class can only be used as a clobber in stable [E0658] |
| 103 | + //[s390x_vector_stable]~| ERROR type `i64x2` cannot be used with this register class |
| 104 | + asm!("/* {} */", in(vreg) x); // requires vector & asm_experimental_reg |
88 | 105 | //[s390x]~^ ERROR register class `vreg` requires the `vector` target feature
|
| 106 | + //[s390x_vector_stable]~^^ ERROR this register class can only be used as a clobber in stable [E0658] |
| 107 | + //[s390x_vector_stable]~| ERROR type `i32` cannot be used with this register class |
89 | 108 | asm!("/* {} */", in(vreg) b);
|
90 | 109 | //[s390x]~^ ERROR register class `vreg` requires the `vector` target feature
|
91 | 110 | //[s390x_vector]~^^ ERROR type `u8` cannot be used with this register class
|
92 |
| - asm!("/* {} */", out(vreg) _); // requires vector |
| 111 | + //[s390x_vector_stable]~^^^ ERROR this register class can only be used as a clobber in stable [E0658] |
| 112 | + //[s390x_vector_stable]~| ERROR type `u8` cannot be used with this register class |
| 113 | + asm!("/* {} */", out(vreg) _); // requires vector & asm_experimental_reg |
93 | 114 | //[s390x]~^ ERROR register class `vreg` requires the `vector` target feature
|
| 115 | + //[s390x_vector_stable]~^^ ERROR this register class can only be used as a clobber in stable [E0658] |
94 | 116 |
|
95 | 117 | // Clobber-only registers
|
96 | 118 | // areg
|
|
0 commit comments