Trait winch_codegen::isa::TargetIsa
source · pub trait TargetIsa: Send + Sync {
Show 13 methods
// Required methods
fn name(&self) -> &'static str;
fn triple(&self) -> &Triple;
fn flags(&self) -> &Flags;
fn isa_flags(&self) -> Vec<Value>;
fn compile_function(
&self,
sig: &FuncType,
body: &FunctionBody<'_>,
env: &dyn FuncEnv,
validator: &mut FuncValidator<ValidatorResources>
) -> Result<MachBufferFinalized<Final>>;
fn text_section_builder(
&self,
num_labeled_funcs: usize
) -> Box<dyn TextSectionBuilder>;
fn function_alignment(&self) -> u32;
fn host_to_wasm_trampoline(
&self,
ty: &FuncType
) -> Result<MachBufferFinalized<Final>>;
// Provided methods
fn is_branch_protection_enabled(&self) -> bool { ... }
fn default_call_conv(&self) -> CallConv { ... }
fn wasmtime_call_conv(&self) -> CallingConvention { ... }
fn endianness(&self) -> Endianness { ... }
fn create_systemv_cie(&self) -> Option<CommonInformationEntry> { ... }
}
Expand description
A trait representing commonalities between the supported instruction set architectures.
Required Methods§
sourcefn flags(&self) -> &Flags
fn flags(&self) -> &Flags
Get the ISA-independent flags that were used to make this trait object.
sourcefn isa_flags(&self) -> Vec<Value>
fn isa_flags(&self) -> Vec<Value>
Get the ISA-dependent flag values that were used to make this trait object.
sourcefn compile_function(
&self,
sig: &FuncType,
body: &FunctionBody<'_>,
env: &dyn FuncEnv,
validator: &mut FuncValidator<ValidatorResources>
) -> Result<MachBufferFinalized<Final>>
fn compile_function( &self, sig: &FuncType, body: &FunctionBody<'_>, env: &dyn FuncEnv, validator: &mut FuncValidator<ValidatorResources> ) -> Result<MachBufferFinalized<Final>>
Compile a function.
sourcefn text_section_builder(
&self,
num_labeled_funcs: usize
) -> Box<dyn TextSectionBuilder>
fn text_section_builder( &self, num_labeled_funcs: usize ) -> Box<dyn TextSectionBuilder>
See cranelift_codegen::isa::TargetIsa::text_section_builder
.
sourcefn function_alignment(&self) -> u32
fn function_alignment(&self) -> u32
See cranelift_codegen::isa::TargetIsa::function_alignment
.
sourcefn host_to_wasm_trampoline(
&self,
ty: &FuncType
) -> Result<MachBufferFinalized<Final>>
fn host_to_wasm_trampoline( &self, ty: &FuncType ) -> Result<MachBufferFinalized<Final>>
Generate a trampoline that can be used to call a wasm function from wasmtime.
Provided Methods§
sourcefn is_branch_protection_enabled(&self) -> bool
fn is_branch_protection_enabled(&self) -> bool
Get a flag indicating whether branch protection is enabled.
sourcefn default_call_conv(&self) -> CallConv
fn default_call_conv(&self) -> CallConv
Get the default calling convention of the underlying target triple.
sourcefn wasmtime_call_conv(&self) -> CallingConvention
fn wasmtime_call_conv(&self) -> CallingConvention
Derive Wasmtime’s calling convention from the triple’s default calling convention.
sourcefn endianness(&self) -> Endianness
fn endianness(&self) -> Endianness
Get the endianess of the underlying target triple.
sourcefn create_systemv_cie(&self) -> Option<CommonInformationEntry>
fn create_systemv_cie(&self) -> Option<CommonInformationEntry>
See cranelift_codegen::isa::TargetIsa::create_systemv_cie
.