diff options
author | johannst <johannst@users.noreply.github.com> | 2024-02-28 18:41:33 +0000 |
---|---|---|
committer | johannst <johannst@users.noreply.github.com> | 2024-02-28 18:41:33 +0000 |
commit | 596eaec7fa9678939031eb1a434735c51f3ecec2 (patch) | |
tree | 3345f61d9a0eaf713228a8f74b4db3dcbad721f1 | |
parent | 130746bc856f5c2eb5672cceb0e1304ee2c95b1e (diff) | |
download | juicebox-asm-596eaec7fa9678939031eb1a434735c51f3ecec2.tar.gz juicebox-asm-596eaec7fa9678939031eb1a434735c51f3ecec2.zip |
deploy: aee91960846cc5786b1ce0f87b107534440a8450
-rw-r--r-- | juicebox_asm/struct.Runtime.html | 16 | ||||
-rw-r--r-- | search-index.js | 2 | ||||
-rw-r--r-- | src/juicebox_asm/rt.rs.html | 20 |
3 files changed, 31 insertions, 7 deletions
diff --git a/juicebox_asm/struct.Runtime.html b/juicebox_asm/struct.Runtime.html index 7872799..e530951 100644 --- a/juicebox_asm/struct.Runtime.html +++ b/juicebox_asm/struct.Runtime.html @@ -1,10 +1,16 @@ <!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="A simple `mmap`ed runtime with executable pages."><title>Runtime in juicebox_asm - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-ac92e1bbe349e143.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="juicebox_asm" data-themes="" data-resource-suffix="" data-rustdoc-version="1.76.0 (07dca489a 2024-02-04)" data-channel="1.76.0" data-search-js="search-2b6ce74ff89ae146.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-f2adc0d6ca4d09fb.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-305769736d49e732.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-feafe1bb7466e4bd.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../juicebox_asm/index.html">juicebox_asm</a><span class="version">0.1.0</span></h2></div><h2 class="location"><a href="#">Runtime</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.add_code">add_code</a></li><li><a href="#method.dump">dump</a></li><li><a href="#method.new">new</a></li><li><a href="#method.with_profile">with_profile</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Drop-for-Runtime">Drop</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Send-for-Runtime">!Send</a></li><li><a href="#impl-Sync-for-Runtime">!Sync</a></li><li><a href="#impl-RefUnwindSafe-for-Runtime">RefUnwindSafe</a></li><li><a href="#impl-Unpin-for-Runtime">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Runtime">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In crate juicebox_asm</a></h2></div></nav><div class="sidebar-resizer"></div> <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../juicebox_asm/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="index.html">juicebox_asm</a>::<wbr><a class="struct" href="#">Runtime</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../src/juicebox_asm/rt.rs.html#57-62">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct Runtime { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A simple <code>mmap</code>ed runtime with executable pages.</p> -</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Runtime" class="impl"><a class="src rightside" href="../src/juicebox_asm/rt.rs.html#64-201">source</a><a href="#impl-Runtime" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Runtime.html" title="struct juicebox_asm::Runtime">Runtime</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="src rightside" href="../src/juicebox_asm/rt.rs.html#70-91">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> <a class="struct" href="struct.Runtime.html" title="struct juicebox_asm::Runtime">Runtime</a></h4></section></summary><div class="docblock"><p>Create a new <a href="struct.Runtime.html" title="struct juicebox_asm::Runtime">Runtime</a>.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Runtime" class="impl"><a class="src rightside" href="../src/juicebox_asm/rt.rs.html#64-210">source</a><a href="#impl-Runtime" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Runtime.html" title="struct juicebox_asm::Runtime">Runtime</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="src rightside" href="../src/juicebox_asm/rt.rs.html#70-91">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> <a class="struct" href="struct.Runtime.html" title="struct juicebox_asm::Runtime">Runtime</a></h4></section></summary><div class="docblock"><p>Create a new <a href="struct.Runtime.html" title="struct juicebox_asm::Runtime">Runtime</a>.</p> <h5 id="panics"><a href="#panics">Panics</a></h5> <p>Panics if the <code>mmap</code> call fails.</p> -</div></details><section id="method.with_profile" class="method"><a class="src rightside" href="../src/juicebox_asm/rt.rs.html#93-97">source</a><h4 class="code-header">pub fn <a href="#method.with_profile" class="fn">with_profile</a>() -> <a class="struct" href="struct.Runtime.html" title="struct juicebox_asm::Runtime">Runtime</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.add_code" class="method"><a class="src rightside" href="../src/juicebox_asm/rt.rs.html#120-146">source</a><h4 class="code-header">pub unsafe fn <a href="#method.add_code" class="fn">add_code</a><F>(&mut self, code: impl <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u8.html">u8</a>]>) -> F</h4></section></summary><div class="docblock"><p>Add the block of <code>code</code> to the runtime and a get function pointer of type <code>F</code>.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.with_profile" class="method"><a class="src rightside" href="../src/juicebox_asm/rt.rs.html#102-106">source</a><h4 class="code-header">pub fn <a href="#method.with_profile" class="fn">with_profile</a>() -> <a class="struct" href="struct.Runtime.html" title="struct juicebox_asm::Runtime">Runtime</a></h4></section></summary><div class="docblock"><p>Create a new <a href="struct.Runtime.html" title="struct juicebox_asm::Runtime">Runtime</a> which also generates static perf metat data.</p> +<p>For each function added to the <a href="struct.Runtime.html" title="struct juicebox_asm::Runtime">Runtime</a>, an entry will be generated in the +<code>/tmp/perf-<PID>.map</code> file, which <code>perf report</code> uses to symbolicate unknown addresses. +This is applicable for static runtimes only.</p> <h5 id="panics-1"><a href="#panics-1">Panics</a></h5> +<p>Panics if the <code>mmap</code> call fails.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.add_code" class="method"><a class="src rightside" href="../src/juicebox_asm/rt.rs.html#129-155">source</a><h4 class="code-header">pub unsafe fn <a href="#method.add_code" class="fn">add_code</a><F>(&mut self, code: impl <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.u8.html">u8</a>]>) -> F</h4></section></summary><div class="docblock"><p>Add the block of <code>code</code> to the runtime and a get function pointer of type <code>F</code>.</p> +<h5 id="panics-2"><a href="#panics-2">Panics</a></h5> <p>Panics if the <code>code</code> does not fit on the <code>mmap</code>ed pages or is empty.</p> <h5 id="safety"><a href="#safety">Safety</a></h5> <p>The code added must fulfill the ABI of the specified function <code>F</code> and the returned function @@ -16,14 +22,14 @@ pointer is only valid until the <a href="struct.Runtime.html" title="struct juic <span class="kw">let </span>nop = <span class="kw">unsafe </span>{ rt.add_code::<<span class="kw">extern </span><span class="string">"C" </span><span class="kw">fn</span>()>(<span class="kw-2">&</span>code) }; nop();</code></pre></div> -</div></details><details class="toggle method-toggle" open><summary><section id="method.dump" class="method"><a class="src rightside" href="../src/juicebox_asm/rt.rs.html#160-164">source</a><h4 class="code-header">pub fn <a href="#method.dump" class="fn">dump</a>(&self)</h4></section></summary><div class="docblock"><p>Dump the code added so far to the runtime into a file called <code>jit.asm</code> in the processes +</div></details><details class="toggle method-toggle" open><summary><section id="method.dump" class="method"><a class="src rightside" href="../src/juicebox_asm/rt.rs.html#169-173">source</a><h4 class="code-header">pub fn <a href="#method.dump" class="fn">dump</a>(&self)</h4></section></summary><div class="docblock"><p>Dump the code added so far to the runtime into a file called <code>jit.asm</code> in the processes current working directory.</p> <p>The code can be inspected with a disassembler as for example <code>ndiasm</code> from <a href="https://nasm.us/index.php">nasm.us</a>.</p> <div class="example-wrap"><pre class="language-sh"><code>ndisasm -b 64 jit.asm -</code></pre></div><h5 id="panics-2"><a href="#panics-2">Panics</a></h5> +</code></pre></div><h5 id="panics-3"><a href="#panics-3">Panics</a></h5> <p>Panics if writing the file failed.</p> -</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Drop-for-Runtime" class="impl"><a class="src rightside" href="../src/juicebox_asm/rt.rs.html#203-211">source</a><a href="#impl-Drop-for-Runtime" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/drop/trait.Drop.html" title="trait core::ops::drop::Drop">Drop</a> for <a class="struct" href="struct.Runtime.html" title="struct juicebox_asm::Runtime">Runtime</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.drop" class="method trait-impl"><a class="src rightside" href="../src/juicebox_asm/rt.rs.html#206-210">source</a><a href="#method.drop" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/ops/drop/trait.Drop.html#tymethod.drop" class="fn">drop</a>(&mut self)</h4></section></summary><div class="docblock"><p>Unmaps the code page. This invalidates all the function pointer returned by +</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Drop-for-Runtime" class="impl"><a class="src rightside" href="../src/juicebox_asm/rt.rs.html#212-220">source</a><a href="#impl-Drop-for-Runtime" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/drop/trait.Drop.html" title="trait core::ops::drop::Drop">Drop</a> for <a class="struct" href="struct.Runtime.html" title="struct juicebox_asm::Runtime">Runtime</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.drop" class="method trait-impl"><a class="src rightside" href="../src/juicebox_asm/rt.rs.html#215-219">source</a><a href="#method.drop" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/ops/drop/trait.Drop.html#tymethod.drop" class="fn">drop</a>(&mut self)</h4></section></summary><div class="docblock"><p>Unmaps the code page. This invalidates all the function pointer returned by <a href="struct.Runtime.html#method.add_code" title="method juicebox_asm::Runtime::add_code"><code>Runtime::add_code</code></a>.</p> </div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Runtime" class="impl"><a href="#impl-RefUnwindSafe-for-Runtime" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Runtime.html" title="struct juicebox_asm::Runtime">Runtime</a></h3></section><section id="impl-Send-for-Runtime" class="impl"><a href="#impl-Send-for-Runtime" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Runtime.html" title="struct juicebox_asm::Runtime">Runtime</a></h3></section><section id="impl-Sync-for-Runtime" class="impl"><a href="#impl-Sync-for-Runtime" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Runtime.html" title="struct juicebox_asm::Runtime">Runtime</a></h3></section><section id="impl-Unpin-for-Runtime" class="impl"><a href="#impl-Unpin-for-Runtime" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Runtime.html" title="struct juicebox_asm::Runtime">Runtime</a></h3></section><section id="impl-UnwindSafe-for-Runtime" class="impl"><a href="#impl-UnwindSafe-for-Runtime" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Runtime.html" title="struct juicebox_asm::Runtime">Runtime</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.76.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.76.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where diff --git a/search-index.js b/search-index.js index 0c4c88e..66516d6 100644 --- a/search-index.js +++ b/search-index.js @@ -1,7 +1,7 @@ var searchIndex = new Map(JSON.parse('[\ ["add",{"doc":"Add example.","t":"","n":[],"q":[],"d":[],"i":[],"f":[],"c":[],"p":[],"b":[]}],\ ["fib",{"doc":"Fibonacci example.","t":"","n":[],"q":[],"d":[],"i":[],"f":[],"c":[],"p":[],"b":[]}],\ -["juicebox_asm",{"doc":"A simple <code>x64</code> jit assembler with a minimal runtime to …","t":"FFFFFPPFGGGGGFNNNNNPPPPNPNNNNNNNNNNNNNNNNNNNNNNNNPPPNPPNNNNNNNNNPNNPPPPNNNPPPPPPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPNPPPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNKKKKKKKKKKKMMMMMMMMMMM","n":["Asm","Imm16","Imm32","Imm64","Imm8","Indirect","IndirectDisp","Label","MemOp","Reg16","Reg32","Reg64","Reg8","Runtime","add","add","add","add","add_code","ah","al","ax","bh","bind","bl","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","bp","bpl","bx","call","ch","cl","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","cmp","cx","dec","dec","dh","di","dil","dl","drop","drop","dump","dx","eax","ebp","ebx","ecx","edi","edx","esi","esp","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","insn","into","into","into","into","into","into","into","into","into","into","into","into","into_code","jmp","jnz","jz","mov","mov","mov","mov","mov","mov","mov","mov","mov","mov","mov","mov","mov","mov","mov","mov","mov","new","new","new","nop","pop","pop","push","push","r10","r10d","r10l","r10w","r11","r11d","r11l","r11w","r12","r12d","r12l","r12w","r13","r13d","r13l","r13w","r14","r14d","r14l","r14w","r15","r15d","r15l","r15w","r8","r8d","r8l","r8w","r9","r9d","r9l","r9w","rax","rbp","rbx","rcx","rdi","rdx","ret","rsi","rsp","si","sil","sp","spl","test","test","test","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","with_profile","Add","Call","Cmp","Dec","Jmp","Jnz","Jz","Mov","Pop","Push","Test","add","call","cmp","dec","jmp","jnz","jz","mov","pop","push","test"],"q":[[0,"juicebox_asm"],[248,"juicebox_asm::insn"],[270,"core::convert"],[271,"alloc::vec"],[272,"core::result"],[273,"core::any"]],"d":["<code>x64</code> jit assembler.","Type representing a 16 bit immediate.","Type representing a 32 bit immediate.","Type representing a 64 bit immediate.","Type representing an 8 bit immediate.","An indirect memory operand, eg <code>mov [rax], rcx</code>.","An indirect memory operand with additional displacement, …","A label which is used as target for jump instructions.","Type representing a memory operand.","Definition of 16 bit registers.","Definition of 32 bit registers.","Definition of 64 bit registers.","Definition of 8 bit registers.","A simple <code>mmap</code>ed runtime with executable pages.","","","","","Add the block of <code>code</code> to the runtime and a get function …","","","","","Bind the Label to the current location.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Unmaps the code page. This invalidates all the function …","Dump the code added so far to the runtime into a file …","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","Returns the argument unchanged.","","","Returns the argument unchanged.","","","","","","Returns the argument unchanged.","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Trait definitions of various instructions.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Consume the assembler and get the emitted code.","","","","","","","","","","","","","","","","","","","","","Create a new <code>x64</code> jit assembler.","Create a new <code>unbound</code> Label.","Create a new Runtime.","Emit a <code>nop</code> instruction.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Emit a <code>ret</code> instruction.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Trait for <code>add</code> instruction kinds.","Trait for <code>call</code> instruction kinds.","Trait for <code>cmp</code> instruction kinds.","Trait for <code>dec</code> instruction kinds.","Trait for <code>jmp</code> instruction kinds.","Trait for <code>jnz</code> instruction kinds.","Trait for <code>jz</code> instruction kinds.","Trait for <code>mov</code> instruction kinds.","Trait for <code>pop</code> instruction kinds.","Trait for <code>push</code> instruction kinds.","Trait for <code>test</code> instruction kinds.","Emit an add instruction.","Emit a call instruction.","Emit a compare instruction.","Emit a decrement instruction.","Emit an unconditional jump instruction.","Emit a conditional jump if not zero instruction (<code>ZF = 0</code>).","Emit a conditional jump if zero instruction (<code>ZF = 1</code>).","Emit an move instruction.","Emit a pop instruction.","Emit a push instruction.","Emit a logical compare instruction."],"i":[0,0,0,0,0,2,2,0,0,0,0,0,0,0,1,1,1,1,8,13,13,6,13,1,13,1,12,8,2,14,3,18,21,7,5,6,13,1,12,8,2,14,3,18,21,7,5,6,13,6,13,6,1,13,13,7,5,6,13,7,5,6,13,1,6,1,1,13,6,13,13,12,8,8,6,5,5,5,5,5,5,5,5,1,12,8,2,14,14,14,3,3,3,3,3,18,18,18,18,18,18,18,21,21,21,21,21,21,21,21,21,21,21,7,5,6,13,0,1,12,8,2,14,3,18,21,7,5,6,13,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,8,1,1,1,1,1,7,5,13,6,7,5,13,6,7,5,13,6,7,5,13,6,7,5,13,6,7,5,13,6,7,5,13,6,7,5,13,6,7,7,7,7,7,7,1,7,7,6,13,6,13,1,1,1,7,5,6,13,1,12,8,2,14,3,18,21,7,5,6,13,1,12,8,2,14,3,18,21,7,5,6,13,1,12,8,2,14,3,18,21,7,5,6,13,8,0,0,0,0,0,0,0,0,0,0,0,29,30,31,32,33,34,35,36,37,38,39],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[1,2,3],4],[[1,5,5],4],[[1,2,6],4],[[1,7,7],4],[[8,-1],-2,[[11,[[10,[9]]]]],[]],0,0,0,0,[[1,12],4],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,[[1,7],4],0,0,[7,7],[5,5],[6,6],[13,13],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[1,2,3],4],0,[[1,5],4],[[1,7],4],0,0,0,0,[12,4],[8,4],[8,4],0,0,0,0,0,0,0,0,0,[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[9,14],[15,14],[16,3],[15,3],[9,3],[-1,-1,[]],[17,3],[15,18],[-1,-1,[]],[17,18],[16,18],[9,18],[19,18],[20,18],[-1,-1,[]],[17,21],[22,21],[15,21],[20,21],[19,21],[23,21],[24,21],[9,21],[25,21],[16,21],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[1,[[26,[9]]]],[[1,12],4],[[1,12],4],[[1,12],4],[[1,7,2],4],[[1,7,7],4],[[1,6,6],4],[[1,2,5],4],[[1,13,14],4],[[1,2,6],4],[[1,5,18],4],[[1,2,13],4],[[1,2,7],4],[[1,13,2],4],[[1,2,3],4],[[1,13,13],4],[[1,7,21],4],[[1,6,2],4],[[1,5,2],4],[[1,6,3],4],[[1,5,5],4],[[],1],[[],12],[[],8],[1,4],[[1,6],4],[[1,7],4],[[1,7],4],[[1,6],4],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[1,4],0,0,0,0,0,0,[[1,2,3],4],[[1,7,7],4],[[1,5,5],4],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,28,[]],[-1,28,[]],[-1,28,[]],[-1,28,[]],[-1,28,[]],[-1,28,[]],[-1,28,[]],[-1,28,[]],[-1,28,[]],[-1,28,[]],[-1,28,[]],[-1,28,[]],[[],8],0,0,0,0,0,0,0,0,0,0,0,[[29,-1,-2],4,[],[]],[[30,-1],4,[]],[[31,-1,-2],4,[],[]],[[32,-1],4,[]],[[33,-1],4,[]],[[34,-1],4,[]],[[35,-1],4,[]],[[36,-1,-2],4,[],[]],[[37,-1],4,[]],[[38,-1],4,[]],[[39,-1,-2],4,[],[]]],"c":[],"p":[[5,"Asm",0],[6,"MemOp",0],[5,"Imm16",0],[1,"tuple"],[6,"Reg32",0],[6,"Reg16",0],[6,"Reg64",0],[5,"Runtime",0],[1,"u8"],[1,"slice"],[10,"AsRef",270],[5,"Label",0],[6,"Reg8",0],[5,"Imm8",0],[1,"i8"],[1,"u16"],[1,"i16"],[5,"Imm32",0],[1,"i32"],[1,"u32"],[5,"Imm64",0],[1,"i64"],[1,"usize"],[1,"u64"],[1,"isize"],[5,"Vec",271],[6,"Result",272],[5,"TypeId",273],[10,"Add",248],[10,"Call",248],[10,"Cmp",248],[10,"Dec",248],[10,"Jmp",248],[10,"Jnz",248],[10,"Jz",248],[10,"Mov",248],[10,"Pop",248],[10,"Push",248],[10,"Test",248]],"b":[[14,"impl-Add%3CMemOp,+Imm16%3E-for-Asm"],[15,"impl-Add%3CReg32,+Reg32%3E-for-Asm"],[16,"impl-Add%3CMemOp,+Reg16%3E-for-Asm"],[17,"impl-Add%3CReg64,+Reg64%3E-for-Asm"],[65,"impl-Dec%3CReg32%3E-for-Asm"],[66,"impl-Dec%3CReg64%3E-for-Asm"],[88,"impl-From%3Cu8%3E-for-Imm8"],[89,"impl-From%3Ci8%3E-for-Imm8"],[90,"impl-From%3Cu16%3E-for-Imm16"],[91,"impl-From%3Ci8%3E-for-Imm16"],[92,"impl-From%3Cu8%3E-for-Imm16"],[94,"impl-From%3Ci16%3E-for-Imm16"],[95,"impl-From%3Ci8%3E-for-Imm32"],[97,"impl-From%3Ci16%3E-for-Imm32"],[98,"impl-From%3Cu16%3E-for-Imm32"],[99,"impl-From%3Cu8%3E-for-Imm32"],[100,"impl-From%3Ci32%3E-for-Imm32"],[101,"impl-From%3Cu32%3E-for-Imm32"],[103,"impl-From%3Ci16%3E-for-Imm64"],[104,"impl-From%3Ci64%3E-for-Imm64"],[105,"impl-From%3Ci8%3E-for-Imm64"],[106,"impl-From%3Cu32%3E-for-Imm64"],[107,"impl-From%3Ci32%3E-for-Imm64"],[108,"impl-From%3Cusize%3E-for-Imm64"],[109,"impl-From%3Cu64%3E-for-Imm64"],[110,"impl-From%3Cu8%3E-for-Imm64"],[111,"impl-From%3Cisize%3E-for-Imm64"],[112,"impl-From%3Cu16%3E-for-Imm64"],[134,"impl-Mov%3CReg64,+MemOp%3E-for-Asm"],[135,"impl-Mov%3CReg64,+Reg64%3E-for-Asm"],[136,"impl-Mov%3CReg16,+Reg16%3E-for-Asm"],[137,"impl-Mov%3CMemOp,+Reg32%3E-for-Asm"],[138,"impl-Mov%3CReg8,+Imm8%3E-for-Asm"],[139,"impl-Mov%3CMemOp,+Reg16%3E-for-Asm"],[140,"impl-Mov%3CReg32,+Imm32%3E-for-Asm"],[141,"impl-Mov%3CMemOp,+Reg8%3E-for-Asm"],[142,"impl-Mov%3CMemOp,+Reg64%3E-for-Asm"],[143,"impl-Mov%3CReg8,+MemOp%3E-for-Asm"],[144,"impl-Mov%3CMemOp,+Imm16%3E-for-Asm"],[145,"impl-Mov%3CReg8,+Reg8%3E-for-Asm"],[146,"impl-Mov%3CReg64,+Imm64%3E-for-Asm"],[147,"impl-Mov%3CReg16,+MemOp%3E-for-Asm"],[148,"impl-Mov%3CReg32,+MemOp%3E-for-Asm"],[149,"impl-Mov%3CReg16,+Imm16%3E-for-Asm"],[150,"impl-Mov%3CReg32,+Reg32%3E-for-Asm"],[155,"impl-Pop%3CReg16%3E-for-Asm"],[156,"impl-Pop%3CReg64%3E-for-Asm"],[157,"impl-Push%3CReg64%3E-for-Asm"],[158,"impl-Push%3CReg16%3E-for-Asm"],[204,"impl-Test%3CMemOp,+Imm16%3E-for-Asm"],[205,"impl-Test%3CReg64,+Reg64%3E-for-Asm"],[206,"impl-Test%3CReg32,+Reg32%3E-for-Asm"]]}],\ +["juicebox_asm",{"doc":"A simple <code>x64</code> jit assembler with a minimal runtime to …","t":"FFFFFPPFGGGGGFNNNNNPPPPNPNNNNNNNNNNNNNNNNNNNNNNNNPPPNPPNNNNNNNNNPNNPPPPNNNPPPPPPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPNPPPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNKKKKKKKKKKKMMMMMMMMMMM","n":["Asm","Imm16","Imm32","Imm64","Imm8","Indirect","IndirectDisp","Label","MemOp","Reg16","Reg32","Reg64","Reg8","Runtime","add","add","add","add","add_code","ah","al","ax","bh","bind","bl","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","bp","bpl","bx","call","ch","cl","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","cmp","cx","dec","dec","dh","di","dil","dl","drop","drop","dump","dx","eax","ebp","ebx","ecx","edi","edx","esi","esp","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","insn","into","into","into","into","into","into","into","into","into","into","into","into","into_code","jmp","jnz","jz","mov","mov","mov","mov","mov","mov","mov","mov","mov","mov","mov","mov","mov","mov","mov","mov","mov","new","new","new","nop","pop","pop","push","push","r10","r10d","r10l","r10w","r11","r11d","r11l","r11w","r12","r12d","r12l","r12w","r13","r13d","r13l","r13w","r14","r14d","r14l","r14w","r15","r15d","r15l","r15w","r8","r8d","r8l","r8w","r9","r9d","r9l","r9w","rax","rbp","rbx","rcx","rdi","rdx","ret","rsi","rsp","si","sil","sp","spl","test","test","test","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","with_profile","Add","Call","Cmp","Dec","Jmp","Jnz","Jz","Mov","Pop","Push","Test","add","call","cmp","dec","jmp","jnz","jz","mov","pop","push","test"],"q":[[0,"juicebox_asm"],[248,"juicebox_asm::insn"],[270,"core::convert"],[271,"alloc::vec"],[272,"core::result"],[273,"core::any"]],"d":["<code>x64</code> jit assembler.","Type representing a 16 bit immediate.","Type representing a 32 bit immediate.","Type representing a 64 bit immediate.","Type representing an 8 bit immediate.","An indirect memory operand, eg <code>mov [rax], rcx</code>.","An indirect memory operand with additional displacement, …","A label which is used as target for jump instructions.","Type representing a memory operand.","Definition of 16 bit registers.","Definition of 32 bit registers.","Definition of 64 bit registers.","Definition of 8 bit registers.","A simple <code>mmap</code>ed runtime with executable pages.","","","","","Add the block of <code>code</code> to the runtime and a get function …","","","","","Bind the Label to the current location.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Unmaps the code page. This invalidates all the function …","Dump the code added so far to the runtime into a file …","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","Returns the argument unchanged.","","","Returns the argument unchanged.","","","","","","Returns the argument unchanged.","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Trait definitions of various instructions.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Consume the assembler and get the emitted code.","","","","","","","","","","","","","","","","","","","","","Create a new <code>x64</code> jit assembler.","Create a new <code>unbound</code> Label.","Create a new Runtime.","Emit a <code>nop</code> instruction.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Emit a <code>ret</code> instruction.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Create a new Runtime which also generates static perf …","Trait for <code>add</code> instruction kinds.","Trait for <code>call</code> instruction kinds.","Trait for <code>cmp</code> instruction kinds.","Trait for <code>dec</code> instruction kinds.","Trait for <code>jmp</code> instruction kinds.","Trait for <code>jnz</code> instruction kinds.","Trait for <code>jz</code> instruction kinds.","Trait for <code>mov</code> instruction kinds.","Trait for <code>pop</code> instruction kinds.","Trait for <code>push</code> instruction kinds.","Trait for <code>test</code> instruction kinds.","Emit an add instruction.","Emit a call instruction.","Emit a compare instruction.","Emit a decrement instruction.","Emit an unconditional jump instruction.","Emit a conditional jump if not zero instruction (<code>ZF = 0</code>).","Emit a conditional jump if zero instruction (<code>ZF = 1</code>).","Emit an move instruction.","Emit a pop instruction.","Emit a push instruction.","Emit a logical compare instruction."],"i":[0,0,0,0,0,2,2,0,0,0,0,0,0,0,1,1,1,1,8,13,13,6,13,1,13,1,12,8,2,14,3,18,21,7,5,6,13,1,12,8,2,14,3,18,21,7,5,6,13,6,13,6,1,13,13,7,5,6,13,7,5,6,13,1,6,1,1,13,6,13,13,12,8,8,6,5,5,5,5,5,5,5,5,1,12,8,2,14,14,14,3,3,3,3,3,18,18,18,18,18,18,18,21,21,21,21,21,21,21,21,21,21,21,7,5,6,13,0,1,12,8,2,14,3,18,21,7,5,6,13,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,8,1,1,1,1,1,7,5,13,6,7,5,13,6,7,5,13,6,7,5,13,6,7,5,13,6,7,5,13,6,7,5,13,6,7,5,13,6,7,7,7,7,7,7,1,7,7,6,13,6,13,1,1,1,7,5,6,13,1,12,8,2,14,3,18,21,7,5,6,13,1,12,8,2,14,3,18,21,7,5,6,13,1,12,8,2,14,3,18,21,7,5,6,13,8,0,0,0,0,0,0,0,0,0,0,0,29,30,31,32,33,34,35,36,37,38,39],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[1,2,3],4],[[1,5,5],4],[[1,2,6],4],[[1,7,7],4],[[8,-1],-2,[[11,[[10,[9]]]]],[]],0,0,0,0,[[1,12],4],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,[[1,7],4],0,0,[7,7],[5,5],[6,6],[13,13],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[1,2,3],4],0,[[1,5],4],[[1,7],4],0,0,0,0,[12,4],[8,4],[8,4],0,0,0,0,0,0,0,0,0,[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[9,14],[15,14],[16,3],[15,3],[9,3],[-1,-1,[]],[17,3],[15,18],[-1,-1,[]],[17,18],[16,18],[9,18],[19,18],[20,18],[-1,-1,[]],[17,21],[22,21],[15,21],[20,21],[19,21],[23,21],[24,21],[9,21],[25,21],[16,21],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[1,[[26,[9]]]],[[1,12],4],[[1,12],4],[[1,12],4],[[1,7,2],4],[[1,7,7],4],[[1,6,6],4],[[1,2,5],4],[[1,13,14],4],[[1,2,6],4],[[1,5,18],4],[[1,2,13],4],[[1,2,7],4],[[1,13,2],4],[[1,2,3],4],[[1,13,13],4],[[1,7,21],4],[[1,6,2],4],[[1,5,2],4],[[1,6,3],4],[[1,5,5],4],[[],1],[[],12],[[],8],[1,4],[[1,6],4],[[1,7],4],[[1,7],4],[[1,6],4],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[1,4],0,0,0,0,0,0,[[1,2,3],4],[[1,7,7],4],[[1,5,5],4],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,[[27,[-2]]],[],[]],[-1,28,[]],[-1,28,[]],[-1,28,[]],[-1,28,[]],[-1,28,[]],[-1,28,[]],[-1,28,[]],[-1,28,[]],[-1,28,[]],[-1,28,[]],[-1,28,[]],[-1,28,[]],[[],8],0,0,0,0,0,0,0,0,0,0,0,[[29,-1,-2],4,[],[]],[[30,-1],4,[]],[[31,-1,-2],4,[],[]],[[32,-1],4,[]],[[33,-1],4,[]],[[34,-1],4,[]],[[35,-1],4,[]],[[36,-1,-2],4,[],[]],[[37,-1],4,[]],[[38,-1],4,[]],[[39,-1,-2],4,[],[]]],"c":[],"p":[[5,"Asm",0],[6,"MemOp",0],[5,"Imm16",0],[1,"tuple"],[6,"Reg32",0],[6,"Reg16",0],[6,"Reg64",0],[5,"Runtime",0],[1,"u8"],[1,"slice"],[10,"AsRef",270],[5,"Label",0],[6,"Reg8",0],[5,"Imm8",0],[1,"i8"],[1,"u16"],[1,"i16"],[5,"Imm32",0],[1,"i32"],[1,"u32"],[5,"Imm64",0],[1,"i64"],[1,"usize"],[1,"u64"],[1,"isize"],[5,"Vec",271],[6,"Result",272],[5,"TypeId",273],[10,"Add",248],[10,"Call",248],[10,"Cmp",248],[10,"Dec",248],[10,"Jmp",248],[10,"Jnz",248],[10,"Jz",248],[10,"Mov",248],[10,"Pop",248],[10,"Push",248],[10,"Test",248]],"b":[[14,"impl-Add%3CMemOp,+Imm16%3E-for-Asm"],[15,"impl-Add%3CReg32,+Reg32%3E-for-Asm"],[16,"impl-Add%3CMemOp,+Reg16%3E-for-Asm"],[17,"impl-Add%3CReg64,+Reg64%3E-for-Asm"],[65,"impl-Dec%3CReg32%3E-for-Asm"],[66,"impl-Dec%3CReg64%3E-for-Asm"],[88,"impl-From%3Cu8%3E-for-Imm8"],[89,"impl-From%3Ci8%3E-for-Imm8"],[90,"impl-From%3Cu16%3E-for-Imm16"],[91,"impl-From%3Ci8%3E-for-Imm16"],[92,"impl-From%3Cu8%3E-for-Imm16"],[94,"impl-From%3Ci16%3E-for-Imm16"],[95,"impl-From%3Ci8%3E-for-Imm32"],[97,"impl-From%3Ci16%3E-for-Imm32"],[98,"impl-From%3Cu16%3E-for-Imm32"],[99,"impl-From%3Cu8%3E-for-Imm32"],[100,"impl-From%3Ci32%3E-for-Imm32"],[101,"impl-From%3Cu32%3E-for-Imm32"],[103,"impl-From%3Ci16%3E-for-Imm64"],[104,"impl-From%3Ci64%3E-for-Imm64"],[105,"impl-From%3Ci8%3E-for-Imm64"],[106,"impl-From%3Cu32%3E-for-Imm64"],[107,"impl-From%3Ci32%3E-for-Imm64"],[108,"impl-From%3Cusize%3E-for-Imm64"],[109,"impl-From%3Cu64%3E-for-Imm64"],[110,"impl-From%3Cu8%3E-for-Imm64"],[111,"impl-From%3Cisize%3E-for-Imm64"],[112,"impl-From%3Cu16%3E-for-Imm64"],[134,"impl-Mov%3CReg64,+MemOp%3E-for-Asm"],[135,"impl-Mov%3CReg64,+Reg64%3E-for-Asm"],[136,"impl-Mov%3CReg16,+Reg16%3E-for-Asm"],[137,"impl-Mov%3CMemOp,+Reg32%3E-for-Asm"],[138,"impl-Mov%3CReg8,+Imm8%3E-for-Asm"],[139,"impl-Mov%3CMemOp,+Reg16%3E-for-Asm"],[140,"impl-Mov%3CReg32,+Imm32%3E-for-Asm"],[141,"impl-Mov%3CMemOp,+Reg8%3E-for-Asm"],[142,"impl-Mov%3CMemOp,+Reg64%3E-for-Asm"],[143,"impl-Mov%3CReg8,+MemOp%3E-for-Asm"],[144,"impl-Mov%3CMemOp,+Imm16%3E-for-Asm"],[145,"impl-Mov%3CReg8,+Reg8%3E-for-Asm"],[146,"impl-Mov%3CReg64,+Imm64%3E-for-Asm"],[147,"impl-Mov%3CReg16,+MemOp%3E-for-Asm"],[148,"impl-Mov%3CReg32,+MemOp%3E-for-Asm"],[149,"impl-Mov%3CReg16,+Imm16%3E-for-Asm"],[150,"impl-Mov%3CReg32,+Reg32%3E-for-Asm"],[155,"impl-Pop%3CReg16%3E-for-Asm"],[156,"impl-Pop%3CReg64%3E-for-Asm"],[157,"impl-Push%3CReg64%3E-for-Asm"],[158,"impl-Push%3CReg16%3E-for-Asm"],[204,"impl-Test%3CMemOp,+Imm16%3E-for-Asm"],[205,"impl-Test%3CReg64,+Reg64%3E-for-Asm"],[206,"impl-Test%3CReg32,+Reg32%3E-for-Asm"]]}],\ ["tiny_vm",{"doc":"TinyVm example.","t":"PPPPPPPFPPPFPGGFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHHHNNNNNNNNNNNNNNNNNNNNNNN","n":["A","Add","Addi","B","Branch","BranchZero","C","Fixup","Halt","Load","LoadImm","PhysAddr","Store","TinyInsn","TinyReg","TinyVm","bind","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","dump","eq","eq","fmt","fmt","from","from","from","from","from","interp","into","into","into","into","into","into","jit","make_tinyvm_fib","make_tinyvm_jit_perf","make_tinyvm_jit_test","new","new","read_mem","read_reg","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","write_mem","write_reg"],"q":[[0,"tiny_vm"],[75,"alloc::vec"],[76,"core::fmt"],[77,"core::fmt"],[78,"core::any"]],"d":["","Add the register to the register <code>reg1 += reg2</code>.","Add the immediate to the register <code>reg += imm</code>.","","Jump unconditional (absolute addressing) <code>pc = disp</code>.","Jump if the register is zero (absolute addressing) …","","A minial fixup utility to implement jump labels when …","Halt the VM.","Load a value from the memory (absolute addressing) into …","Load the immediate value into the register <code>reg = imm</code>.","A guest physical address.","Store a value from the register into the memory (absolute …","The instructions for the <code>TinyVm</code>.","The registers for the <code>TinyVm</code>.","The <code>TinyVm</code> virtual machine state.","Bind the <code>Fixup</code> to the current location of <code>prog</code> and resolve …","","","","","","","","","","","","","","","Dump the VM state to stdout.","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Run in interpreter mode until the next <code>TinyInsn::Halt</code> …","","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Run in JIT mode until the next <code>TinyInsn::Halt</code> instruction …","Generate a guest program to compute the fiibonacci …","Generate a simple count down loop to crunch some …","Generate a test program for the jit.","Create a new <code>TinyVm</code> and initialize the instruction memory …","Create a new <code>Fixup</code> at the current pc.","Read guest data memory.","Read guest register.","","","","","","","","","","","","","","","","","","Write guest data memory.","Write guest register."],"i":[5,2,2,5,2,2,5,0,2,2,2,0,2,0,0,0,1,10,6,1,5,2,10,6,1,5,2,5,2,5,2,6,5,2,5,2,10,6,1,5,2,6,10,10,6,1,5,2,6,0,0,0,6,1,6,6,5,2,10,6,1,5,2,10,6,1,5,2,10,6,1,5,2,6,6],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[1,[3,[2]]],4],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[5,5],[2,2],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[6,4],[[5,5],7],[[2,2],7],[[5,8],9],[[2,8],9],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[6,4],[10,11],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[6,4],[12,[[3,[2]]]],[[],[[3,[2]]]],[[],[[3,[2]]]],[[[3,[2]]],6],[11,1],[[6,10],12],[[6,5],12],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[13,[-2]]],[],[]],[-1,[[13,[-2]]],[],[]],[-1,[[13,[-2]]],[],[]],[-1,[[13,[-2]]],[],[]],[-1,[[13,[-2]]],[],[]],[-1,[[13,[-2]]],[],[]],[-1,[[13,[-2]]],[],[]],[-1,[[13,[-2]]],[],[]],[-1,[[13,[-2]]],[],[]],[-1,[[13,[-2]]],[],[]],[-1,14,[]],[-1,14,[]],[-1,14,[]],[-1,14,[]],[-1,14,[]],[[6,10,12],4],[[6,5,12],4]],"c":[],"p":[[5,"Fixup",0],[6,"TinyInsn",0],[5,"Vec",75],[1,"tuple"],[6,"TinyReg",0],[5,"TinyVm",0],[1,"bool"],[5,"Formatter",76],[8,"Result",76],[5,"PhysAddr",0],[1,"usize"],[1,"u16"],[6,"Result",77],[5,"TypeId",78]],"b":[]}]\ ]')); if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; diff --git a/src/juicebox_asm/rt.rs.html b/src/juicebox_asm/rt.rs.html index d58d3e7..eecdd6f 100644 --- a/src/juicebox_asm/rt.rs.html +++ b/src/juicebox_asm/rt.rs.html @@ -259,6 +259,15 @@ <a href="#258" id="258">258</a> <a href="#259" id="259">259</a> <a href="#260" id="260">260</a> +<a href="#261" id="261">261</a> +<a href="#262" id="262">262</a> +<a href="#263" id="263">263</a> +<a href="#264" id="264">264</a> +<a href="#265" id="265">265</a> +<a href="#266" id="266">266</a> +<a href="#267" id="267">267</a> +<a href="#268" id="268">268</a> +<a href="#269" id="269">269</a> </pre></div><pre class="rust"><code><span class="doccomment">//! Simple `mmap`ed runtime. //! //! This runtime supports adding code to executable pages and turn the added code into user @@ -351,7 +360,16 @@ } } - <span class="kw">pub fn </span>with_profile() -> Runtime { + <span class="doccomment">/// Create a new [Runtime] which also generates static perf metat data. + /// + /// For each function added to the [Runtime], an entry will be generated in the + /// `/tmp/perf-<PID>.map` file, which `perf report` uses to symbolicate unknown addresses. + /// This is applicable for static runtimes only. + /// + /// # Panics + /// + /// Panics if the `mmap` call fails. + </span><span class="kw">pub fn </span>with_profile() -> Runtime { <span class="kw">let </span><span class="kw-2">mut </span>rt = Runtime::new(); rt.perf = <span class="prelude-val">Some</span>(perf::PerfMap::new()); rt |