pub struct TargetConfig {
pub stack_pointer: PReg,
pub frame_pointer: PReg,
pub flags: Option<PReg>,
pub addr_class: RegClass,
pub move_caps: MoveCaps,
pub max_mem_operands: u8,
pub conds: &'static [&'static str],
}Expand description
The registers with fixed jobs, and the target-wide limits, for
Target::new.
§Examples
use backend_lang::target::TargetConfig;
use backend_lang::x86_64::{self, RSP};
let cfg = TargetConfig::of(&x86_64::TARGET);
assert_eq!(cfg.stack_pointer, RSP);Fields§
§stack_pointer: PRegThe stack pointer.
frame_pointer: PRegThe frame pointer.
flags: Option<PReg>The condition-flags register, if the ISA has one.
addr_class: RegClassThe class of a memory operand’s base and index registers.
move_caps: MoveCapsHow values move.
max_mem_operands: u8The most memory operands one instruction may have.
conds: &'static [&'static str]The condition codes’ names, indexed by
CondCode::code (at most 255).
Implementations§
Source§impl TargetConfig
impl TargetConfig
Sourcepub const fn of(target: &Target) -> TargetConfig
pub const fn of(target: &Target) -> TargetConfig
The configuration of an existing target, to derive a variant from.
§Examples
use backend_lang::target::TargetConfig;
use backend_lang::x86_64;
assert_eq!(TargetConfig::of(&x86_64::TARGET).conds.len(), 16);Trait Implementations§
Source§impl Clone for TargetConfig
impl Clone for TargetConfig
impl Copy for TargetConfig
Source§impl Debug for TargetConfig
impl Debug for TargetConfig
impl Eq for TargetConfig
Source§impl PartialEq for TargetConfig
impl PartialEq for TargetConfig
impl StructuralPartialEq for TargetConfig
Auto Trait Implementations§
impl Freeze for TargetConfig
impl RefUnwindSafe for TargetConfig
impl Send for TargetConfig
impl Sync for TargetConfig
impl Unpin for TargetConfig
impl UnsafeUnpin for TargetConfig
impl UnwindSafe for TargetConfig
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