1
0
Fork 0
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:
Stefan Lankes 2015-06-27 20:14:18 +02:00
parent 6b0c6145d2
commit 003ee08ea7

View file

@ -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