Produce an instruction that computes a sized stackslot address.
(
&self,
slot: StackSlot,
offset: u32,
into_reg: Writable<Reg>,
)
| 2158 | |
| 2159 | /// Produce an instruction that computes a sized stackslot address. |
| 2160 | pub fn sized_stackslot_addr( |
| 2161 | &self, |
| 2162 | slot: StackSlot, |
| 2163 | offset: u32, |
| 2164 | into_reg: Writable<Reg>, |
| 2165 | ) -> M::I { |
| 2166 | // Offset from beginning of stackslot area. |
| 2167 | let stack_off = self.sized_stackslots[slot] as i64; |
| 2168 | let sp_off: i64 = stack_off + (offset as i64); |
| 2169 | M::gen_get_stack_addr(StackAMode::Slot(sp_off), into_reg) |
| 2170 | } |
| 2171 | |
| 2172 | /// Produce an instruction that computes a dynamic stackslot address. |
| 2173 | pub fn dynamic_stackslot_addr(&self, slot: DynamicStackSlot, into_reg: Writable<Reg>) -> M::I { |