rustc: Remove platform intrinsics crate
This was originally attempted in #57048 but it was realized that we could fully remove the crate via the `"unadjusted"` ABI on intrinsics. This means that all intrinsics in stdsimd are implemented directly against LLVM rather than using the abstraction layer provided here. That ends up meaning that this crate is no longer used at all. This crate developed long ago to implement the SIMD intrinsics, but we didn't end up using it in the long run. In that case let's remove it!
This commit is contained in:
parent
d10680818b
commit
7616daabc7
57 changed files with 4 additions and 15991 deletions
|
|
@ -1,13 +0,0 @@
|
|||
#![feature(repr_simd)]
|
||||
#![feature(platform_intrinsics)]
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
#[repr(simd)]
|
||||
struct f64x2(f64, f64);
|
||||
|
||||
extern "platform-intrinsic" {
|
||||
fn x86_mm_movemask_pd<T>(x: f64x2) -> i32; //~ ERROR E0440
|
||||
}
|
||||
|
||||
fn main () {
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
error[E0440]: platform-specific intrinsic has wrong number of type parameters: found 1, expected 0
|
||||
--> $DIR/E0440.rs:9:5
|
||||
|
|
||||
LL | fn x86_mm_movemask_pd<T>(x: f64x2) -> i32; //~ ERROR E0440
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0440`.
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
#![feature(repr_simd)]
|
||||
#![feature(platform_intrinsics)]
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
#[repr(simd)]
|
||||
struct i16x8(i16, i16, i16, i16, i16, i16, i16, i16);
|
||||
|
||||
extern "platform-intrinsic" {
|
||||
fn x86_mm_adds_ep16(x: i16x8, y: i16x8) -> i16x8; //~ ERROR E0441
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
error[E0441]: unrecognized platform-specific intrinsic function: `x86_mm_adds_ep16`
|
||||
--> $DIR/E0441.rs:9:5
|
||||
|
|
||||
LL | fn x86_mm_adds_ep16(x: i16x8, y: i16x8) -> i16x8; //~ ERROR E0441
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0441`.
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#![feature(repr_simd)]
|
||||
#![feature(platform_intrinsics)]
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
#[repr(simd)]
|
||||
struct i8x16(i8, i8, i8, i8, i8, i8, i8, i8,
|
||||
i8, i8, i8, i8, i8, i8, i8, i8);
|
||||
#[repr(simd)]
|
||||
struct i32x4(i32, i32, i32, i32);
|
||||
#[repr(simd)]
|
||||
struct i64x2(i64, i64);
|
||||
|
||||
extern "platform-intrinsic" {
|
||||
fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2;
|
||||
//~^ ERROR E0442
|
||||
//~| ERROR E0442
|
||||
//~| ERROR E0442
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
error[E0442]: intrinsic argument 1 has wrong type: found vector with length 16, expected length 8
|
||||
--> $DIR/E0442.rs:14:5
|
||||
|
|
||||
LL | fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0442]: intrinsic argument 2 has wrong type: found vector with length 4, expected length 8
|
||||
--> $DIR/E0442.rs:14:5
|
||||
|
|
||||
LL | fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0442]: intrinsic return value has wrong type: found vector with length 2, expected length 8
|
||||
--> $DIR/E0442.rs:14:5
|
||||
|
|
||||
LL | fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0442`.
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
#![feature(repr_simd)]
|
||||
#![feature(platform_intrinsics)]
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
#[repr(simd)]
|
||||
struct i16x8(i16, i16, i16, i16, i16, i16, i16, i16);
|
||||
#[repr(simd)]
|
||||
struct i64x8(i64, i64, i64, i64, i64, i64, i64, i64);
|
||||
|
||||
extern "platform-intrinsic" {
|
||||
fn x86_mm_adds_epi16(x: i16x8, y: i16x8) -> i64x8; //~ ERROR E0443
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
error[E0443]: intrinsic return value has wrong type: found `i64x8`, expected `i16x8` which was used for this vector type previously in this signature
|
||||
--> $DIR/E0443.rs:11:5
|
||||
|
|
||||
LL | fn x86_mm_adds_epi16(x: i16x8, y: i16x8) -> i64x8; //~ ERROR E0443
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0443`.
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
#![feature(repr_simd)]
|
||||
#![feature(platform_intrinsics)]
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
#[repr(simd)]
|
||||
struct f64x2(f64, f64);
|
||||
|
||||
extern "platform-intrinsic" {
|
||||
fn x86_mm_movemask_pd(x: f64x2, y: f64x2, z: f64x2) -> i32; //~ ERROR E0444
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
error[E0444]: platform-specific intrinsic has invalid number of arguments: found 3, expected 1
|
||||
--> $DIR/E0444.rs:9:5
|
||||
|
|
||||
LL | fn x86_mm_movemask_pd(x: f64x2, y: f64x2, z: f64x2) -> i32; //~ ERROR E0444
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0444`.
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
// Test number of arguments in platform-specific intrinsic function
|
||||
// This is the error E0444
|
||||
|
||||
#![feature(repr_simd, platform_intrinsics)]
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
#[repr(simd)]
|
||||
struct f64x2(f64, f64);
|
||||
|
||||
extern "platform-intrinsic" {
|
||||
fn x86_mm_movemask_pd(x: f64x2, y: f64x2, z: f64x2) -> i32; //~ platform-specific intrinsic
|
||||
}
|
||||
|
||||
pub fn main() {
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
error[E0444]: platform-specific intrinsic has invalid number of arguments: found 3, expected 1
|
||||
--> $DIR/intrinsic-invalid-number-of-arguments.rs:11:5
|
||||
|
|
||||
LL | fn x86_mm_movemask_pd(x: f64x2, y: f64x2, z: f64x2) -> i32; //~ platform-specific intrinsic
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0444`.
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#![feature(platform_intrinsics)]
|
||||
extern "platform-intrinsic" {
|
||||
fn x86_mm_movemask_ps() -> i32; //~ERROR found 0, expected 1
|
||||
}
|
||||
|
||||
fn main() { }
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
error[E0444]: platform-specific intrinsic has invalid number of arguments: found 0, expected 1
|
||||
--> $DIR/platform-intrinsic-params.rs:3:5
|
||||
|
|
||||
LL | fn x86_mm_movemask_ps() -> i32; //~ERROR found 0, expected 1
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0444`.
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
#![feature(repr_simd, platform_intrinsics)]
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
#[repr(simd)]
|
||||
struct i16x8(i16, i16, i16, i16, i16, i16, i16, i16);
|
||||
#[repr(simd)]
|
||||
struct u16x8(u16, u16, u16, u16, u16, u16, u16, u16);
|
||||
|
||||
#[repr(simd)]
|
||||
struct i8x16(i8, i8, i8, i8, i8, i8, i8, i8,
|
||||
i8, i8, i8, i8, i8, i8, i8, i8);
|
||||
#[repr(simd)]
|
||||
struct i32x4(i32, i32, i32, i32);
|
||||
#[repr(simd)]
|
||||
struct f32x4(f32, f32, f32, f32);
|
||||
#[repr(simd)]
|
||||
struct i64x2(i64, i64);
|
||||
|
||||
// correct signatures work well
|
||||
mod right {
|
||||
use {i16x8, u16x8};
|
||||
extern "platform-intrinsic" {
|
||||
fn x86_mm_adds_epi16(x: i16x8, y: i16x8) -> i16x8;
|
||||
fn x86_mm_adds_epu16(x: u16x8, y: u16x8) -> u16x8;
|
||||
}
|
||||
}
|
||||
// but incorrect ones don't.
|
||||
|
||||
mod signedness {
|
||||
use {i16x8, u16x8};
|
||||
// signedness matters
|
||||
extern "platform-intrinsic" {
|
||||
fn x86_mm_adds_epi16(x: u16x8, y: u16x8) -> u16x8;
|
||||
//~^ ERROR intrinsic argument 1 has wrong type
|
||||
//~^^ ERROR intrinsic argument 2 has wrong type
|
||||
//~^^^ ERROR intrinsic return value has wrong type
|
||||
fn x86_mm_adds_epu16(x: i16x8, y: i16x8) -> i16x8;
|
||||
//~^ ERROR intrinsic argument 1 has wrong type
|
||||
//~^^ ERROR intrinsic argument 2 has wrong type
|
||||
//~^^^ ERROR intrinsic return value has wrong type
|
||||
}
|
||||
}
|
||||
// as do lengths
|
||||
extern "platform-intrinsic" {
|
||||
fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2;
|
||||
//~^ ERROR intrinsic argument 1 has wrong type
|
||||
//~^^ ERROR intrinsic argument 2 has wrong type
|
||||
//~^^^ ERROR intrinsic return value has wrong type
|
||||
}
|
||||
// and so does int vs. float:
|
||||
extern "platform-intrinsic" {
|
||||
fn x86_mm_max_ps(x: i32x4, y: i32x4) -> i32x4;
|
||||
//~^ ERROR intrinsic argument 1 has wrong type
|
||||
//~^^ ERROR intrinsic argument 2 has wrong type
|
||||
//~^^^ ERROR intrinsic return value has wrong type
|
||||
}
|
||||
|
||||
|
||||
fn main() {}
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
error[E0442]: intrinsic argument 1 has wrong type: found vector with length 16, expected length 8
|
||||
--> $DIR/simd-intrinsic-declaration-type.rs:45:5
|
||||
|
|
||||
LL | fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0442]: intrinsic argument 2 has wrong type: found vector with length 4, expected length 8
|
||||
--> $DIR/simd-intrinsic-declaration-type.rs:45:5
|
||||
|
|
||||
LL | fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0442]: intrinsic return value has wrong type: found vector with length 2, expected length 8
|
||||
--> $DIR/simd-intrinsic-declaration-type.rs:45:5
|
||||
|
|
||||
LL | fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0442]: intrinsic argument 1 has wrong type: found `i32`, expected `f32`
|
||||
--> $DIR/simd-intrinsic-declaration-type.rs:52:5
|
||||
|
|
||||
LL | fn x86_mm_max_ps(x: i32x4, y: i32x4) -> i32x4;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0442]: intrinsic argument 2 has wrong type: found `i32`, expected `f32`
|
||||
--> $DIR/simd-intrinsic-declaration-type.rs:52:5
|
||||
|
|
||||
LL | fn x86_mm_max_ps(x: i32x4, y: i32x4) -> i32x4;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0442]: intrinsic return value has wrong type: found `i32`, expected `f32`
|
||||
--> $DIR/simd-intrinsic-declaration-type.rs:52:5
|
||||
|
|
||||
LL | fn x86_mm_max_ps(x: i32x4, y: i32x4) -> i32x4;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0442]: intrinsic argument 1 has wrong type: found `u16`, expected `i16`
|
||||
--> $DIR/simd-intrinsic-declaration-type.rs:33:9
|
||||
|
|
||||
LL | fn x86_mm_adds_epi16(x: u16x8, y: u16x8) -> u16x8;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0442]: intrinsic argument 2 has wrong type: found `u16`, expected `i16`
|
||||
--> $DIR/simd-intrinsic-declaration-type.rs:33:9
|
||||
|
|
||||
LL | fn x86_mm_adds_epi16(x: u16x8, y: u16x8) -> u16x8;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0442]: intrinsic return value has wrong type: found `u16`, expected `i16`
|
||||
--> $DIR/simd-intrinsic-declaration-type.rs:33:9
|
||||
|
|
||||
LL | fn x86_mm_adds_epi16(x: u16x8, y: u16x8) -> u16x8;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0442]: intrinsic argument 1 has wrong type: found `i16`, expected `u16`
|
||||
--> $DIR/simd-intrinsic-declaration-type.rs:37:9
|
||||
|
|
||||
LL | fn x86_mm_adds_epu16(x: i16x8, y: i16x8) -> i16x8;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0442]: intrinsic argument 2 has wrong type: found `i16`, expected `u16`
|
||||
--> $DIR/simd-intrinsic-declaration-type.rs:37:9
|
||||
|
|
||||
LL | fn x86_mm_adds_epu16(x: i16x8, y: i16x8) -> i16x8;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0442]: intrinsic return value has wrong type: found `i16`, expected `u16`
|
||||
--> $DIR/simd-intrinsic-declaration-type.rs:37:9
|
||||
|
|
||||
LL | fn x86_mm_adds_epu16(x: i16x8, y: i16x8) -> i16x8;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 12 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0442`.
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
#![feature(repr_simd, platform_intrinsics)]
|
||||
|
||||
#[repr(simd)]
|
||||
struct A(i16, i16, i16, i16, i16, i16, i16, i16);
|
||||
#[repr(simd)]
|
||||
struct B(i16, i16, i16, i16, i16, i16, i16, i16);
|
||||
|
||||
// each intrinsic definition has to use the same nominal type for any
|
||||
// vector structure throughout that declaration (i.e., every instance
|
||||
// of i16x8 in each `fn ...;` needs to be either A or B)
|
||||
|
||||
extern "platform-intrinsic" {
|
||||
fn x86_mm_adds_epi16(x: A, y: A) -> B;
|
||||
//~^ ERROR intrinsic return value has wrong type: found `B`, expected `A`
|
||||
fn x86_mm_subs_epi16(x: A, y: B) -> A;
|
||||
//~^ ERROR intrinsic argument 2 has wrong type: found `B`, expected `A`
|
||||
|
||||
// ok:
|
||||
fn x86_mm_max_epi16(x: B, y: B) -> B;
|
||||
fn x86_mm_min_epi16(x: A, y: A) -> A;
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
error[E0443]: intrinsic return value has wrong type: found `B`, expected `A` which was used for this vector type previously in this signature
|
||||
--> $DIR/simd-intrinsic-single-nominal-type.rs:13:5
|
||||
|
|
||||
LL | fn x86_mm_adds_epi16(x: A, y: A) -> B;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0443]: intrinsic argument 2 has wrong type: found `B`, expected `A` which was used for this vector type previously in this signature
|
||||
--> $DIR/simd-intrinsic-single-nominal-type.rs:15:5
|
||||
|
|
||||
LL | fn x86_mm_subs_epi16(x: A, y: B) -> A;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0443`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue