osd-contiki/cpu
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
..
6502 Removed CC_FASTCALL. 2015-11-01 18:10:17 +01:00
arm Merge pull request #1344 from tsparber/fix-doxygen 2015-11-30 22:07:15 +01:00
avr Merge pull request #1344 from tsparber/fix-doxygen 2015-11-30 22:07:15 +01:00
cc26xx-cc13xx Merge pull request #1133 from bkozak-scanimetrics/cc-gcc 2015-12-05 00:39:59 +01:00
cc253x Removed CC_FASTCALL. 2015-11-01 18:10:17 +01:00
cc2430 Removed CC_FASTCALL. 2015-11-01 18:10:17 +01:00
cc2538 Implement generic Newlib syscalls 2015-12-16 19:50:49 +01:00
mc1322x Merge pull request #1344 from tsparber/fix-doxygen 2015-11-30 22:07:15 +01:00
msp430 Adding definitions required for TSCH to the sky and z1 platforms 2015-12-04 15:21:53 +01:00
native Merge pull request #1293 from simonduq/pr/fix-warnings 2015-11-10 08:49:11 +01:00
pic32 [cpu/pic32] Removed excess end group 2014-11-10 23:53:33 +01:00
rl78 The -pedantic and -stdc flags trigger a few too many warnings 2015-10-20 10:11:35 +02:00
stm32w108 Merge pull request #1344 from tsparber/fix-doxygen 2015-11-30 22:07:15 +01:00
x86 x86: Add missing clobber list in interrupt.h 2015-12-21 08:06:14 -02:00