cranelift: Use emit helper function on aarch64

...instead of pushing to the `emitted_insts` vec directly.
This commit is contained in:
Nick Fitzgerald
2022-01-25 09:59:39 -08:00
parent cd6b73fc90
commit 9c7de7692b

View File

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