mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-09 00:00:03 +01:00
clear the DF flag to adhere the x86_64 ABI
This commit is contained in:
parent
07fc5e2881
commit
f838a751cf
1 changed files with 6 additions and 0 deletions
|
@ -114,6 +114,10 @@ start64:
|
|||
mov fs, eax
|
||||
mov gs, eax
|
||||
|
||||
; clear DF flag => default value by entering a function
|
||||
; => see ABI
|
||||
cld
|
||||
|
||||
; determine full image size
|
||||
mov rax, kernel_end
|
||||
sub rax, kernel_start
|
||||
|
@ -464,6 +468,8 @@ isrsyscall:
|
|||
global switch_context
|
||||
align 16
|
||||
switch_context:
|
||||
; by entering a function the DF flag has to be cleared => see ABI
|
||||
cld
|
||||
; create on the stack a pseudo interrupt
|
||||
; afterwards, we switch to the task with iret
|
||||
push QWORD 0x10 ; SS
|
||||
|
|
Loading…
Add table
Reference in a new issue