'80387 instructions aren't allowed' when compiling ISR
Posted: Sat Apr 25, 2020 5:32 am
I tried to create an ISR using the GCC attribute, but it doesn't work. This is the code:
But when I compile it, GCC throws an error:
When I tried to search online, I couldn't find any examples using the GCC attribute, and I could not find any mentions of this error. What am I doing wrong? Is it even possible?
Thanks!
Code: Select all
#include <stdint.h>
struct interrupt_frame {
uint16_t ip;
uint16_t cs;
uint16_t flags;
uint16_t sp;
uint16_t ss;
} __attribute__((packed));
__attribute__((interrupt)) void irq0(struct interrupt_frame* frame)
{
}
Code: Select all
$ i686-elf-gcc -ffreestanding -c handler.c -o handler.o
handler.c: In function 'irq0':
handler.c:12:1: sorry, unimplemented: 80387 instructions aren't allowed in an interrupt service routine
12 | {
| ^
Thanks!