pub enum ArgLoc {
Reg(PReg),
Stack(u32),
}Expand description
Where one argument or return value lives at the call.
§Examples
use backend_lang::target::abi::{ArgClass, ArgLoc};
use backend_lang::x86_64::WIN64;
let mut locs = Vec::new();
WIN64.assign_args(&[ArgClass::Int; 5], &mut locs);
// The fifth argument goes above the 32 bytes of shadow space.
assert_eq!(locs[4], ArgLoc::Stack(32));Variants§
Reg(PReg)
In a register.
Stack(u32)
On the stack, at this byte offset from the stack pointer at the call
instruction (before the return address is pushed). In the callee it
is the same offset from the canonical frame address; an incoming
stack slot (SlotKind::Incoming) names it.
Trait Implementations§
impl Copy for ArgLoc
impl Eq for ArgLoc
impl StructuralPartialEq for ArgLoc
Auto Trait Implementations§
impl Freeze for ArgLoc
impl RefUnwindSafe for ArgLoc
impl Send for ArgLoc
impl Sync for ArgLoc
impl Unpin for ArgLoc
impl UnsafeUnpin for ArgLoc
impl UnwindSafe for ArgLoc
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more