winch_codegen::isa

Trait TargetIsa

Source
pub trait TargetIsa: Send + Sync {
Show 14 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: &WasmFuncType, body: &FunctionBody<'_>, translation: &ModuleTranslation<'_>, types: &ModuleTypesBuilder, builtins: &mut BuiltinFunctions, validator: &mut FuncValidator<ValidatorResources>, tunables: &Tunables, ) -> Result<CompiledFunction>; fn emit_unwind_info( &self, _result: &MachBufferFinalized<Final>, _kind: UnwindInfoKind, ) -> Result<Option<UnwindInfo>>; fn text_section_builder( &self, num_labeled_funcs: usize, ) -> Box<dyn TextSectionBuilder>; fn function_alignment(&self) -> u32; // 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> { ... } fn pointer_bytes(&self) -> u8 { ... }
}
Expand description

A trait representing commonalities between the supported instruction set architectures.

Required Methods§

Source

fn name(&self) -> &'static str

Get the name of the ISA.

Source

fn triple(&self) -> &Triple

Get the target triple of the ISA.

Source

fn flags(&self) -> &Flags

Get the ISA-independent flags that were used to make this trait object.

Source

fn isa_flags(&self) -> Vec<Value>

Get the ISA-dependent flag values that were used to make this trait object.

Source

fn compile_function( &self, sig: &WasmFuncType, body: &FunctionBody<'_>, translation: &ModuleTranslation<'_>, types: &ModuleTypesBuilder, builtins: &mut BuiltinFunctions, validator: &mut FuncValidator<ValidatorResources>, tunables: &Tunables, ) -> Result<CompiledFunction>

Compile a function.

Source

fn emit_unwind_info( &self, _result: &MachBufferFinalized<Final>, _kind: UnwindInfoKind, ) -> Result<Option<UnwindInfo>>

Source

fn text_section_builder( &self, num_labeled_funcs: usize, ) -> Box<dyn TextSectionBuilder>

See cranelift_codegen::isa::TargetIsa::text_section_builder.

Source

fn function_alignment(&self) -> u32

See cranelift_codegen::isa::TargetIsa::function_alignment.

Provided Methods§

Source

fn is_branch_protection_enabled(&self) -> bool

Get a flag indicating whether branch protection is enabled.

Source

fn default_call_conv(&self) -> CallConv

Get the default calling convention of the underlying target triple.

Source

fn wasmtime_call_conv(&self) -> CallingConvention

Derive Wasmtime’s calling convention from the triple’s default calling convention.

Source

fn endianness(&self) -> Endianness

Get the endianness of the underlying target triple.

Source

fn create_systemv_cie(&self) -> Option<CommonInformationEntry>

See cranelift_codegen::isa::TargetIsa::create_systemv_cie.

Source

fn pointer_bytes(&self) -> u8

Returns the pointer width of the ISA in bytes.

Trait Implementations§

Source§

impl Debug for &dyn TargetIsa

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Implementors§