aboutsummaryrefslogtreecommitdiff
path: root/target-alpha
diff options
context:
space:
mode:
Diffstat (limited to 'target-alpha')
-rw-r--r--target-alpha/op_helper.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/target-alpha/op_helper.c b/target-alpha/op_helper.c
index ae8470b595..fa1e6acc5a 100644
--- a/target-alpha/op_helper.c
+++ b/target-alpha/op_helper.c
@@ -1076,7 +1076,11 @@ void helper_mtpr (int iprn)
/* Softmmu support */
#if !defined (CONFIG_USER_ONLY)
-#define GETPC() (__builtin_return_address(0))
+#ifdef __s390__
+# define GETPC() ((void*)((unsigned long)__builtin_return_address(0) & 0x7fffffffUL))
+#else
+# define GETPC() (__builtin_return_address(0))
+#endif
/* XXX: the two following helpers are pure hacks.
* Hopefully, we emulate the PALcode, then we should never see