From c6d8ed24b446b1f1e07af87cde54317f54a1d42e Mon Sep 17 00:00:00 2001 From: Jani Kokkonen Date: Wed, 10 Jul 2013 17:02:00 +0200 Subject: tcg/aarch64: Implement tlb lookup fast path Supports CONFIG_QEMU_LDST_OPTIMIZATION Signed-off-by: Jani Kokkonen Reviewed-by: Richard Henderson Reviewed-by: Claudio Fontana --- include/exec/exec-all.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include/exec') diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index b2162a4ec4..5920f73c90 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -358,6 +358,20 @@ static inline uintptr_t tcg_getpc_ldst(uintptr_t ra) not the start of the next opcode */ return ra; } +#elif defined(__aarch64__) +# define GETRA() ((uintptr_t)__builtin_return_address(0)) +# define GETPC_LDST() tcg_getpc_ldst(GETRA()) +static inline uintptr_t tcg_getpc_ldst(uintptr_t ra) +{ + int32_t b; + ra += 4; /* skip one instruction */ + b = *(int32_t *)ra; /* load the branch insn */ + b = (b << 6) >> (6 - 2); /* extract the displacement */ + ra += b; /* apply the displacement */ + ra -= 4; /* return a pointer into the current opcode, + not the start of the next opcode */ + return ra; +} # else # error "CONFIG_QEMU_LDST_OPTIMIZATION needs GETPC_LDST() implementation!" # endif -- cgit v1.2.3-55-g7522 From a28177820a868eafda8fab007561cc19f41941f4 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 18 Apr 2013 19:20:47 +0200 Subject: tcg: Remove temp_buf All targets have been converted to allocating space for temporaries on the stack. No need to allocate space within the CPU_COMMON block. Signed-off-by: Richard Henderson --- include/exec/cpu-defs.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/exec') diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h index 39094b3f48..5321171cef 100644 --- a/include/exec/cpu-defs.h +++ b/include/exec/cpu-defs.h @@ -154,8 +154,6 @@ typedef struct CPUWatchpoint { memory was accessed */ \ CPU_COMMON_TLB \ struct TranslationBlock *tb_jmp_cache[TB_JMP_CACHE_SIZE]; \ - /* buffer for temporaries in the code generator */ \ - long temp_buf[CPU_TEMP_BUF_NLONGS]; \ \ int64_t icount_extra; /* Instructions until next timer event. */ \ /* Number of cycles left, with interrupt flag in high bit. \ -- cgit v1.2.3-55-g7522