From 036acc52ce9d0fb9e7d92768ff74939a29c07f32 Mon Sep 17 00:00:00 2001 From: login Date: Tue, 29 Nov 2022 21:46:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86entry.S=E4=B8=AD=E5=86=97=E4=BD=99?= =?UTF-8?q?=E7=9A=84ret=5Ffrom=5Fsyscall=E4=BB=A3=E7=A0=81=E5=88=A0?= =?UTF-8?q?=E9=99=A4=EF=BC=8C=E6=94=B9=E4=B8=BAjmp=20Restore=5Fall=20(#98)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 将entry.S中冗余的ret_from_syscall代码删除,改为jmp Restore_all --- kernel/src/exception/entry.S | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/kernel/src/exception/entry.S b/kernel/src/exception/entry.S index 2159f5bf..74368cfb 100644 --- a/kernel/src/exception/entry.S +++ b/kernel/src/exception/entry.S @@ -142,36 +142,9 @@ ENTRY(system_call) callq system_call_function - // 从系统调用中返回 ENTRY(ret_from_system_call) - - popq %r15 - popq %r14 - popq %r13 - popq %r12 - popq %r11 - popq %r10 - popq %r9 - popq %r8 - popq %rbx - popq %rcx - popq %rdx - popq %rsi - popq %rdi - popq %rbp - - popq %rax // 不允许直接pop到ds - movq %rax, %ds - - popq %rax - movq %rax, %es - - popq %rax - addq $0x10, %rsp // 弹出变量FUNC和errcode - - sti - iretq + jmp Restore_all