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

Method pop_frame_restore

pulley/src/interp.rs:2054–2069  ·  view source on GitHub ↗
(&mut self, amt: u16, regs: UpperRegSet<XReg>)

Source from the content-addressed store, hash-verified

2052 }
2053
2054 fn pop_frame_restore(&mut self, amt: u16, regs: UpperRegSet<XReg>) -> ControlFlow<Done> {
2055 // Restore all registers in `regs`, followed by the normal `pop_frame`
2056 // opcode below to restore fp/lr.
2057 unsafe {
2058 let mut offset = i32::from(amt);
2059 for reg in regs {
2060 offset -= 8;
2061 let val = self.load_ne::<_, crate::PopFrameRestore>(AddrO32 {
2062 addr: XReg::sp,
2063 offset,
2064 })?;
2065 self.state[reg].set_u64(val);
2066 }
2067 }
2068 self.pop_frame()
2069 }
2070
2071 fn pop_frame(&mut self) -> ControlFlow<Done> {
2072 self.set_sp_unchecked(self.state.fp);

Callers

nothing calls this directly

Calls 3

fromFunction · 0.85
set_u64Method · 0.45
pop_frameMethod · 0.45

Tested by

no test coverage detected