wasmer/rustdoc/cranelift_codegen/isa/trait.TargetIsa.html
2019-09-06 15:57:44 -07:00

90 lines
28 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `TargetIsa` trait in crate `cranelift_codegen`."><meta name="keywords" content="rust, rustlang, rust-lang, TargetIsa"><title>cranelift_codegen::isa::TargetIsa - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../cranelift_codegen/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Trait TargetIsa</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.allocatable_registers">allocatable_registers</a><a href="#tymethod.emit_function_to_memory">emit_function_to_memory</a><a href="#tymethod.encoding_info">encoding_info</a><a href="#tymethod.flags">flags</a><a href="#tymethod.legal_encodings">legal_encodings</a><a href="#tymethod.legalize_signature">legalize_signature</a><a href="#tymethod.name">name</a><a href="#tymethod.regclass_for_abi_type">regclass_for_abi_type</a><a href="#tymethod.register_info">register_info</a><a href="#tymethod.triple">triple</a></div><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.default_call_conv">default_call_conv</a><a href="#method.encode">encode</a><a href="#method.frontend_config">frontend_config</a><a href="#method.pointer_bits">pointer_bits</a><a href="#method.pointer_bytes">pointer_bytes</a><a href="#method.pointer_type">pointer_type</a><a href="#method.pointer_width">pointer_width</a><a href="#method.prologue_epilogue">prologue_epilogue</a><a href="#method.uses_complex_addresses">uses_complex_addresses</a><a href="#method.uses_cpu_flags">uses_cpu_flags</a></div><a class="sidebar-title" href="#implementors">Implementors</a><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-From%3C%26%27a%20(dyn%20TargetIsa%20+%20%27a)%3E">From&lt;&amp;&#39;a (dyn TargetIsa + &#39;a)&gt;</a></div></div><p class='location'><a href='../index.html'>cranelift_codegen</a>::<wbr><a href='index.html'>isa</a></p><script>window.sidebarCurrent = {name: 'TargetIsa', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/cranelift_codegen/isa/mod.rs.html#202-375' title='goto source code'>[src]</a></span><span class='in-band'>Trait <a href='../index.html'>cranelift_codegen</a>::<wbr><a href='index.html'>isa</a>::<wbr><a class="trait" href=''>TargetIsa</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust trait'>pub trait TargetIsa: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> {
fn <a href='#tymethod.name' class='fnname'>name</a>(&amp;self) -&gt; &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>;
<div class='item-spacer'></div> fn <a href='#tymethod.triple' class='fnname'>triple</a>(&amp;self) -&gt; &amp;<a class="struct" href="../../target_lexicon/triple/struct.Triple.html" title="struct target_lexicon::triple::Triple">Triple</a>;
<div class='item-spacer'></div> fn <a href='#tymethod.flags' class='fnname'>flags</a>(&amp;self) -&gt; &amp;<a class="struct" href="../../cranelift_codegen/settings/struct.Flags.html" title="struct cranelift_codegen::settings::Flags">Flags</a>;
<div class='item-spacer'></div> fn <a href='#tymethod.register_info' class='fnname'>register_info</a>(&amp;self) -&gt; <a class="struct" href="../../cranelift_codegen/isa/registers/struct.RegInfo.html" title="struct cranelift_codegen::isa::registers::RegInfo">RegInfo</a>;
<div class='item-spacer'></div> fn <a href='#tymethod.legal_encodings' class='fnname'>legal_encodings</a>&lt;'a&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;'a self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;func: &amp;'a <a class="struct" href="../../cranelift_codegen/ir/function/struct.Function.html" title="struct cranelift_codegen::ir::function::Function">Function</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inst: &amp;'a <a class="enum" href="../../cranelift_codegen/ir/instructions/enum.InstructionData.html" title="enum cranelift_codegen::ir::instructions::InstructionData">InstructionData</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ctrl_typevar: <a class="struct" href="../../cranelift_codegen/ir/types/struct.Type.html" title="struct cranelift_codegen::ir::types::Type">Type</a><br>&nbsp;&nbsp;&nbsp;&nbsp;) -&gt; Encodings&lt;'a&gt;;
<div class='item-spacer'></div> fn <a href='#tymethod.encoding_info' class='fnname'>encoding_info</a>(&amp;self) -&gt; <a class="struct" href="../../cranelift_codegen/isa/struct.EncInfo.html" title="struct cranelift_codegen::isa::EncInfo">EncInfo</a>;
<div class='item-spacer'></div> fn <a href='#tymethod.legalize_signature' class='fnname'>legalize_signature</a>(&amp;self, sig: &amp;mut <a class="struct" href="../../cranelift_codegen/ir/struct.Signature.html" title="struct cranelift_codegen::ir::Signature">Signature</a>, current: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>);
<div class='item-spacer'></div> fn <a href='#tymethod.regclass_for_abi_type' class='fnname'>regclass_for_abi_type</a>(&amp;self, ty: <a class="struct" href="../../cranelift_codegen/ir/types/struct.Type.html" title="struct cranelift_codegen::ir::types::Type">Type</a>) -&gt; <a class="type" href="../../cranelift_codegen/isa/registers/type.RegClass.html" title="type cranelift_codegen::isa::registers::RegClass">RegClass</a>;
<div class='item-spacer'></div> fn <a href='#tymethod.allocatable_registers' class='fnname'>allocatable_registers</a>(&amp;self, func: &amp;<a class="struct" href="../../cranelift_codegen/ir/function/struct.Function.html" title="struct cranelift_codegen::ir::function::Function">Function</a>) -&gt; RegisterSet;
<div class='item-spacer'></div> fn <a href='#tymethod.emit_function_to_memory' class='fnname'>emit_function_to_memory</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;func: &amp;<a class="struct" href="../../cranelift_codegen/ir/function/struct.Function.html" title="struct cranelift_codegen::ir::function::Function">Function</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sink: &amp;mut <a class="struct" href="../../cranelift_codegen/binemit/struct.MemoryCodeSink.html" title="struct cranelift_codegen::binemit::MemoryCodeSink">MemoryCodeSink</a><br>&nbsp;&nbsp;&nbsp;&nbsp;);
fn <a href='#method.default_call_conv' class='fnname'>default_call_conv</a>(&amp;self) -&gt; <a class="enum" href="../../cranelift_codegen/isa/enum.CallConv.html" title="enum cranelift_codegen::isa::CallConv">CallConv</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.pointer_type' class='fnname'>pointer_type</a>(&amp;self) -&gt; <a class="struct" href="../../cranelift_codegen/ir/types/struct.Type.html" title="struct cranelift_codegen::ir::types::Type">Type</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.pointer_width' class='fnname'>pointer_width</a>(&amp;self) -&gt; <a class="enum" href="../../target_lexicon/triple/enum.PointerWidth.html" title="enum target_lexicon::triple::PointerWidth">PointerWidth</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.pointer_bits' class='fnname'>pointer_bits</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.pointer_bytes' class='fnname'>pointer_bytes</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.frontend_config' class='fnname'>frontend_config</a>(&amp;self) -&gt; <a class="struct" href="../../cranelift_codegen/isa/struct.TargetFrontendConfig.html" title="struct cranelift_codegen::isa::TargetFrontendConfig">TargetFrontendConfig</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.uses_cpu_flags' class='fnname'>uses_cpu_flags</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.uses_complex_addresses' class='fnname'>uses_complex_addresses</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.encode' class='fnname'>encode</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;func: &amp;<a class="struct" href="../../cranelift_codegen/ir/function/struct.Function.html" title="struct cranelift_codegen::ir::function::Function">Function</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inst: &amp;<a class="enum" href="../../cranelift_codegen/ir/instructions/enum.InstructionData.html" title="enum cranelift_codegen::ir::instructions::InstructionData">InstructionData</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ctrl_typevar: <a class="struct" href="../../cranelift_codegen/ir/types/struct.Type.html" title="struct cranelift_codegen::ir::types::Type">Type</a><br>&nbsp;&nbsp;&nbsp;&nbsp;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../../cranelift_codegen/isa/struct.Encoding.html" title="struct cranelift_codegen::isa::Encoding">Encoding</a>, <a class="type" href="../../cranelift_codegen/isa/type.Legalize.html" title="type cranelift_codegen::isa::Legalize">Legalize</a>&gt; { ... }
<div class='item-spacer'></div> fn <a href='#method.prologue_epilogue' class='fnname'>prologue_epilogue</a>(&amp;self, func: &amp;mut <a class="struct" href="../../cranelift_codegen/ir/function/struct.Function.html" title="struct cranelift_codegen::ir::function::Function">Function</a>) -&gt; <a class="type" href="../../cranelift_codegen/type.CodegenResult.html" title="type cranelift_codegen::CodegenResult">CodegenResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt; { ... }
}</pre></div><div class='docblock'><p>Methods that are specialized to a target ISA. Implies a Display trait that shows the
shared flags, as well as any isa-specific flags.</p>
</div>
<h2 id='required-methods' class='small-section-header'>Required methods<a href='#required-methods' class='anchor'></a></h2><div class='methods'><h3 id='tymethod.name' class='method'><code id='name.v'>fn <a href='#tymethod.name' class='fnname'>name</a>(&amp;self) -&gt; &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></code></h3><div class='docblock'><p>Get the name of this ISA.</p>
</div><h3 id='tymethod.triple' class='method'><code id='triple.v'>fn <a href='#tymethod.triple' class='fnname'>triple</a>(&amp;self) -&gt; &amp;<a class="struct" href="../../target_lexicon/triple/struct.Triple.html" title="struct target_lexicon::triple::Triple">Triple</a></code></h3><div class='docblock'><p>Get the target triple that was used to make this trait object.</p>
</div><h3 id='tymethod.flags' class='method'><code id='flags.v'>fn <a href='#tymethod.flags' class='fnname'>flags</a>(&amp;self) -&gt; &amp;<a class="struct" href="../../cranelift_codegen/settings/struct.Flags.html" title="struct cranelift_codegen::settings::Flags">Flags</a></code></h3><div class='docblock'><p>Get the ISA-independent flags that were used to make this trait object.</p>
</div><h3 id='tymethod.register_info' class='method'><code id='register_info.v'>fn <a href='#tymethod.register_info' class='fnname'>register_info</a>(&amp;self) -&gt; <a class="struct" href="../../cranelift_codegen/isa/registers/struct.RegInfo.html" title="struct cranelift_codegen::isa::registers::RegInfo">RegInfo</a></code></h3><div class='docblock'><p>Get a data structure describing the registers in this ISA.</p>
</div><h3 id='tymethod.legal_encodings' class='method'><code id='legal_encodings.v'>fn <a href='#tymethod.legal_encodings' class='fnname'>legal_encodings</a>&lt;'a&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;'a self, <br>&nbsp;&nbsp;&nbsp;&nbsp;func: &amp;'a <a class="struct" href="../../cranelift_codegen/ir/function/struct.Function.html" title="struct cranelift_codegen::ir::function::Function">Function</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;inst: &amp;'a <a class="enum" href="../../cranelift_codegen/ir/instructions/enum.InstructionData.html" title="enum cranelift_codegen::ir::instructions::InstructionData">InstructionData</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctrl_typevar: <a class="struct" href="../../cranelift_codegen/ir/types/struct.Type.html" title="struct cranelift_codegen::ir::types::Type">Type</a><br>) -&gt; Encodings&lt;'a&gt;</code></h3><div class='docblock'><p>Returns an iterator over legal encodings for the instruction.</p>
</div><h3 id='tymethod.encoding_info' class='method'><code id='encoding_info.v'>fn <a href='#tymethod.encoding_info' class='fnname'>encoding_info</a>(&amp;self) -&gt; <a class="struct" href="../../cranelift_codegen/isa/struct.EncInfo.html" title="struct cranelift_codegen::isa::EncInfo">EncInfo</a></code></h3><div class='docblock'><p>Get a data structure describing the instruction encodings in this ISA.</p>
</div><h3 id='tymethod.legalize_signature' class='method'><code id='legalize_signature.v'>fn <a href='#tymethod.legalize_signature' class='fnname'>legalize_signature</a>(&amp;self, sig: &amp;mut <a class="struct" href="../../cranelift_codegen/ir/struct.Signature.html" title="struct cranelift_codegen::ir::Signature">Signature</a>, current: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</code></h3><div class='docblock'><p>Legalize a function signature.</p>
<p>This is used to legalize both the signature of the function being compiled and any called
functions. The signature should be modified by adding <code>ArgumentLoc</code> annotations to all
arguments and return values.</p>
<p>Arguments with types that are not supported by the ABI can be expanded into multiple
arguments:</p>
<ul>
<li>Integer types that are too large to fit in a register can be broken into multiple
arguments of a smaller integer type.</li>
<li>Floating point types can be bit-cast to an integer type of the same size, and possible
broken into smaller integer types.</li>
<li>Vector types can be bit-cast and broken down into smaller vectors or scalars.</li>
</ul>
<p>The legalizer will adapt argument and return values as necessary at all ABI boundaries.</p>
<p>When this function is called to legalize the signature of the function currently being
compiled, <code>current</code> is true. The legalized signature can then also contain special purpose
arguments and return values such as:</p>
<ul>
<li>A <code>link</code> argument representing the link registers on RISC architectures that don't push
the return address on the stack.</li>
<li>A <code>link</code> return value which will receive the value that was passed to the <code>link</code>
argument.</li>
<li>An <code>sret</code> argument can be added if one wasn't present already. This is necessary if the
signature returns more values than registers are available for returning values.</li>
<li>An <code>sret</code> return value can be added if the ABI requires a function to return its <code>sret</code>
argument in a register.</li>
</ul>
<p>Arguments and return values for the caller's frame pointer and other callee-saved registers
should not be added by this function. These arguments are not added until after register
allocation.</p>
</div><h3 id='tymethod.regclass_for_abi_type' class='method'><code id='regclass_for_abi_type.v'>fn <a href='#tymethod.regclass_for_abi_type' class='fnname'>regclass_for_abi_type</a>(&amp;self, ty: <a class="struct" href="../../cranelift_codegen/ir/types/struct.Type.html" title="struct cranelift_codegen::ir::types::Type">Type</a>) -&gt; <a class="type" href="../../cranelift_codegen/isa/registers/type.RegClass.html" title="type cranelift_codegen::isa::registers::RegClass">RegClass</a></code></h3><div class='docblock'><p>Get the register class that should be used to represent an ABI argument or return value of
type <code>ty</code>. This should be the top-level register class that contains the argument
registers.</p>
<p>This function can assume that it will only be asked to provide register classes for types
that <code>legalize_signature()</code> produces in <code>ArgumentLoc::Reg</code> entries.</p>
</div><h3 id='tymethod.allocatable_registers' class='method'><code id='allocatable_registers.v'>fn <a href='#tymethod.allocatable_registers' class='fnname'>allocatable_registers</a>(&amp;self, func: &amp;<a class="struct" href="../../cranelift_codegen/ir/function/struct.Function.html" title="struct cranelift_codegen::ir::function::Function">Function</a>) -&gt; RegisterSet</code></h3><div class='docblock'><p>Get the set of allocatable registers that can be used when compiling <code>func</code>.</p>
<p>This set excludes reserved registers like the stack pointer and other special-purpose
registers.</p>
</div><h3 id='tymethod.emit_function_to_memory' class='method'><code id='emit_function_to_memory.v'>fn <a href='#tymethod.emit_function_to_memory' class='fnname'>emit_function_to_memory</a>(&amp;self, func: &amp;<a class="struct" href="../../cranelift_codegen/ir/function/struct.Function.html" title="struct cranelift_codegen::ir::function::Function">Function</a>, sink: &amp;mut <a class="struct" href="../../cranelift_codegen/binemit/struct.MemoryCodeSink.html" title="struct cranelift_codegen::binemit::MemoryCodeSink">MemoryCodeSink</a>)</code></h3><div class='docblock'><p>Emit a whole function into memory.</p>
</div></div><span class='loading-content'>Loading content...</span>
<h2 id='provided-methods' class='small-section-header'>Provided methods<a href='#provided-methods' class='anchor'></a></h2><div class='methods'><h3 id='method.default_call_conv' class='method'><code id='default_call_conv.v'>fn <a href='#method.default_call_conv' class='fnname'>default_call_conv</a>(&amp;self) -&gt; <a class="enum" href="../../cranelift_codegen/isa/enum.CallConv.html" title="enum cranelift_codegen::isa::CallConv">CallConv</a></code></h3><div class='docblock'><p>Get the default calling convention of this target.</p>
</div><h3 id='method.pointer_type' class='method'><code id='pointer_type.v'>fn <a href='#method.pointer_type' class='fnname'>pointer_type</a>(&amp;self) -&gt; <a class="struct" href="../../cranelift_codegen/ir/types/struct.Type.html" title="struct cranelift_codegen::ir::types::Type">Type</a></code></h3><div class='docblock'><p>Get the pointer type of this ISA.</p>
</div><h3 id='method.pointer_width' class='method'><code id='pointer_width.v'>fn <a href='#method.pointer_width' class='fnname'>pointer_width</a>(&amp;self) -&gt; <a class="enum" href="../../target_lexicon/triple/enum.PointerWidth.html" title="enum target_lexicon::triple::PointerWidth">PointerWidth</a></code></h3><div class='docblock'><p>Get the width of pointers on this ISA.</p>
</div><h3 id='method.pointer_bits' class='method'><code id='pointer_bits.v'>fn <a href='#method.pointer_bits' class='fnname'>pointer_bits</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code></h3><div class='docblock'><p>Get the width of pointers on this ISA, in units of bits.</p>
</div><h3 id='method.pointer_bytes' class='method'><code id='pointer_bytes.v'>fn <a href='#method.pointer_bytes' class='fnname'>pointer_bytes</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code></h3><div class='docblock'><p>Get the width of pointers on this ISA, in units of bytes.</p>
</div><h3 id='method.frontend_config' class='method'><code id='frontend_config.v'>fn <a href='#method.frontend_config' class='fnname'>frontend_config</a>(&amp;self) -&gt; <a class="struct" href="../../cranelift_codegen/isa/struct.TargetFrontendConfig.html" title="struct cranelift_codegen::isa::TargetFrontendConfig">TargetFrontendConfig</a></code></h3><div class='docblock'><p>Get the information needed by frontends producing Cranelift IR.</p>
</div><h3 id='method.uses_cpu_flags' class='method'><code id='uses_cpu_flags.v'>fn <a href='#method.uses_cpu_flags' class='fnname'>uses_cpu_flags</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h3><div class='docblock'><p>Does the CPU implement scalar comparisons using a CPU flags register?</p>
</div><h3 id='method.uses_complex_addresses' class='method'><code id='uses_complex_addresses.v'>fn <a href='#method.uses_complex_addresses' class='fnname'>uses_complex_addresses</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h3><div class='docblock'><p>Does the CPU implement multi-register addressing?</p>
</div><h3 id='method.encode' class='method'><code id='encode.v'>fn <a href='#method.encode' class='fnname'>encode</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;func: &amp;<a class="struct" href="../../cranelift_codegen/ir/function/struct.Function.html" title="struct cranelift_codegen::ir::function::Function">Function</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;inst: &amp;<a class="enum" href="../../cranelift_codegen/ir/instructions/enum.InstructionData.html" title="enum cranelift_codegen::ir::instructions::InstructionData">InstructionData</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctrl_typevar: <a class="struct" href="../../cranelift_codegen/ir/types/struct.Type.html" title="struct cranelift_codegen::ir::types::Type">Type</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../../cranelift_codegen/isa/struct.Encoding.html" title="struct cranelift_codegen::isa::Encoding">Encoding</a>, <a class="type" href="../../cranelift_codegen/isa/type.Legalize.html" title="type cranelift_codegen::isa::Legalize">Legalize</a>&gt;</code></h3><div class='docblock'><p>Encode an instruction after determining it is legal.</p>
<p>If <code>inst</code> can legally be encoded in this ISA, produce the corresponding <code>Encoding</code> object.
Otherwise, return <code>Legalize</code> action.</p>
<p>This is also the main entry point for determining if an instruction is legal.</p>
</div><h3 id='method.prologue_epilogue' class='method'><code id='prologue_epilogue.v'>fn <a href='#method.prologue_epilogue' class='fnname'>prologue_epilogue</a>(&amp;self, func: &amp;mut <a class="struct" href="../../cranelift_codegen/ir/function/struct.Function.html" title="struct cranelift_codegen::ir::function::Function">Function</a>) -&gt; <a class="type" href="../../cranelift_codegen/type.CodegenResult.html" title="type cranelift_codegen::CodegenResult">CodegenResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></h3><div class='docblock'><p>Compute the stack layout and insert prologue and epilogue code into <code>func</code>.</p>
<p>Return an error if the stack frame is too large.</p>
</div></div><span class='loading-content'>Loading content...</span><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-From%3C%26%27a%20(dyn%20TargetIsa%20+%20%27a)%3E' class='impl'><code class='in-band'>impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;&amp;'a (dyn <a class="trait" href="../../cranelift_codegen/isa/trait.TargetIsa.html" title="trait cranelift_codegen::isa::TargetIsa">TargetIsa</a> + 'a)&gt; for <a class="struct" href="../../cranelift_codegen/settings/struct.FlagsOrIsa.html" title="struct cranelift_codegen::settings::FlagsOrIsa">FlagsOrIsa</a>&lt;'a&gt;</code><a href='#impl-From%3C%26%27a%20(dyn%20TargetIsa%20+%20%27a)%3E' class='anchor'></a><a class='srclink' href='../../src/cranelift_codegen/settings.rs.html#358-365' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(isa: &amp;'a dyn <a class="trait" href="../../cranelift_codegen/isa/trait.TargetIsa.html" title="trait cranelift_codegen::isa::TargetIsa">TargetIsa</a>) -&gt; <a class="struct" href="../../cranelift_codegen/settings/struct.FlagsOrIsa.html" title="struct cranelift_codegen::settings::FlagsOrIsa">FlagsOrIsa</a></code><a class='srclink' href='../../src/cranelift_codegen/settings.rs.html#359-364' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div></div>
<h2 id='implementors' class='small-section-header'>Implementors<a href='#implementors' class='anchor'></a></h2><div class='item-list' id='implementors-list'></div><span class='loading-content'>Loading content...</span><script type="text/javascript">window.inlined_types=new Set([]);</script><script type="text/javascript" async
src="../../implementors/cranelift_codegen/isa/trait.TargetIsa.js">
</script></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd></kbd></dt><dd>Move up in search results</dd><dt><kbd></kbd></dt><dd>Move down in search results</dd><dt><kbd></kbd></dt><dd>Switch tab</dd><dt><kbd>&#9166;</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "cranelift_codegen";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>