diff --git a/src/dos/dosirq.c b/src/dos/dosirq.c index 612ee2a..916def6 100644 --- a/src/dos/dosirq.c +++ b/src/dos/dosirq.c @@ -282,7 +282,7 @@ static volatile unsigned int __irq_mask; static volatile unsigned int __irq_count[16]; #define DECLARE_IRQ_HANDLER(irqno) \ -static void INTERRUPT_ATTRIBUTES __irq##irqno##_handler () \ +static void INTERRUPT_ATTRIBUTES NO_REORDER __irq##irqno##_handler () \ { \ if (irq_check (__irqs [irqno]) && __irq_confirm (irqno)) \ { \ @@ -291,7 +291,7 @@ static void INTERRUPT_ATTRIBUTES __irq##irqno##_handler () \ } \ irq_ack (__irqs [irqno]); \ } \ -static void __irq##irqno##_end(void) \ +static void NO_REORDER __irq##irqno##_end(void) \ { \ } diff --git a/src/dos/dosirq.h b/src/dos/dosirq.h index 6cc7805..66bd4c4 100644 --- a/src/dos/dosirq.h +++ b/src/dos/dosirq.h @@ -17,6 +17,12 @@ #define PIC1_BASE 0x20 /* PIC1 base */ #define PIC2_BASE 0xA0 /* PIC2 base */ +#ifdef __GNUC__ +#define NO_REORDER __attribute__((no_reorder)) +#else +#define NO_REORDER +#endif + #ifdef __WATCOMC__ #define INTERRUPT_ATTRIBUTES __interrupt __far #else diff --git a/src/dos/dossb.c b/src/dos/dossb.c index 3dc9bc1..223b089 100644 --- a/src/dos/dossb.c +++ b/src/dos/dossb.c @@ -42,7 +42,7 @@ _func_noclone inportb(SB_DSP_RESET); } -static void INTERRUPT_ATTRIBUTES sb_irq() +static void INTERRUPT_ATTRIBUTES NO_REORDER sb_irq() { /* Make sure its not a spurious IRQ */ if (!irq_check(sb.irq_handle)) @@ -68,7 +68,7 @@ static void INTERRUPT_ATTRIBUTES sb_irq() sb.timer_callback(); } -static void sb_irq_end() +static void NO_REORDER sb_irq_end() { } @@ -109,7 +109,7 @@ static int __sb_irq_irqdetect(int irqno) return 1; } -static void INTERRUPT_ATTRIBUTES __sb_irq_dmadetect() +static void INTERRUPT_ATTRIBUTES NO_REORDER __sb_irq_dmadetect() { /* Make sure its not a spurious IRQ */ if (!irq_check(sb.irq_handle)) @@ -127,7 +127,7 @@ static void INTERRUPT_ATTRIBUTES __sb_irq_dmadetect() irq_ack(sb.irq_handle); } -static void __sb_irq_dmadetect_end() +static void NO_REORDER __sb_irq_dmadetect_end() { }