nes-proj/cpu/x86
Michael LeMay f9072c166b x86: Add missing clobber list in interrupt.h
The SET_INTERRUPT_HANDLER macro defines and registers an interrupt
handler.  It outputs a trampoline for the interrupt handler using a
block of inline assembly, and the address of that trampoline is what
is actually placed in the IDT.  That trampoline invokes the main body
of the interrupt handler.

This patch adds a missing clobber list to the inline assembly block.
It simply lists the caller-saved registers defined by the cdecl
calling convention: EAX, ECX, and EDX.  This is necessary, because the
inline assembly block invokes idt_set_intr_gate_desc using a call
instruction at the time the function containing the
SET_INTERRUPT_HANDLER instance is executed.  The
idt_set_intr_gate_desc function is free to clobber EAX, ECX, and EDX
according to cdecl.  A Clang-generated implementation of
idt_set_intr_gate_desc did in fact clobber those registers, resulting
in incorrect operation of the code following an instance of
SET_INTERRUPT_HANDLER.  The change in this patch informs the compiler
that those registers may be clobbered so that it can adjust the code
that it outputs around the inline assembly block accordingly.
2015-12-21 08:06:14 -02:00
..
drivers x86: Add Intel Quark X1000 UART support. 2015-12-21 08:06:14 -02:00
init x86: Add missing clobber list in interrupt.h 2015-12-21 08:06:14 -02:00
bootstrap_quarkX1000.S x86: Move bootstrap code and linker script to cpu/x86 2015-12-21 08:06:14 -02:00
helpers.h x86: Add PCI support 2015-12-21 08:06:14 -02:00
helpers.S x86: Add PCI support 2015-12-21 08:06:14 -02:00
Makefile.x86_common x86: Improve debugging experience 2015-12-21 08:06:14 -02:00
Makefile.x86_quarkX1000 x86: Add Intel Quark X1000 UART support. 2015-12-21 08:06:14 -02:00
quarkX1000.ld x86: Group sections for QuarkX1000 2015-12-21 08:06:14 -02:00