machinst x64: basic support for baldrdash

+ fix multi-value support
This commit is contained in:
Benjamin Bouvier
2020-07-06 18:43:04 +02:00
parent 00b38c91f6
commit ea33ce9116
3 changed files with 220 additions and 105 deletions

View File

@@ -1151,6 +1151,20 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>(
ctx.emit(Inst::gen_move(dst, regs::rdx(), input_ty));
}
Opcode::GetPinnedReg => {
let dst = output_to_reg(ctx, outputs[0]);
ctx.emit(Inst::gen_move(dst, regs::pinned_reg(), I64));
}
Opcode::SetPinnedReg => {
let src = input_to_reg(ctx, inputs[0]);
ctx.emit(Inst::gen_move(
Writable::from_reg(regs::pinned_reg()),
src,
I64,
));
}
Opcode::IaddImm
| Opcode::ImulImm
| Opcode::UdivImm
@@ -1354,4 +1368,8 @@ impl LowerBackend for X64Backend {
Ok(())
}
fn maybe_pinned_reg(&self) -> Option<Reg> {
Some(regs::pinned_reg())
}
}