(&mut self)
| 207 | } |
| 208 | |
| 209 | fn spill_register_arguments(&mut self) -> Result<()> { |
| 210 | use WasmValType::*; |
| 211 | for (operand, slot) in self |
| 212 | .sig |
| 213 | .params_without_retptr() |
| 214 | .iter() |
| 215 | .zip(self.context.frame.locals()) |
| 216 | { |
| 217 | match (operand, slot) { |
| 218 | (ABIOperand::Reg { ty, reg, .. }, slot) => { |
| 219 | let addr = self.masm.local_address(slot)?; |
| 220 | match &ty { |
| 221 | I32 | I64 | F32 | F64 | V128 => { |
| 222 | self.masm.store((*reg).into(), addr, (*ty).try_into()?)?; |
| 223 | } |
| 224 | Ref(rt) => match rt.heap_type { |
| 225 | WasmHeapType::Func | WasmHeapType::Extern => { |
| 226 | self.masm.store_ptr(*reg, addr)?; |
| 227 | } |
| 228 | _ => bail!(CodeGenError::unsupported_wasm_type()), |
| 229 | }, |
| 230 | } |
| 231 | } |
| 232 | // Skip non-register arguments |
| 233 | _ => {} |
| 234 | } |
| 235 | } |
| 236 | Ok(()) |
| 237 | } |
| 238 | } |
| 239 | |
| 240 | impl<'a, 'translation, 'data, M> CodeGen<'a, 'translation, 'data, M, Emission> |
no test coverage detected