Commit 273af66025e8cc6982febfb4a74a8d9106a92440
1 parent
b50a6563
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
Showing
9 changed files
with
45 additions
and
9 deletions
target-alpha/op_helper.c
... | ... | @@ -1076,7 +1076,11 @@ void helper_mtpr (int iprn) |
1076 | 1076 | /* Softmmu support */ |
1077 | 1077 | #if !defined (CONFIG_USER_ONLY) |
1078 | 1078 | |
1079 | -#define GETPC() (__builtin_return_address(0)) | |
1079 | +#ifdef __s390__ | |
1080 | +# define GETPC() ((void*)((unsigned long)__builtin_return_address(0) & 0x7fffffffUL)) | |
1081 | +#else | |
1082 | +# define GETPC() (__builtin_return_address(0)) | |
1083 | +#endif | |
1080 | 1084 | |
1081 | 1085 | /* XXX: the two following helpers are pure hacks. |
1082 | 1086 | * Hopefully, we emulate the PALcode, then we should never see | ... | ... |
target-arm/op_helper.c
... | ... | @@ -178,7 +178,11 @@ void do_vfp_get_fpscr(void) |
178 | 178 | #if !defined(CONFIG_USER_ONLY) |
179 | 179 | |
180 | 180 | #define MMUSUFFIX _mmu |
181 | -#define GETPC() (__builtin_return_address(0)) | |
181 | +#ifdef __s390__ | |
182 | +# define GETPC() ((void*)((unsigned long)__builtin_return_address(0) & 0x7fffffffUL)) | |
183 | +#else | |
184 | +# define GETPC() (__builtin_return_address(0)) | |
185 | +#endif | |
182 | 186 | |
183 | 187 | #define SHIFT 0 |
184 | 188 | #include "softmmu_template.h" | ... | ... |
target-cris/op_helper.c
... | ... | @@ -23,7 +23,11 @@ |
23 | 23 | #include "exec.h" |
24 | 24 | |
25 | 25 | #define MMUSUFFIX _mmu |
26 | -#define GETPC() (__builtin_return_address(0)) | |
26 | +#ifdef __s390__ | |
27 | +# define GETPC() ((void*)((unsigned long)__builtin_return_address(0) & 0x7fffffffUL)) | |
28 | +#else | |
29 | +# define GETPC() (__builtin_return_address(0)) | |
30 | +#endif | |
27 | 31 | |
28 | 32 | #define SHIFT 0 |
29 | 33 | #include "softmmu_template.h" | ... | ... |
target-i386/helper.c
... | ... | @@ -3865,7 +3865,11 @@ void update_fp_status(void) |
3865 | 3865 | #if !defined(CONFIG_USER_ONLY) |
3866 | 3866 | |
3867 | 3867 | #define MMUSUFFIX _mmu |
3868 | -#define GETPC() (__builtin_return_address(0)) | |
3868 | +#ifdef __s390__ | |
3869 | +# define GETPC() ((void*)((unsigned long)__builtin_return_address(0) & 0x7fffffffUL)) | |
3870 | +#else | |
3871 | +# define GETPC() (__builtin_return_address(0)) | |
3872 | +#endif | |
3869 | 3873 | |
3870 | 3874 | #define SHIFT 0 |
3871 | 3875 | #include "softmmu_template.h" | ... | ... |
target-m68k/op_helper.c
... | ... | @@ -31,7 +31,11 @@ void do_interrupt(int is_hw) |
31 | 31 | extern int semihosting_enabled; |
32 | 32 | |
33 | 33 | #define MMUSUFFIX _mmu |
34 | -#define GETPC() (__builtin_return_address(0)) | |
34 | +#ifdef __s390__ | |
35 | +# define GETPC() ((void*)((unsigned long)__builtin_return_address(0) & 0x7fffffffUL)) | |
36 | +#else | |
37 | +# define GETPC() (__builtin_return_address(0)) | |
38 | +#endif | |
35 | 39 | |
36 | 40 | #define SHIFT 0 |
37 | 41 | #include "softmmu_template.h" | ... | ... |
target-mips/op_helper.c
... | ... | @@ -22,7 +22,11 @@ |
22 | 22 | |
23 | 23 | #include "host-utils.h" |
24 | 24 | |
25 | -#define GETPC() (__builtin_return_address(0)) | |
25 | +#ifdef __s390__ | |
26 | +# define GETPC() ((void*)((unsigned long)__builtin_return_address(0) & 0x7fffffffUL)) | |
27 | +#else | |
28 | +# define GETPC() (__builtin_return_address(0)) | |
29 | +#endif | |
26 | 30 | |
27 | 31 | /*****************************************************************************/ |
28 | 32 | /* Exceptions processing helpers */ | ... | ... |
target-ppc/op_helper.c
... | ... | @@ -2732,7 +2732,11 @@ DO_SPE_OP1(fsctuf); |
2732 | 2732 | #if !defined (CONFIG_USER_ONLY) |
2733 | 2733 | |
2734 | 2734 | #define MMUSUFFIX _mmu |
2735 | -#define GETPC() (__builtin_return_address(0)) | |
2735 | +#ifdef __s390__ | |
2736 | +# define GETPC() ((void*)((unsigned long)__builtin_return_address(0) & 0x7fffffffUL)) | |
2737 | +#else | |
2738 | +# define GETPC() (__builtin_return_address(0)) | |
2739 | +#endif | |
2736 | 2740 | |
2737 | 2741 | #define SHIFT 0 |
2738 | 2742 | #include "softmmu_template.h" | ... | ... |
target-sh4/op_helper.c
... | ... | @@ -28,7 +28,11 @@ void do_raise_exception(void) |
28 | 28 | #ifndef CONFIG_USER_ONLY |
29 | 29 | |
30 | 30 | #define MMUSUFFIX _mmu |
31 | -#define GETPC() (__builtin_return_address(0)) | |
31 | +#ifdef __s390__ | |
32 | +# define GETPC() ((void*)((unsigned long)__builtin_return_address(0) & 0x7fffffffUL)) | |
33 | +#else | |
34 | +# define GETPC() (__builtin_return_address(0)) | |
35 | +#endif | |
32 | 36 | |
33 | 37 | #define SHIFT 0 |
34 | 38 | #include "softmmu_template.h" | ... | ... |
target-sparc/op_helper.c
... | ... | @@ -1680,7 +1680,11 @@ static void do_unaligned_access(target_ulong addr, int is_write, int is_user, |
1680 | 1680 | |
1681 | 1681 | #define MMUSUFFIX _mmu |
1682 | 1682 | #define ALIGNED_ONLY |
1683 | -#define GETPC() (__builtin_return_address(0)) | |
1683 | +#ifdef __s390__ | |
1684 | +# define GETPC() ((void*)((unsigned long)__builtin_return_address(0) & 0x7fffffffUL)) | |
1685 | +#else | |
1686 | +# define GETPC() (__builtin_return_address(0)) | |
1687 | +#endif | |
1684 | 1688 | |
1685 | 1689 | #define SHIFT 0 |
1686 | 1690 | #include "softmmu_template.h" | ... | ... |