Skip to content

Commit d165680

Browse files
Don't assume _MSC_VER / _WIN32 mean x86/x64.
1 parent 055aa0c commit d165680

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

Common/Common.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ class NonCopyable
120120
#define __chdir chdir
121121
#endif
122122

123-
#if defined __GNUC__
123+
#if !defined(__GNUC__) && (defined(_M_X64) || defined(_M_IX86))
124+
# define _M_SSE 0x402
125+
#else
124126
# if defined __SSE4_2__
125127
# define _M_SSE 0x402
126128
# elif defined __SSE4_1__
@@ -132,8 +134,6 @@ class NonCopyable
132134
# elif defined __SSE2__
133135
# define _M_SSE 0x200
134136
# endif
135-
#elif ((_MSC_VER >= 1500) || __INTEL_COMPILER) && !defined(_XBOX) // Visual Studio 2008
136-
# define _M_SSE 0x402
137137
#endif
138138

139139
#include "Swap.h"

GPU/Common/VertexDecoderCommon.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,18 +1173,16 @@ VertexDecoderJitCache::VertexDecoderJitCache()
11731173
AllocCodeSpace(1024 * 64 * 4);
11741174

11751175
// Add some random code to "help" MSVC's buggy disassembler :(
1176-
#if defined(_WIN32)
1176+
#if defined(_WIN32) && (defined(_M_IX86) || defined(_M_X64))
11771177
using namespace Gen;
11781178
for (int i = 0; i < 100; i++) {
11791179
MOV(32, R(EAX), R(EBX));
11801180
RET();
11811181
}
1182-
#else
1183-
#ifdef ARM
1182+
#elif defined(ARM)
11841183
BKPT(0);
11851184
BKPT(0);
11861185
#endif
1187-
#endif
11881186
}
11891187

11901188
void VertexDecoderJitCache::Clear() {

0 commit comments

Comments
 (0)