Some preliminary cleanup of the global namespace for LTO.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6942 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
72d604d3f2
commit
2a7f305d45
|
@ -1,7 +1,5 @@
|
|||
include_directories(include)
|
||||
|
||||
set(SRCS src/glew.c
|
||||
src/glewinfo.c
|
||||
src/visualinfo.c)
|
||||
set(SRCS src/glew.c)
|
||||
|
||||
add_library(GLEW STATIC ${SRCS})
|
||||
|
|
|
@ -1,15 +1,19 @@
|
|||
# -*- python -*-
|
||||
|
||||
Import('env')
|
||||
import sys
|
||||
|
||||
if env.has_key('shared_glew') and env['shared_glew']:
|
||||
Return()
|
||||
|
||||
files = [
|
||||
'src/glew.c',
|
||||
'src/glewinfo.c',
|
||||
'src/visualinfo.c',
|
||||
]
|
||||
if sys.platform == 'darwin':
|
||||
libs = ['GLEW']
|
||||
frames = ['AGL', 'OpenGL']
|
||||
else:
|
||||
libs = ['GLEW', 'GL', 'GLU']
|
||||
frames = []
|
||||
|
||||
env.StaticLibrary(env['local_libs'] + "GLEW", files)
|
||||
env.Program('glewinfo', 'src/glewinfo.c', LIBS = libs, FRAMEWORKS = frames)
|
||||
env.Program('visualinfo', 'src/visualinfo.c', LIBS = libs, FRAMEWORKS = frames)
|
||||
env.StaticLibrary(env['local_libs'] + 'GLEW', ['src/glew.c'])
|
||||
env['CPPPATH'] += ['#Externals/GLew/include']
|
||||
|
|
|
@ -39,7 +39,7 @@ SDSP g_dsp;
|
|||
DSPBreakpoints dsp_breakpoints;
|
||||
DSPCoreState core_state = DSPCORE_STOP;
|
||||
u16 cyclesLeft = 0;
|
||||
DSPEmitter *jit = NULL;
|
||||
DSPEmitter *dspjit = NULL;
|
||||
Common::Event step_event;
|
||||
Common::CriticalSection ExtIntCriticalSection;
|
||||
|
||||
|
@ -92,7 +92,7 @@ bool DSPCore_Init(const char *irom_filename, const char *coef_filename,
|
|||
{
|
||||
g_dsp.step_counter = 0;
|
||||
cyclesLeft = 0;
|
||||
jit = NULL;
|
||||
dspjit = NULL;
|
||||
|
||||
g_dsp.irom = (u16*)AllocateMemoryPages(DSP_IROM_BYTE_SIZE);
|
||||
g_dsp.iram = (u16*)AllocateMemoryPages(DSP_IRAM_BYTE_SIZE);
|
||||
|
@ -150,7 +150,7 @@ bool DSPCore_Init(const char *irom_filename, const char *coef_filename,
|
|||
|
||||
// Initialize JIT, if necessary
|
||||
if(bUsingJIT)
|
||||
jit = new DSPEmitter();
|
||||
dspjit = new DSPEmitter();
|
||||
|
||||
DSPAnalyzer::Analyze();
|
||||
|
||||
|
@ -165,9 +165,9 @@ void DSPCore_Shutdown()
|
|||
{
|
||||
core_state = DSPCORE_STOP;
|
||||
|
||||
if(jit) {
|
||||
delete jit;
|
||||
jit = NULL;
|
||||
if(dspjit) {
|
||||
delete dspjit;
|
||||
dspjit = NULL;
|
||||
}
|
||||
step_event.Shutdown();
|
||||
FreeMemoryPages(g_dsp.irom, DSP_IROM_BYTE_SIZE);
|
||||
|
@ -248,10 +248,10 @@ void DSPCore_CheckExceptions()
|
|||
// Handle state changes and stepping.
|
||||
int DSPCore_RunCycles(int cycles)
|
||||
{
|
||||
if (jit)
|
||||
if (dspjit)
|
||||
{
|
||||
cyclesLeft = cycles;
|
||||
CompiledCode pExecAddr = (CompiledCode)jit->enterDispatcher;
|
||||
CompiledCode pExecAddr = (CompiledCode)dspjit->enterDispatcher;
|
||||
pExecAddr();
|
||||
|
||||
if (g_dsp.external_interrupt_waiting)
|
||||
|
@ -318,7 +318,7 @@ void DSPCore_Step()
|
|||
|
||||
void CompileCurrent()
|
||||
{
|
||||
jit->Compile(g_dsp.pc);
|
||||
dspjit->Compile(g_dsp.pc);
|
||||
|
||||
bool retry = true;
|
||||
|
||||
|
@ -327,11 +327,11 @@ void CompileCurrent()
|
|||
retry = false;
|
||||
for(u16 i = 0x0000; i < 0xffff; ++i)
|
||||
{
|
||||
if (!jit->unresolvedJumps[i].empty())
|
||||
if (!dspjit->unresolvedJumps[i].empty())
|
||||
{
|
||||
u16 addrToCompile = jit->unresolvedJumps[i].front();
|
||||
jit->Compile(addrToCompile);
|
||||
if (!jit->unresolvedJumps[i].empty())
|
||||
u16 addrToCompile = dspjit->unresolvedJumps[i].front();
|
||||
dspjit->Compile(addrToCompile);
|
||||
if (!dspjit->unresolvedJumps[i].empty())
|
||||
retry = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -267,7 +267,7 @@ struct SDSP
|
|||
|
||||
extern SDSP g_dsp;
|
||||
extern DSPBreakpoints dsp_breakpoints;
|
||||
extern DSPEmitter *jit;
|
||||
extern DSPEmitter *dspjit;
|
||||
extern u16 cyclesLeft;
|
||||
|
||||
bool DSPCore_Init(const char *irom_filename, const char *coef_filename,
|
||||
|
|
|
@ -257,8 +257,8 @@ void gdsp_idma_in(u16 dsp_addr, u32 addr, u32 size)
|
|||
|
||||
NOTICE_LOG(DSPLLE, "*** Copy new UCode from 0x%08x to 0x%04x (crc: %8x)", addr, dsp_addr, g_dsp.iram_crc);
|
||||
|
||||
if (jit)
|
||||
jit->ClearIRAM();
|
||||
if (dspjit)
|
||||
dspjit->ClearIRAM();
|
||||
|
||||
DSPAnalyzer::Analyze();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# -*- python -*-
|
||||
|
||||
Import('env')
|
||||
import sys
|
||||
|
||||
files = [
|
||||
'main.cpp',
|
||||
|
@ -11,4 +12,9 @@ libs = [
|
|||
'common',
|
||||
]
|
||||
|
||||
env.Program('dsptool', files, LIBS = libs)
|
||||
if sys.platform == 'darwin':
|
||||
frames = ['CoreFoundation']
|
||||
else:
|
||||
frames = []
|
||||
|
||||
env.Program('dsptool', files, LIBS = libs, FRAMEWORKS = frames)
|
||||
|
|
|
@ -217,7 +217,7 @@ void dsp_thread()
|
|||
{
|
||||
int cycles = (int)cycle_count;
|
||||
if (cycles > 0) {
|
||||
if (jit)
|
||||
if (dspjit)
|
||||
DSPCore_RunCycles(cycles);
|
||||
else
|
||||
DSPInterpreter::RunCycles(cycles);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# -*- python -*-
|
||||
|
||||
Import('env')
|
||||
import sys
|
||||
|
||||
files = [
|
||||
"AudioJitTests.cpp",
|
||||
|
@ -12,4 +13,9 @@ libs = [
|
|||
'dspcore', 'common',
|
||||
]
|
||||
|
||||
env.Program('tester', files, LIBS = libs)
|
||||
if sys.platform == 'darwin':
|
||||
frames = ['CoreFoundation']
|
||||
else:
|
||||
frames = []
|
||||
|
||||
env.Program('tester', files, LIBS = libs, FRAMEWORKS = frames)
|
||||
|
|
Loading…
Reference in New Issue