@@ -13,70 +13,6 @@ impl IntrinsicTypeDefinition for LoongArchIntrinsicType {
1313 unimplemented ! ( "c_single_vector_type for LoongArchIntrinsicType is not implemented!" )
1414 }
1515
16- // fn rust_type(&self) -> String {
17- // // handling edge cases first
18- // // the general handling is implemented below
19- // if let Some(val) = self.metadata.get("type") {
20- // match val.as_str() {
21- // "__m128 const *" => {
22- // return "&__m128".to_string();
23- // }
24- // "__m128d const *" => {
25- // return "&__m128d".to_string();
26- // }
27- // "const void*" => {
28- // return "&__m128d".to_string();
29- // }
30- // _ => {}
31- // }
32- // }
33-
34- // if self.kind() == TypeKind::Void && self.ptr {
35- // // this has been handled by default settings in
36- // // the from_param function of X86IntrinsicType
37- // unreachable!()
38- // }
39-
40- // // general handling cases
41- // let core_part = if self.kind() == TypeKind::Mask {
42- // // all types of __mmask<int> are handled here
43- // format!("__mask{}", self.bit_len.unwrap())
44- // } else if self.simd_len.is_some() {
45- // // all types of __m<int> vector types are handled here
46- // let re = Regex::new(r"\__m\d+[a-z]*").unwrap();
47- // let rust_type = self
48- // .metadata
49- // .get("type")
50- // .map(|val| re.find(val).unwrap().as_str());
51- // rust_type.unwrap().to_string()
52- // } else {
53- // format!(
54- // "{}{}",
55- // self.kind.rust_prefix().to_string(),
56- // self.bit_len.unwrap()
57- // )
58- // };
59-
60- // // extracting "memsize" so that even vector types can be involved
61- // let memwidth = self
62- // .metadata
63- // .get("memwidth")
64- // .map(|n| str::parse::<u32>(n).unwrap());
65- // let prefix_part = if self.ptr && self.constant && self.bit_len.eq(&memwidth) {
66- // "&"
67- // } else if self.ptr && self.bit_len.eq(&memwidth) {
68- // "&mut "
69- // } else if self.ptr && self.constant {
70- // "*const "
71- // } else if self.ptr {
72- // "*mut "
73- // } else {
74- // ""
75- // };
76-
77- // return prefix_part.to_string() + core_part.as_str();
78- // }
79-
8016 /// Determines the load function for this type.
8117 fn get_load_function ( & self , _language : Language ) -> String {
8218 unimplemented ! ( "get_load_function for LoongArchIntrinsicType is not implemented!" )
@@ -86,8 +22,6 @@ impl IntrinsicTypeDefinition for LoongArchIntrinsicType {
8622 fn get_lane_function ( & self ) -> String {
8723 todo ! ( "get_lane_function for LoongArchIntrinsicType needs to be implemented!" ) ;
8824 }
89-
90- fn from_c ( s : & str , target : & str ) -> Result < Self , String > {
91- todo ! ( "from_c for LoongArchIntrinsicType needs to be implemented!" ) ;
92- }
9325}
26+
27+ impl LoongArchIntrinsicType
0 commit comments