Global: Remove ARM64 define.

Was barely used anymore, and some users are specifying it when it's not
the case, so better to detect consistently.
This commit is contained in:
Unknown W. Brackets 2020-08-29 08:45:50 -07:00
parent 2be8f86286
commit 6b8f7294b3
18 changed files with 34 additions and 44 deletions

View File

@ -45,7 +45,6 @@ if(CMAKE_SYSTEM_PROCESSOR)
endif()
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^aarch64")
set(ARM64 ON)
add_definitions(-DARM64)
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^amd64" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "^x86_64" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "^AMD64")
set(X86_DEVICE ON)
set(X86_64_DEVICE ON)

View File

@ -22,6 +22,7 @@
#include <set>
#include <sstream>
#include "ppsspp_config.h"
#include "base/display.h"
#include "base/NativeApp.h"
#include "file/ini_file.h"
@ -393,7 +394,7 @@ static int DefaultNumWorkers() {
}
static int DefaultCpuCore() {
#if defined(ARM) || defined(ARM64) || defined(_M_IX86) || defined(_M_X64)
#if PPSSPP_ARCH(ARM) || PPSSPP_ARCH(ARM64) || PPSSPP_ARCH(X86) || PPSSPP_ARCH(AMD64)
return (int)CPUCore::JIT;
#else
return (int)CPUCore::INTERPRETER;
@ -401,7 +402,7 @@ static int DefaultCpuCore() {
}
static bool DefaultCodeGen() {
#if defined(ARM) || defined(ARM64) || defined(_M_IX86) || defined(_M_X64)
#if PPSSPP_ARCH(ARM) || PPSSPP_ARCH(ARM64) || PPSSPP_ARCH(X86) || PPSSPP_ARCH(AMD64)
return true;
#else
return false;

View File

@ -472,7 +472,7 @@ void Arm64Jit::UnlinkBlock(u8 *checkedEntry, u32 originalAddress) {
}
bool Arm64Jit::ReplaceJalTo(u32 dest) {
#ifdef ARM64
#if PPSSPP_ARCH(ARM64)
const ReplacementTableEntry *entry = nullptr;
u32 funcSize = 0;
if (!CanReplaceJalTo(dest, &entry, &funcSize)) {

View File

@ -601,12 +601,12 @@ void JitBlockCache::InvalidateChangedBlocks() {
}
int JitBlockCache::GetBlockExitSize() {
#if defined(ARM)
#if PPSSPP_ARCH(ARM)
// Will depend on the sequence found to encode the destination address.
return 0;
#elif defined(_M_IX86) || defined(_M_X64)
#elif PPSSPP_ARCH(X86) || PPSSPP_ARCH(AMD64)
return 15;
#elif defined(ARM64)
#elif PPSSPP_ARCH(ARM64)
// Will depend on the sequence found to encode the destination address.
return 0;
#else
@ -654,11 +654,11 @@ JitBlockDebugInfo JitBlockCache::GetBlockDebugInfo(int blockNum) const {
debugInfo.origDisasm.push_back(mipsDis);
}
#if defined(ARM)
#if PPSSPP_ARCH(ARM)
debugInfo.targetDisasm = DisassembleArm2(block->normalEntry, block->codeSize);
#elif defined(ARM64)
#elif PPSSPP_ARCH(ARM64)
debugInfo.targetDisasm = DisassembleArm64(block->normalEntry, block->codeSize);
#elif defined(_M_IX86) || defined(_M_X64)
#elif PPSSPP_ARCH(X86) || PPSSPP_ARCH(AMD64)
debugInfo.targetDisasm = DisassembleX86(block->normalEntry, block->codeSize);
#endif

View File

@ -22,12 +22,13 @@
#include <vector>
#include <string>
#include "ppsspp_config.h"
#include "Common/CommonTypes.h"
#include "Common/CodeBlock.h"
#include "Core/MIPS/MIPSAnalyst.h"
#include "Core/MIPS/MIPS.h"
#if defined(ARM) || defined(ARM64)
#if PPSSPP_ARCH(ARM) || PPSSPP_ARCH(ARM64)
const int MAX_JIT_BLOCK_EXITS = 2;
#else
const int MAX_JIT_BLOCK_EXITS = 8;

View File

@ -18,11 +18,6 @@
#include "ppsspp_config.h"
#if PPSSPP_ARCH(ARM64)
// This allows highlighting to work. Yay.
#ifdef __INTELLISENSE__
#define ARM64
#endif
#include "Common/CPUDetect.h"
#include "Common/Log.h"
#include "Core/Config.h"

View File

@ -18,6 +18,7 @@
#include <algorithm>
#include <cstdio>
#include "ppsspp_config.h"
#include "base/basictypes.h"
#include "Common/Log.h"
@ -1345,11 +1346,11 @@ std::string VertexDecoder::GetString(DebugShaderStringType stringType) {
if (!jitted_)
return "Not compiled";
std::vector<std::string> lines;
#if defined(ARM64)
#if PPSSPP_ARCH(ARM64)
lines = DisassembleArm64((const u8 *)jitted_, jittedSize_);
#elif defined(ARM)
#elif PPSSPP_ARCH(ARM)
lines = DisassembleArm2((const u8 *)jitted_, jittedSize_);
#elif defined(MIPS)
#elif PPSSPP_ARCH(MIPS) || PPSSPP_ARCH(MIPS64)
// No MIPS disassembler defined
#else
lines = DisassembleX86((const u8 *)jitted_, jittedSize_);

View File

@ -17,6 +17,7 @@
#include <algorithm>
#include "ppsspp_config.h"
#include "base/display.h"
#include "base/stringutil.h"
#include "gfx_es2/gpu_features.h"
@ -458,7 +459,7 @@ void SystemInfoScreen::CreateViews() {
deviceSpecs->Add(new ItemHeader(si->T("CPU Information")));
deviceSpecs->Add(new InfoItem(si->T("CPU Name", "Name"), cpu_info.brand_string));
#if defined(ARM) || defined(ARM64) || defined(MIPS)
#if PPSSPP_ARCH(ARM) || PPSSPP_ARCH(ARM64) || PPSSPP_ARCH(MIPS) || PPSSPP_ARCH(MIPS64)
deviceSpecs->Add(new InfoItem(si->T("Cores"), StringFromInt(cpu_info.num_cores)));
#else
int totalThreads = cpu_info.num_cores * cpu_info.logical_cpu_count;

View File

@ -125,9 +125,9 @@ static UI::Theme ui_theme;
Atlas g_ui_atlas;
#if defined(ARM) && defined(__ANDROID__)
#if PPSSPP_ARCH(ARM) && defined(__ANDROID__)
#include "../../android/jni/ArmEmitterTest.h"
#elif defined(ARM64) && defined(__ANDROID__)
#elif PPSSPP_ARCH(ARM64) && defined(__ANDROID__)
#include "../../android/jni/Arm64EmitterTest.h"
#endif
@ -291,9 +291,9 @@ void NativeGetAppInfo(std::string *app_dir_name, std::string *app_nice_name, boo
*landscape = true;
*version = PPSSPP_GIT_VERSION;
#if defined(ARM) && defined(__ANDROID__)
#if PPSSPP_ARCH(ARM) && defined(__ANDROID__)
ArmEmitterTest();
#elif defined(ARM64) && defined(__ANDROID__)
#elif PPSSPP_ARCH(ARM64) && defined(__ANDROID__)
Arm64EmitterTest();
#endif
}

View File

@ -54,7 +54,7 @@ HRESULT D3D11Context::CreateTheDevice(IDXGIAdapter *adapter) {
// D3D11 has no need for display rotation.
g_display_rotation = DisplayRotation::ROTATE_0;
g_display_rot_matrix.setIdentity();
#if defined(_DEBUG) && !defined(_M_ARM) && !defined(_M_ARM64)
#if defined(_DEBUG) && !PPSSPP_ARCH(ARM) && !PPSSPP_ARCH(ARM64)
UINT createDeviceFlags = D3D11_CREATE_DEVICE_DEBUG;
#else
UINT createDeviceFlags = 0;

View File

@ -70,7 +70,7 @@ ifeq ($(TARGET_ARCH_ABI),x86_64)
LOCAL_LDLIBS += $(LOCAL_PATH)/../../ffmpeg/android/x86_64/lib/libavutil.a
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../ffmpeg/android/x86_64/include
LOCAL_CFLAGS := $(LOCAL_CFLAGS) -D_ARCH_64 -D_M_X64 -fomit-frame-pointer -mtune=atom -mfpmath=sse -mssse3 -mstackrealign
LOCAL_CFLAGS := $(LOCAL_CFLAGS) -D_M_X64 -fomit-frame-pointer -mtune=atom -mfpmath=sse -mssse3 -mstackrealign
endif
ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
@ -80,8 +80,6 @@ ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
LOCAL_LDLIBS += $(LOCAL_PATH)/../../ffmpeg/android/arm64/lib/libswscale.a
LOCAL_LDLIBS += $(LOCAL_PATH)/../../ffmpeg/android/arm64/lib/libavutil.a
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../ffmpeg/android/arm64/include
LOCAL_CFLAGS := $(LOCAL_CFLAGS) -D_ARCH_64 -DARM64
endif
# Compile with profiling.

View File

@ -64,8 +64,6 @@ ifeq ($(findstring armeabi-v7a,$(TARGET_ARCH_ABI)),armeabi-v7a)
LOCAL_CFLAGS := $(LOCAL_CFLAGS) -DARM -DARMEABI_V7A
else ifeq ($(TARGET_ARCH_ABI),armeabi)
LOCAL_CFLAGS := $(LOCAL_CFLAGS) -DARM -DARMEABI -march=armv6
else ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
LOCAL_CFLAGS := $(LOCAL_CFLAGS) -D_ARCH_64 -DARM64
else ifeq ($(TARGET_ARCH_ABI),x86)
LOCAL_CFLAGS := $(LOCAL_CFLAGS) -D_M_IX86
else ifeq ($(TARGET_ARCH_ABI),x86_64)

View File

@ -31,8 +31,6 @@ ifeq ($(findstring armeabi-v7a,$(TARGET_ARCH_ABI)),armeabi-v7a)
LOCAL_CFLAGS := $(LOCAL_CFLAGS) -DARM -DARMEABI_V7A
else ifeq ($(TARGET_ARCH_ABI),armeabi)
LOCAL_CFLAGS := $(LOCAL_CFLAGS) -DARM -DARMEABI -march=armv6
else ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
LOCAL_CFLAGS := $(LOCAL_CFLAGS) -D_ARCH_64 -DARM64
else ifeq ($(TARGET_ARCH_ABI),x86)
LOCAL_CFLAGS := $(LOCAL_CFLAGS) -D_M_IX86
else ifeq ($(TARGET_ARCH_ABI),x86_64)

View File

@ -118,8 +118,6 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
else ifeq ($(TARGET_ARCH_ABI),armeabi)
LOCAL_CFLAGS := $(LOCAL_CFLAGS) -DARM -DARMEABI -march=armv6
else ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
LOCAL_CFLAGS := $(LOCAL_CFLAGS) -D_ARCH_64 -DARM64
else ifeq ($(TARGET_ARCH_ABI),x86)
LOCAL_CFLAGS := $(LOCAL_CFLAGS) -D_M_IX86
LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \

View File

@ -1,5 +1,7 @@
#pragma once
#include "ppsspp_config.h"
#ifdef IOS
#include <OpenGLES/ES3/gl.h>
#include <OpenGLES/ES3/glext.h>
@ -51,7 +53,7 @@ extern PFNGLMAPBUFFERPROC glMapBuffer;
typedef void (EGLAPIENTRYP PFNGLDRAWTEXTURENVPROC) (GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);
extern PFNGLDRAWTEXTURENVPROC glDrawTextureNV;
#ifndef ARM64
#if !PPSSPP_ARCH(ARM64)
typedef void (EGLAPIENTRYP PFNGLBLITFRAMEBUFFERNVPROC) (
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,

View File

@ -58,10 +58,6 @@
#define PPSSPP_ARCH_ARM64 1
#define PPSSPP_ARCH_64BIT 1
#define PPSSPP_ARCH_ARM_NEON 1
//TODO: Remove this compat define
#ifndef ARM64
#define ARM64 1
#endif
#endif
#if defined(__mips64__)

View File

@ -17,6 +17,7 @@
#include <algorithm>
#include "ppsspp_config.h"
#include "base/NativeApp.h"
#include "Common/TimeUtil.h"
#include "Core/ConfigValues.h"
@ -172,9 +173,9 @@ bool TestJit() {
// Disassemble
JitBlockCache *cache = MIPSComp::jit->GetBlockCache();
JitBlock *block = cache->GetBlock(0); // Should only be one block.
#if defined(ARM)
#if PPSSPP_ARCH(ARM)
std::vector<std::string> lines = DisassembleArm2(block->normalEntry, block->codeSize);
#elif defined(ARM64)
#elif PPSSPP_ARCH(ARM64)
std::vector<std::string> lines = DisassembleArm64(block->normalEntry, block->codeSize);
#else
std::vector<std::string> lines = DisassembleX86(block->normalEntry, block->codeSize);

View File

@ -33,6 +33,7 @@
#include <jni.h>
#endif
#include "ppsspp_config.h"
#include "base/NativeApp.h"
#include "input/input_state.h"
#include "ext/disarm.h"
@ -559,13 +560,13 @@ bool TestArm64Emitter();
bool TestX64Emitter();
TestItem availableTests[] = {
#if defined(ARM64) || defined(_M_X64) || defined(_M_IX86)
#if PPSSPP_ARCH(ARM64) || PPSSPP_ARCH(AMD64) || PPSSPP_ARCH(X86)
TEST_ITEM(Arm64Emitter),
#endif
#if defined(ARM) || defined(_M_X64) || defined(_M_IX86)
#if PPSSPP_ARCH(ARM) || PPSSPP_ARCH(AMD64) || PPSSPP_ARCH(X86)
TEST_ITEM(ArmEmitter),
#endif
#if defined(_M_X64) || defined(_M_IX86)
#if PPSSPP_ARCH(AMD64) || PPSSPP_ARCH(X86)
TEST_ITEM(X64Emitter),
#endif
TEST_ITEM(VertexJit),