@@ -3020,54 +3020,56 @@ parameters. You can read more about it in the API documentation:
3020
3020
https://doc.rust-lang.org/std/marker/struct.PhantomData.html
3021
3021
"## ,
3022
3022
3023
- E0444 : r##"
3024
- A platform-specific intrinsic function has wrong number of arguments .
3023
+ E0442 : r##"
3024
+ Intrinsic argument(s) and/or return value have the wrong length .
3025
3025
Erroneous code example:
3026
3026
3027
3027
```
3028
3028
#[repr(simd)]
3029
- struct f64x2(f64, f64);
3029
+ struct i8x16(i8, i8, i8, i8, i8, i8, i8, i8,
3030
+ i8, i8, i8, i8, i8, i8, i8, i8);
3031
+ #[repr(simd)]
3032
+ struct i32x4(i32, i32, i32, i32);
3033
+ #[repr(simd)]
3034
+ struct i64x2(i64, i64);
3030
3035
3031
3036
extern "platform-intrinsic" {
3032
- fn x86_mm_movemask_pd (x: f64x2 , y: f64x2, z: f64x2 ) -> i32 ;
3033
- // error: platform-specific intrinsic has invalid number of arguments
3037
+ fn x86_mm_adds_epi16 (x: i8x16 , y: i32x4 ) -> i64x2 ;
3038
+ // error: intrinsic arguments/return value have wrong length
3034
3039
}
3035
3040
```
3036
3041
3037
- Please refer to the function declaration to see if it corresponds
3038
- with yours . Example:
3042
+ To fix this error, please refer to the function declaration to give
3043
+ it the awaited types with the awaited length . Example:
3039
3044
3040
3045
```
3041
3046
#[repr(simd)]
3042
- struct f64x2(f64, f64 );
3047
+ struct i16x8(i16, i16, i16, i16, i16, i16, i16, i16 );
3043
3048
3044
3049
extern "platform-intrinsic" {
3045
- fn x86_mm_movemask_pd (x: f64x2 ) -> i32 ; // ok!
3050
+ fn x86_mm_adds_epi16 (x: i16x8, y: i16x8 ) -> i16x8 ; // ok!
3046
3051
}
3047
3052
```
3048
3053
"## ,
3049
3054
3050
- E0442 : r##"
3051
- Intrinsic argument(s) and/or return value have the wrong length .
3055
+ E0443 : r##"
3056
+ Intrinsic argument(s) and/or return value have the wrong type .
3052
3057
Erroneous code example:
3053
3058
3054
3059
```
3055
3060
#[repr(simd)]
3056
- struct i8x16(i8, i8, i8, i8, i8, i8, i8, i8,
3057
- i8, i8, i8, i8, i8, i8, i8, i8);
3058
- #[repr(simd)]
3059
- struct i32x4(i32, i32, i32, i32);
3061
+ struct i16x8(i16, i16, i16, i16, i16, i16, i16, i16);
3060
3062
#[repr(simd)]
3061
- struct i64x2( i64, i64);
3063
+ struct i64x8(i64, i64, i64, i64, i64, i64, i64, i64);
3062
3064
3063
3065
extern "platform-intrinsic" {
3064
- fn x86_mm_adds_epi16(x: i8x16 , y: i32x4 ) -> i64x2 ;
3065
- // error: intrinsic arguments have wrong length
3066
+ fn x86_mm_adds_epi16(x: i16x8 , y: i16x8 ) -> i64x8 ;
3067
+ // error: intrinsic argument/return value has wrong type
3066
3068
}
3067
3069
```
3068
3070
3069
3071
To fix this error, please refer to the function declaration to give
3070
- it the awaited types with the awaited length . Example:
3072
+ it the awaited types. Example:
3071
3073
3072
3074
```
3073
3075
#[repr(simd)]
@@ -3077,7 +3079,34 @@ extern "platform-intrinsic" {
3077
3079
fn x86_mm_adds_epi16(x: i16x8, y: i16x8) -> i16x8; // ok!
3078
3080
}
3079
3081
```
3080
- "##
3082
+ "## ,
3083
+
3084
+ E0444 : r##"
3085
+ A platform-specific intrinsic function has wrong number of arguments.
3086
+ Erroneous code example:
3087
+
3088
+ ```
3089
+ #[repr(simd)]
3090
+ struct f64x2(f64, f64);
3091
+
3092
+ extern "platform-intrinsic" {
3093
+ fn x86_mm_movemask_pd(x: f64x2, y: f64x2, z: f64x2) -> i32;
3094
+ // error: platform-specific intrinsic has invalid number of arguments
3095
+ }
3096
+ ```
3097
+
3098
+ Please refer to the function declaration to see if it corresponds
3099
+ with yours. Example:
3100
+
3101
+ ```
3102
+ #[repr(simd)]
3103
+ struct f64x2(f64, f64);
3104
+
3105
+ extern "platform-intrinsic" {
3106
+ fn x86_mm_movemask_pd(x: f64x2) -> i32; // ok!
3107
+ }
3108
+ ```
3109
+ "## ,
3081
3110
3082
3111
}
3083
3112
@@ -3163,6 +3192,4 @@ register_diagnostics! {
3163
3192
E0439 , // invalid `simd_shuffle`, needs length: `{}`
3164
3193
E0440 , // platform-specific intrinsic has wrong number of type parameters
3165
3194
E0441 , // unrecognized platform-specific intrinsic function
3166
- E0443 , // intrinsic {} has wrong type: found `{}`, expected `{}` which
3167
- // was used for this vector type previously in this signature
3168
3195
}
0 commit comments