[PATCH] x86 interrupt attribute

H.J. Lu hjl.tools@gmail.com
Tue Sep 29 20:30:00 GMT 2015


On Tue, Sep 29, 2015 at 11:49 AM, Mike Stump <mikestump@comcast.net> wrote:
> To be feature complete, it would be nice to have two styles of interrupt functions, one that returns with iret, and one that returns with ret.  The point is that the user might want to call functions from a interrupt handler and not save and restore all call clobbered registers.  By allowing a ret style interrupt handler, calls to a ret style interrupt routine can avoid saving and restoring all call clobbered registers.

Do you have a testcase for this?  I think the current implementation
covers most use cases.

> Oh, and I wish that all the port independent code for interrupt functions was shared across all ports, as redoing all this code for each port is silly (sad).  And example of this would be the sibcall code, the fact that all call saved registers need to be saved is another.  The EPILOGUE_USES or the gen_rtx_USE is yet another.  Type checking the return type to ensure the return type is void, likely another.

A very good point, but beyond this implementation :-(.

> One last comment, most folks use EPILOGUE_USES and mark up the registers as used.  You don’t.  I’m not sure if both ways work equally well, or if there is a reason to prefer one over the other.  Maybe someone could comment on this, as in my port I use EPILOGUE_USES and it seems to work just fine.

We will take a look.

> On Sep 29, 2015, at 6:49 AM, Yulia Koval <vaalfreja@gmail.com> wrote:
>> +  /* Always need to save SSE registrers in interrupt handler.  */
>
> Spelling registrers -> registers.
>
> Not in your code, but I noticed it:
>
>>    /* All pointer bounds argumntas are handled separately here.  */
>
> Spelling argumntas -> arguments?

I checked in an obvious patch to fix those typos.

Thanks.


-- 
H.J.



More information about the Gcc-patches mailing list