mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 17:00:19 +02:00
ArchHelpers/Arm64: Fixes LDAPUR and STLUR backpatching
The immediate offset masking was at the completely wrong offset when I wrote these handlers. No idea how I managed to mess those up so badly. Should fix at least some of the issues with #4216
This commit is contained in:
1 file changed
+2
-2
@@ -2118,7 +2118,7 @@ HandleUnalignedAccess(FEXCore::Core::InternalThreadState* Thread, UnalignedHandl
|
||||
LDUR |= Size << 30;
|
||||
LDUR |= AddrReg << 5;
|
||||
LDUR |= DataReg;
|
||||
LDUR |= Instr & (0b1'1111'1111 << 9);
|
||||
LDUR |= Instr & (0b1'1111'1111 << 12);
|
||||
if (HandleType != UnalignedHandlerType::NonAtomic) {
|
||||
// Ordering matters with cross-thread visibility!
|
||||
std::atomic_ref<uint32_t>(PC[1]).store(DMB_LD, std::memory_order_release); // Back-patch the half-barrier.
|
||||
@@ -2132,7 +2132,7 @@ HandleUnalignedAccess(FEXCore::Core::InternalThreadState* Thread, UnalignedHandl
|
||||
STUR |= Size << 30;
|
||||
STUR |= AddrReg << 5;
|
||||
STUR |= DataReg;
|
||||
STUR |= Instr & (0b1'1111'1111 << 9);
|
||||
STUR |= Instr & (0b1'1111'1111 << 12);
|
||||
if (HandleType != UnalignedHandlerType::NonAtomic) {
|
||||
std::atomic_ref<uint32_t>(PC[-1]).store(DMB, std::memory_order_release); // Back-patch the half-barrier.
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user