2 pr61306-2.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)(int16_t)(x) & (uint32_t)0x00ffff00UL) << 8) | \
17 (((uint32_t) (x) & (uint32_t)0x00ff0000UL) >> 8) | \
18 (((uint32_t) (x) & (uint32_t)0xff000000UL) >> 24)))
21 /* Previous version of bswap optimization failed to consider sign extension
22 and as a result would replace an expression *not* doing a bswap by a
25 #ifndef __SDCC_pdk14 // Lack of memory
27 fake_bswap32 (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 (sizeof (int16_t) * CHAR_BIT
!= 16)
41 if (fake_bswap32 (0x81828384) != 0xff838281)