]> xenbits.xensource.com Git - qemu-xen-3.3-testing.git/commitdiff
Adjust s390 addresses (the MSB is defined as "to be ignored").
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 29 Oct 2007 14:39:49 +0000 (14:39 +0000)
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 29 Oct 2007 14:39:49 +0000 (14:39 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3486 c046a42c-6fe2-441c-8c8c-71466251a162

target-alpha/op_helper.c
target-arm/op_helper.c
target-cris/op_helper.c
target-i386/helper.c
target-m68k/op_helper.c
target-mips/op_helper.c
target-ppc/op_helper.c
target-sh4/op_helper.c
target-sparc/op_helper.c

index ae8470b59567c717963e234ce5e9ae5d66de6562..fa1e6acc5a063a72aa70a1e2513586aaf883e8e5 100644 (file)
@@ -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
index c0e7c8d64abecef026d9ba1301e6b20fb761e9fb..6e14a4dff280cebfc0c44808db38501d67cc315e 100644 (file)
@@ -178,7 +178,11 @@ void do_vfp_get_fpscr(void)
 #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"
index 4f0f07cd4d04d84e66800ad3cfb06caa124f34b0..d0ec519b19f3179a642a70e6ed777985becfaffc 100644 (file)
 #include "exec.h"
 
 #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"
index 88aa82e42a6c677f3c4def6d753f88c4779cb3ff..bb927f673dc6c8bdffcd2288c0a7c988743d6e33 100644 (file)
@@ -3865,7 +3865,11 @@ void update_fp_status(void)
 #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"
index 917ef52880c931acd1b26e04767d1a5593ac46b7..80ec89040f15626e76b6bc86c995f69a2ee27df1 100644 (file)
@@ -31,7 +31,11 @@ void do_interrupt(int is_hw)
 extern int semihosting_enabled;
 
 #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"
index 3c04c55d833baa5015112448ed0e40bd05081b6b..50c76d1ca0d282f742f254cbc8d00a7d088937c2 100644 (file)
 
 #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 */
index 751bd7212cea2df3f8619884f5b9d6c75cc8efec..da5a6f5e37534f12d957a51f3844ceb70830c4d9 100644 (file)
@@ -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"
index 2535b8d6aa3204c21e24ab03084157378dcc8e66..c1bc4e8942d0071b162549c20d8104f7b459af7b 100644 (file)
@@ -28,7 +28,11 @@ void do_raise_exception(void)
 #ifndef 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"
index ccadf85104b5e206a89c6a7a5f394bc3981f12db..37467887960ed3ae3d89b8dda1b1d522875217e4 100644 (file)
@@ -1680,7 +1680,11 @@ static void do_unaligned_access(target_ulong addr, int is_write, int is_user,
 
 #define MMUSUFFIX _mmu
 #define ALIGNED_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
 
 #define SHIFT 0
 #include "softmmu_template.h"