diff options
author | johannst <johannst@users.noreply.github.com> | 2024-12-19 18:47:57 +0000 |
---|---|---|
committer | johannst <johannst@users.noreply.github.com> | 2024-12-19 18:47:57 +0000 |
commit | b5935c796ab0b2c478b4480a0dfdacb8e0dfe40e (patch) | |
tree | 0756805ba7d49b5d29318defd6d9e3ba76a7a1ff /src/fib | |
parent | 7edab93d72188d59a82fe5d7c4a502866f551ab3 (diff) | |
download | juicebox-asm-b5935c796ab0b2c478b4480a0dfdacb8e0dfe40e.tar.gz juicebox-asm-b5935c796ab0b2c478b4480a0dfdacb8e0dfe40e.zip |
deploy: 8ca27aeeb99a0da43e92e39918aa07c0b1443c07
Diffstat (limited to 'src/fib')
-rw-r--r-- | src/fib/fib.rs.html | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/fib/fib.rs.html b/src/fib/fib.rs.html index c1a746f..99da282 100644 --- a/src/fib/fib.rs.html +++ b/src/fib/fib.rs.html @@ -75,8 +75,7 @@ <a href="#74" id="74">74</a> <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></pre></div><pre class="rust"><code><span class="doccomment">//! Fibonacci example. +<a href="#77" id="77">77</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. @@ -144,9 +143,8 @@ </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>(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="comment">// Disassemble JIT code and write to stdout. + </span>rt.disasm(); <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); |