mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-11 00:29:11 +01:00
Move some stuff from bss to heap
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@521 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
7a8d4a1987
commit
bec80af7d2
@ -38,6 +38,7 @@
|
|||||||
#include "SystemTimers.h"
|
#include "SystemTimers.h"
|
||||||
#include "../IPC_HLE/WII_IPC_HLE.h"
|
#include "../IPC_HLE/WII_IPC_HLE.h"
|
||||||
#include "../State.h"
|
#include "../State.h"
|
||||||
|
#include "../PowerPC/PPCAnalyst.h"
|
||||||
|
|
||||||
#define CURVERSION 0x0001
|
#define CURVERSION 0x0001
|
||||||
|
|
||||||
@ -46,6 +47,7 @@ namespace HW
|
|||||||
void Init()
|
void Init()
|
||||||
{
|
{
|
||||||
CoreTiming::Init();
|
CoreTiming::Init();
|
||||||
|
PPCAnalyst::Init();
|
||||||
|
|
||||||
Thunk_Init(); // not really hw, but this way we know it's inited first :P
|
Thunk_Init(); // not really hw, but this way we know it's inited first :P
|
||||||
State_Init();
|
State_Init();
|
||||||
@ -86,6 +88,7 @@ namespace HW
|
|||||||
State_Shutdown();
|
State_Shutdown();
|
||||||
Thunk_Shutdown();
|
Thunk_Shutdown();
|
||||||
CoreTiming::Shutdown();
|
CoreTiming::Shutdown();
|
||||||
|
PPCAnalyst::Shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoState(PointerWrap &p)
|
void DoState(PointerWrap &p)
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include "Debugger/Debugger_SymbolMap.h"
|
#include "Debugger/Debugger_SymbolMap.h"
|
||||||
|
|
||||||
|
|
||||||
LogManager::SMessage LogManager::m_Messages[MAX_MESSAGES];
|
LogManager::SMessage *LogManager::m_Messages;
|
||||||
int LogManager::m_nextMessages = 0;
|
int LogManager::m_nextMessages = 0;
|
||||||
|
|
||||||
CDebugger_Log* LogManager::m_Log[LogTypes::NUMBER_OF_LOGS];
|
CDebugger_Log* LogManager::m_Log[LogTypes::NUMBER_OF_LOGS];
|
||||||
@ -81,6 +81,7 @@ void CDebugger_Log::Shutdown()
|
|||||||
|
|
||||||
void LogManager::Init()
|
void LogManager::Init()
|
||||||
{
|
{
|
||||||
|
m_Messages = new SMessage[MAX_MESSAGES];
|
||||||
m_bDirty = true;
|
m_bDirty = true;
|
||||||
|
|
||||||
// create Logs
|
// create Logs
|
||||||
@ -147,6 +148,8 @@ void LogManager::Shutdown()
|
|||||||
m_Log[i] = NULL;
|
m_Log[i] = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete [] m_Messages;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
friend class CDebugger_LogWindow;
|
friend class CDebugger_LogWindow;
|
||||||
friend class CLogWindow;
|
friend class CLogWindow;
|
||||||
static SMessage m_Messages[MAX_MESSAGES];
|
static SMessage *m_Messages;
|
||||||
static int m_nextMessages;
|
static int m_nextMessages;
|
||||||
static int m_activeLog;
|
static int m_activeLog;
|
||||||
static bool m_bDirty;
|
static bool m_bDirty;
|
||||||
|
@ -38,7 +38,22 @@ namespace PPCAnalyst {
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
// VERY ugly. TODO: remove.
|
// VERY ugly. TODO: remove.
|
||||||
PPCAnalyst::CodeOp codebuffer[20000];
|
PPCAnalyst::CodeOp *codebuffer;
|
||||||
|
|
||||||
|
enum {
|
||||||
|
CODEBUFFER_SIZE = 32000,
|
||||||
|
};
|
||||||
|
|
||||||
|
void Init()
|
||||||
|
{
|
||||||
|
codebuffer = new PPCAnalyst::CodeOp[CODEBUFFER_SIZE];
|
||||||
|
}
|
||||||
|
|
||||||
|
void Shutdown()
|
||||||
|
{
|
||||||
|
delete [] codebuffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void AnalyzeFunction2(Symbol &func);
|
void AnalyzeFunction2(Symbol &func);
|
||||||
u32 EvaluateBranchTarget(UGeckoInstruction instr, u32 pc);
|
u32 EvaluateBranchTarget(UGeckoInstruction instr, u32 pc);
|
||||||
|
@ -31,6 +31,7 @@ struct Symbol;
|
|||||||
|
|
||||||
namespace PPCAnalyst
|
namespace PPCAnalyst
|
||||||
{
|
{
|
||||||
|
|
||||||
struct CodeOp //16B
|
struct CodeOp //16B
|
||||||
{
|
{
|
||||||
UGeckoInstruction inst;
|
UGeckoInstruction inst;
|
||||||
@ -76,6 +77,9 @@ namespace PPCAnalyst
|
|||||||
min(firstRead[reg], firstWrite[reg]);}
|
min(firstRead[reg], firstWrite[reg]);}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void Init();
|
||||||
|
void Shutdown();
|
||||||
|
|
||||||
void ShuffleUp(CodeOp *code, int first, int last);
|
void ShuffleUp(CodeOp *code, int first, int last);
|
||||||
|
|
||||||
CodeOp *Flatten(u32 address, u32 &realsize, BlockStats &st, BlockRegStats &gpa, BlockRegStats &fpa);
|
CodeOp *Flatten(u32 address, u32 &realsize, BlockStats &st, BlockRegStats &gpa, BlockRegStats &fpa);
|
||||||
@ -84,6 +88,7 @@ namespace PPCAnalyst
|
|||||||
|
|
||||||
void FindFunctions(u32 startAddr, u32 endAddr, SymbolDB *func_db);
|
void FindFunctions(u32 startAddr, u32 endAddr, SymbolDB *func_db);
|
||||||
bool AnalyzeFunction(u32 startAddr, Symbol &func, int max_size = 0);
|
bool AnalyzeFunction(u32 startAddr, Symbol &func, int max_size = 0);
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user