diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-10-29 14:39:49 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-10-29 14:39:49 +0000 |
commit | 273af66025e8cc6982febfb4a74a8d9106a92440 (patch) | |
tree | 9e82d63fb3e399c63db425ab6908ce71001bade9 | |
parent | b50a6563d8590675905b730d32f17fa119664e0e (diff) | |
download | qemu-273af66025e8cc6982febfb4a74a8d9106a92440.zip qemu-273af66025e8cc6982febfb4a74a8d9106a92440.tar.gz qemu-273af66025e8cc6982febfb4a74a8d9106a92440.tar.bz2 |
Adjust s390 addresses (the MSB is defined as "to be ignored").
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3486 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | target-alpha/op_helper.c | 6 | ||||
-rw-r--r-- | target-arm/op_helper.c | 6 | ||||
-rw-r--r-- | target-cris/op_helper.c | 6 | ||||
-rw-r--r-- | target-i386/helper.c | 6 | ||||
-rw-r--r-- | target-m68k/op_helper.c | 6 | ||||
-rw-r--r-- | target-mips/op_helper.c | 6 | ||||
-rw-r--r-- | target-ppc/op_helper.c | 6 | ||||
-rw-r--r-- | target-sh4/op_helper.c | 6 | ||||
-rw-r--r-- | target-sparc/op_helper.c | 6 |
9 files changed, 45 insertions, 9 deletions
diff --git a/target-alpha/op_helper.c b/target-alpha/op_helper.c index ae8470b..fa1e6ac 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 diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c index c0e7c8d..6e14a4d 100644 --- a/target-arm/op_helper.c +++ b/target-arm/op_helper.c @@ -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" diff --git a/target-cris/op_helper.c b/target-cris/op_helper.c index 4f0f07c..d0ec519 100644 --- a/target-cris/op_helper.c +++ b/target-cris/op_helper.c @@ -23,7 +23,11 @@ #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" diff --git a/target-i386/helper.c b/target-i386/helper.c index 88aa82e..bb927f6 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -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" diff --git a/target-m68k/op_helper.c b/target-m68k/op_helper.c index 917ef52..80ec890 100644 --- a/target-m68k/op_helper.c +++ b/target-m68k/op_helper.c @@ -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" 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 */ diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c index 751bd72..da5a6f5 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" diff --git a/target-sh4/op_helper.c b/target-sh4/op_helper.c index 2535b8d..c1bc4e8 100644 --- a/target-sh4/op_helper.c +++ b/target-sh4/op_helper.c @@ -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" diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c index ccadf85..3746788 100644 --- a/target-sparc/op_helper.c +++ b/target-sparc/op_helper.c @@ -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" |