First Hello world syscall
All checks were successful
Build documentation / build-and-deploy (push) Successful in 26s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 26s
This commit is contained in:
@@ -1,30 +1,10 @@
|
||||
#define pop_regs \
|
||||
popq %r15; \
|
||||
popq %r14; \
|
||||
popq %r13; \
|
||||
popq %r12; \
|
||||
popq %r11; \
|
||||
popq %r10; \
|
||||
popq %r9; \
|
||||
popq %r8; \
|
||||
popq %rbx; \
|
||||
popq %rbp; \
|
||||
popq %rdi; \
|
||||
popq %rsi; \
|
||||
popq %rdx; \
|
||||
popq %rcx; \
|
||||
popq %rax;
|
||||
#include <amd64/regsasm.h>
|
||||
|
||||
.global amd64_do_sched
|
||||
amd64_do_sched:
|
||||
cli
|
||||
movq %rsi, %cr3
|
||||
movq %rdi, %rsp
|
||||
pop_regs
|
||||
|
||||
movq 144(%rsp), %rax
|
||||
testb $3, %al
|
||||
jz 1f
|
||||
swapgs
|
||||
1:
|
||||
add $16, %rsp
|
||||
iretq
|
||||
|
||||
Reference in New Issue
Block a user