aarch64: pass a lowering context to gen_copy_reg_to_arg;

This commit is contained in:
Benjamin Bouvier
2020-04-24 17:38:23 +02:00
parent 0b13d8c848
commit 19b5b0cc7b
3 changed files with 10 additions and 13 deletions

View File

@@ -1982,11 +1982,9 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>(ctx: &mut C, insn: IRInst) {
ctx.emit(inst);
}
assert!(inputs.len() == abi.num_args());
let tmp1 = ctx.tmp(RegClass::I64, I64);
let tmp2 = ctx.tmp(RegClass::I64, I64);
for (i, input) in inputs.iter().enumerate() {
let arg_reg = input_to_reg(ctx, *input, NarrowValueMode::None);
for inst in abi.gen_copy_reg_to_arg(i, arg_reg, tmp1, tmp2) {
for inst in abi.gen_copy_reg_to_arg(ctx, i, arg_reg) {
ctx.emit(inst);
}
}