cranelift: Implement pinned reg in interpreter (#4375)

This commit is contained in:
Afonso Bordado
2022-08-10 22:33:45 +01:00
committed by GitHub
parent 11f0b003eb
commit 268ddf2f6c
4 changed files with 42 additions and 3 deletions

View File

@@ -407,8 +407,11 @@ where
unreachable!()
}
}
Opcode::GetPinnedReg => unimplemented!("GetPinnedReg"),
Opcode::SetPinnedReg => unimplemented!("SetPinnedReg"),
Opcode::GetPinnedReg => assign(state.get_pinned_reg()),
Opcode::SetPinnedReg => {
state.set_pinned_reg(arg(0)?);
ControlFlow::Continue
}
Opcode::TableAddr => {
if let InstructionData::TableAddr { table, offset, .. } = inst {
let table = &state.get_current_function().tables[table];