Add an offset to StackSlotData.
The offset is relative to the stack pointer in the calling function, so it excludes the return address pushed by the call instruction itself on Intel ISAs. Change the ArgumentLoc::Stack offset to an i32, so it matches the stack slot offsets.
This commit is contained in:
@@ -77,8 +77,9 @@ impl ArgAssigner for Args {
|
||||
ArgumentLoc::Reg(reg).into()
|
||||
} else {
|
||||
// Assign a stack location.
|
||||
let loc = ArgumentLoc::Stack(self.offset);
|
||||
let loc = ArgumentLoc::Stack(self.offset as i32);
|
||||
self.offset += self.pointer_bytes;
|
||||
assert!(self.offset <= i32::max_value() as u32);
|
||||
loc.into()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user