summary refs log tree commit diff stats
path: root/include/exec
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-07-26 13:04:21 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2013-07-26 13:04:21 -0500
commitf0ef1cf4d6c996d90df6e4a32a82423d180f3e4d (patch)
treececa64dbd292ac8cddb28752a6d6495d138a6c28 /include/exec
parentb142d79328cd0a0556634b0eeb891a15bfd5a00c (diff)
parentf290e4988dd8eb012de0517a1ff93df130e87da1 (diff)
downloadfocaccia-qemu-f0ef1cf4d6c996d90df6e4a32a82423d180f3e4d.tar.gz
focaccia-qemu-f0ef1cf4d6c996d90df6e4a32a82423d180f3e4d.zip
Merge remote-tracking branch 'rth/tcg-next' into staging
# By Claudio Fontana (1) and others
# Via Richard Henderson
* rth/tcg-next:
  tcg: Remove temp_buf
  tcg/aarch64: Implement tlb lookup fast path
  tcg/aarch64: implement ldst 12bit scaled uimm offset

Message-id: 1373919944-8521-1-git-send-email-rth@twiddle.net
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'include/exec')
-rw-r--r--include/exec/cpu-defs.h2
-rw-r--r--include/exec/exec-all.h14
2 files changed, 14 insertions, 2 deletions
diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h
index b5b93db842..a5c028c536 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.          \
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