mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 16:00:18 +02:00
SyscallHandler: Shrink definition struct from 24 to 16 bytes
Just a minor space saving, given how many syscall definitions we'll have.
This commit is contained in:
1 parent
bd5188e7bc
commit
10c3b2fb5d
2 files changed
+5
-5
No files matched your search
@@ -128,8 +128,6 @@ public:
|
||||
using SyscallPtrArg6 = uint64_t (*)(FEXCore::Core::CpuStateFrame* Frame, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t);
|
||||
|
||||
struct SyscallFunctionDefinition {
|
||||
uint8_t NumArgs;
|
||||
FEXCore::IR::SyscallFlags Flags;
|
||||
union {
|
||||
void* Ptr;
|
||||
SyscallPtrArg0 Ptr0;
|
||||
@@ -141,6 +139,8 @@ public:
|
||||
SyscallPtrArg6 Ptr6;
|
||||
};
|
||||
int32_t HostSyscallNumber;
|
||||
uint8_t NumArgs;
|
||||
FEXCore::IR::SyscallFlags Flags;
|
||||
#ifdef DEBUG_STRACE
|
||||
fextl::string StraceFmt;
|
||||
#endif
|
||||
@@ -335,8 +335,8 @@ protected:
|
||||
|
||||
fextl::vector<SyscallFunctionDefinition> Definitions {std::max<std::size_t>(FEX::HLE::x64::SYSCALL_x64_MAX, FEX::HLE::x32::SYSCALL_x86_MAX),
|
||||
{
|
||||
.NumArgs = 255,
|
||||
.Ptr = reinterpret_cast<void*>(&UnimplementedSyscall),
|
||||
.NumArgs = 255,
|
||||
}};
|
||||
std::mutex MMapMutex;
|
||||
|
||||
|
||||
@@ -63,10 +63,10 @@ void x64SyscallHandler::RegisterSyscallHandlers() {
|
||||
constexpr int SYSCALL_GAP_END = 424;
|
||||
|
||||
const SyscallFunctionDefinition InvalidSyscall {
|
||||
.NumArgs = 0,
|
||||
.Flags = FEXCore::IR::SyscallFlags::DEFAULT,
|
||||
.Ptr = reinterpret_cast<void*>(&UnimplementedSyscall),
|
||||
.HostSyscallNumber = SYSCALL_DEF(MAX),
|
||||
.NumArgs = 0,
|
||||
.Flags = FEXCore::IR::SyscallFlags::DEFAULT,
|
||||
#ifdef DEBUG_STRACE
|
||||
.StraceFmt = "Invalid",
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user