File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -1155,6 +1155,19 @@ fn codegen_regular_intrinsic_call<'tcx>(
1155
1155
ret. write_cvalue ( fx, CValue :: by_val ( is_eq_value, ret. layout ( ) ) ) ;
1156
1156
}
1157
1157
1158
+ sym:: compare_bytes => {
1159
+ intrinsic_args ! ( fx, args => ( lhs_ptr, rhs_ptr, bytes_val) ; intrinsic) ;
1160
+ let lhs_ptr = lhs_ptr. load_scalar ( fx) ;
1161
+ let rhs_ptr = rhs_ptr. load_scalar ( fx) ;
1162
+ let bytes_val = bytes_val. load_scalar ( fx) ;
1163
+
1164
+ let params = vec ! [ AbiParam :: new( fx. pointer_type) ; 3 ] ;
1165
+ let returns = vec ! [ AbiParam :: new( types:: I32 ) ] ;
1166
+ let args = & [ lhs_ptr, rhs_ptr, bytes_val] ;
1167
+ let cmp = fx. lib_call ( "memcmp" , params, returns, args) [ 0 ] ;
1168
+ ret. write_cvalue ( fx, CValue :: by_val ( cmp, ret. layout ( ) ) ) ;
1169
+ }
1170
+
1158
1171
sym:: const_allocate => {
1159
1172
intrinsic_args ! ( fx, args => ( _size, _align) ; intrinsic) ;
1160
1173
You can’t perform that action at this time.
0 commit comments