Calculates the return area for the callee, if any.
(
callee_sig: &ABISig,
masm: &mut M,
)
| 114 | |
| 115 | /// Calculates the return area for the callee, if any. |
| 116 | fn make_ret_area<M: MacroAssembler>( |
| 117 | callee_sig: &ABISig, |
| 118 | masm: &mut M, |
| 119 | ) -> Result<Option<RetArea>> { |
| 120 | if callee_sig.has_stack_results() { |
| 121 | let base = masm.sp_offset()?.as_u32(); |
| 122 | let end = base + callee_sig.results_stack_size(); |
| 123 | if end > base { |
| 124 | masm.reserve_stack(end - base)?; |
| 125 | } |
| 126 | Ok(Some(RetArea::sp(SPOffset::from_u32(end)))) |
| 127 | } else { |
| 128 | Ok(None) |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | /// Lowers the high-level [`Callee`] to a [`CalleeKind`] and |
| 133 | /// [ContextArgs] pair which contains all the metadata needed for |
nothing calls this directly
no test coverage detected