MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / get_stack_pointer

Function get_stack_pointer

crates/unwinder/src/arch/x86.rs:5–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3
4#[inline]
5pub fn get_stack_pointer() -> usize {
6 let stack_pointer: usize;
7 unsafe {
8 core::arch::asm!(
9 "mov {}, rsp",
10 out(reg) stack_pointer,
11 options(nostack,nomem),
12 );
13 }
14 stack_pointer
15}
16
17pub unsafe fn get_next_older_pc_from_fp(fp: usize) -> usize {
18 // The calling convention always pushes the return pointer (aka the PC of

Callers 1

enter_wasmMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected