2 pr60454.c from the execute part of the gcc torture tests.
14 #define fake_const_swab32(x) ((uint32_t)( \
15 (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \
16 (((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \
17 (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 8) | \
18 (((uint32_t)(x) & (uint32_t)0x0000ff00UL) ) | \
19 (((uint32_t)(x) & (uint32_t)0xff000000UL) >> 24)))
21 /* Previous version of bswap optimization would detect byte swap when none
22 happen. This test aims at catching such wrong detection to avoid
25 #ifndef __SDCC_pdk14 // Lack of memory
27 fake_swap32 (uint32_t in
)
29 return fake_const_swab32 (in
);
34 testTortureExecute (void)
36 #ifndef __SDCC_pdk14 // Lack of memory
37 if (sizeof (uint32_t) * CHAR_BIT
!= 32)
39 if (fake_swap32 (0x12345678UL
) != 0x78567E12UL
)