mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 07:45:33 +01:00
Avoid shadowing variables.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6613 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
c68ae8e91e
commit
38a46ddf94
@ -82,8 +82,8 @@ void DSPEmitter::lrs(const UDSPInstruction opc)
|
||||
void DSPEmitter::lr(const UDSPInstruction opc)
|
||||
{
|
||||
int reg = opc & DSP_REG_MASK;
|
||||
u16 addr = dsp_imem_read(compilePC + 1);
|
||||
dmem_read_imm(addr);
|
||||
u16 address = dsp_imem_read(compilePC + 1);
|
||||
dmem_read_imm(address);
|
||||
dsp_op_write_reg(reg, EAX);
|
||||
dsp_conditional_extend_accum(reg);
|
||||
}
|
||||
@ -96,9 +96,9 @@ void DSPEmitter::lr(const UDSPInstruction opc)
|
||||
void DSPEmitter::sr(const UDSPInstruction opc)
|
||||
{
|
||||
u8 reg = opc & DSP_REG_MASK;
|
||||
u16 addr = dsp_imem_read(compilePC + 1);
|
||||
u16 address = dsp_imem_read(compilePC + 1);
|
||||
dsp_op_read_reg(reg, ECX);
|
||||
dmem_write_imm(addr);
|
||||
dmem_write_imm(address);
|
||||
}
|
||||
|
||||
// SI @M, #I
|
||||
@ -108,10 +108,10 @@ void DSPEmitter::sr(const UDSPInstruction opc)
|
||||
// M (M is 8-bit value sign extended).
|
||||
void DSPEmitter::si(const UDSPInstruction opc)
|
||||
{
|
||||
u16 addr = (s8)opc;
|
||||
u16 address = (s8)opc;
|
||||
u16 imm = dsp_imem_read(compilePC + 1);
|
||||
MOV(32, R(ECX), Imm32((u32)imm));
|
||||
dmem_write_imm(addr);
|
||||
dmem_write_imm(address);
|
||||
}
|
||||
|
||||
// LRR $D, @$S
|
||||
|
@ -333,26 +333,27 @@ void DSPEmitter::dmem_write()
|
||||
}
|
||||
|
||||
// ECX - value
|
||||
void DSPEmitter::dmem_write_imm(u16 addr)
|
||||
void DSPEmitter::dmem_write_imm(u16 address)
|
||||
{
|
||||
switch (addr >> 12)
|
||||
switch (address >> 12)
|
||||
{
|
||||
case 0x0: // 0xxx DRAM
|
||||
#ifdef _M_IX86 // All32
|
||||
MOV(16, M(&g_dsp.dram[addr & DSP_DRAM_MASK]), R(ECX));
|
||||
MOV(16, M(&g_dsp.dram[address & DSP_DRAM_MASK]), R(ECX));
|
||||
#else
|
||||
MOV(64, R(RDX), ImmPtr(g_dsp.dram));
|
||||
MOV(16, MDisp(RDX,(addr & DSP_DRAM_MASK)*2), R(ECX));
|
||||
MOV(16, MDisp(RDX,(address & DSP_DRAM_MASK)*2), R(ECX));
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 0xf: // Fxxx HW regs
|
||||
MOV(16, R(EAX), Imm16(addr));
|
||||
MOV(16, R(EAX), Imm16(address));
|
||||
ABI_CallFunctionRR((void *)gdsp_ifx_write, EAX, ECX);
|
||||
break;
|
||||
|
||||
default: // Unmapped/non-existing memory
|
||||
ERROR_LOG(DSPLLE, "%04x DSP ERROR: Write to UNKNOWN (%04x) memory", g_dsp.pc, addr);
|
||||
ERROR_LOG(DSPLLE, "%04x DSP ERROR: Write to UNKNOWN (%04x) memory",
|
||||
g_dsp.pc, address);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -431,34 +432,35 @@ void DSPEmitter::dmem_read()
|
||||
SetJumpTarget(end2);
|
||||
}
|
||||
|
||||
void DSPEmitter::dmem_read_imm(u16 addr)
|
||||
void DSPEmitter::dmem_read_imm(u16 address)
|
||||
{
|
||||
switch (addr >> 12)
|
||||
switch (address >> 12)
|
||||
{
|
||||
case 0x0: // 0xxx DRAM
|
||||
#ifdef _M_IX86 // All32
|
||||
MOV(16, R(EAX), M(&g_dsp.dram[addr & DSP_DRAM_MASK]));
|
||||
MOV(16, R(EAX), M(&g_dsp.dram[address & DSP_DRAM_MASK]));
|
||||
#else
|
||||
MOV(64, R(RDX), ImmPtr(g_dsp.dram));
|
||||
MOV(16, R(EAX), MDisp(RDX,(addr & DSP_DRAM_MASK)*2));
|
||||
MOV(16, R(EAX), MDisp(RDX,(address & DSP_DRAM_MASK)*2));
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 0x1: // 1xxx COEF
|
||||
#ifdef _M_IX86 // All32
|
||||
MOV(16, R(EAX), Imm16(g_dsp.coef[addr & DSP_COEF_MASK]));
|
||||
MOV(16, R(EAX), Imm16(g_dsp.coef[address & DSP_COEF_MASK]));
|
||||
#else
|
||||
MOV(64, R(RDX), ImmPtr(g_dsp.coef));
|
||||
MOV(16, R(EAX), MDisp(RDX,(addr & DSP_COEF_MASK)*2));
|
||||
MOV(16, R(EAX), MDisp(RDX,(address & DSP_COEF_MASK)*2));
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 0xf: // Fxxx HW regs
|
||||
ABI_CallFunctionC16((void *)gdsp_ifx_read, addr);
|
||||
ABI_CallFunctionC16((void *)gdsp_ifx_read, address);
|
||||
break;
|
||||
|
||||
default: // Unmapped/non-existing memory
|
||||
ERROR_LOG(DSPLLE, "%04x DSP ERROR: Read from UNKNOWN (%04x) memory", g_dsp.pc, addr);
|
||||
ERROR_LOG(DSPLLE, "%04x DSP ERROR: Read from UNKNOWN (%04x) memory",
|
||||
g_dsp.pc, address);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,6 @@ void TexDecoder_OpenCL_Initialize()
|
||||
char *header = NULL;
|
||||
size_t nDevices = 0;
|
||||
cl_device_id *devices = NULL;
|
||||
cl_program program = NULL;
|
||||
size_t *binary_sizes = NULL;
|
||||
char **binaries = NULL;
|
||||
char filename[1024];
|
||||
|
Loading…
x
Reference in New Issue
Block a user