#define ASM_SOURCE 1 .file "irq_wrappers.S" .text .extern interrupt_handler_pic .globl irq_handler_wrapper_array .altmacro .macro interrupt_pic irq int_wrapper_\irq: .type int_wrapper_\irq,@function /* INTERRUPT FRAME START */ /* ALREADY PUSHED TO US BY THE PROCESSOR UPON ENTRY TO THIS INTERRUPT */ /* uint32_t ip */ /* uint32_t cs; */ /* uint32_t flags */ /* uint32_t sp; */ /* uint32_t ss; */ /* Pushes the general purpose registers to the stack */ pushal /* Interrupt frame end */ pushl %esp pushl $\irq call interrupt_handler_pic addl $8, %esp popal iret .endm .set i, 0 .rept 0x10 interrupt_pic %i .set i, i+1 .endr .macro ref_int_wrapper irq .long int_wrapper_\irq .endm .section ".rodata" .p2align 5, 0x0 irq_handler_wrapper_array: .set i, 0x0 .rept 0x10 ref_int_wrapper %i .set i, i+1 .endr