ARM: Remove obsolete force-alignment in `bx pc` (fixes #2964)

This commit is contained in:
Vicki Pfau 2023-06-26 16:14:25 -07:00
parent 0d353a740f
commit 87c9d3851e
2 changed files with 2 additions and 5 deletions

View File

@ -1,5 +1,6 @@
0.10.3: (Future)
Emulation fixes:
- ARM: Remove obsolete force-alignment in `bx pc` (fixes mgba.io/i/2964)
- GB Audio: Fix channels 1/2 staying muted if restarted after long silence
- GB Audio: Fix channel 1 restarting if sweep applies after stop (fixes mgba.io/i/2965)
- GB I/O: Read back proper SVBK value after writing 0 (fixes mgba.io/i/2921)

View File

@ -401,11 +401,7 @@ DEFINE_INSTRUCTION_THUMB(BL2,
DEFINE_INSTRUCTION_THUMB(BX,
int rm = (opcode >> 3) & 0xF;
_ARMSetMode(cpu, cpu->gprs[rm] & 0x00000001);
int misalign = 0;
if (rm == ARM_PC) {
misalign = cpu->gprs[rm] & 0x00000002;
}
cpu->gprs[ARM_PC] = (cpu->gprs[rm] & 0xFFFFFFFE) - misalign;
cpu->gprs[ARM_PC] = cpu->gprs[rm] & 0xFFFFFFFE;
if (cpu->executionMode == MODE_THUMB) {
currentCycles += ThumbWritePC(cpu);
} else {