Skip to main content

Area

Struct Area 

Source
pub struct Area {
    pub floats_at: u32,
    pub size: u32,
    /* private fields */
}
Expand description

How big a callee’s register save area is and where its two halves are.

Worked out from the convention rather than written down, so that a convention with a different number of argument registers gets an area the right size for it without anything here changing.

Fields§

§floats_at: u32

How many bytes of it the general purpose registers take, which is also where the vector half begins, since the general purpose half is first and starts at nothing.

§size: u32

How many bytes the whole of it is.

Implementations§

Source§

impl Area

Source

pub fn of(conv: &CallRegs) -> Self

The save area a variadic callee under that convention needs.

Source

pub fn stride(self, float: bool) -> u32

How far apart two of a file’s slots are.

Source

pub fn starts_at(self, float: bool) -> u32

Where a file’s first slot is, which is what va_start writes into that file’s field when the signature named no argument that file carried.

Source

pub fn last(self, float: bool) -> Option<u32>

The offset of a file’s last slot, which is the threshold va_arg compares against.

The last slot’s own offset and not the end of the area, because an offset equal to the end is one slot past the last argument while an offset a slot below the end is the last argument itself. An empty file has no such offset and nothing here has one.

Trait Implementations§

Source§

impl Clone for Area

Source§

fn clone(&self) -> Area

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Area

Source§

impl Debug for Area

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Area

Source§

impl PartialEq for Area

Source§

fn eq(&self, other: &Area) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Area

Auto Trait Implementations§

§

impl Freeze for Area

§

impl RefUnwindSafe for Area

§

impl Send for Area

§

impl Sync for Area

§

impl Unpin for Area

§

impl UnsafeUnpin for Area

§

impl UnwindSafe for Area

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.