Commit 1609cd444b7d3a759cd09342140464576d0e96e2
1 parent
178baee6
linux-user: Move abi_* typedefs into qemu-types.h
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5954 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
4 changed files
with
50 additions
and
38 deletions
bsd-user/qemu-types.h
0 → 100644
| 1 | +#ifndef QEMU_TYPES_H | |
| 2 | +#define QEMU_TYPES_H | |
| 3 | +#include "cpu.h" | |
| 4 | + | |
| 5 | +#ifdef TARGET_ABI32 | |
| 6 | +typedef uint32_t abi_ulong; | |
| 7 | +typedef int32_t abi_long; | |
| 8 | +#define TARGET_ABI_FMT_lx "%08x" | |
| 9 | +#define TARGET_ABI_FMT_ld "%d" | |
| 10 | +#define TARGET_ABI_FMT_lu "%u" | |
| 11 | +#define TARGET_ABI_BITS 32 | |
| 12 | +#else | |
| 13 | +typedef target_ulong abi_ulong; | |
| 14 | +typedef target_long abi_long; | |
| 15 | +#define TARGET_ABI_FMT_lx TARGET_FMT_lx | |
| 16 | +#define TARGET_ABI_FMT_ld TARGET_FMT_ld | |
| 17 | +#define TARGET_ABI_FMT_lu TARGET_FMT_lu | |
| 18 | +#define TARGET_ABI_BITS TARGET_LONG_BITS | |
| 19 | +/* for consistency, define ABI32 too */ | |
| 20 | +#if TARGET_ABI_BITS == 32 | |
| 21 | +#define TARGET_ABI32 1 | |
| 22 | +#endif | |
| 23 | +#endif | |
| 24 | +#endif | ... | ... |
bsd-user/qemu.h
| ... | ... | @@ -11,25 +11,7 @@ |
| 11 | 11 | #include <stdlib.h> |
| 12 | 12 | #endif /* DEBUG_REMAP */ |
| 13 | 13 | |
| 14 | -#ifdef TARGET_ABI32 | |
| 15 | -typedef uint32_t abi_ulong; | |
| 16 | -typedef int32_t abi_long; | |
| 17 | -#define TARGET_ABI_FMT_lx "%08x" | |
| 18 | -#define TARGET_ABI_FMT_ld "%d" | |
| 19 | -#define TARGET_ABI_FMT_lu "%u" | |
| 20 | -#define TARGET_ABI_BITS 32 | |
| 21 | -#else | |
| 22 | -typedef target_ulong abi_ulong; | |
| 23 | -typedef target_long abi_long; | |
| 24 | -#define TARGET_ABI_FMT_lx TARGET_FMT_lx | |
| 25 | -#define TARGET_ABI_FMT_ld TARGET_FMT_ld | |
| 26 | -#define TARGET_ABI_FMT_lu TARGET_FMT_lu | |
| 27 | -#define TARGET_ABI_BITS TARGET_LONG_BITS | |
| 28 | -/* for consistency, define ABI32 too */ | |
| 29 | -#if TARGET_ABI_BITS == 32 | |
| 30 | -#define TARGET_ABI32 1 | |
| 31 | -#endif | |
| 32 | -#endif | |
| 14 | +#include "qemu-types.h" | |
| 33 | 15 | |
| 34 | 16 | enum BSDType { |
| 35 | 17 | target_freebsd, | ... | ... |
linux-user/qemu-types.h
0 → 100644
| 1 | +#ifndef QEMU_TYPES_H | |
| 2 | +#define QEMU_TYPES_H | |
| 3 | +#include "cpu.h" | |
| 4 | + | |
| 5 | +#ifdef TARGET_ABI32 | |
| 6 | +typedef uint32_t abi_ulong; | |
| 7 | +typedef int32_t abi_long; | |
| 8 | +#define TARGET_ABI_FMT_lx "%08x" | |
| 9 | +#define TARGET_ABI_FMT_ld "%d" | |
| 10 | +#define TARGET_ABI_FMT_lu "%u" | |
| 11 | +#define TARGET_ABI_BITS 32 | |
| 12 | +#else | |
| 13 | +typedef target_ulong abi_ulong; | |
| 14 | +typedef target_long abi_long; | |
| 15 | +#define TARGET_ABI_FMT_lx TARGET_FMT_lx | |
| 16 | +#define TARGET_ABI_FMT_ld TARGET_FMT_ld | |
| 17 | +#define TARGET_ABI_FMT_lu TARGET_FMT_lu | |
| 18 | +#define TARGET_ABI_BITS TARGET_LONG_BITS | |
| 19 | +/* for consistency, define ABI32 too */ | |
| 20 | +#if TARGET_ABI_BITS == 32 | |
| 21 | +#define TARGET_ABI32 1 | |
| 22 | +#endif | |
| 23 | +#endif | |
| 24 | +#endif | ... | ... |
linux-user/qemu.h
| ... | ... | @@ -11,25 +11,7 @@ |
| 11 | 11 | #include <stdlib.h> |
| 12 | 12 | #endif /* DEBUG_REMAP */ |
| 13 | 13 | |
| 14 | -#ifdef TARGET_ABI32 | |
| 15 | -typedef uint32_t abi_ulong; | |
| 16 | -typedef int32_t abi_long; | |
| 17 | -#define TARGET_ABI_FMT_lx "%08x" | |
| 18 | -#define TARGET_ABI_FMT_ld "%d" | |
| 19 | -#define TARGET_ABI_FMT_lu "%u" | |
| 20 | -#define TARGET_ABI_BITS 32 | |
| 21 | -#else | |
| 22 | -typedef target_ulong abi_ulong; | |
| 23 | -typedef target_long abi_long; | |
| 24 | -#define TARGET_ABI_FMT_lx TARGET_FMT_lx | |
| 25 | -#define TARGET_ABI_FMT_ld TARGET_FMT_ld | |
| 26 | -#define TARGET_ABI_FMT_lu TARGET_FMT_lu | |
| 27 | -#define TARGET_ABI_BITS TARGET_LONG_BITS | |
| 28 | -/* for consistency, define ABI32 too */ | |
| 29 | -#if TARGET_ABI_BITS == 32 | |
| 30 | -#define TARGET_ABI32 1 | |
| 31 | -#endif | |
| 32 | -#endif | |
| 14 | +#include "qemu-types.h" | |
| 33 | 15 | |
| 34 | 16 | #include "thunk.h" |
| 35 | 17 | #include "syscall_defs.h" | ... | ... |