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:
Ryan Houdek committed 2021-03-10 17:43:21 -08:00
1 parent e708b83dbb
commit 0dc7fd75e1
3 files changed
+28

No files matched your search

+12
View File
@@ -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();
});
}
}
+11
View File
@@ -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();
});
}
}