Add a new compare_bytes
intrinsic instead of calling memcmp
directly
This commit is contained in:
parent
85fbb57149
commit
502af03445
17 changed files with 267 additions and 22 deletions
|
@ -273,6 +273,10 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) {
|
|||
],
|
||||
Ty::new_unit(tcx),
|
||||
),
|
||||
sym::compare_bytes => {
|
||||
let byte_ptr = Ty::new_imm_ptr(tcx, tcx.types.u8);
|
||||
(0, vec![byte_ptr, byte_ptr, tcx.types.usize], tcx.types.i32)
|
||||
}
|
||||
sym::write_bytes | sym::volatile_set_memory => (
|
||||
1,
|
||||
vec![
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue