aboutsummaryrefslogtreecommitdiff
path: root/dyngen-exec.h
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2011-09-21 18:13:16 +0000
committerBlue Swirl <blauwirbel@gmail.com>2011-10-01 09:31:43 +0000
commit3917149d96cfa5f619de770af6059f37b6e1df77 (patch)
tree5ab453462b2547211575129d051bd14ddc422396 /dyngen-exec.h
parentbccd9ec5f098668576342c83d90d6d6833d61d33 (diff)
Move GETPC from dyngen-exec.h to exec-all.h
GETPC() can be used even from outside of helper code. Move the macro to a more accessible location. Avoid a compile warning from redefining it in exec.c. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'dyngen-exec.h')
-rw-r--r--dyngen-exec.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/dyngen-exec.h b/dyngen-exec.h
index 8beb7f3344..fbde29ea01 100644
--- a/dyngen-exec.h
+++ b/dyngen-exec.h
@@ -57,16 +57,4 @@
register CPUState *env asm(AREG0);
-/* The return address may point to the start of the next instruction.
- Subtracting one gets us the call instruction itself. */
-#if defined(__s390__) && !defined(__s390x__)
-# define GETPC() ((void*)(((unsigned long)__builtin_return_address(0) & 0x7fffffffUL) - 1))
-#elif defined(__arm__)
-/* Thumb return addresses have the low bit set, so we need to subtract two.
- This is still safe in ARM mode because instructions are 4 bytes. */
-# define GETPC() ((void *)((unsigned long)__builtin_return_address(0) - 2))
-#else
-# define GETPC() ((void *)((unsigned long)__builtin_return_address(0) - 1))
-#endif
-
#endif /* !defined(__DYNGEN_EXEC_H__) */