Handle ABI arguments correctly in the reload pass.

Values passed as arguments to calls and return instructions may also be
reload candidates.
This commit is contained in:
Jakob Stoklund Olesen
2017-06-13 15:13:36 -07:00
parent 63a372fd80
commit 396b998dad
4 changed files with 86 additions and 20 deletions

View File

@@ -104,6 +104,14 @@ impl ArgumentLoc {
}
}
/// Is this a register location?
pub fn is_reg(&self) -> bool {
match self {
&ArgumentLoc::Reg(_) => true,
_ => false,
}
}
/// Return an object that can display this argument location, using the register info from the
/// target ISA.
pub fn display<'a, R: Into<Option<&'a RegInfo>>>(self, regs: R) -> DisplayArgumentLoc<'a> {