mirror of https://github.com/PCSX2/pcsx2.git
Common: Purge unused macros
This commit is contained in:
parent
4bf7d2b2fe
commit
31e9206fc0
|
@ -20,7 +20,9 @@
|
||||||
|
|
||||||
#include "common/AlignedMalloc.h"
|
#include "common/AlignedMalloc.h"
|
||||||
#include "common/Assertions.h"
|
#include "common/Assertions.h"
|
||||||
#include <stdlib.h>
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <cstdlib>
|
||||||
|
|
||||||
void* _aligned_malloc(size_t size, size_t align)
|
void* _aligned_malloc(size_t size, size_t align)
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,35 +41,15 @@
|
||||||
// some tight loops it will likely make debug builds unusably slow.
|
// some tight loops it will likely make debug builds unusably slow.
|
||||||
//
|
//
|
||||||
#ifdef PCSX2_DEVBUILD
|
#ifdef PCSX2_DEVBUILD
|
||||||
static const bool IsDevBuild = true;
|
static constexpr bool IsDevBuild = true;
|
||||||
#else
|
#else
|
||||||
static const bool IsDevBuild = false;
|
static constexpr bool IsDevBuild = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PCSX2_DEBUG
|
#ifdef PCSX2_DEBUG
|
||||||
static const bool IsDebugBuild = true;
|
static constexpr bool IsDebugBuild = true;
|
||||||
#else
|
#else
|
||||||
static const bool IsDebugBuild = false;
|
static constexpr bool IsDebugBuild = false;
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PCSX2_DEBUG
|
|
||||||
#define pxDebugCode(code) code
|
|
||||||
#else
|
|
||||||
#define pxDebugCode(code)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PCSX2_DEVBUILD
|
|
||||||
#define pxDevelCode(code) code
|
|
||||||
#else
|
|
||||||
#define pxDevelCode(code)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(PCSX2_DEBUG) || defined(PCSX2_DEVBUILD)
|
|
||||||
#define pxReleaseCode(code)
|
|
||||||
#define pxNonReleaseCode(code) code
|
|
||||||
#else
|
|
||||||
#define pxReleaseCode(code) code
|
|
||||||
#define pxNonReleaseCode(code)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Defines the memory page size for the target platform at compilation. All supported platforms
|
// Defines the memory page size for the target platform at compilation. All supported platforms
|
||||||
|
@ -134,17 +114,12 @@ static constexpr unsigned int __pagemask = __pagesize - 1;
|
||||||
// from Devel builds is likely useful; but which should be inlined in an optimized Release
|
// from Devel builds is likely useful; but which should be inlined in an optimized Release
|
||||||
// environment.
|
// environment.
|
||||||
//
|
//
|
||||||
#ifdef PCSX2_DEVBUILD
|
|
||||||
#define __releaseinline
|
|
||||||
#else
|
|
||||||
#define __releaseinline __forceinline
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define __ri __releaseinline
|
|
||||||
#define __fi __forceinline
|
#define __fi __forceinline
|
||||||
|
#ifdef PCSX2_DEVBUILD
|
||||||
// Makes sure that if anyone includes xbyak, it doesn't do anything bad
|
#define __ri
|
||||||
#define XBYAK_ENABLE_OMITTED_OPERAND
|
#else
|
||||||
|
#define __ri __fi
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__x86_64__) && !defined(_M_AMD64)
|
#if defined(__x86_64__) && !defined(_M_AMD64)
|
||||||
#define _M_AMD64
|
#define _M_AMD64
|
||||||
|
@ -164,10 +139,6 @@ static constexpr unsigned int __pagemask = __pagesize - 1;
|
||||||
#define __has_attribute(x) 0
|
#define __has_attribute(x) 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __has_builtin
|
|
||||||
#define __has_builtin(x) 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cpp_constinit
|
#ifdef __cpp_constinit
|
||||||
#define CONSTINIT constinit
|
#define CONSTINIT constinit
|
||||||
#elif __has_attribute(require_constant_initialization)
|
#elif __has_attribute(require_constant_initialization)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* PCSX2 - PS2 Emulator for PCs
|
/* PCSX2 - PS2 Emulator for PCs
|
||||||
* Copyright (C) 2002-2021 PCSX2 Dev Team
|
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||||
*
|
*
|
||||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||||
|
@ -15,27 +15,17 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "GSScanlineEnvironment.h"
|
#include "GS/Renderers/SW/GSScanlineEnvironment.h"
|
||||||
#include "GS/Renderers/Common/GSFunctionMap.h"
|
#include "GS/Renderers/SW/GSNewCodeGenerator.h"
|
||||||
#include "GS/GSUtil.h"
|
#include "GS/GSUtil.h"
|
||||||
#include "GS/MultiISA.h"
|
#include "GS/MultiISA.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include "common/RedtapeWindows.h"
|
|
||||||
#endif
|
|
||||||
#include <xbyak/xbyak.h>
|
|
||||||
|
|
||||||
#if defined(_M_AMD64) || defined(_WIN64)
|
|
||||||
#define RegLong Xbyak::Reg64
|
|
||||||
#else
|
|
||||||
#define RegLong Xbyak::Reg32
|
|
||||||
#endif
|
|
||||||
|
|
||||||
MULTI_ISA_UNSHARED_START
|
MULTI_ISA_UNSHARED_START
|
||||||
|
|
||||||
class GSDrawScanlineCodeGenerator : public Xbyak::CodeGenerator
|
class GSDrawScanlineCodeGenerator : public Xbyak::CodeGenerator
|
||||||
{
|
{
|
||||||
void operator=(const GSDrawScanlineCodeGenerator&);
|
GSDrawScanlineCodeGenerator(const GSDrawScanlineCodeGenerator&) = delete;
|
||||||
|
void operator=(const GSDrawScanlineCodeGenerator&) = delete;
|
||||||
|
|
||||||
GSScanlineSelector m_sel;
|
GSScanlineSelector m_sel;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* PCSX2 - PS2 Emulator for PCs
|
/* PCSX2 - PS2 Emulator for PCs
|
||||||
* Copyright (C) 2002-2021 PCSX2 Dev Team
|
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||||
*
|
*
|
||||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||||
|
@ -15,7 +15,13 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
// Xbyak pulls in windows.h, and breaks everything.
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "common/RedtapeWindows.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define XBYAK_NO_OP_NAMES
|
#define XBYAK_NO_OP_NAMES
|
||||||
|
#define XBYAK_ENABLE_OMITTED_OPERAND
|
||||||
|
|
||||||
#include "xbyak/xbyak.h"
|
#include "xbyak/xbyak.h"
|
||||||
#include "xbyak/xbyak_util.h"
|
#include "xbyak/xbyak_util.h"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* PCSX2 - PS2 Emulator for PCs
|
/* PCSX2 - PS2 Emulator for PCs
|
||||||
* Copyright (C) 2002-2021 PCSX2 Dev Team
|
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||||
*
|
*
|
||||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||||
|
@ -15,15 +15,11 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "GSScanlineEnvironment.h"
|
#include "GS/Renderers/SW/GSScanlineEnvironment.h"
|
||||||
|
#include "GS/Renderers/SW/GSNewCodeGenerator.h"
|
||||||
#include "GS/GSUtil.h"
|
#include "GS/GSUtil.h"
|
||||||
#include "GS/MultiISA.h"
|
#include "GS/MultiISA.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include "common/RedtapeWindows.h"
|
|
||||||
#endif
|
|
||||||
#include <xbyak/xbyak.h>
|
|
||||||
|
|
||||||
MULTI_ISA_UNSHARED_START
|
MULTI_ISA_UNSHARED_START
|
||||||
|
|
||||||
class GSSetupPrimCodeGenerator : public Xbyak::CodeGenerator
|
class GSSetupPrimCodeGenerator : public Xbyak::CodeGenerator
|
||||||
|
|
Loading…
Reference in New Issue