()
| 3 | |
| 4 | #[inline] |
| 5 | pub 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 | |
| 17 | pub unsafe fn get_next_older_pc_from_fp(fp: usize) -> usize { |
| 18 | // The calling convention always pushes the return pointer (aka the PC of |