Merge pull request #3342 from Sonicadvance1/fix_proton_3

Fixes Proton again
This commit is contained in:
Ryan Houdek authored and GitHub committed 2023-12-20 23:15:10 -08:00
commit b1c3737aef
2 files changed
+1 -8

No files matched your search

@@ -385,7 +385,6 @@ struct StackFrameData {
FEXCore::Context::Context *CTX{};
FEXCore::Core::CpuStateFrame NewFrame{};
FEX::HLE::clone3_args GuestArgs{};
size_t StackSize;
};
struct StackFramePlusRet {
@@ -469,7 +468,7 @@ static uint64_t Clone2Handler(FEXCore::Core::CpuStateFrame *Frame, FEX::HLE::clo
uint64_t Flags = args->args.flags & ~INVALID_FOR_HOST;
uint64_t Result = ::clone(
Clone2HandlerRet, // To be called function
(void*)((uint64_t)args->NewStack + Data->StackSize), // Stack
(void*)((uint64_t)args->NewStack + args->StackSize), // Stack
Flags, //Flags
Data, //Argument
(pid_t*)args->args.parent_tid, // parent_tid
@@ -62,8 +62,6 @@ namespace FEX::HLE {
memcpy(&NewThreadState, Frame, sizeof(FEXCore::Core::CPUState));
NewThreadState.gregs[FEXCore::X86State::REG_RAX] = 0;
NewThreadState.gregs[FEXCore::X86State::REG_RBX] = 0;
NewThreadState.gregs[FEXCore::X86State::REG_RBP] = 0;
if (args->Type == TYPE_CLONE3) {
// stack pointer points to the lowest address to the stack
// set RSP to stack + size
@@ -156,8 +154,6 @@ namespace FEX::HLE {
memcpy(&NewThreadState, Frame, sizeof(FEXCore::Core::CPUState));
NewThreadState.gregs[FEXCore::X86State::REG_RAX] = 0;
NewThreadState.gregs[FEXCore::X86State::REG_RBX] = 0;
NewThreadState.gregs[FEXCore::X86State::REG_RBP] = 0;
if (GuestArgs->stack == 0) {
// Copies in the original thread's stack
}
@@ -182,8 +178,6 @@ namespace FEX::HLE {
::syscall(SYS_rt_sigprocmask, SIG_SETMASK, &CloneArgs->SignalMask, nullptr, sizeof(CloneArgs->SignalMask));
Thread->CurrentFrame->State.gregs[FEXCore::X86State::REG_RAX] = 0;
Thread->CurrentFrame->State.gregs[FEXCore::X86State::REG_RBX] = 0;
Thread->CurrentFrame->State.gregs[FEXCore::X86State::REG_RBP] = 0;
if (GuestArgs->stack == 0) {
// Copies in the original thread's stack
}