aboutsummaryrefslogtreecommitdiff
path: root/target-ppc/op_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-ppc/op_helper.c')
-rw-r--r--target-ppc/op_helper.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c
index 751bd7212c..da5a6f5e37 100644
--- a/target-ppc/op_helper.c
+++ b/target-ppc/op_helper.c
@@ -2732,7 +2732,11 @@ DO_SPE_OP1(fsctuf);
#if !defined (CONFIG_USER_ONLY)
#define MMUSUFFIX _mmu
-#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
#define SHIFT 0
#include "softmmu_template.h"