diff options
author | johannst <johannst@users.noreply.github.com> | 2024-12-19 17:29:34 +0000 |
---|---|---|
committer | johannst <johannst@users.noreply.github.com> | 2024-12-19 17:29:34 +0000 |
commit | 779f16ef901642de5012297734af0e20f36767cf (patch) | |
tree | d377b89970000afbc064c36a8238af04860b2c9f | |
parent | ff6df70f5e8650a98fe076515a8c5b0c8885895c (diff) | |
download | juicebox-asm-779f16ef901642de5012297734af0e20f36767cf.tar.gz juicebox-asm-779f16ef901642de5012297734af0e20f36767cf.zip |
deploy: f76bf4e81d6b039007715ca0af3ad3a5d043367f
-rw-r--r-- | add/index.html | 2 | ||||
-rw-r--r-- | crates.js | 4 | ||||
-rw-r--r-- | fib/index.html | 2 | ||||
-rw-r--r-- | gen/all.html | 1 | ||||
-rw-r--r-- | gen/index.html | 4 | ||||
-rw-r--r-- | gen/sidebar-items.js | 1 | ||||
-rw-r--r-- | help.html | 2 | ||||
-rw-r--r-- | search-index.js | 4 | ||||
-rw-r--r-- | search.desc/gen/gen-desc-0-.js | 1 | ||||
-rw-r--r-- | settings.html | 2 | ||||
-rw-r--r-- | src-files.js | 4 | ||||
-rw-r--r-- | src/add/add.rs.html | 12 | ||||
-rw-r--r-- | src/fib/fib.rs.html | 14 | ||||
-rw-r--r-- | src/gen/gen.rs.html | 87 |
14 files changed, 117 insertions, 23 deletions
diff --git a/add/index.html b/add/index.html index df64156..aad4924 100644 --- a/add/index.html +++ b/add/index.html @@ -1,4 +1,4 @@ -<!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="Add example."><title>add - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-b0742ba02757f159.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="add" data-themes="" data-resource-suffix="" data-rustdoc-version="1.83.0 (90b35a623 2024-11-26)" data-channel="1.83.0" data-search-js="search-f0d225181b97f9a4.js" data-settings-js="settings-805db61a62df4bd2.js" ><script src="../static.files/storage-1d39b6787ed640ff.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-f070b9041d14864c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-0111fcff984fae8f.css"></noscript><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 mod crate"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../add/index.html">add</a><span class="version">0.1.0</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Crate <span>add</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/add/add.rs.html#1-38">source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Add example.</p> +<!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="Add example."><title>add - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-b0742ba02757f159.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="add" data-themes="" data-resource-suffix="" data-rustdoc-version="1.83.0 (90b35a623 2024-11-26)" data-channel="1.83.0" data-search-js="search-f0d225181b97f9a4.js" data-settings-js="settings-805db61a62df4bd2.js" ><script src="../static.files/storage-1d39b6787ed640ff.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-f070b9041d14864c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-0111fcff984fae8f.css"></noscript><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 mod crate"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../add/index.html">add</a><span class="version">0.1.0</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Crate <span>add</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/add/add.rs.html#1-39">source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Add example.</p> <p>Jit compile a function at runtime (generate native host code) which calls a function defined in the example based on the SystemV abi to demonstrate the <a href="../juicebox_asm/index.html" title="mod juicebox_asm"><code>juicebox_asm</code></a> crate.</p> </div></details></section></div></main></body></html>
\ No newline at end of file @@ -1,2 +1,2 @@ -window.ALL_CRATES = ["add","bf","fib","juicebox_asm","tiny_vm"]; -//{"start":21,"fragment_lengths":[5,5,6,15,10]}
\ No newline at end of file +window.ALL_CRATES = ["add","bf","fib","gen","juicebox_asm","tiny_vm"]; +//{"start":21,"fragment_lengths":[5,5,6,6,15,10]}
\ No newline at end of file diff --git a/fib/index.html b/fib/index.html index 3fcbd55..72e3d45 100644 --- a/fib/index.html +++ b/fib/index.html @@ -1,4 +1,4 @@ -<!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="Fibonacci example."><title>fib - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-b0742ba02757f159.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="fib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.83.0 (90b35a623 2024-11-26)" data-channel="1.83.0" data-search-js="search-f0d225181b97f9a4.js" data-settings-js="settings-805db61a62df4bd2.js" ><script src="../static.files/storage-1d39b6787ed640ff.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-f070b9041d14864c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-0111fcff984fae8f.css"></noscript><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 mod crate"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../fib/index.html">fib</a><span class="version">0.1.0</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Crate <span>fib</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/fib/fib.rs.html#1-79">source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Fibonacci example.</p> +<!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="Fibonacci example."><title>fib - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-b0742ba02757f159.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="fib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.83.0 (90b35a623 2024-11-26)" data-channel="1.83.0" data-search-js="search-f0d225181b97f9a4.js" data-settings-js="settings-805db61a62df4bd2.js" ><script src="../static.files/storage-1d39b6787ed640ff.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-f070b9041d14864c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-0111fcff984fae8f.css"></noscript><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 mod crate"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../fib/index.html">fib</a><span class="version">0.1.0</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Crate <span>fib</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/fib/fib.rs.html#1-78">source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Fibonacci example.</p> <p>Jit compile a function at runtime (generate native host code) to compute the fibonacci sequence to demonstrate the <a href="../juicebox_asm/index.html" title="mod juicebox_asm"><code>juicebox_asm</code></a> crate.</p> </div></details></section></div></main></body></html>
\ No newline at end of file diff --git a/gen/all.html b/gen/all.html new file mode 100644 index 0000000..1e0c258 --- /dev/null +++ b/gen/all.html @@ -0,0 +1 @@ +<!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="List of all items in this crate"><title>List of all items in this crate</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-b0742ba02757f159.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="gen" data-themes="" data-resource-suffix="" data-rustdoc-version="1.83.0 (90b35a623 2024-11-26)" data-channel="1.83.0" data-search-js="search-f0d225181b97f9a4.js" data-settings-js="settings-805db61a62df4bd2.js" ><script src="../static.files/storage-1d39b6787ed640ff.js"></script><script defer src="../static.files/main-f070b9041d14864c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-0111fcff984fae8f.css"></noscript><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 mod sys"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../gen/index.html">gen</a><span class="version">0.1.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><h1>List of all items</h1></section></div></main></body></html>
\ No newline at end of file diff --git a/gen/index.html b/gen/index.html new file mode 100644 index 0000000..e79ab91 --- /dev/null +++ b/gen/index.html @@ -0,0 +1,4 @@ +<!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="Add example."><title>gen - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-b0742ba02757f159.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="gen" data-themes="" data-resource-suffix="" data-rustdoc-version="1.83.0 (90b35a623 2024-11-26)" data-channel="1.83.0" data-search-js="search-f0d225181b97f9a4.js" data-settings-js="settings-805db61a62df4bd2.js" ><script src="../static.files/storage-1d39b6787ed640ff.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-f070b9041d14864c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-0111fcff984fae8f.css"></noscript><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 mod crate"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../gen/index.html">gen</a><span class="version">0.1.0</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Crate <span>gen</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/gen/gen.rs.html#1-43">source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Add example.</p> +<p>Jit compile a function at runtime (generate native host code) which calls a function defined in +the example based on the SystemV abi to demonstrate the <a href="../juicebox_asm/index.html" title="mod juicebox_asm"><code>juicebox_asm</code></a> crate.</p> +</div></details></section></div></main></body></html>
\ No newline at end of file diff --git a/gen/sidebar-items.js b/gen/sidebar-items.js new file mode 100644 index 0000000..5244ce0 --- /dev/null +++ b/gen/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {};
\ No newline at end of file @@ -1 +1 @@ -<!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="Documentation for Rustdoc"><title>Help</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/${f}">`).join(""))</script><link rel="stylesheet" href="./static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="./static.files/rustdoc-b0742ba02757f159.css"><meta name="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="bf" data-themes="" data-resource-suffix="" data-rustdoc-version="1.83.0 (90b35a623 2024-11-26)" data-channel="1.83.0" data-search-js="search-f0d225181b97f9a4.js" data-settings-js="settings-805db61a62df4bd2.js" ><script src="./static.files/storage-1d39b6787ed640ff.js"></script><script defer src="./static.files/main-f070b9041d14864c.js"></script><noscript><link rel="stylesheet" href="./static.files/noscript-0111fcff984fae8f.css"></noscript><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 mod sys"><!--[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" title="show sidebar"></button><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2><a href="./index.html">Rustdoc</a><span class="version">1.83.0</span></h2></div><div class="version">(90b35a623 2024-11-26)</div><h2 class="location">Help</h2><div class="sidebar-elems"></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Rustdoc help</h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section><p>You need to enable JavaScript to use keyboard commands or search.</p><p>For more information, browse the <a href="https://doc.rust-lang.org/rustdoc/">rustdoc handbook</a>.</p></section></noscript></section></div></main></body></html>
\ No newline at end of file +<!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="Documentation for Rustdoc"><title>Help</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/${f}">`).join(""))</script><link rel="stylesheet" href="./static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="./static.files/rustdoc-b0742ba02757f159.css"><meta name="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="fib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.83.0 (90b35a623 2024-11-26)" data-channel="1.83.0" data-search-js="search-f0d225181b97f9a4.js" data-settings-js="settings-805db61a62df4bd2.js" ><script src="./static.files/storage-1d39b6787ed640ff.js"></script><script defer src="./static.files/main-f070b9041d14864c.js"></script><noscript><link rel="stylesheet" href="./static.files/noscript-0111fcff984fae8f.css"></noscript><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 mod sys"><!--[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" title="show sidebar"></button><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2><a href="./index.html">Rustdoc</a><span class="version">1.83.0</span></h2></div><div class="version">(90b35a623 2024-11-26)</div><h2 class="location">Help</h2><div class="sidebar-elems"></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Rustdoc help</h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section><p>You need to enable JavaScript to use keyboard commands or search.</p><p>For more information, browse the <a href="https://doc.rust-lang.org/rustdoc/">rustdoc handbook</a>.</p></section></noscript></section></div></main></body></html>
\ No newline at end of file diff --git a/search-index.js b/search-index.js index 293232d..6ec8462 100644 --- a/search-index.js +++ b/search-index.js @@ -1,4 +1,4 @@ -var searchIndex = new Map(JSON.parse('[["add",{"t":"","n":[],"q":[],"i":"","f":"","D":"b","p":[],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OjAAAAAAAAA="}],["bf",{"t":"","n":[],"q":[],"i":"","f":"","D":"b","p":[],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OjAAAAAAAAA="}],["fib",{"t":"","n":[],"q":[],"i":"","f":"","D":"b","p":[],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OjAAAAAAAAA="}],["juicebox_asm",{"t":"FFFFFFFFFFGGGGFNNNNNNNNNNNPPPPNPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNPPPNPPNNNNNNNNNNNNNNNNNPNNNNNNPPPPNNNPPPPPPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPNPPPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNKKKKKKKKKKKKKKKKMMMMMMMMMMMMMMMM","n":["Asm","Imm16","Imm32","Imm64","Imm8","Label","Mem16","Mem32","Mem64","Mem8","Reg16","Reg32","Reg64","Reg8","Runtime","add","","","","","","","","","","add_code","ah","al","ax","bh","bind","bl","borrow","","","","","","","","","","","","","","","borrow_mut","","","","","","","","","","","","","","","bp","bpl","bx","call","ch","cl","clone","","","","clone_into","","","","clone_to_uninit","","","","cmovnz","cmovz","cmp","","","cx","dec","","","","","","dh","di","dil","dl","drop","","dump","dx","eax","ebp","ebx","ecx","edi","edx","esi","esp","from","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","inc","","","","","","indirect","","","","indirect_base_index","","","","indirect_disp","","","","insn","into","","","","","","","","","","","","","","","into_code","jmp","jnz","jz","mov","","","","","","","","","","","","","","","","","new","","","nop","pop","","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","sub","","test","","","to_owned","","","","try_from","","","","","","","","","","","","","","","try_into","","","","","","","","","","","","","","","type_id","","","","","","","","","","","","","","","with_profile","xor","Add","Call","Cmovnz","Cmovz","Cmp","Dec","Inc","Jmp","Jnz","Jz","Mov","Pop","Push","Sub","Test","Xor","add","call","cmovnz","cmovz","cmp","dec","inc","jmp","jnz","jz","mov","pop","push","sub","test","xor"],"q":[[0,"juicebox_asm"],[309,"juicebox_asm::insn"],[341,"juicebox_asm::asm"],[342,"juicebox_asm::reg"],[343,"juicebox_asm::mem"],[344,"juicebox_asm::imm"],[345,"juicebox_asm::rt"],[346,"core::convert"],[347,"juicebox_asm::label"],[348,"alloc::vec"],[349,"core::result"],[350,"core::any"]],"i":"```````````````d000000000AlBf0Aj1313Bd3A`AhBnCfnAbAdjhAf;<>:=9876543210;<;<;><<10;<10;<10;<>>>>>;>>>>>><;<<:==;00000000>:=99988888777777766666666666543210;<>>>>>>543254325432`>:=9876543210;<>>>>>>>>>>>>>>>>>>>>>>:=>>>>>10<;10<;10<;10<;10<;10<;10<;10<;111111>11;<;<>>>>>10;<>:=9876543210;<>:=9876543210;<>:=9876543210;<=>````````````````DdDfDhDjDlDnE`EbEdEfEhEjElEnF`Fb","f":"```````````````{{{f{bd}}hj}l}{{{f{bd}}hh}l}{{{f{bd}}nA`}l}{{{f{bd}}AbA`}l}{{{f{bd}}AdA`}l}{{{f{bd}}jA`}l}{{{f{bd}}jh}l}{{{f{bd}}AfAf}l}{{{f{bd}}AbAh}l}{{{f{bd}}AbAj}l}{{{f{bAl}}c}e{{Bb{{B`{An}}}}}{}}````{{{f{bd}}{f{bBd}}}l}`{f{{f{c}}}{}}00000000000000{{{f{b}}}{{f{bc}}}{}}00000000000000```{{{f{bd}}h}l}``{{{f{h}}}h}{{{f{Af}}}Af}{{{f{Aj}}}Aj}{{{f{Bf}}}Bf}{{f{f{bc}}}l{}}000{fl}000{{{f{bd}}hh}l}00={{{f{bd}}nA`}l}`{{{f{bd}}Af}l}{{{f{bd}}j}l}:{{{f{bd}}Ad}l}{{{f{bd}}n}l}{{{f{bd}}Ab}l}````{{{f{bBd}}}l}{{{f{bAl}}}l}{{{f{Al}}}l}`````````{cc{}}000{AnA`}{BhA`}{BjAh}3{AnAh}{BlAh}{BhAh}{AnBn}{BjBn}8{C`Bn}{CbBn}{BlBn}{BhBn}<{CdCf}{ChCf}{C`Cf}{CbCf}{BlCf}{BjCf}{AnCf}{BhCf}{CjCf}{ClCf}{cc{}}0000000{{{f{bd}}Af}l}{{{f{bd}}n}l}{{{f{bd}}Ab}l}{{{f{bd}}Ad}l}{{{f{bd}}j}l}{{{f{bd}}h}l}{hn}{hAb}{hAd}{hj}{{hh}n}{{hh}Ab}{{hh}Ad}{{hh}j}{{hCb}n}{{hCb}Ab}{{hCb}Ad}{{hCb}j}`{{}c{}}00000000000000{d{{Cn{An}}}}{{{f{bd}}{f{bBd}}}l}00{{{f{bd}}nBf}l}{{{f{bd}}AjAh}l}{{{f{bd}}AbAh}l}{{{f{bd}}AbAj}l}{{{f{bd}}AdAf}l}{{{f{bd}}jh}l}{{{f{bd}}BfBf}l}{{{f{bd}}AjAj}l}{{{f{bd}}AfAf}l}{{{f{bd}}BfA`}l}{{{f{bd}}hj}l}{{{f{bd}}AfAd}l}{{{f{bd}}AjAb}l}{{{f{bd}}Bfn}l}{{{f{bd}}hCf}l}{{{f{bd}}AfBn}l}{{{f{bd}}hh}l}{{}d}{{}Bd}{{}Al}{{{f{bd}}}l}{{{f{bd}}h}l}{{{f{bd}}Aj}l}10``````````````````````````````````````2``````6{{{f{bd}}nA`}l}?7{{{f{bd}}AbAh}l}{fc{}}000{c{{D`{e}}}{}{}}00000000000000{{}{{D`{c}}}{}}00000000000000{fDb}000000000000009<````````````````{{{f{bDd}}ce}l{}{}}{{{f{bDf}}c}l{}}{{{f{bDh}}ce}l{}{}}{{{f{bDj}}ce}l{}{}}{{{f{bDl}}ce}l{}{}}{{{f{bDn}}c}l{}}{{{f{bE`}}c}l{}}{{{f{bEb}}c}l{}}{{{f{bEd}}c}l{}}{{{f{bEf}}c}l{}}{{{f{bEh}}ce}l{}{}}{{{f{bEj}}c}l{}}{{{f{bEl}}c}l{}}{{{f{bEn}}ce}l{}{}}{{{f{bF`}}ce}l{}{}}{{{f{bFb}}ce}l{}{}}","D":"Ll","p":[[0,"mut"],[5,"Asm",0,341],[1,"reference"],[6,"Reg64",0,342],[5,"Mem64",0,343],[1,"unit"],[5,"Mem8",0,343],[5,"Imm8",0,344],[5,"Mem16",0,343],[5,"Mem32",0,343],[6,"Reg32",0,342],[5,"Imm16",0,344],[6,"Reg16",0,342],[5,"Runtime",0,345],[1,"u8"],[1,"slice"],[10,"AsRef",346],[5,"Label",0,347],[6,"Reg8",0,342],[1,"i8"],[1,"i16"],[1,"u16"],[5,"Imm32",0,344],[1,"u32"],[1,"i32"],[1,"u64"],[5,"Imm64",0,344],[1,"i64"],[1,"usize"],[1,"isize"],[5,"Vec",348],[6,"Result",349],[5,"TypeId",350],[10,"Add",309],[10,"Call",309],[10,"Cmovnz",309],[10,"Cmovz",309],[10,"Cmp",309],[10,"Dec",309],[10,"Inc",309],[10,"Jmp",309],[10,"Jnz",309],[10,"Jz",309],[10,"Mov",309],[10,"Pop",309],[10,"Push",309],[10,"Sub",309],[10,"Test",309],[10,"Xor",309]],"r":[[0,341],[1,344],[2,344],[3,344],[4,344],[5,347],[6,343],[7,343],[8,343],[9,343],[10,342],[11,342],[12,342],[13,342],[14,345]],"b":[[15,"impl-Add%3CReg64,+Mem64%3E-for-Asm"],[16,"impl-Add%3CReg64,+Reg64%3E-for-Asm"],[17,"impl-Add%3CMem8,+Imm8%3E-for-Asm"],[18,"impl-Add%3CMem16,+Imm8%3E-for-Asm"],[19,"impl-Add%3CMem32,+Imm8%3E-for-Asm"],[20,"impl-Add%3CMem64,+Imm8%3E-for-Asm"],[21,"impl-Add%3CMem64,+Reg64%3E-for-Asm"],[22,"impl-Add%3CReg32,+Reg32%3E-for-Asm"],[23,"impl-Add%3CMem16,+Imm16%3E-for-Asm"],[24,"impl-Add%3CMem16,+Reg16%3E-for-Asm"],[82,"impl-Cmp%3CReg64,+Reg64%3E-for-Asm"],[83,"impl-Cmp%3CMem16,+Imm16%3E-for-Asm"],[84,"impl-Cmp%3CMem8,+Imm8%3E-for-Asm"],[86,"impl-Dec%3CReg32%3E-for-Asm"],[87,"impl-Dec%3CMem64%3E-for-Asm"],[88,"impl-Dec%3CReg64%3E-for-Asm"],[89,"impl-Dec%3CMem32%3E-for-Asm"],[90,"impl-Dec%3CMem8%3E-for-Asm"],[91,"impl-Dec%3CMem16%3E-for-Asm"],[112,"impl-From%3Cu8%3E-for-Imm8"],[113,"impl-From%3Ci8%3E-for-Imm8"],[114,"impl-From%3Ci16%3E-for-Imm16"],[116,"impl-From%3Cu8%3E-for-Imm16"],[117,"impl-From%3Cu16%3E-for-Imm16"],[118,"impl-From%3Ci8%3E-for-Imm16"],[119,"impl-From%3Cu8%3E-for-Imm32"],[120,"impl-From%3Ci16%3E-for-Imm32"],[122,"impl-From%3Cu32%3E-for-Imm32"],[123,"impl-From%3Ci32%3E-for-Imm32"],[124,"impl-From%3Cu16%3E-for-Imm32"],[125,"impl-From%3Ci8%3E-for-Imm32"],[127,"impl-From%3Cu64%3E-for-Imm64"],[128,"impl-From%3Ci64%3E-for-Imm64"],[129,"impl-From%3Cu32%3E-for-Imm64"],[130,"impl-From%3Ci32%3E-for-Imm64"],[131,"impl-From%3Cu16%3E-for-Imm64"],[132,"impl-From%3Ci16%3E-for-Imm64"],[133,"impl-From%3Cu8%3E-for-Imm64"],[134,"impl-From%3Ci8%3E-for-Imm64"],[135,"impl-From%3Cusize%3E-for-Imm64"],[136,"impl-From%3Cisize%3E-for-Imm64"],[145,"impl-Inc%3CReg32%3E-for-Asm"],[146,"impl-Inc%3CMem8%3E-for-Asm"],[147,"impl-Inc%3CMem16%3E-for-Asm"],[148,"impl-Inc%3CMem32%3E-for-Asm"],[149,"impl-Inc%3CMem64%3E-for-Asm"],[150,"impl-Inc%3CReg64%3E-for-Asm"],[183,"impl-Mov%3CMem8,+Reg8%3E-for-Asm"],[184,"impl-Mov%3CReg16,+Imm16%3E-for-Asm"],[185,"impl-Mov%3CMem16,+Imm16%3E-for-Asm"],[186,"impl-Mov%3CMem16,+Reg16%3E-for-Asm"],[187,"impl-Mov%3CMem32,+Reg32%3E-for-Asm"],[188,"impl-Mov%3CMem64,+Reg64%3E-for-Asm"],[189,"impl-Mov%3CReg8,+Reg8%3E-for-Asm"],[190,"impl-Mov%3CReg16,+Reg16%3E-for-Asm"],[191,"impl-Mov%3CReg32,+Reg32%3E-for-Asm"],[192,"impl-Mov%3CReg8,+Imm8%3E-for-Asm"],[193,"impl-Mov%3CReg64,+Mem64%3E-for-Asm"],[194,"impl-Mov%3CReg32,+Mem32%3E-for-Asm"],[195,"impl-Mov%3CReg16,+Mem16%3E-for-Asm"],[196,"impl-Mov%3CReg8,+Mem8%3E-for-Asm"],[197,"impl-Mov%3CReg64,+Imm64%3E-for-Asm"],[198,"impl-Mov%3CReg32,+Imm32%3E-for-Asm"],[199,"impl-Mov%3CReg64,+Reg64%3E-for-Asm"],[204,"impl-Pop%3CReg64%3E-for-Asm"],[205,"impl-Pop%3CReg16%3E-for-Asm"],[206,"impl-Push%3CReg64%3E-for-Asm"],[207,"impl-Push%3CReg16%3E-for-Asm"],[253,"impl-Sub%3CReg64,+Reg64%3E-for-Asm"],[254,"impl-Sub%3CMem8,+Imm8%3E-for-Asm"],[255,"impl-Test%3CReg32,+Reg32%3E-for-Asm"],[256,"impl-Test%3CReg64,+Reg64%3E-for-Asm"],[257,"impl-Test%3CMem16,+Imm16%3E-for-Asm"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAO8ADQAQAAkAGwADACAAQQBkAAgAcQACAHUABAB7AAMAgAAJAJIABQC1ABMAzQApAPgAOwA1AQAA"}],["tiny_vm",{"t":"PPPPPPPFPPPFPGGFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHHHNNNNNNNNNNNNNNNNNNNNNNN","n":["A","Add","Addi","B","Branch","BranchZero","C","Fixup","Halt","Load","LoadImm","PhysAddr","Store","TinyInsn","TinyReg","TinyVm","bind","borrow","","","","","borrow_mut","","","","","clone","","clone_into","","clone_to_uninit","","dump","eq","","fmt","","from","","","","","interp","into","","","","","","jit","make_tinyvm_fib","make_tinyvm_jit_perf","make_tinyvm_jit_test","new","","read_mem","read_reg","to_owned","","try_from","","","","","try_into","","","","","type_id","","","","","write_mem","write_reg"],"q":[[0,"tiny_vm"],[77,"alloc::vec"],[78,"core::fmt"],[79,"core::result"],[80,"core::any"]],"i":"nf01001`000`0```bAhA`24310243434343043431024301102430```02004310243102431024300","f":"````````````````{{b{j{d{h{f}}}}}l}{j{{j{c}}}{}}0000{{{j{d}}}{{j{dc}}}{}}0000{{{j{n}}}n}{{{j{f}}}f}{{j{j{dc}}}l{}}0{jl}0{{{j{A`}}}l}{{{j{n}}{j{n}}}Ab}{{{j{f}}{j{f}}}Ab}{{{j{n}}{j{dAd}}}Af}{{{j{f}}{j{dAd}}}Af}{cc{}}0000{{{j{dA`}}}l}{AhAj}{{}c{}}00002{Al{{h{f}}}}{{}{{h{f}}}}0{{{h{f}}}A`}{Ajb}{{{j{A`}}Ah}Al}{{{j{A`}}n}Al}{jc{}}0{c{{An{e}}}{}{}}0000{{}{{An{c}}}{}}0000{jB`}0000{{{j{dA`}}AhAl}l}{{{j{dA`}}nAl}l}","D":"Dj","p":[[5,"Fixup",0],[0,"mut"],[6,"TinyInsn",0],[5,"Vec",77],[1,"reference"],[1,"unit"],[6,"TinyReg",0],[5,"TinyVm",0],[1,"bool"],[5,"Formatter",78],[8,"Result",78],[5,"PhysAddr",0],[1,"usize"],[1,"u16"],[6,"Result",79],[5,"TypeId",80]],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OzAAAAEAACgABwABAAAABAAAAAcAAAASAA8AIwADAC0AAAA7ABAA"}]]')); +var searchIndex = new Map(JSON.parse('[["add",{"t":"","n":[],"q":[],"i":"","f":"","D":"b","p":[],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OjAAAAAAAAA="}],["bf",{"t":"","n":[],"q":[],"i":"","f":"","D":"b","p":[],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OjAAAAAAAAA="}],["fib",{"t":"","n":[],"q":[],"i":"","f":"","D":"b","p":[],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OjAAAAAAAAA="}],["gen",{"t":"","n":[],"q":[],"i":"","f":"","D":"b","p":[],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OjAAAAAAAAA="}],["juicebox_asm",{"t":"FFFFFFFFFFGGGGFNNNNNNNNNNNPPPPNPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNPPPNPPNNNNNNNNNNNNNNNNNPNNNNNNPPPPNNNPPPPPPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPNPPPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNKKKKKKKKKKKKKKKKMMMMMMMMMMMMMMMM","n":["Asm","Imm16","Imm32","Imm64","Imm8","Label","Mem16","Mem32","Mem64","Mem8","Reg16","Reg32","Reg64","Reg8","Runtime","add","","","","","","","","","","add_code","ah","al","ax","bh","bind","bl","borrow","","","","","","","","","","","","","","","borrow_mut","","","","","","","","","","","","","","","bp","bpl","bx","call","ch","cl","clone","","","","clone_into","","","","clone_to_uninit","","","","cmovnz","cmovz","cmp","","","cx","dec","","","","","","dh","di","dil","dl","drop","","dump","dx","eax","ebp","ebx","ecx","edi","edx","esi","esp","from","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","inc","","","","","","indirect","","","","indirect_base_index","","","","indirect_disp","","","","insn","into","","","","","","","","","","","","","","","into_code","jmp","jnz","jz","mov","","","","","","","","","","","","","","","","","new","","","nop","pop","","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","sub","","test","","","to_owned","","","","try_from","","","","","","","","","","","","","","","try_into","","","","","","","","","","","","","","","type_id","","","","","","","","","","","","","","","with_profile","xor","Add","Call","Cmovnz","Cmovz","Cmp","Dec","Inc","Jmp","Jnz","Jz","Mov","Pop","Push","Sub","Test","Xor","add","call","cmovnz","cmovz","cmp","dec","inc","jmp","jnz","jz","mov","pop","push","sub","test","xor"],"q":[[0,"juicebox_asm"],[309,"juicebox_asm::insn"],[341,"juicebox_asm::asm"],[342,"juicebox_asm::reg"],[343,"juicebox_asm::mem"],[344,"juicebox_asm::imm"],[345,"juicebox_asm::rt"],[346,"core::convert"],[347,"juicebox_asm::label"],[348,"alloc::vec"],[349,"core::result"],[350,"core::any"]],"i":"```````````````d000000000AlBf0Aj1313Bd3A`AhBnCfnAbAdjhAf;<>:=9876543210;<;<;><<10;<10;<10;<>>>>>;>>>>>><;<<:==;00000000>:=99988888777777766666666666543210;<>>>>>>543254325432`>:=9876543210;<>>>>>>>>>>>>>>>>>>>>>>:=>>>>>10<;10<;10<;10<;10<;10<;10<;10<;111111>11;<;<>>>>>10;<>:=9876543210;<>:=9876543210;<>:=9876543210;<=>````````````````DdDfDhDjDlDnE`EbEdEfEhEjElEnF`Fb","f":"```````````````{{{f{bd}}hj}l}{{{f{bd}}hh}l}{{{f{bd}}nA`}l}{{{f{bd}}AbA`}l}{{{f{bd}}AdA`}l}{{{f{bd}}jA`}l}{{{f{bd}}jh}l}{{{f{bd}}AfAf}l}{{{f{bd}}AbAh}l}{{{f{bd}}AbAj}l}{{{f{bAl}}c}e{{Bb{{B`{An}}}}}{}}````{{{f{bd}}{f{bBd}}}l}`{f{{f{c}}}{}}00000000000000{{{f{b}}}{{f{bc}}}{}}00000000000000```{{{f{bd}}h}l}``{{{f{h}}}h}{{{f{Af}}}Af}{{{f{Aj}}}Aj}{{{f{Bf}}}Bf}{{f{f{bc}}}l{}}000{fl}000{{{f{bd}}hh}l}00={{{f{bd}}nA`}l}`{{{f{bd}}Af}l}{{{f{bd}}j}l}:{{{f{bd}}Ad}l}{{{f{bd}}n}l}{{{f{bd}}Ab}l}````{{{f{bBd}}}l}{{{f{bAl}}}l}{{{f{Al}}}l}`````````{cc{}}000{AnA`}{BhA`}{BjAh}3{AnAh}{BlAh}{BhAh}{AnBn}{BjBn}8{C`Bn}{CbBn}{BlBn}{BhBn}<{CdCf}{ChCf}{C`Cf}{CbCf}{BlCf}{BjCf}{AnCf}{BhCf}{CjCf}{ClCf}{cc{}}0000000{{{f{bd}}Af}l}{{{f{bd}}n}l}{{{f{bd}}Ab}l}{{{f{bd}}Ad}l}{{{f{bd}}j}l}{{{f{bd}}h}l}{hn}{hAb}{hAd}{hj}{{hh}n}{{hh}Ab}{{hh}Ad}{{hh}j}{{hCb}n}{{hCb}Ab}{{hCb}Ad}{{hCb}j}`{{}c{}}00000000000000{d{{Cn{An}}}}{{{f{bd}}{f{bBd}}}l}00{{{f{bd}}nBf}l}{{{f{bd}}AjAh}l}{{{f{bd}}AbAh}l}{{{f{bd}}AbAj}l}{{{f{bd}}AdAf}l}{{{f{bd}}jh}l}{{{f{bd}}BfBf}l}{{{f{bd}}AjAj}l}{{{f{bd}}AfAf}l}{{{f{bd}}BfA`}l}{{{f{bd}}hj}l}{{{f{bd}}AfAd}l}{{{f{bd}}AjAb}l}{{{f{bd}}Bfn}l}{{{f{bd}}hCf}l}{{{f{bd}}AfBn}l}{{{f{bd}}hh}l}{{}d}{{}Bd}{{}Al}{{{f{bd}}}l}{{{f{bd}}h}l}{{{f{bd}}Aj}l}10``````````````````````````````````````2``````6{{{f{bd}}nA`}l}?7{{{f{bd}}AbAh}l}{fc{}}000{c{{D`{e}}}{}{}}00000000000000{{}{{D`{c}}}{}}00000000000000{fDb}000000000000009<````````````````{{{f{bDd}}ce}l{}{}}{{{f{bDf}}c}l{}}{{{f{bDh}}ce}l{}{}}{{{f{bDj}}ce}l{}{}}{{{f{bDl}}ce}l{}{}}{{{f{bDn}}c}l{}}{{{f{bE`}}c}l{}}{{{f{bEb}}c}l{}}{{{f{bEd}}c}l{}}{{{f{bEf}}c}l{}}{{{f{bEh}}ce}l{}{}}{{{f{bEj}}c}l{}}{{{f{bEl}}c}l{}}{{{f{bEn}}ce}l{}{}}{{{f{bF`}}ce}l{}{}}{{{f{bFb}}ce}l{}{}}","D":"Ll","p":[[0,"mut"],[5,"Asm",0,341],[1,"reference"],[6,"Reg64",0,342],[5,"Mem64",0,343],[1,"unit"],[5,"Mem8",0,343],[5,"Imm8",0,344],[5,"Mem16",0,343],[5,"Mem32",0,343],[6,"Reg32",0,342],[5,"Imm16",0,344],[6,"Reg16",0,342],[5,"Runtime",0,345],[1,"u8"],[1,"slice"],[10,"AsRef",346],[5,"Label",0,347],[6,"Reg8",0,342],[1,"i8"],[1,"i16"],[1,"u16"],[5,"Imm32",0,344],[1,"u32"],[1,"i32"],[1,"u64"],[5,"Imm64",0,344],[1,"i64"],[1,"usize"],[1,"isize"],[5,"Vec",348],[6,"Result",349],[5,"TypeId",350],[10,"Add",309],[10,"Call",309],[10,"Cmovnz",309],[10,"Cmovz",309],[10,"Cmp",309],[10,"Dec",309],[10,"Inc",309],[10,"Jmp",309],[10,"Jnz",309],[10,"Jz",309],[10,"Mov",309],[10,"Pop",309],[10,"Push",309],[10,"Sub",309],[10,"Test",309],[10,"Xor",309]],"r":[[0,341],[1,344],[2,344],[3,344],[4,344],[5,347],[6,343],[7,343],[8,343],[9,343],[10,342],[11,342],[12,342],[13,342],[14,345]],"b":[[15,"impl-Add%3CReg64,+Mem64%3E-for-Asm"],[16,"impl-Add%3CReg64,+Reg64%3E-for-Asm"],[17,"impl-Add%3CMem8,+Imm8%3E-for-Asm"],[18,"impl-Add%3CMem16,+Imm8%3E-for-Asm"],[19,"impl-Add%3CMem32,+Imm8%3E-for-Asm"],[20,"impl-Add%3CMem64,+Imm8%3E-for-Asm"],[21,"impl-Add%3CMem64,+Reg64%3E-for-Asm"],[22,"impl-Add%3CReg32,+Reg32%3E-for-Asm"],[23,"impl-Add%3CMem16,+Imm16%3E-for-Asm"],[24,"impl-Add%3CMem16,+Reg16%3E-for-Asm"],[82,"impl-Cmp%3CReg64,+Reg64%3E-for-Asm"],[83,"impl-Cmp%3CMem16,+Imm16%3E-for-Asm"],[84,"impl-Cmp%3CMem8,+Imm8%3E-for-Asm"],[86,"impl-Dec%3CReg32%3E-for-Asm"],[87,"impl-Dec%3CMem64%3E-for-Asm"],[88,"impl-Dec%3CReg64%3E-for-Asm"],[89,"impl-Dec%3CMem32%3E-for-Asm"],[90,"impl-Dec%3CMem8%3E-for-Asm"],[91,"impl-Dec%3CMem16%3E-for-Asm"],[112,"impl-From%3Cu8%3E-for-Imm8"],[113,"impl-From%3Ci8%3E-for-Imm8"],[114,"impl-From%3Ci16%3E-for-Imm16"],[116,"impl-From%3Cu8%3E-for-Imm16"],[117,"impl-From%3Cu16%3E-for-Imm16"],[118,"impl-From%3Ci8%3E-for-Imm16"],[119,"impl-From%3Cu8%3E-for-Imm32"],[120,"impl-From%3Ci16%3E-for-Imm32"],[122,"impl-From%3Cu32%3E-for-Imm32"],[123,"impl-From%3Ci32%3E-for-Imm32"],[124,"impl-From%3Cu16%3E-for-Imm32"],[125,"impl-From%3Ci8%3E-for-Imm32"],[127,"impl-From%3Cu64%3E-for-Imm64"],[128,"impl-From%3Ci64%3E-for-Imm64"],[129,"impl-From%3Cu32%3E-for-Imm64"],[130,"impl-From%3Ci32%3E-for-Imm64"],[131,"impl-From%3Cu16%3E-for-Imm64"],[132,"impl-From%3Ci16%3E-for-Imm64"],[133,"impl-From%3Cu8%3E-for-Imm64"],[134,"impl-From%3Ci8%3E-for-Imm64"],[135,"impl-From%3Cusize%3E-for-Imm64"],[136,"impl-From%3Cisize%3E-for-Imm64"],[145,"impl-Inc%3CReg32%3E-for-Asm"],[146,"impl-Inc%3CMem8%3E-for-Asm"],[147,"impl-Inc%3CMem16%3E-for-Asm"],[148,"impl-Inc%3CMem32%3E-for-Asm"],[149,"impl-Inc%3CMem64%3E-for-Asm"],[150,"impl-Inc%3CReg64%3E-for-Asm"],[183,"impl-Mov%3CMem8,+Reg8%3E-for-Asm"],[184,"impl-Mov%3CReg16,+Imm16%3E-for-Asm"],[185,"impl-Mov%3CMem16,+Imm16%3E-for-Asm"],[186,"impl-Mov%3CMem16,+Reg16%3E-for-Asm"],[187,"impl-Mov%3CMem32,+Reg32%3E-for-Asm"],[188,"impl-Mov%3CMem64,+Reg64%3E-for-Asm"],[189,"impl-Mov%3CReg8,+Reg8%3E-for-Asm"],[190,"impl-Mov%3CReg16,+Reg16%3E-for-Asm"],[191,"impl-Mov%3CReg32,+Reg32%3E-for-Asm"],[192,"impl-Mov%3CReg8,+Imm8%3E-for-Asm"],[193,"impl-Mov%3CReg64,+Mem64%3E-for-Asm"],[194,"impl-Mov%3CReg32,+Mem32%3E-for-Asm"],[195,"impl-Mov%3CReg16,+Mem16%3E-for-Asm"],[196,"impl-Mov%3CReg8,+Mem8%3E-for-Asm"],[197,"impl-Mov%3CReg64,+Imm64%3E-for-Asm"],[198,"impl-Mov%3CReg32,+Imm32%3E-for-Asm"],[199,"impl-Mov%3CReg64,+Reg64%3E-for-Asm"],[204,"impl-Pop%3CReg64%3E-for-Asm"],[205,"impl-Pop%3CReg16%3E-for-Asm"],[206,"impl-Push%3CReg64%3E-for-Asm"],[207,"impl-Push%3CReg16%3E-for-Asm"],[253,"impl-Sub%3CReg64,+Reg64%3E-for-Asm"],[254,"impl-Sub%3CMem8,+Imm8%3E-for-Asm"],[255,"impl-Test%3CReg32,+Reg32%3E-for-Asm"],[256,"impl-Test%3CReg64,+Reg64%3E-for-Asm"],[257,"impl-Test%3CMem16,+Imm16%3E-for-Asm"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAO8ADQAQAAkAGwADACAAQQBkAAgAcQACAHUABAB7AAMAgAAJAJIABQC1ABMAzQApAPgAOwA1AQAA"}],["tiny_vm",{"t":"PPPPPPPFPPPFPGGFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHHHNNNNNNNNNNNNNNNNNNNNNNN","n":["A","Add","Addi","B","Branch","BranchZero","C","Fixup","Halt","Load","LoadImm","PhysAddr","Store","TinyInsn","TinyReg","TinyVm","bind","borrow","","","","","borrow_mut","","","","","clone","","clone_into","","clone_to_uninit","","dump","eq","","fmt","","from","","","","","interp","into","","","","","","jit","make_tinyvm_fib","make_tinyvm_jit_perf","make_tinyvm_jit_test","new","","read_mem","read_reg","to_owned","","try_from","","","","","try_into","","","","","type_id","","","","","write_mem","write_reg"],"q":[[0,"tiny_vm"],[77,"alloc::vec"],[78,"core::fmt"],[79,"core::result"],[80,"core::any"]],"i":"nf01001`000`0```bAhA`24310243434343043431024301102430```02004310243102431024300","f":"````````````````{{b{j{d{h{f}}}}}l}{j{{j{c}}}{}}0000{{{j{d}}}{{j{dc}}}{}}0000{{{j{n}}}n}{{{j{f}}}f}{{j{j{dc}}}l{}}0{jl}0{{{j{A`}}}l}{{{j{n}}{j{n}}}Ab}{{{j{f}}{j{f}}}Ab}{{{j{n}}{j{dAd}}}Af}{{{j{f}}{j{dAd}}}Af}{cc{}}0000{{{j{dA`}}}l}{AhAj}{{}c{}}00002{Al{{h{f}}}}{{}{{h{f}}}}0{{{h{f}}}A`}{Ajb}{{{j{A`}}Ah}Al}{{{j{A`}}n}Al}{jc{}}0{c{{An{e}}}{}{}}0000{{}{{An{c}}}{}}0000{jB`}0000{{{j{dA`}}AhAl}l}{{{j{dA`}}nAl}l}","D":"Dj","p":[[5,"Fixup",0],[0,"mut"],[6,"TinyInsn",0],[5,"Vec",77],[1,"reference"],[1,"unit"],[6,"TinyReg",0],[5,"TinyVm",0],[1,"bool"],[5,"Formatter",78],[8,"Result",78],[5,"PhysAddr",0],[1,"usize"],[1,"u16"],[6,"Result",79],[5,"TypeId",80]],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OzAAAAEAACgABwABAAAABAAAAAcAAAASAA8AIwADAC0AAAA7ABAA"}]]')); if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; else if (window.initSearch) window.initSearch(searchIndex); -//{"start":39,"fragment_lengths":[111,111,112,8229,1542]}
\ No newline at end of file +//{"start":39,"fragment_lengths":[111,111,112,112,8229,1542]}
\ No newline at end of file diff --git a/search.desc/gen/gen-desc-0-.js b/search.desc/gen/gen-desc-0-.js new file mode 100644 index 0000000..dac6144 --- /dev/null +++ b/search.desc/gen/gen-desc-0-.js @@ -0,0 +1 @@ +searchState.loadedDescShard("gen", 0, "Add example.")
\ No newline at end of file diff --git a/settings.html b/settings.html index e36c771..98c41ce 100644 --- a/settings.html +++ b/settings.html @@ -1 +1 @@ -<!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="Settings of Rustdoc"><title>Settings</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/${f}">`).join(""))</script><link rel="stylesheet" href="./static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="./static.files/rustdoc-b0742ba02757f159.css"><meta name="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="bf" data-themes="" data-resource-suffix="" data-rustdoc-version="1.83.0 (90b35a623 2024-11-26)" data-channel="1.83.0" data-search-js="search-f0d225181b97f9a4.js" data-settings-js="settings-805db61a62df4bd2.js" ><script src="./static.files/storage-1d39b6787ed640ff.js"></script><script defer src="./static.files/main-f070b9041d14864c.js"></script><noscript><link rel="stylesheet" href="./static.files/noscript-0111fcff984fae8f.css"></noscript><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 mod sys"><!--[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" title="show sidebar"></button><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2><a href="./index.html">Rustdoc</a><span class="version">1.83.0</span></h2></div><div class="version">(90b35a623 2024-11-26)</div><h2 class="location">Settings</h2><div class="sidebar-elems"></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Rustdoc settings</h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section>You need to enable JavaScript be able to update your settings.</section></noscript><script defer src="./static.files/settings-805db61a62df4bd2.js"></script></section></div></main></body></html>
\ No newline at end of file +<!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="Settings of Rustdoc"><title>Settings</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/${f}">`).join(""))</script><link rel="stylesheet" href="./static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="./static.files/rustdoc-b0742ba02757f159.css"><meta name="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="fib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.83.0 (90b35a623 2024-11-26)" data-channel="1.83.0" data-search-js="search-f0d225181b97f9a4.js" data-settings-js="settings-805db61a62df4bd2.js" ><script src="./static.files/storage-1d39b6787ed640ff.js"></script><script defer src="./static.files/main-f070b9041d14864c.js"></script><noscript><link rel="stylesheet" href="./static.files/noscript-0111fcff984fae8f.css"></noscript><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 mod sys"><!--[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" title="show sidebar"></button><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2><a href="./index.html">Rustdoc</a><span class="version">1.83.0</span></h2></div><div class="version">(90b35a623 2024-11-26)</div><h2 class="location">Settings</h2><div class="sidebar-elems"></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Rustdoc settings</h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section>You need to enable JavaScript be able to update your settings.</section></noscript><script defer src="./static.files/settings-805db61a62df4bd2.js"></script></section></div></main></body></html>
\ No newline at end of file diff --git a/src-files.js b/src-files.js index d7b79c1..7f1dcfe 100644 --- a/src-files.js +++ b/src-files.js @@ -1,3 +1,3 @@ -var srcIndex = new Map(JSON.parse('[["add",["",[],["add.rs"]]],["bf",["",[],["bf.rs"]]],["fib",["",[],["fib.rs"]]],["juicebox_asm",["",[["insn",[],["add.rs","call.rs","cmovnz.rs","cmovz.rs","cmp.rs","dec.rs","inc.rs","jmp.rs","jnz.rs","jz.rs","mov.rs","nop.rs","pop.rs","push.rs","ret.rs","sub.rs","test.rs","xor.rs"]]],["asm.rs","imm.rs","insn.rs","label.rs","lib.rs","mem.rs","reg.rs","rt.rs"]]],["tiny_vm",["",[],["tiny_vm.rs"]]]]')); +var srcIndex = new Map(JSON.parse('[["add",["",[],["add.rs"]]],["bf",["",[],["bf.rs"]]],["fib",["",[],["fib.rs"]]],["gen",["",[],["gen.rs"]]],["juicebox_asm",["",[["insn",[],["add.rs","call.rs","cmovnz.rs","cmovz.rs","cmp.rs","dec.rs","inc.rs","jmp.rs","jnz.rs","jz.rs","mov.rs","nop.rs","pop.rs","push.rs","ret.rs","sub.rs","test.rs","xor.rs"]]],["asm.rs","imm.rs","insn.rs","label.rs","lib.rs","mem.rs","reg.rs","rt.rs"]]],["tiny_vm",["",[],["tiny_vm.rs"]]]]')); createSrcSidebar(); -//{"start":36,"fragment_lengths":[26,25,27,283,35]}
\ No newline at end of file +//{"start":36,"fragment_lengths":[26,25,27,27,283,35]}
\ No newline at end of file diff --git a/src/add/add.rs.html b/src/add/add.rs.html index 38058ec..580daa0 100644 --- a/src/add/add.rs.html +++ b/src/add/add.rs.html @@ -36,7 +36,8 @@ <a href="#35" id="35">35</a> <a href="#36" id="36">36</a> <a href="#37" id="37">37</a> -<a href="#38" id="38">38</a></pre></div><pre class="rust"><code><span class="doccomment">//! Add example. +<a href="#38" id="38">38</a> +<a href="#39" id="39">39</a></pre></div><pre class="rust"><code><span class="doccomment">//! Add example. //! //! Jit compile a function at runtime (generate native host code) which calls a function defined in //! the example based on the SystemV abi to demonstrate the [`juicebox_asm`] crate. @@ -65,11 +66,12 @@ asm.call(rax); asm.ret(); - <span class="kw">let </span>code = asm.into_code(); - std::fs::write(<span class="string">"jit.asm"</span>, <span class="kw-2">&</span>code).unwrap(); - <span class="kw">let </span><span class="kw-2">mut </span>rt = Runtime::new(); - <span class="kw">let </span>add42 = <span class="kw">unsafe </span>{ rt.add_code::<<span class="kw">extern </span><span class="string">"C" </span><span class="kw">fn</span>(u32) -> u32>(code) }; + <span class="kw">let </span>add42 = <span class="kw">unsafe </span>{ rt.add_code::<<span class="kw">extern </span><span class="string">"C" </span><span class="kw">fn</span>(u32) -> u32>(asm.into_code()) }; + + <span class="comment">// Write out JIT code for visualization. + // Disassemble for example with `ndisasm -b 64 jit.asm`. + </span>rt.dump(); <span class="kw">let </span>res = add42(<span class="number">5</span>); <span class="macro">assert_eq!</span>(res, <span class="number">47</span>); diff --git a/src/fib/fib.rs.html b/src/fib/fib.rs.html index 32ebea0..c1a746f 100644 --- a/src/fib/fib.rs.html +++ b/src/fib/fib.rs.html @@ -76,8 +76,7 @@ <a href="#75" id="75">75</a> <a href="#76" id="76">76</a> <a href="#77" id="77">77</a> -<a href="#78" id="78">78</a> -<a href="#79" id="79">79</a></pre></div><pre class="rust"><code><span class="doccomment">//! Fibonacci example. +<a href="#78" id="78">78</a></pre></div><pre class="rust"><code><span class="doccomment">//! Fibonacci example. //! //! Jit compile a function at runtime (generate native host code) to compute the fibonacci sequence //! to demonstrate the [`juicebox_asm`] crate. @@ -141,14 +140,13 @@ asm.bind(<span class="kw-2">&mut </span>end); asm.ret(); - <span class="comment">// Write out JIT code for visualization. - // Disassemble for example with `ndisasm -b 64 jit.asm`. - </span><span class="kw">let </span>code = asm.into_code(); - std::fs::write(<span class="string">"jit.asm"</span>, <span class="kw-2">&</span>code).unwrap(); - <span class="comment">// Move code into executable page and get function pointer to it. </span><span class="kw">let </span><span class="kw-2">mut </span>rt = Runtime::new(); - <span class="kw">let </span>fib = <span class="kw">unsafe </span>{ rt.add_code::<<span class="kw">extern </span><span class="string">"C" </span><span class="kw">fn</span>(u64) -> u64>(code) }; + <span class="kw">let </span>fib = <span class="kw">unsafe </span>{ rt.add_code::<<span class="kw">extern </span><span class="string">"C" </span><span class="kw">fn</span>(u64) -> u64>(asm.into_code()) }; + + <span class="comment">// Write out JIT code for visualization. + // Disassemble for example with `ndisasm -b 64 jit.asm`. + </span>rt.dump(); <span class="kw">for </span>n <span class="kw">in </span><span class="number">0</span>..<span class="number">15 </span>{ <span class="kw">let </span>fib_jit = fib(n); diff --git a/src/gen/gen.rs.html b/src/gen/gen.rs.html new file mode 100644 index 0000000..ebf7e93 --- /dev/null +++ b/src/gen/gen.rs.html @@ -0,0 +1,87 @@ +<!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="Source of the Rust file `examples/gen.rs`."><title>gen.rs - source</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-b0742ba02757f159.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="gen" data-themes="" data-resource-suffix="" data-rustdoc-version="1.83.0 (90b35a623 2024-11-26)" data-channel="1.83.0" data-search-js="search-f0d225181b97f9a4.js" data-settings-js="settings-805db61a62df4bd2.js" ><script src="../../static.files/storage-1d39b6787ed640ff.js"></script><script defer src="../../static.files/src-script-e66d777a5a92e9b2.js"></script><script defer src="../../src-files.js"></script><script defer src="../../static.files/main-f070b9041d14864c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-0111fcff984fae8f.css"></noscript><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 src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"><h2>Files</h2></div></nav><div class="sidebar-resizer"></div><main><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1><div class="sub-heading">gen/</div>gen.rs</h1><rustdoc-toolbar></rustdoc-toolbar></div><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"> +<a href="#1" id="1">1</a> +<a href="#2" id="2">2</a> +<a href="#3" id="3">3</a> +<a href="#4" id="4">4</a> +<a href="#5" id="5">5</a> +<a href="#6" id="6">6</a> +<a href="#7" id="7">7</a> +<a href="#8" id="8">8</a> +<a href="#9" id="9">9</a> +<a href="#10" id="10">10</a> +<a href="#11" id="11">11</a> +<a href="#12" id="12">12</a> +<a href="#13" id="13">13</a> +<a href="#14" id="14">14</a> +<a href="#15" id="15">15</a> +<a href="#16" id="16">16</a> +<a href="#17" id="17">17</a> +<a href="#18" id="18">18</a> +<a href="#19" id="19">19</a> +<a href="#20" id="20">20</a> +<a href="#21" id="21">21</a> +<a href="#22" id="22">22</a> +<a href="#23" id="23">23</a> +<a href="#24" id="24">24</a> +<a href="#25" id="25">25</a> +<a href="#26" id="26">26</a> +<a href="#27" id="27">27</a> +<a href="#28" id="28">28</a> +<a href="#29" id="29">29</a> +<a href="#30" id="30">30</a> +<a href="#31" id="31">31</a> +<a href="#32" id="32">32</a> +<a href="#33" id="33">33</a> +<a href="#34" id="34">34</a> +<a href="#35" id="35">35</a> +<a href="#36" id="36">36</a> +<a href="#37" id="37">37</a> +<a href="#38" id="38">38</a> +<a href="#39" id="39">39</a> +<a href="#40" id="40">40</a> +<a href="#41" id="41">41</a> +<a href="#42" id="42">42</a> +<a href="#43" id="43">43</a></pre></div><pre class="rust"><code><span class="doccomment">//! Add example. +//! +//! Jit compile a function at runtime (generate native host code) which calls a function defined in +//! the example based on the SystemV abi to demonstrate the [`juicebox_asm`] crate. + +</span><span class="attr">#[cfg(not(any(target_arch = <span class="string">"x86_64"</span>, target_os = <span class="string">"linux"</span>)))] +</span><span class="macro">compile_error!</span>(<span class="string">"Only supported on x86_64 with SystemV abi"</span>); + +<span class="kw">use </span>juicebox_asm::insn::<span class="kw-2">*</span>; +<span class="kw">use </span>juicebox_asm::{Asm, Imm8, Reg64::<span class="kw-2">*</span>, Runtime}; +<span class="kw">use </span>juicebox_asm::{Mem16, Mem32, Mem64, Mem8}; + +<span class="kw">extern </span><span class="string">"C" </span><span class="kw">fn </span>add(a: u32, b: u32) -> u32 { + a + b +} + +<span class="kw">fn </span>main() { + <span class="kw">let </span><span class="kw-2">mut </span>asm1 = Asm::new(); + <span class="comment">//asm1.add(Mem16::indirect(rdi), Imm8::from(0x80u8)); + </span>asm1.test(rax, rax); + asm1.cmp(Mem8::indirect(rax), Imm8::from(<span class="number">0u8</span>)); + asm1.ret(); + + <span class="kw">let </span>code = asm1.into_code(); + std::fs::write(<span class="string">"jit.asm"</span>, <span class="kw-2">&</span>code).unwrap(); + + <span class="kw">let </span><span class="kw-2">mut </span>asm2 = Asm::new(); + <span class="comment">//asm2.mov(Reg16::cx, Imm16::from(1u16)); + //asm2.mov(Mem::Indirect(rdi), Reg16::cx); + </span>asm2.ret(); + + <span class="kw">let </span><span class="kw-2">mut </span>rt = Runtime::new(); + <span class="kw">let </span>fn1 = <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">*mut </span>u64)>(code) }; + <span class="kw">let </span>fn2 = <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">*mut </span>u64)>(asm2.into_code()) }; + + <span class="kw">let </span><span class="kw-2">mut </span>data = <span class="number">0xffff_ffff_ffff_ff80u64</span>; + fn1(<span class="kw-2">&mut </span>data <span class="kw">as </span><span class="kw-2">*mut </span>u64); + <span class="macro">println!</span>(<span class="string">"data={:x}"</span>, data); + + <span class="kw">let </span><span class="kw-2">mut </span>data = <span class="number">0xffff_ffff_ffff_ffffu64</span>; + fn2(<span class="kw-2">&mut </span>data <span class="kw">as </span><span class="kw-2">*mut </span>u64); + <span class="macro">println!</span>(<span class="string">"data={:x}"</span>, data); +} +</code></pre></div></section></main></body></html>
\ No newline at end of file |