Use _M_IX86 and _M_X64 to indicate MSVC x86/x64
_WIN32 is defined on ARM MinGW as well, which breaks current assumptions
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
|
||||
#ifdef __amd64__
|
||||
#include "codegen_x86-64.h"
|
||||
#elif defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined _WIN32
|
||||
#elif defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined _M_IX86 || defined _M_X64
|
||||
#include "codegen_x86.h"
|
||||
#else
|
||||
#error Dynamic recompiler not implemented on your platform
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
#ifdef __amd64__
|
||||
#include "codegen_ops_x86-64.h"
|
||||
#elif defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined _WIN32
|
||||
#elif defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined _M_IX86 || defined _M_X64
|
||||
#include "codegen_ops_x86.h"
|
||||
#endif
|
||||
|
||||
|
@@ -36,7 +36,7 @@
|
||||
* Boston, MA 02111-1307
|
||||
* USA.
|
||||
*/
|
||||
#if defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined _WIN32
|
||||
#if defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined _M_IX86 || defined _M_X64
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
@@ -288,7 +288,7 @@ static __inline void x87_stmmx(MMX_REG r)
|
||||
|
||||
static __inline uint16_t x87_compare(double a, double b)
|
||||
{
|
||||
#if defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined _WIN32
|
||||
#if defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined _M_IX86 || defined _M_X64
|
||||
uint32_t result;
|
||||
|
||||
if (!is386)
|
||||
@@ -354,7 +354,7 @@ static __inline uint16_t x87_compare(double a, double b)
|
||||
#else
|
||||
/* Generic C version is known to give incorrect results in some
|
||||
* situations, eg comparison of infinity (Unreal) */
|
||||
uint32_t out = 0;
|
||||
uint32_t result = 0;
|
||||
|
||||
if (is386)
|
||||
{
|
||||
@@ -383,9 +383,9 @@ static __inline uint16_t x87_compare(double a, double b)
|
||||
|
||||
static __inline uint16_t x87_ucompare(double a, double b)
|
||||
{
|
||||
#if defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined _WIN32
|
||||
#if defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined _M_IX86 || defined _M_X64
|
||||
uint32_t result;
|
||||
|
||||
|
||||
#ifndef _MSC_VER
|
||||
/* Memory barrier, to force GCC to write to the input parameters
|
||||
* before the compare rather than after */
|
||||
|
@@ -96,7 +96,7 @@ static int host_cpu_features(void)
|
||||
static int features = 0;
|
||||
static int features_detected = 0;
|
||||
/* 32-bit only */
|
||||
#if defined(__i386__) || (defined(_MSC_VER) && defined(_WIN32))
|
||||
#if defined(__i386__) || (defined(_MSC_VER) && defined(_M_IX86))
|
||||
unsigned long temp1, temp2;
|
||||
#endif
|
||||
|
||||
@@ -104,7 +104,7 @@ static int host_cpu_features(void)
|
||||
return features;
|
||||
features_detected = 1;
|
||||
|
||||
#if defined(_MSC_VER) && defined(_WIN32) /* MSVC compatible assembly appropriate for 32-bit Windows */
|
||||
#if defined(_MSC_VER) && defined(_M_IX86) /* MSVC compatible assembly appropriate for 32-bit Windows */
|
||||
/* see if we are dealing with a cpu that has the cpuid instruction */
|
||||
__asm {
|
||||
pushf
|
||||
@@ -127,7 +127,7 @@ static int host_cpu_features(void)
|
||||
:
|
||||
: "eax");
|
||||
#endif
|
||||
#if defined(__i386__) || (defined(_MSC_VER) && defined(_WIN32))
|
||||
#if defined(__i386__) || (defined(_MSC_VER) && defined(_M_IX86))
|
||||
temp1 &= 0x200000;
|
||||
temp2 &= 0x200000;
|
||||
if (temp1 == temp2) {
|
||||
|
@@ -2656,9 +2656,9 @@ static inline void voodoo_tmu_fetch_and_blend(voodoo_t *voodoo, voodoo_params_t
|
||||
state->tex_a[0] ^= 0xff;
|
||||
}
|
||||
|
||||
#if ((defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined _WIN32) && !(defined __amd64__) && (defined USE_DYNAREC))
|
||||
#if ((defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined _M_IX86) && !(defined __amd64__ || defined _M_X64) && (defined USE_DYNAREC))
|
||||
#include "vid_voodoo_codegen_x86.h"
|
||||
#elif ((defined __amd64__) && (defined USE_DYNAREC))
|
||||
#elif ((defined __amd64__ || defined _M_X64) && (defined USE_DYNAREC))
|
||||
#include "vid_voodoo_codegen_x86-64.h"
|
||||
#else
|
||||
#define NO_CODEGEN
|
||||
|
Reference in New Issue
Block a user