Only use 64bit atomics when supported
authorAllan Sandfeld Jensen <allan.jensen@digia.com>
Wed, 23 Oct 2013 12:24:27 +0000 (14:24 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 28 Oct 2013 14:42:33 +0000 (15:42 +0100)
commit92a17ec3ed87d86eee5dbea238bab3c3a00396e0
treea74f6b27f95aeeba5ff08c4350f075f0eba2adbf
parentf65ce030982a2ee743bb8adfab4423499d81f379
Only use 64bit atomics when supported

To support Windows XP we must avoid using the 64bit variants of the
atomicIncrement/atomicDecrement operations which are only supported from
Windows 2003 and up.

This patch rolls back the minimum Win32 API version to WinNT 5.1 (32bit WinXP),
and adds a new flag to indicate the support of 64bit atomics.

The new flag is now also used to support MIPS and other architectures
without 64bit intrinsics, instead of hacking in poor support.

This also extends the atomic operations to sparc64 which was previously
skipped because it did not work with __exchange_and_add.

Task-number: QTBUG-34271
Change-Id: I21b09df3cafb7f0987a2f44c89036ff34ed34aa0
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
13 files changed:
Source/JavaScriptCore/config.h
Source/WTF/WTF.pro
Source/WTF/config.h
Source/WTF/wtf/Atomics.cpp [deleted file]
Source/WTF/wtf/Atomics.h
Source/WTF/wtf/Platform.h
Source/WebCore/WebCorePrefix.h
Source/WebCore/config.h
Source/WebKit2/Platform/CoreIPC/Connection.cpp
Source/WebKit2/Platform/CoreIPC/Connection.h
Source/WebKit2/UIProcess/StatisticsRequest.cpp
Source/WebKit2/config.h
Tools/DumpRenderTree/config.h