(&mut self, sp: *mut u8)
| 1074 | /// instruction traps. |
| 1075 | #[must_use] |
| 1076 | fn set_sp<I: Encode>(&mut self, sp: *mut u8) -> ControlFlow<Done> { |
| 1077 | let sp_raw = sp as usize; |
| 1078 | let base_raw = self.state.stack.base() as usize; |
| 1079 | if sp_raw < base_raw { |
| 1080 | return self.done_trap_kind::<I>(Some(TrapKind::StackOverflow)); |
| 1081 | } |
| 1082 | self.set_sp_unchecked(sp); |
| 1083 | ControlFlow::Continue(()) |
| 1084 | } |
| 1085 | |
| 1086 | /// Same as `set_sp` but does not check to see if `sp` is in-bounds. Should |
| 1087 | /// only be used with stack increment operations such as `pop`. |
nothing calls this directly
no test coverage detected