@@ -3020,6 +3020,144 @@ parameters. You can read more about it in the API documentation:
30203020https://doc.rust-lang.org/std/marker/struct.PhantomData.html
30213021"## ,
30223022
3023+ E0439 : r##"
3024+ The length of the platform-intrinsic function `simd_shuffle`
3025+ wasn't specified. Erroneous code example:
3026+
3027+ ```
3028+ extern "platform-intrinsic" {
3029+ fn simd_shuffle<A,B>(a: A, b: A, c: [u32; 8]) -> B;
3030+ // error: invalid `simd_shuffle`, needs length: `simd_shuffle`
3031+ }
3032+ ```
3033+
3034+ The `simd_shuffle` function needs the length of the array passed as
3035+ last parameter in its name. Example:
3036+
3037+ ```
3038+ extern "platform-intrinsic" {
3039+ fn simd_shuffle8<A,B>(a: A, b: A, c: [u32; 8]) -> B;
3040+ }
3041+ ```
3042+ "## ,
3043+
3044+ E0440 : r##"
3045+ A platform-specific intrinsic function has the wrong number of type
3046+ parameters. Erroneous code example:
3047+
3048+ ```
3049+ #[repr(simd)]
3050+ struct f64x2(f64, f64);
3051+
3052+ extern "platform-intrinsic" {
3053+ fn x86_mm_movemask_pd<T>(x: f64x2) -> i32;
3054+ // error: platform-specific intrinsic has wrong number of type
3055+ // parameters
3056+ }
3057+ ```
3058+
3059+ Please refer to the function declaration to see if it corresponds
3060+ with yours. Example:
3061+
3062+ ```
3063+ #[repr(simd)]
3064+ struct f64x2(f64, f64);
3065+
3066+ extern "platform-intrinsic" {
3067+ fn x86_mm_movemask_pd(x: f64x2) -> i32;
3068+ }
3069+ ```
3070+ "## ,
3071+
3072+ E0441 : r##"
3073+ An unknown platform-specific intrinsic function was used. Erroneous
3074+ code example:
3075+
3076+ ```
3077+ #[repr(simd)]
3078+ struct i16x8(i16, i16, i16, i16, i16, i16, i16, i16);
3079+
3080+ extern "platform-intrinsic" {
3081+ fn x86_mm_adds_ep16(x: i16x8, y: i16x8) -> i16x8;
3082+ // error: unrecognized platform-specific intrinsic function
3083+ }
3084+ ```
3085+
3086+ Please verify that the function name wasn't misspelled, and ensure
3087+ that it is declared in the rust source code (in the file
3088+ src/librustc_platform_intrinsics/x86.rs). Example:
3089+
3090+ ```
3091+ #[repr(simd)]
3092+ struct i16x8(i16, i16, i16, i16, i16, i16, i16, i16);
3093+
3094+ extern "platform-intrinsic" {
3095+ fn x86_mm_adds_epi16(x: i16x8, y: i16x8) -> i16x8; // ok!
3096+ }
3097+ ```
3098+ "## ,
3099+
3100+ E0442 : r##"
3101+ Intrinsic argument(s) and/or return value have the wrong type.
3102+ Erroneous code example:
3103+
3104+ ```
3105+ #[repr(simd)]
3106+ struct i8x16(i8, i8, i8, i8, i8, i8, i8, i8,
3107+ i8, i8, i8, i8, i8, i8, i8, i8);
3108+ #[repr(simd)]
3109+ struct i32x4(i32, i32, i32, i32);
3110+ #[repr(simd)]
3111+ struct i64x2(i64, i64);
3112+
3113+ extern "platform-intrinsic" {
3114+ fn x86_mm_adds_epi16(x: i8x16, y: i32x4) -> i64x2;
3115+ // error: intrinsic arguments/return value have wrong type
3116+ }
3117+ ```
3118+
3119+ To fix this error, please refer to the function declaration to give
3120+ it the awaited types. Example:
3121+
3122+ ```
3123+ #[repr(simd)]
3124+ struct i16x8(i16, i16, i16, i16, i16, i16, i16, i16);
3125+
3126+ extern "platform-intrinsic" {
3127+ fn x86_mm_adds_epi16(x: i16x8, y: i16x8) -> i16x8; // ok!
3128+ }
3129+ ```
3130+ "## ,
3131+
3132+ E0443 : r##"
3133+ Intrinsic argument(s) and/or return value have the wrong type.
3134+ Erroneous code example:
3135+
3136+ ```
3137+ #[repr(simd)]
3138+ struct i16x8(i16, i16, i16, i16, i16, i16, i16, i16);
3139+ #[repr(simd)]
3140+ struct i64x8(i64, i64, i64, i64, i64, i64, i64, i64);
3141+
3142+ extern "platform-intrinsic" {
3143+ fn x86_mm_adds_epi16(x: i16x8, y: i16x8) -> i64x8;
3144+ // error: intrinsic argument/return value has wrong type
3145+ }
3146+ ```
3147+
3148+ To fix this error, please refer to the function declaration to give
3149+ it the awaited types. Example:
3150+
3151+ ```
3152+ #[repr(simd)]
3153+ struct i16x8(i16, i16, i16, i16, i16, i16, i16, i16);
3154+
3155+ extern "platform-intrinsic" {
3156+ fn x86_mm_adds_epi16(x: i16x8, y: i16x8) -> i16x8; // ok!
3157+ }
3158+ ```
3159+ "## ,
3160+
30233161E0444 : r##"
30243162A platform-specific intrinsic function has wrong number of arguments.
30253163Erroneous code example:
@@ -3128,10 +3266,4 @@ register_diagnostics! {
31283266 E0399 , // trait items need to be implemented because the associated
31293267 // type `{}` was overridden
31303268 E0436 , // functional record update requires a struct
3131- E0439 , // invalid `simd_shuffle`, needs length: `{}`
3132- E0440 , // platform-specific intrinsic has wrong number of type parameters
3133- E0441 , // unrecognized platform-specific intrinsic function
3134- E0442 , // intrinsic {} has wrong type: found {}, expected {}
3135- E0443 , // intrinsic {} has wrong type: found `{}`, expected `{}` which
3136- // was used for this vector type previously in this signature
31373269}
0 commit comments