Skip to content

Commit 6e09f6f

Browse files
committed
store a pseudo-rsp during a context switch
- simplifies kernel debugging
1 parent 4d3bd7d commit 6e09f6f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/arch/x86_64/switch.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ macro_rules! save_context {
1414
push rcx
1515
push rdx
1616
push rbx
17+
sub rsp, 8
1718
push rbp
1819
push rsi
1920
push rdi
@@ -44,6 +45,7 @@ macro_rules! restore_context {
4445
pop r8
4546
pop rdi
4647
pop rsi
48+
add rsp, 8
4749
pop rbp
4850
pop rbx
4951
pop rdx

0 commit comments

Comments
 (0)