X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/b91be0033265b5b6bd716bd39cb0971da41906c4..7804c2dae30700296c3205aaf7f546f491999bf4:/lunaix-os/scripts/templates/i386/i386_intrhnds.S.j2 diff --git a/lunaix-os/scripts/templates/i386/i386_intrhnds.S.j2 b/lunaix-os/scripts/templates/i386/i386_intrhnds.S.j2 new file mode 100644 index 0000000..3f9b585 --- /dev/null +++ b/lunaix-os/scripts/templates/i386/i386_intrhnds.S.j2 @@ -0,0 +1,19 @@ +#define __ASM__ +.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 +{% for isrdef in data["exception"] %} +{% if isrdef["has_errcode"] %} + isr_template {{ isrdef["index"] }}, no_error_code=0 +{% else %} + isr_template {{ isrdef["index"] }}, no_error_code=1 +{% endif %} +{% endfor %}