1 #ifndef EXEC_USER_ABITYPES_H
2 #define EXEC_USER_ABITYPES_H
7 #define TARGET_ABI_BITS 32
9 #define TARGET_ABI_BITS TARGET_LONG_BITS
13 #define ABI_INT_ALIGNMENT 2
14 #define ABI_LONG_ALIGNMENT 2
15 #define ABI_LLONG_ALIGNMENT 2
18 #if defined(TARGET_I386) && !defined(TARGET_X86_64)
19 #define ABI_LLONG_ALIGNMENT 4
22 #ifndef ABI_SHORT_ALIGNMENT
23 #define ABI_SHORT_ALIGNMENT 2
25 #ifndef ABI_INT_ALIGNMENT
26 #define ABI_INT_ALIGNMENT 4
28 #ifndef ABI_LONG_ALIGNMENT
29 #define ABI_LONG_ALIGNMENT (TARGET_ABI_BITS / 8)
31 #ifndef ABI_LLONG_ALIGNMENT
32 #define ABI_LLONG_ALIGNMENT 8
35 typedef int16_t abi_short
__attribute__ ((aligned(ABI_SHORT_ALIGNMENT
)));
36 typedef uint16_t abi_ushort
__attribute__((aligned(ABI_SHORT_ALIGNMENT
)));
37 typedef int32_t abi_int
__attribute__((aligned(ABI_INT_ALIGNMENT
)));
38 typedef uint32_t abi_uint
__attribute__((aligned(ABI_INT_ALIGNMENT
)));
39 typedef int64_t abi_llong
__attribute__((aligned(ABI_LLONG_ALIGNMENT
)));
40 typedef uint64_t abi_ullong
__attribute__((aligned(ABI_LLONG_ALIGNMENT
)));
43 typedef uint32_t abi_ulong
__attribute__((aligned(ABI_LONG_ALIGNMENT
)));
44 typedef int32_t abi_long
__attribute__((aligned(ABI_LONG_ALIGNMENT
)));
45 #define TARGET_ABI_FMT_lx "%08x"
46 #define TARGET_ABI_FMT_ld "%d"
47 #define TARGET_ABI_FMT_lu "%u"
49 static inline abi_ulong
tswapal(abi_ulong v
)
55 typedef target_ulong abi_ulong
__attribute__((aligned(ABI_LONG_ALIGNMENT
)));
56 typedef target_long abi_long
__attribute__((aligned(ABI_LONG_ALIGNMENT
)));
57 #define TARGET_ABI_FMT_lx TARGET_FMT_lx
58 #define TARGET_ABI_FMT_ld TARGET_FMT_ld
59 #define TARGET_ABI_FMT_lu TARGET_FMT_lu
60 /* for consistency, define ABI32 too */
61 #if TARGET_ABI_BITS == 32
62 #define TARGET_ABI32 1
65 static inline abi_ulong
tswapal(abi_ulong v
)