mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-09 00:00:03 +01:00
fix bug in the creation of a pseudo interrupt
by using the 64bit mode, an interrupt pushs always SS and RSP on the stack
This commit is contained in:
parent
6b0c6145d2
commit
003ee08ea7
1 changed files with 4 additions and 1 deletions
|
@ -566,7 +566,10 @@ switch_context:
|
|||
; create on the stack a pseudo interrupt
|
||||
; afterwards, we switch to the task with iret
|
||||
mov rax, rdi ; rdi contains the address to store the old rsp
|
||||
pushf ; RFLAGS
|
||||
push QWORD 0x10 ; SS
|
||||
push rsp ; RSP
|
||||
add QWORD [rsp], 0x08 ; => value of rsp before the creation of a pseudo interrupt
|
||||
pushfq ; RFLAGS
|
||||
push QWORD 0x08 ; CS
|
||||
push QWORD rollback ; RIP
|
||||
push QWORD 0x00 ; Interrupt number
|
||||
|
|
Loading…
Add table
Reference in a new issue