Generate SSA code from returns (#5172)
Modify return pseudo-instructions to have pairs of registers: virtual and real. This allows us to constrain the virtual registers to the real ones specified by the abi, instead of directly emitting moves to those real registers.
This commit is contained in:
@@ -352,7 +352,9 @@ fn riscv64_get_operands<F: Fn(VReg) -> VReg>(inst: &Inst, collector: &mut Operan
|
||||
}
|
||||
}
|
||||
&Inst::Ret { ref rets } => {
|
||||
collector.reg_uses(&rets[..]);
|
||||
for ret in rets {
|
||||
collector.reg_fixed_use(ret.vreg, ret.preg);
|
||||
}
|
||||
}
|
||||
|
||||
&Inst::Extend { rd, rn, .. } => {
|
||||
|
||||
Reference in New Issue
Block a user