Implement pinned register usage through set_pinned_reg/get_pinned_reg;

This commit is contained in:
Benjamin Bouvier
2020-04-21 12:12:03 +02:00
parent d1b5df31fd
commit 241c164e25
7 changed files with 97 additions and 20 deletions

View File

@@ -1935,9 +1935,16 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>(ctx: &mut C, insn: IRInst) {
}
}
Opcode::GetPinnedReg
| Opcode::SetPinnedReg
| Opcode::Spill
Opcode::GetPinnedReg => {
let rd = output_to_reg(ctx, outputs[0]);
ctx.emit(Inst::GetPinnedReg { rd });
}
Opcode::SetPinnedReg => {
let rm = input_to_reg(ctx, inputs[0], NarrowValueMode::None);
ctx.emit(Inst::SetPinnedReg { rm });
}
Opcode::Spill
| Opcode::Fill
| Opcode::FillNop
| Opcode::Regmove