#[non_exhaustive]pub enum ArgClass {
Int,
Float,
}Expand description
The kind of a scalar argument or return value, which picks its register sequence.
§Examples
use backend_lang::target::abi::{ArgClass, ArgLoc};
use backend_lang::x86_64::{SYSV, RDI, XMM0};
let mut locs = Vec::new();
SYSV.assign_args(&[ArgClass::Int, ArgClass::Float], &mut locs);
assert_eq!(locs, [ArgLoc::Reg(RDI), ArgLoc::Reg(XMM0)]);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Trait Implementations§
impl Copy for ArgClass
impl Eq for ArgClass
impl StructuralPartialEq for ArgClass
Auto Trait Implementations§
impl Freeze for ArgClass
impl RefUnwindSafe for ArgClass
impl Send for ArgClass
impl Sync for ArgClass
impl Unpin for ArgClass
impl UnsafeUnpin for ArgClass
impl UnwindSafe for ArgClass
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