Assign stack slots to incoming function arguments.

Function arguments that don't fit in registers are passed on the stack.

Create "incoming_arg" stack slots representing the stack arguments, and
assign them to the value arguments during spilling.
This commit is contained in:
Jakob Stoklund Olesen
2017-06-28 14:59:59 -07:00
parent ed3157f508
commit 2a600b3632
5 changed files with 53 additions and 17 deletions

View File

@@ -112,6 +112,14 @@ impl ArgumentLoc {
}
}
/// Is this a stack location?
pub fn is_stack(&self) -> bool {
match *self {
ArgumentLoc::Stack(_) => 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> {