mirror of https://github.com/PCSX2/pcsx2.git
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:
parent
56b2c009cd
commit
9b572d2d47
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue