6 #define TARGET_ABI_BITS 32
8 #define TARGET_ABI_BITS TARGET_LONG_BITS
12 #define ABI_INT_ALIGNMENT 2
13 #define ABI_LONG_ALIGNMENT 2
14 #define ABI_LLONG_ALIGNMENT 2
18 #define ABI_LLONG_ALIGNMENT 4
21 #ifndef ABI_SHORT_ALIGNMENT
22 #define ABI_SHORT_ALIGNMENT 2
24 #ifndef ABI_INT_ALIGNMENT
25 #define ABI_INT_ALIGNMENT 4
27 #ifndef ABI_LONG_ALIGNMENT
28 #define ABI_LONG_ALIGNMENT (TARGET_ABI_BITS / 8)
30 #ifndef ABI_LLONG_ALIGNMENT
31 #define ABI_LLONG_ALIGNMENT 8
34 typedef int16_t abi_short
__attribute__ ((aligned(ABI_SHORT_ALIGNMENT
)));
35 typedef uint16_t abi_ushort
__attribute__((aligned(ABI_SHORT_ALIGNMENT
)));
36 typedef int32_t abi_int
__attribute__((aligned(ABI_INT_ALIGNMENT
)));
37 typedef uint32_t abi_uint
__attribute__((aligned(ABI_INT_ALIGNMENT
)));
38 typedef int64_t abi_llong
__attribute__((aligned(ABI_LLONG_ALIGNMENT
)));
39 typedef uint64_t abi_ullong
__attribute__((aligned(ABI_LLONG_ALIGNMENT
)));
42 typedef uint32_t abi_ulong
__attribute__((aligned(ABI_LONG_ALIGNMENT
)));
43 typedef int32_t abi_long
__attribute__((aligned(ABI_LONG_ALIGNMENT
)));
44 #define TARGET_ABI_FMT_lx "%08x"
45 #define TARGET_ABI_FMT_ld "%d"
46 #define TARGET_ABI_FMT_lu "%u"
48 static inline abi_ulong
tswapal(abi_ulong v
)
54 typedef target_ulong abi_ulong
__attribute__((aligned(ABI_LONG_ALIGNMENT
)));
55 typedef target_long abi_long
__attribute__((aligned(ABI_LONG_ALIGNMENT
)));
56 #define TARGET_ABI_FMT_lx TARGET_FMT_lx
57 #define TARGET_ABI_FMT_ld TARGET_FMT_ld
58 #define TARGET_ABI_FMT_lu TARGET_FMT_lu
59 /* for consistency, define ABI32 too */
60 #if TARGET_ABI_BITS == 32
61 #define TARGET_ABI32 1
64 static inline abi_ulong
tswapal(abi_ulong v
)