Luna/libluna/src/Stack.cpp
apio ae01a31104
kernel: Make sure the stack is 16-byte aligned on program startup
This is required by the System V ABI and fixes some movaps-related GPFs in ndisasm.
2023-06-19 10:41:32 +02:00

11 lines
160 B
C++

#include <luna/Stack.h>
Stack::Stack(u64 base, usize bytes) : m_base(base), m_bytes(bytes)
{
}
u64 Stack::top() const
{
return (m_base + m_bytes) - 16;
}