aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/juicebox_asm/asm.rs.html
diff options
context:
space:
mode:
authorjohannst <johannst@users.noreply.github.com>2024-12-20 22:36:06 +0000
committerjohannst <johannst@users.noreply.github.com>2024-12-20 22:36:06 +0000
commit7e758f4d684199c90ec1bb9107908e506bf736cf (patch)
tree8f3eeea9621197f92420ae7d81d98644134a789a /src/juicebox_asm/asm.rs.html
parentb5935c796ab0b2c478b4480a0dfdacb8e0dfe40e (diff)
downloadjuicebox-asm-7e758f4d684199c90ec1bb9107908e506bf736cf.tar.gz
juicebox-asm-7e758f4d684199c90ec1bb9107908e506bf736cf.zip
deploy: 6cc2331c8ff8e7372cd6e9a339250a9d8b58a547gh-pages
Diffstat (limited to 'src/juicebox_asm/asm.rs.html')
-rw-r--r--src/juicebox_asm/asm.rs.html28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/juicebox_asm/asm.rs.html b/src/juicebox_asm/asm.rs.html
index ebc7c4a..7013bab 100644
--- a/src/juicebox_asm/asm.rs.html
+++ b/src/juicebox_asm/asm.rs.html
@@ -426,7 +426,20 @@
<a href="#425" id="425">425</a>
<a href="#426" id="426">426</a>
<a href="#427" id="427">427</a>
-<a href="#428" id="428">428</a></pre></div><pre class="rust"><code><span class="doccomment">//! The `x64` jit assembler.
+<a href="#428" id="428">428</a>
+<a href="#429" id="429">429</a>
+<a href="#430" id="430">430</a>
+<a href="#431" id="431">431</a>
+<a href="#432" id="432">432</a>
+<a href="#433" id="433">433</a>
+<a href="#434" id="434">434</a>
+<a href="#435" id="435">435</a>
+<a href="#436" id="436">436</a>
+<a href="#437" id="437">437</a>
+<a href="#438" id="438">438</a>
+<a href="#439" id="439">439</a>
+<a href="#440" id="440">440</a>
+<a href="#441" id="441">441</a></pre></div><pre class="rust"><code><span class="doccomment">//! The `x64` jit assembler.
</span><span class="kw">use </span><span class="kw">crate</span>::imm::Imm;
<span class="kw">use </span><span class="kw">crate</span>::mem::{AddrMode, Mem, Mem16, Mem32, Mem64, Mem8};
@@ -470,6 +483,19 @@
<span class="self">self</span>.buf
}
+ <span class="doccomment">/// Disassemble the code currently added to the runtime, using
+ /// [`ndisasm`](https://nasm.us/index.php) and print it to _stdout_. If
+ /// `ndisasm` is not available on the system this prints a warning and
+ /// becomes a nop.
+ ///
+ /// # Panics
+ ///
+ /// Panics if anything goes wrong with spawning, writing to or reading from
+ /// the `ndisasm` child process.
+ </span><span class="kw">pub fn </span>disasm(<span class="kw-2">&amp;</span><span class="self">self</span>) {
+ <span class="kw">crate</span>::disasm::disasm(<span class="kw-2">&amp;</span><span class="self">self</span>.buf);
+ }
+
<span class="doccomment">/// Emit a slice of bytes.
</span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>emit(<span class="kw-2">&amp;mut </span><span class="self">self</span>, bytes: <span class="kw-2">&amp;</span>[u8]) {
<span class="self">self</span>.buf.extend_from_slice(bytes);