refactor: decouple i386 specific instruction invocation
[lunaix-os.git] / 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
deleted file mode 100644 (file)
index 9d39273..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#define __ASM__
-#include <arch/x86/interrupts.h>
-
-.macro isr_template vector, no_error_code=1
-    .global _asm_isr\vector
-    .type _asm_isr\vector, @function
-    _asm_isr\vector:
-        .if \no_error_code
-            pushl $0x0
-        .endif
-        pushl $\vector
-        jmp interrupt_wrapper
-.endm
-
-.section .text
-    isr_template FAULT_DIVISION_ERROR
-    isr_template FAULT_GENERAL_PROTECTION, no_error_code=0
-    isr_template FAULT_PAGE_FAULT, no_error_code=0
-
-    isr_template LUNAIX_SYS_PANIC
-
-    interrupt_wrapper:
-        pushl %esp
-        pushl %esi
-        pushl %ebp
-        pushl %edi
-        pushl %edx
-        pushl %ecx
-        pushl %ebx
-        pushl %eax
-
-        movl %esp, %eax
-        andl $0xfffffff0, %esp
-        subl $16, %esp
-        movl %eax, (%esp)
-
-        call interrupt_handler
-        popl %eax
-        movl %eax, %esp
-
-        popl %eax
-        popl %ebx
-        popl %ecx
-        popl %edx
-        popl %edi
-        popl %ebp
-        popl %esi
-        popl %esp
-
-        addl $8, %esp
-
-        iret
\ No newline at end of file