pub struct Convention<'a> {
pub regs: &'a CallRegs,
pub insts: &'a FrameInsts,
pub protect: Option<Protect<'a>>,
pub probe: Option<Probing<'a>>,
pub landing: Option<&'static str>,
}Expand description
What the convention this function is compiled for says a frame is.
Five answers to the one question, which is why they travel together: where it puts things, which instructions build one, whether this function’s carries a protector, whether it is taken a page at a time, and whether the function opens with a landing pad. The last three are the only ones about this function rather than about every function on the target, and they are here because what they need is the other two and nothing else.
Fields§
§regs: &'a CallRegsWhere the convention puts things.
insts: &'a FrameInstsThe instructions a prologue, an epilogue, a spill and a reload are made of on it.
protect: Option<Protect<'a>>What this function’s stack protector needs, or None in a function with none.
probe: Option<Probing<'a>>What this function’s probing prologue needs, or None when the frame is taken in one
subtraction, which is what a command line that did not ask asks for.
landing: Option<&'static str>What says an indirect branch may arrive at the top of this function, or None when the
command line did not ask for one and on a target that has no such instruction.
See rucc_target::FrameInsts::landing. A name rather than a flag because the flag has
already been read against the target by the time this is built, and because a prologue that
has the name has everything it needs.
Implementations§
Source§impl<'a> Convention<'a>
impl<'a> Convention<'a>
Sourcepub fn new(regs: &'a CallRegs, insts: &'a FrameInsts) -> Self
pub fn new(regs: &'a CallRegs, insts: &'a FrameInsts) -> Self
That convention, for a function with no stack protector, no probing and no landing pad, which is most of them.
Trait Implementations§
Source§impl<'a> Clone for Convention<'a>
impl<'a> Clone for Convention<'a>
Source§fn clone(&self) -> Convention<'a>
fn clone(&self) -> Convention<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more