Cranelift: Add LibCall::Memcmp

The comment says the enum is "likely to grow" and the function's been in libc since C89, so hopefully this is ok.

I'd like to use it for emitting things like array equality.
This commit is contained in:
Scott McMurray
2021-05-31 12:27:29 -07:00
parent d1e9a7840e
commit c266f7f4c3
3 changed files with 112 additions and 0 deletions

View File

@@ -73,6 +73,7 @@ pub fn default_libcall_names() -> Box<dyn Fn(ir::LibCall) -> String + Send + Syn
ir::LibCall::Memcpy => "memcpy".to_owned(),
ir::LibCall::Memset => "memset".to_owned(),
ir::LibCall::Memmove => "memmove".to_owned(),
ir::LibCall::Memcmp => "memcmp".to_owned(),
ir::LibCall::ElfTlsGetAddr => "__tls_get_addr".to_owned(),
})