mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-28 13:18:22 +00:00
x86_64 isr: don't rely on the value of rbp
This commit is contained in:
@@ -58,11 +58,6 @@ section .text
|
||||
%macro popregs 0
|
||||
|
||||
add rsp, 24 ; cr2 gs fs
|
||||
|
||||
cmp rbp,0x3b
|
||||
jne .noswapgspop
|
||||
swapgs
|
||||
.noswapgspop:
|
||||
|
||||
pop rax
|
||||
mov es,rax
|
||||
@@ -85,6 +80,13 @@ section .text
|
||||
pop rbp
|
||||
add rsp,8 ; remove error code
|
||||
|
||||
cmp qword [rsp+8], 0x3b ; user cs
|
||||
jne .noswap
|
||||
|
||||
swapgs
|
||||
|
||||
.noswap:
|
||||
|
||||
%endmacro
|
||||
|
||||
%macro isr 2
|
||||
|
||||
Reference in New Issue
Block a user