2 typedef __UINT32_TYPE__
uint32_t;
4 typedef unsigned uint32_t;
7 #define __fake_const_swab32(x) ((uint32_t)( \
8 (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \
9 (((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \
10 (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 8) | \
11 (((uint32_t)(x) & (uint32_t)0x0000ff00UL) ) | \
12 (((uint32_t)(x) & (uint32_t)0xff000000UL) >> 24)))
14 /* Previous version of bswap optimization would detect byte swap when none
15 happen. This test aims at catching such wrong detection to avoid
18 __attribute__ ((noinline
, noclone
)) uint32_t
19 fake_swap32 (uint32_t in
)
21 return __fake_const_swab32 (in
);
26 if (sizeof (uint32_t) * __CHAR_BIT__
!= 32)
28 if (fake_swap32 (0x12345678UL
) != 0x78567E12UL
)