Reuse rd as tmp reg in LoadAddr
This commit is contained in:
@@ -1291,9 +1291,8 @@ impl<O: MachSectionOutput> MachInstEmit<O> for Inst {
|
|||||||
};
|
};
|
||||||
inst.emit(sink);
|
inst.emit(sink);
|
||||||
} else {
|
} else {
|
||||||
let tmp = writable_spilltmp_reg();
|
|
||||||
let const_insts =
|
let const_insts =
|
||||||
Inst::load_constant(tmp, u64::try_from(fp_off.abs()).unwrap());
|
Inst::load_constant(rd, u64::try_from(fp_off.abs()).unwrap());
|
||||||
for inst in const_insts {
|
for inst in const_insts {
|
||||||
inst.emit(sink);
|
inst.emit(sink);
|
||||||
}
|
}
|
||||||
@@ -1301,7 +1300,7 @@ impl<O: MachSectionOutput> MachInstEmit<O> for Inst {
|
|||||||
alu_op,
|
alu_op,
|
||||||
rd,
|
rd,
|
||||||
rn: fp_reg(),
|
rn: fp_reg(),
|
||||||
rm: tmp.to_reg(),
|
rm: rd.to_reg(),
|
||||||
};
|
};
|
||||||
inst.emit(sink);
|
inst.emit(sink);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user