@@ -3,51 +3,12 @@ use crate::common::argument::ArgumentList;
3
3
use crate :: common:: format:: Indentation ;
4
4
use crate :: common:: intrinsic:: { Intrinsic , IntrinsicDefinition } ;
5
5
use crate :: common:: intrinsic_types:: {
6
- BaseIntrinsicTypeDefinition , IntrinsicType , IntrinsicTypeDefinition , TypeKind ,
6
+ BaseIntrinsicTypeDefinition , IntrinsicTypeDefinition , TypeKind ,
7
7
} ;
8
8
use crate :: common:: types:: Language ;
9
+ use crate :: base_intrinsictype_trait_def_macro;
9
10
10
- #[ derive( Debug , Clone , PartialEq ) ]
11
- pub struct ArmIntrinsicType ( pub IntrinsicType ) ;
12
-
13
- impl BaseIntrinsicTypeDefinition for ArmIntrinsicType {
14
- fn kind ( & self ) -> TypeKind {
15
- self . 0 . kind ( )
16
- }
17
- fn inner_size ( & self ) -> u32 {
18
- self . 0 . inner_size ( )
19
- }
20
- fn num_lanes ( & self ) -> u32 {
21
- self . 0 . num_lanes ( )
22
- }
23
- fn num_vectors ( & self ) -> u32 {
24
- self . 0 . num_vectors ( )
25
- }
26
- fn is_simd ( & self ) -> bool {
27
- self . 0 . is_simd ( )
28
- }
29
- fn is_ptr ( & self ) -> bool {
30
- self . 0 . is_ptr ( )
31
- }
32
- fn c_scalar_type ( & self ) -> String {
33
- self . 0 . c_scalar_type ( )
34
- }
35
- fn rust_scalar_type ( & self ) -> String {
36
- self . 0 . rust_scalar_type ( )
37
- }
38
- fn c_promotion ( & self ) -> & str {
39
- self . 0 . c_promotion ( )
40
- }
41
- fn populate_random ( & self , indentation : Indentation , loads : u32 , language : & Language ) -> String {
42
- self . 0 . populate_random ( indentation, loads, language)
43
- }
44
- fn is_rust_vals_array_const ( & self ) -> bool {
45
- self . 0 . is_rust_vals_array_const ( )
46
- }
47
- fn as_call_param_c ( & self , name : & String ) -> String {
48
- self . 0 . as_call_param_c ( name)
49
- }
50
- }
11
+ base_intrinsictype_trait_def_macro ! { ArmIntrinsicType }
51
12
52
13
impl IntrinsicDefinition < ArmIntrinsicType , Constraint > for Intrinsic < ArmIntrinsicType , Constraint > {
53
14
fn arguments ( & self ) -> ArgumentList < ArmIntrinsicType , Constraint > {
0 commit comments