Merge pull request #9906 from shuffle2/msvc-warnings
remove msvc warnings which no longer fire, and DSP::Profiler
This commit is contained in:
commit
baeeea8f53
|
@ -11,11 +11,6 @@
|
||||||
#include "Common/Random.h"
|
#include "Common/Random.h"
|
||||||
#include "Common/StringUtil.h"
|
#include "Common/StringUtil.h"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(push)
|
|
||||||
#pragma warning(disable : 4505)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace Common::ec
|
namespace Common::ec
|
||||||
{
|
{
|
||||||
static const u8 square[16] = {0x00, 0x01, 0x04, 0x05, 0x10, 0x11, 0x14, 0x15,
|
static const u8 square[16] = {0x00, 0x01, 0x04, 0x05, 0x10, 0x11, 0x14, 0x15,
|
||||||
|
@ -298,7 +293,4 @@ std::array<u8, 60> ComputeSharedSecret(const u8* private_key, const u8* public_k
|
||||||
std::copy_n(data.Data(), shared_secret.size(), shared_secret.begin());
|
std::copy_n(data.Data(), shared_secret.size(), shared_secret.begin());
|
||||||
return shared_secret;
|
return shared_secret;
|
||||||
}
|
}
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(pop)
|
|
||||||
#endif
|
|
||||||
} // namespace Common::ec
|
} // namespace Common::ec
|
||||||
|
|
|
@ -49,11 +49,6 @@
|
||||||
#include <unistd.h> // for unlink()
|
#include <unistd.h> // for unlink()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(push)
|
|
||||||
#pragma warning(disable : 4310)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace Common
|
namespace Common
|
||||||
{
|
{
|
||||||
// Believe me, you *don't* want to change these constants !!
|
// Believe me, you *don't* want to change these constants !!
|
||||||
|
@ -288,7 +283,3 @@ FailWrite:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} // namespace Common
|
} // namespace Common
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(pop)
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -163,8 +163,6 @@ add_library(core
|
||||||
HW/DSPLLE/DSPHost.cpp
|
HW/DSPLLE/DSPHost.cpp
|
||||||
HW/DSPLLE/DSPLLE.cpp
|
HW/DSPLLE/DSPLLE.cpp
|
||||||
HW/DSPLLE/DSPLLE.h
|
HW/DSPLLE/DSPLLE.h
|
||||||
HW/DSPLLE/DSPLLEGlobals.cpp
|
|
||||||
HW/DSPLLE/DSPLLEGlobals.h
|
|
||||||
HW/DSPLLE/DSPSymbols.cpp
|
HW/DSPLLE/DSPSymbols.cpp
|
||||||
HW/DSPLLE/DSPSymbols.h
|
HW/DSPLLE/DSPSymbols.h
|
||||||
HW/DVD/DVDInterface.cpp
|
HW/DVD/DVDInterface.cpp
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
#include "Core/DSP/DSPTables.h"
|
#include "Core/DSP/DSPTables.h"
|
||||||
#include "Core/DSP/Interpreter/DSPInterpreter.h"
|
#include "Core/DSP/Interpreter/DSPInterpreter.h"
|
||||||
#include "Core/DSP/Jit/DSPEmitterBase.h"
|
#include "Core/DSP/Jit/DSPEmitterBase.h"
|
||||||
#include "Core/HW/DSPLLE/DSPLLEGlobals.h"
|
|
||||||
#include "Core/HW/Memmap.h"
|
#include "Core/HW/Memmap.h"
|
||||||
#include "Core/Host.h"
|
#include "Core/Host.h"
|
||||||
|
|
||||||
|
|
|
@ -1,64 +0,0 @@
|
||||||
// Copyright 2008 Dolphin Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
#include "Core/HW/DSPLLE/DSPLLEGlobals.h"
|
|
||||||
|
|
||||||
#include <cinttypes>
|
|
||||||
|
|
||||||
#include "Common/CommonTypes.h"
|
|
||||||
#include "Common/IOFile.h"
|
|
||||||
|
|
||||||
#include "Core/DSP/DSPCore.h"
|
|
||||||
|
|
||||||
namespace DSP
|
|
||||||
{
|
|
||||||
#if PROFILE
|
|
||||||
|
|
||||||
#define PROFILE_MAP_SIZE 0x10000
|
|
||||||
|
|
||||||
u64 g_profileMap[PROFILE_MAP_SIZE];
|
|
||||||
bool g_profile = false;
|
|
||||||
|
|
||||||
void ProfilerStart()
|
|
||||||
{
|
|
||||||
g_profile = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ProfilerAddDelta(int _addr, int _delta)
|
|
||||||
{
|
|
||||||
if (g_profile)
|
|
||||||
{
|
|
||||||
g_profileMap[_addr] += _delta;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ProfilerInit()
|
|
||||||
{
|
|
||||||
memset(g_profileMap, 0, sizeof(g_profileMap));
|
|
||||||
}
|
|
||||||
|
|
||||||
void ProfilerDump(u64 count)
|
|
||||||
{
|
|
||||||
File::IOFile pFile("DSP_Prof.txt", "wt");
|
|
||||||
if (pFile)
|
|
||||||
{
|
|
||||||
fprintf(pFile.GetHandle(), "Number of DSP steps: %" PRIu64 "\n\n", count);
|
|
||||||
for (int i = 0; i < PROFILE_MAP_SIZE; i++)
|
|
||||||
{
|
|
||||||
if (g_profileMap[i] > 0)
|
|
||||||
{
|
|
||||||
fprintf(pFile.GetHandle(), "0x%04X: %" PRIu64 "\n", i, g_profileMap[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#elif defined(_MSC_VER)
|
|
||||||
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
char SilenceLNK4221;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
} // namespace DSP
|
|
|
@ -1,20 +0,0 @@
|
||||||
// Copyright 2008 Dolphin Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "Common/CommonTypes.h"
|
|
||||||
|
|
||||||
// TODO: Get rid of this file.
|
|
||||||
|
|
||||||
namespace DSP
|
|
||||||
{
|
|
||||||
#define PROFILE 0
|
|
||||||
|
|
||||||
#if PROFILE
|
|
||||||
void ProfilerDump(u64 _count);
|
|
||||||
void ProfilerInit();
|
|
||||||
void ProfilerAddDelta(int _addr, int _delta);
|
|
||||||
void ProfilerStart();
|
|
||||||
#endif
|
|
||||||
} // namespace DSP
|
|
|
@ -10,12 +10,6 @@
|
||||||
#include "Core/HW/WiimoteCommon/WiimoteConstants.h"
|
#include "Core/HW/WiimoteCommon/WiimoteConstants.h"
|
||||||
#include "InputCommon/ControllerEmu/ControllerEmu.h"
|
#include "InputCommon/ControllerEmu/ControllerEmu.h"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(push)
|
|
||||||
// Disable warning for zero-sized array:
|
|
||||||
#pragma warning(disable : 4200)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace WiimoteCommon
|
namespace WiimoteCommon
|
||||||
{
|
{
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
|
@ -27,7 +21,8 @@ struct OutputReportGeneric
|
||||||
|
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
u8 data[0];
|
// Actual size varies
|
||||||
|
u8 data[1];
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
// Enable/disable rumble. (Valid for ALL output reports)
|
// Enable/disable rumble. (Valid for ALL output reports)
|
||||||
|
@ -309,7 +304,3 @@ struct AccelCalibrationData
|
||||||
} // namespace WiimoteCommon
|
} // namespace WiimoteCommon
|
||||||
|
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(pop)
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ void Wiimote::InvokeHandler(H&& handler, const WiimoteCommon::OutputReportGeneri
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
(this->*handler)(Common::BitCastPtr<T>(rpt.data));
|
(this->*handler)(Common::BitCastPtr<T>(&rpt.data[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Wiimote::EventLinked()
|
void Wiimote::EventLinked()
|
||||||
|
|
|
@ -246,7 +246,6 @@
|
||||||
<ClInclude Include="Core\HW\DSPHLE\UCodes\Zelda.h" />
|
<ClInclude Include="Core\HW\DSPHLE\UCodes\Zelda.h" />
|
||||||
<ClInclude Include="Core\HW\DSPLLE\DSPDebugInterface.h" />
|
<ClInclude Include="Core\HW\DSPLLE\DSPDebugInterface.h" />
|
||||||
<ClInclude Include="Core\HW\DSPLLE\DSPLLE.h" />
|
<ClInclude Include="Core\HW\DSPLLE\DSPLLE.h" />
|
||||||
<ClInclude Include="Core\HW\DSPLLE\DSPLLEGlobals.h" />
|
|
||||||
<ClInclude Include="Core\HW\DSPLLE\DSPSymbols.h" />
|
<ClInclude Include="Core\HW\DSPLLE\DSPSymbols.h" />
|
||||||
<ClInclude Include="Core\HW\DVD\DVDInterface.h" />
|
<ClInclude Include="Core\HW\DVD\DVDInterface.h" />
|
||||||
<ClInclude Include="Core\HW\DVD\DVDMath.h" />
|
<ClInclude Include="Core\HW\DVD\DVDMath.h" />
|
||||||
|
@ -825,7 +824,6 @@
|
||||||
<ClCompile Include="Core\HW\DSPHLE\UCodes\Zelda.cpp" />
|
<ClCompile Include="Core\HW\DSPHLE\UCodes\Zelda.cpp" />
|
||||||
<ClCompile Include="Core\HW\DSPLLE\DSPHost.cpp" />
|
<ClCompile Include="Core\HW\DSPLLE\DSPHost.cpp" />
|
||||||
<ClCompile Include="Core\HW\DSPLLE\DSPLLE.cpp" />
|
<ClCompile Include="Core\HW\DSPLLE\DSPLLE.cpp" />
|
||||||
<ClCompile Include="Core\HW\DSPLLE\DSPLLEGlobals.cpp" />
|
|
||||||
<ClCompile Include="Core\HW\DSPLLE\DSPSymbols.cpp" />
|
<ClCompile Include="Core\HW\DSPLLE\DSPSymbols.cpp" />
|
||||||
<ClCompile Include="Core\HW\DVD\DVDInterface.cpp" />
|
<ClCompile Include="Core\HW\DVD\DVDInterface.cpp" />
|
||||||
<ClCompile Include="Core\HW\DVD\DVDMath.cpp" />
|
<ClCompile Include="Core\HW\DVD\DVDMath.cpp" />
|
||||||
|
|
Loading…
Reference in New Issue