Struct cretonne_codegen::ir::Signature
[−]
[src]
pub struct Signature { pub params: Vec<AbiParam>, pub returns: Vec<AbiParam>, pub call_conv: CallConv, pub argument_bytes: Option<u32>, }
Function signature.
The function signature describes the types of formal parameters and return values along with other details that are needed to call a function correctly.
A signature can optionally include ISA-specific ABI information which specifies exactly how arguments and return values are passed.
Fields
params: Vec<AbiParam>
The arguments passed to the function.
returns: Vec<AbiParam>
Values returned from the function.
call_conv: CallConv
Calling convention.
argument_bytes: Option<u32>
When the signature has been legalized to a specific ISA, this holds the size of the
argument array on the stack. Before legalization, this is None
.
This can be computed from the legalized params
array as the maximum (offset plus
byte size) of the ArgumentLoc::Stack(offset)
argument.
Methods
impl Signature
[src]
pub fn new(call_conv: CallConv) -> Self
[src]
Create a new blank signature.
pub fn clear(&mut self, call_conv: CallConv)
[src]
Clear the signature so it is identical to a fresh one returned by new()
.
pub fn compute_argument_bytes(&mut self)
[src]
Compute the size of the stack arguments and mark signature as legalized.
Even if there are no stack arguments, this will set params
to Some(0)
instead
of None
. This indicates that the signature has been legalized.
pub fn display<'a, R: Into<Option<&'a RegInfo>>>(
&'a self,
regs: R
) -> DisplaySignature<'a>
[src]
&'a self,
regs: R
) -> DisplaySignature<'a>
Return an object that can display self
with correct register names.
pub fn special_param_index(&self, purpose: ArgumentPurpose) -> Option<usize>
[src]
Find the index of a presumed unique special-purpose parameter.
Trait Implementations
impl Clone for Signature
[src]
fn clone(&self) -> Signature
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Signature
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for Signature
[src]
fn eq(&self, __arg_0: &Signature) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Signature) -> bool
[src]
This method tests for !=
.
impl Eq for Signature
[src]
impl Hash for Signature
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more