mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-02-23 16:23:10 +00:00
Fixes 16bit addr offset calculation
In the case of 16bit addressing mode, the upper bits 16bits are zext prior to result.
This commit is contained in:
parent
1084ecf2d3
commit
e884525434
@ -4663,6 +4663,12 @@ OrderedNode *OpDispatchBuilder::LoadSource_WithOpSize(FEXCore::IR::RegisterClass
|
||||
}
|
||||
}
|
||||
|
||||
if (AddrSize < GPRSize) {
|
||||
// If AddrSize == 16 then we need to clear the upper bits
|
||||
// GPRSize will be 32 in this case
|
||||
Src = _Bfe(AddrSize, AddrSize * 8, 0, Src);
|
||||
}
|
||||
|
||||
LoadableType = true;
|
||||
}
|
||||
else {
|
||||
@ -4792,6 +4798,12 @@ void OpDispatchBuilder::StoreResult_WithOpSize(FEXCore::IR::RegisterClassType Cl
|
||||
}
|
||||
}
|
||||
|
||||
if (AddrSize < GPRSize) {
|
||||
// If AddrSize == 16 then we need to clear the upper bits
|
||||
// GPRSize will be 32 in this case
|
||||
MemStoreDst = _Bfe(AddrSize, AddrSize * 8, 0, MemStoreDst);
|
||||
}
|
||||
|
||||
MemStore = true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user