2022-05-31 21:55:06 +08:00

34 lines
827 B
ArmAsm
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include"../common/asm.h"
/**
* @brief 导出内核线程的执行引导程序
* (kernel_thread)
* rsp
* 7unsigned longpt_regs
*/
ENTRY(kernel_thread_func)
popq %r15
popq %r14
popq %r13
popq %r12
popq %r11
popq %r10
popq %r9
popq %r8
popq %rbx
popq %rcx
popq %rdx
popq %rsi
popq %rdi
popq %rbp
popq %rax
movq %rax, %ds
popq %rax
movq %rax, %es
popq %rax
addq $0x38, %rsp
movq %rdx, %rdi
callq *%rbx
movq %rax, %rdi
callq process_do_exit