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>,
pub trace: Option<Tracing>,
pub pad: Option<Padding>,
}Expand description
What the convention this function is compiled for says a frame is.
Seven 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, whether the function opens with a landing pad, whether it calls a profiler on the way in, and how much room it opens with for a patcher. The last five 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.
trace: Option<Tracing>What this function’s call to a profiler is, or None in one that makes none, which is every
function on a command line that did not ask.
pad: Option<Padding>What room this function opens with for a patcher, or None in one that was promised none,
which is every function on a command line that did not ask.
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, no landing pad, no call to a profiler and no room for a patcher, 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