mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-23 15:22:45 +01:00
Merge pull request #1645 from mailwl/thumb_pc
Fix thumb ADR instruction alignment
This commit is contained in:
commit
0408f1191a
1 changed files with 2 additions and 6 deletions
|
@ -3955,9 +3955,7 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
|
||||||
if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) {
|
if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) {
|
||||||
add_inst* const inst_cream = (add_inst*)inst_base->component;
|
add_inst* const inst_cream = (add_inst*)inst_base->component;
|
||||||
|
|
||||||
u32 rn_val = RN;
|
u32 rn_val = CHECK_READ_REG15_WA(cpu, inst_cream->Rn);
|
||||||
if (inst_cream->Rn == 15)
|
|
||||||
rn_val += 2 * cpu->GetInstructionSize();
|
|
||||||
|
|
||||||
bool carry;
|
bool carry;
|
||||||
bool overflow;
|
bool overflow;
|
||||||
|
@ -6167,9 +6165,7 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
|
||||||
if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) {
|
if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) {
|
||||||
sub_inst* const inst_cream = (sub_inst*)inst_base->component;
|
sub_inst* const inst_cream = (sub_inst*)inst_base->component;
|
||||||
|
|
||||||
u32 rn_val = RN;
|
u32 rn_val = CHECK_READ_REG15_WA(cpu, inst_cream->Rn);
|
||||||
if (inst_cream->Rn == 15)
|
|
||||||
rn_val += 2 * cpu->GetInstructionSize();
|
|
||||||
|
|
||||||
bool carry;
|
bool carry;
|
||||||
bool overflow;
|
bool overflow;
|
||||||
|
|
Loading…
Reference in a new issue