Remove _M_X86 in favour of _M_X86_64

This commit is contained in:
Zopolis4 2022-08-08 10:18:36 +10:00
parent 69fc7bbdad
commit f0d2ce4683
No known key found for this signature in database
GPG Key ID: C1117D56FBC82774
16 changed files with 27 additions and 29 deletions

View File

@ -219,9 +219,7 @@ if(ENABLE_GENERIC)
set(_M_GENERIC 1)
add_definitions(-D_M_GENERIC=1)
elseif(_ARCH_64 AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64")
set(_M_X86 1)
set(_M_X86_64 1)
add_definitions(-D_M_X86=1)
add_definitions(-D_M_X86_64=1)
check_and_add_flag(HAVE_SSE2 -msse2)
elseif(_ARCH_64 AND CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|arm64")
@ -625,7 +623,7 @@ endif()
# - place the CMakeLists.txt in the first-level subdirectory, e.g.
# Externals/zlib/CMakeLists.txt (that is: NOT in some Src/ subdirectory)
#
if (_M_X86)
if (_M_X86_64)
add_subdirectory(Externals/Bochs_disasm)
endif()
add_subdirectory(Externals/cpp-optparse)

View File

@ -151,7 +151,7 @@
/* Define if you have the iconv() function and it works. */
/* #undef HAVE_ICONV */
#ifdef _M_X86
#ifdef _M_X86_64
/* Define to 1 if you have the <immintrin.h> header file. */
#define HAVE_IMMINTRIN_H 1
#endif
@ -367,7 +367,7 @@
sysctl(). */
/* #undef TUKLIB_CPUCORES_SYSCTL */
#ifdef _M_X86
#ifdef _M_X86_64
/* Define to 1 if the system supports fast unaligned access to 16-bit and
32-bit integers. */
#define TUKLIB_FAST_UNALIGNED_ACCESS 1

View File

@ -220,7 +220,7 @@ if(_M_ARM_64)
ArmFPURoundMode.cpp
)
else()
if(_M_X86) #X86
if(_M_X86_64) #X86
target_sources(common PRIVATE
x64ABI.cpp
x64ABI.h

View File

@ -359,7 +359,7 @@ static u64 GetHash64_SSE42_CRC32(const u8* src, u32 len, u32 samples)
return h[0] + (h[1] << 10) + (h[2] << 21) + (h[3] << 32);
}
#elif defined(_M_X86)
#elif defined(_M_X86_64)
FUNCTION_TARGET_SSE42
static u64 GetHash64_SSE42_CRC32(const u8* src, u32 len, u32 samples)
@ -433,7 +433,7 @@ static u64 SetHash64Function(const u8* src, u32 len, u32 samples)
{
if (cpu_info.bCRC32)
{
#if defined(_M_X86_64) || defined(_M_X86)
#if defined(_M_X86_64)
s_texture_hash_func = &GetHash64_SSE42_CRC32;
#elif defined(_M_ARM_64)
s_texture_hash_func = &GetHash64_ARMv8_CRC32;

View File

@ -3,7 +3,7 @@
#pragma once
#if defined(_M_X86)
#if defined(_M_X86_64)
/**
* It is assumed that all compilers used to build Dolphin support intrinsics up to and including
@ -49,13 +49,13 @@
#endif // defined(_MSC_VER) || defined(__INTEL_COMPILER)
#endif // _M_X86
#endif // _M_X86_64
/**
* Define the FUNCTION_TARGET macros to nothing if they are not needed, or not on an X86 platform.
* This way when a function is defined with FUNCTION_TARGET you don't need to define a second
* version without the macro around a #ifdef guard. Be careful when using intrinsics, as all use
* should still be placed around a #ifdef _M_X86 if the file is compiled on all architectures.
* should still be placed around a #ifdef _M_X86_64 if the file is compiled on all architectures.
*/
#ifndef FUNCTION_TARGET_SSE42
#define FUNCTION_TARGET_SSE42

View File

@ -537,7 +537,7 @@ add_library(core
WiiUtils.h
)
if(_M_X86)
if(_M_X86_64)
target_sources(core PRIVATE
DSP/Jit/x64/DSPEmitter.cpp
DSP/Jit/x64/DSPEmitter.h
@ -640,7 +640,7 @@ PRIVATE
)
if ((DEFINED CMAKE_ANDROID_ARCH_ABI AND CMAKE_ANDROID_ARCH_ABI MATCHES "x86|x86_64") OR
(NOT DEFINED CMAKE_ANDROID_ARCH_ABI AND _M_X86))
(NOT DEFINED CMAKE_ANDROID_ARCH_ABI AND _M_X86_64))
target_link_libraries(core PRIVATE bdisasm)
endif()

View File

@ -3,7 +3,7 @@
#include "Core/DSP/Jit/DSPEmitterBase.h"
#if defined(_M_X86) || defined(_M_X86_64)
#if defined(_M_X86_64)
#include "Core/DSP/Jit/x64/DSPEmitter.h"
#endif
@ -13,7 +13,7 @@ DSPEmitter::~DSPEmitter() = default;
std::unique_ptr<DSPEmitter> CreateDSPEmitter([[maybe_unused]] DSPCore& dsp)
{
#if defined(_M_X86) || defined(_M_X86_64)
#if defined(_M_X86_64)
return std::make_unique<x64::DSPEmitter>(dsp);
#else
return std::make_unique<DSPEmitterNull>();

View File

@ -120,7 +120,7 @@ static bool FillDSPInitOptions(DSPInitOptions* opts)
return false;
opts->core_type = DSPInitOptions::CoreType::Interpreter;
#ifdef _M_X86
#ifdef _M_X86_64
if (Config::Get(Config::MAIN_DSP_JIT))
opts->core_type = DSPInitOptions::CoreType::JIT64;
#endif

View File

@ -32,7 +32,7 @@
#include "Core/PowerPC/Profiler.h"
#include "Core/System.h"
#if _M_X86
#if _M_X86_64
#include "Core/PowerPC/Jit64/Jit.h"
#endif
@ -61,7 +61,7 @@ CPUCoreBase* JitInterface::InitJitCore(PowerPC::CPUCore core)
{
switch (core)
{
#if _M_X86
#if _M_X86_64
case PowerPC::CPUCore::JIT64:
m_jit = std::make_unique<Jit64>(m_system);
break;

View File

@ -53,7 +53,7 @@ JITWidget::JITWidget(QWidget* parent) : QDockWidget(parent)
ConnectWidgets();
#if defined(_M_X86)
#if defined(_M_X86_64)
m_disassembler = GetNewDisassembler("x86");
#elif defined(_M_ARM_64)
m_disassembler = GetNewDisassembler("aarch64");

View File

@ -38,7 +38,7 @@ PRIVATE
)
if ((DEFINED CMAKE_ANDROID_ARCH_ABI AND CMAKE_ANDROID_ARCH_ABI MATCHES "x86|x86_64") OR
(NOT DEFINED CMAKE_ANDROID_ARCH_ABI AND _M_X86))
(NOT DEFINED CMAKE_ANDROID_ARCH_ABI AND _M_X86_64))
target_link_libraries(uicommon PRIVATE bdisasm)
endif()

View File

@ -9,7 +9,7 @@
#include <fmt/format.h>
#include <llvm-c/Disassembler.h>
#include <llvm-c/Target.h>
#elif defined(_M_X86)
#elif defined(_M_X86_64)
#include <disasm.h> // Bochs
#endif
@ -117,7 +117,7 @@ std::string HostDisassemblerLLVM::DisassembleHostBlock(const u8* code_start, con
return x86_disasm.str();
}
#elif defined(_M_X86)
#elif defined(_M_X86_64)
class HostDisassemblerX86 : public HostDisassembler
{
public:
@ -163,7 +163,7 @@ std::unique_ptr<HostDisassembler> GetNewDisassembler(const std::string& arch)
return std::make_unique<HostDisassemblerLLVM>("aarch64-none-unknown", 4, "cortex-a57");
if (arch == "armv7")
return std::make_unique<HostDisassemblerLLVM>("armv7-none-unknown", 4, "cortex-a15");
#elif defined(_M_X86)
#elif defined(_M_X86_64)
if (arch == "x86")
return std::make_unique<HostDisassemblerX86>();
#endif

View File

@ -216,7 +216,7 @@ PRIVATE
glslang
)
if(_M_X86)
if(_M_X86_64)
target_sources(videocommon PRIVATE
TextureDecoder_x64.cpp
VertexLoaderX64.cpp

View File

@ -10,7 +10,7 @@
#include <string>
#include <utility>
#include <vector>
#if defined(_M_X86) || defined(_M_X86_64)
#if defined(_M_X86_64)
#include <pmmintrin.h>
#endif
@ -2654,7 +2654,7 @@ void TextureCacheBase::UninitializeXFBMemory(u8* dst, u32 stride, u32 bytes_per_
// (Y=1,U=254,V=254) instead of dark green (Y=0,U=0,V=0) in YUV
// like is done in the EFB path.
#if defined(_M_X86) || defined(_M_X86_64)
#if defined(_M_X86_64)
__m128i sixteenBytes = _mm_set1_epi16((s16)(u16)0xFE01);
#endif
@ -2662,7 +2662,7 @@ void TextureCacheBase::UninitializeXFBMemory(u8* dst, u32 stride, u32 bytes_per_
{
u32 size = bytes_per_row;
u8* rowdst = dst;
#if defined(_M_X86) || defined(_M_X86_64)
#if defined(_M_X86_64)
while (size >= 16)
{
_mm_storeu_si128((__m128i*)rowdst, sixteenBytes);

View File

@ -18,7 +18,7 @@ add_dolphin_test(SPSCQueueTest SPSCQueueTest.cpp)
add_dolphin_test(StringUtilTest StringUtilTest.cpp)
add_dolphin_test(SwapTest SwapTest.cpp)
if (_M_X86)
if (_M_X86_64)
add_dolphin_test(x64EmitterTest x64EmitterTest.cpp)
target_link_libraries(x64EmitterTest PRIVATE bdisasm)
elseif (_M_ARM_64)

View File

@ -17,7 +17,7 @@ add_dolphin_test(FileSystemTest IOS/FS/FileSystemTest.cpp)
add_dolphin_test(SkylandersTest IOS/USB/SkylandersTest.cpp)
if(_M_X86)
if(_M_X86_64)
add_dolphin_test(PowerPCTest
PowerPC/DivUtilsTest.cpp
PowerPC/Jit64Common/ConvertDoubleToSingle.cpp