aboutsummaryrefslogtreecommitdiff
path: root/include/exec
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2013-07-25 07:16:52 -1000
committerRichard Henderson <rth@twiddle.net>2013-08-26 13:31:54 -0700
commit401c227b0a1134245ec61c6c5a9997cfc963c8e4 (patch)
tree753453aebeb53f96d70405928289994b2f2a5f07 /include/exec
parentaac1fb0576e5bea72681e91c38caffc17741eb80 (diff)
downloadqemu-401c227b0a1134245ec61c6c5a9997cfc963c8e4.zip
qemu-401c227b0a1134245ec61c6c5a9997cfc963c8e4.tar.gz
qemu-401c227b0a1134245ec61c6c5a9997cfc963c8e4.tar.bz2
tcg-i386: Use new return-argument ld/st helpers
Discontinue the jump-around-jump-to-jump scheme, trading it for a single immediate move instruction. The two extra jumps always consume 7 bytes, whereas the immediate move is either 5 or 7 bytes depending on where the code_gen_buffer gets located. Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'include/exec')
-rw-r--r--include/exec/exec-all.h13
1 files changed, 2 insertions, 11 deletions
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 5920f73..b70028a 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -326,18 +326,9 @@ extern uintptr_t tci_tb_ptr;
(6) jump to corresponding code of the next of fast path
*/
# if defined(__i386__) || defined(__x86_64__)
-/* To avoid broken disassembling, long jmp is used for embedding fast path pc,
- so that the destination is the next code of fast path, though this jmp is
- never executed.
-
- call MMU helper
- jmp POST_PROC (2byte) <- GETRA()
- jmp NEXT_CODE (5byte)
- POST_PROCESS ... <- GETRA() + 7
- */
# define GETRA() ((uintptr_t)__builtin_return_address(0))
-# define GETPC_LDST() ((uintptr_t)(GETRA() + 7 + \
- *(int32_t *)((void *)GETRA() + 3) - 1))
+/* The return address argument for ldst is passed directly. */
+# define GETPC_LDST() (abort(), 0)
# elif defined (_ARCH_PPC) && !defined (_ARCH_PPC64)
# define GETRA() ((uintptr_t)__builtin_return_address(0))
# define GETPC_LDST() ((uintptr_t) ((*(int32_t *)(GETRA() - 4)) - 1))