Changeset 144077 in webkit


Ignore:
Timestamp:
Feb 26, 2013 10:55:12 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Fix the atomicIncrement implementation for MIPS GCC
https://bugs.webkit.org/show_bug.cgi?id=106739

Patch by Balazs Kilvady <kilvadyb@homejinni.com> on 2013-02-26
Reviewed by Oliver Hunt.

Implementation of missing sync_[add|sub]_and_fetch_8 functions.

Some architectures, like MIPS32, don't have GCC implementation for
builtin sync_* functions with 64 bits variable size. GCC answer
for the problem: If a target doesn't support atomic operations on
certain variable sizes, you are out of luck with atomicity in that
case (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56296). GCC >= 4.8
will support
atomic_* builtin functions for this purpose for all
the GCC targets, but for current compilers we have to include our
own implementation.

  • GNUmakefile.list.am:
  • WTF.pro:
  • wtf/Atomics.cpp: Added.

(WTF):
(WTF::getSwapLock):
(WTF::atomicStep):

  • wtf/CMakeLists.txt:
Location:
trunk/Source/WTF
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r144071 r144077  
     12013-02-26  Balazs Kilvady  <kilvadyb@homejinni.com>
     2
     3        Fix the atomicIncrement implementation for MIPS GCC
     4        https://bugs.webkit.org/show_bug.cgi?id=106739
     5
     6        Reviewed by Oliver Hunt.
     7
     8        Implementation of missing __sync_[add|sub]_and_fetch_8 functions.
     9
     10        Some architectures, like MIPS32, don't have GCC implementation for
     11        builtin __sync_* functions with 64 bits variable size. GCC answer
     12        for the problem: If a target doesn't support atomic operations on
     13        certain variable sizes, you are out of luck with atomicity in that
     14        case (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56296). GCC >= 4.8
     15        will support __atomic_* builtin functions for this purpose for all
     16        the GCC targets, but for current compilers we have to include our
     17        own implementation.
     18
     19        * GNUmakefile.list.am:
     20        * WTF.pro:
     21        * wtf/Atomics.cpp: Added.
     22        (WTF):
     23        (WTF::getSwapLock):
     24        (WTF::atomicStep):
     25        * wtf/CMakeLists.txt:
     26
    1272013-02-26  Oliver Hunt  <oliver@apple.com>
    228
  • trunk/Source/WTF/GNUmakefile.list.am

    r143618 r144077  
    1212    Source/WTF/wtf/Assertions.cpp \
    1313    Source/WTF/wtf/Assertions.h \
     14    Source/WTF/wtf/Atomics.cpp \
    1415    Source/WTF/wtf/Atomics.h \
    1516    Source/WTF/wtf/BitArray.h \
  • trunk/Source/WTF/WTF.pro

    r143211 r144077  
    198198    ArrayBufferView.cpp \
    199199    Assertions.cpp \
     200    Atomics.cpp \
    200201    BitVector.cpp \
    201202    CryptographicallyRandomNumber.cpp \
  • trunk/Source/WTF/wtf/CMakeLists.txt

    r143211 r144077  
    160160    ArrayBufferView.cpp
    161161    Assertions.cpp
     162    Atomics.cpp
    162163    BitVector.cpp
    163164    CryptographicallyRandomNumber.cpp
Note: See TracChangeset for help on using the changeset viewer.