Merge pull request #4653 from lioncash/dsp-define
DSPInterpreter: Get rid of a #define constant
This commit is contained in:
commit
30e57cecf7
|
@ -48,7 +48,7 @@ void lrs(const UDSPInstruction opc)
|
|||
// Move value from data memory pointed by address M to register $D.
|
||||
void lr(const UDSPInstruction opc)
|
||||
{
|
||||
u8 reg = opc & DSP_REG_MASK;
|
||||
u8 reg = opc & 0x1F;
|
||||
u16 addr = dsp_fetch_code();
|
||||
u16 val = dsp_dmem_read(addr);
|
||||
dsp_op_write_reg(reg, val);
|
||||
|
@ -61,7 +61,7 @@ void lr(const UDSPInstruction opc)
|
|||
// Store value from register $S to a memory pointed by address M.
|
||||
void sr(const UDSPInstruction opc)
|
||||
{
|
||||
u8 reg = opc & DSP_REG_MASK;
|
||||
u8 reg = opc & 0x1F;
|
||||
u16 addr = dsp_fetch_code();
|
||||
|
||||
if (reg >= DSP_REG_ACM0)
|
||||
|
|
|
@ -41,7 +41,7 @@ void mrr(const UDSPInstruction opc)
|
|||
// S16 mode.
|
||||
void lri(const UDSPInstruction opc)
|
||||
{
|
||||
u8 reg = opc & DSP_REG_MASK;
|
||||
u8 reg = opc & 0x1F;
|
||||
u16 imm = dsp_fetch_code();
|
||||
dsp_op_write_reg(reg, imm);
|
||||
dsp_conditional_extend_accum(reg);
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
#include "Core/DSP/DSPCommon.h"
|
||||
|
||||
#define DSP_REG_MASK 0x1f
|
||||
|
||||
namespace DSP
|
||||
{
|
||||
namespace Interpreter
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
#include "Core/DSP/DSPCore.h"
|
||||
#include "Core/DSP/DSPMemoryMap.h"
|
||||
#include "Core/DSP/Interpreter/DSPInterpreter.h"
|
||||
#include "Core/DSP/Jit/DSPEmitter.h"
|
||||
|
||||
using namespace Gen;
|
||||
|
@ -70,7 +69,7 @@ void DSPEmitter::lrs(const UDSPInstruction opc)
|
|||
// Move value from data memory pointed by address M to register $D.
|
||||
void DSPEmitter::lr(const UDSPInstruction opc)
|
||||
{
|
||||
int reg = opc & DSP_REG_MASK;
|
||||
int reg = opc & 0x1F;
|
||||
u16 address = dsp_imem_read(compilePC + 1);
|
||||
dmem_read_imm(address);
|
||||
dsp_op_write_reg(reg, EAX);
|
||||
|
@ -83,7 +82,7 @@ void DSPEmitter::lr(const UDSPInstruction opc)
|
|||
// Store value from register $S to a memory pointed by address M.
|
||||
void DSPEmitter::sr(const UDSPInstruction opc)
|
||||
{
|
||||
u8 reg = opc & DSP_REG_MASK;
|
||||
u8 reg = opc & 0x1F;
|
||||
u16 address = dsp_imem_read(compilePC + 1);
|
||||
|
||||
X64Reg tmp1 = gpr.GetFreeXReg();
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include "Core/DSP/DSPCore.h"
|
||||
#include "Core/DSP/DSPMemoryMap.h"
|
||||
#include "Core/DSP/Interpreter/DSPInterpreter.h"
|
||||
#include "Core/DSP/Jit/DSPEmitter.h"
|
||||
|
||||
using namespace Gen;
|
||||
|
@ -41,7 +40,7 @@ void DSPEmitter::mrr(const UDSPInstruction opc)
|
|||
// S16 mode.
|
||||
void DSPEmitter::lri(const UDSPInstruction opc)
|
||||
{
|
||||
u8 reg = opc & DSP_REG_MASK;
|
||||
u8 reg = opc & 0x1F;
|
||||
u16 imm = dsp_imem_read(compilePC + 1);
|
||||
dsp_op_write_reg_imm(reg, imm);
|
||||
dsp_conditional_extend_accum_imm(reg, imm);
|
||||
|
|
Loading…
Reference in New Issue