Fix MIPS s16 unaligned load (although it does not fix any game)
This commit is contained in:
parent
a435c712f8
commit
1667597a43
1 changed files with 2 additions and 2 deletions
|
@ -2083,9 +2083,9 @@ static void emit_mem_access_loadop(
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (signext) {
|
if (signext) {
|
||||||
// Load 16 with sign extension is essentially a load byte
|
|
||||||
if (alignment) {
|
if (alignment) {
|
||||||
mips_emit_lb(reg_rv, reg_rv, (base_addr & 0xffff));
|
// Unaligned signed 16b load, is just a load byte (due to sign extension)
|
||||||
|
mips_emit_lb(reg_rv, reg_rv, ((base_addr | 1) & 0xffff));
|
||||||
} else {
|
} else {
|
||||||
mips_emit_lh(reg_rv, reg_rv, (base_addr & 0xffff));
|
mips_emit_lh(reg_rv, reg_rv, (base_addr & 0xffff));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue