GSdx: Linux: Fix AVX2 CPU build with TSX disabled

On Linux, CPUs with AVX2 instruction sets that have TSX disabled (by
microcode update or otherwise) fail to build GSdx. The __RTM__ macro is
undefined, with leads to the TSX RTM instruction set (_xbegin, _xend,
_xabort, etc.) being unavailable.

Modify the preprocessor check so that the RTM instructions are only used
if available.
This commit is contained in:
turtleli 2015-02-12 14:31:12 +00:00 committed by Jonathan Li
parent 56b2c009cd
commit 9b572d2d47
1 changed files with 2 additions and 2 deletions

View File

@ -485,7 +485,7 @@ public:
TransactionScope(Lock& fallBackLock_, int max_retries = 3)
: fallBackLock(fallBackLock_)
{
#if _M_SSE >= 0x501
#if (_M_SSE >= 0x501 && !defined(__GNUC__)) || defined(__RTM__)
int nretries = 0;
@ -528,7 +528,7 @@ public:
{
fallBackLock.unlock();
}
#if _M_SSE >= 0x501
#if (_M_SSE >= 0x501 && !defined(__GNUC__)) || defined(__RTM__)
else
{
_xend();