Merge pull request #3725 from fitzgen/use-emit-helper-aarch64

cranelift: Use `emit` helper function on aarch64
This commit is contained in:
Nick Fitzgerald
2022-01-25 10:35:59 -08:00
committed by GitHub

View File

@@ -152,17 +152,14 @@ where
let imm = let imm =
MoveWideConst::maybe_with_shift(((!imm16) & 0xffff) as u16, i * 16) MoveWideConst::maybe_with_shift(((!imm16) & 0xffff) as u16, i * 16)
.unwrap(); .unwrap();
self.emitted_insts self.emit(&MInst::MovN { rd, imm, size });
.push((MInst::MovN { rd, imm, size }, false));
} else { } else {
let imm = MoveWideConst::maybe_with_shift(imm16 as u16, i * 16).unwrap(); let imm = MoveWideConst::maybe_with_shift(imm16 as u16, i * 16).unwrap();
self.emitted_insts self.emit(&MInst::MovZ { rd, imm, size });
.push((MInst::MovZ { rd, imm, size }, false));
} }
} else { } else {
let imm = MoveWideConst::maybe_with_shift(imm16 as u16, i * 16).unwrap(); let imm = MoveWideConst::maybe_with_shift(imm16 as u16, i * 16).unwrap();
self.emitted_insts self.emit(&MInst::MovK { rd, imm, size });
.push((MInst::MovK { rd, imm, size }, false));
} }
} }
} }