mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 06:15:33 +00:00
Added probestack to LibCall
This commit is contained in:
parent
5dac9b489a
commit
707f30757c
@ -329,10 +329,17 @@ impl Instance {
|
|||||||
RelocationType::LibCall(LibCall::NearestF64) => {
|
RelocationType::LibCall(LibCall::NearestF64) => {
|
||||||
math_intrinsics::nearbyintf64 as isize
|
math_intrinsics::nearbyintf64 as isize
|
||||||
},
|
},
|
||||||
_ => unimplemented!()
|
RelocationType::LibCall(LibCall::Probestack) => {
|
||||||
// RelocationType::Intrinsic(name) => {
|
__rust_probestack as isize
|
||||||
// get_abi_intrinsic(name)?
|
},
|
||||||
// },
|
RelocationType::LibCall(call) => {
|
||||||
|
panic!("Unexpected libcall {}", call);
|
||||||
|
},
|
||||||
|
RelocationType::Intrinsic(ref name) => {
|
||||||
|
panic!("Unexpected intrinsic {}", name);
|
||||||
|
// get_abi_intrinsic(name)?
|
||||||
|
},
|
||||||
|
// _ => unimplemented!()
|
||||||
};
|
};
|
||||||
|
|
||||||
let func_addr =
|
let func_addr =
|
||||||
@ -677,3 +684,9 @@ extern "C" fn current_memory(memory_index: u32, instance: &mut Instance) -> u32
|
|||||||
let memory = &instance.memories[memory_index as usize];
|
let memory = &instance.memories[memory_index as usize];
|
||||||
memory.current_pages() as u32
|
memory.current_pages() as u32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// A declaration for the stack probe function in Rust's standard library, for
|
||||||
|
/// catching callstack overflow.
|
||||||
|
extern "C" {
|
||||||
|
pub fn __rust_probestack();
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user