On 25/4/24 01:31, Richard Henderson wrote:
Copy data out of a completed translation.  This will be used
for both plugins and disassembly.

Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
---
  include/exec/translator.h | 23 ++++++++++++++++
  accel/tcg/translator.c    | 55 +++++++++++++++++++++++++++++++++++++++
  2 files changed, 78 insertions(+)

diff --git a/include/exec/translator.h b/include/exec/translator.h
index e92dfba035..3c354a4310 100644
--- a/include/exec/translator.h
+++ b/include/exec/translator.h
@@ -246,6 +246,29 @@ translator_ldq_swap(CPUArchState *env, DisasContextBase 
*db,
   */
  void translator_fake_ldb(DisasContextBase *db, vaddr pc, uint8_t insn8);
+/**
+ * translator_st
+ * @db: disassembly context
+ * @dest: address to copy into

Or s/address/buffer/

+ * @addr: virtual address within TB
+ * @len: length
+ *
+ * Copy @len bytes from @addr into @dest.
+ * All bytes must have been read during translation.
+ * Return true on success or false on failure.
+ */
+bool translator_st(const DisasContextBase *db, void *dest,
+                   vaddr addr, size_t len);

Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>



Reply via email to