Lowers a builtin function by loading its address to the next available register.
(
env: &mut FuncEnv<P>,
builtin: &BuiltinFunction,
vmctx_offset: Option<u32>,
)
| 162 | /// Lowers a builtin function by loading its address to the next available |
| 163 | /// register. |
| 164 | fn lower_builtin<P: PtrSize>( |
| 165 | env: &mut FuncEnv<P>, |
| 166 | builtin: &BuiltinFunction, |
| 167 | vmctx_offset: Option<u32>, |
| 168 | ) -> (CalleeKind, ContextArgs) { |
| 169 | match builtin.ty() { |
| 170 | BuiltinType::Builtin(idx) => ( |
| 171 | CalleeKind::direct(env.name_builtin(idx)), |
| 172 | match vmctx_offset { |
| 173 | Some(offset) => ContextArgs::offset_from_pinned_vmctx(offset), |
| 174 | None => ContextArgs::pinned_vmctx(), |
| 175 | }, |
| 176 | ), |
| 177 | } |
| 178 | } |
| 179 | |
| 180 | /// Lower a local function to a [`CalleeKind`] and [ContextArgs] pair. |
| 181 | fn lower_local<P: PtrSize>( |
nothing calls this directly
no test coverage detected