commit
b101e6312f
@ -4207,8 +4207,7 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
|
||||
CDP_INST:
|
||||
{
|
||||
cdp_inst *inst_cream = (cdp_inst *)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
// Undefined instruction here
|
||||
cpu->NumInstrsToExecute = 0;
|
||||
return num_instrs;
|
||||
@ -4231,8 +4230,8 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
CLZ_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
clz_inst* inst_cream = (clz_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
RD = clz(RM);
|
||||
}
|
||||
cpu->Reg[15] += GET_INST_SIZE(cpu);
|
||||
@ -4316,10 +4315,11 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
CPY_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
mov_inst* inst_cream = (mov_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
|
||||
RD = SHIFTER_OPERAND;
|
||||
if ((inst_cream->Rd == 15)) {
|
||||
if (inst_cream->Rd == 15) {
|
||||
INC_PC(sizeof(mov_inst));
|
||||
goto DISPATCH;
|
||||
}
|
||||
@ -4331,8 +4331,9 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
EOR_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
eor_inst* inst_cream = (eor_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
|
||||
u32 lop = RN;
|
||||
if (inst_cream->Rn == 15) {
|
||||
lop += 2 * GET_INST_SIZE(cpu);
|
||||
@ -4371,8 +4372,8 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
LDM_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
ldst_inst* inst_cream = (ldst_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
inst_cream->get_addr(cpu, inst_cream->inst, addr, 1);
|
||||
|
||||
unsigned int inst = inst_cream->inst;
|
||||
@ -4441,8 +4442,9 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
SXTH_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
sxth_inst* inst_cream = (sxth_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
|
||||
unsigned int operand2 = ROTATE_RIGHT_32(RM, 8 * inst_cream->rotate);
|
||||
if (BIT(operand2, 15)) {
|
||||
operand2 |= 0xffff0000;
|
||||
@ -4486,9 +4488,10 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
LDRCOND_INST:
|
||||
{
|
||||
ldst_inst *inst_cream = (ldst_inst *)inst_base->component;
|
||||
if (CondPassed(cpu, inst_base->cond)) {
|
||||
ldst_inst *inst_cream = (ldst_inst *)inst_base->component;
|
||||
inst_cream->get_addr(cpu, inst_cream->inst, addr, 1);
|
||||
|
||||
unsigned int value = Memory::Read32(addr);
|
||||
if (BIT(CP15_REG(CP15_CONTROL), 22) == 1)
|
||||
cpu->Reg[BITS(inst_cream->inst, 12, 15)] = value;
|
||||
@ -4512,11 +4515,9 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
UXTH_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
uxth_inst* inst_cream = (uxth_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
unsigned int operand2 = ROTATE_RIGHT_32(RM, 8 * inst_cream->rotate)
|
||||
& 0xffff;
|
||||
RD = operand2;
|
||||
RD = ROTATE_RIGHT_32(RM, 8 * inst_cream->rotate) & 0xffff;
|
||||
}
|
||||
cpu->Reg[15] += GET_INST_SIZE(cpu);
|
||||
INC_PC(sizeof(uxth_inst));
|
||||
@ -4525,10 +4526,10 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
UXTAH_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
uxtah_inst* inst_cream = (uxtah_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
unsigned int operand2 = ROTATE_RIGHT_32(RM, 8 * inst_cream->rotate)
|
||||
& 0xffff;
|
||||
unsigned int operand2 = ROTATE_RIGHT_32(RM, 8 * inst_cream->rotate) & 0xffff;
|
||||
|
||||
RD = RN + operand2;
|
||||
if (inst_cream->Rn == 15 || inst_cream->Rm == 15) {
|
||||
LOG_ERROR(Core_ARM11, "invalid operands for UXTAH");
|
||||
@ -4542,9 +4543,10 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
LDRB_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
ldst_inst* inst_cream = (ldst_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
inst_cream->get_addr(cpu, inst_cream->inst, addr, 1);
|
||||
|
||||
cpu->Reg[BITS(inst_cream->inst, 12, 15)] = Memory::Read8(addr);
|
||||
|
||||
if (BITS(inst_cream->inst, 12, 15) == 15) {
|
||||
@ -4559,9 +4561,10 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
LDRBT_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
ldst_inst* inst_cream = (ldst_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
inst_cream->get_addr(cpu, inst_cream->inst, addr, 1);
|
||||
|
||||
cpu->Reg[BITS(inst_cream->inst, 12, 15)] = Memory::Read8(addr);
|
||||
|
||||
if (BITS(inst_cream->inst, 12, 15) == 15) {
|
||||
@ -4576,8 +4579,8 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
LDRD_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
ldst_inst* inst_cream = (ldst_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
// Should check if RD is even-numbered, Rd != 14, addr[0:1] == 0, (CP15_reg1_U == 1 || addr[2] == 0)
|
||||
inst_cream->get_addr(cpu, inst_cream->inst, addr, 1);
|
||||
|
||||
@ -4594,8 +4597,8 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
|
||||
LDREX_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
generic_arm_inst* inst_cream = (generic_arm_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
unsigned int read_addr = RN;
|
||||
|
||||
add_exclusive_addr(cpu, read_addr);
|
||||
@ -4614,8 +4617,8 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
LDREXB_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
generic_arm_inst* inst_cream = (generic_arm_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
unsigned int read_addr = RN;
|
||||
|
||||
add_exclusive_addr(cpu, read_addr);
|
||||
@ -4634,8 +4637,8 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
LDREXH_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
generic_arm_inst* inst_cream = (generic_arm_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
unsigned int read_addr = RN;
|
||||
|
||||
add_exclusive_addr(cpu, read_addr);
|
||||
@ -4654,8 +4657,8 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
LDREXD_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
generic_arm_inst* inst_cream = (generic_arm_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
unsigned int read_addr = RN;
|
||||
|
||||
add_exclusive_addr(cpu, read_addr);
|
||||
@ -4676,8 +4679,8 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
LDRH_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
ldst_inst* inst_cream = (ldst_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
inst_cream->get_addr(cpu, inst_cream->inst, addr, 1);
|
||||
cpu->Reg[BITS(inst_cream->inst, 12, 15)] = Memory::Read16(addr);
|
||||
if (BITS(inst_cream->inst, 12, 15) == 15) {
|
||||
@ -4692,8 +4695,8 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
LDRSB_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
ldst_inst* inst_cream = (ldst_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
inst_cream->get_addr(cpu, inst_cream->inst, addr, 1);
|
||||
unsigned int value = Memory::Read8(addr);
|
||||
if (BIT(value, 7)) {
|
||||
@ -4712,8 +4715,8 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
LDRSH_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
ldst_inst* inst_cream = (ldst_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
inst_cream->get_addr(cpu, inst_cream->inst, addr, 1);
|
||||
unsigned int value = Memory::Read16(addr);
|
||||
if (BIT(value, 15)) {
|
||||
@ -4732,9 +4735,10 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
LDRT_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
ldst_inst* inst_cream = (ldst_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
inst_cream->get_addr(cpu, inst_cream->inst, addr, 1);
|
||||
|
||||
unsigned int value = Memory::Read32(addr);
|
||||
cpu->Reg[BITS(inst_cream->inst, 12, 15)] = value;
|
||||
|
||||
@ -4755,8 +4759,9 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
MCR_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
mcr_inst* inst_cream = (mcr_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
|
||||
unsigned int inst = inst_cream->inst;
|
||||
if (inst_cream->Rd == 15) {
|
||||
DEBUG_MSG;
|
||||
@ -4855,8 +4860,9 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
MCRR_INST:
|
||||
MLA_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
mla_inst* inst_cream = (mla_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
|
||||
uint64_t rm = RM;
|
||||
uint64_t rs = RS;
|
||||
uint64_t rn = RN;
|
||||
@ -4881,8 +4887,9 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
MOV_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
mov_inst* inst_cream = (mov_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
|
||||
RD = SHIFTER_OPERAND;
|
||||
if (inst_cream->S && (inst_cream->Rd == 15)) {
|
||||
if (CurrentModeHasSPSR) {
|
||||
@ -4907,8 +4914,9 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
MRC_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
mrc_inst* inst_cream = (mrc_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
|
||||
unsigned int inst = inst_cream->inst;
|
||||
if (inst_cream->Rd == 15) {
|
||||
DEBUG_MSG;
|
||||
@ -4964,8 +4972,9 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
MRRC_INST:
|
||||
MRS_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
mrs_inst* inst_cream = (mrs_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
|
||||
if (inst_cream->R) {
|
||||
RD = cpu->Spsr_copy;
|
||||
} else {
|
||||
@ -5024,8 +5033,9 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
MUL_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
mul_inst* inst_cream = (mul_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
|
||||
uint64_t rm = RM;
|
||||
uint64_t rs = RS;
|
||||
RD = static_cast<uint32_t>((rm * rs) & 0xffffffff);
|
||||
@ -5628,7 +5638,7 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
|
||||
SMLA_INST:
|
||||
{
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
smla_inst* inst_cream = (smla_inst*)inst_base->component;
|
||||
int32_t operand1, operand2;
|
||||
if (inst_cream->x == 0)
|
||||
@ -5709,7 +5719,7 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
|
||||
SMLAL_INST:
|
||||
{
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
umlal_inst* inst_cream = (umlal_inst*)inst_base->component;
|
||||
long long int rm = RM;
|
||||
long long int rs = RS;
|
||||
@ -5867,7 +5877,7 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
|
||||
SMUL_INST:
|
||||
{
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
smul_inst* inst_cream = (smul_inst*)inst_base->component;
|
||||
uint32_t operand1, operand2;
|
||||
if (inst_cream->x == 0)
|
||||
@ -5888,7 +5898,7 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
SMULL_INST:
|
||||
{
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
umull_inst* inst_cream = (umull_inst*)inst_base->component;
|
||||
int64_t rm = RM;
|
||||
int64_t rs = RS;
|
||||
@ -5997,9 +6007,10 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
STM_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
ldst_inst* inst_cream = (ldst_inst*)inst_base->component;
|
||||
unsigned int inst = inst_cream->inst;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
|
||||
int i;
|
||||
unsigned int Rn = BITS(inst, 16, 19);
|
||||
unsigned int old_RN = cpu->Reg[Rn];
|
||||
@ -6057,8 +6068,9 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
SXTB_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
sxtb_inst* inst_cream = (sxtb_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
|
||||
if (inst_cream->Rm == 15) {
|
||||
LOG_ERROR(Core_ARM11, "invalid operand for SXTB");
|
||||
CITRA_IGNORE_EXIT(-1);
|
||||
@ -6077,9 +6089,10 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
STR_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
ldst_inst* inst_cream = (ldst_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
inst_cream->get_addr(cpu, inst_cream->inst, addr, 0);
|
||||
|
||||
unsigned int value = cpu->Reg[BITS(inst_cream->inst, 12, 15)];
|
||||
Memory::Write32(addr, value);
|
||||
}
|
||||
@ -6090,11 +6103,9 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
UXTB_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
uxtb_inst* inst_cream = (uxtb_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
unsigned int operand2 = ROTATE_RIGHT_32(RM, 8 * inst_cream->rotate)
|
||||
& 0xff;
|
||||
RD = operand2;
|
||||
RD = ROTATE_RIGHT_32(RM, 8 * inst_cream->rotate) & 0xff;
|
||||
}
|
||||
cpu->Reg[15] += GET_INST_SIZE(cpu);
|
||||
INC_PC(sizeof(uxtb_inst));
|
||||
@ -6103,10 +6114,10 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
UXTAB_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
uxtab_inst* inst_cream = (uxtab_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
unsigned int operand2 = ROTATE_RIGHT_32(RM, 8 * inst_cream->rotate)
|
||||
& 0xff;
|
||||
|
||||
unsigned int operand2 = ROTATE_RIGHT_32(RM, 8 * inst_cream->rotate) & 0xff;
|
||||
RD = RN + operand2;
|
||||
}
|
||||
cpu->Reg[15] += GET_INST_SIZE(cpu);
|
||||
@ -6116,8 +6127,8 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
STRB_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
ldst_inst* inst_cream = (ldst_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
inst_cream->get_addr(cpu, inst_cream->inst, addr, 0);
|
||||
unsigned int value = cpu->Reg[BITS(inst_cream->inst, 12, 15)] & 0xff;
|
||||
Memory::Write8(addr, value);
|
||||
@ -6129,8 +6140,8 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
STRBT_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
ldst_inst* inst_cream = (ldst_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
inst_cream->get_addr(cpu, inst_cream->inst, addr, 0);
|
||||
unsigned int value = cpu->Reg[BITS(inst_cream->inst, 12, 15)] & 0xff;
|
||||
Memory::Write8(addr, value);
|
||||
@ -6142,8 +6153,8 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
STRD_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
ldst_inst* inst_cream = (ldst_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
inst_cream->get_addr(cpu, inst_cream->inst, addr, 0);
|
||||
|
||||
unsigned int value = cpu->Reg[BITS(inst_cream->inst, 12, 15)];
|
||||
@ -6158,9 +6169,8 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
STREX_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
generic_arm_inst* inst_cream = (generic_arm_inst*)inst_base->component;
|
||||
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
unsigned int write_addr = cpu->Reg[inst_cream->Rn];
|
||||
|
||||
if ((exclusive_detect(cpu, write_addr) == 0) && (cpu->exclusive_state == 1)) {
|
||||
@ -6181,9 +6191,8 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
STREXB_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
generic_arm_inst* inst_cream = (generic_arm_inst*)inst_base->component;
|
||||
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
unsigned int write_addr = cpu->Reg[inst_cream->Rn];
|
||||
|
||||
if ((exclusive_detect(cpu, write_addr) == 0) && (cpu->exclusive_state == 1)) {
|
||||
@ -6204,9 +6213,8 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
STREXD_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
generic_arm_inst* inst_cream = (generic_arm_inst*)inst_base->component;
|
||||
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
unsigned int write_addr = cpu->Reg[inst_cream->Rn];
|
||||
|
||||
if ((exclusive_detect(cpu, write_addr) == 0) && (cpu->exclusive_state == 1)) {
|
||||
@ -6229,9 +6237,8 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
STREXH_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
generic_arm_inst* inst_cream = (generic_arm_inst*)inst_base->component;
|
||||
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
unsigned int write_addr = cpu->Reg[inst_cream->Rn];
|
||||
|
||||
if ((exclusive_detect(cpu, write_addr) == 0) && (cpu->exclusive_state == 1)) {
|
||||
@ -6252,9 +6259,10 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
STRH_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
ldst_inst* inst_cream = (ldst_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
inst_cream->get_addr(cpu, inst_cream->inst, addr, 0);
|
||||
|
||||
unsigned int value = cpu->Reg[BITS(inst_cream->inst, 12, 15)] & 0xffff;
|
||||
Memory::Write16(addr, value);
|
||||
}
|
||||
@ -6265,9 +6273,10 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
STRT_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
ldst_inst* inst_cream = (ldst_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
inst_cream->get_addr(cpu, inst_cream->inst, addr, 0);
|
||||
|
||||
unsigned int value = cpu->Reg[BITS(inst_cream->inst, 12, 15)];
|
||||
Memory::Write32(addr, value);
|
||||
}
|
||||
@ -6313,10 +6322,9 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
SWI_INST:
|
||||
{
|
||||
swi_inst *inst_cream = (swi_inst *)inst_base->component;
|
||||
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond))
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
HLE::CallSVC(Memory::Read32(cpu->Reg[15]));
|
||||
}
|
||||
|
||||
cpu->Reg[15] += GET_INST_SIZE(cpu);
|
||||
INC_PC(sizeof(swi_inst));
|
||||
@ -6325,8 +6333,9 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
SWP_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
swp_inst* inst_cream = (swp_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
|
||||
addr = RN;
|
||||
unsigned int value;
|
||||
value = Memory::Read32(addr);
|
||||
@ -6341,8 +6350,8 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
SWPB_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
swp_inst* inst_cream = (swp_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
addr = RN;
|
||||
unsigned int value = Memory::Read8(addr);
|
||||
Memory::Write8(addr, (RM & 0xFF));
|
||||
@ -6355,8 +6364,9 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
SXTAB_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
sxtab_inst* inst_cream = (sxtab_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
|
||||
// R15 should be check
|
||||
if(inst_cream->Rn == 15 || inst_cream->Rm == 15 || inst_cream->Rd ==15){
|
||||
CITRA_IGNORE_EXIT(-1);
|
||||
@ -6408,8 +6418,9 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
|
||||
SXTAH_INST:
|
||||
{
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
sxtah_inst* inst_cream = (sxtah_inst*)inst_base->component;
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
|
||||
// R15 should be check
|
||||
if(inst_cream->Rn == 15 || inst_cream->Rm == 15 || inst_cream->Rd ==15) {
|
||||
CITRA_IGNORE_EXIT(-1);
|
||||
@ -6741,7 +6752,7 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
UMLAL_INST:
|
||||
{
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
umlal_inst* inst_cream = (umlal_inst*)inst_base->component;
|
||||
unsigned long long int rm = RM;
|
||||
unsigned long long int rs = RS;
|
||||
@ -6764,7 +6775,7 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
|
||||
}
|
||||
UMULL_INST:
|
||||
{
|
||||
if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) {
|
||||
if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
|
||||
umull_inst* inst_cream = (umull_inst*)inst_base->component;
|
||||
unsigned long long int rm = RM;
|
||||
unsigned long long int rs = RS;
|
||||
|
Loading…
Reference in New Issue
Block a user