20#ifndef POSIX_LINUX_AMD64_SIGNAL_ABI_H
21#define POSIX_LINUX_AMD64_SIGNAL_ABI_H
23#include "pedigree/kernel/processor/types.h"
25namespace LinuxAmd64SignalAbi {
27 uint64_t stackPointer;
92 uint32_t xmmSpace[64];
93 uint32_t reserved2[12];
94 uint32_t reserved3[12];
97static_assert(
sizeof(
Stack) == 24,
"Linux amd64 stack_t must be 24 bytes");
98static_assert(
sizeof(
Sigcontext) == 256,
"Linux amd64 sigcontext must be 256 bytes");
99static_assert(
sizeof(
Ucontext) == 304,
"Linux amd64 ucontext must be 304 bytes");
100static_assert(
sizeof(
Siginfo) == 128,
"Linux siginfo_t must be 128 bytes");
101static_assert(
alignof(
Siginfo) == 8,
"Linux siginfo_t must be 8-byte aligned");
102static_assert(
sizeof(
RtSigframe) == 440,
"Linux amd64 rt_sigframe base must be 440 bytes");
103static_assert(
sizeof(
Fpstate) == 512,
"Linux amd64 fpstate must be 512 bytes");
104static_assert(
alignof(
Fpstate) == 16,
"Linux amd64 fpstate must be 16-byte aligned");
106static_assert(__builtin_offsetof(
Ucontext, mcontext) == 40,
107 "Linux amd64 ucontext mcontext offset must be 40");
108static_assert(__builtin_offsetof(
RtSigframe, ucontext) == 8,
109 "Linux amd64 rt_sigframe ucontext offset must be 8");
110static_assert(__builtin_offsetof(
RtSigframe, info) == 312,
111 "Linux amd64 rt_sigframe siginfo offset must be 312");
112static_assert(__builtin_offsetof(
Sigcontext, fpstate) == 184,
113 "Linux amd64 sigcontext fpstate offset must be 184");