1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 21:27:36 +00:00

Kernel+LibC: Add registers for AARCH64 in __mcontext

This commit is contained in:
Gunnar Beutner 2022-10-13 10:17:44 +02:00 committed by Linus Groh
parent b7555419f1
commit 70f4d943be
2 changed files with 45 additions and 7 deletions

View file

@ -25,8 +25,10 @@ struct [[gnu::packed]] PtraceRegisters : public __mcontext {
return eip;
# elif ARCH(X86_64)
return rip;
# elif ARCH(AARCH64)
return pc;
# else
TODO_AARCH64();
# error Unknown architecture
# endif
}
@ -36,9 +38,10 @@ struct [[gnu::packed]] PtraceRegisters : public __mcontext {
eip = ip;
# elif ARCH(X86_64)
rip = ip;
# elif ARCH(AARCH64)
pc = ip;
# else
(void)ip;
TODO_AARCH64();
# error Unknown architecture
# endif
}
@ -48,8 +51,10 @@ struct [[gnu::packed]] PtraceRegisters : public __mcontext {
return ebp;
# elif ARCH(X86_64)
return rbp;
# elif ARCH(AARCH64)
return r29;
# else
TODO_AARCH64();
# error Unknown architecture
# endif
}
@ -59,9 +64,10 @@ struct [[gnu::packed]] PtraceRegisters : public __mcontext {
ebp = bp;
# elif ARCH(X86_64)
rbp = bp;
# elif ARCH(AARCH64)
r29 = bp;
# else
(void)bp;
TODO_AARCH64();
# error Unknown architecture
# endif
}
# endif