Differences From Artifact [8e5d433333]:
- File
src/macros.h
— part of check-in
[f2891af000]
at
2023-10-15 14:59:45
on branch trunk
— macros.h: Add missing #else
Nothing breaks, but just in case we ever have an Objective-C compiler
that is not GCC-compatible. (user: js, size: 19157) [annotate] [blame] [check-ins using]
To Artifact [36c9f66b6e]:
- File src/macros.h — part of check-in [a1ab43e0b3] at 2023-10-26 19:42:17 on branch trunk — Make headers compatible with -masm=intel (user: js, size: 19195) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
486 487 488 489 490 491 492 | static OF_INLINE uint16_t OF_CONST_FUNC OFByteSwap16NonConst(uint16_t i) { #if defined(OF_HAVE_BUILTIN_BSWAP16) return __builtin_bswap16(i); #elif (defined(OF_AMD64) || defined(OF_X86)) && defined(__GNUC__) __asm__ ( | | | 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 | static OF_INLINE uint16_t OF_CONST_FUNC OFByteSwap16NonConst(uint16_t i) { #if defined(OF_HAVE_BUILTIN_BSWAP16) return __builtin_bswap16(i); #elif (defined(OF_AMD64) || defined(OF_X86)) && defined(__GNUC__) __asm__ ( "xchg{b} { %h0, %b0 | %b0, %h0 }" : "=Q"(i) : "0"(i) ); #elif defined(OF_POWERPC) && defined(__GNUC__) __asm__ ( "lhbrx %0, 0, %1" : "=r"(i) |
︙ | ︙ | |||
554 555 556 557 558 559 560 | __asm__ ( "bswap %0" : "=r"(i) : "0"(i) ); #elif defined(OF_X86) && defined(__GNUC__) __asm__ ( | | | | | 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 | __asm__ ( "bswap %0" : "=r"(i) : "0"(i) ); #elif defined(OF_X86) && defined(__GNUC__) __asm__ ( "bswap {%%}eax\n\t" "bswap {%%}edx\n\t" "xchg{l} { %%eax, %%edx | edx, eax }" : "=A"(i) : "0"(i) ); #else i = (uint64_t)OFByteSwap32NonConst( (uint32_t)(i & UINT32_C(0xFFFFFFFF))) << 32 | OFByteSwap32NonConst((uint32_t)(i >> 32)); |
︙ | ︙ |