Changeset 199366 in webkit


Ignore:
Timestamp:
Apr 12, 2016 9:44:36 AM (8 years ago)
Author:
commit-queue@webkit.org
Message:

S390X and PPC64 architectures detection is wrong
https://bugs.webkit.org/show_bug.cgi?id=156337

Patch by Tomas Popela <tpopela@redhat.com> on 2016-04-12
Reviewed by Carlos Garcia Campos.

After the http://trac.webkit.org/changeset/198919 was committed
it showed that the PPC64 detection is wrong as the CPU(PPC) path was
activated even for PPC64. The thing is that GCC defines ppc
even on PPC64 and not just on PPC(32). The same applies for S390X.

  • wtf/Platform.h:
Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r199299 r199366  
     12016-04-12  Tomas Popela  <tpopela@redhat.com>
     2
     3        S390X and PPC64 architectures detection is wrong
     4        https://bugs.webkit.org/show_bug.cgi?id=156337
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        After the http://trac.webkit.org/changeset/198919 was committed
     9        it showed that the PPC64 detection is wrong as the CPU(PPC) path was
     10        activated even for PPC64. The thing is that GCC defines __ppc__
     11        even on PPC64 and not just on PPC(32). The same applies for S390X.
     12
     13        * wtf/Platform.h:
     14
    1152016-04-05  Oliver Hunt  <oliver@apple.com>
    216
  • trunk/Source/WTF/wtf/Platform.h

    r199299 r199366  
    104104#endif /* MIPS */
    105105
     106/* CPU(PPC64) - PowerPC 64-bit Big Endian */
     107#if (  defined(__ppc64__)      \
     108    || defined(__PPC64__))     \
     109    && defined(__BYTE_ORDER__) \
     110    && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
     111#define WTF_CPU_PPC64 1
     112#define WTF_CPU_BIG_ENDIAN 1
     113#endif
     114
     115/* CPU(PPC64) - PowerPC 64-bit Little Endian */
     116#if (   defined(__ppc64__)     \
     117    || defined(__PPC64__)      \
     118    || defined(__ppc64le__)    \
     119    || defined(__PPC64LE__))   \
     120    && defined(__BYTE_ORDER__) \
     121    && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
     122#define WTF_CPU_PPC64LE 1
     123#endif
     124
    106125/* CPU(PPC) - PowerPC 32-bit */
    107126#if (  defined(__ppc__)        \
     
    112131    || defined(_M_PPC)         \
    113132    || defined(__PPC))         \
     133    && !CPU(PPC64)             \
    114134    && defined(__BYTE_ORDER__) \
    115135    && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
     
    118138#endif
    119139
    120 /* CPU(PPC64) - PowerPC 64-bit Big Endian */
    121 #if (  defined(__ppc64__)      \
    122     || defined(__PPC64__))     \
    123     && defined(__BYTE_ORDER__) \
    124     && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
    125 #define WTF_CPU_PPC64 1
    126 #define WTF_CPU_BIG_ENDIAN 1
    127 #endif
    128 
    129 /* CPU(PPC64) - PowerPC 64-bit Little Endian */
    130 #if (   defined(__ppc64__)     \
    131     || defined(__PPC64__)      \
    132     || defined(__ppc64le__)    \
    133     || defined(__PPC64LE__))   \
    134     && defined(__BYTE_ORDER__) \
    135     && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
    136 #define WTF_CPU_PPC64LE 1
    137 #endif
    138 
    139140/* CPU(SH4) - SuperH SH-4 */
    140141#if defined(__SH4__)
     
    149150
    150151/* CPU(S390) - S390 32-bit */
    151 #if defined(__s390__)
     152#if (  defined(__s390__)        \
     153    && !CPU(S390X))
    152154#define WTF_CPU_S390 1
    153155#define WTF_CPU_BIG_ENDIAN 1
Note: See TracChangeset for help on using the changeset viewer.