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
17 #ifndef ABI_SHORT_ALIGNMENT
18 #define ABI_SHORT_ALIGNMENT 2
20 #ifndef ABI_INT_ALIGNMENT
21 #define ABI_INT_ALIGNMENT 4
23 #ifndef ABI_LONG_ALIGNMENT
24 #define ABI_LONG_ALIGNMENT (TARGET_ABI_BITS / 8)
26 #ifndef ABI_LLONG_ALIGNMENT
27 #define ABI_LLONG_ALIGNMENT 8
30 typedef int16_t abi_short __attribute__ ((aligned(ABI_SHORT_ALIGNMENT)));
31 typedef uint16_t abi_ushort __attribute__((aligned(ABI_SHORT_ALIGNMENT)));
32 typedef int32_t abi_int __attribute__((aligned(ABI_INT_ALIGNMENT)));
33 typedef uint32_t abi_uint __attribute__((aligned(ABI_INT_ALIGNMENT)));
34 typedef int64_t abi_llong __attribute__((aligned(ABI_LLONG_ALIGNMENT)));
35 typedef uint64_t abi_ullong __attribute__((aligned(ABI_LLONG_ALIGNMENT)));
38 typedef uint32_t abi_ulong __attribute__((aligned(ABI_LONG_ALIGNMENT)));
39 typedef int32_t abi_long __attribute__((aligned(ABI_LONG_ALIGNMENT)));
40 #define TARGET_ABI_FMT_lx "%08x"
41 #define TARGET_ABI_FMT_ld "%d"
42 #define TARGET_ABI_FMT_lu "%u"
44 static inline abi_ulong tswapal(abi_ulong v)
50 typedef target_ulong abi_ulong __attribute__((aligned(ABI_LONG_ALIGNMENT)));
51 typedef target_long abi_long __attribute__((aligned(ABI_LONG_ALIGNMENT)));
52 #define TARGET_ABI_FMT_lx TARGET_FMT_lx
53 #define TARGET_ABI_FMT_ld TARGET_FMT_ld
54 #define TARGET_ABI_FMT_lu TARGET_FMT_lu
55 /* for consistency, define ABI32 too */
56 #if TARGET_ABI_BITS == 32
57 #define TARGET_ABI32 1
60 static inline abi_ulong tswapal(abi_ulong v)