Fix the atomicIncrement implementation for MIPS GCC
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Feb 2013 18:55:12 +0000 (18:55 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Feb 2013 18:55:12 +0000 (18:55 +0000)
commite9fd52c058b1054fd5800af94555dd7735bd0641
treeb7d5c9c526b630500c3524e7f3c12becbe3e822d
parentacb73909ff7b70c8d0e104b66670cc0a56dadc31
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144077 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/GNUmakefile.list.am
Source/WTF/WTF.pro
Source/WTF/wtf/Atomics.cpp [new file with mode: 0644]
Source/WTF/wtf/CMakeLists.txt