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/add | |
parent | 7edab93d72188d59a82fe5d7c4a502866f551ab3 (diff) | |
download | juicebox-asm-b5935c796ab0b2c478b4480a0dfdacb8e0dfe40e.tar.gz juicebox-asm-b5935c796ab0b2c478b4480a0dfdacb8e0dfe40e.zip |
deploy: 8ca27aeeb99a0da43e92e39918aa07c0b1443c07
Diffstat (limited to 'src/add')
-rw-r--r-- | src/add/add.rs.html | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/add/add.rs.html b/src/add/add.rs.html index 580daa0..ba76c7d 100644 --- a/src/add/add.rs.html +++ b/src/add/add.rs.html @@ -36,8 +36,7 @@ <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></pre></div><pre class="rust"><code><span class="doccomment">//! Add example. +<a href="#38" id="38">38</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. @@ -69,9 +68,8 @@ <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>(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">let </span>res = add42(<span class="number">5</span>); <span class="macro">assert_eq!</span>(res, <span class="number">47</span>); |