1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:18:12 +00:00

Kernel: Fix stack alignment on x86_64

These were already properly aligned (as far as I can tell).
This commit is contained in:
Gunnar Beutner 2021-06-30 13:09:18 +02:00 committed by Andreas Kling
parent 50839bd1f1
commit e37576440d
3 changed files with 6 additions and 12 deletions

View file

@ -74,13 +74,11 @@ NEVER_INLINE void syscall_asm_entry_dummy()
" pushq %rdi\n"
" pushq %rsp \n" /* set TrapFrame::regs */
" subq $" __STRINGIFY(TRAP_FRAME_SIZE - 8) ", %rsp \n"
" subq $0x8, %rsp\n" /* align stack */
" lea 0x8(%rsp), %rdi \n"
" movq %rsp, %rdi \n"
" cld\n"
" call enter_trap_no_irq \n"
" lea 0x8(%rsp), %rdi \n"
" movq %rsp, %rdi \n"
" call syscall_handler\n"
" addq $0x8, %rsp\n" /* undo alignment */
" jmp common_trap_exit \n");
#endif
// clang-format on