Don't reuse registers in the x64 div lowering (#5356)

Introduce a temporary for an intermediate value in the lowering of div in the x64 backend. Additionally, add a src argument to the shift_r smart constructor, which is why the diff got larger than just the div lowering.
This commit is contained in:
Trevor Elliott
2022-11-30 14:44:59 -08:00
committed by GitHub
parent 87b63174b1
commit d8dbabfe6b
4 changed files with 37 additions and 6 deletions

View File

@@ -2344,6 +2344,7 @@ pub(crate) fn emit(
OperandSize::Size64,
ShiftKind::ShiftRightLogical,
Imm8Gpr::new(Imm8Reg::Imm8 { imm: 1 }).unwrap(),
tmp_gpr1,
Writable::from_reg(tmp_gpr1),
);
inst.emit(&[], sink, info, state);