From: John Hodge Date: Thu, 13 May 2010 15:09:57 +0000 (+0800) Subject: Speedup fix to PUSH_GPR and POP_GPR X-Git-Tag: rel0.06~191 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=89fba51f2433cf185831ee70554b99fe87e44a9d;p=tpg%2Facess2.git Speedup fix to PUSH_GPR and POP_GPR --- diff --git a/Kernel/arch/x86_64/desctab.asm b/Kernel/arch/x86_64/desctab.asm index eef93f0d..aec7656c 100644 --- a/Kernel/arch/x86_64/desctab.asm +++ b/Kernel/arch/x86_64/desctab.asm @@ -46,12 +46,42 @@ Irq%1: %endmacro %macro PUSH_GPR 0 - PUSH_EX r15, r14, r13, r12, r11, r10, r9, r8 - PUSH_EX rsi, rdi, rbp, rsp, rbx, rdx, rcx, rax + mov [rsp-0x08], r15 + mov [rsp-0x10], r14 + mov [rsp-0x18], r13 + mov [rsp-0x20], r12 + mov [rsp-0x28], r11 + mov [rsp-0x30], r10 + mov [rsp-0x38], r9 + mov [rsp-0x40], r8 + mov [rsp-0x48], rdi + mov [rsp-0x50], rsi + mov [rsp-0x58], rbp + mov [rsp-0x60], rsp + mov [rsp-0x68], rbx + mov [rsp-0x70], rdx + mov [rsp-0x78], rcx + mov [rsp-0x80], rax + sub rsp, 0x80 %endmacro %macro POP_GPR 0 - POP_EX rsi, rdi, rbp, rsp, rbx, rdx, rcx, rax - POP_EX r15, r14, r13, r12, r11, r10, r9, r8 + add rsp, 0x80 + mov r15, [rsp-0x08] + mov r14, [rsp-0x10] + mov r13, [rsp-0x18] + mov r12, [rsp-0x20] + mov r11, [rsp-0x28] + mov r10, [rsp-0x30] + mov r9, [rsp-0x38] + mov r8, [rsp-0x40] + mov rdi, [rsp-0x48] + mov rsi, [rsp-0x50] + mov rbp, [rsp-0x58] + ;mov rsp, [rsp-0x60] + mov rbx, [rsp-0x68] + mov rdx, [rsp-0x70] + mov rcx, [rsp-0x78] + mov rax, [rsp-0x80] %endmacro [extern Proc_Scheduler]