From 7e758f4d684199c90ec1bb9107908e506bf736cf Mon Sep 17 00:00:00 2001 From: johannst Date: Fri, 20 Dec 2024 22:36:06 +0000 Subject: deploy: 6cc2331c8ff8e7372cd6e9a339250a9d8b58a547 --- src/juicebox_asm/asm.rs.html | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'src/juicebox_asm/asm.rs.html') 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 @@ 425 426 427 -428
//! The `x64` jit assembler.
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
//! The `x64` jit assembler.
 
 use crate::imm::Imm;
 use crate::mem::{AddrMode, Mem, Mem16, Mem32, Mem64, Mem8};
@@ -470,6 +483,19 @@
         self.buf
     }
 
+    /// 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.
+    pub fn disasm(&self) {
+        crate::disasm::disasm(&self.buf);
+    }
+
     /// Emit a slice of bytes.
     pub(crate) fn emit(&mut self, bytes: &[u8]) {
         self.buf.extend_from_slice(bytes);
-- 
cgit v1.2.3