diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2024-04-02 22:10:50 -1000 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2024-05-15 08:55:18 +0200 |
commit | 3a247368e6fc12304e73451c63254313e2ebd60e (patch) | |
tree | d77335d1b5e9dd8247bfc631173f14d81d8a2105 /include/exec | |
parent | 4abc892362f8282450f18c4e45c5b0534461d01e (diff) |
accel/tcg: Implement translator_st
Copy data out of a completed translation. This will be used
for both plugins and disassembly.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/exec')
-rw-r--r-- | include/exec/translator.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/exec/translator.h b/include/exec/translator.h index 70cef2c0be..fff857a0cc 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 + * @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); + +/** + * translator_st_len + * @db: disassembly context + * + * Return the number of bytes available to copy from the + * current translation block with translator_st. + */ +size_t translator_st_len(const DisasContextBase *db); + #ifdef COMPILING_PER_TARGET /* * Return whether addr is on the same page as where disassembly started. |