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
16 #ifndef ABI_SHORT_ALIGNMENT
17 #define ABI_SHORT_ALIGNMENT 2
19 #ifndef ABI_INT_ALIGNMENT
20 #define ABI_INT_ALIGNMENT 4
22 #ifndef ABI_LONG_ALIGNMENT
23 #define ABI_LONG_ALIGNMENT (TARGET_ABI_BITS / 8)
26 typedef int16_t abi_short
__attribute__ ((aligned(ABI_SHORT_ALIGNMENT
)));
27 typedef uint16_t abi_ushort
__attribute__((aligned(ABI_SHORT_ALIGNMENT
)));
28 typedef int32_t abi_int
__attribute__((aligned(ABI_INT_ALIGNMENT
)));
29 typedef uint32_t abi_uint
__attribute__((aligned(ABI_INT_ALIGNMENT
)));
32 typedef uint32_t abi_ulong
__attribute__((aligned(ABI_LONG_ALIGNMENT
)));
33 typedef int32_t abi_long
__attribute__((aligned(ABI_LONG_ALIGNMENT
)));
34 #define TARGET_ABI_FMT_lx "%08x"
35 #define TARGET_ABI_FMT_ld "%d"
36 #define TARGET_ABI_FMT_lu "%u"
38 static inline abi_ulong
tswapal(abi_ulong v
)
44 typedef target_ulong abi_ulong
__attribute__((aligned(ABI_LONG_ALIGNMENT
)));
45 typedef target_long abi_long
__attribute__((aligned(ABI_LONG_ALIGNMENT
)));
46 #define TARGET_ABI_FMT_lx TARGET_FMT_lx
47 #define TARGET_ABI_FMT_ld TARGET_FMT_ld
48 #define TARGET_ABI_FMT_lu TARGET_FMT_lu
49 /* for consistency, define ABI32 too */
50 #if TARGET_ABI_BITS == 32
51 #define TARGET_ABI32 1
54 static inline abi_ulong
tswapal(abi_ulong v
)