我在写操作系统的键盘中断响应程序时遇到了问题:
我是这么写的:
__attribute__((interrupt)) void keydownProc(intv *regs){
...
}
所有人到这都能顺利进行,但是我编译的时候出现了问题:
kernel.c: In function 'clock':
kernel.c:31:1: sorry, unimplemented: 80387 instructions aren't allowed in an interrupt service routine
31 | __attribute__((interrupt)) void clock(intv *regs){
| ^~~~~~~~~~~~~
kernel.c: In function 'keydownProc':
kernel.c:37:1: sorry, unimplemented: 80387 instructions aren't allowed in an interrupt service routine
37 | {
| ^
问题出在哪里?
编译命令:
set gccargs= -std=c11 -m32
gcc %gccargs% -c -g kernel.c -fno-asynchronous-unwind-tables -o kernel.o
gcc %gccargs% -c -g kernelinc/interrupt.c -fno-asynchronous-unwind-tables -o interrupt.o
gcc %gccargs% -c -g kernelinc/gdtidt.c -fno-asynchronous-unwind-tables -o gdtidt.o
gcc %gccargs% -c -g kernelinc/process.c -fno-asynchronous-unwind-tables -o process.o
gcc %gccargs% -c -g kernelinc/filesys/fs.c -fno-asynchronous-unwind-tables -o fs.o