|
|
@ -112,6 +112,7 @@ use smallvec::smallvec; |
|
|
|
use std::collections::HashMap; |
|
|
|
use std::marker::PhantomData; |
|
|
|
use std::mem; |
|
|
|
use target_lexicon::Triple; |
|
|
|
|
|
|
|
/// A small vector of instructions (with some reasonable size); appropriate for
|
|
|
|
/// a small fixed sequence implementing one operation.
|
|
|
@ -1035,6 +1036,8 @@ pub struct Callee<M: ABIMachineSpec> { |
|
|
|
/// manually register-allocated and carefully only use caller-saved
|
|
|
|
/// registers and keep nothing live after this sequence of instructions.
|
|
|
|
stack_limit: Option<(Reg, SmallInstVec<M::I>)>, |
|
|
|
// Target triple
|
|
|
|
triple: Triple, |
|
|
|
|
|
|
|
_mach: PhantomData<M>, |
|
|
|
} |
|
|
@ -1160,6 +1163,7 @@ impl<M: ABIMachineSpec> Callee<M> { |
|
|
|
isa_flags: isa_flags.clone(), |
|
|
|
is_leaf: f.is_leaf(), |
|
|
|
stack_limit, |
|
|
|
triple: isa.triple().clone(), |
|
|
|
_mach: PhantomData, |
|
|
|
}) |
|
|
|
} |
|
|
@ -1384,6 +1388,10 @@ impl<M: ABIMachineSpec> Callee<M> { |
|
|
|
&self.dynamic_stackslots |
|
|
|
} |
|
|
|
|
|
|
|
pub fn triple(&self) -> &Triple { |
|
|
|
&self.triple |
|
|
|
} |
|
|
|
|
|
|
|
/// Generate an instruction which copies an argument to a destination
|
|
|
|
/// register.
|
|
|
|
pub fn gen_copy_arg_to_regs( |
|
|
|