FEXLoader: Align stack base

This ensures that __libc_stack_end is aligned, the same way it is on
native.
This commit is contained in:
Asahi Lina 2024-11-13 03:47:03 +09:00
parent e675f4241a
commit 4a67893f1d

View File

@ -725,6 +725,9 @@ public:
uint64_t ExecFNLocation = TotalArgumentMemSize;
TotalArgumentMemSize += Args[0].size() + 1;
// Align the argument block to 16 bytes to keep the stack aligned
TotalArgumentMemSize = FEXCore::AlignUp(TotalArgumentMemSize, 16);
// Offset the stack by how much memory we need
StackPointer -= TotalArgumentMemSize;