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

Joerg Sonnenberger via cfe-dev cfe-dev at lists.llvm.org
Sun Sep 20 14:39:53 PDT 2015


On Thu, Sep 17, 2015 at 12:26:21PM -0700, H.J. Lu via cfe-dev wrote:
> The interrupt and exception handlers are called by x86 processors.  X86
> hardware pushes information onto stack and calls the handler.  The
> requirements are
> 
> 1. Both interrupt and exception handlers must use the 'IRET' instruction,
> instead of the 'RET' instruction, to return from the handlers.
> 2. All registers are callee-saved in interrupt and exception handlers.
> 3. The difference between interrupt and exception handlers is the
> exception handler must pop 'ERROR_CODE' off the stack before the 'IRET'
> instruction.

As I said before, I don't see the optimisation potential and this is far
too limited for many real world users like most OS kernels. As such, I
would like to see a clear demonstration of it improving anything before
any complexity and maintainance cost associated with this hits the tree.

Joerg



More information about the cfe-dev mailing list