machinst x64: add more FP support
This commit is contained in:
@@ -516,7 +516,11 @@ impl<'func, I: VCodeInst> Lower<'func, I> {
|
||||
|
||||
// Now, finally, deal with the moves whose sources are constants.
|
||||
for (ty, dst_reg, const_u64) in &const_bundles {
|
||||
for inst in I::gen_constant(*dst_reg, *const_u64, *ty).into_iter() {
|
||||
for inst in I::gen_constant(*dst_reg, *const_u64, *ty, |reg_class, ty| {
|
||||
self.alloc_tmp(reg_class, ty)
|
||||
})
|
||||
.into_iter()
|
||||
{
|
||||
self.emit(inst);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,7 +154,12 @@ pub trait MachInst: Clone + Debug {
|
||||
fn gen_move(to_reg: Writable<Reg>, from_reg: Reg, ty: Type) -> Self;
|
||||
|
||||
/// Generate a constant into a reg.
|
||||
fn gen_constant(to_reg: Writable<Reg>, value: u64, ty: Type) -> SmallVec<[Self; 4]>;
|
||||
fn gen_constant<F: FnMut(RegClass, Type) -> Writable<Reg>>(
|
||||
to_reg: Writable<Reg>,
|
||||
value: u64,
|
||||
ty: Type,
|
||||
alloc_tmp: F,
|
||||
) -> SmallVec<[Self; 4]>;
|
||||
|
||||
/// Generate a zero-length no-op.
|
||||
fn gen_zero_len_nop() -> Self;
|
||||
|
||||
Reference in New Issue
Block a user