aboutsummaryrefslogtreecommitdiff
path: root/target-mips/op_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-mips/op_helper.c')
-rw-r--r--target-mips/op_helper.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
index 3c04c55..50c76d1 100644
--- a/target-mips/op_helper.c
+++ b/target-mips/op_helper.c
@@ -22,7 +22,11 @@
#include "host-utils.h"
-#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
/*****************************************************************************/
/* Exceptions processing helpers */