mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-16 06:00:36 +02:00
Adds a couple new 32bit syscalls found while running Steam
These are straightforward to implement. Only a few dozen more syscalls missing on 32bit
This commit is contained in:
1 parent
e708b83dbb
commit
0dc7fd75e1
3 files changed
+28
No files matched your search
@@ -86,6 +86,18 @@ namespace FEX::HLE::x32 {
|
||||
uint64_t Result = ::munlock(reinterpret_cast<void*>(0x1'0000), 0x1'0000'0000ULL - 0x1'0000);
|
||||
SYSCALL_ERRNO();
|
||||
});
|
||||
|
||||
REGISTER_SYSCALL_IMPL_X32(shmat, [](FEXCore::Core::CpuStateFrame *Frame, int shmid, const void *shmaddr, int shmflg) -> uint64_t {
|
||||
uint32_t ResultAddr{};
|
||||
uint64_t Result = static_cast<FEX::HLE::x32::x32SyscallHandler*>(FEX::HLE::_SyscallHandler)->GetAllocator()->
|
||||
shmat(shmid, reinterpret_cast<const void*>(shmaddr), shmflg, &ResultAddr);
|
||||
if (Result == 0) {
|
||||
return ResultAddr;
|
||||
}
|
||||
else {
|
||||
return Result;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -790,5 +790,10 @@ namespace FEX::HLE::x32 {
|
||||
}
|
||||
void RegisterSemaphore() {
|
||||
REGISTER_SYSCALL_IMPL_X32(ipc, _ipc);
|
||||
|
||||
REGISTER_SYSCALL_IMPL_X32(semtimedop_time64, [](FEXCore::Core::CpuStateFrame *Frame, int semid, struct sembuf *sops, size_t nsops, const struct timespec *timeout) -> uint64_t {
|
||||
uint64_t Result = ::semtimedop(semid, sops, nsops, timeout);
|
||||
SYSCALL_ERRNO();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -340,5 +340,16 @@ namespace FEX::HLE::x32 {
|
||||
}
|
||||
SYSCALL_ERRNO();
|
||||
});
|
||||
|
||||
REGISTER_SYSCALL_IMPL_X32(futex_time64, [](FEXCore::Core::CpuStateFrame *Frame, int *uaddr, int futex_op, int val, const struct timespec *timeout, int *uaddr2, uint32_t val3) -> uint64_t {
|
||||
uint64_t Result = syscall(SYS_futex,
|
||||
uaddr,
|
||||
futex_op,
|
||||
val,
|
||||
timeout,
|
||||
uaddr2,
|
||||
val3);
|
||||
SYSCALL_ERRNO();
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user