Showing the changes to tests (1 of 1 file). Show all
Unified · Split
| @@ -3225,9 +3225,17 @@ static __inline__ void sigdelset1(unsigned int *set, int _sig) · 3224 unmodified lines | |||
| 3225 | asm("btrl %1,%0" : "=m"(*set) : "Ir"(_sig - 1) : "cc", "flags"); | 3225 | asm("btrl %1,%0" : "=m"(*set) : "Ir"(_sig - 1) : "cc", "flags"); |
| 3226 | } | 3226 | } |
| 3227 | 3227 | ||
| 3228 | #ifndef __APPLE__ | 3228 | #ifdef __clang__ |
| 3229 | /* clang's inline asm is uncapable of 'xchgb %b0,%h0' */ | 3229 | /* clang's inline asm is uncapable of 'xchgb %b0,%h0' */ |
| 3230 | static __inline__ __const__ unsigned int swab32(unsigned int x) | 3230 | static __inline__ __const__ unsigned int swab32(unsigned int x) |
| 3231 | { | ||
| 3232 | return ((x >> 24) & 0xff) | | ||
| 3233 | ((x >> 8) & 0xff00) | | ||
| 3234 | ((x << 8) & 0xff0000) | | ||
| 3235 | ((x << 24) & 0xff000000); | ||
| 3236 | } | ||
| 3237 | #else | ||
| 3238 | static __inline__ __const__ unsigned int swab32(unsigned int x) | ||
| 3231 | { | 3239 | { |
| 3232 | __asm__("xchgb %b0,%h0\n\t" /* swap lower bytes */ | 3240 | __asm__("xchgb %b0,%h0\n\t" /* swap lower bytes */ |
| 3233 | "rorl $16,%0\n\t" /* swap words */ | 3241 | "rorl $16,%0\n\t" /* swap words */ |
| @@ -3647,9 +3655,7 @@ void asm_test(void) · 413 unmodified lines | |||
| 3647 | __asm__("btsl %1,%0" : "=m"(set) : "Ir"(20) : "cc"); | 3655 | __asm__("btsl %1,%0" : "=m"(set) : "Ir"(20) : "cc"); |
| 3648 | printf("set=0x%x\n", set); | 3656 | printf("set=0x%x\n", set); |
| 3649 | val = 0x01020304; | 3657 | val = 0x01020304; |
| 3650 | #ifndef __APPLE__ | ||
| 3651 | printf("swab32(0x%08x) = 0x%0x\n", val, swab32(val)); | 3658 | printf("swab32(0x%08x) = 0x%0x\n", val, swab32(val)); |
| 3652 | #endif | ||
| 3653 | #ifndef _WIN32 | 3659 | #ifndef _WIN32 |
| 3654 | #ifndef __APPLE__ | 3660 | #ifndef __APPLE__ |
| 3655 | override_func1(); | 3661 | override_func1(); |