Use ISA information to display function signatures.

The argument locations contains register unit references that we want to
display with their correct names.
This commit is contained in:
Jakob Stoklund Olesen
2017-03-03 10:34:29 -08:00
parent 00772fb6c4
commit cb3e503f07
4 changed files with 77 additions and 29 deletions

View File

@@ -88,6 +88,14 @@ impl Default for ArgumentLoc {
}
impl ArgumentLoc {
/// Is this an assigned location? (That is, not `Unassigned`).
pub fn is_assigned(&self) -> bool {
match self {
&ArgumentLoc::Unassigned => false,
_ => true,
}
}
/// 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> {