2024-03-26 00:07:24 +02:00
|
|
|
# uint64_t read_ip()
|
2024-03-22 14:48:33 +02:00
|
|
|
.global read_ip
|
|
|
|
read_ip:
|
2023-02-02 23:24:12 +02:00
|
|
|
popq %rax
|
|
|
|
jmp *%rax
|
|
|
|
|
2024-03-29 18:02:12 +02:00
|
|
|
# void start_thread()
|
|
|
|
.global start_kernel_thread
|
|
|
|
start_kernel_thread:
|
|
|
|
# STACK LAYOUT
|
|
|
|
# on_exit arg
|
|
|
|
# on_exit func
|
|
|
|
# entry arg
|
|
|
|
# entry func
|
2023-02-02 23:24:12 +02:00
|
|
|
|
2024-03-29 18:02:12 +02:00
|
|
|
movq 8(%rsp), %rdi
|
|
|
|
movq 0(%rsp), %rsi
|
|
|
|
call *%rsi
|
2023-04-12 17:51:36 +03:00
|
|
|
|
2024-03-29 18:02:12 +02:00
|
|
|
movq 24(%rsp), %rdi
|
|
|
|
movq 16(%rsp), %rsi
|
|
|
|
call *%rsi
|