mark all local functions as static

This commit is contained in:
degasus
2014-07-08 14:29:26 +02:00
parent 3ff1c538ee
commit 22e1aa5bb4
93 changed files with 260 additions and 251 deletions

View File

@ -5,11 +5,11 @@
#include "Common/Common.h"
#include "Common/MathUtil.h"
#include "Core/DSP/DSPAccelerator.h"
#include "Core/DSP/DSPCore.h"
#include "Core/DSP/DSPHost.h"
#include "Core/DSP/DSPHWInterface.h"
#include "Core/DSP/DSPInterpreter.h"
// The hardware adpcm decoder :)
static s16 ADPCM_Step(u32& _rSamplePos)
{

View File

@ -60,12 +60,12 @@ const u16 idle_skip_sigs[NUM_IDLE_SIGS][MAX_IDLE_SIG_SIZE + 1] =
0, 0 }
};
void Reset()
static void Reset()
{
memset(code_flags, 0, sizeof(code_flags));
}
void AnalyzeRange(int start_addr, int end_addr)
static void AnalyzeRange(int start_addr, int end_addr)
{
// First we run an extremely simplified version of a disassembler to find
// where all instructions start.

View File

@ -160,14 +160,14 @@ void DSPAssembler::ShowError(err_t err_code, const char *extra_info)
last_error = err_code;
}
char *skip_spaces(char *ptr)
static char *skip_spaces(char *ptr)
{
while (*ptr == ' ')
ptr++;
return ptr;
}
const char *skip_spaces(const char *ptr)
static const char *skip_spaces(const char *ptr)
{
while (*ptr == ' ')
ptr++;
@ -510,7 +510,7 @@ const opc_t *DSPAssembler::FindOpcode(const char *opcode, u32 par_count, const o
}
// weird...
u16 get_mask_shifted_down(u16 mask)
static u16 get_mask_shifted_down(u16 mask)
{
while (!(mask & 1))
mask >>= 1;

View File

@ -35,8 +35,6 @@
#include "Core/DSP/DSPDisassembler.h"
#include "Core/DSP/DSPTables.h"
extern void nop(const UDSPInstruction opc);
DSPDisassembler::DSPDisassembler(const AssemblerSettings &settings)
: settings_(settings)
{

View File

@ -54,6 +54,8 @@ enum partype_t
#define OPTABLE_SIZE 0xffff + 1
#define EXT_OPTABLE_SIZE 0xff + 1
void nop(const UDSPInstruction opc);
typedef void (*dspIntFunc)(const UDSPInstruction);
typedef void (DSPEmitter::*dspJitFunc)(const UDSPInstruction);

View File

@ -117,7 +117,7 @@ static void WriteBlockLink(DSPEmitter& emitter, u16 dest)
}
}
void r_jcc(const UDSPInstruction opc, DSPEmitter& emitter)
static void r_jcc(const UDSPInstruction opc, DSPEmitter& emitter)
{
u16 dest = dsp_imem_read(emitter.compilePC + 1);
const DSPOPCTemplate *opcode = GetOpTemplate(opc);
@ -141,7 +141,7 @@ void DSPEmitter::jcc(const UDSPInstruction opc)
ReJitConditional<r_jcc>(opc, *this);
}
void r_jmprcc(const UDSPInstruction opc, DSPEmitter& emitter)
static void r_jmprcc(const UDSPInstruction opc, DSPEmitter& emitter)
{
u8 reg = (opc >> 5) & 0x7;
//reg can only be DSP_REG_ARx and DSP_REG_IXx now,
@ -161,7 +161,7 @@ void DSPEmitter::jmprcc(const UDSPInstruction opc)
ReJitConditional<r_jmprcc>(opc, *this);
}
void r_call(const UDSPInstruction opc, DSPEmitter& emitter)
static void r_call(const UDSPInstruction opc, DSPEmitter& emitter)
{
emitter.MOV(16, R(DX), Imm16(emitter.compilePC + 2));
emitter.dsp_reg_store_stack(DSP_STACK_C);
@ -188,7 +188,7 @@ void DSPEmitter::call(const UDSPInstruction opc)
ReJitConditional<r_call>(opc, *this);
}
void r_callr(const UDSPInstruction opc, DSPEmitter& emitter)
static void r_callr(const UDSPInstruction opc, DSPEmitter& emitter)
{
u8 reg = (opc >> 5) & 0x7;
emitter.MOV(16, R(DX), Imm16(emitter.compilePC + 1));
@ -210,7 +210,7 @@ void DSPEmitter::callr(const UDSPInstruction opc)
ReJitConditional<r_callr>(opc, *this);
}
void r_ifcc(const UDSPInstruction opc, DSPEmitter& emitter)
static void r_ifcc(const UDSPInstruction opc, DSPEmitter& emitter)
{
emitter.MOV(16, M(&g_dsp.pc), Imm16(emitter.compilePC + 1));
}
@ -226,7 +226,7 @@ void DSPEmitter::ifcc(const UDSPInstruction opc)
WriteBranchExit(*this);
}
void r_ret(const UDSPInstruction opc, DSPEmitter& emitter)
static void r_ret(const UDSPInstruction opc, DSPEmitter& emitter)
{
emitter.dsp_reg_load_stack(DSP_STACK_C);
emitter.MOV(16, M(&g_dsp.pc), R(DX));