[cfe-dev] RFC: Support x86 interrupt and exception handlers

Joerg Sonnenberger via cfe-dev cfe-dev at lists.llvm.org
Thu Sep 3 11:06:32 PDT 2015

On Thu, Sep 03, 2015 at 10:37:18AM -0700, H.J. Lu via cfe-dev wrote:
> The design goals of interrupt and exception handlers for x86 processors
> are:
> 1. No new calling convention in compiler.
> 2. Support both 32-bit and 64-bit modes.
> 3. Flexible for compilers to optimize.
> 4. Easy to use by programmers.

Who is the intended target audience? I see a very low potential for
compiler optimisations and quite a few things that can go wrong. If I
look at the NetBSD code for interrupt handlers, there is quite a bit
complexity a generic compiler won't handle. For real interrupts for
example, this is the code to identify the interrupt source and
acknowledge the PIC. There is also the question of %fs/%gs handling in
the kernel. All in all, I don't see why this is a good idea for x86.


More information about the cfe-dev mailing list