On 7/5/24 18:49, Richard Henderson wrote:
On 5/6/24 15:47, Philippe Mathieu-Daudé wrote:
On 25/4/24 01:31, Richard Henderson wrote:
Reorg translator_access into translator_ld, with a more
memcpy-ish interface.  If both pages are in ram, do not
go through the caller's slow path.

Assert that the access is within the two pages that we are
prepared to protect, per TranslationBlock.  Allow access
prior to pc_first, so long as it is within the first page.

Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
---
  accel/tcg/translator.c | 189 ++++++++++++++++++++++-------------------
  1 file changed, 101 insertions(+), 88 deletions(-)


  uint64_t translator_ldq(CPUArchState *env, DisasContextBase *db, vaddr pc)
  {
-    uint64_t ret, plug;
-    void *p = translator_access(env, db, pc, sizeof(ret));
+    uint64_t raw, tgt;
-    if (p) {
-        plugin_insn_append(pc, p, sizeof(ret));
-        return ldq_p(p);
+    if (translator_ld(env, db, &raw, pc, sizeof(raw))) {
+        tgt = tswap64(raw);
+    } else {
+        tgt = cpu_ldl_code(env, pc);

cpu_ldq_code() ?

Oops, yes indeed.  Fixed.

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



Reply via email to