X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/8357bda627bdf02c1b69eecf27993182239fb463..d342435e493c415e10042cfc8aab45c2b2aa0868:/lunaix-os/kernel/asm/x86/interrupt.S diff --git a/lunaix-os/kernel/asm/x86/interrupt.S b/lunaix-os/kernel/asm/x86/interrupt.S index 4647e95..a03bce6 100644 --- a/lunaix-os/kernel/asm/x86/interrupt.S +++ b/lunaix-os/kernel/asm/x86/interrupt.S @@ -1,7 +1,7 @@ #define __ASM__ #include #include -// #define __ASM_INTR_DIAGNOSIS +#define __ASM_INTR_DIAGNOSIS .macro isr_template vector, no_error_code=1 .global _asm_isr\vector @@ -96,9 +96,11 @@ call intr_handler + movl (%esp), %eax + .global soft_iret soft_iret: - popl %esp + movl %eax, %esp popl %eax popl %ebx @@ -118,14 +120,9 @@ addl $8, %esp #ifdef __ASM_INTR_DIAGNOSIS - cmpl $0, (%esp) - jz 1f - iret -1: - movl $__current, %eax - movl (%esp), %ebx - movl $debug_resv, %ecx - ud2 -#else - iret + pushl %eax + movl 4(%esp), %eax + movl %eax, debug_resv + popl %eax #endif + iret