remove unused globals

Also change globals into statics which are only used in one file
This commit is contained in:
degasus
2014-07-11 16:10:20 +02:00
parent 81ed17be53
commit 7e79806efc
32 changed files with 28 additions and 21937 deletions
+2 -2
View File
@@ -916,7 +916,7 @@ u32 EncodeVm(ARMReg Vm)
}
// Double/single, Neon
const VFPEnc VFPOps[16][2] = {
static const VFPEnc VFPOps[16][2] = {
{{0xE0, 0xA0}, { -1, -1}}, // 0: VMLA
{{0xE1, 0xA4}, { -1, -1}}, // 1: VNMLA
{{0xE0, 0xA4}, { -1, -1}}, // 2: VMLS
@@ -934,7 +934,7 @@ const VFPEnc VFPOps[16][2] = {
{{ -1, -1}, {0x3B, 0x30}}, // 14: VABSi
};
const char *VFPOpNames[16] = {
static const char *VFPOpNames[16] = {
"VMLA",
"VNMLA",
"VMLS",
-3
View File
@@ -720,7 +720,4 @@ struct VFPEnc {
s16 opc1;
s16 opc2;
};
extern const VFPEnc VFPOps[16][2];
extern const char *VFPOpNames[16];
} // namespace
+2 -2
View File
@@ -411,8 +411,8 @@ void StackTrace(HANDLE hThread, const char* lpszMessage, FILE *file, DWORD eip,
if (hThread != GetCurrentThread())
ResumeThread(hThread);
}
char g_uefbuf[2048];
#define UEFBUFSIZE 2048
static char g_uefbuf[UEFBUFSIZE];
void etfprintf(FILE *file, const char *format, ...)
{
-2
View File
@@ -36,8 +36,6 @@ void StackTrace(HANDLE, char const* msg, FILE *file, DWORD eip, DWORD esp, DWORD
// functions by Masken
void etfprintf(FILE *file, const char *format, ...);
void etfprint(FILE *file, const std::string &text);
#define UEFBUFSIZE 2048
extern char g_uefbuf[UEFBUFSIZE];
#else // not WIN32
-1
View File
@@ -148,7 +148,6 @@ set(SRCS ActionReplay.cpp
IPC_HLE/WII_IPC_HLE_Device_usb_kbd.cpp
IPC_HLE/WII_IPC_HLE_WiiMote.cpp
IPC_HLE/WiiMote_HID_Attr.cpp
PowerPC/LUT_frsqrtex.cpp
PowerPC/PowerPC.cpp
PowerPC/PPCAnalyst.cpp
PowerPC/PPCCache.cpp
+1 -3
View File
@@ -223,7 +223,6 @@
<ClCompile Include="PowerPC\JitCommon\JitCache.cpp" />
<ClCompile Include="PowerPC\JitCommon\Jit_Util.cpp" />
<ClCompile Include="PowerPC\JitInterface.cpp" />
<ClCompile Include="PowerPC\LUT_frsqrtex.cpp" />
<ClCompile Include="PowerPC\PowerPC.cpp" />
<ClCompile Include="PowerPC\PPCAnalyst.cpp" />
<ClCompile Include="PowerPC\PPCCache.cpp" />
@@ -409,7 +408,6 @@
<ClInclude Include="PowerPC\JitCommon\JitCache.h" />
<ClInclude Include="PowerPC\JitCommon\Jit_Util.h" />
<ClInclude Include="PowerPC\JitInterface.h" />
<ClInclude Include="PowerPC\LUT_frsqrtex.h" />
<ClInclude Include="PowerPC\PowerPC.h" />
<ClInclude Include="PowerPC\PPCAnalyst.h" />
<ClInclude Include="PowerPC\PPCCache.h" />
@@ -466,4 +464,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
-6
View File
@@ -602,9 +602,6 @@
<ClCompile Include="PowerPC\JitInterface.cpp">
<Filter>PowerPC</Filter>
</ClCompile>
<ClCompile Include="PowerPC\LUT_frsqrtex.cpp">
<Filter>PowerPC</Filter>
</ClCompile>
<ClCompile Include="PowerPC\PowerPC.cpp">
<Filter>PowerPC</Filter>
</ClCompile>
@@ -1161,9 +1158,6 @@
<ClInclude Include="PowerPC\JitInterface.h">
<Filter>PowerPC</Filter>
</ClInclude>
<ClInclude Include="PowerPC\LUT_frsqrtex.h">
<Filter>PowerPC</Filter>
</ClInclude>
<ClInclude Include="PowerPC\PowerPC.h">
<Filter>PowerPC</Filter>
</ClInclude>
-1
View File
@@ -31,7 +31,6 @@ namespace HLE_Misc
{
static std::string args;
static u32 argsPtr;
// If you just want to kill a function, one of the three following are usually appropriate.
// According to the PPC ABI, the return value is always in r3.
+1
View File
@@ -47,6 +47,7 @@ extern u8 *m_pEXRAM;
extern u8 *m_pL1Cache;
extern u8 *m_pVirtualFakeVMEM;
extern u8 *m_pFakeVMEM;
extern bool bFakeVMEM;
enum
{
-1
View File
@@ -22,7 +22,6 @@
#include "Core/HW/GPFifo.h"
#include "Core/HW/Memmap.h"
#include "Core/HW/MMIO.h"
#include "Core/PowerPC/JitInterface.h"
#include "Core/PowerPC/PowerPC.h"
#include "VideoCommon/VideoBackendBase.h"
@@ -54,7 +54,7 @@ static const u8 eeprom_data_16D0[] = {
0x77, 0x88, 0x00, 0x00, 0x2B, 0x01, 0xE8, 0x13
};
const ReportFeatures reporting_mode_features[] =
static const ReportFeatures reporting_mode_features[] =
{
//0x30: Core Buttons
{ 2, 0, 0, 0, 4 },
@@ -68,8 +68,6 @@ struct ExtensionReg
u8 constant_id[6];
};
extern const ReportFeatures reporting_mode_features[];
void FillRawAccelFromGForceData(wm_accel& raw_accel,
const accel_cal& calib,
const WiimoteEmu::AccelData& accel);
+11 -10
View File
@@ -39,24 +39,25 @@ static std::mutex cs_frameSkip;
namespace Movie {
bool g_bFrameStep = false;
static bool g_bFrameStep = false;
static bool g_bFrameStop = false;
bool g_bReadOnly = true;
u32 g_rerecords = 0;
PlayMode g_playMode = MODE_NONE;
static bool g_bReadOnly = true;
static u32 g_rerecords = 0;
static PlayMode g_playMode = MODE_NONE;
u32 g_framesToSkip = 0, g_frameSkipCounter = 0;
static u32 g_framesToSkip = 0, g_frameSkipCounter = 0;
u8 g_numPads = 0;
static u8 g_numPads = 0;
static ControllerState g_padState;
static DTMHeader tmpHeader;
static u8* tmpInput = nullptr;
static size_t tmpInputAllocated = 0;
u64 g_currentByte = 0, g_totalBytes = 0;
static u64 g_currentByte = 0, g_totalBytes = 0;
u64 g_currentFrame = 0, g_totalFrames = 0; // VI
u64 g_currentLagCount = 0, g_totalLagCount = 0; // just stats
u64 g_currentLagCount = 0;
static u64 g_totalLagCount = 0; // just stats
u64 g_currentInputCount = 0, g_totalInputCount = 0; // just stats
u64 g_totalTickCount = 0, g_tickCountAtLastInput = 0; // just stats
static u64 g_totalTickCount = 0, g_tickCountAtLastInput = 0; // just stats
static u64 g_recordingStartTime; // seconds since 1970 that recording started
static bool bSaveConfig = false, bSkipIdle = false, bDualCore = false, bProgressive = false, bDSPHLE = false, bFastDiscSpeed = false;
bool g_bClearSave = false;
@@ -74,7 +75,7 @@ static u32 DSPiromHash = 0;
static u32 DSPcoefHash = 0;
static bool g_bRecordingFromSaveState = false;
bool g_bPolled = false;
static bool g_bPolled = false;
static int g_currentSaveVersion = 0;
static std::string tmpStateFilename = File::GetUserPath(D_STATESAVES_IDX) + "dtm.sav";
+2 -14
View File
@@ -49,26 +49,14 @@ static_assert(sizeof(ControllerState) == 8, "ControllerState should be 8 bytes")
#pragma pack(pop)
// Global declarations
extern bool g_bFrameStep, g_bPolled, g_bReadOnly, g_bDiscChange, g_bClearSave;
extern PlayMode g_playMode;
extern bool g_bDiscChange, g_bClearSave;
extern u64 g_titleID;
extern u32 g_framesToSkip, g_frameSkipCounter;
extern u8 g_numPads;
extern ControllerState *g_padStates;
extern char g_playingFile[256];
extern std::string g_recordFile;
extern u64 g_currentByte, g_totalBytes;
extern u64 g_currentFrame, g_totalFrames;
extern u64 g_currentLagCount, g_totalLagCount;
extern u64 g_currentLagCount;
extern u64 g_currentInputCount, g_totalInputCount;
extern u64 g_totalTickCount, g_tickCountAtLastInput;
extern std::string g_discChange;
extern u32 g_rerecords;
#pragma pack(push,1)
struct DTMHeader
{
@@ -16,7 +16,6 @@
using namespace ArmGen;
JitArmILAsmRoutineManager armil_asm_routines;
void JitArmILAsmRoutineManager::Generate()
{
enterCode = GetCodePtr();
@@ -25,4 +25,3 @@ public:
}
};
extern JitArmILAsmRoutineManager armil_asm_routines;
+1 -1
View File
@@ -31,7 +31,7 @@
#include "Core/PowerPC/JitArmIL/JitIL_Tables.h"
#endif
bool bFakeVMEM = false;
static bool bFakeVMEM = false;
bool bMMU = false;
namespace JitInterface
-1
View File
@@ -35,6 +35,5 @@ namespace JitInterface
void Shutdown();
}
extern bool bFakeVMEM;
extern bool bMMU;
File diff suppressed because it is too large Load Diff
-9
View File
@@ -1,9 +0,0 @@
// Copyright 2013 Dolphin Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.
// Gekko related unions, structs, ...
#pragma once
extern const unsigned int frsqrtex_lut[65536];

Some files were not shown because too many files have changed in this diff Show More