Handle signature() for more libcalls (#6174)

* Handle signature() for more libcalls

This is necessary to be able to call them in the interpreter. All the
remaining libcalls which signature() doesn't handle are never used in
clif ir. Only in code compiled by a backend.

* Fix libcall declarations in cranelift-frontend

* Add function signatures

* Use correct pointer type instead of I64
This commit is contained in:
bjorn3
2023-04-11 18:50:41 +02:00
committed by GitHub
parent 52440f0fc8
commit 0478ead3f8
6 changed files with 57 additions and 30 deletions

View File

@@ -1863,7 +1863,11 @@ where
.libcalls
.iter()
.map(|libcall| {
let signature = libcall.signature(lib_callconv);
let pointer_type = Type::int_with_byte_size(
self.target_triple.pointer_width().unwrap().bytes().into(),
)
.unwrap();
let signature = libcall.signature(lib_callconv, pointer_type);
let name = ExternalName::LibCall(*libcall);
(name, signature)
})