@@ -10,6 +10,8 @@ use crate::matchers::cast::CastInstMatcher;
1010
1111#[ inline( always) ]
1212pub fn register_cast_matchers_function ( map : & mut HashMap < & ' static str , StandardFunction > ) {
13+ map. insert ( "m_zext" , match_zext) ;
14+ map. insert ( "m_sext" , match_sext) ;
1315 map. insert ( "m_int_to_ptr" , match_int_to_ptr_inst) ;
1416 map. insert ( "m_ptr_to_int" , match_ptr_to_int_inst) ;
1517 map. insert ( "m_bit_cast" , match_bit_cast_inst) ;
@@ -18,6 +20,10 @@ pub fn register_cast_matchers_function(map: &mut HashMap<&'static str, StandardF
1820
1921#[ inline( always) ]
2022pub fn register_cast_matchers_function_signatures ( map : & mut HashMap < & ' static str , Signature > ) {
23+ map. insert ( "m_zext" , Signature :: with_return ( Box :: new ( InstMatcherType ) ) ) ;
24+
25+ map. insert ( "m_sext" , Signature :: with_return ( Box :: new ( InstMatcherType ) ) ) ;
26+
2127 map. insert (
2228 "m_int_to_ptr" ,
2329 Signature :: with_return ( Box :: new ( InstMatcherType ) ) ,
@@ -39,6 +45,16 @@ pub fn register_cast_matchers_function_signatures(map: &mut HashMap<&'static str
3945 ) ;
4046}
4147
48+ fn match_zext ( _values : & [ Box < dyn Value > ] ) -> Box < dyn Value > {
49+ let matcher = Box :: new ( CastInstMatcher :: create_zext ( ) ) ;
50+ Box :: new ( InstMatcherValue { matcher } )
51+ }
52+
53+ fn match_sext ( _values : & [ Box < dyn Value > ] ) -> Box < dyn Value > {
54+ let matcher = Box :: new ( CastInstMatcher :: create_sext ( ) ) ;
55+ Box :: new ( InstMatcherValue { matcher } )
56+ }
57+
4258fn match_int_to_ptr_inst ( _values : & [ Box < dyn Value > ] ) -> Box < dyn Value > {
4359 let matcher = Box :: new ( CastInstMatcher :: create_int_to_ptr ( ) ) ;
4460 Box :: new ( InstMatcherValue { matcher } )
0 commit comments